:root {
  color-scheme: dark;
  background: #101113;
  color: #f4f3f0;
  font-family: system-ui, "Segoe UI", sans-serif;
  --panel: #1b1c20;
  --line: #36383f;
  --muted: #b3b3ba;
  --accent: #ffc75e;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.shell { width: min(100% - 44px, 1040px); margin-inline: auto; }
.top { border-bottom: 1px solid #282a2e; }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { display: flex; gap: 9px; align-items: center; font-size: 21px; font-weight: 750; }
.brand span:last-child { color: var(--muted); font-weight: 450; }
.mark { width: 19px; height: 19px; margin-right: 5px; background: var(--accent); clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%, 44% 50%); }
main { padding-block: 24px 55px; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 56px); line-height: 1.1; letter-spacing: -.045em; font-weight: 690; }
p { color: var(--muted); }
button, input { min-height: 54px; border-radius: 12px; font: 600 16px/1.25 system-ui, sans-serif; }
button { cursor: pointer; padding: 0 18px; border: 1px solid var(--line); color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--accent); color: #241906; border-color: var(--accent); }
.primary:hover { background: #ffda8e; }
.quiet { background: var(--panel); }
.quiet:hover, .item:hover { background: #292b31; }
.login { max-width: 540px; margin: clamp(18px, 8vh, 110px) auto 0; }
.login p { margin: 14px 0 27px; }
label { display: block; margin-bottom: 8px; color: var(--muted); }
.field { display: flex; gap: 9px; }
input { padding: 0 14px; color: inherit; width: 100%; min-width: 0; background: var(--panel); border: 1px solid var(--line); }
.heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.navigation:not(:empty) { margin-bottom: 13px; }
.items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.item { min-height: 72px; background: var(--panel); display: flex; align-items: center; text-align: left; gap: 14px; }
.item .text { display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.item small { font-size: 13px; color: var(--muted); }
.item .indicator { color: var(--accent); margin-left: auto; font-size: 19px; }
.more { margin-top: 18px; }
.screen video, .stream-canvas { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 64vh; background: #070708; border: 1px solid var(--line); border-radius: 14px; touch-action: manipulation; }
.transport { display: flex; flex-wrap: wrap; gap: 10px; }
.transport button { min-width: min(30vw, 150px); }
#notice { margin-block: 16px 0; line-height: 1.45; }
#notice:empty { display: none; }
.media-shelf { margin: 8px 0 34px; }
.media-shelf h2 { margin: 0 0 16px; font-size: clamp(25px, 4vw, 40px); line-height: 1.1; letter-spacing: -.035em; }
.media-shelf .items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
#continue-watching .item { min-height: 91px; }
.media-shelf progress { width: min(100%, 160px); height: 5px; margin-top: 4px; accent-color: var(--accent); }
.tracks { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.track-field { flex: 1 1 225px; max-width: 380px; min-width: 0; }
.track-field label { margin-bottom: 6px; }
.tracks select { display: block; min-height: 54px; width: 100%; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: inherit; font: 600 16px/1.25 system-ui, sans-serif; }
.tracks select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#subtitle-notice { margin: 0 0 6px; }
#subtitle-notice:empty { display: none; }
.screen { position: relative; margin: 20px 0 14px; }
.stream-canvas { object-fit: contain; }
.subtitle-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; object-fit: contain; }
.screen:fullscreen { background: #000; }
.screen:fullscreen video, .screen:fullscreen .stream-canvas { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; object-fit: contain; }
.renderer-status { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 6px 10px; border-radius: 6px; background: #000d; color: #fff; font-size: 14px; font-weight: 600; pointer-events: none; }
.caption-overlay { position: absolute; left: 5%; right: 5%; bottom: 7%; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; text-align: center; }
.caption-overlay span { padding: 2px 10px; border-radius: 6px; background: #000000b8; color: #fff; font: 600 clamp(17px, 2.9vw, 38px)/1.3 system-ui, sans-serif; white-space: pre-line; text-shadow: 0 1px 2px #000; }
.timeline { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.timeline input { flex: 1; min-height: 44px; padding: 0; border: 0; background: none; accent-color: var(--accent); }
.timeline .time { min-width: 4.5em; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .time:last-child { text-align: right; }
.exit-fullscreen { display: none; }
.screen:fullscreen .exit-fullscreen { display: block; position: absolute; z-index: 1; top: 16px; right: 16px; background: #17181cdd; }
@media (max-width: 480px) {
  .shell { width: calc(100% - 28px); }
  .top-inner { min-height: 66px; }
  .heading .field { width: 100%; }
}
