/* ============================================================
   Reel — Movie Matcher
   Design tokens + components.  Dark, cinematic, content-first.
   Card visual language transcribed from Figma node 16950:4385.
   ============================================================ */

/* Selecta — Wabi brand typeface, used across the board */
@font-face{ font-family:'Selecta'; src:url('assets/fonts/Selecta-Light.otf')   format('opentype'); font-weight:300; font-style:normal; font-display:swap; }
@font-face{ font-family:'Selecta'; src:url('assets/fonts/Selecta-Regular.otf') format('opentype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face{ font-family:'Selecta'; src:url('assets/fonts/Selecta-Medium.otf')  format('opentype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face{ font-family:'Selecta'; src:url('assets/fonts/Selecta-Bold.otf')    format('opentype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face{ font-family:'Selecta'; src:url('assets/fonts/Selecta-Italic.otf')  format('opentype'); font-weight:400; font-style:italic;  font-display:swap; }

:root {
  /* ---- color ---- */
  --bg: #0B0B0D;
  --bg-2: #121215;
  --surface: #161618;
  --surface-2: #1d1d21;
  --surface-translucent: rgba(255, 255, 255, 0.12);
  --hairline: rgba(255, 255, 255, 0.08);

  --text-primary: #F5F5F5;
  --text-secondary: #A3A3A3;       /* Figma foreground/neutral/disabled */
  --text-tertiary: #6b6b70;

  --yes: #34D399;
  --yes-deep: #10B981;
  --no: #FB7185;
  --no-deep: #F43F5E;
  --match: #FF2D55;                 /* primary accent / match celebration (Netflix·Tinder red) */
  --match-deep: #E50914;            /* Netflix red */
  --accent: #FF2D55;

  /* ---- card geometry (from Figma, scaled) ---- */
  --card-radius: clamp(28px, 8.5vw, 38px);
  --card-bevel: inset -3px -3px 3px 0 #565656,
                inset 3px 3px 3px 0 rgba(255, 255, 255, 0.30);
  --card-shadow: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.30))
                 drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));

  /* ---- type ---- Selecta across the board */
  --font-display: 'Selecta', Georgia, 'Times New Roman', serif;
  --font-mono: 'Selecta', Georgia, serif;
  --font-ui: 'Selecta', Georgia, serif;

  /* ---- motion ---- */
  --spring: cubic-bezier(0.18, 0.89, 0.32, 1.18);   /* gentle overshoot */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 0.85, 0.4);

  /* ---- layout ---- */
  --nav-h: 76px;
  --app-max: 430px;
}

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  background: #050506;
  color: var(--text-primary);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}
body { display: flex; align-items: center; justify-content: center; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; }
ul { list-style: none; }

/* ---------- app shell (phone column) ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: var(--app-max);
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, #18181d 0%, rgba(24,24,29,0) 60%),
    var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
@media (min-width: 480px) {
  body { background: radial-gradient(80% 80% at 50% 30%, #161617 0%, #050506 70%); }
  .app {
    height: min(92vh, 924px);
    border-radius: 46px;
    box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04),
                inset 0 0 0 1px rgba(255,255,255,0.03);
    overflow: hidden;
  }
}

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: max(12px, env(safe-area-inset-top));
}

/* ============================================================
   Bottom navigation
   ============================================================ */
.nav {
  position: relative;
  z-index: 40;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: linear-gradient(to top, rgba(11,11,13,0.96) 40%, rgba(11,11,13,0.6) 100%);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid var(--hairline);
  transition: transform 0.4s var(--ease-out), opacity 0.3s ease;
}
.nav.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-tertiary);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
  position: relative;
  padding-top: 8px;
}
.nav-item svg { width: 24px; height: 24px; transition: transform 0.3s var(--spring); }
.nav-item .nav-label { opacity: 0.9; }
.nav-item.is-active { color: var(--text-primary); }
.nav-item.is-active svg { transform: translateY(-1px) scale(1.04); }
.nav-item.is-active .nav-dot { opacity: 1; }
.nav-item:active svg { transform: scale(0.9); }
.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 20px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--match);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg);
  transform: scale(0);
  transition: transform 0.4s var(--spring);
}
.nav-badge.show { transform: scale(1); }

