/* PlexDash – dark media UI (Overseerr/Netflix inspired) */
:root {
  color-scheme: dark;
  --bg:#0f1115; --surface:#131722; --raised:#1b2130; --field:#0f131b; --line:#252c3b; --line-strong:#353e52;
  --text:#f3f4f6; --muted:#a6afc0; --quiet:#7f899c;
  --accent:#2f93ec; --accent-2:#5ec4ff; --accent-soft:#3fa9f524; --ring:#6cc3ff;
  --grad:linear-gradient(135deg,#1c74cf,#3fa9f5);
  --radius:14px; --radius-lg:20px; --shadow:0 18px 50px #0009;
  font:16px/1.5 Inter,"Segoe UI Variable","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
  background:var(--bg); color:var(--text);
  -webkit-font-smoothing:antialiased;
}
* {box-sizing:border-box}
[hidden],.symbols {display:none!important}
html {scroll-padding-top:80px}
body {margin:0; min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; background:radial-gradient(1200px 500px at 85% -10%,#3fa9f51f,transparent 60%),radial-gradient(900px 420px at -10% 0,#1f7fd614,transparent 60%),var(--bg) no-repeat}
main {flex:1; padding-bottom:clamp(40px,7vw,90px)}
h1,h2,h3,p,ol {margin:0}
h1,h2,h3,.wordmark {line-height:1.12; letter-spacing:-.025em}
h1 {font-size:clamp(2rem,4.4vw,3.4rem); font-weight:800}
h2 {font-size:clamp(1.2rem,2vw,1.5rem); font-weight:700}
h3 {font-size:1rem; font-weight:700}
h1,h2,h3,p,small,.badge,button,strong {overflow-wrap:anywhere}
button,input,textarea,select {font:inherit; color:inherit}
button,a,input,textarea,select {-webkit-tap-highlight-color:transparent}
button {cursor:pointer; transition:background-color .15s,border-color .15s,color .15s,transform .15s,box-shadow .15s; font-weight:600}
button:disabled {opacity:.55; cursor:wait}
a {color:var(--ring); text-underline-offset:.2em}
:focus-visible {outline:2px solid var(--ring); outline-offset:3px}
.sr,.skip:not(:focus) {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap}
.skip:focus {position:absolute; top:8px; left:8px; z-index:30; padding:.6em 1em; background:var(--surface); border-radius:8px}
.wrap {width:calc(100% - 2 * clamp(16px,3vw,56px)); margin-inline:auto; max-width:1800px}
.glyph {width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.muted,.note {color:var(--muted)}
.note {font-size:.86rem}

/* Header */
.mast {position:sticky; top:0; z-index:20; background:#0b0d12b8; backdrop-filter:saturate(160%) blur(16px); -webkit-backdrop-filter:saturate(160%) blur(16px); border-bottom:1px solid #ffffff10}
.mast-inner {min-height:66px; display:flex; align-items:center; gap:clamp(12px,2.4vw,32px)}
.wordmark {display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; font-size:1.25rem; font-weight:800; border-radius:8px}
.wordmark-img {display:block; height:22px; width:auto; filter:drop-shadow(0 3px 10px #3fa9f540)}
.wordmark-sub {font-weight:500; font-size:1.05rem; color:var(--muted); letter-spacing:-.01em; white-space:nowrap}
nav {display:flex; align-items:center; gap:4px; flex-wrap:wrap}
nav button,.nav-link {white-space:nowrap; gap:7px; background:none; border:0; border-radius:999px; padding:8px 14px; min-height:38px; color:var(--muted); font-size:.92rem; font-weight:600; text-decoration:none; display:inline-flex; align-items:center}
nav button:hover,.nav-link:hover {color:var(--text); background:#ffffff0d}
nav button[aria-current],.nav-link[aria-current] {color:var(--text); background:#ffffff14}
.mast-tools {margin-left:auto; display:flex; align-items:center; gap:10px}
.mast-label {font-size:.82rem; color:var(--quiet); border:1px solid var(--line); border-radius:999px; padding:4px 12px}
.lang-switch {display:inline-flex; padding:3px; border:1px solid var(--line); border-radius:999px; background:var(--field)}
.lang-switch button {border:0; background:none; color:var(--quiet); font-size:.75rem; font-weight:700; letter-spacing:.04em; padding:4px 10px; border-radius:999px; min-height:28px}
.lang-switch button[aria-pressed="true"] {background:var(--raised); color:var(--text)}
.lang-switch button:hover {color:var(--text)}

/* Buttons */
.primary,.soft,.ghost,.chip,.icon,.small {border:1px solid var(--line-strong); background:var(--raised); border-radius:10px; padding:9px 16px; min-height:42px; font-size:.92rem; color:var(--text)}
.primary {background:var(--grad); border-color:transparent; color:#fff; box-shadow:0 8px 24px #3fa9f540}
.primary:hover:not(:disabled) {transform:translateY(-1px); box-shadow:0 12px 30px #3fa9f566}
.primary.big {min-height:50px; padding:12px 22px; font-size:1rem; border-radius:12px}
.primary span {margin-left:10px}
.btn-ico {width:17px; height:17px; margin-left:8px; vertical-align:-3px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round}
.soft:hover:not(:disabled),.chip:hover:not(:disabled),.icon:hover:not(:disabled),.small:hover:not(:disabled) {background:#252c3d; border-color:#47516a}
.ghost {background:none; border-color:transparent; color:var(--muted)}
.ghost:hover:not(:disabled) {color:var(--text); background:#ffffff0d}
.chip,.small {min-height:34px; padding:5px 12px; font-size:.84rem; border-radius:999px}
.icon {padding:0; min-width:38px; min-height:38px; border-radius:999px; font-size:1.35rem; line-height:1}
.danger,.soft.error {color:#fca5a5; border-color:#7f1d1d}
.danger:hover:not(:disabled),.soft.error:hover:not(:disabled) {background:#3b1219; border-color:#b91c1c}
.pager {margin-top:22px}

/* Landing */
.hero {position:relative; overflow:hidden; border-bottom:1px solid #ffffff0a}
.hero::before {content:''; position:absolute; inset:-30% -10% auto; height:140%; background:radial-gradient(600px 300px at 20% 40%,#3fa9f53a,transparent 70%),radial-gradient(500px 280px at 75% 30%,#1f7fd633,transparent 70%),radial-gradient(400px 260px at 55% 90%,#38bdf822,transparent 70%); filter:blur(10px); pointer-events:none}
.hero-inner {position:relative; display:grid; grid-template-columns:1.2fr minmax(320px,.8fr); align-items:center; gap:clamp(24px,5vw,72px); padding:clamp(48px,9vw,120px) 0 clamp(40px,7vw,90px)}
.eyebrow {display:inline-flex; align-items:center; gap:8px; font-size:.76rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--ring); margin-bottom:14px}
.lead {margin-top:14px; max-width:60ch; color:var(--muted); font-size:clamp(1rem,1.3vw,1.15rem)}
.glass {background:#131722cc; border:1px solid #ffffff14; border-radius:var(--radius-lg); box-shadow:var(--shadow); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px)}
.access {padding:clamp(22px,3vw,34px)}
.access h2 {font-size:1.35rem}
.access .muted {margin-top:6px}
.actions,.modal-actions {display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.actions {margin:22px 0 10px}
#auth-link {display:inline-block; margin-top:6px; font-size:.9rem}
.device-note {display:flex; gap:12px; align-items:flex-start; margin-top:20px; padding-top:16px; border-top:1px solid var(--line); font-size:.84rem; color:var(--quiet)}
.device-note .glyph {width:17px; height:17px; margin-top:2px}
.steps-title {margin:clamp(36px,5vw,64px) 0 18px; font-size:1.25rem}
.steps {list-style:none; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px}
.step {padding:22px; border:1px solid var(--line); border-radius:var(--radius); background:linear-gradient(180deg,#171c28,#12161f)}
.step h3 {margin-top:14px}
.step p {margin-top:6px; color:var(--muted); font-size:.92rem}
.step-icon {display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:var(--accent-soft); color:var(--ring)}

/* Library hero + search */
.desk-hero {border-bottom:1px solid #ffffff0a; margin-bottom:clamp(20px,3vw,34px)}
.desk-hero-inner {display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,40%); align-items:end; gap:20px 40px; padding:clamp(28px,4.5vw,56px) 0 clamp(22px,3vw,34px)}
.desk-hero h1 {font-size:clamp(1.9rem,3.6vw,2.9rem)}
.desk-hero .lead {margin-top:8px}
#search-form {margin:0}
label {display:block; font-size:.86rem; font-weight:600; margin-bottom:7px; color:var(--muted)}
.searchbox,input,select,textarea {background:var(--field); border:1px solid var(--line-strong); border-radius:12px}
.searchbox {display:flex; align-items:center; gap:10px; padding:0 8px 0 16px; color:var(--quiet); min-height:52px; background:#ffffff0a; border-color:#ffffff1a}
.searchbox:focus-within {border-color:var(--ring); box-shadow:0 0 0 3px #6cc3ff33}
.searchbox input {border:0; flex:1; min-width:0; height:50px; background:transparent; color:var(--text); outline:none; font-size:1rem}
.searchbox input::-webkit-search-cancel-button {display:none}
.searchbox input:focus,.searchbox input:focus-visible {border:0; box-shadow:none; outline:none}  /* the box itself shows focus */
input::placeholder,textarea::placeholder {color:var(--quiet)}
#crumbs {display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-bottom:14px}
.crumb-sep {color:var(--quiet)}
.section-cap {display:flex; align-items:center; gap:12px; margin-bottom:16px; flex-wrap:wrap}
.section-cap h2 {font-size:clamp(1.2rem,2vw,1.5rem)}
#item-count {font-size:.8rem; font-weight:600; color:var(--quiet); padding:2px 10px; border:1px solid var(--line); border-radius:999px}
#item-count:empty {display:none}
.section-cap > :last-child:is(button) {margin-left:auto}

/* Wishes (Overseerr) */
#wish-form {margin-bottom:26px; max-width:760px}
.wish-block {margin-bottom:clamp(24px,3vw,36px)}
.status-dot {position:absolute; z-index:3; top:7px; right:7px; display:grid; place-items:center; width:24px; height:24px; border-radius:50%; color:#fff; background:#475569; box-shadow:0 2px 8px #0009; border:2px solid #0f1115}
.status-dot .ico {width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:3; stroke-linecap:round; stroke-linejoin:round}
.status-dot[data-tone="ok"] {background:#22c55e}
.status-dot[data-tone="teal"] {background:#14b8a6}
.status-dot[data-tone="info"] {background:#3b82f6}
.status-dot[data-tone="warn"] {background:#f59e0b}
.status-dot[data-tone="orange"] {background:#ef4444}
.type-chip {position:absolute; z-index:3; top:8px; left:8px; padding:2px 8px; border-radius:6px; font-size:.68rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#fff; box-shadow:0 2px 8px #0007}
.type-chip.movie {background:#1f6fd0e6}
.type-chip.tv {background:#7c3aede6}
.rail > .card.wish, .rail > .card.wish-mini {width:clamp(128px,10.5vw,175px)}
.discover {display:grid; grid-template-columns:minmax(0,1fr); gap:clamp(18px,2.5vw,30px)}
.discover-title {font-size:1.2rem; color:var(--text)}
.wish-head {display:grid; grid-template-columns:96px minmax(0,1fr); gap:16px; align-items:start; margin-bottom:12px}
.wish-poster {position:relative; display:block; aspect-ratio:2/3; border-radius:10px; overflow:hidden; background:linear-gradient(150deg,#232a3a,#151a25)}
.wish-poster img {position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
.wish-head h2 {font-size:1.3rem}
.wish-overview {color:var(--muted); font-size:.92rem; max-height:9.5em; overflow:auto; margin-bottom:14px}
.wish-overview:empty {display:none}
.wish-seasons-box {border:1px solid var(--line); border-radius:12px; padding:10px 14px 12px; margin:0 0 14px}
.wish-seasons-box legend {padding:0 6px; font-size:.84rem; font-weight:700; color:var(--muted)}
.wish-seasons {display:grid; gap:6px; max-height:34dvh; overflow:auto}
.wish-season {display:flex; align-items:center; gap:10px; margin:0; padding:6px 4px; color:var(--text); font-weight:500; cursor:pointer}
.wish-season input {width:18px; height:18px; margin:0; accent-color:var(--accent); flex:none}
.wish-season input:disabled + span {color:var(--quiet)}
.wish-season .badge {margin-left:auto}
.error a {color:var(--ring)}

/* Latest reports strip (compact, above the library) */
.mini-reports {margin:-6px 0 26px}
.mini-head {display:flex; align-items:center; flex-wrap:wrap; gap:4px 12px; margin-bottom:10px}
.mini-head h2 {font-size:.82rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--quiet)}
.link-btn {white-space:nowrap; background:none; border:0; padding:2px 4px; color:var(--ring); font-size:.84rem; font-weight:600}
.link-btn:hover {text-decoration:underline}
.mini-list {display:flex; gap:10px; overflow-x:auto; scrollbar-width:none; padding:2px}
.mini-list::-webkit-scrollbar {display:none}
.mini {flex:none; display:flex; align-items:center; gap:10px; max-width:min(380px,85vw); min-height:40px; padding:6px 14px 6px 8px; border-radius:999px; border:1px solid var(--line); background:var(--surface); color:var(--text); text-align:left}
.mini:hover {border-color:var(--line-strong); background:var(--raised)}
.mini-kind {display:grid; place-items:center; color:var(--quiet); padding-left:4px}
.mini-kind .ico {width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round}
.mini-wish .mini-kind {color:#fbbf24}
.mini-wish .mini-kind .ico {fill:currentColor}
.mini-title {overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.88rem; font-weight:600}

/* Poster cards */
.shelf {display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,160px),1fr)); gap:22px 16px}
.shelf.wide {grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}
.rails {display:grid; grid-template-columns:minmax(0,1fr); gap:clamp(22px,3vw,34px)}
.rail-block {min-width:0}
.rail-title {font-size:1.05rem; margin-bottom:12px; color:var(--muted)}
.rail {display:flex; gap:16px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; padding:4px 2px 14px; scrollbar-width:thin; scrollbar-color:#3a4256 transparent}
.rail::-webkit-scrollbar {height:8px} .rail::-webkit-scrollbar-thumb {background:#3a4256; border-radius:8px}
.rail > .card {flex:none; scroll-snap-align:start; width:clamp(130px,11vw,180px)}
.rail > .card.episode {width:clamp(220px,18vw,300px)}
.card {display:flex; flex-direction:column; align-items:stretch; text-align:left; min-width:0; padding:0; border:0; background:none; border-radius:var(--radius); color:var(--text)}
.poster {position:relative; display:grid; place-items:center; aspect-ratio:2/3; width:100%; overflow:hidden; border-radius:var(--radius); background:linear-gradient(150deg,#232a3a,#151a25); color:#4b5568; box-shadow:0 6px 18px #0006; outline:1px solid #ffffff12; outline-offset:-1px; transition:transform .2s,box-shadow .2s}
.card.episode .poster {aspect-ratio:16/9}
.poster::before {content:''; width:26px; height:34px; border:2px solid currentColor; border-radius:6px}
.poster img {position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1}
.poster::after {content:''; position:absolute; inset:0; z-index:2; background:linear-gradient(180deg,transparent 55%,#0009); opacity:0; transition:opacity .2s}
.card:hover .poster,.card:focus-visible .poster {transform:translateY(-4px) scale(1.02); box-shadow:0 16px 34px #000a,0 0 0 2px var(--ring)}
.card:hover .poster::after {opacity:1}
.card:focus-visible {outline:none}
.ep-badge {position:absolute; z-index:3; left:10px; bottom:10px; padding:4px 10px; border-radius:999px; background:#0b0d12d9; border:1px solid #ffffff26; color:#fff; font-size:.82rem; font-weight:800; letter-spacing:.02em; backdrop-filter:blur(6px)}
.meta {display:grid; gap:2px; padding:10px 4px 0; min-width:0}
.meta strong {font-size:.96rem; line-height:1.3}
.meta small {font-size:.83rem; color:var(--muted)}
.kind {font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--quiet)}
.series {font-size:.98rem!important}
.ep-line {font-size:.86rem; font-weight:700; color:var(--ring)}
.empty {grid-column:1/-1; padding:44px 20px; text-align:center; background:var(--surface); border:1px dashed var(--line-strong); border-radius:var(--radius)}
.empty p {margin-top:6px; color:var(--muted)}
.empty button {margin-top:16px}

/* Reports */
#history,.admin-list {display:grid; gap:10px}
.report-row {display:flex; justify-content:space-between; align-items:center; gap:16px; border:1px solid var(--line); background:linear-gradient(180deg,#151a25,#12161f); border-radius:var(--radius); padding:16px 20px; overflow-wrap:anywhere; transition:border-color .15s}
.report-row:hover {border-color:var(--line-strong)}
.report-row strong {display:block; font-size:1rem}
.report-row small {display:block; font-size:.84rem; color:var(--muted); margin-top:4px}
.report-actions {display:flex; flex-wrap:wrap; align-items:center; gap:10px}
.badge {display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:.78rem; font-weight:700; white-space:nowrap; background:#2a3142; color:#d5dae4; border:1px solid #ffffff14}
.badge::before {content:''; width:6px; height:6px; border-radius:50%; background:currentColor}
.badge[data-tone="info"] {background:#1e3a8a55; color:#93c5fd}
.badge[data-tone="warn"] {background:#78350f66; color:#fcd34d}
.badge[data-tone="violet"] {background:#4c1d9566; color:#c4b5fd}
.badge[data-tone="cyan"] {background:#164e6366; color:#67e8f9}
.badge[data-tone="orange"] {background:#7c2d1266; color:#fdba74}
.badge[data-tone="ok"] {background:#14532d66; color:#86efac}
.badge[data-tone="teal"] {background:#134e4a66; color:#5eead4}
.badge[data-tone="muted"] {background:#1f2430; color:var(--quiet)}

/* Footer + toast */
.footer {border-top:1px solid #ffffff0d; color:var(--quiet); font-size:.84rem}
.footer-inner {display:flex; justify-content:space-between; gap:12px; padding:18px 0}
.footer-inner>span:first-child {font-weight:700; color:var(--muted)}
.notice {position:fixed; bottom:20px; left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 24px); padding:12px 18px; border:1px solid #ffffff1f; border-radius:12px; background:#1b2130f2; color:var(--text); box-shadow:var(--shadow); z-index:40; pointer-events:none; backdrop-filter:blur(10px)}

/* Dialogs */
dialog {width:min(540px,calc(100% - 24px)); max-height:calc(100dvh - 24px); padding:clamp(18px,4vw,28px); overflow:auto; overscroll-behavior:contain; border:1px solid #ffffff1a; border-radius:var(--radius-lg); color:var(--text); background:linear-gradient(180deg,#171c28,#11151e); box-shadow:0 30px 90px #000c}
dialog::backdrop {background:#05070acc; backdrop-filter:blur(6px)}
body:has(dialog[open]) {overflow:hidden}
.modal-top {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px}
.modal-top .eyebrow,.modal-top .kicker {margin:0}
.modal-item {display:grid; gap:2px; padding:14px 16px; margin-bottom:18px; border-radius:12px; background:var(--accent-soft); border:1px solid #3fa9f533}
.modal-item strong {font-size:1.1rem}
.modal-item small {color:var(--muted)}
.season-toggle {display:flex; align-items:flex-start; gap:12px; margin:-6px 0 18px; padding:10px 14px; border:1px solid var(--line); border-radius:12px; background:var(--field); cursor:pointer; color:var(--text)}
.season-toggle input {width:18px; height:18px; margin:2px 0 0; accent-color:var(--accent); flex:none}
.season-toggle span {display:grid; gap:2px}
.season-toggle strong {font-size:.92rem}
.season-toggle small {font-size:.82rem; font-weight:400; color:var(--muted)}
.season-toggle:has(input:checked) {border-color:#3fa9f566; background:var(--accent-soft)}
.modal-meta {display:flex; align-items:center; flex-wrap:wrap; gap:8px; color:var(--muted); margin:6px 0 16px; font-size:.9rem}
select,textarea {width:100%; padding:11px 12px; margin-bottom:16px}
select:focus,textarea:focus,input:focus {outline:none; border-color:var(--ring); box-shadow:0 0 0 3px #6cc3ff33}
textarea {resize:vertical; display:block}
#required-note {font-weight:400; color:var(--quiet)}
.modal-actions {justify-content:flex-end; margin-top:4px}
.field-hint {font-size:.86rem; color:var(--muted); margin:-8px 0 16px}
.error {color:#fca5a5; font-size:.9rem}
.error:not(:empty) {margin:10px 0}
#thread-log,.admin-log {display:grid; gap:10px; margin-bottom:16px; max-height:42dvh; overflow:auto; overscroll-behavior:contain}
.thread-line {border-radius:14px; background:var(--raised); border:1px solid var(--line); padding:10px 14px; max-width:92%}
.thread-line.mine {justify-self:end; background:#3fa9f526; border-color:#3fa9f540}
.thread-line small {font-weight:700; font-size:.78rem; color:var(--quiet)}
.thread-line p {white-space:pre-wrap; margin-top:3px}
#withdraw {margin-top:12px}

/* Admin */
.page-head {padding:clamp(28px,4.5vw,56px) 0 clamp(18px,3vw,28px)}
.kicker {display:inline-flex; align-items:center; gap:8px; font-size:.76rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--ring); margin-bottom:12px}
.intro h1 {font-size:clamp(1.9rem,3.6vw,2.9rem)}
.admin-header {display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.admin-header label {margin:0}
.admin-filter {width:auto; margin:0; min-height:40px; padding:6px 12px}
.admin-log p,.admin-message {white-space:pre-wrap; overflow-wrap:anywhere}
.admin-pager {margin-top:18px}
.review-actions {display:flex; gap:10px; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:16px; margin-top:16px}
#review-note:not(:empty),#notice:not(.notice):not(:empty) {margin:12px 0; color:var(--muted)}
.panel {min-width:0; background:linear-gradient(180deg,#151a25,#12161f); border:1px solid var(--line); border-radius:var(--radius)}

@media(max-width:1000px) {
  .hero-inner,.desk-hero-inner {grid-template-columns:1fr}
  .steps {grid-template-columns:1fr}
}
@media(max-width:640px) {
  .mast-inner {flex-wrap:wrap; gap:8px 12px; padding-block:10px}
  .mast-inner:has(nav:not([hidden])) nav {order:3; width:100%; overflow-x:auto; flex-wrap:nowrap}
  .mast-label {display:none}
  .shelf {grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 12px}
  .shelf.wide {grid-template-columns:1fr}
  .rail > .card {width:42vw}
  .rail > .card.episode {width:78vw}
  .report-row {align-items:flex-start; flex-direction:column; padding:14px}
  .report-actions {justify-content:space-between; width:100%}
}
@media(prefers-reduced-motion:reduce) {*,*::after {transition:none!important} .card:hover .poster {transform:none}}

/* Nav icons + short labels (icons shown on phones) */
.nav-icon {display:none; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.nav-short {display:none}
@media(max-width:640px) {
  /* App-style tab bar at the bottom, reachable with the thumb */
  .mast {backdrop-filter:none; -webkit-backdrop-filter:none; background:#0f1115f5}  /* a filter would trap the fixed bar inside the header */
  .mast-inner:has(nav:not([hidden])) nav {position:fixed; left:0; right:0; bottom:0; z-index:25; order:0; width:auto; display:flex; flex-wrap:nowrap; gap:0;
    padding:6px 6px calc(6px + env(safe-area-inset-bottom)); background:#0f1115f2; border-top:1px solid #ffffff14; backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); overflow:visible}
  nav button,nav .nav-link {flex:1 1 0; min-width:0; flex-direction:column; gap:3px; padding:6px 2px; min-height:54px; border-radius:12px; font-size:.72rem; justify-content:center}
  nav button[hidden],nav .nav-link[hidden] {display:none}
  .nav-icon {display:block}
  .nav-long {display:none}
  .nav-short {display:inline}
  nav button[aria-current],nav .nav-link[aria-current] {background:#ffffff10; color:var(--ring)}
  body:has(nav:not([hidden])) main {padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  body:has(nav:not([hidden])) .footer {padding-bottom:calc(70px + env(safe-area-inset-bottom))}
  body:has(nav:not([hidden])) .notice {bottom:calc(84px + env(safe-area-inset-bottom))}
  .mini-head h2 {flex-basis:100%}
  .mast-inner {flex-wrap:nowrap; min-height:56px; padding-block:8px}
  .wordmark-img {height:18px}
  .mast-tools {gap:6px}
  #logout {padding:6px 10px; min-height:36px; font-size:.85rem}
  .lang-switch button {padding:3px 8px}
  .desk-hero h1 {font-size:1.8rem}
}
