/* Playback presentation only. Playback, geometry and visibility state remain in existing assets. */
body.tv{
  --accent:#4f46e5;--line:#dfe4ef;
  font-family:Inter,"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,sans-serif;
  --ui-icon-video:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2214%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22m10%209%205%203-5%203Z%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-calendar:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2216%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M16%203v4M8%203v4M3%2011h18M8%2015h2M14%2015h2%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-megaphone:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m3%2010%2013-6v16L3%2014v-4Zm13-2h3a2%202%200%200%201%200%208h-3M6%2015l2%206h3l-2-5%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-layout:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M15%203v18M15%2012h6%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-monitor:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2214%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M8%2021h8M12%2017v4%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-plus:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-upload:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V3m-5%205%205-5%205%205M4%2015v5a1%201%200%200%200%201%201h14a1%201%200%200%200%201-1v-5%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-edit:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m15%205%204%204M4%2020l4-1L20%207a3%203%200%200%200-4-4L4%2015v5Z%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-trash:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18M9%206V3h6v3M5%206l1%2015h12l1-15M10%2010v7M14%2010v7%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-save:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%203h12l4%204v14H3V3h2ZM7%203v6h10V3M7%2021v-8h10v8%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-refresh:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%207a9%209%200%201%200%201%208M20%203v5h-5%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-logout:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%203H4v18h5M9%2012h12m-4-4%204%204-4%204%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-external:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203h7v7M21%203l-12%2012M10%203H3v18h18v-7%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-palette:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203a9%209%200%201%200%200%2018h1a2%202%200%200%200%200-4h-1a2%202%200%200%201%200-4h3a6%206%200%200%200%206-5c0-3-4-5-9-5Z%22%2F%3E%3Cpath%20d%3D%22M7%208h.01M12%206h.01M17%208h.01M6%2013h.01%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-list:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%206h13M8%2012h13M8%2018h13M3%206h.01M3%2012h.01M3%2018h.01%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%223%22%2F%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%221.5%22%2F%3E%3Cpath%20d%3D%22m3%2017%205-5%204%204%204-6%205%207%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-signal:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2%208a16%2016%200%200%201%2020%200M5%2012a11%2011%200%200%201%2014%200M8%2016a6%206%200%200%201%208%200M12%2020h.01%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-play:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m8%204%2012%208-12%208Z%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-pause:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%204v16M16%204v16%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-next:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m4%204%2012%208-12%208ZM20%204v16%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-settings:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m9%203-1%203-3%201%201%203-2%202%202%202-1%203%203%201%201%203h6l1-3%203-1-1-3%202-2-2-2%201-3-3-1-1-3H9Z%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-close:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m6%206%2012%2012M18%206%206%2018%22%2F%3E%3C%2Fsvg%3E");
  --ui-icon-lock:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%225%22%20y%3D%2210%22%20width%3D%2214%22%20height%3D%2211%22%20rx%3D%223%22%2F%3E%3Cpath%20d%3D%22M8%2010V7a4%204%200%200%201%208%200v3M12%2014v3%22%2F%3E%3C%2Fsvg%3E");
}
.tv button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:44px;min-height:44px;max-height:44px;margin:0;padding:0 16px;
  border:1px solid transparent;border-radius:10px;background:#4f46e5;color:#fff;
  font:600 15px/1.2 Inter,"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;
  white-space:nowrap;cursor:pointer;box-shadow:0 2px 5px #151a3014;
  transition:background .16s,border-color .16s,box-shadow .16s;
}
.tv button:hover{filter:none;background:#4338ca;box-shadow:0 3px 9px #151a3026}
.tv button:active{box-shadow:none}
.tv button:disabled{opacity:.5;cursor:default}
.tv button:focus-visible{outline:3px solid #a5b4fc;outline-offset:3px}
.tv button::before{
  content:"";display:block;flex:0 0 18px;width:18px;height:18px;background:currentColor;
  -webkit-mask:var(--button-icon) center/contain no-repeat;mask:var(--button-icon) center/contain no-repeat;
}
.tv button:not([id]){--button-icon:var(--ui-icon-save)}
.tv #start{--button-icon:var(--ui-icon-external)}
.tv #pause{--button-icon:var(--ui-icon-pause)}
.tv #next{--button-icon:var(--ui-icon-next)}
.tv #open-settings{--button-icon:var(--ui-icon-settings)}
.tv #close-settings{--button-icon:var(--ui-icon-close)}
.tv #tv-controls{
  gap:8px;padding:12px 18px;padding-bottom:max(12px,env(safe-area-inset-bottom));
  border-top:1px solid #ffffff12;background:linear-gradient(180deg,#111827db,#0b1220f2);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
}
.tv #tv-controls button:not(#start){background:#ffffff12;border-color:#ffffff24;color:#f1f5ff;box-shadow:none}
.tv #tv-controls button:not(#start):hover{background:#ffffff22;border-color:#ffffff40}
.tv #tv-controls[data-countdown="true"] #start{
  height:44px;min-height:44px;max-height:44px;padding:0 16px;font-size:15px;
}
.tv #tv-status{font-size:14px;line-height:1.5;color:#d7e0f1;overflow-wrap:anywhere}
.tv #tv-message{
  padding:12px 16px;border:1px solid #ffffff1f;border-radius:12px;
  background:#101a2be8;box-shadow:0 6px 25px #0003;
  font-size:14px;line-height:1.6;color:#f1f5ff;
}
.tv #tv-loading{background:#080d18;color:#dce4f5;font-size:20px;letter-spacing:.03em}
.tv #tv-pairing{
  background:radial-gradient(ellipse at 50% 20%,#192c52 0,transparent 65%),#080d18;
  padding:24px 16px;
}
.tv #tv-pairing form,.tv #tv-settings{
  width:min(520px,calc(100vw - 32px));padding:32px;
  border:1px solid #e0e5ef;border-radius:20px;background:#fff;color:#20283f;
  box-shadow:0 20px 80px #0005;
}
.tv #tv-pairing form{margin:auto;max-width:520px}
.tv #tv-settings{max-width:520px;max-height:calc(100dvh - 32px);overflow-y:auto}
.tv #tv-settings::backdrop{background:#080d18b8;backdrop-filter:blur(6px)}
.tv .player-form-symbol{
  display:grid;place-items:center;width:52px;height:52px;margin-bottom:20px;
  background:#eef0ff;border:1px solid #e0e4ff;border-radius:15px;color:#4f46e5;
}
.tv .player-form-symbol::before{
  content:"";width:26px;height:26px;background:currentColor;
  -webkit-mask:var(--ui-icon-monitor) center/contain no-repeat;mask:var(--ui-icon-monitor) center/contain no-repeat;
}
.tv .settings-symbol::before{
  -webkit-mask-image:var(--ui-icon-settings);mask-image:var(--ui-icon-settings);
}
.tv #tv-pairing h1,.tv #tv-settings h1{margin:0 0 12px;font-size:28px;font-weight:750;letter-spacing:-.02em;color:#20283f;line-height:1.35}
.tv #tv-pairing p,.tv #tv-settings p{margin:0 0 24px;font-size:15px;line-height:1.7;color:#69748b}
.tv #tv-pairing label,.tv #tv-settings label{margin:0 0 20px;font-size:15px;font-weight:650;line-height:1.5;color:#303b54}
.tv #tv-pairing input,.tv #tv-settings input{
  width:100%;height:48px;margin-top:8px;padding:0 14px;border:1px solid #d4dceb;
  border-radius:10px;background:#fff!important;color:#18243b!important;
  -webkit-text-fill-color:#18243b!important;caret-color:#18243b!important;
  font:400 16px/1.4 Inter,"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;
  box-shadow:0 1px 2px #1a284b05;outline:none;
}
.tv #tv-pairing input:focus,.tv #tv-settings input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f11a}
.tv #tv-pairing input::placeholder,.tv #tv-settings input::placeholder{color:#8a95ab!important;-webkit-text-fill-color:#8a95ab!important}
.tv #tv-pairing #pair-error,.tv #tv-settings #settings-error{
  min-height:0;margin:0 0 20px;border-radius:10px;color:#b42342!important;font-size:14px;
}
.tv #pair-error:empty,.tv #settings-error:empty{display:none}
.tv #pair-error:not(:empty),.tv #settings-error:not(:empty){padding:12px 14px;border:1px solid #f6d0d9;background:#fff1f4;overflow-wrap:anywhere}
.tv #tv-settings .dialog-actions{display:flex;gap:10px;flex-wrap:wrap;padding-top:4px}
.tv #tv-settings .secondary{background:#f1f4fa;border-color:#e1e6f0;color:#526078;box-shadow:none}
.tv #tv-settings .secondary:hover{background:#e6ebf5;border-color:#cbd4e5}
@media(max-width:600px){
  .tv #tv-pairing form,.tv #tv-settings{padding:24px;border-radius:16px}
  .tv #tv-pairing h1,.tv #tv-settings h1{font-size:25px}
  .tv #tv-controls{padding:10px 12px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .tv #tv-status{flex:1 1 100%;font-size:13px}
  .tv #tv-controls button{padding:0 12px;font-size:14px}
  .tv #tv-controls[data-countdown="true"] #start{padding:0 12px;font-size:14px}
  .tv #tv-settings .dialog-actions button{flex:1 1 auto}
}
@media(prefers-reduced-motion:reduce){.tv button{transition:none}}