/* ============================================================
   Match (deck) screen
   ============================================================ */
.deck-screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 22px 2px;
  flex-shrink: 0;
}

/* genre selector (top-left) */
.genre-select-wrap { position: relative; }
.genre-select {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--hairline);
  font-size: 14.5px; font-weight: 600; color: var(--text-primary);
  transition: background 0.2s ease;
}
.genre-select:active { background: var(--surface-2); }
.gs-caret { display: flex; }
.gs-caret svg { width: 16px; height: 16px; color: var(--text-secondary); transition: transform 0.25s var(--ease-out); }
.genre-select-wrap.open .gs-caret svg { transform: rotate(180deg); }
.genre-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 190px; max-height: 50vh; overflow-y: auto;
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 6px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.55);
  z-index: 60; opacity: 0; transform: translateY(-8px) scale(0.97);
  transform-origin: top left; pointer-events: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.genre-select-wrap.open .genre-menu { opacity: 1; transform: none; pointer-events: auto; }
.genre-menu::-webkit-scrollbar { width: 0; }
.genre-opt {
  display: block; width: 100%; text-align: left;
  padding: 11px 14px; border-radius: 12px;
  font-size: 14px; color: var(--text-secondary); white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.genre-opt:hover { background: var(--surface); color: var(--text-primary); }
.genre-opt.is-sel { color: var(--match); background: rgba(255,45,85,0.08); font-weight: 600; }

/* settings button (top-right) */
.settings-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--text-secondary);
  transition: transform 0.2s var(--spring), color 0.2s ease, background 0.2s ease;
}
.settings-btn:active { transform: scale(0.9); }
.settings-btn:hover { color: var(--text-primary); }
.settings-btn svg { width: 20px; height: 20px; }
.couple { display: flex; align-items: center; gap: 10px; }
.avatars { display: flex; }
.avatars .av {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--bg);
  background-size: cover; background-position: center;
  font-size: 13px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.avatars .av:nth-child(2) { margin-left: -10px; }
.couple-text { display: flex; flex-direction: column; line-height: 1.15; }
.couple-text b { font-size: 13.5px; font-weight: 600; }
.couple-text span { font-size: 11px; color: var(--text-tertiary); }

.services-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 13px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-size: 12px; color: var(--text-secondary);
  font-weight: 500;
}
.services-chip .dot-row { display: flex; }
.services-chip .svc-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--surface); }
.services-chip .svc-dot:not(:first-child) { margin-left: -4px; }

/* ---- the stack ---- */
.deck-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0 4px;
  perspective: 1400px;
  perspective-origin: 50% 40%;
}
.deck {
  position: relative;
  z-index: 1;
  width: min(84vw, 360px);
  aspect-ratio: 542 / 773;
  transform-style: preserve-3d;
}

/* ambient poster-color echo — a soft, blurred field of the top poster's
   colors bleeding into the background behind the card (Rothko-ish). Two
   <img> layers crossfade as the top card changes (driven from app.js). */
.ambient {
  position: absolute;
  inset: -45% -25%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask: radial-gradient(58% 46% at 50% 46%, #000 22%, transparent 76%);
          mask: radial-gradient(58% 46% at 50% 46%, #000 22%, transparent 76%);
}
.ambient img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(64px) saturate(1.7) brightness(0.92);
  transform: scale(1.25);
  opacity: 0;
  transition: opacity 1.1s ease;
  will-change: opacity;
}
.ambient img.on { opacity: 0.5; }
@media (prefers-reduced-motion: reduce) { .ambient img { transition: opacity 0.3s ease; } }
.deck-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.deck-empty.show { opacity: 1; pointer-events: auto; }
.deck-empty .ee-ring {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--match);
}
.deck-empty h2 { font-family: var(--font-display); font-size: 30px; font-weight: 400; }
.deck-empty p { font-size: 14px; color: var(--text-secondary); max-width: 240px; line-height: 1.5; }
.deck-empty button {
  margin-top: 6px; padding: 12px 22px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
}

