/* Fraunces (SIL Open Font License, fonts/OFL.txt): titles and headings. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/fraunces-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #07060a;
  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .09);
  --surface-solid: #14121a;
  --glass: rgba(22, 20, 29, .62);
  --text: #f7f4ee;
  --muted: #a29dae;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --accent: #ffb547;
  --accent-2: #ff8a3d;
  --accent-ink: #1d1407;
  --love: #ff5c8a;
  --like: #4ade80;
  --meh: #b8b2c6;
  --nope: #ff5d5d;
  --seen: #6aa9ff;
  --display: "Fraunces", ui-serif, "New York", Georgia, serif;
  --serif: var(--display);
  --top: calc(env(safe-area-inset-top) + 58px);
  --tabbar: calc(60px + env(safe-area-inset-bottom));
  --actions: 96px;
  --gutter: max(16px, calc(50vw - 294px));   /* side margin of the centred 620px column */
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* The page itself never scrolls. In Safari a scrolling page grows and shrinks the
   browser's own toolbar, which drags the tab bar up and down with it; long tabs
   scroll inside their view instead (.view.scroll). */
html, body { margin: 0; height: 100%; overflow: hidden; color: var(--text); }
html { background: var(--bg); }
/* Home Screen app on iOS 26 (WebKit bug 301108): at launch the viewport that fixed
   elements are placed against is short by the status-bar height, so the tab bar sat
   that far above the screen edge until a scroll made iOS re-measure. 100vh is right
   from launch, so #app takes that height and (via transform) becomes the box every
   fixed element inside it is placed in. Not in Safari tabs, where 100vh runs under
   the browser's toolbar. */
@media (display-mode: standalone) {
  html, body { height: 100vh; }
  #app { position: fixed; top: 0; left: 0; right: 0; height: 100vh; transform: translate(0, 0); }
}
/* No zooming: pinch and double-tap zoom knock the full-screen cards out of place.
   Scrolling still works (pan-x pan-y); iOS pinch is also blocked in app.js. */
html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

/* Ambient light: the current film's poster, blurred, glows behind every screen and
   fades to black further down. */
#backdrop {
  position: fixed; inset: -80px; z-index: -1; pointer-events: none;
  background: var(--bd, radial-gradient(60% 50% at 30% 10%, #2b2140, transparent)) center / cover no-repeat;
  filter: blur(32px) saturate(1.6) brightness(.75); opacity: .6; transition: background .5s ease;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 6, 10, .1) 0%, rgba(7, 6, 10, .55) 38%, var(--bg) 78%);
}

/* Loading: a film leader. Its ring fills as the films load, a sweep turns inside it
   like a countdown, and a projector's light falls from above. */
.loading {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 0;
  padding: 24px; text-align: center; background: var(--bg); transition: opacity .45s ease, transform .45s ease;
}
.loading::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% -8%, rgba(255, 190, 110, .28), transparent 70%),
    radial-gradient(40% 30% at 50% 42%, rgba(255, 170, 70, .10), transparent 70%);
}
.loading.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
.leader { position: relative; width: 168px; height: 168px; margin-bottom: 26px; }
.leader svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lr-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 3; }
.lr-fill { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100;
  transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .5s var(--ease); filter: drop-shadow(0 0 6px rgba(255, 181, 71, .6)); }
