:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --bg: #07060a;
  --surface: #121018;
  --surface-2: #1b1824;
  --ink: #f6efe6;
  --ink-soft: #a59cae;
  --accent: #ff5a2e;
  --accent-2: #ffc23d;
  --line: rgba(255, 255, 255, .09);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-text: "Bricolage Grotesque", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[data-hover], .flow-card, .tilt, .shelf-item { cursor: pointer; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--accent); }
::selection { background: var(--accent); color: #000; }


/* ---------- ambient layers ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .07; will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0) } 20% { transform: translate(-5%,3%) } 40% { transform: translate(4%,-6%) } 60% { transform: translate(-3%,5%) } 80% { transform: translate(6%,2%) } }

main { position: relative; z-index: 2; }


/* ---------- loader: kernels -> popcorn ---------- */
.loader {
  position: fixed; inset: 0; z-index: 300; display: grid; place-content: center; justify-items: center; gap: 6px;
  background: radial-gradient(circle at 50% 42%, #2a1a10, #050405 68%);
}
.ld-svg { width: min(52vw, 230px); overflow: visible; }
.ld-box { transform-box: fill-box; transform-origin: 50% 100%; }
.ld-corn { fill: #f2a531; stroke: #a85f0c; stroke-width: 1; }
.ld-puff { fill: #fff4dc; stroke: #f0b44c; stroke-width: 1.2; }
.ld-name { margin-top: 18px; font: 800 clamp(28px, 6vw, 40px)/1 var(--font-display); letter-spacing: -.03em; }
.ld-name b { color: var(--accent-2); }
.ld-status { font: 600 13px var(--font-display); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.ld-status b { color: var(--accent-2); font-variant-numeric: tabular-nums; display: inline-block; min-width: 4ch; text-align: left; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(18px + var(--safe-top)) calc(clamp(16px, 4vw, 48px) + var(--safe-right)) 18px calc(clamp(16px, 4vw, 48px) + var(--safe-left));
  transition: background .4s, backdrop-filter .4s;
}
.nav.solid { background: rgba(7,6,10,.6); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font: 800 21px var(--font-display); letter-spacing: -.03em; }
.logo b { color: var(--accent-2); }

/* popcorn box logo: kernels pop out of the box on a loop, faster on hover */
.pc-logo { width: 34px; height: 40px; overflow: visible; flex: none; }
.pc-heap circle { fill: #fff4dc; stroke: #f0b44c; stroke-width: .8; }
.pc-heap circle.pc-shade { fill: #ffd98a; stroke: none; }
.pc-heap { transform-box: fill-box; transform-origin: 50% 100%; animation: pc-jiggle .95s ease-in-out infinite; }
.pc-pop use { fill: #fff4dc; stroke: #f0b44c; stroke-width: .7; }
.pc-pop { transform-box: fill-box; transform-origin: center; opacity: 0; animation: pc-pop 2.85s cubic-bezier(.2, .7, .3, 1) var(--d) infinite; }
.logo:hover .pc-pop { animation-duration: 1.2s; }
.logo:hover .pc-heap { animation-duration: .4s; }
@keyframes pc-pop {
  0% { transform: translate(0, 8px) scale(.3) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  40% { transform: translate(var(--dx), -17px) scale(1.1) rotate(200deg); opacity: 1; }
  70% { transform: translate(calc(var(--dx) * 1.7), -4px) scale(.9) rotate(330deg); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes pc-jiggle { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .96); } }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 99px; font-weight: 600; color: var(--ink-soft); transition: color .25s, background .25s; }
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.07); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 99px;
  background: rgba(255,255,255,.07); border: 1px solid var(--line); font-weight: 600;
  transition: transform .3s var(--spring), background .25s;
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); }
.icon-btn kbd { font: 600 11px var(--font-text); color: var(--ink-soft); }
.icon-btn .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .g { width: 18px; height: 18px; }
.icon-btn[hidden], .avatar[hidden] { display: none; }

/* account */
.account { position: relative; display: flex; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line);
  background: var(--surface-2) center / cover; font: 700 15px var(--font-display); color: var(--accent-2);
  transition: border-color .25s, transform .3s var(--spring);
}
.avatar:hover { border-color: var(--accent-2); transform: scale(1.05); }
.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 220px; padding: 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px -20px #000;
}
.account-menu[hidden] { display: none; }
.am-name { font-weight: 700; }
.am-email { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; overflow-wrap: anywhere; }
.account-menu button { width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; background: rgba(255,255,255,.06); font-weight: 600; }
.account-menu button:hover { background: rgba(255,255,255,.12); }
.drawer-sync { font-size: 13px; color: var(--ink-soft); margin: -10px 0 18px; }
.drawer-sync button { color: var(--accent-2); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn b { color: var(--accent); }
.icon-btn.pop { animation: pop .5s var(--spring); }
@keyframes pop { 50% { transform: scale(1.25); } }
@media (max-width: 760px) { .nav-links, .icon-btn kbd { display: none; } }

/* ---------- shared ---------- */
section { position: relative; padding: clamp(90px, 14vh, 160px) clamp(16px, 5vw, 72px); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.02; }
h2 { font-size: clamp(34px, 6vw, 84px); font-weight: 800; max-width: 14ch; }
.section-head { margin-bottom: 48px; }
.section-head p { color: var(--ink-soft); margin-top: 14px; max-width: 52ch; }
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.reveal { opacity: 0; transform: translateY(40px); }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 56px; padding: 0 10px 0 28px; border-radius: 99px;
  background: var(--accent); color: #160904; font: 600 15px/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 10px 24px -14px rgba(255,90,46,.55);
  transition: background .3s, box-shadow .3s;
  will-change: transform;
}
.cta-ic {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: #160904; color: var(--accent-2); flex: none; transition: transform .45s var(--spring);
}
.cta-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cta:hover { background: var(--accent-2); }
.cta:hover .cta-ic { transform: translateX(3px) rotate(-12deg); }
.cta.small { min-height: 46px; padding: 0 22px; font-size: 14px; }
.cta.on { background: var(--surface-2); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: clamp(48px, 10vh, 110px); }

/* ---------- landing: one fixed screen, a wall of real posters behind the copy ---------- */
html.landing-lock, html.landing-lock body { overflow: hidden; overscroll-behavior: none; }
.landing {
  position: fixed; inset: 0; z-index: 30; height: 100dvh; min-height: 0; overflow: hidden;
  padding-top: calc(110px + var(--safe-top)); background: var(--bg); will-change: transform;
}
.landing[hidden] { display: none; }
.wall {
  position: absolute; top: -18%; bottom: -18%; left: -8%; right: -8%;
  display: flex; gap: 14px; transform: rotate(-7deg); pointer-events: none;
}
.wall-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; animation: wall-drift var(--dur, 70s) linear infinite; will-change: transform; }
.wall-col:nth-child(even) { animation-direction: reverse; }
.wall-col img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; background: var(--surface-2); box-shadow: 0 18px 40px -20px #000; }
@keyframes wall-drift { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 7px)); } }
.wall-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,6,10,.96) 0%, rgba(7,6,10,.86) 34%, rgba(7,6,10,.45) 60%, rgba(7,6,10,.22) 100%),
    linear-gradient(to top, rgba(7,6,10,.95) 0%, rgba(7,6,10,0) 45%),
    linear-gradient(to bottom, rgba(7,6,10,.85) 0%, rgba(7,6,10,0) 22%);
}
.landing .hero-copy { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .wall-col { animation: none; } }
.hero-copy { max-width: 1000px; min-width: 0; width: 100%; }
.hero-title { font-size: clamp(34px, 5.2vw, 96px); font-weight: 800; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); }
.hero-sub { margin: 22px 0 28px; color: var(--ink-soft); max-width: 46ch; font-size: clamp(16px, 1.4vw, 19px); }
.hero-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.lang-pill {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 99px;
  border: 1px solid var(--line); background: rgba(18,16,24,.6); backdrop-filter: blur(10px);
  font-weight: 600; font-size: 15px; transition: border-color .25s, background .25s, color .25s;
}
.lang-pill:hover, .lang-pill.active { border-color: hsl(var(--h) 85% 62%); background: hsl(var(--h) 80% 50% / .16); }