/* ============================================================
   The Card  (Figma node 16950:4385)
   ============================================================ */
.card {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  filter: var(--card-shadow);
  will-change: transform, filter;
  transform-origin: 50% 85%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
/* slot transforms (rest positions); JS toggles .slot-N */
.card.slot-0 { z-index: 30; transform: translate3d(0,0,0) scale(1); }
.card.slot-1 { z-index: 20; transform: translate3d(0, 14px, -40px) scale(0.94); }
.card.slot-2 { z-index: 10; transform: translate3d(0, 28px, -80px) scale(0.88); opacity: 0.55; }
.card.slot-hidden { z-index: 0; transform: translate3d(0, 40px, -120px) scale(0.82); opacity: 0; }
/* spring settle when slots change (not while dragging) */
.card.animate { transition: transform 0.55s var(--spring), opacity 0.45s var(--ease-out), filter 0.4s ease; }
.card.animate .card-img, .card.animate .card-sheen { transition: transform 0.5s var(--spring), opacity 0.35s ease; }
.card.flyoff { transition: transform 0.46s var(--ease-in), opacity 0.42s ease-out; }

.card-inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: var(--surface);
}
.card-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.06);          /* headroom so drag-parallax never reveals an edge */
  will-change: transform;
}
/* specular sheen — the "glass catches light as the card turns" detail */
.card-sheen {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  z-index: 3; opacity: 0;
  background: linear-gradient(105deg, transparent 34%, rgba(255,255,255,0.20) 50%, transparent 66%);
  transform: translateX(0);
  mix-blend-mode: soft-light;
}
/* procedural fallback poster (if image missing) */
.card-fallback {
  position: absolute; inset: 0; border-radius: inherit;
  display: flex; align-items: flex-end; padding: 24px;
}
.card-fallback::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 4px 4px; mix-blend-mode: overlay; opacity: 0.5;
}
/* bottom scrim — Figma gradient, deepened for legibility */
.card-scrim {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to bottom,
     rgba(0,0,0,0) 42%,
     rgba(0,0,0,0.30) 66%,
     rgba(0,0,0,0.72) 100%);
}
/* top scrim for pill legibility */
.card-scrim-top {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0) 26%);
}
/* glass bevel rim — exact Figma inset shadow */
.card-bevel {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: var(--card-bevel);
  z-index: 6;
}
/* gold anticipation glow (partner already liked) */
.card-glow {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  z-index: 5; opacity: 0;
  box-shadow: inset 0 0 0 1.5px rgba(255,45,85,0.0), 0 0 0 0 rgba(255,45,85,0);
  transition: opacity 0.6s ease;
}
.card.is-anticipated .card-glow {
  opacity: 1;
  animation: glowBreathe 3.4s ease-in-out infinite;
}
@keyframes glowBreathe {
  0%, 100% { box-shadow: inset 0 0 14px 1px rgba(255,45,85,0.18), inset 0 0 0 1.5px rgba(255,45,85,0.28), 0 0 18px -2px rgba(255,45,85,0.10); }
  50%      { box-shadow: inset 0 0 22px 2px rgba(255,45,85,0.34), inset 0 0 0 1.5px rgba(255,45,85,0.50), 0 0 34px 0px rgba(255,45,85,0.22); }
}

/* intent color wash (emerald/rose/gold) */
.card-wash {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  z-index: 4; opacity: 0; background: var(--wash, transparent);
  transition: background 0.1s linear;
}

