/* The System's TV app in a browser: the Roku channel's 1920x1080 layout and Obsidian palette (system-tv Ui.brs pal(),
   system-firetv Theme.kt), drawn on a fixed stage that app.js scales to the window. */
@font-face { font-family: "Cond"; src: url(fonts/condensed_bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cond"; src: url(fonts/condensed_medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: "Mono"; src: url(fonts/mono_medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: "Serif"; src: url(fonts/serif_regular.ttf); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  --ground: #0b0b0c;
  --panel: #17171a;
  --panel-hi: #28282a;
  --accent: #a17a4e;
  --accent-hi: #e0a96d;
  --ring: #ffffff;
  --text: #efe9df;
  --soft: #aba6a0;
  --dim: #928f8c;
  --dim-faint: rgba(146, 143, 140, 0.6);
  --head: #f9f6f2;
  --on-accent: #000000;
  --line: rgba(224, 169, 109, 0.35);
  --track: rgba(255, 255, 255, 0.15);
  --sans: "Helvetica Neue", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Mono", ui-monospace, Menlo, monospace;
  --cond: "Cond", "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--text); font-family: var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { cursor: default; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; }
button:focus, input:focus { outline: none; }
img { display: block; }

#stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%) scale(var(--s, 1)); overflow: hidden; background: var(--ground); }
.screen { position: absolute; inset: 0; overflow: hidden; background: var(--ground); }
.screen[hidden] { display: none; }
.grain { position: absolute; inset: 0; background: url(icons/grain.png); opacity: 0.07; pointer-events: none; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.45) 100%); }