/* ---------- mood ---------- */
.mood-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 40px; }
.mood-chip {
  position: relative; text-align: left; padding: 20px 18px 18px; border-radius: 22px; overflow: hidden;
  background: rgba(18,16,24,.72); border: 1px solid var(--line);
  transition: transform .45s var(--spring), border-color .3s, background .3s;
  opacity: 0; transform: translateY(40px) scale(.9);
}
.mood-chip .emo { display: block; font-size: 34px; margin-bottom: 14px; transition: transform .5s var(--spring); }
.mood-chip strong { display: block; font: 600 16px var(--font-display); }
.mood-chip small { color: var(--ink-soft); font-size: 13px; }
.mood-chip:hover .emo { transform: rotate(-14deg) scale(1.25); }
.mood-chip.on { border-color: var(--accent); background: linear-gradient(150deg, rgba(255,90,46,.28), rgba(255,194,61,.08)); }
.mood-chip.on .emo { animation: wiggle .6s var(--spring); }
.mood-chip::after {
  content: "✓"; position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--accent); color: #000;
  transform: scale(0); transition: transform .4s var(--spring);
}
.mood-chip.on::after { transform: scale(1); }
@keyframes wiggle { 30% { transform: rotate(18deg) scale(1.3); } 60% { transform: rotate(-12deg) scale(1.2); } }

.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.filter-row, .toggle-group, .hero-langs, .tabs { min-width: 0; }
.filter-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filter-label { width: 100px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-soft); }
.toggle-group { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle {
  padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); background: rgba(18,16,24,.6);
  font-weight: 600; font-size: 14px; color: var(--ink-soft); transition: all .3s var(--ease);
}
.toggle.on { color: var(--ink); border-color: hsl(var(--h, 14) 90% 60%); background: hsl(var(--h, 14) 80% 50% / .2); }

/* ---------- poster art ---------- */
.poster {
  --h: 20; container-type: inline-size; position: relative; aspect-ratio: 2/3; border-radius: 18px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, hsl(var(--h) 70% 22%), hsl(calc(var(--h) + 40) 70% 8%));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), inset 0 0 0 1px rgba(255,255,255,.08);
}
.poster .art { position: absolute; inset: 0; z-index: -1; }
.poster.s0 .art { background: radial-gradient(circle at 70% 30%, hsl(calc(var(--h) + 30) 100% 62%) 0 18%, transparent 19%), radial-gradient(circle at 70% 30%, hsl(var(--h) 90% 50% / .5) 0 32%, transparent 33%); }
.poster.s1 .art { background: repeating-linear-gradient(-35deg, hsl(var(--h) 90% 55% / .35) 0 14px, transparent 14px 34px); mask: linear-gradient(to bottom, #000 30%, transparent 85%); }
.poster.s2 .art { background: repeating-radial-gradient(circle at 50% 38%, hsl(calc(var(--h) + 20) 90% 60% / .45) 0 2px, transparent 3px 22px); }
.poster.s3 .art { background: linear-gradient(90deg, transparent 0 46%, hsl(var(--h) 100% 60%) 46% 54%, transparent 54%), linear-gradient(180deg, hsl(calc(var(--h) + 50) 90% 55% / .5), transparent 60%); }
.poster::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0,0,0,.85), transparent 55%); }
.poster .p-lang { position: absolute; top: 14px; left: 16px; font-weight: 800; font-size: 13px; opacity: .85; }
.poster .p-rate { position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: 99px; background: rgba(0,0,0,.62); font-size: 12px; font-weight: 700; }
.poster .p-title {
  font: 800 clamp(10px, 10cqi, 34px)/1.02 var(--font-display); letter-spacing: -.03em; text-wrap: balance;
  overflow-wrap: anywhere; hyphens: auto;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.poster .p-sub { font-size: clamp(9px, 5.4cqi, 13px); color: rgba(255,255,255,.72); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster .p-lang { font-size: clamp(9px, 5cqi, 13px) !important; }
.poster .p-rate { font-size: clamp(9px, 5cqi, 12px) !important; }
.poster .p-glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.28), transparent 45%); opacity: 0; transition: opacity .3s; }