/* ---- card content ---- */
.card-content { position: absolute; inset: 0; z-index: 7; pointer-events: none; }

.genres {
  position: absolute;
  top: clamp(18px, 5.5%, 30px);
  left: clamp(16px, 6%, 26px);
  right: clamp(16px, 6%, 26px);
  display: flex; flex-wrap: wrap; gap: 7px;
}
.genre-pill {
  padding: 8px 15px;
  border-radius: 200px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.10);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
}
.card.slot-0 .genre-pill { animation: pillIn 0.4s var(--ease-out) forwards; }
.card.slot-0 .genre-pill:nth-child(2) { animation-delay: 0.05s; }
.card.slot-0 .genre-pill:nth-child(3) { animation-delay: 0.1s; }
.card:not(.slot-0) .genre-pill { opacity: 1; transform: none; }
@keyframes pillIn { to { opacity: 1; transform: none; } }

.card-meta {
  position: absolute;
  left: clamp(20px, 7%, 30px);
  right: clamp(20px, 7%, 30px);
  bottom: clamp(22px, 7%, 34px);
  display: flex; flex-direction: column; gap: 4px;
}
.card-sub {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: rgba(245,245,245,0.72);
  display: flex; align-items: center; gap: 8px;
}
.card-sub .imdb { color: var(--match); font-weight: 500; }
.card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 13.5vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}

/* ---- swipe overlays ---- */
.stamp {
  position: absolute;
  z-index: 9;
  padding: 8px 18px;
  border-radius: 14px;
  border: 4px solid currentColor;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.stamp-yes { top: 38px; left: 26px; color: var(--yes); transform: rotate(-13deg) scale(0.8); text-shadow: 0 0 18px rgba(52,211,153,0.4); }
.stamp-no  { top: 38px; right: 26px; color: var(--no); transform: rotate(13deg) scale(0.8); text-shadow: 0 0 18px rgba(251,113,133,0.4); }
.stamp-fav {
  left: 50%; bottom: 64px; transform: translateX(-50%) scale(0.7);
  color: var(--match); border-radius: 16px;
  display: flex; align-items: center; gap: 8px;
  text-shadow: 0 0 18px rgba(255,45,85,0.4);
}
.stamp-fav svg { width: 26px; height: 26px; }

/* ============================================================
   Action row
   ============================================================ */
.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 8px 0 16px;
  flex-shrink: 0;
}
.act-btn {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform 0.25s var(--spring), background 0.2s ease, border-color 0.2s ease;
}
.act-btn:active { transform: scale(0.86); }
.act-btn svg { width: 26px; height: 26px; }
.act-undo { width: 48px; height: 48px; color: #8d8d94; }
.act-no   { width: 62px; height: 62px; color: var(--no); }
.act-fav  { width: 52px; height: 52px; color: var(--match); }
.act-yes  { width: 62px; height: 62px; color: var(--yes); }
.act-btn.act-no:active  { background: rgba(251,113,133,0.14); border-color: rgba(251,113,133,0.4); }
.act-btn.act-yes:active { background: rgba(52,211,153,0.14); border-color: rgba(52,211,153,0.4); }
.act-btn.act-fav:active { background: rgba(255,45,85,0.14); border-color: rgba(255,45,85,0.4); }
.act-btn:disabled { opacity: 0.32; pointer-events: none; }

/* ============================================================
   Favorites screen
   ============================================================ */
.scroll {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 20px calc(var(--nav-h) + 20px);
}
.page-head { padding: 8px 22px 14px; }
.page-head h1 { font-family: var(--font-display); font-size: 38px; font-weight: 400; letter-spacing: -0.01em; }
.page-head p { font-size: 13.5px; color: var(--text-secondary); margin-top: 2px; }

.segment {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface); border-radius: 100px; border: 1px solid var(--hairline);
  margin: 0 22px 18px;
}
.segment button {
  flex: 1; padding: 9px; border-radius: 100px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  transition: all 0.25s var(--ease-out);
}
.segment button.is-active { background: var(--surface-2); color: var(--text-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.poster-card {
  position: relative;
  aspect-ratio: 542 / 773;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(0,0,0,0.4);
  transition: transform 0.3s var(--spring);
}
.poster-card:active { transform: scale(0.96); }
.poster-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-card .pc-bevel { position: absolute; inset: 0; box-shadow: var(--card-bevel); border-radius: inherit; pointer-events: none; }
.poster-card .pc-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 50%); }
.poster-card .pc-info { position: absolute; left: 12px; right: 12px; bottom: 11px; }
.poster-card .pc-title { font-family: var(--font-display); font-size: 20px; line-height: 1; color: #fff; }
.poster-card .pc-sub { font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.poster-card .pc-match {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,45,85,0.92); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.poster-card .pc-match svg { width: 15px; height: 15px; }

.empty-list {
  text-align: center; padding: 60px 30px; color: var(--text-secondary);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-list svg { width: 40px; height: 40px; color: var(--text-tertiary); }
.empty-list p { font-size: 14px; line-height: 1.5; max-width: 230px; }

/* ============================================================
   You / setup screen
   ============================================================ */
.you-hero { padding: 16px 22px 8px; display: flex; align-items: center; gap: 14px; }
.you-hero .av-lg {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #FF2D55, #e07a5f);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: #fff;
}
.you-hero h1 { font-size: 22px; font-weight: 600; }
.you-hero p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

.section { margin: 18px 22px 0; }
.section-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-tertiary); margin-bottom: 10px; padding-left: 2px; }
.card-block { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; overflow: hidden; }

.partner-row { display: flex; align-items: center; gap: 13px; padding: 16px; }
.partner-row .av {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #7aa5f5, #5f7de0);
  display: flex; align-items: center; justify-content: center; font-weight: 600; color: #fff;
}
.partner-row .pr-text { flex: 1; }
.partner-row .pr-text b { font-size: 15px; font-weight: 600; }
.partner-row .pr-text span { display: block; font-size: 12.5px; color: var(--text-secondary); margin-top: 1px; }
.partner-row .pr-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--yes); }
.pr-status .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yes); box-shadow: 0 0 8px var(--yes); }