/* ---------- Icons: the TV's white glyphs, tinted by the text colour ---------- */
.ic { display: inline-block; width: 1em; height: 1em; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.i-play { --m: url(icons/i_play.png); } .i-pause { --m: url(icons/i_pause.png); } .i-rew { --m: url(icons/i_rew.png); }
.i-fwd { --m: url(icons/i_fwd.png); } .i-prev { --m: url(icons/i_prev.png); } .i-next { --m: url(icons/i_next.png); }
.i-audio { --m: url(icons/i_audio.png); } .i-cc { --m: url(icons/i_cc.png); } .i-quality { --m: url(icons/i_quality.png); }
.i-restart { --m: url(icons/i_restart.png); } .i-list { --m: url(icons/i_list.png); } .i-heart { --m: url(icons/i_heart.png); }
.i-hearton { --m: url(icons/i_hearton.png); } .i-check { --m: url(icons/i_check.png); } .i-shuffle { --m: url(icons/i_shuffle.png); }
.i-search { --m: url(icons/i_search.png); } .i-skip { --m: url(icons/i_skip.png); } .i-down2 { --m: url(icons/i_down2.png); }
.i-plus { --m: url(icons/i_plus.png); }

/* ---------- Buttons: pill at rest, accent fill with a white edge when focused ---------- */
.btn { display: inline-flex; align-items: center; gap: 14px; height: 60px; padding: 0 26px; border-radius: 14px; background: rgba(40, 40, 42, 0.82); border: 2px solid rgba(255, 255, 255, 0.08); color: var(--text); font-weight: 600; font-size: 25px; white-space: nowrap; transition: transform 0.2s var(--ease), background 0.15s, border-color 0.15s; }
.btn .ic { font-size: 28px; }
.btn.lead { background: rgba(161, 122, 78, 0.28); border-color: rgba(224, 169, 109, 0.55); }
.btn.f { background: linear-gradient(180deg, #c09466, var(--accent)); border-color: var(--ring); color: var(--on-accent); transform: scale(1.04); box-shadow: 0 10px 34px rgba(224, 169, 109, 0.28); }
.btn.square { width: 72px; padding: 0; justify-content: center; }
.btn.square .ic { font-size: 32px; }

/* ---------- Top bar ---------- */
.bar { position: absolute; left: 0; right: 0; top: 0; height: 180px; z-index: 5; pointer-events: none; background: linear-gradient(180deg, var(--ground) 0, var(--ground) 146px, rgba(11, 11, 12, 0) 180px); opacity: 0; transition: opacity 0.25s var(--ease); }
.home.scrolled .bar { opacity: 1; }
.top { position: absolute; left: 0; right: 0; top: 0; height: 126px; z-index: 6; }
.brand { position: absolute; left: 84px; top: 46px; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 19px; letter-spacing: 6px; color: var(--head); }
.brand img { width: 36px; height: 36px; }
.nav { position: absolute; top: 40px; display: flex; gap: 6px; }
.tab { position: relative; height: 60px; padding: 0 20px; display: flex; align-items: center; gap: 10px; border-radius: 12px; color: var(--dim); font-size: 30px; }
.tab .num { font-family: var(--mono); font-size: 18px; color: var(--dim-faint); }
.tab .ic { font-size: 26px; }
.tab.search { width: 66px; justify-content: center; padding: 0; }
.tab.on, .tab.f { color: var(--head); }
.tab.on .num, .tab.f .num { color: var(--accent-hi); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--accent-hi); box-shadow: 0 2px 6px rgba(224, 169, 109, 0.4); }
.tab.f { background: rgba(40, 40, 42, 0.9); box-shadow: inset 0 0 0 3px var(--ring); }
.clock { position: absolute; right: 84px; top: 40px; text-align: right; font-size: 40px; color: var(--head); font-variant-numeric: tabular-nums; }
.date { position: absolute; right: 290px; top: 46px; text-align: right; font-family: var(--mono); font-size: 19px; color: var(--dim); line-height: 28px; }
.date .linked { color: var(--accent-hi); }
.ruler { position: absolute; left: 84px; right: 84px; top: 116px; height: 8px; opacity: 0.35; background: repeating-linear-gradient(90deg, var(--accent-hi) 0 1px, transparent 1px 24px) bottom / 100% 6px no-repeat, linear-gradient(var(--accent-hi), var(--accent-hi)) bottom / 100% 1px no-repeat; }

/* ---------- Home ---------- */
.scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; scroll-behavior: smooth; }
.scroll::-webkit-scrollbar { display: none; }
.home .scroll { padding-top: 126px; padding-bottom: 300px; }
.hero { position: relative; height: 544px; transition: opacity 0.25s var(--ease); }
.home.compact .hero { height: 428px; }
.hero-text { position: absolute; left: 84px; top: 36px; width: 760px; }
.kicker { font-family: var(--mono); font-size: 20px; text-transform: uppercase; color: var(--accent-hi); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kicker .rest { color: var(--dim); }
.over { margin-top: 12px; font-family: var(--cond); font-weight: 500; font-size: 30px; letter-spacing: 10px; color: var(--soft); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-title { margin-top: 2px; font-family: var(--cond); font-weight: 700; font-size: 76px; line-height: 0.98; color: var(--head); text-transform: uppercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-title.long { font-size: 60px; }
.home.compact .hero-title { -webkit-line-clamp: 1; }
.readout { display: flex; margin-top: 22px; height: 84px; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); align-items: center; }
.readout > div { padding: 0 22px; border-left: 1px solid rgba(224, 169, 109, 0.18); }
.readout > div:first-child { padding-left: 0; border-left: 0; }
.readout small { display: block; font-family: var(--mono); font-size: 18px; color: var(--dim); text-transform: uppercase; }
.readout b { display: block; font-weight: 400; font-size: 28px; color: var(--text); white-space: nowrap; }
.readout .ends b { color: var(--accent-hi); }
.actions { position: absolute; left: 84px; bottom: 12px; display: flex; align-items: center; gap: 16px; }
.home.compact .actions { display: none; }
.ringbtn { display: flex; align-items: center; gap: 22px; margin-right: 20px; }
.ring { position: relative; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent-hi) calc(var(--p, 0) * 1turn), rgba(255, 255, 255, 0.14) 0); transition: transform 0.2s var(--ease); }
.ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--ground); }
.ring::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #d2a06c, var(--accent) 70%); }
.ring .ic { position: relative; z-index: 1; font-size: 34px; color: var(--on-accent); margin-left: 4px; }
.ringbtn.f .ring { transform: scale(1.06); box-shadow: 0 0 0 4px var(--ring), 0 0 60px rgba(224, 169, 109, 0.45); }
.ringbtn .label b { display: block; font-size: 28px; font-weight: 600; color: var(--head); }
.ringbtn .label small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 19px; color: var(--dim); text-transform: uppercase; }
.artview { position: absolute; left: 860px; top: 32px; width: 976px; height: 484px; }
.home.compact .artview { height: 368px; }
.artview .pic { position: absolute; inset: 0; overflow: hidden; background: var(--panel); }
.artview .pic img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.artview .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ground) 0, rgba(11, 11, 12, 0) 380px), linear-gradient(180deg, transparent 55%, rgba(11, 11, 12, 0.78)), rgba(224, 169, 109, 0.06); }
.corners { position: absolute; inset: -14px; pointer-events: none; opacity: 0.85; background: linear-gradient(var(--head), var(--head)) 0 0 / 40px 3px, linear-gradient(var(--head), var(--head)) 0 0 / 3px 40px, linear-gradient(var(--head), var(--head)) 100% 0 / 40px 3px, linear-gradient(var(--head), var(--head)) 100% 0 / 3px 40px, linear-gradient(var(--head), var(--head)) 0 100% / 40px 3px, linear-gradient(var(--head), var(--head)) 0 100% / 3px 40px, linear-gradient(var(--head), var(--head)) 100% 100% / 40px 3px, linear-gradient(var(--head), var(--head)) 100% 100% / 3px 40px; background-repeat: no-repeat; }
.stag { position: absolute; right: 14px; top: 14px; height: 40px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-radius: 8px; background: rgba(11, 11, 12, 0.72); border: 1px solid var(--line); font-family: var(--mono); font-size: 18px; color: var(--head); text-transform: uppercase; }
.stag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-hi); }
.scrubline { position: absolute; left: 260px; right: 14px; bottom: 26px; display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: 19px; color: var(--soft); }
.scrubline .tr { position: relative; flex: 1; height: 2px; background: var(--track); }
.scrubline .tr i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-hi); }
.scrubline .tr i::after { content: ""; position: absolute; right: -1px; top: -6px; width: 2px; height: 14px; background: #fff; }

.rows { position: relative; padding-left: 72px; }
.row { margin-bottom: 20px; }
.rowhead { position: relative; height: 44px; display: flex; align-items: center; gap: 16px; padding-left: 12px; margin-right: 84px; }
.rowhead .idx { font-family: var(--mono); font-size: 20px; color: var(--accent-hi); }
.rowhead .t { font-weight: 700; font-size: 30px; color: var(--head); white-space: nowrap; }
.rowhead .tag { font-family: var(--mono); font-size: 18px; color: var(--dim); text-transform: uppercase; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.rowhead .rule { flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), transparent); }
.rowhead .meta { font-family: var(--mono); font-size: 19px; color: var(--dim); text-transform: uppercase; }
.track { position: relative; display: flex; gap: 0; overflow-x: auto; overflow-y: visible; padding: 26px 0 26px 0; margin-top: -4px; scrollbar-width: none; scroll-behavior: smooth; }
.track::-webkit-scrollbar { display: none; }
.track::after { content: ""; flex: 0 0 1200px; }

