/* Hoshi browse UI. Cinema look: warm near-black, amber accent. Single dark theme. */
@font-face{font-family:"Big Shoulders Display";src:url(fonts/BigShouldersDisplay.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:Figtree;src:url(fonts/Figtree.woff2) format("woff2");font-weight:300 900;font-display:swap}
@font-face{font-family:"Tilt Neon";src:url(fonts/TiltNeon.woff2) format("woff2");font-display:block}
/* The player's subtitle fonts (app/fonts), so the settings previews match what mpv draws. */
@font-face{font-family:SubRoboto;src:url(../fonts/Roboto-500.ttf);font-display:swap}
@font-face{font-family:SubOpenSans;src:url(../fonts/OpenSans-600.ttf);font-display:swap}
@font-face{font-family:SubFira;src:url(../fonts/FiraSans-Medium.ttf);font-display:swap}
@font-face{font-family:SubSource;src:url(../fonts/SourceSans3-600.ttf);font-display:swap}

:root{
  --bg:#0e0c0b;--surface:#1a1614;--surface2:#241f1c;--fg:#f4ede7;--mute:#a19388;--line:#2e2724;
  --accent:#eaa53c;--accent-fg:#1a1208;--ready:#62c98d;--warn:#e48a5a;
  --display:"Big Shoulders Display",Impact,"Arial Narrow",sans-serif;
  --body:Figtree,"Segoe UI",system-ui,sans-serif;
  --mono:ui-monospace,Consolas,"Cascadia Mono",monospace;
  --neon:"Tilt Neon","Segoe UI",sans-serif;
  --glow:0 0 .03em #fff,0 0 .08em #ffbd5c,0 0 .2em #eaa53c,0 0 .45em #d9701c;
  --r:10px;--poster-r:8px;--pad:28px;--rail:56px;--rail-open:232px;
  color-scheme:dark;
}
*{box-sizing:border-box}
html{background:var(--bg);scrollbar-gutter:stable}
body{margin:0;background:var(--bg);color:var(--fg);font:14px/1.45 var(--body);min-height:100vh;padding-left:var(--rail)}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
main:focus{outline:none}
svg.i{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
::-webkit-scrollbar{width:10px;height:8px}
::-webkit-scrollbar-thumb{background:var(--line);border-radius:8px}
::-webkit-scrollbar-thumb:hover{background:#463c37}
::-webkit-scrollbar-track{background:transparent}

/* top bar */
/* three columns so the search sits in the middle of the bar: pages left, search centered, profile right */
.top{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:1fr minmax(0,420px) 1fr;align-items:center;gap:22px;padding:14px var(--pad);border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(10px)}
/* the Hoshi mark: "Hoshi" in neon tubing plus the outline star (#hoshi-star in index.html), raised beside the i */
.brand{font:400 24px/1 var(--neon);letter-spacing:.01em}
.brand .w,#splash .w{color:#fff3dc;text-shadow:var(--glow)}
.brand,#splash .w{display:flex;align-items:center}
.star{flex:none;width:.5em;height:.5em;margin:0 0 .5em .12em;overflow:visible;filter:drop-shadow(0 0 1px #ffcf85) drop-shadow(0 0 4px #eaa53c) drop-shadow(0 0 10px rgba(217,112,28,.8))}
.nav{display:flex;gap:18px;color:var(--mute);font-weight:500}
.nav button:hover{color:var(--fg)}
.nav .on{color:var(--fg)}
.search{width:100%;display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:8px 14px;color:var(--mute)}
.search:focus-within{border-color:var(--accent)}
.search input{flex:1;min-width:0;background:none;border:0;color:var(--fg);font:inherit;outline:none}
.search input::placeholder{color:var(--mute)}
.search input::-webkit-search-cancel-button{display:none}
/* Suggested titles under the search box while typing (app.js suggest); Enter or "All results" opens the full page. */
#sugg{position:absolute;top:calc(100% - 4px);z-index:30;display:grid;gap:2px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 40px rgba(0,0,0,.55)}
#sugg[hidden]{display:none}
.sg{display:flex;align-items:center;gap:12px;width:100%;padding:6px 8px;border-radius:10px;text-align:left;color:var(--fg)}
.sg:hover,.sg:focus{background:var(--surface2)}
.sg img,.sg .ph{width:34px;height:51px;border-radius:5px;object-fit:cover;flex:none;background:var(--surface2)}
.sg[data-act=ytplay] img{width:72px;height:41px}
.sg .tx{min-width:0;display:grid;gap:2px}
.sg b{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg small{color:var(--mute);font-size:12px}
.sg.all{justify-content:center;color:var(--accent);font-weight:600;font-size:13px;padding:10px}
.rd{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--mute);white-space:nowrap}
.dot{width:8px;height:8px;border-radius:50%;background:var(--mute)}
.dot.ok{background:var(--ready);box-shadow:0 0 0 3px color-mix(in srgb,var(--ready) 25%,transparent)}
.dot.bad{background:var(--warn);box-shadow:0 0 0 3px color-mix(in srgb,var(--warn) 25%,transparent)}
body.gated .nav,body.gated .search,body.gated .gear,body.gated .secs{visibility:hidden}

/* left rail: a thin icon strip (--rail) fixed beside the page; body's padding-left keeps the page clear of it.
   Hover (after a short pause, so sweeping past doesn't open it) or keyboard/controller focus slides it open to
   --rail-open OVER the page, so nothing on the page moves. A click's focus doesn't hold it open (kbnav only). */
.rail{position:fixed;left:0;top:0;bottom:0;width:var(--rail);z-index:22;display:flex;flex-direction:column;padding:18px 8px 16px;border-right:1px solid var(--line);background:#100d0c;overflow:hidden;
  transition:width .2s cubic-bezier(.2,.7,.2,1),box-shadow .2s;white-space:nowrap}
.rail:hover,html.kbnav .rail:focus-within{width:var(--rail-open);box-shadow:14px 0 40px rgba(0,0,0,.55);transition-delay:.12s}
.rail .brand{display:flex;align-items:center;height:34px;padding:0 0 0 7px;margin-bottom:22px;font-size:28px}
.rail .brand .star{width:26px;height:26px;margin:0;flex:none}  /* centered on the section icons below (22 px at x 17..39) */
.rail .brand .w{max-width:0;overflow:hidden;opacity:0;transition:max-width .2s,opacity .15s}
.rail:hover .brand .w,html.kbnav .rail:focus-within .brand .w{max-width:120px;opacity:1;margin-right:6px}
.secs{display:grid;gap:4px}
.rsec{display:flex;align-items:center;gap:14px;width:100%;height:44px;padding:0 0 0 9px;border-radius:10px;color:var(--mute);position:relative}
.rsec svg.i{width:22px;height:22px}
.rsec .nm,.rail-foot .nm{font:700 16px/1 var(--body);opacity:0;transition:opacity .15s}
.rail:hover :is(.nm,.soon),html.kbnav .rail:focus-within :is(.nm,.soon){opacity:1}
button.rsec:hover{background:var(--surface);color:var(--fg)}
.rsec.on,button.rsec.on:hover{color:var(--fg)}
.rsec.on svg.i{color:var(--accent)}
.rsec.on::before{content:"";position:absolute;left:-8px;top:11px;bottom:11px;width:3px;border-radius:0 3px 3px 0;background:var(--accent)}
.rsec.dim{opacity:.5;cursor:default}
.soon{margin-left:auto;margin-right:8px;font:700 9.5px/1 var(--body);letter-spacing:.08em;text-transform:uppercase;border:1px solid var(--line);border-radius:4px;padding:3px 5px;opacity:0;transition:opacity .15s}
.rail-foot{margin-top:auto;display:grid;gap:4px}
.gear{display:flex;align-items:center;gap:14px;height:40px;padding-left:10px;border-radius:10px;color:var(--mute)}
.gear svg.i{width:20px;height:20px}
.rail-foot .gear .nm{font:600 14px/1 var(--body)}
.gear:hover{color:var(--fg);background:var(--surface)}
.gear.on{color:var(--accent)}
.rail .rd{height:32px;padding-left:16px;gap:16px;white-space:nowrap}
.rail .rd .nm{font:500 12.5px/1 var(--body)}
/* the top bar shows only the active section's sub-tabs (body[data-sec], set by app.js) */
body:not([data-sec=tv]) .nav [data-sec=tv],body:not([data-sec=anime]) .nav [data-sec=anime],body:not([data-sec=comics]) .nav [data-sec=comics],body:not([data-sec=live]) .nav [data-sec=live],body:not([data-sec=youtube]) .nav [data-sec=youtube]{display:none}

/* page body */
main{padding:22px var(--pad) 60px;display:grid;gap:30px;align-content:start;min-width:0;position:relative;z-index:1}
.row{display:grid;gap:12px;min-width:0}
.row>*{min-width:0}
h2.h{margin:0;font:600 20px/1.2 var(--body);letter-spacing:-.005em;display:flex;align-items:baseline;gap:10px}
h2.h small{font:500 12px var(--body);color:var(--mute);text-transform:none;letter-spacing:0}
.hint{color:var(--mute);margin:0}

/* horizontal strips: no scrollbar; edge fades + round arrows on hover where there is more (stripEdges sets .ml/.mr and --ay) */
.strip-wrap{position:relative;min-width:0}
.strip{display:grid;grid-auto-flow:column;grid-auto-columns:150px;gap:14px;overflow-x:auto;padding:2px 2px 8px;scroll-behavior:smooth;overscroll-behavior-x:contain;scrollbar-width:none}
.strip::-webkit-scrollbar{display:none}
.strip.wide{grid-auto-columns:260px}
/* the fade is a mask on the strip itself (nav.css bleeds it past the wrap), so the real page and glow show through */
@property --fl{syntax:"<length>";inherits:false;initial-value:0px}
@property --fr{syntax:"<length>";inherits:false;initial-value:0px}
.strip{-webkit-mask-image:linear-gradient(90deg,transparent,#000 var(--fl),#000 calc(100% - var(--fr)),transparent);transition:--fl .2s,--fr .2s}
.ml>.strip{--fl:56px}.mr>.strip{--fr:56px}
.arrow{position:absolute;top:calc(var(--ay,50%) - 22px);width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(20,17,15,.82);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(8px);color:var(--fg);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s,border-color .2s;z-index:3}
.arrow .i{width:20px;height:20px}
.arrow.l{left:8px}.arrow.r{right:8px}
.strip-wrap:is(:hover,:focus-within) .arrow:not([disabled]){opacity:1;pointer-events:auto}
.arrow:hover{border-color:var(--accent);transform:scale(1.08)}

/* grids */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:22px 14px}
.grid.wide{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.chips{display:flex;gap:6px;flex-wrap:wrap}

/* posters and thumbs: gradient + title underneath, real image on top when it loads */
.card{display:grid;gap:7px;min-width:0;align-content:start}
.poster,.thumb{position:relative;overflow:hidden;border-radius:var(--poster-r);display:flex;align-items:flex-end;padding:10px;color:#fff;background:var(--surface2)}
.poster{aspect-ratio:2/3}
.thumb{aspect-ratio:16/9}
.poster img,.thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.poster::after,.thumb::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,.6));pointer-events:none}
.poster span,.thumb span{position:relative;z-index:1;font:800 17px/1 var(--display);text-transform:uppercase;text-wrap:balance;letter-spacing:.01em;text-shadow:0 1px 8px rgba(0,0,0,.5)}
.poster img+span,.thumb img+span{display:none}  /* the name is printed on the art only when there's no picture */
.thumb span{font-size:16px;font-weight:700;line-height:1.05}
.card .poster,.card .thumb{transition:transform .18s,box-shadow .18s}
.card:hover .poster,.card:hover .thumb,.card:focus-visible .poster,.card:focus-visible .thumb{transform:translateY(-3px);box-shadow:0 0 0 2px var(--accent),0 10px 24px rgba(0,0,0,.45)}
.card:focus-visible{outline:none}
.card.dim .poster{opacity:.4}  /* watchlist: not out yet / no sources (posterCard keep) */
.card .name{font-weight:600;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta{font-size:12px;color:var(--mute);display:flex;gap:6px;flex-wrap:wrap}
.prog{height:3px;border-radius:3px;background:var(--line);overflow:hidden}
.prog i{display:block;height:100%;background:var(--accent)}
.thumb .prog{position:absolute;left:0;right:0;bottom:0;z-index:2;border-radius:0;background:rgba(255,255,255,.25)}

/* YouTube (app.js ytCard / ytHero / channel page): 16:9 cards, duration bottom right, watched ones dimmed */
.card.yt .name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3}
.card.yt .thumb>b{position:absolute;z-index:2;font:600 11.5px/1 var(--body);padding:4px 6px;border-radius:5px;background:rgba(10,8,7,.85);color:#fff;font-variant-numeric:tabular-nums}
.card.yt .du{right:6px;bottom:7px}
.card.yt .wt{left:6px;top:6px}
.card.yt.seen .thumb img{opacity:.45}
.card.yt.seen .name{color:var(--mute)}
.yav{position:relative;display:grid;place-items:center;width:104px;height:104px;border-radius:50%;overflow:hidden;flex:none;color:#fff}
.yav img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.yav b{font:800 40px/1 var(--display);text-transform:uppercase}
.yav img+b{display:none}
.yav.sm{width:24px;height:24px}
.yav.sm b{font-size:12px}
.yav.lg{width:120px;height:120px}
.card.ych{justify-items:center;text-align:center}
.card.ych .name{max-width:100%}
.card.ych .yav{transition:transform .18s,box-shadow .18s}
.card.ych:hover .yav,.card.ych:focus-visible .yav{transform:translateY(-3px);box-shadow:0 0 0 2px var(--accent),0 10px 24px rgba(0,0,0,.45)}
.ychans .strip{grid-auto-columns:120px}
.hero.yth>h1{font-size:clamp(34px,4.2vw,58px);max-width:820px}
.yth .facts>.yav{margin-right:8px}
.yth .facts>.yav+span::before{display:none}
.ynote{max-width:64ch}
.ychead{display:flex;gap:26px;align-items:center;margin:8px 0 26px}
.ychead>div{display:grid;gap:14px;justify-items:start}
.ychead h1{margin:0;font:800 clamp(34px,4vw,54px)/.95 var(--display);text-transform:uppercase}

/* hero */
.hero{min-height:min(72vh,640px);display:grid;align-content:end;gap:14px;position:relative;overflow:hidden;color:#fff;background:var(--bg);
  margin:calc(-22px - var(--toph,68px)) calc(-1 * var(--pad)) 0;padding:calc(var(--toph,68px) + 40px) calc(var(--pad) + 14px) 92px}
.hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 22%}
/* the picture itself fades out (a mask, not a paint-over), so it melts into the ambient glow with no seam */
/* eased over 72% of the hero: a straight ramp to 40% showed where it stopped on bright pictures */
.hero>img,.hero>.trl,.hero::after,.sk.hero{--fade:linear-gradient(0deg,transparent 0,rgba(0,0,0,.03) 8%,rgba(0,0,0,.12) 18%,rgba(0,0,0,.3) 30%,rgba(0,0,0,.55) 44%,rgba(0,0,0,.8) 58%,#000 72%);
  -webkit-mask-image:var(--fade);mask-image:var(--fade)}
.hero:has(>img){background:none!important}
.hero::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(14,12,11,.9) 0,rgba(14,12,11,.5) 36%,transparent 66%),
  linear-gradient(180deg,rgba(14,12,11,.65),transparent calc(var(--toph,68px) + 50px))}
.hero>:not(img){position:relative;z-index:1;max-width:560px}
.hero h1{margin:0;font:800 clamp(44px,6vw,76px)/.92 var(--display);text-transform:uppercase;text-wrap:balance}
.hero p{margin:0;color:rgba(255,255,255,.84);max-width:56ch;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* the first row tucks up into the hero's fade */
.hero+.row{margin-top:-64px;position:relative;z-index:2}
/* while the hero is at the top, the top bar is see-through (body.hero-top, app.js heroTop) */
.top{transition:background-color .25s,border-color .25s}
body.hero-top .top{background:transparent;border-bottom-color:transparent;backdrop-filter:none}
/* plain facts line: "Series · 2022 · Drama, Mystery · IMDb 8.6" */
.facts{display:flex;flex-wrap:wrap;align-items:center;gap:4px 0;font-size:14px;color:rgba(255,255,255,.82)}
.facts>span+span::before{content:"";display:inline-block;width:3px;height:3px;border-radius:50%;background:currentColor;opacity:.6;margin:0 9px;vertical-align:middle}
.facts .score{color:#fff;font-weight:600}
.facts .air{color:var(--accent);font-weight:600}

/* buttons and chips */
.btns{display:flex;gap:10px;flex-wrap:wrap}
.btn{font:600 14px var(--body);border-radius:8px;padding:10px 18px;border:1px solid transparent;display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.btn.pri{background:var(--accent);color:var(--accent-fg)}
.btn.pri:hover{background:#f2b453}
.btn.sec{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.22);backdrop-filter:blur(8px)}
.btn.sec:hover{background:rgba(255,255,255,.22)}
.btn.ghost{background:var(--surface);color:var(--fg);border-color:var(--line)}
.btn.ghost:hover{background:var(--surface2)}
.btn.sm{padding:6px 12px;font-size:13px}
.hero .btn{padding:12px 22px;font-size:15px}
.hero .btn.sec{border-color:transparent}
.btn.round{width:46px;height:46px;padding:0;border-radius:50%;justify-content:center;background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.4)}
.btn.round:hover{border-color:#fff;background:rgba(255,255,255,.08)}
.btn[disabled]{opacity:.5;pointer-events:none}
.chip{font:600 11px var(--body);letter-spacing:.04em;padding:3px 8px;border-radius:999px;background:var(--surface2);color:var(--fg);white-space:nowrap}
.chip.ready{background:color-mix(in srgb,var(--ready) 18%,transparent);color:var(--ready)}
.chip.acc{background:color-mix(in srgb,var(--accent) 20%,transparent);color:var(--accent)}
.chip.warn{background:color-mix(in srgb,var(--warn) 16%,transparent);color:var(--warn)}
.hero .chip{background:rgba(255,255,255,.16);color:#fff}
button.chip{padding:6px 12px;font-size:12px}
button.chip:hover{background:#2f2925}
button.chip.on{background:var(--fg);color:var(--bg)}
.tags{display:flex;gap:5px;flex-wrap:wrap;align-items:center}

/* detail page */
.backdrop{position:absolute;inset:0 0 auto;height:520px;overflow:hidden;z-index:0;pointer-events:none}
.backdrop img{width:100%;height:100%;object-fit:cover;object-position:center 20%;opacity:.22;-webkit-mask-image:linear-gradient(180deg,#000 30%,transparent);mask-image:linear-gradient(180deg,#000 30%,transparent)}
main>:not(.backdrop){position:relative;z-index:1}
.back{justify-self:start;display:inline-flex;align-items:center;gap:6px;color:var(--mute);font-weight:500;margin-bottom:-14px}
.back:hover{color:var(--fg)}
.detail{display:grid;grid-template-columns:240px minmax(0,1fr);gap:32px;align-items:start}
.detail>.poster{box-shadow:0 14px 40px rgba(0,0,0,.5)}
.dhead h1{margin:8px 0 6px;font:800 clamp(40px,5vw,64px)/.95 var(--display);text-transform:uppercase;text-wrap:balance}
.dhead p.desc{margin:10px 0 8px;color:var(--mute);max-width:68ch;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical}  /* long blurbs (comics) stop above the buttons */
.credits{margin:0 0 18px;color:var(--mute);font-size:13px;max-width:68ch}
.credits b{color:var(--fg);font-weight:600}
.tabs{display:flex;gap:4px 26px;margin:28px 0 4px;flex-wrap:wrap;border-bottom:1px solid var(--line)}
.stab{padding:10px 0 12px;color:var(--mute);font-weight:600;font-size:14.5px;position:relative}
.stab:hover{color:var(--fg)}
.stab.on{color:var(--fg)}
.stab.on::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--accent)}
.eps{display:grid}
.ep{display:grid;grid-template-columns:30px 200px minmax(0,1fr) auto;gap:18px;align-items:center;padding:14px 12px;margin:0 -12px;border-radius:10px;border-bottom:1px solid var(--line);cursor:pointer}
.ep:last-child{border-bottom-color:transparent}
.ep:hover,.ep:focus-visible{background:var(--surface)}
.ep .n{font:600 20px/1 var(--body);color:var(--mute);text-align:center;font-variant-numeric:tabular-nums}
.ep.cur .n{color:var(--accent)}
.ep.soon{cursor:default;opacity:.6}
.ep .thumb{padding:0}
.ep .thumb::before{content:"";position:absolute;inset:0;z-index:2;opacity:0;transition:opacity .15s;background:rgba(0,0,0,.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M7 4.5v15l12.5-7.5z'/%3E%3C/svg%3E") center/32px no-repeat}
.ep:not(.soon):is(:hover,:focus-visible) .thumb::before{opacity:1}
.ep h3{margin:0 0 4px;font:500 13px var(--body);color:var(--mute);display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px}
.ep h3 b{font:600 15.5px var(--body);color:var(--fg)}
.ep h3 .acc{color:var(--accent);font-weight:600}
.ep h3 .done{color:var(--ready);font-weight:600;display:inline-flex;align-items:center;gap:3px}
.ep h3 .done .i{width:13px;height:13px;stroke-width:2.6}
.ep>.ico{opacity:0;transition:opacity .15s}
.ep:is(:hover,:focus-within)>.ico{opacity:1}
.ep p{margin:0;color:var(--mute);font-size:13.5px;max-width:70ch;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ico{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:var(--mute);border:1px solid var(--line);background:var(--bg)}
.ico:hover{color:var(--fg);border-color:var(--mute)}

/* sources drawer */
.scrim{position:fixed;inset:0;z-index:40;background:rgba(6,5,4,.62);opacity:0;visibility:hidden;transition:opacity .22s,visibility .22s}
.drawer{position:fixed;top:0;right:0;bottom:0;z-index:41;width:min(540px,92vw);background:var(--surface);border-left:1px solid var(--line);padding:22px;display:grid;align-content:start;gap:14px;overflow-y:auto;transform:translateX(100%);visibility:hidden;transition:transform .25s ease,visibility .25s;box-shadow:-20px 0 50px rgba(0,0,0,.4)}
body.drawer-open .scrim{opacity:1;visibility:visible}
body.drawer-open .drawer{transform:none;visibility:visible}
body.drawer-open{overflow:hidden}
.dtop{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.drawer h2{margin:0;font:700 26px/1 var(--display);text-transform:uppercase}
.drawer .sub{color:var(--mute);font-size:13px;margin-top:-6px}
.src{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:6px 12px;align-items:center;padding:12px 14px;border-radius:var(--r);border:1px solid var(--line);background:var(--bg);width:100%}
button.src:hover{border-color:var(--mute)}
.src.best{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--bg))}
.q{font:800 19px/1 var(--display);min-width:56px;text-transform:uppercase}
.fname{grid-column:2/4;font:12px var(--mono);color:var(--mute);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.right{text-align:right;font-size:12px;color:var(--mute);font-variant-numeric:tabular-nums;white-space:nowrap}
.right b{display:block;color:var(--fg);font-size:14px}
.toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 2px 4px;border-top:1px solid var(--line);color:var(--mute);font-size:13px;width:100%}
.toggle:hover{color:var(--fg)}
.sw{width:34px;height:20px;border-radius:999px;background:var(--line);position:relative;flex:none;transition:background .15s}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--mute);transition:transform .15s,background .15s}
.toggle[aria-checked="true"] .sw{background:var(--accent)}
.toggle[aria-checked="true"] .sw::after{transform:translateX(14px);background:var(--accent-fg)}
.src.wait{border-style:dashed;opacity:.88}
.src.wait:hover{opacity:1}
.src .bar{grid-column:2/4;height:4px;border-radius:4px;background:var(--line);overflow:hidden}
.src .bar i{display:block;height:100%;background:var(--warn);transition:width .4s}
.src .go{grid-column:2/4;justify-self:start}

/* gate (no key / bad key) */
.gate{justify-self:center;margin-top:6vh;width:min(560px,100%);background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:30px;display:grid;gap:16px}
.gate h1{margin:0;font:800 40px/.95 var(--display);text-transform:uppercase}
.gate .bad{color:var(--warn);font-weight:600;margin:0}
.gate ol{margin:0;padding-left:20px;display:grid;gap:6px;color:var(--mute)}
.gate ol b{color:var(--fg)}
.gate-key{display:flex;gap:10px}
.gate-key input{flex:1;min-width:0;background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:10px 16px;color:var(--fg);font:inherit}
.gate-key input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.gate .hint code{word-break:break-all}
.gate code{font:13px var(--mono);color:var(--fg)}
.path{display:flex;gap:8px;align-items:center;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:8px 8px 8px 12px}
.path code{flex:1;min-width:0;overflow-x:auto;white-space:nowrap;user-select:all;scrollbar-width:thin}

/* profiles: each person is a little buddy (app.js buddy()); a two-person profile puts two side by side.
   They blink on their own and squish when pointed at. `.av i` is only the dashed "+" of Add profile. */
/* Who's watching is full screen: no rail or top bar, just the star and a clock (#pk, app.js) */
body.picking{padding-left:0}
body.picking .rail,body.picking .top{display:none}
body.picking .picker{min-height:calc(100vh - 82px)}
#pk{display:none;position:fixed;left:0;right:0;top:0;height:0;z-index:30}
body.picking #pk{display:block}
#pk .star{position:absolute;left:40px;top:28px;width:28px;height:28px;margin:0}
#pk .clk{position:absolute;right:44px;top:28px;font:500 18px var(--body);color:#bdb3a9;font-variant-numeric:tabular-nums}
.av{--s:120px;position:relative;display:block;width:var(--s);height:var(--s);flex:none}
.av i{position:absolute;inset:0;border-radius:50%;display:grid;place-items:center;font-style:normal}
.av .bud{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.av.duo .bud{inset:auto;left:0;top:4%;width:64%;height:64%}
.av.duo .bud+.bud{left:auto;top:auto;right:0;bottom:0;width:70%;height:70%}
.av.md{--s:72px}
.av.mini{--s:28px}
.av.mini.duo{width:auto;display:flex}
.av.mini.duo .bud,.av.mini.duo .bud+.bud{position:static;width:var(--s);height:var(--s)}
.av.mini.duo .bud+.bud{margin-left:-8px}
.bud .eyes{transform-box:fill-box;transform-origin:center;animation:blink 4.4s infinite}
@keyframes blink{0%,93%,100%{transform:scaleY(1)}96%{transform:scaleY(.1)}}
.bud .body{transform-box:fill-box;transform-origin:50% 100%}
.bud .pupil{transition:transform .2s}
.who:hover .bud .body,html.kbnav .who:focus .bud .body,.prow .av .bud .body{animation:squish .8s cubic-bezier(.3,.7,.3,1)}
.who:hover .pupil,html.kbnav .who:focus .pupil{transform:translateY(-2px)}
@keyframes squish{25%{transform:scale(1.1,.86)}55%{transform:scale(.94,1.08) translateY(-8%)}80%{transform:scale(1.03,.97)}}

/* "Who's watching?" picker */
.picker{min-height:calc(100vh - 170px);display:grid;place-content:center;justify-items:center;gap:36px;text-align:center}
.picker h1{margin:0;font:800 clamp(40px,5vw,60px)/1 var(--display);text-transform:uppercase;letter-spacing:.02em}
.people{display:flex;gap:30px;justify-content:center;flex-wrap:wrap}
.who{display:grid;gap:12px;justify-items:center;width:140px}
.who .nm{font-weight:600;color:var(--mute);transition:color .15s;text-align:center;text-wrap:balance}
.who:hover .nm,.who:focus-visible .nm{color:var(--fg)}
.who:focus-visible{outline:2px solid var(--accent);outline-offset:6px;border-radius:12px}
.who .av{transition:transform .15s}
.who:hover .av,.who:focus-visible .av{transform:translateY(-3px)}
.who.add .av i{inset:8%;background:var(--surface2);color:var(--mute);font:700 52px/1 var(--display);border:2px dashed var(--line);transition:border-color .15s,color .15s}
.who.add:hover .av i,.who.add:focus-visible .av i{border-color:var(--fg);color:var(--fg)}
.outline{font:600 13px var(--body);color:var(--mute);border:1px solid var(--line);border-radius:999px;padding:7px 16px}
.outline:hover{color:var(--fg);border-color:var(--mute)}

/* top-bar profile chip + menu */
.me{position:relative;justify-self:end}
.pchip{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:4px 12px 4px 4px;font-weight:600;white-space:nowrap}
.pchip:hover{background:var(--surface2)}
.me:not(.open) .menu{display:none}
.menu{position:absolute;right:0;top:calc(100% + 8px);width:230px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:6px;display:grid;gap:2px;box-shadow:0 18px 40px rgba(0,0,0,.5)}
.menu button,.cmenu button{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:var(--mute);font-weight:500;min-width:0}
.menu button span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.menu button:hover,.menu .cur,.cmenu button:hover,.cmenu button:focus{background:var(--surface2);color:var(--fg)}
.menu hr{border:0;border-top:1px solid var(--line);margin:4px 0}

/* manage profiles */
.mng{justify-self:center;width:min(720px,100%);display:grid;gap:14px}
.mng-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:4px}
.mng-head h1{margin:0;font:800 40px/.95 var(--display);text-transform:uppercase}
.prow{display:grid;grid-template-columns:auto minmax(0,1fr);gap:20px;align-items:start;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px}
.bodies{display:flex;gap:6px}
.pbody{width:38px;height:38px;padding:4px;border-radius:10px;background:var(--bg);border:1px solid var(--line)}
.pbody:hover{border-color:var(--mute)}
.pbody.on{border-color:var(--fg);box-shadow:0 0 0 1px var(--fg)}
.pbody .bud{display:block;width:100%;height:100%;overflow:visible}
.pbody .bud .eyes{animation:none}
.pfields{display:grid;gap:12px;justify-items:start}
.pin{background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:9px 12px;color:var(--fg);font:600 15px var(--body);outline:none}
.pin:focus{border-color:var(--accent)}
.pname{width:min(340px,100%)}
.pline{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.plabel{font-size:12px;color:var(--mute);width:58px}
.swatches{display:flex;gap:8px;flex-wrap:wrap}
.swatch{width:24px;height:24px;border-radius:50%}
.swatch:hover{transform:scale(1.1)}
.swatch.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--fg)}
.prow .toggle{border-top:0;padding:2px 0;width:auto;justify-content:flex-start}
.perr{color:var(--warn);font-weight:600;margin:0}
.pbtns{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pask{font-weight:500;margin-right:6px}
.btn.danger{background:color-mix(in srgb,var(--warn) 18%,transparent);color:var(--warn);border-color:color-mix(in srgb,var(--warn) 45%,transparent)}
.btn.danger:hover{background:color-mix(in srgb,var(--warn) 28%,transparent)}
.padd{display:flex;align-items:center;gap:12px;padding:14px 18px;border:2px dashed var(--line);border-radius:14px;color:var(--mute);font-weight:600}
.padd .av i{background:var(--surface2);color:var(--mute);font:700 20px/1 var(--display)}
.padd:hover{color:var(--fg);border-color:var(--mute)}

/* right-click menu */
.cmenu{position:fixed;z-index:50;min-width:230px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:6px;display:grid;gap:2px;box-shadow:0 18px 40px rgba(0,0,0,.55);animation:pop .12s ease}
@keyframes pop{from{opacity:0;transform:scale(.97)}}

/* settings */
.set{justify-self:center;width:min(760px,100%);display:grid;gap:16px}
.set>h1{margin:0 0 2px;font:800 40px/.95 var(--display);text-transform:uppercase}
.scard{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px 20px;display:grid;gap:12px}
.sk.scard{height:180px}
.shead{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:22px}
.shead h2{margin:0;font:700 22px/1 var(--display);text-transform:uppercase;letter-spacing:.02em}
.stat{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:600;color:var(--ready)}
.stat svg.i{width:14px;height:14px}
.scard .perr:empty{display:none}
.scard .toggle{color:var(--fg);font-size:14px;padding:12px 0 0}
.scard .toggle:first-of-type{border-top:0;padding-top:0}
.srow{display:flex;justify-content:space-between;align-items:center;gap:10px 16px;flex-wrap:wrap;padding-top:12px;border-top:1px solid var(--line)}
.srow.off label{color:var(--mute)}
.field{display:grid;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.field .pin{width:100%;font:500 13px var(--mono)}
select.pin{font:500 14px var(--body);padding:7px 10px;cursor:pointer}
.seg{display:inline-flex;flex-wrap:wrap;background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:3px;gap:2px}
.seg button{padding:6px 14px;border-radius:999px;font-weight:600;font-size:13px;color:var(--mute)}
.seg button:hover{color:var(--fg)}
.seg button.on{background:var(--fg);color:var(--bg)}
.range{display:flex;align-items:center;gap:12px}
.range input{width:200px;accent-color:var(--accent);cursor:pointer}
.range input:disabled{opacity:.4;cursor:default}
.range output{min-width:76px;color:var(--mute);font-variant-numeric:tabular-nums}
.sline{margin:0;display:flex;align-items:center;gap:10px;font-weight:600}
.keyrow{display:flex;gap:8px;flex-wrap:wrap}
.keyrow .pin{flex:1;min-width:220px;font:500 14px var(--mono)}
.kmsg{margin:0;font-weight:600}
.kmsg.ok{color:var(--ready)}.kmsg.bad{color:var(--warn)}
.scard b{color:var(--fg);font-weight:600}

/* subtitle style tiles: a sample line drawn the way each player preset draws it */
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stile{display:grid;gap:7px;font-size:12px;font-weight:600;color:var(--mute);text-align:center}
.stile .scene{position:relative;display:block;aspect-ratio:16/9;border-radius:8px;overflow:hidden;border:2px solid var(--line);
  background:radial-gradient(circle at 74% 30%,rgba(255,196,120,.55),transparent 34%),linear-gradient(180deg,#26324a 0,#58606a 52%,#b5a184 78%,#d9c7a6)}
.stile:hover{color:var(--fg)}
.stile:hover .scene{border-color:var(--mute)}
.stile.on{color:var(--fg)}
.stile.on .scene{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.stile:focus-visible{outline:none}
.stile:focus-visible .scene{outline:2px solid var(--accent);outline-offset:3px}
.stile .line{position:absolute;left:5%;right:5%;bottom:8%;text-align:center;color:#fff;font-size:calc(13px*var(--ss,1));line-height:1.25;
  --o:calc(1px*var(--ss,1));--oc:#000;transition:font-size .15s}
.sub-clean .line{font-family:SubRoboto,Roboto,sans-serif;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.sub-cr .line{font-family:"Trebuchet MS",sans-serif;font-weight:700;--o:calc(1.3px*var(--ss,1))}
.sub-fansub .line{font-family:SubOpenSans,"Open Sans",sans-serif;--oc:#0f1c2e;--o:calc(1.15px*var(--ss,1))}
.sub-warm .line{font-family:SubFira,"Fira Sans",sans-serif;color:#fffaf2;--oc:#2a1a12;--o:calc(1.1px*var(--ss,1))}
.sub-dvd .line{font-family:Arial,sans-serif;font-weight:700;color:#ffe14d;--o:calc(1.1px*var(--ss,1))}
.sub-box .line{font-family:SubSource,"Source Sans 3",sans-serif}
.sub-box .line span{background:rgba(0,0,0,.72);padding:1px 5px;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.sub-cr .line,.sub-fansub .line,.sub-warm .line,.sub-dvd .line{text-shadow:var(--o) 0 var(--oc),calc(-1*var(--o)) 0 var(--oc),0 var(--o) var(--oc),0 calc(-1*var(--o)) var(--oc),
  calc(.7*var(--o)) calc(.7*var(--o)) var(--oc),calc(-.7*var(--o)) calc(.7*var(--o)) var(--oc),calc(.7*var(--o)) calc(-.7*var(--o)) var(--oc),calc(-.7*var(--o)) calc(-.7*var(--o)) var(--oc)}
@media (max-width:720px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* error + empty */
.err{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 16px;border:1px solid color-mix(in srgb,var(--warn) 40%,var(--line));border-radius:var(--r);background:color-mix(in srgb,var(--warn) 7%,var(--surface))}
.err p{margin:0;flex:1;min-width:220px}
.err small{display:block;color:var(--mute);font-size:12px;margin-top:2px;font-family:var(--mono)}

/* skeletons */
.sk{background:var(--surface);border-radius:var(--poster-r);position:relative;overflow:hidden}
.sk::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.045),transparent);animation:shimmer 1.4s infinite}
@keyframes shimmer{to{transform:translateX(100%)}}
.sk.poster{aspect-ratio:2/3}.sk.thumb{aspect-ratio:16/9}
.sk.line{height:12px;width:70%;border-radius:6px}
.sk.title{height:26px;width:220px;border-radius:6px}
.sk.hero{border-radius:0}  /* keeps .hero's size, so nothing jumps when it loads */
.sk.src{height:74px;border:0}

/* toasts */
.toasts{position:fixed;left:calc(50% + var(--rail)/2);bottom:26px;transform:translateX(-50%);z-index:60;display:grid;gap:8px;justify-items:center;pointer-events:none}
.toast{pointer-events:auto;display:flex;gap:14px;align-items:center;background:rgba(26,22,20,.96);border:1px solid var(--line);box-shadow:0 12px 30px rgba(0,0,0,.5);padding:10px 12px 10px 16px;border-radius:var(--r);font-size:13.5px;max-width:560px;animation:rise .2s ease}
.toast .x{color:var(--mute);padding:4px}
.toast .x:hover{color:var(--fg)}
@keyframes rise{from{opacity:0;transform:translateY(8px)}}

/* page transitions: each new screen fades in with a small lift */
main.enter{animation:pageIn .32s cubic-bezier(.2,.7,.2,1)}
@keyframes pageIn{from{opacity:0;transform:translateY(10px)}}

/* title logos (hero + detail); a failed image falls back to the h1's text */
.logo{display:block;width:auto;height:auto;max-width:min(480px,100%);max-height:150px;object-fit:contain;object-position:left bottom;filter:drop-shadow(0 2px 10px rgba(0,0,0,.6))}
.dhead h1 .logo{max-height:130px;margin:14px 0 8px}
/* dark logos (measured in app.js): one-colour ones turn white, colourful ones get a light halo */
.logo.logo-darkmono{filter:brightness(0) invert(1) drop-shadow(0 2px 10px rgba(0,0,0,.6))}
.logo.logo-dark{filter:drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 0 14px rgba(255,255,255,.4))}
.logo.logo-unknown{filter:drop-shadow(0 0 1px rgba(255,255,255,.55)) drop-shadow(0 0 10px rgba(255,255,255,.2)) drop-shadow(0 2px 10px rgba(0,0,0,.5))}

/* hover preview card */
.pv{position:fixed;z-index:30;width:300px;border-radius:12px;overflow:hidden;background:var(--surface);border:1px solid var(--line);box-shadow:0 22px 50px rgba(0,0,0,.6);cursor:pointer;
  opacity:0;transform:scale(.7);transition:opacity .22s,transform .22s cubic-bezier(.2,.7,.2,1)}
.pv.show{opacity:1;transform:none}
.pv-bd{position:relative;aspect-ratio:16/9;background:var(--surface2)}
.pv-bd img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.pv-in{padding:12px 14px 14px;display:grid;gap:8px}
.pv-in b{font:800 20px/1 var(--display);text-transform:uppercase;letter-spacing:.01em;text-wrap:balance}
.pv-m{font-size:12px;color:var(--mute);min-height:1.45em}
.pv-m em{font-style:normal;color:var(--ready);font-weight:700}
.pv .btns{gap:8px}
.circ{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;border:1px solid #574a42;color:var(--fg)}
.circ:hover{border-color:var(--fg)}
.circ.p{background:var(--accent);color:var(--accent-fg);border:0}
.circ.p:hover{background:#f2b453}
.circ[disabled]{opacity:.5;pointer-events:none}

/* trailer behind the hero: fades in once playing; the logo shrinks and the blurb steps aside */
.trl{position:absolute;inset:0;z-index:0;overflow:hidden;container-type:size;opacity:0;transition:opacity .9s ease;pointer-events:none}
.hero>.trl{position:absolute;max-width:none;z-index:0}
.trl iframe{position:absolute;left:50%;top:50%;width:max(100cqw,177.78cqh);height:max(100cqh,56.25cqw);border:0;transform:translate(-50%,-50%) scale(1.2)}
main.trl-on .trl{opacity:1}
.backdrop .trl{-webkit-mask-image:linear-gradient(180deg,#000 30%,transparent);mask-image:linear-gradient(180deg,#000 30%,transparent)}
main.trl-on .backdrop .trl{opacity:.5}
.hero h1,.dhead h1{transform-origin:left bottom;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
main.trl-on .hero h1,main.trl-on .dhead h1{transform:scale(.62)}
.hero>p,.dhead .desc{transition:opacity .5s,max-height .6s;max-height:6em}
main.trl-on .hero>p,main.trl-on .dhead .desc{opacity:0;max-height:0}
.hero .trl-chip{position:absolute;right:18px;bottom:18px;z-index:2}
.trl-chip{display:inline-flex;align-items:center;gap:6px;font:600 12px var(--body);padding:6px 12px;border-radius:999px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.18);color:#fff;animation:rise .3s ease}
.trl-chip:hover{background:rgba(0,0,0,.75)}
.trl-chip svg.i{width:15px;height:15px}

/* new episodes */
.newtag{font:700 11px/inherit var(--body);letter-spacing:.05em;text-transform:uppercase;color:var(--accent)}
.meta.when{color:var(--accent);font-weight:600}

/* unsaved profile edits */
.unsaved{position:sticky;bottom:18px;display:flex;align-items:center;gap:10px;padding:12px 14px 12px 18px;border-radius:12px;background:var(--surface2);border:1px solid color-mix(in srgb,var(--accent) 50%,var(--line));box-shadow:0 14px 34px rgba(0,0,0,.5);animation:rise .22s ease}
.unsaved span{flex:1;font-weight:600}

/* update ready */
.upd{position:fixed;right:22px;bottom:22px;z-index:61;width:300px;display:grid;gap:10px;padding:14px;border-radius:12px;background:var(--surface2);border:1px solid color-mix(in srgb,var(--accent) 50%,var(--line));box-shadow:0 14px 34px rgba(0,0,0,.5);font-size:13.5px;animation:rise .25s ease}
.upd p{margin:0}
.upd .btns{justify-content:flex-end}

/* startup splash: the amber wordmark draws in, then fades and lifts away */
#splash{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:var(--bg);transition:opacity .45s ease,transform .45s ease}
#splash::before{content:"";position:absolute;width:60vw;height:40vw;background:radial-gradient(ellipse,rgba(234,165,60,.22),transparent 65%)}
#splash .lg{position:relative;display:grid;gap:18px;justify-items:center;animation:splashIn .5s cubic-bezier(.2,.7,.2,1)}
#splash .w{font:400 clamp(72px,11vw,150px)/1 var(--neon);letter-spacing:.01em;animation:neonOn 1s .15s both}
/* splash: the sign flickers on like a cold neon tube, the word first, then the star */
#splash .star{animation:neonOn 1s .45s both}
@keyframes neonOn{0%{opacity:.08}10%{opacity:.6}14%{opacity:.1}30%{opacity:.85}34%{opacity:.25}48%,100%{opacity:1}}
#splash .ul{height:6px;width:clamp(160px,24vw,320px);border-radius:99px;background:var(--line);overflow:hidden}
#splash .ul i{display:block;height:100%;width:100%;background:var(--accent);transform-origin:left;animation:splashBar 1.1s cubic-bezier(.4,0,.2,1) both}
#splash.out{opacity:0;transform:scale(1.05);pointer-events:none}
@keyframes splashIn{from{opacity:0;transform:scale(.94)}}
@keyframes splashBar{from{transform:scaleX(0)}}

/* ambient glow: a fixed radial light behind the page, tinted from the hero or title backdrop */
#amb{position:fixed;inset:0;z-index:0;pointer-events:none}
#amb i{position:absolute;inset:0;opacity:0;transition:opacity .8s ease;background:radial-gradient(ellipse 90% 70% at 55% 20%,color-mix(in srgb,var(--c,transparent) 38%,transparent),transparent 70%)}
#amb i.on{opacity:1}

/* play: the clicked art grows to fill the window, then shows what's happening until the video is up */
#stage{position:fixed;z-index:70;overflow:hidden;background:var(--bg);color:#fff;border-radius:var(--poster-r);box-shadow:0 20px 50px rgba(0,0,0,.6);
  transition:left .4s cubic-bezier(.2,.7,.2,1),top .4s cubic-bezier(.2,.7,.2,1),width .4s cubic-bezier(.2,.7,.2,1),height .4s cubic-bezier(.2,.7,.2,1),border-radius .4s,opacity .3s}
#stage.full{border-radius:0;box-shadow:none}
#stage.gone{opacity:0}
#stage>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:opacity .6s}
#stage>img.bd{opacity:0}
#stage.has-bd>img.bd{opacity:1}
#stage.has-bd>img.from{opacity:0}
#stage .st-in{position:absolute;inset:0;padding:6vw;display:flex;flex-direction:column;justify-content:flex-end;gap:22px;opacity:0;transition:opacity .35s .15s;
  background:linear-gradient(100deg,rgba(14,12,11,.92) 30%,rgba(14,12,11,.4))}
#stage.full .st-in{opacity:1}
#stage h1{margin:0;font:800 clamp(48px,7vw,96px)/.9 var(--display);text-transform:uppercase;text-wrap:balance;max-width:16ch}
#stage .steps{display:grid;gap:12px;font-size:18px}
#stage .stp{display:flex;align-items:center;gap:14px;opacity:.35;transition:opacity .3s}
#stage .stp.on,#stage .stp.done{opacity:1}
#stage .stp em{font-style:normal;color:var(--mute)}
#stage .ck{width:24px;height:24px;border-radius:50%;border:3px solid var(--mute);display:grid;place-items:center;flex:none;color:transparent;transition:background .25s,border-color .25s}
#stage .ck svg.i{width:14px;height:14px;stroke-width:3}
#stage .stp.done .ck{background:var(--ready);border-color:var(--ready);color:var(--bg)}
#stage .stp.on:not(.done) .ck{border-color:var(--accent);border-top-color:transparent;animation:spin .9s linear infinite}
#stage .pbar{height:6px;width:min(400px,40vw);border-radius:99px;background:rgba(255,255,255,.12);overflow:hidden}
#stage .pbar i{display:block;height:100%;width:100%;background:var(--accent);transform-origin:left;transform:scaleX(0);transition:transform 4s cubic-bezier(.1,.6,.3,1)}
#stage.starting .pbar i{transform:scaleX(.92)}
@keyframes spin{to{transform:rotate(360deg)}}

/* unexpected errors: a toast that says what broke and offers the log */
.toast.etoast{border-left:4px solid var(--warn);max-width:600px}
.etoast .msg{display:grid;gap:1px}
.etoast .msg span{color:var(--mute);font-size:12.5px}

/* what's new after an update */
.wn{position:fixed;right:var(--pad);bottom:24px;z-index:25;width:max-content;max-width:min(380px,calc(100vw - 2*var(--pad)));padding:12px 10px 12px 16px;border-radius:10px;
  background:rgba(26,22,20,.96);border:1px solid var(--line);box-shadow:0 14px 34px rgba(0,0,0,.5);display:grid;gap:10px;font-size:14px;animation:wnIn .35s cubic-bezier(.2,.7,.2,1);transition:opacity .3s,transform .3s}
.wn.out{opacity:0;transform:translateY(8px)}
.wn-bar{display:flex;align-items:center;gap:10px}
.wn-bar .star{width:16px;height:16px;flex:none;color:var(--accent);margin:0}
.wn b{font-weight:600}
.wn .lnk{color:var(--accent);font-weight:600;margin-left:4px}
.wn .lnk:hover{text-decoration:underline}
.wn .x{color:var(--mute);display:grid;place-items:center;width:28px;height:28px;border-radius:6px;margin-left:4px}
.wn .x:hover{color:var(--fg);background:var(--surface2)}
.wn ul{margin:0 6px 4px 0;padding-left:44px;display:grid;gap:5px;color:#d9cfc6}
.wn ul[hidden]{display:none}
@keyframes wnIn{from{opacity:0;transform:translateY(14px) scale(.98)}}

/* anime home */
.pill{position:absolute;left:7px;bottom:7px;z-index:2;font:700 11px/1 var(--body);background:rgba(14,12,11,.9);color:var(--accent);padding:5px 7px;border-radius:999px;border:1px solid rgba(234,165,60,.35);white-space:nowrap}
.pill.today{background:var(--accent);color:var(--accent-fg)}
.days{display:flex;gap:8px;flex-wrap:wrap}
.day{display:grid;gap:3px;min-width:76px;padding:8px 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface);text-align:center}
.day b{font:800 17px/1 var(--display);text-transform:uppercase}
.day span{font-size:11px;color:var(--mute)}
.day:hover{background:var(--surface2)}
.day.on{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}
.day.on span{color:#4a3510}
.wcard{display:flex;gap:10px;padding:8px;border-radius:10px;background:var(--surface);border:1px solid var(--line);text-align:left;transition:border-color .15s,transform .18s}
.wcard:hover{border-color:var(--accent);transform:translateY(-2px)}
.wcard .cover{position:relative;flex:none;width:62px;height:88px;border-radius:6px;overflow:hidden}
.wcard .cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.wtx{display:grid;align-content:center;gap:3px;min-width:0}
.wtx b{font-size:13.5px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wtx .tm{font:700 12px var(--body);color:var(--accent)}
.wtx .sm{font-size:11.5px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* because you watched */
.row.because h2.h{color:var(--accent)}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  #splash,#amb i,#stage{transition:opacity .2s!important}
}
.tip{position:fixed;z-index:9999;pointer-events:none;max-width:420px;padding:6px 10px;border-radius:6px;background:rgba(36,31,28,.97);border:1px solid var(--line);box-shadow:0 8px 20px rgba(0,0,0,.45);color:var(--fg);font:500 12.5px/1.35 var(--body);opacity:0;transform:translateY(-2px);transition:opacity .12s,transform .12s;overflow-wrap:anywhere}
.tip.on{opacity:1;transform:none}

/* comics: cards, hero, title page (app.js comicCard / comicHero / paintComic) */
.badge{position:absolute;top:7px;left:7px;z-index:2;font:700 12px/1 var(--body);background:var(--accent);color:var(--accent-fg);padding:4px 7px;border-radius:5px}
.ccard .prog{margin-top:-1px}
/* the cover, blurred, is the banner; the sharp cover stands on the right */
.chero>img{filter:blur(40px) saturate(1.25) brightness(.75);transform:scale(1.25)}
.chero>.ccov{position:absolute;right:calc(var(--pad) + 48px);bottom:80px;width:clamp(150px,15vw,220px);aspect-ratio:2/3;border-radius:var(--poster-r);overflow:hidden;box-shadow:0 22px 50px rgba(0,0,0,.6)}
.ccov img{width:100%;height:100%;object-fit:cover;display:block}
.backdrop.cb img{filter:blur(30px);transform:scale(1.2);opacity:.3}
.stab small{color:var(--mute);font-weight:500;margin-left:4px}
.chp{grid-template-columns:56px minmax(0,1fr) auto;padding:12px}
.chp b{font:600 15px var(--body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chp .st{font-size:13px;color:var(--mute);white-space:nowrap}
.chp .st.acc{color:var(--accent);font-weight:600}
.chp.read{opacity:.45}
.chp.next{outline:1.5px solid var(--accent);outline-offset:-1.5px}

/* comic reader: full window (body.reading hides the rail and top bar), the strip centred at --cw of the width */
body.reading{padding-left:0;background:#080707}
body.reading :is(.rail,.top,#amb){display:none}
body.reading main{padding:0;display:block}
.rdr{--cw:.66;min-height:100vh;background:#080707}
.rdr,.rdr *{overflow-anchor:none}  /* app.js keepSpot does the anchoring */
.rdr:not(.bars){cursor:none}
.rstrip{width:calc(var(--cw) * 100%);margin:0 auto}
/* a page holds a 2:3 box until it loads, then takes its real shape */
.pg{display:block;width:100%;height:auto;aspect-ratio:auto 2/3;background:#141110}
.rbar{position:fixed;left:0;right:0;z-index:30;display:flex;align-items:center;gap:14px;padding:0 20px;opacity:0;pointer-events:none;transition:opacity .3s}
.rdr.bars .rbar{opacity:1;pointer-events:auto}
.rtop{top:0;height:64px;background:linear-gradient(180deg,rgba(8,7,7,.95),rgba(8,7,7,.7) 65%,transparent)}
.rbot{bottom:0;height:52px;background:rgba(14,12,11,.94);border-top:1px solid var(--line);font-size:13px;font-variant-numeric:tabular-nums}
.rbk{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;flex:none}
.rbk:hover,.rzoom button:hover{background:rgba(255,255,255,.1)}
.rtt{font:800 24px/1 var(--display);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40vw}
.rtop .rch{color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.rzoom{margin-left:auto;display:flex;gap:6px;flex:none}
.rzoom button{width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.22);font:600 18px/1 var(--body);display:grid;place-items:center}
.rch2{font-weight:600;white-space:nowrap}
.rline{flex:1;height:4px;border-radius:4px;background:#3a312c;overflow:hidden}
.rline i{display:block;height:100%;width:0;background:var(--accent)}
.rpg{color:var(--mute);white-space:nowrap;min-width:96px;text-align:right}
/* between chapters: a title card; after the last: "You're caught up" */
.tcard{display:grid;justify-items:center;gap:10px;text-align:center;padding:100px 20px}
.tcard small{color:var(--mute);font-size:14px}
.tcard b{font:800 clamp(52px,6vw,88px)/.9 var(--display);text-transform:uppercase;color:var(--fg)}
.tcard.end{padding:120px 20px 180px}
.tcard .btn{margin-top:16px}
.rmsg{margin:0;color:var(--mute);text-align:center;padding:42vh 0}
.rerr{padding:40px 0}

/* sharing (host: 3 steps + connected devices; client: connect card) */
.steps{list-style:none;margin:0;padding:0;display:grid}
.step{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 0;border-top:1px solid var(--line)}
.step:first-child{border-top:0;padding-top:4px}
.step .n{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font:800 16px/1 var(--display);background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--accent)}
.step .sb{display:grid;gap:2px;min-width:0}
.step .sb .hint{font-size:13px}
.step .sr{display:flex;align-items:center;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.step.off .n{background:var(--surface2);color:var(--mute)}
.step.off .sb b{color:var(--mute)}
.scard .step .toggle{border:0;padding:6px 0;width:auto}
.reach{display:inline-flex;align-items:center;gap:8px;font-weight:600;color:var(--mute);white-space:nowrap}
.reach.ok{color:var(--ready)}.reach.bad{color:var(--warn)}
.reach .spin{width:12px;height:12px;border-radius:50%;border:2px solid var(--mute);border-top-color:transparent;animation:spin .9s linear infinite}
.pcode{display:grid;justify-items:end;gap:2px}
.pcode b{font:800 34px/1 var(--display);letter-spacing:.18em;color:var(--accent);margin-right:-.18em}
.pcode small{color:var(--mute);font-size:12px;font-variant-numeric:tabular-nums}
.dev{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.shead+.dev{border-top:0;padding-top:0}
.dev .nm{font-weight:600}
.dev .when{color:var(--mute);font-size:13px;margin-right:auto}
.pcic{width:22px;height:22px;flex:none;fill:none;stroke:var(--mute);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gate hr{border:0;border-top:1px solid var(--line);margin:4px 0;width:100%}

/* client: the other PC is off */
.asleep{justify-self:center;margin-top:8vh;width:min(460px,100%);display:grid;justify-items:center;text-align:center;gap:12px}
.asleep h1{margin:6px 0 0;font:800 40px/.95 var(--display);text-transform:uppercase}
.asleep p{margin:0;color:var(--mute);font-size:15px}
.asleep .hint:empty{display:none}
.asleep .btn{margin-top:8px}
.zpc{width:150px;height:145px;fill:none;stroke:var(--mute);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.zpc rect{fill:var(--surface)}
.zpc .eye{stroke:var(--fg)}
.zpc text{fill:var(--accent);stroke:none;font:800 16px var(--display);animation:zz 2.6s ease-in-out infinite}
.zpc text+text{font-size:12px;animation-delay:.6s}
@keyframes zz{0%,100%{opacity:.2;transform:translateY(4px)}50%{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.zpc text{animation:none}}

/* watch together: invite toast (stays until answered) + the switch in the profile menu */
.toast.invite{gap:12px;padding:8px 10px;max-width:640px}
.toast.invite .av{flex:none}
.toast.invite .msg{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.toast.invite .msg b{font-weight:700}
.menu .tgo{justify-content:space-between}
.menu .tgo .sw{overflow:visible}
.menu .tgo[aria-checked="true"] .sw{background:var(--accent)}
.menu .tgo[aria-checked="true"] .sw::after{transform:translateX(14px);background:var(--accent-fg)}

/* Live: the TV guide (option A). Preview of what the TV shows on top, channels down and time across below.
   The page itself never scrolls: the channel list scrolls inside .lgrid, so the preview stays put.
   On the TV, tv.js lays the aerial picture over .lvid. No flex gap / aspect-ratio here (Chrome 79). */
.live{height:calc(100vh - 112px);margin-bottom:-38px;display:flex;flex-direction:column;min-height:0}
.lprev{display:flex;align-items:flex-end;flex:none;margin-bottom:18px}
.lvid{flex:none;width:320px;height:180px;margin-right:26px;border-radius:var(--r);background:linear-gradient(135deg,#2a1810,#14202c 60%,var(--bg));border:1px solid var(--line);
  display:flex;flex-direction:column;justify-content:flex-end;padding:14px;color:var(--mute);font-size:13px;position:relative;overflow:hidden}
.lvid b{color:var(--fg);font-size:15px}
.lvid .lv{position:absolute;top:10px;left:12px;font:800 11px/1 var(--body);letter-spacing:.08em;color:#e5484d;background:rgba(0,0,0,.55);padding:4px 7px;border-radius:4px}
.linfo{min-width:0;flex:1}
.linfo .lch{font:800 13px/1 var(--body);letter-spacing:.06em;color:var(--accent);text-transform:uppercase}
.linfo .lt{margin-left:14px;color:var(--mute)}
.linfo h1{margin:8px 0 6px;font:800 44px/1 var(--display);letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.linfo p{margin:0;color:var(--mute)}
.lbar{height:5px;border-radius:3px;background:rgba(255,255,255,.12);overflow:hidden;margin-top:12px;max-width:520px}
.lbar i{display:block;height:100%;background:var(--accent)}
.lnote{color:var(--warn);font-size:13px;margin:0 0 8px}
.lgrid{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 4px 10px 0}
.ltimes,.lrow{display:flex}
.ltimes{position:sticky;top:0;z-index:2;background:var(--bg);color:var(--mute);font-size:12px;font-weight:700;height:26px}
.ltimes>div{position:relative;flex:1}
.ltimes span{position:absolute;top:4px}
.lname{flex:none;width:190px;display:flex;align-items:center;padding:0 12px;margin-right:6px;background:var(--surface);border-radius:8px;min-width:0;white-space:nowrap;overflow:hidden}
.lname b{flex:none;width:34px;color:var(--mute);font-variant-numeric:tabular-nums}
.lname span{overflow:hidden;text-overflow:ellipsis;font-weight:600}
.lrow{height:54px;margin-top:6px}
.lrow.on .lname{box-shadow:inset 3px 0 0 var(--accent)}
.lrow.on .lname b{color:var(--accent)}
.lprogs{position:relative;flex:1;min-width:0}
.lp{position:absolute;top:0;bottom:0;border-left:4px solid var(--bg);background:var(--surface);background-clip:padding-box;border-radius:10px;padding:7px 10px;
  display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;text-align:left}
.lp b{font-weight:600;overflow:hidden;text-overflow:ellipsis}
.lp small{color:var(--mute);font-size:12px}
.lp.now{background-color:var(--surface2)}
.lp.now small{color:var(--accent)}
.lp.none b{color:var(--mute);font-weight:500}
.lp:hover{background-color:#2e2622}
.lp:focus{z-index:1}
html.kbnav .lp:focus{outline-offset:-3px;background-color:#3a2c1a;box-shadow:none}
.lpair{justify-self:center;margin-top:8vh;width:min(560px,100%);background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:30px;display:grid;gap:14px;text-align:center;justify-items:center}
.lpair h1{margin:0;font:800 34px/1.05 var(--display)}
.lpair p{margin:0;color:var(--mute)}

/* ---------- phone (iPhone home-screen web app) ----------
   Everything here is under html.phone, which only the phone shim sets, so the desktop app and the TV never see it.
   The phone server should inject <meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
   (plus apple-mobile-web-app-capable / status-bar-style black-translucent); env(safe-area-inset-*) below keeps clear of
   the notch, the status bar and the home indicator. */
html.phone{--pad:14px;--tab:58px;--sb:env(safe-area-inset-bottom,0px);scrollbar-gutter:auto;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
html.phone body{padding-left:0;padding-bottom:calc(var(--tab) + var(--sb))}
html.phone body.picking,html.phone body.reading{padding-bottom:0}
html.phone ::-webkit-scrollbar{display:none}  /* iOS scrollbars float; a desktop-style gutter would steal width */
html.phone :is(input,select,textarea){font-size:16px}  /* under 16 px iOS zooms the page on focus */
/* long-press opens the menu (app.js): no iOS callout or text selection on what it targets */
html.phone :is(.card,.hero,.ep,.wcard){-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
/* hover sticks after a tap on touch screens */
html.phone .card:hover :is(.poster,.thumb){transform:none;box-shadow:none}
html.phone .wcard:hover{transform:none}

/* the rail becomes a bottom tab bar: icons only */
html.phone .rail,html.phone .rail:hover,html.phone.kbnav .rail:focus-within{top:auto;bottom:0;right:0;width:auto;height:calc(var(--tab) + var(--sb));flex-direction:row;align-items:stretch;
  padding:0 4px var(--sb);border-right:0;border-top:1px solid var(--line);background:#100d0c;box-shadow:none;transition:none}
html.phone .rail :is(.nm,.soon,.rd,.brand .w),html.phone .rsec.dim,html.phone .rsec[data-sec="live"]{display:none}
html.phone .secs,html.phone .rail-foot{display:contents}
html.phone .rail .brand,html.phone .rsec,html.phone .gear{flex:1;min-width:0;height:auto;margin:0;padding:0;justify-content:center;border-radius:0;background:none}
html.phone .rail .brand .star{width:24px;height:24px}
html.phone .rsec svg.i{width:24px;height:24px}
html.phone .gear svg.i{width:23px;height:23px}
html.phone .rsec.on::before{left:30%;right:30%;top:-1px;bottom:auto;width:auto;height:3px;border-radius:0 0 3px 3px}

/* top bar: search and the profile on one line, the section's pages scrolling sideways under it */
html.phone body:not(.hero-top) .top{background:rgba(14,12,11,.97)}
html.phone .top{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"s me" "n n";gap:6px 10px;padding:calc(8px + env(safe-area-inset-top,0px)) 12px 0}
html.phone .search{grid-area:s;padding:8px 14px;min-height:40px}
html.phone .me{grid-area:me}
html.phone .pchip{padding:5px;min-height:40px}
html.phone .pchip>span:last-child{display:none}
html.phone .nav{grid-area:n;gap:4px;margin:0 -12px;padding:0 12px;overflow-x:auto;scrollbar-width:none;white-space:nowrap}
html.phone .nav::-webkit-scrollbar{display:none}
html.phone .nav button{min-height:40px;padding:0 8px;flex:none}
html.phone .nav button:first-child{padding-left:0}
html.phone #sugg{left:12px;right:12px}

/* page */
html.phone main{padding-top:16px;gap:24px}
html.phone h2.h{font-size:18px}
html.phone .hero{min-height:56vh;padding:calc(var(--toph,100px) + 24px) calc(var(--pad) + 4px) 76px;margin-top:calc(-16px - var(--toph,100px))}
html.phone .hero h1{font-size:clamp(36px,11vw,48px)}
html.phone .hero p{-webkit-line-clamp:2;font-size:13.5px}
html.phone .hero .btn{padding:10px 16px;font-size:14px}
html.phone .hero .btn.round{width:42px;height:42px;padding:0}
html.phone .logo{max-height:96px}
html.phone .hero+.row{margin-top:-48px}
html.phone .hero .trl-chip{display:none}
/* rows: native sideways swipe, snapping to cards; no arrows */
html.phone .strip{grid-auto-columns:116px;gap:10px;scroll-snap-type:x proximity;scroll-padding:0 16px;scroll-behavior:auto}
html.phone .strip>*{scroll-snap-align:start}
html.phone .strip.wide{grid-auto-columns:220px}
html.phone .arrow{display:none}
html.phone .grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:18px 10px}
html.phone .grid.wide{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
html.phone .poster span{font-size:15px}
html.phone .card .name{font-size:13px}
html.phone :is(.btn,button.chip,.back,.outline){min-height:40px}
html.phone :is(.ico,.circ){width:40px;height:40px}
html.phone .seg button{min-height:38px}
html.phone .days{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 calc(-1 * var(--pad));padding:0 var(--pad)}
html.phone .day{flex:none;min-width:64px;padding:8px 10px}

/* title page: one column, a smaller poster on top */
html.phone .backdrop{height:320px}
html.phone .detail{grid-template-columns:minmax(0,1fr);gap:14px}
html.phone .detail>.poster{width:104px}
html.phone .dhead h1{font-size:clamp(34px,10vw,44px)}
html.phone .dhead h1 .logo{max-height:90px;margin:6px 0}
html.phone .dhead p.desc{-webkit-line-clamp:5;font-size:13.5px}
html.phone .tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:4px 22px;margin-top:20px}
html.phone .stab{flex:none}
html.phone .ep{grid-template-columns:20px 108px minmax(0,1fr) auto;gap:10px;padding:10px 8px;margin:0 -8px}
html.phone .ep .n{font-size:15px}
html.phone .ep h3{font-size:12px}
html.phone .ep h3 b{font-size:14px}
html.phone .ep p{font-size:12.5px}
html.phone .ep>.ico{opacity:1}
html.phone .chp{grid-template-columns:44px minmax(0,1fr) auto}

/* sources drawer: the whole width */
html.phone .drawer{width:100%;border-left:0;padding:calc(16px + env(safe-area-inset-top,0px)) 14px calc(16px + var(--sb))}
html.phone .src{padding:10px 12px}
html.phone .q{min-width:44px;font-size:17px}

/* popups and floating cards fit the screen */
html.phone :is(.menu,.cmenu,.pv,.tip){max-width:calc(100vw - 24px)}
html.phone .cmenu{min-width:min(230px,calc(100vw - 24px))}
html.phone :is(.menu button,.cmenu button){min-height:44px}
html.phone .toasts{left:50%;bottom:calc(var(--tab) + var(--sb) + 12px);width:calc(100vw - 24px)}
html.phone .toast{max-width:100%}
html.phone .toast .x{min-width:40px;min-height:40px}
html.phone .upd{left:12px;right:12px;width:auto;bottom:calc(var(--tab) + var(--sb) + 12px)}
html.phone .wn{right:12px;left:12px;max-width:none;width:auto;bottom:calc(var(--tab) + var(--sb) + 12px)}
html.phone .wn .x{width:40px;height:40px}
html.phone .unsaved{bottom:calc(var(--tab) + var(--sb) + 10px)}

/* who's watching + profiles */
html.phone .picker{min-height:calc(100vh - 120px)}
html.phone .people{gap:18px}
html.phone .who{width:120px}
html.phone .av{--s:96px}
html.phone .av.md{--s:60px}
html.phone .av.mini{--s:28px}
html.phone #pk .star{left:20px;top:calc(20px + env(safe-area-inset-top,0px))}
html.phone #pk .clk{right:20px;top:calc(20px + env(safe-area-inset-top,0px))}
html.phone .prow{grid-template-columns:minmax(0,1fr);padding:14px}
html.phone :is(.set>h1,.mng-head h1,.gate h1,.asleep h1){font-size:34px}
html.phone :is(.gate,.lpair){padding:20px}

/* settings */
html.phone .scard{padding:14px}
html.phone .tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html.phone .range{flex-wrap:wrap}
html.phone .range input{width:auto;flex:1;min-width:0}
html.phone .keyrow .pin{min-width:0}
html.phone .step{grid-template-columns:30px minmax(0,1fr)}
html.phone .step .sr{grid-column:2;justify-content:flex-start}
html.phone .pcode{justify-items:start}
html.phone .dev{flex-wrap:wrap}

/* comics */
html.phone .chero>.ccov{display:none}  /* no room beside the title; the blurred cover is still the banner */
html.phone .rdr .rstrip{width:100%}
html.phone .rzoom{display:none}
html.phone .rtop{height:calc(56px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 10px 0}
html.phone .rbot{height:calc(48px + var(--sb));padding:0 14px var(--sb)}
html.phone .rtt{font-size:20px;max-width:none;flex:none}
html.phone .rpg{min-width:0}
html.phone .tcard b{font-size:44px}

/* live guide: the preview stacks, channel names narrower */
html.phone .live{height:calc(100vh - var(--toph,100px) - var(--tab) - var(--sb) - 16px);margin-bottom:0;min-width:0}
html.phone .lprev{flex-direction:column;align-items:stretch;margin-bottom:12px}
html.phone .lvid{width:100%;height:auto;aspect-ratio:16/9;max-height:28vh;margin:0 0 10px}
html.phone .linfo h1{font-size:30px}
/* the guide scrolls sideways too (at 390 px six half-hours don't fit), channel names pinned on the left */
html.phone .lgrid{overflow:auto;overscroll-behavior:contain;min-width:0}
html.phone :is(.ltimes,.lrow){min-width:860px}
html.phone .ltimes>div:first-child{width:116px!important;position:sticky;left:0;z-index:3;background:var(--bg)}  /* app.js sets 196 px inline */
html.phone .lname{width:112px;padding:0 8px;margin-right:4px;position:sticky;left:0;z-index:2;box-shadow:-4px 0 0 var(--bg),4px 0 0 var(--bg)}
html.phone .lrow.on .lname{box-shadow:inset 3px 0 0 var(--accent),-4px 0 0 var(--bg),4px 0 0 var(--bg)}
html.phone .lname b{width:26px}