.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc-toggle {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--hairline);
  transition: all 0.2s ease;
}
.svc-toggle .svc-logo {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
}
.svc-toggle .svc-name { flex: 1; font-size: 13.5px; font-weight: 500; }
.svc-toggle .svc-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--spring);
}
.svc-toggle.on { border-color: rgba(255,45,85,0.4); background: rgba(255,45,85,0.06); }
.svc-toggle.on .svc-check { background: var(--match); border-color: var(--match); color: #ffffff; }
.svc-toggle .svc-check svg { width: 13px; height: 13px; opacity: 0; transition: opacity 0.2s; }
.svc-toggle.on .svc-check svg { opacity: 1; }

.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; border-bottom: 1px solid var(--hairline);
  font-size: 14.5px;
}
.list-row:last-child { border-bottom: none; }
.list-row .lr-right { color: var(--text-secondary); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.btn-text { color: var(--no); font-weight: 600; }

.foot-note { text-align: center; font-size: 11.5px; color: var(--text-tertiary); padding: 22px; line-height: 1.6; }
.foot-note b { color: var(--text-secondary); font-weight: 600; }

/* ============================================================
   Detail sheet
   ============================================================ */
.sheet-scrim {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.35s ease;
}
.sheet-scrim.show { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 88%;
  background: var(--bg-2);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--hairline);
  transform: translateY(100%);
  transition: transform 0.45s var(--spring);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
}
.sheet.show { transform: translateY(0); }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.18); margin: 10px auto 4px; flex-shrink: 0; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 20px; }
.sheet-hero { position: relative; height: 260px; }
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet-hero .sh-scrim { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-2) 2%, transparent 60%); }
.sheet-hero .sh-title { position: absolute; left: 22px; right: 22px; bottom: 14px; }
.sheet-hero .sh-title h2 { font-family: var(--font-display); font-size: 40px; font-weight: 400; line-height: 1; }
.sheet-body { padding: 4px 22px 0; }
.sheet-sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-secondary); display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 16px; align-items: center; }
.sheet-sub .imdb { color: var(--match); }
.sheet-genres { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.sheet-genres .g { padding: 6px 13px; border-radius: 100px; background: var(--surface); border: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); }
.sheet-syn { font-size: 14.5px; line-height: 1.6; color: #d9d9dd; margin-bottom: 20px; }
.sheet-avail-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-tertiary); margin-bottom: 10px; }
.sheet-avail { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.avail-badge { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--hairline); font-size: 13px; font-weight: 500; }
.avail-badge .svc-logo { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: #fff; }
.sheet-actions { display: flex; gap: 10px; padding: 4px 22px 22px; }
.sheet-actions button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px; border-radius: 16px; font-size: 14.5px; font-weight: 600; transition: transform 0.2s var(--spring); }
.sheet-actions button:active { transform: scale(0.95); }
.sheet-actions svg { width: 19px; height: 19px; }
.btn-fav { background: var(--surface-2); border: 1px solid var(--hairline); color: var(--text-primary); flex: 0 0 56px !important; }
.btn-fav.on { color: var(--match); border-color: rgba(255,45,85,0.4); background: rgba(255,45,85,0.08); }
.btn-watch { background: var(--match); color: #ffffff; }

/* ============================================================
   Match moment
   ============================================================ */
.match-overlay {
  position: absolute; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(7,7,9,0.0);
  backdrop-filter: blur(0px);
  opacity: 0;
  transition: background 0.6s ease, backdrop-filter 0.6s ease, opacity 0.3s ease;
  overflow: hidden;
}
.match-overlay.show { opacity: 1; background: rgba(7,7,9,0.92); backdrop-filter: blur(18px); }
.match-stage { position: relative; width: min(74vw, 300px); aspect-ratio: 542/773; margin-bottom: 20px; }
.match-card {
  position: absolute; inset: 0; border-radius: 26px; overflow: hidden;
  box-shadow: var(--card-bevel), 0 30px 70px rgba(0,0,0,0.6);
  opacity: 0;
}
.match-card img { width: 100%; height: 100%; object-fit: cover; }
.match-card .mc-rim { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255,45,85,0); pointer-events: none; transition: box-shadow 0.6s ease; }
.match-overlay.show .mc-rim { animation: rimBreathe 3s ease-in-out infinite 1.4s; }
@keyframes rimBreathe {
  0%,100% { box-shadow: inset 0 0 26px 0 rgba(255,45,85,0.25), inset 0 0 0 2px rgba(255,45,85,0.55), 0 0 40px 0 rgba(255,45,85,0.18); }
  50%     { box-shadow: inset 0 0 40px 4px rgba(255,45,85,0.4), inset 0 0 0 2px rgba(255,45,85,0.8), 0 0 70px 6px rgba(255,45,85,0.3); }
}
/* the two incoming cards */
.match-card.card-a { transform: translateX(-130%) rotate(-14deg) scale(0.92); }
.match-card.card-b { transform: translateX(130%) rotate(14deg) scale(0.92); }
.match-overlay.show .match-card.card-a { animation: convergeA 0.9s var(--spring) 0.25s forwards; }
.match-overlay.show .match-card.card-b { animation: convergeB 0.9s var(--spring) 0.4s forwards; }
@keyframes convergeA { 0% { opacity: 0; transform: translateX(-130%) rotate(-14deg) scale(0.92);} 60%{opacity:1;} 100% { opacity: 1; transform: translateX(0) rotate(0) scale(1);} }
@keyframes convergeB { 0% { opacity: 0; transform: translateX(130%) rotate(14deg) scale(0.92);} 60%{opacity:1;} 100% { opacity: 0.0; transform: translateX(0) rotate(0) scale(1);} }
/* light sweep */
.match-sweep { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; z-index: 3; }
.match-sweep::before {
  content: ""; position: absolute; top: -20%; left: -60%; width: 50%; height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-18deg); opacity: 0;
}
.match-overlay.show .match-sweep::before { animation: sweep 1.5s var(--ease-out) 1.1s; }
@keyframes sweep { 0% { left: -60%; opacity: 0; } 30%{opacity:0.9;} 100% { left: 130%; opacity: 0; } }