.lr-inner { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1.5; }
.lr-cross { stroke: rgba(255, 255, 255, .1); stroke-width: 1.5; }
.leader-sweep {
  position: absolute; inset: 18.5%; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 181, 71, .32), rgba(255, 181, 71, 0) 28%, transparent);
  animation: sweep 1.4s linear infinite;
}
.leader-k { position: absolute; inset: 0; display: grid; place-items: center; font: 700 52px/1 var(--display); color: var(--text); letter-spacing: -0.02em; }
.loading-word { margin: 0; font: 750 54px/1 var(--display); letter-spacing: -0.035em; }
.loading-word span { color: var(--accent); }
.loading .tagline { margin: 12px 0 0; color: #d8d3de; font: italic 450 17px/1.3 var(--display); }
.loading-status { margin: 26px 0 0; min-height: 20px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
@keyframes sweep { to { transform: rotate(1turn); } }

/* Full-screen views */
.view { position: fixed; inset: 0; animation: fade .25s ease; }
.view.scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gutter) calc(var(--tabbar) + 28px); }
.head {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 calc(-1 * var(--gutter)) 12px; padding: calc(env(safe-area-inset-top) + 10px) var(--gutter) 10px;
  border-bottom: 1px solid transparent; transition: background .2s ease, border-color .2s ease;
}
.scrolled > .head { background: rgba(10, 9, 14, .74); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border-bottom-color: var(--line); }
.head h1 { margin: 0; font: 700 30px/1.1 var(--display); letter-spacing: -0.025em; }
.head-actions, .head-left { display: flex; align-items: center; gap: 8px; }
.head-left { gap: 12px; }
.topbar {
  position: fixed; z-index: 5; top: 0; left: 0; right: 0; height: var(--top);
  padding: calc(env(safe-area-inset-top) + 10px) 12px 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topbar-right { display: flex; gap: 8px; }
.glassy { background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.pill {
  padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.pill b { color: var(--accent); }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line); font-size: 14px; font-weight: 650;
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
.pill-btn svg { width: 17px; height: 17px; }
@media (max-width: 359px) { #to-wall { font-size: 0; gap: 0; } }   /* just the icon on the smallest phones */
.pill-btn.wide { width: 100%; justify-content: center; padding: 12px; }
.icon-round { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); flex: none; }
.icon-round svg { width: 21px; height: 21px; }
.dot-badge { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.seg { display: flex; min-width: 0; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 3px; -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--muted); white-space: nowrap; transition: background .2s ease, color .2s ease; }
.seg button[aria-selected="true"] { background: var(--text); color: var(--bg); }

/* Buttons */
.primary {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 16px; text-align: center;
  background: linear-gradient(180deg, #ffc76b, var(--accent) 55%, #f59e2b); color: var(--accent-ink); font-weight: 750;
  box-shadow: 0 10px 28px rgba(255, 160, 50, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.primary.wide, .btn.wide { width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 17px; border-radius: 14px; font-weight: 700; font-size: 15px; transition: transform .1s ease; }
.btn:active, .primary:active, .stile:active, .tonight:active { transform: scale(.97); }
.btn svg { width: 17px; height: 17px; }
.btn.light { background: #fff; color: #0b0a0e; }
.btn.glass { background: rgba(255, 255, 255, .14); color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .12); }
.btn.round { width: 44px; padding: 11px 0; }
.btn.small { padding: 8px 12px; font-size: 13.5px; border-radius: 12px; }
.btn.small svg { width: 15px; height: 15px; }
.danger { color: var(--nope); padding: 12px 6px; font-weight: 650; }
.cancel { width: 100%; margin-top: 10px; padding: 12px; color: var(--muted); font-weight: 600; }

.kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }

/* Swipe stage and full-screen film card */
.stage { position: fixed; top: var(--top); bottom: calc(var(--tabbar) + var(--actions)); left: 10px; right: 10px; max-width: 520px; margin: 0 auto; }
/* Rate cards: the next one waits, unseen, right behind the front one (.under), or on
   top (.hold) until its poster is ready; answering fades the front one out. */
.fcard {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .06); cursor: pointer;
  transition: opacity .22s ease, transform .22s ease;
}
.fcard.under { visibility: hidden; pointer-events: none; }
.fcard.hold { opacity: 0; pointer-events: none; }
.fcard.leaving { opacity: 0; transform: scale(.97); pointer-events: none; }
.fcard.gone { pointer-events: none; }
.fcard .finfo { opacity: 0; transition: opacity .24s ease .16s; }
.fcard.front .finfo { opacity: 1; }
.fcard .poster, .hero .poster { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.shade { position: absolute; inset: 32% 0 0; background: linear-gradient(to top, rgba(5, 4, 8, .97), rgba(5, 4, 8, .72) 45%, transparent); pointer-events: none; }
.finfo { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; z-index: 2; }
.finfo h2, .hero h2 { margin: 0; font: 700 clamp(28px, 8vw, 38px)/1.02 var(--display); letter-spacing: -0.02em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.fsub { margin: 7px 0 0; color: rgba(255, 255, 255, .8); font-size: 14px; }
.fwhy { margin: 9px 0 0; color: rgba(255, 255, 255, .82); font-size: 13.5px; line-height: 1.38; }
.fwhy b { color: #fff; font-weight: 650; }
.ftop, .hero-top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.ftop .left, .hero-top .left { display: flex; gap: 6px; flex-wrap: wrap; }

.match {
  display: inline-flex; flex-direction: column; align-items: center; padding: 8px 12px 7px; border-radius: 18px;
  background: rgba(8, 7, 11, .58); border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; line-height: 1;
}
.match strong { font: 800 22px/1 -apple-system, system-ui, sans-serif; color: var(--mc, var(--like)); letter-spacing: -0.02em; }
.match small { font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin-top: 3px; }
.match.inline { flex-direction: row; gap: 5px; padding: 5px 9px; border-radius: 999px; }
.match.inline strong { font-size: 13.5px; }
.match.inline small { margin: 0; }
.match.inline small:empty { display: none; }

.badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 5px 8px; border-radius: 8px; background: rgba(8, 7, 11, .6); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.badge.new { background: var(--accent); color: var(--accent-ink); }

.logos { display: flex; align-items: center; gap: 5px; }
.logos img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.logos .more, .logos .note { font-size: 12.5px; color: rgba(255, 255, 255, .78); font-weight: 600; }
.logos .mine { outline: 2px solid var(--like); outline-offset: 1px; }

/* Poster: only the image. It's invisible until it has downloaded and decoded, then
   fades in; there's never a stand-in. */
.poster {
  position: relative; overflow: hidden; aspect-ratio: 2 / 3; border-radius: 12px; flex: none;
  transition: opacity .28s ease;
}
.poster.pending, .poster.noimg { opacity: 0; }
.fcard .poster, .hero .poster { transition: none; }   /* the whole card fades instead */
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* What sits on a poster (or under it, in a row) waits for it too. */
.stile > .poster ~ *, .gtile > .poster + .gmatch, .wall .tile > .poster ~ .t { transition: opacity .28s ease; }
.stile > .poster.pending ~ *, .gtile > .poster.pending + .gmatch, .wall .tile > .poster.pending ~ .t { opacity: 0; }

/* Action buttons under the card */
.actions {
  position: fixed; left: 0; right: 0; bottom: var(--tabbar); height: var(--actions); z-index: 4;
  display: flex; align-items: center; justify-content: center; gap: 14px; padding-bottom: 4px;
}
.act { display: grid; justify-items: center; gap: 5px; font-size: 11px; font-weight: 650; color: var(--muted); }
.act svg {
  width: 62px; height: 62px; padding: 17px; border-radius: 50%; background: var(--glass); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45); stroke-width: 2.4; transition: transform .12s ease;
}
.act:active svg { transform: scale(.88); }
.act.small svg { width: 48px; height: 48px; padding: 13px; }
.actions.five { gap: 2px; left: 10px; right: 10px; max-width: 440px; margin: 0 auto; justify-content: space-between; bottom: calc(var(--tabbar) + 10px); height: auto; padding: 8px 6px 6px;
  border-radius: 30px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.actions.five .act { flex: 1; min-width: 0; font-size: 10.5px; white-space: nowrap; }
.actions.five .act svg { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; width: 46px; height: 46px; padding: 11px; }
.actions.five .act.nope svg, .actions.five .act.like svg, .actions.five .act.love svg { background: rgba(255, 255, 255, .07); }
.act.nope svg { color: var(--nope); }
.act.meh svg { color: var(--meh); }
.act.like svg { color: var(--like); }
.act.love svg { color: var(--love); fill: color-mix(in srgb, var(--love) 25%, transparent); }
.act.seen svg { color: var(--seen); }
.act.save svg { color: var(--accent); }

/* Poster wall */
.wall { position: fixed; top: var(--top); bottom: calc(var(--tabbar) + 76px); left: 0; right: 0; overflow-y: auto; padding: 4px 12px 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; align-content: start; max-width: 560px; margin: 0 auto; }
.wall .tile { position: relative; border-radius: 12px; overflow: hidden; transition: transform .12s ease; }
.wall .tile:active { transform: scale(.96); }
.wall .tile .poster { width: 100%; border-radius: 12px; }
.wall .tile::after { content: ""; position: absolute; inset: 0; border-radius: 12px; border: 3px solid transparent; transition: border-color .12s ease; }
.wall .tile.sel::after { border-color: var(--accent); }
.wall .tile .check { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); opacity: 0; transform: scale(.6); transition: .15s ease; z-index: 2; }
.wall .tile .check svg { width: 16px; height: 16px; stroke-width: 3; }
.wall .tile.sel .check { opacity: 1; transform: scale(1); }
.wall .tile .t { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 7px 6px; font-size: 11.5px; font-weight: 650; line-height: 1.2; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.wall-bar { position: fixed; left: 0; right: 0; bottom: var(--tabbar); height: 76px; display: flex; gap: 10px; align-items: center; padding: 0 14px; max-width: 560px; margin: 0 auto; }
.wall-bar .pill-btn { flex: 1; justify-content: center; padding: 14px; }
.wall-bar .primary { flex: 1.3; }

/* Home */
.wordmark { font: 750 30px/1 var(--display); letter-spacing: -0.03em; }
.wordmark::after { content: "."; color: var(--accent); }
.hero {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 54vh; border-radius: 28px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .06);
  cursor: pointer; transition: transform .15s ease, opacity .35s ease;
}
.hero:has(> .poster.pending) { opacity: 0; }   /* shown once its poster is */
.hero:has(> .poster.noimg) { display: none; }
.hero-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px; }
.hero .kicker { margin-bottom: 8px; }
.hero-actions { display: flex; gap: 10px; margin-top: 15px; }
.tonight {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 16px; padding: 14px 16px; border-radius: 22px; text-align: left;
  background: linear-gradient(120deg, rgba(255, 181, 71, .2), rgba(255, 138, 61, .07) 60%, rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 181, 71, .28); transition: transform .12s ease;
}
.tonight .ic { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(160deg, #ffc76b, var(--accent-2)); color: var(--accent-ink); box-shadow: 0 8px 22px rgba(255, 150, 50, .3); }
.tonight .ic svg { width: 23px; height: 23px; fill: currentColor; stroke: none; }
.tonight .tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tonight b { font: 650 18px/1.2 var(--display); }
.tonight .tx span { color: var(--muted); font-size: 13.5px; }
.tonight > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
/* Shelves off screen aren't laid out or painted until you scroll near them. */
.shelf { margin-top: 28px; content-visibility: auto; contain-intrinsic-size: auto 262px; }
.shelf-head { margin: 0 2px 11px; }
.shelf-head h2 { margin: 0; font: 650 22px/1.15 var(--display); letter-spacing: -0.01em; }
.shelf-head p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.because { display: flex; align-items: center; gap: 11px; }
.because .poster { width: 34px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.because small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.shelf-row {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; scroll-padding: 0 var(--gutter);
}
.shelf-row::-webkit-scrollbar { display: none; }
.stile { position: relative; flex: none; width: 118px; scroll-snap-align: start; text-align: left; transition: transform .12s ease; }
.stile .poster { width: 100%; border-radius: 14px; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
.stile .tm { position: absolute; top: 7px; right: 7px; z-index: 2; }
.stile .tm .match, .gtile .gmatch .match, .row-end .match { padding: 4px 7px; background: rgba(8, 7, 11, .8); -webkit-backdrop-filter: none; backdrop-filter: none; }
.stile .tm .match strong { font-size: 12.5px; }
.stile .tt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 9px; font-size: 13.5px; font-weight: 650; line-height: 1.25; }
.stile .ts { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.more-picks { margin-top: 30px; }
.welcome { margin-top: 8px; padding: 26px 20px 20px; border-radius: 28px; background: linear-gradient(160deg, rgba(255, 181, 71, .16), rgba(255, 255, 255, .03) 55%); border: 1px solid var(--line); }
.welcome h2 { margin: 8px 0 8px; font: 700 32px/1.05 var(--display); letter-spacing: -0.02em; }
.welcome p { margin: 0 0 18px; color: var(--muted); }

/* Library */
.lib-seg { display: flex; width: 100%; margin: 0 0 16px; }
.lib-seg button { flex: 1; }

/* Browse (Search with nothing typed) */
.browse-h { margin: 6px 2px 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.browse-h ~ .browse-h { margin-top: 24px; }
.genre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gen {
  position: relative; overflow: hidden; height: 78px; border-radius: 16px; text-align: left; isolation: isolate;
  background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .12s ease;
}
.gen:active { transform: scale(.97); }
.gen img { position: absolute; right: -8%; top: -30%; width: 62%; transform: rotate(8deg); border-radius: 8px; opacity: .85; z-index: -1; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }
.gen::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 6, 10, .8) 30%, rgba(7, 6, 10, .1)); }
.gen span { position: absolute; left: 14px; bottom: 12px; font: 650 18px/1.1 var(--display); }
.browse-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 8px; }
.browse-head h2 { margin: 0; font: 650 24px/1.15 var(--display); letter-spacing: -0.015em; }

/* You */
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: 14px; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.link-row b { display: block; font: 650 18px/1.2 var(--display); }
.link-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.link-row svg { width: 20px; height: 20px; color: var(--muted); flex: none; }

/* Tonight sheet */
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.opt { padding: 9px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; transition: background .15s ease, color .15s ease; }
.opt[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.sorts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -4px calc(-1 * var(--gutter)) 14px; padding: 0 var(--gutter); }
.sorts::-webkit-scrollbar { display: none; }
.sorts .opt { flex: none; }
.opt-h { margin: 16px 0 9px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sheet-card .switch { margin-top: 14px; }
.sheet-card .primary.wide { margin-top: 16px; }
.tn-list { display: grid; gap: 12px; }
.tn { display: flex; gap: 13px; padding: 11px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); animation: rise .35s var(--ease) both; }
.tn:nth-child(2) { animation-delay: .06s; }
.tn:nth-child(3) { animation-delay: .12s; }
.tn-poster { flex: none; width: 92px; align-self: flex-start; }
.tn-poster .poster { width: 100%; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
.tn-main { min-width: 0; flex: 1; }
.tn-title { display: block; text-align: left; font: 700 19px/1.12 var(--display); letter-spacing: -0.01em; }
.tn-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.tn-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tn-row .logos img { width: 22px; height: 22px; }
.tn-why { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.tn-why b { color: var(--text); font-weight: 650; }
.tn-actions { display: flex; gap: 8px; margin-top: 10px; }
.tn-foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 16px; }

/* Film page: a full-screen page over everything but sheets */
.film { position: fixed; inset: 0; z-index: 20; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); animation: page-in .38s var(--ease); }
.film-hero { position: relative; height: min(58vw, 340px); overflow: hidden; }
.film-hero .film-blur { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(34px) saturate(1.4) brightness(.7); opacity: 0; transition: opacity .4s ease; }
.film-hero .film-blur.in { opacity: 1; }
.film-hero .film-bd { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.film-hero .film-bd.in { opacity: 1; }
.film-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 10, .35), transparent 30%, rgba(7, 6, 10, .55) 70%, var(--bg)); }
.film-hero.playing { height: auto; aspect-ratio: 16 / 9; background: #000; }
.film-hero.playing iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-close, .film-share { position: fixed; z-index: 3; top: calc(env(safe-area-inset-top) + 10px); }
.film-close { left: 12px; }
.film-share { right: 12px; }
.film-share svg { width: 19px; height: 19px; }
.film-body { position: relative; padding: 0 var(--gutter) calc(env(safe-area-inset-bottom) + 34px); }
.film-head { display: flex; gap: 16px; align-items: flex-end; margin-top: -78px; }
.film-hero.playing + .film-close + .film-share + .film-body .film-head { margin-top: 16px; }
.film-head > .poster { width: 116px; border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.film-titles { min-width: 0; flex: 1; padding-bottom: 2px; }
.film-badges:empty { display: none; }
.film-badges { display: flex; gap: 6px; margin-bottom: 8px; }
.film-titles h1 { margin: 0; font: 700 clamp(26px, 7.4vw, 34px)/1.03 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.film-meta { margin-top: 7px; color: var(--muted); font-size: 14px; }
.film-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.film-genres span { padding: 4px 9px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 650; color: #d9d5e0; }
.film-match { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.film-match .fwhy { margin: 0; color: var(--muted); }
.film-match .fwhy b { color: var(--text); }
.your-rating { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: color-mix(in srgb, var(--rc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); font-weight: 700; font-size: 14.5px; }
.your-rating .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); }
.your-rating svg { width: 15px; height: 15px; margin-left: 2px; opacity: .65; }
.film-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 18px; }
.fa { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 650; color: #e4e0ea; transition: transform .1s ease, background .15s ease; }
.fa:active { transform: scale(.95); }
.fa svg { width: 22px; height: 22px; }
.fa span { white-space: nowrap; }
.fa[data-f="trailer"] { background: #fff; color: #0b0a0e; border-color: #fff; }
.fa.on { color: var(--accent); border-color: rgba(255, 181, 71, .4); background: rgba(255, 181, 71, .1); }
.fa.on svg { fill: currentColor; }
.film-sec { margin-top: 26px; }
.film-sec h4 { margin: 0 0 11px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.film-sec .where { margin: 0; }
.tagline { margin: 0 0 8px; font: italic 500 18px/1.35 var(--display); color: #ece7df; }
.overview { margin: 0; color: #cfcad6; font-size: 15.5px; line-height: 1.55; }
.skel { height: 14px; border-radius: 7px; margin-bottom: 9px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel.short { width: 60%; }
.people-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; }
.people-row::-webkit-scrollbar { display: none; }
.person { flex: none; width: 76px; text-align: center; }
.person img, .person .initials { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 7px; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.person .initials { font: 700 21px/1 var(--display); color: var(--accent); background: rgba(255, 181, 71, .12); }
.person b { display: block; font-size: 12.5px; line-height: 1.2; }
.person small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-links { margin-top: 28px; display: flex; gap: 16px; }
.film-links a { color: var(--accent); font-weight: 650; font-size: 14.5px; text-decoration: none; }
@keyframes page-in { from { transform: translateY(8%); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Pages */
.section { font: 650 22px/1.15 var(--display); margin: 30px 2px 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .primary { margin-top: 16px; }
.fine { color: var(--muted); font-size: 12px; margin-top: 22px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
.gtile { position: relative; text-align: left; transition: transform .12s ease; }
.gtile:active { transform: scale(.97); }
.gtile .poster { width: 100%; border-radius: 16px; box-shadow: 0 14px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .05); }
.gtile .gmatch { position: absolute; top: 8px; right: 8px; z-index: 2; }
.gtile .gt { margin-top: 9px; font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.gtile .gs { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.gtile .logos { margin-top: 6px; }
.gtile .logos img { width: 22px; height: 22px; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; gap: 13px; align-items: center; padding: 9px 2px; cursor: pointer; }
.row + .row { border-top: 1px solid var(--line); }
.row:active:not(:has(.rate-pick:active)) { opacity: .7; }
.row .poster { width: 46px; border-radius: 8px; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 650; font-size: 15.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; align-items: center; gap: 8px; flex: none; }
/* Your rating in Ratings: the four choices, the one you gave lit up in its colour. */
.rate-pick { display: flex; gap: 6px; margin-top: 8px; }
.rate-pick button {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; min-width: 32px; padding: 0 7px; border-radius: 999px;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 750;
  transition: background .15s ease, color .15s ease;
}
.rate-pick svg { width: 16px; height: 16px; stroke-width: 2.2; flex: none; }
.rate-pick span { display: none; }
.rate-pick button[aria-pressed="true"] { padding: 0 11px 0 8px; color: var(--rc); background: color-mix(in srgb, var(--rc) 16%, transparent); border-color: color-mix(in srgb, var(--rc) 45%, transparent); }
.rate-pick button[aria-pressed="true"] span { display: inline; }
.rate-pick button[data-set="loved"][aria-pressed="true"] svg { fill: color-mix(in srgb, var(--love) 30%, transparent); }
.rate-pick button:active { transform: scale(.92); }
.row-end .match.inline { padding: 4px 8px; }
.row-end .match.inline strong { font-size: 13px; }
.rtag { display: inline-flex; align-items: center; gap: 1px; padding: 5px 7px 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 750; color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); }
.rtag svg { width: 14px; height: 14px; stroke-width: 2.4; }
.saved-mark { color: var(--accent); display: grid; }
.saved-mark svg { width: 17px; height: 17px; fill: currentColor; }
.rows .empty { border: 0; }

input[type="search"] {
  width: 100%; font: inherit; font-size: 17px; color: var(--text); margin-bottom: 18px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a29dae' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20 20'/%3E%3C/svg%3E") no-repeat 15px center;
  border: 1px solid var(--line-2); border-radius: 16px; padding: 14px 15px 14px 44px; -webkit-appearance: none; appearance: none;
}
input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.stat strong { display: block; font: 700 28px/1.05 var(--display); letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 12.5px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px; margin-top: 14px; }
.panel h3 { margin: 0 0 6px; font: 650 22px/1.2 var(--display); letter-spacing: -0.01em; }
.panel > p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.import-result { margin: 12px 0 0 !important; color: var(--text) !important; }
details { margin-top: 12px; }
summary { color: var(--accent); font-weight: 650; font-size: 14.5px; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.me-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* Taste scales */
.scale { margin-top: 18px; }
.scale-labels { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 650; }
.scale-track { position: relative; height: 10px; margin: 9px 0 8px; border-radius: 10px; background: linear-gradient(90deg, #6aa9ff66, #ffffff22 50%, #ffb54766); }
.scale-band { position: absolute; top: -3px; bottom: -3px; border-radius: 10px; background: rgba(255, 255, 255, .16); }
.scale-dot { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px rgba(255, 181, 71, .35), 0 2px 10px rgba(0, 0, 0, .5); transition: left .5s ease; }
.scale-films { display: flex; justify-content: space-between; }
.scale-films > div { display: flex; gap: 4px; }
.scale-films .poster { width: 30px; border-radius: 5px; }

/* You: film life, diary, taste card */
.muted { color: var(--muted); margin: 4px 0 0; }
.life-h { margin: 20px 0 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.life-h:first-child { margin-top: 8px; }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bar-row .bl { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bt { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar-row .bf { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.bar-row .bv { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.life-cap { margin: -2px 0 10px; color: var(--muted); font-size: 14px; min-height: 20px; }
.life-cap b { color: var(--text); }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 4px; }
.col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 6px; }
.col .cf { display: block; border-radius: 4px 4px 0 0; background: #6f697c; transition: background .15s ease; }
.col.fav .cf { background: var(--accent); }
.col .cl { font-size: 11px; font-weight: 650; color: var(--muted); text-align: center; white-space: nowrap; }
.col.fav .cl { color: var(--text); }
.dirs { display: grid; gap: 10px; }
.dir { display: flex; align-items: center; gap: 12px; }
.dir-films { display: flex; flex: none; }
.dir-films .poster { width: 30px; border-radius: 5px; box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
.dir-films .poster + .poster { margin-left: -12px; }
.dir b { display: block; font-size: 15px; }
.dir span { color: var(--muted); font-size: 12.5px; }
.fav-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px 4px; }
.fav-row::-webkit-scrollbar { display: none; }
.fav-tile { flex: none; width: 92px; text-align: left; }
.fav-tile .poster { width: 100%; border-radius: 10px; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
.fav-tile span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 12px; font-weight: 650; line-height: 1.2; }
.month { margin: 16px 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.month:first-child { margin-top: 2px; }
.entry { display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry .day { width: 26px; flex: none; text-align: center; font: 700 20px/1 var(--display); color: var(--muted); }
.entry .poster { width: 34px; border-radius: 5px; }
.entry-main { flex: 1; min-width: 0; }
.entry-main b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-main span { color: var(--muted); font-size: 12.5px; }
.entry-main i { font-style: normal; font-weight: 650; }
.entry-x { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.entry-x svg { width: 15px; height: 15px; }
#more-diary { margin-top: 12px; }
.date-in { width: 100%; margin-top: 10px; font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color-scheme: dark; }
.card-img { display: block; width: 100%; max-width: 360px; margin: 0 auto 16px; border-radius: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.card-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.card-actions .btn, .card-actions .primary { padding: 14px; text-decoration: none; }
.card-actions svg { width: 18px; height: 18px; fill: currentColor; }
.card-tip { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.card-img { -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }

.backup-actions { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.backup-actions .file-btn { padding: 14px; }
.backup-note { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }
.backup-note:empty { display: none; }

.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.svc { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 16px; background: var(--surface-2); border: 2px solid transparent; font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.2; color: var(--muted); transition: border-color .15s ease, color .15s ease; }
.svc img { width: 38px; height: 38px; border-radius: 10px; }
.svc[aria-pressed="true"] { border-color: var(--like); color: var(--text); }
.friend { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); }
.friend b { font-size: 15px; }
.friend span { color: var(--muted); font-size: 13px; }
.friend .pill-btn { white-space: nowrap; }

/* Sheets */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .2s ease; }
.sheet-card {
  position: relative; width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; margin: 0 auto;
  background: rgba(20, 18, 27, .94); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  border-radius: 30px 30px 0 0; padding: 24px 18px calc(18px + env(safe-area-inset-bottom));
  animation: rise .32s var(--ease); border-top: 1px solid var(--line-2);
}
.sheet-card::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 5px; background: rgba(255, 255, 255, .2); }
.sheet-card h3 { margin: 4px 0 4px; font: 700 26px/1.15 var(--display); letter-spacing: -0.015em; }
.sheet-card .sub { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.sheet-close svg { width: 16px; height: 16px; }
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rate-grid button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 650; }
.rate-grid .dot { width: 10px; height: 10px; border-radius: 50%; }
.rate-grid button.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 75%, transparent); }
.cancel.remove { margin-top: 16px; color: var(--nope); }
.detail-head { display: flex; gap: 15px; align-items: flex-end; margin-bottom: 16px; }
.detail-head .poster { width: 108px; border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); }
.detail-head h3 { margin: 0 0 5px; }
.detail-meta { color: var(--muted); font-size: 13.5px; }
.detail-why { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.detail-why b { color: var(--text); }
.where { margin: 0 0 16px; }
.where h4 { margin: 0 0 9px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.where .prov { display: flex; flex-wrap: wrap; gap: 8px; }
.where .prov span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 5px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; }
.where .prov img { width: 26px; height: 26px; border-radius: 7px; }
.where .prov .mine { box-shadow: inset 0 0 0 2px var(--like); }
.where p { margin: 0; color: var(--muted); font-size: 13.5px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-actions button, .detail-actions a { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 650; text-decoration: none; font-size: 15px; }
.detail-actions .primary { background: linear-gradient(180deg, #ffc76b, var(--accent) 55%, #f59e2b); color: var(--accent-ink); border: 0; }
.detail-actions svg { width: 17px; height: 17px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 14px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.field select, .field input[type="text"] {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a29dae' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
}
.field input[type="text"] { background-image: none; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; font-weight: 600; }
.switch small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 16px; }
.legend div { display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: 16px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.legend svg { width: 22px; height: 22px; stroke-width: 2.4; flex: none; }
.stack { display: grid; gap: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 14px); transform: translateX(-50%); z-index: 40;
  display: flex; gap: 14px; align-items: center; padding: 12px 17px; border-radius: 16px; max-width: calc(100vw - 32px);
  background: rgba(34, 31, 43, .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--line-2);
  color: #fff; font-size: 14.5px; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); animation: rise .22s ease;
}
.toast button { color: var(--accent); font-weight: 750; flex: none; }
.toast.high { bottom: calc(var(--tabbar) + var(--actions) + 8px); }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: var(--tabbar);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px 4px env(safe-area-inset-bottom);
  background: rgba(10, 9, 14, .72); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-top: 1px solid var(--line);
}
.tabbar button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 650; transition: color .2s ease; }
.tabbar button::before { content: ""; position: absolute; top: 5px; left: 50%; width: 52px; height: 30px; margin-left: -26px; border-radius: 15px; background: rgba(255, 181, 71, .14); opacity: 0; transform: scale(.7); transition: opacity .2s ease, transform .25s var(--ease); }
.tabbar svg { position: relative; width: 24px; height: 24px; stroke-width: 1.7; }
.tabbar span { position: relative; }
.tabbar button[aria-current="page"] { color: var(--text); }
.tabbar button[aria-current="page"]::before { opacity: 1; transform: none; }
.tabbar button[aria-current="page"] svg { color: var(--accent); fill: color-mix(in srgb, var(--accent) 25%, transparent); }
.count { position: absolute; top: 3px; left: calc(50% + 8px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; line-height: 17px; font-weight: 800; }