/* ---------- coverflow ---------- */
.flow { position: relative; height: clamp(440px, 62vh, 600px); perspective: 1400px; outline: none; touch-action: pan-y; user-select: none; }
.flow-track { position: absolute; inset: 0; transform-style: preserve-3d; }
.flow-card {
  position: absolute; left: 50%; top: 50%; width: clamp(220px, 24vw, 320px);
  transform-style: preserve-3d; transition: transform .8s var(--ease), opacity .6s;
  will-change: transform, opacity;
}
.flow-card::after { content: ""; position: absolute; inset: 0; border-radius: 18px; background: #000; opacity: .45; pointer-events: none; transition: opacity .6s; }
.flow-card.center::after { opacity: 0; }
.flow-card.far { visibility: hidden; }
.flow-card .match {
  position: absolute; bottom: -38px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 14px; color: var(--accent-2);
  opacity: 0; transition: opacity .4s;
}
.flow-card.center .match { opacity: 1; }
.flow-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--ink-soft); gap: 6px; }
.flow-empty b { font: 800 26px var(--font-display); color: var(--ink); }
.flow-nav {
  position: absolute; top: 50%; z-index: 200; width: 52px; height: 52px; margin-top: -26px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(16,16,22,.62); color: #fff; cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,.4);
  transition: background .25s, border-color .25s, transform .25s var(--ease), opacity .25s;
}
.flow-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.flow-nav.prev { left: clamp(12px, 4vw, 56px); }
.flow-nav.next { right: clamp(12px, 4vw, 56px); }
.flow-nav:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.flow-nav:active:not(:disabled) { transform: scale(.94); }
.flow-nav:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.flow-nav:disabled { opacity: .3; cursor: default; }
.flow-nav[hidden] { display: none; }
@media (max-width: 640px) {
  .flow-nav { width: 42px; height: 42px; margin-top: -21px; }
  .flow-nav svg { width: 18px; height: 18px; }
  .flow-nav.prev { left: 8px; }
  .flow-nav.next { right: 8px; }
}