.match-copy { text-align: center; opacity: 0; transform: translateY(10px); }
.match-overlay.show .match-copy { animation: copyIn 0.7s var(--ease-out) 1s forwards; }
@keyframes copyIn { to { opacity: 1; transform: none; } }
.match-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--match); margin-bottom: 8px; }
.match-title { font-family: var(--font-display); font-size: clamp(44px, 14vw, 60px); line-height: 0.95; color: #fff; }
.match-line { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 14px; font-size: 14px; color: var(--text-secondary); }
.match-line b { color: var(--text-primary); font-weight: 600; }
.match-line .mini-av { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: #fff; }
.match-line .heart-mini { color: var(--match); }

.match-actions { display: flex; flex-direction: column; gap: 10px; width: min(74vw, 300px); margin-top: 28px; opacity: 0; }
.match-overlay.show .match-actions { animation: copyIn 0.6s var(--ease-out) 1.5s forwards; }
.match-actions .m-watch { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 16px; border-radius: 16px; background: var(--match); color: #ffffff; font-size: 15px; font-weight: 700; box-shadow: 0 10px 30px rgba(255,45,85,0.3); }
.match-actions .m-watch svg { width: 19px; height: 19px; }
.match-actions .m-secondary { padding: 14px; border-radius: 16px; background: rgba(255,255,255,0.08); border: 1px solid var(--hairline); color: var(--text-primary); font-size: 14px; font-weight: 600; }
.match-actions .m-tertiary { padding: 8px; color: var(--text-secondary); font-size: 13.5px; font-weight: 500; }

/* particles */
.particle { position: absolute; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd9e0, var(--match)); pointer-events: none; opacity: 0; z-index: 2; box-shadow: 0 0 10px rgba(255,45,85,0.6); }
.match-overlay.show .particle { animation: rise var(--pdur, 5s) ease-out var(--pdelay, 0s) infinite; }
@keyframes rise {
  0% { transform: translateY(20px) scale(0.6); opacity: 0; }
  15% { opacity: var(--popacity, 0.8); }
  85% { opacity: var(--popacity, 0.8); }
  100% { transform: translateY(-120px) scale(1); opacity: 0; }
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: absolute; left: 50%; bottom: calc(var(--nav-h) + 18px); z-index: 90;
  transform: translate(-50%, 20px);
  background: rgba(30,30,34,0.96); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); border-radius: 100px;
  padding: 12px 20px; font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 9px;
  opacity: 0; transition: all 0.35s var(--spring); pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 17px; height: 17px; color: var(--match); }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .card.animate, .card.flyoff, .sheet, .match-overlay { transition-duration: 0.2s !important; }
  .card.is-anticipated .card-glow { animation: none; opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(255,45,85,0.5); }
  .match-card.card-a, .match-card.card-b { animation: none !important; opacity: 1 !important; transform: none !important; }
  .match-card.card-b { opacity: 0 !important; }
  .match-copy, .match-actions { animation: none !important; opacity: 1 !important; transform: none !important; }
  .particle { display: none; }
}

/* hide scrollbars but keep scroll */
.scroll::-webkit-scrollbar, .sheet-scroll::-webkit-scrollbar { width: 0; height: 0; }