/* Match the compact spacing of the management forms. */
.tv #tv-pairing form,.tv #tv-settings{padding:24px}
.tv .player-form-symbol{margin-bottom:14px}
.tv #tv-pairing h1,.tv #tv-settings h1{margin-bottom:8px}
.tv #tv-pairing p,.tv #tv-settings p{margin-bottom:16px}
.tv #tv-pairing label,.tv #tv-settings label{margin-bottom:12px}
.tv #tv-pairing input,.tv #tv-settings input{height:44px;margin-top:6px}
.tv #tv-pairing #pair-error,.tv #tv-settings #settings-error{margin-bottom:12px}
@media(max-width:600px){.tv #tv-pairing form,.tv #tv-settings{padding:20px}}
.tv #tv-settings .playback-details{margin:0 0 16px;padding:14px;border:1px solid #dde3f0;background:#f6f8fc;border-radius:12px;color:#303b54}
.tv #tv-settings .playback-details h2{font-size:16px;margin:0 0 10px}
.tv #tv-settings .playback-details dl{display:grid;grid-template-columns:100px minmax(0,1fr);gap:6px 10px;margin:0;font-size:14px;line-height:1.5}
.tv #tv-settings .playback-details dt{font-weight:650}
.tv #tv-settings .playback-details dd{margin:0;overflow-wrap:anywhere}
@media(max-width:380px){.tv #tv-settings .playback-details dl{grid-template-columns:80px minmax(0,1fr)}}

.tv button.layout-playback-error{max-width:90%;height:auto;min-height:44px;padding:10px 14px;border:1px solid #ffffff40;border-radius:8px;background:#17203b;color:#e2e8f0;font-size:14px;line-height:1.5;cursor:pointer}
/* v69 idle screen: shown in the main area when no schedule or playable item applies; the marquee stays above it. */
.tv #idle-screen{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;background:#000;z-index:1;pointer-events:none}