.tile { position: relative; flex: none; padding: 12px; transition: transform 0.2s var(--ease); transform-origin: 50% 40%; }
.tile .art { position: relative; border-radius: 10px; overflow: hidden; background: var(--panel); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05); }
.tile .art img { width: 100%; height: 100%; object-fit: cover; }
.tile .art::after { content: ""; position: absolute; inset: 60% 0 0 0; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55)); pointer-events: none; }
.tile .art::before { content: ""; position: absolute; inset: 0; border-radius: 10px; box-shadow: inset 0 0 0 4px var(--ring); opacity: 0; transition: opacity 0.15s; z-index: 2; }
.tile.f { transform: scale(1.08); z-index: 3; }
.tile.f .art::before { opacity: 1; }
.tile.f .art { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 44px rgba(224, 169, 109, 0.22); }
.tile .name { margin-top: 12px; font-weight: 700; font-size: 24px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.f .name { color: var(--head); }
.tile .sub { margin-top: 6px; font-family: var(--mono); font-size: 18px; color: var(--dim); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.wide { width: 376px; } .tile.wide .art { width: 352px; height: 198px; }
.tile.poster { width: 216px; } .tile.poster .art { width: 192px; height: 288px; }
.tile.person { width: 240px; } .tile.person .art { width: 216px; height: 216px; border-radius: 50%; } .tile.person .art::before { border-radius: 50%; }
.tile.person .name, .tile.person .sub { text-align: center; white-space: normal; }
.tile.extra { width: 424px; } .tile.extra .art { width: 400px; height: 225px; }
.tile.rank { width: 324px; height: 452px; transform-origin: 50% 100%; }
.tile.rank .art { position: absolute; right: 12px; top: 56px; width: 192px; height: 288px; z-index: 1; }
.tile.rank .numeral { position: absolute; bottom: 96px; height: 224px; background: linear-gradient(180deg, var(--accent-hi), #7c5b37); -webkit-mask: var(--m) left bottom / contain no-repeat; mask: var(--m) left bottom / contain no-repeat; opacity: 0.5; transition: opacity 0.2s; }
.tile.rank.f { transform: scale(1.1); }
.tile.rank.f .numeral { opacity: 0.95; }
.tile.rank .rankline { position: absolute; left: 12px; right: -300px; top: 360px; display: none; white-space: nowrap; }
.tile.rank.f .rankline { display: block; }
.rankline .n { font-family: var(--mono); font-size: 20px; color: var(--accent-hi); margin-right: 14px; }
.rankline .t { font-weight: 700; font-size: 30px; color: var(--head); margin-right: 14px; }
.rankline .c { font-family: var(--mono); font-size: 19px; color: var(--dim); text-transform: uppercase; }
.prog { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--track); z-index: 1; }
.prog i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 8px; background: var(--accent-hi); }
.badge { position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border-radius: 8px; background: var(--accent-hi); color: var(--on-accent); display: grid; place-items: center; z-index: 1; }
.badge .ic { font-size: 20px; }
.empty { position: absolute; left: 84px; top: 220px; font-size: 30px; color: var(--soft); max-width: 1200px; line-height: 1.4; }

/* ---------- Search ---------- */
.searchbox { position: relative; margin: 30px 84px 10px; height: 84px; display: flex; align-items: center; gap: 20px; padding: 0 28px; border-radius: 16px; background: var(--panel); border: 2px solid rgba(255, 255, 255, 0.08); }
.searchbox .ic { font-size: 32px; color: var(--dim); }
.searchbox input { flex: 1; background: none; border: 0; color: var(--head); font: 400 36px var(--sans); caret-color: var(--accent-hi); }
.searchbox input::placeholder { color: var(--dim); }
.searchbox.f { border-color: var(--ring); }
.searchnote { margin: 10px 96px 20px; font-family: var(--mono); font-size: 19px; color: var(--dim); text-transform: uppercase; }

/* ---------- Details ---------- */
.details .backdrop { position: absolute; inset: 0; }
.details .backdrop img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.details .shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ground) 0, rgba(11, 11, 12, 0.92) 34%, rgba(11, 11, 12, 0.35) 75%, rgba(11, 11, 12, 0.6)), linear-gradient(180deg, rgba(5, 7, 13, 0.4), rgba(11, 11, 12, 0.2) 40%, var(--ground) 92%); }
.details .dimmer { position: absolute; inset: 0; background: var(--ground); opacity: 0; transition: opacity 0.25s var(--ease); pointer-events: none; }
.details .scroll { padding-bottom: 260px; }
.dhero { position: relative; padding: 100px 84px 0; min-height: 600px; transition: opacity 0.25s var(--ease); }
.details.low .dhero { opacity: 0.35; }
.back { font-weight: 700; font-size: 24px; color: var(--dim); }
.back:hover { color: var(--head); }
.dkicker { margin-top: 26px; font-family: var(--mono); font-size: 24px; color: var(--accent-hi); text-transform: uppercase; }
.dtitle { margin-top: 12px; width: 1300px; font-family: "Serif", Georgia, serif; font-size: 104px; line-height: 1.0; color: var(--head); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dmeta { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font-size: 28px; color: var(--soft); width: 1300px; }
.dmeta .dot { color: var(--dim); font-size: 24px; }
.dmeta .badge2 { height: 40px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 8px; border: 2px solid var(--line); font-weight: 700; font-size: 22px; color: var(--head); text-transform: uppercase; }
.dlang { margin-top: 10px; font-size: 20px; color: var(--dim); }
.dsummary { margin-top: 20px; width: 1120px; font-size: 27px; line-height: 35px; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.dsummary.short { -webkit-line-clamp: 3; }
.dbuttons { margin-top: 28px; display: flex; gap: 20px; align-items: flex-start; }
.dbuttons .btn { height: 72px; }
.dbuttons .resume { display: flex; flex-direction: column; gap: 8px; }
.resume .bar2 { margin: 0 12px; height: 4px; background: rgba(255, 255, 255, 0.25); position: relative; }
.resume .bar2 i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 8px; background: var(--accent-hi); }
.dposter { position: absolute; right: 84px; top: 100px; width: 300px; height: 450px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(224, 169, 109, 0.35), 0 30px 80px rgba(0, 0, 0, 0.6); }
.dposter img { width: 100%; height: 100%; object-fit: cover; }
.dbody { position: relative; margin-top: 48px; padding: 20px 0 0 84px; }
.dbody::before { content: ""; position: absolute; left: 84px; width: 1752px; top: 0; height: 2px; background: linear-gradient(90deg, var(--line), transparent); }
.seasonsplit { display: flex; gap: 48px; padding-top: 28px; }
.seasons { flex: none; display: flex; flex-direction: column; gap: 16px; min-width: 288px; max-height: 896px; overflow: hidden; }
.season { height: 56px; padding: 0 22px; display: flex; align-items: center; gap: 14px; border-radius: 12px; background: rgba(23, 23, 26, 0.7); border: 2px solid transparent; color: var(--dim); white-space: nowrap; }
.season b { font-size: 27px; font-weight: 700; }
.season small { font-size: 24px; }
.season.on { background: rgba(40, 40, 42, 0.95); border-color: var(--line); color: var(--head); }
.season.on small { color: var(--accent-hi); }
.season.f { background: linear-gradient(180deg, #c09466, var(--accent)); border-color: var(--ring); color: var(--on-accent); }
.season.f small { color: var(--on-accent); }
.season.playall { margin-top: 8px; height: 60px; color: var(--text); }
.season.playall .ic { font-size: 26px; }
.episodes { position: relative; flex: 1; margin-right: 100px; display: flex; flex-direction: column; gap: 12px; max-height: 896px; overflow-y: auto; scrollbar-width: none; scroll-behavior: smooth; padding: 4px; }
.episodes::-webkit-scrollbar { display: none; }
.episodes.loading { opacity: 0.5; }
.ep { position: relative; flex: none; height: 212px; display: flex; gap: 24px; padding: 16px; border-radius: 16px; border: 2px solid transparent; }
.ep.f { background: rgba(40, 40, 42, 0.92); border-color: rgba(224, 169, 109, 0.45); }
.ep .still { position: relative; flex: none; width: 320px; height: 180px; border-radius: 10px; overflow: hidden; background: var(--panel); }
.ep .still img { width: 100%; height: 100%; object-fit: cover; }
.ep.f .still::before { content: ""; position: absolute; inset: 0; border-radius: 10px; box-shadow: inset 0 0 0 4px var(--ring); z-index: 2; }
.ep .body { min-width: 0; flex: 1; }
.ep .nm { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 30px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep .nm .new { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 12px rgba(224, 169, 109, 0.6); }
.ep.f .nm { color: var(--head); }
.ep .facts { margin-top: 8px; font-family: var(--mono); font-size: 20px; color: var(--accent-hi); text-transform: uppercase; }
.ep .sum { margin-top: 10px; font-size: 24px; line-height: 30px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ep.f .sum { color: var(--soft); -webkit-line-clamp: 4; }
.more { padding-top: 80px; }
.more .row { margin-bottom: 24px; }

/* ---------- Player ---------- */
.player { background: #000; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; object-fit: contain; transition: all 0.3s var(--ease); }
.player.upnext video { left: 96px; top: 150px; width: 880px; height: 495px; inset: auto; border-radius: 12px; }
.hud { position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s var(--ease); pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 280px), linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 420px); }
.player.showhud .hud { opacity: 1; pointer-events: auto; }
.player.showhud { cursor: default; }
.player:not(.showhud) { cursor: none; }
.ptitle { position: absolute; left: 96px; top: 58px; width: 1200px; font-family: var(--cond); font-weight: 700; font-size: 64px; line-height: 1; color: var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.psub { position: absolute; left: 96px; top: 132px; font-family: var(--mono); font-size: 24px; color: var(--soft); }
.pclock { position: absolute; right: 96px; top: 58px; font-size: 44px; color: var(--head); font-variant-numeric: tabular-nums; }
.pends { position: absolute; right: 96px; top: 116px; font-family: var(--mono); font-size: 22px; color: var(--soft); }
.scrub { position: absolute; left: 96px; right: 96px; top: 833px; height: 24px; cursor: pointer; }
.scrub .tr { position: absolute; left: 0; right: 0; top: 6px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.scrub .fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
.scrub .seg { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, 0.35); }
.scrub .knob { position: absolute; top: -6px; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: radial-gradient(circle, #fff 0 34%, var(--accent) 36% 64%, rgba(255, 255, 255, 0.12) 66%); transition: transform 0.15s; }
.scrub.f .knob { transform: scale(1.3); box-shadow: 0 0 0 3px var(--ring); }
.scrub .pill { position: absolute; top: -70px; width: 140px; margin-left: -70px; height: 48px; border-radius: 24px; background: #fff; color: #000; display: none; place-items: center; font-family: var(--mono); font-size: 22px; }
.scrub.f .pill { display: grid; }
.ppos { position: absolute; left: 96px; top: 872px; font-family: var(--mono); font-size: 26px; color: #e8efff; }
.prem { position: absolute; right: 96px; top: 872px; font-family: var(--mono); font-size: 26px; color: #e8efff; }
.controls { position: absolute; left: 0; right: 0; top: 920px; height: 110px; }
.key { position: absolute; top: 0; width: 80px; height: 80px; margin-left: -40px; display: grid; place-items: center; border-radius: 22px; background: rgba(40, 40, 42, 0.7); border: 2px solid rgba(255, 255, 255, 0.1); color: #fff; transition: transform 0.15s var(--ease); }
.key .ic { font-size: 36px; }
.key.small { width: 64px; height: 64px; margin-left: -32px; top: 8px; border-radius: 18px; }
.key.small .ic { font-size: 32px; }
.key.big { width: 112px; margin-left: -56px; }
.key.big .ic { font-size: 40px; }
.key.f { background: linear-gradient(180deg, #c09466, var(--accent)); border-color: var(--ring); color: var(--on-accent); transform: scale(1.06); }
.key.off { opacity: 0.35; }
.key label { position: absolute; top: 88px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 20px; color: var(--soft); pointer-events: none; }
.key.small label { top: 76px; }
.chev { position: absolute; left: 945px; top: 1040px; width: 30px; height: 25px; color: var(--accent-hi); font-size: 28px; }
.skippill { position: absolute; right: 120px; top: 640px; height: 80px; padding: 0 36px 0 30px; display: none; align-items: center; gap: 18px; border-radius: 40px; background: linear-gradient(180deg, #c09466, var(--accent)); color: var(--on-accent); font-weight: 700; font-size: 30px; border: 3px solid transparent; }
.skippill.show { display: flex; }
.player.showhud .skippill { top: 700px; }
.skippill.f { border-color: var(--ring); transform: scale(1.04); }
.skippill .ic { font-size: 36px; }
.pmsg { position: absolute; left: 0; right: 0; top: 470px; text-align: center; font-size: 36px; color: var(--head); line-height: 1.5; text-shadow: 0 2px 12px #000; pointer-events: none; }
.pmsg small { display: block; font-size: 24px; color: var(--soft); }
.toast { position: absolute; left: 50%; top: 80px; transform: translateX(-50%); padding: 16px 30px; border-radius: 14px; background: rgba(23, 23, 26, 0.95); border: 1px solid var(--line); font-size: 26px; color: var(--head); opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 30; }
.toast.on { opacity: 1; }
.upnextcard { position: absolute; left: 1060px; top: 150px; width: 780px; display: none; }
.player.upnext .upnextcard { display: block; }
.player.upnext .hud { opacity: 0; pointer-events: none; }
.upnextcard .eb { font-weight: 700; font-size: 26px; color: var(--accent-hi); }
.upnextcard .nt { margin-top: 10px; font-family: var(--cond); font-weight: 700; font-size: 56px; line-height: 1; color: var(--head); text-transform: uppercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upnextcard .st { position: relative; margin-top: 24px; width: 760px; height: 428px; border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85); }
.upnextcard .st img { width: 100%; height: 100%; object-fit: cover; }
.upnextcard .count { position: absolute; right: 20px; bottom: 20px; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 48px; color: #fff; background: conic-gradient(var(--accent-hi) calc(var(--p, 1) * 1turn), rgba(0, 0, 0, 0.6) 0); }
.upnextcard .count::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); }
.upnextcard .count span { position: relative; }
.upnextcard .btns { margin-top: 28px; display: flex; gap: 20px; }
.picker { position: absolute; right: 96px; bottom: 210px; width: 620px; max-height: 560px; overflow-y: auto; padding: 18px; border-radius: 18px; background: rgba(17, 17, 19, 0.96); border: 1px solid var(--line); display: none; scrollbar-width: none; }
.picker.on { display: block; }
.picker h3 { margin: 6px 12px 14px; font-family: var(--mono); font-weight: 500; font-size: 20px; color: var(--accent-hi); text-transform: uppercase; letter-spacing: 2px; }
.picker .opt { display: flex; align-items: center; gap: 14px; width: 100%; height: 60px; padding: 0 18px; border-radius: 12px; font-size: 26px; color: var(--text); border: 2px solid transparent; }
.picker .opt .ic { font-size: 22px; opacity: 0; color: var(--accent-hi); }
.picker .opt.sel .ic { opacity: 1; }
.picker .opt.f { background: linear-gradient(180deg, #c09466, var(--accent)); color: var(--on-accent); border-color: var(--ring); }
.picker .opt.f .ic { color: var(--on-accent); }

/* ---------- Link ---------- */
.link { display: grid; place-items: center; text-align: center; background: radial-gradient(ellipse at 50% 30%, rgba(161, 122, 78, 0.12), transparent 60%), var(--ground); }
.link .box { width: 1100px; }
.link img.mk { width: 72px; height: 72px; margin: 0 auto; }
.link h1 { margin: 40px 0 0; font-family: var(--mono); font-weight: 500; font-size: 26px; letter-spacing: 8px; color: var(--accent-hi); text-transform: uppercase; }
.link .code { margin-top: 50px; font-family: var(--cond); font-weight: 700; font-size: 190px; letter-spacing: 34px; padding-left: 34px; color: var(--head); line-height: 1; font-variant-numeric: tabular-nums; }
.link .rule { margin: 44px auto 0; width: 600px; height: 4px; background: linear-gradient(90deg, transparent, var(--accent-hi), transparent); }
.link .where { margin-top: 44px; font-size: 32px; color: var(--text); }
.link .note { margin-top: 18px; font-family: var(--mono); font-size: 20px; color: var(--dim); text-transform: uppercase; min-height: 28px; }
.link .btn { margin-top: 50px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
.numeral.r1 { --m: url(icons/rank1.png); }
.numeral.r2 { --m: url(icons/rank2.png); }
.numeral.r3 { --m: url(icons/rank3.png); }
.numeral.r4 { --m: url(icons/rank4.png); }
.numeral.r5 { --m: url(icons/rank5.png); }
.numeral.r6 { --m: url(icons/rank6.png); }
.numeral.r7 { --m: url(icons/rank7.png); }
.numeral.r8 { --m: url(icons/rank8.png); }
.numeral.r9 { --m: url(icons/rank9.png); }
.numeral.r10 { --m: url(icons/rank10.png); }