/* ---------- spin drum ---------- */
.spin { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; min-height: 100vh; }
.spin-copy p { color: var(--ink-soft); margin: 16px 0 30px; max-width: 40ch; }
/* the reel: a vertical wheel of film panels behind curved glass, with a pull lever */
.machine { --H: 128px; --tH: 150px; position: relative; display: flex; align-items: flex-start; gap: 18px; justify-self: center; width: min(640px, 100%); padding-bottom: calc(var(--tH) - 10px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the machine cabinet around the reel */
.cabinet {
  position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 24px; border-radius: 34px;
  background: linear-gradient(180deg, #1f1a27 0%, #131118 100%); border: 1px solid #2E2938;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -10px 30px rgba(0,0,0,.35), 0 50px 90px -40px #000;
}
.marquee {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 18px;
  background: linear-gradient(180deg, #2c1710, #190d0a); border: 1px solid rgba(255,90,46,.35);
}
.marquee b { font: 800 clamp(16px, 2vw, 22px)/1 var(--font-display); letter-spacing: -.02em; }
.marquee em { color: var(--accent-2); }
.bulbs { flex: 1; height: 10px; background: radial-gradient(circle, #ffd27a 0 3px, rgba(255,210,122,.25) 3.5px, transparent 5px) 0 50% / 16px 10px repeat-x; }
.machine.running .bulbs { animation: bulbs .45s steps(2) infinite; }
@keyframes bulbs { 50% { background-position: 8px 50%; opacity: .6; } }
/* the ticket slot: one opening exactly as wide as the ticket */
.slot-row { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.slot-label { font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #6f667a; }
.slot {
  position: relative; z-index: 3; width: var(--slotW, 90%); height: 14px; border-radius: 8px;
  background: linear-gradient(180deg, #000 0%, #0a080d 55%, #1a1621 100%);
  box-shadow: inset 0 4px 6px #000, inset 0 -1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(255,255,255,.06);
}
/* the slot's lower lip: a thin bevel the paper slides out from under */
.slot::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -3px; height: 4px; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, #2a2533, #17141c); }

/* the printed ticket: hangs out of the slot */
.ticket-out {
  position: absolute; z-index: 2; top: calc(100% - 7px); left: 50%; width: calc(var(--slotW, 90%) - 20px); transform: translateX(-50%);
  overflow: hidden; pointer-events: none; padding-bottom: 24px; /* room for the shadow and the swing */
  filter: drop-shadow(0 14px 12px rgba(0,0,0,.55));
}
/* darkness inside the slot falling onto the paper as it comes out */
.ticket-out::before { content: ""; position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 16px; background: linear-gradient(180deg, rgba(0,0,0,.7), rgba(0,0,0,0)); pointer-events: none; }
.ticket {
  position: relative; display: flex; width: 100%; min-height: var(--tH); text-align: left; pointer-events: auto;
  background: #F4EBDD; color: #1A1410; overflow: hidden;
  /* real ticket cuts: scooped corners + half-moon notches where the stub tears off */
  --stub: 16%; --corner: 11px; --notch: 12px;
  -webkit-mask:
    radial-gradient(circle var(--corner) at 0 0, #0000 97%, #000) ,
    radial-gradient(circle var(--corner) at 100% 0, #0000 97%, #000),
    radial-gradient(circle var(--corner) at 0 100%, #0000 97%, #000),
    radial-gradient(circle var(--corner) at 100% 100%, #0000 97%, #000),
    radial-gradient(circle var(--notch) at var(--stub) 0, #0000 97%, #000),
    radial-gradient(circle var(--notch) at var(--stub) 100%, #0000 97%, #000);
  -webkit-mask-composite: source-in;
          mask:
    radial-gradient(circle var(--corner) at 0 0, #0000 97%, #000),
    radial-gradient(circle var(--corner) at 100% 0, #0000 97%, #000),
    radial-gradient(circle var(--corner) at 0 100%, #0000 97%, #000),
    radial-gradient(circle var(--corner) at 100% 100%, #0000 97%, #000),
    radial-gradient(circle var(--notch) at var(--stub) 0, #0000 97%, #000),
    radial-gradient(circle var(--notch) at var(--stub) 100%, #0000 97%, #000);
          mask-composite: intersect;
}
.ticket::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.025) 0 2px, transparent 2px 4px); pointer-events: none; }
.t-stub {
  width: 16%; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #1a0904;
}
.t-stub::after {
  content: ""; position: absolute; top: 16px; bottom: 16px; right: -3px; width: 6px;
  background: radial-gradient(circle 2.4px at 3px 5px, #0b0a0f 92%, #0000 100%) 0 0 / 6px 11px repeat-y;
}
.t-stub span { font: 800 12px/1 var(--font-display); letter-spacing: .12em; margin-bottom: 14px; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
.t-stub { position: relative; }
.t-stub b { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.t-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 18px 14px 14px; }
.t-poster { height: calc(var(--tH) - 36px); aspect-ratio: 2 / 3; width: auto; flex: none; border-radius: 6px; object-fit: cover; box-shadow: 0 6px 14px -6px rgba(0,0,0,.5); }
.t-art { display: block; background: linear-gradient(160deg, hsl(var(--h) 70% 40%), hsl(calc(var(--h) + 40) 70% 18%)); }
.t-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.t-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; color: #B5410F; }
.t-title { font: 800 clamp(15px, 1.6vw, 19px)/1.1 var(--font-display); letter-spacing: -.02em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.t-meta { font-size: 12px; color: #5b4f45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cta { margin-top: 4px; font-size: 12px; font-weight: 800; color: #1A1410; transition: color .2s; }
.ticket:hover .t-cta, .ticket:focus-visible .t-cta { color: #D9480F; }
.t-qr { flex: none; display: grid; place-items: center; padding: 18px 16px 14px 0; }
.t-qr svg { display: block; width: calc(var(--tH) - 46px); height: calc(var(--tH) - 46px); border-radius: 4px; }
.reel-window {
  position: relative; height: calc(var(--H) * 3.25); border-radius: 30px; overflow: hidden;
  background: #050407; border: 3px solid #2A2633;
  box-shadow: inset 0 0 0 6px #0e0c13, 0 40px 80px -40px #000, 0 0 0 1px rgba(255,194,61,.12);
}
.reel-stage { position: absolute; inset: 0; perspective: 900px; display: grid; place-items: center; }
.reel { position: relative; width: 88%; height: var(--H); transform-style: preserve-3d; }
.reel-face {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: linear-gradient(110deg, hsl(var(--h) 70% 22%), hsl(calc(var(--h) + 40) 70% 10%)) center / cover;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  display: flex; align-items: flex-end;
}
.reel-face::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,4,7,.88) 0%, rgba(5,4,7,.45) 55%, rgba(5,4,7,.15) 100%); }
.rf-text { position: relative; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rf-text b { font: 800 clamp(16px, 2vw, 22px)/1.1 var(--font-display); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-text span { font-size: 12px; color: rgba(246,239,230,.75); }
.reel-face.won { box-shadow: inset 0 0 0 2px var(--accent-2), 0 0 40px -6px rgba(255,194,61,.55); }
/* cylinder shading: panels darken as they turn away */
.reel-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(5,4,7,.95) 0%, rgba(5,4,7,.55) 20%, rgba(5,4,7,0) 36%, rgba(5,4,7,0) 64%, rgba(5,4,7,.55) 80%, rgba(5,4,7,.95) 100%); }
.reel-line { position: absolute; left: 4%; right: 4%; top: 50%; height: calc(var(--H) + 10px); transform: translateY(-50%); border-radius: 18px; border: 2px solid rgba(255,194,61,.55); pointer-events: none; }
.reel-glass { position: absolute; inset: 0; pointer-events: none; border-radius: 27px;
  background: linear-gradient(100deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 70%, rgba(255,255,255,.05) 85%, rgba(255,255,255,0) 100%); }
.reel-pointer { position: absolute; top: 50%; width: 26px; height: 30px; margin-top: -15px; background: var(--accent); filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.reel-pointer.left { left: -2px; clip-path: polygon(0 0, 100% 50%, 0 100%); transform-origin: 0 50%; }
.reel-pointer.right { right: -2px; clip-path: polygon(100% 0, 0 50%, 100% 100%); }

.lever { position: relative; width: 64px; height: calc(var(--H) * 3.25); flex: none; margin-top: 82px; perspective: 500px; touch-action: none; cursor: grab; }
.lever:active { cursor: grabbing; }
.lever-slot { position: absolute; left: 50%; top: 16%; bottom: 16%; width: 14px; margin-left: -7px; border-radius: 99px; background: #050407; border: 2px solid #2A2633; }
.lever-base { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a4458, #17141C 70%); box-shadow: 0 6px 14px rgba(0,0,0,.6); }
.lever-arm { position: absolute; left: 50%; bottom: 50%; width: 12px; height: 44%; margin-left: -6px; transform-origin: 50% 100%; transform-style: preserve-3d; }
.lever-rod { position: absolute; inset: 0; border-radius: 99px; background: linear-gradient(90deg, #8d8699, #e9e4ef 45%, #6f6880); }
.lever-knob { position: absolute; left: 50%; top: -22px; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a6b, var(--accent) 45%, #9c2a0b 100%); box-shadow: 0 8px 18px rgba(0,0,0,.5); }
.lever-hint { position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 860px) { .spin { grid-template-columns: 1fr; } }

/* ---------- explore ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.tab { padding: 12px 22px; border-radius: 99px; border: 1px solid var(--line); background: rgba(18,16,24,.7); font-weight: 600; transition: border-color .3s var(--ease), background .3s var(--ease); }
.tab small { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 400; }
.tab[aria-selected="true"] { border-color: hsl(var(--h) 85% 62%); background: hsl(var(--h) 80% 50% / .2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; perspective: 1200px; }
.tilt { transition: transform .5s var(--ease); transform-style: preserve-3d; }
.tilt:hover .p-glare { opacity: 1; }

/* ---------- close ---------- */
.close { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 40px; padding-top: clamp(120px, 18vh, 200px); padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
.close-title { font-size: clamp(54px, 12vw, 190px); font-weight: 800; line-height: .92; }
.close-title span { display: block; }
.close-title { overflow: hidden; padding-bottom: .08em; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 56px; font-size: 13px; color: var(--ink-soft); align-self: stretch; }
.foot-links a:hover { color: var(--ink); }
.foot-links + .foot { margin-top: 20px; }
.foot { color: var(--ink-soft); font-size: 13px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); align-self: stretch; }

/* ---------- modal ---------- */
.modal, .search { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.modal[hidden], .search[hidden], .drawer[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,3,6,.72); backdrop-filter: blur(14px); }
.modal-card {
  position: relative; width: min(980px, 100%); max-height: 90vh; overflow: auto;
  display: grid; grid-template-columns: 340px 1fr; gap: 34px; padding: 30px;
  border-radius: 30px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 60px 120px -40px #000;
}
.modal-poster .poster { width: 100%; }
.modal-x { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); z-index: 2; transition: transform .4s var(--spring); }
@media (hover: hover) and (pointer: fine) { .modal-x:hover { transform: rotate(90deg); } }
.m-meta { color: var(--ink-soft); font-size: 14px; }
.modal-body h3 { font-size: clamp(30px, 4vw, 48px); margin: 6px 0 14px; }
.m-line { font-size: 19px; margin-bottom: 18px; }
.m-why { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.m-why span { padding: 6px 12px; border-radius: 99px; background: rgba(255,90,46,.15); color: var(--accent-2); font-size: 13px; font-weight: 600; }
.m-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; margin-bottom: 24px; font-size: 14px; }
.m-facts dt { color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.modal-body h4 { font-size: 16px; margin: 30px 0 14px; }
.m-similar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.m-similar .poster { padding: 10px; border-radius: 12px; }
.m-similar .poster .p-sub, .m-similar .poster .p-lang { display: none; }
@media (max-width: 800px) {
  .modal-card { grid-template-columns: 1fr; padding: 20px; }
  .modal-poster .poster { aspect-ratio: 16/10; }
  .m-similar { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 110; width: min(400px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); padding: calc(26px + var(--safe-top)) 26px calc(26px + env(safe-area-inset-bottom, 0px)); overflow: auto;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.drawer-head .modal-x { position: static; }
.drawer-list { display: grid; gap: 12px; }
.drawer-item { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface-2); text-align: left; width: 100%; }
.drawer-item .poster { width: 54px; padding: 6px; border-radius: 8px; flex: none; }
.drawer-item .poster > :not(.art) { display: none; }
.drawer-item b { display: block; font-family: var(--font-display); font-size: 15px; }
.drawer-item small { color: var(--ink-soft); }
.drawer-empty { color: var(--ink-soft); }

/* ---------- search ---------- */
.search { align-items: start; padding-top: calc(14vh + var(--safe-top)); }
.search-box { position: relative; width: min(680px, 100%); }
.search-box input {
  width: 100%; padding: 22px 26px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 20px var(--font-text); outline: none;
}
.search-box input:focus { border-color: var(--accent); }
.search-results { margin-top: 10px; display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.search-results button { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid transparent; }
.search-results button:hover, .search-results button:focus { border-color: var(--accent); outline: none; }
.search-results small { color: var(--ink-soft); }


/* ---------- phones: compact, shorter, lighter ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grain { display: none; }
  section { padding: 64px 16px; }
  .section-head { margin-bottom: 28px; }
  h2 { font-size: clamp(30px, 9vw, 44px); }
  .nav { padding: calc(12px + var(--safe-top)) calc(16px + var(--safe-right)) 12px calc(16px + var(--safe-left)); }
  .logo { font-size: 19px; }
  .pc-logo { width: 28px; height: 33px; }
  .icon-btn { height: 38px; padding: 0 12px; gap: 6px; }
  .signin span { display: none; }
  .avatar { width: 38px; height: 38px; }
  .nav-actions { gap: 6px; }

  /* hero: copy anchored low, particles fill the space above */
  .hero { min-height: 100svh; padding-bottom: 28px; }
  .landing { min-height: 0; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .wall { gap: 10px; left: -14%; right: -14%; transform: rotate(-6deg); }
  .wall-col { gap: 10px; }
  .wall-col img { border-radius: 10px; }
  @keyframes wall-drift { from { transform: translateY(0); } to { transform: translateY(calc(-50% - 5px)); } }
  .wall-scrim {
    background:
      linear-gradient(to top, rgba(7,6,10,.98) 0%, rgba(7,6,10,.94) 36%, rgba(7,6,10,.55) 62%, rgba(7,6,10,.3) 100%),
      linear-gradient(to bottom, rgba(7,6,10,.85) 0%, rgba(7,6,10,0) 18%);
  }
  /* each line is ~8.6em wide and must fit inside the 16px gutters */
  .hero-title { font-size: min(calc((100vw - 32px) / 10.2), 46px); }
  .hero-sub { margin: 12px 0 18px; font-size: 15px; }
  .hero-langs, .tabs {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px; padding: 4px 16px; scroll-padding: 0 16px; scroll-snap-type: x proximity;
  }
  /* filters wrap so every option is visible without sideways scrolling */
  .toggle-group { flex-wrap: wrap; gap: 8px; }
  .toggle { padding: 9px 14px; }
  .hero-langs::-webkit-scrollbar, .toggle-group::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
  .hero-langs { margin-bottom: 20px; }
  .lang-pill, .toggle, .tab { flex: none; scroll-snap-align: start; }
  .lang-pill { height: 42px; padding: 0 16px; font-size: 14px; }
  .cta:not(.small) { width: 100%; justify-content: space-between; min-height: 58px; padding-left: 24px; }

  /* mood: two tight columns, no blurbs */
  .mood-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
  .mood-chip { display: flex; align-items: center; gap: 10px; padding: 13px 12px; border-radius: 16px; backdrop-filter: none; }
  .mood-chip .emo { font-size: 22px; margin: 0; }
  .mood-chip strong { font-size: 13px; }
  .mood-chip small { display: none; }
  .mood-chip::after { top: 50%; right: 10px; width: 18px; height: 18px; margin-top: -9px; font-size: 10px; }
  .filters { gap: 12px; }
  .filter-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-label { width: auto; font-size: 11px; }

  /* picks */
  .flow { height: 360px; }
  .flow-card { width: 190px; }
  .match-count { font-size: 14px; }

  /* spin: no full-screen height */
  .spin { min-height: 0; gap: 0; }
  .spin-copy p { margin: 10px 0 20px; }
  .machine { --H: 92px; --tH: 124px; order: -1; gap: 10px; margin-bottom: 28px; }
  .cabinet { padding: 12px 12px 20px; border-radius: 26px; gap: 10px; }
  .marquee { padding: 8px 12px; }
  .lever { margin-top: 64px; }
  .slot-row { --slotW: 96%; }
  .t-stub { width: 17%; }
  .ticket { --stub: 17%; --corner: 9px; --notch: 10px; }
  .t-stub span { font-size: 11px; }
  .t-main { gap: 10px; padding: 10px; }
  .t-info { flex: 1; }
  .t-poster { display: none; }
  .t-qr { padding: 16px 12px 12px 0; }
  .t-qr svg { width: calc(var(--tH) - 44px); height: calc(var(--tH) - 44px); }
  .t-stub span { font-size: 10px; letter-spacing: .1em; margin-bottom: 0; }
  .t-stub b { display: none; }
  .t-eyebrow { display: none; }
  .t-title { font-size: 14px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
  .t-meta { font-size: 11px; }
  .reel-window { border-radius: 22px; }
  .reel { width: 90%; }
  .rf-text { padding: 10px 14px; }
  .lever { width: 48px; }
  .lever-knob { width: 36px; height: 36px; margin-left: -18px; top: -18px; }

  /* explore: a swipeable row instead of a tall grid */
  .tabs { margin-bottom: 20px; }
  .tab { padding: 9px 16px; backdrop-filter: none; }
  .grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 12px; scroll-padding: 0 16px; scrollbar-width: none; perspective: none; }
  .grid::-webkit-scrollbar { display: none; }
  .grid > .tilt { flex: 0 0 44vw; scroll-snap-align: start; }

  /* close */
  .close { padding: 72px 16px calc(32px + env(safe-area-inset-bottom, 0px)); gap: 26px; }
  .close-title { font-size: clamp(46px, 15vw, 72px); }
  .foot { margin-top: 16px; font-size: 12px; }

  /* movie popup becomes a full-screen page that respects the browser toolbars */
  .modal { padding: 0; place-items: stretch; }
  .modal-card {
    width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0;
    padding: 0 0 calc(96px + env(safe-area-inset-bottom)); gap: 0; overscroll-behavior: contain;
  }
  .modal-card::before { background: var(--surface); }
  .modal-poster { gap: 0; }
  .modal-poster:has(.m-backdrop) > .poster { display: none; }
  .m-backdrop { display: block !important; position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
  .m-backdrop img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .m-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(7,6,10,.35), transparent 30%, transparent 55%, var(--surface)); }
  .modal-poster > .poster { width: 100%; border-radius: 0; aspect-ratio: 16 / 10; }
  .trailer-btn { margin: 14px 16px 0; }
  .trailer { border-radius: 0; }
  .modal-body { padding: 18px 16px 0; }
  .modal .modal-x {
    position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 5;
    width: 42px; height: 42px; background: rgba(7,6,10,.6); backdrop-filter: blur(10px); border: 1px solid var(--line);
  }
  .m-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--surface) 70%, rgba(18,16,24,0)); 
  }
  .modal-poster .poster .p-title { font-size: 26px; }
  .m-line { font-size: 16px; }
  .modal-body h3 { font-size: 30px; }
  .m-facts { gap: 10px 16px; }
  .search { padding-top: calc(10vh + var(--safe-top)); }
  .search-box input { font-size: 17px; padding: 18px; }
  .search-results button { flex-direction: column; gap: 2px; padding: 12px 16px; }
}

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal, .mood-chip { opacity: 1; transform: none; }
}
.modal-poster .poster .p-rate { display: none; }

/* ---------- TMDB posters + trailers ---------- */
.poster .p-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0; transform: scale(1.08); transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
.poster .p-img.in { opacity: 1; transform: none; }
.poster.real .p-title, .poster.real .p-sub { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.poster.real:hover .p-title, .poster.real:hover .p-sub, .flow-card.center .poster.real .p-title, .flow-card.center .poster.real .p-sub { opacity: 1; transform: none; }
.poster.real::after { background: linear-gradient(to top, rgba(0,0,0,.8), transparent 40%); }
.modal-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg, var(--surface) 30%, rgba(18,16,24,.82)), var(--backdrop, none) center / cover;
  opacity: .9;
}
.modal-card > :not(.modal-x) { position: relative; z-index: 1; }
.modal-poster { display: grid; gap: 14px; align-content: start; }
.trailer-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 16px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); font: 600 15px var(--font-display);
  transition: background .3s, transform .35s var(--spring);
}
.trailer-btn span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #000; font-size: 12px; }
.trailer-btn:hover { background: rgba(255,90,46,.18); transform: translateY(-2px); }
.modal-card.playing { grid-template-columns: 1fr; }
.trailer { aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 80px -30px #000; }
.trailer iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 400;
  max-width: min(92vw, 420px); padding: 14px 20px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 24px 50px -20px #000;
  font-weight: 600; font-size: 14px; text-align: center;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--spring), opacity .3s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }


/* ---------- signed-in home ---------- */
.home { padding-top: calc(clamp(110px, 16vh, 150px) + var(--safe-top)); }
.home[hidden], .hero[hidden] { display: none; }
.home-head { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); margin-bottom: 36px; }
.home-avatar {
  width: clamp(64px, 9vw, 96px); aspect-ratio: 1; flex: none; border-radius: 50%;
  background: var(--surface-2) center / cover; border: 3px solid var(--accent-2);
  display: grid; place-items: center; font: 800 32px var(--font-display); color: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(255,194,61,.12);
}
.home-greet { color: var(--ink-soft); font-size: 15px; margin-bottom: 4px; }
.home-title { font-size: clamp(38px, 6.4vw, 84px); font-weight: 800; }
.home-sub { color: var(--ink-soft); margin-top: 10px; max-width: 56ch; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 56px; }
.stat { padding: 18px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font: 800 clamp(24px, 3vw, 34px)/1.1 var(--font-display); letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--ink-soft); }

.shelf { margin-bottom: 48px; }
.shelf:empty { display: none; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.shelf-head h2 { font-size: clamp(22px, 2.6vw, 30px); max-width: none; }
.shelf-head span { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding: 2px 9px; border-radius: 99px; background: var(--surface-2); }
.shelf-row {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(-1 * clamp(16px, 5vw, 72px)); padding: 4px clamp(16px, 5vw, 72px) 10px; scroll-padding: 0 clamp(16px, 5vw, 72px);
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-item { position: relative; flex: 0 0 clamp(138px, 15vw, 190px); scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; justify-content: flex-start; }
.shelf-row { align-items: flex-start; }
.shelf-item .poster { width: 100%; }
.shelf-item .poster { padding: 12px; border-radius: 16px; transition: transform .35s var(--ease), box-shadow .35s; }
.shelf-item:hover .poster { transform: translateY(-4px); box-shadow: 0 30px 50px -24px #000, inset 0 0 0 1px rgba(255,194,61,.5); }
.shelf-item .poster .p-sub { display: none; }
.si-title { display: block; margin-top: 10px; font-weight: 700; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-sub { display: block; font-size: 12px; color: var(--ink-soft); }
.si-rate { position: absolute; left: 10px; bottom: 54px; padding: 3px 8px; border-radius: 99px; background: var(--accent-2); color: #1a1000; font-size: 12px; font-weight: 800; }
.shelf-empty { padding: 22px; border-radius: 18px; border: 1px dashed var(--line); color: var(--ink-soft); max-width: 560px; }

/* ---------- movie popup: watched + rating ---------- */
.m-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.m-actions [hidden] { display: none; }
.ghost-btn {
  min-height: 46px; padding: 0 20px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); font: 600 14px var(--font-display); transition: border-color .25s, background .25s;
}
.ghost-btn:hover { border-color: var(--accent-2); }
.ghost-btn.on { border-color: #3ccf7a; color: #6fe3a0; background: rgba(60,207,122,.1); }
.m-rate { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.m-rate[hidden] { display: none; }
.stars { display: flex; gap: 4px; }
.stars button { font-size: 26px; line-height: 1; color: rgba(255,255,255,.18); transition: color .2s, transform .3s var(--spring); }
.stars button:hover { transform: scale(1.2); }
.stars button.lit { color: var(--accent-2); }

@media (max-width: 760px) {
  .home { padding-top: calc(96px + var(--safe-top)); }
  .home-head { margin-bottom: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 36px; }
  .stat { padding: 14px 16px; border-radius: 16px; }
  .shelf { margin-bottom: 36px; }
  .shelf-item { flex-basis: 38vw; }
  .m-actions { flex-wrap: nowrap; }
  .m-actions > * { flex: 1 1 0; min-width: 0; min-height: 50px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
}
.shelf-item .poster .p-title { display: none; }

.m-backdrop { display: none; }
.skel { display: inline-block; width: 110px; height: 1em; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06)) 0 0 / 200% 100%;
  animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }

/* Safari ignores end padding in sideways-scrolling flex rows; a real spacer keeps the last item reachable */
.hero-langs::after, .tabs::after, .shelf-row::after { content: ""; flex: 0 0 1px; }
@media (max-width: 760px) {
  .hero-langs::after, .tabs::after { flex-basis: 16px; margin-left: -8px; }
  .grid::after { content: ""; flex: 0 0 4px; }
}
.shelf-row::after { flex-basis: clamp(16px, 5vw, 72px); margin-left: -16px; }

/* install-app button: gold outline so it reads as an offer, not a nav item */
.icon-btn.install { border-color: rgba(255,194,61,.45); color: var(--accent-2); }
.icon-btn.install:hover { background: rgba(255,194,61,.12); }
@media (max-width: 760px) { .icon-btn.install span { display: none; } }

/* installed app: content runs under the iPhone status bar, so keep it readable from the start */
@media (display-mode: standalone) {
  .nav:not(.solid) { background: linear-gradient(to bottom, rgba(7,6,10,.92) 0%, rgba(7,6,10,.6) 70%, rgba(7,6,10,0) 100%); }
}

/* ---------- films / series switch ---------- */
.kind-switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 22px; padding: 5px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
}
.kind-switch button { position: relative; z-index: 1; padding: 10px 26px; font: 600 15px var(--font-display); color: var(--ink-soft); transition: color .3s; }
.kind-switch button[aria-checked="true"] { color: #160904; }
.kind-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 99px; background: var(--accent); transition: transform .45s var(--spring); }
.kind-switch[data-kind="tv"] .kind-thumb { transform: translateX(100%); }
.poster .p-kind { font-weight: 800; color: var(--accent-2); }
.grid-empty { color: var(--ink-soft); padding: 18px 0; }
.s-tag { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; margin-left: 6px; border-radius: 99px; background: rgba(255,194,61,.14); color: var(--accent-2); vertical-align: middle; }
.s-tag.soon { background: rgba(255,90,46,.16); color: #ff8a63; }

/* ---------- where to watch ---------- */
.m-ott { margin: 4px 0 24px; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.m-ott:empty { display: none; }
.ott-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ott-head h4 { margin: 0 !important; font-size: 16px; }
.ott-region { position: relative; display: inline-flex; align-items: center; flex: none; }
.ott-region > svg { position: absolute; pointer-events: none; width: 14px; height: 14px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ott-region > svg.globe { left: 11px; }
.ott-region > svg.chev { right: 10px; width: 12px; height: 12px; }
.ott-region select {
  appearance: none; -webkit-appearance: none; height: 32px; padding: 0 30px 0 31px; margin: 0;
  font: 600 12.5px/32px var(--font-text); color: var(--ink); background: rgba(255,255,255,.06);
  border: 1px solid var(--line); border-radius: 99px; cursor: pointer; outline: none; transition: border-color .2s, background .2s;
}
.ott-region select:hover { background: rgba(255,255,255,.1); }
.ott-region select:focus-visible { border-color: var(--accent-2); outline: none; box-shadow: 0 0 0 3px rgba(255,194,61,.18); }
.ott-region select option { background: #16161d; color: #fff; }
.ott-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ott-btn {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--ease), background .25s;
}
.ott-btn:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.ott-btn.main { background: linear-gradient(135deg, rgba(255,90,46,.16), rgba(255,194,61,.06)); border-color: rgba(255,90,46,.35); }
.ott-btn img { width: 40px; height: 40px; border-radius: 10px; flex: none; background: #000; }
.ott-btn span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ott-btn b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ott-btn small { font-size: 12px; color: var(--ink-soft); }
.ott-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ott-skel { display: block; height: 62px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)) 0 0 / 200% 100%; animation: skel 1.2s linear infinite; }
.ott-note { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; border: 1px solid var(--line); }
.ott-note small { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.ott-note.soon { background: rgba(255,90,46,.1); border-color: rgba(255,90,46,.3); }
.ott-note.official { background: rgba(60,207,122,.1); border-color: rgba(60,207,122,.3); color: #8be8b2; }
.ott-note.estimate { background: rgba(255,194,61,.08); border-color: rgba(255,194,61,.28); color: #ffd98a; }
.ott-expect { display: flex; align-items: center; gap: 12px; }
.ott-expect img { flex: none; width: 44px; height: 44px; padding: 6px; border-radius: 10px; background: #fff; object-fit: contain; }
.ott-expect b { color: #fff; }
.ott-mono { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #8230c6; color: #fff; font-style: normal; font-weight: 800; flex: none; }
.ott-msg { font-size: 14px; color: var(--ink-soft); }
.ott-src { margin-top: 10px; font-size: 11px; color: var(--ink-soft); }
.ott-src a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- coming soon ---------- */
.soon-tabs { margin: 0; }
.soon-note { color: var(--ink-soft); margin: -24px 0 24px; max-width: 60ch; }
.soon-row {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(-1 * clamp(16px, 5vw, 72px)); padding: 6px clamp(16px, 5vw, 72px) 12px; scroll-padding: 0 clamp(16px, 5vw, 72px);
}
.soon-row::-webkit-scrollbar { display: none; }
.soon-row::after { content: ""; flex: 0 0 1px; }
.soon-card { position: relative; flex: 0 0 clamp(150px, 15vw, 200px); scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; justify-content: flex-start; }
.soon-card .poster { width: 100%; padding: 12px; border-radius: 16px; transition: transform .35s var(--ease); }
.soon-card .poster .p-title, .soon-card .poster .p-sub { display: none; }
.soon-card:hover .poster { transform: translateY(-4px); }
.soon-date {
  position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; flex-direction: column; align-items: center; line-height: 1;
  padding: 8px 10px; border-radius: 12px; background: var(--accent); color: #160904; font-size: 11px; font-weight: 800; text-transform: uppercase;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.7);
}
.soon-date b { font: 800 20px/1 var(--font-display); }
.soon-card .poster .p-lang { display: none; }
.soon-title { margin-top: 10px; font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.soon-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.soon-skel { flex: 0 0 clamp(150px, 15vw, 200px); aspect-ratio: 2 / 3; border-radius: 16px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)) 0 0 / 200% 100%; animation: skel 1.2s linear infinite; }

@media (max-width: 760px) {
  .kind-switch { margin-top: 16px; }
  .kind-switch button { padding: 9px 22px; font-size: 14px; }
  .ott-list { grid-template-columns: 1fr; }
  .m-ott { padding: 14px; }
  .soon-note { margin: -12px 0 16px; }
  .soon-card { flex-basis: 40vw; }
  .soon-skel { flex-basis: 40vw; }
  .soon .section-head.split { align-items: flex-start; flex-direction: column; gap: 12px; }
}
