:root {
  color-scheme: dark;
  --canvas: #07101f;
  --canvas-2: #0b1527;
  --surface: #101b2f;
  --surface-2: #15223a;
  --surface-3: #1b2b47;
  --text: #f4f7fb;
  --text-soft: #aebad0;
  --muted: #7f8ba2;
  --line: rgba(225, 234, 247, .12);
  --accent: #5ee6a8;
  --accent-strong: #28bd7f;
  --accent-ink: #052316;
  --violet: #a89fff;
  --danger: #ff758b;
  --warning: #ffc76b;
  --shadow: 0 22px 60px rgba(0, 0, 0, .32);
  --soft-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --nav-h: 76px;
  --font-ui: "Segoe UI Variable Text", "SF Pro Text", "Roboto Flex", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "SF Pro Display", "Roboto Flex", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font-ui);
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme="light"] {
  color-scheme: light;
  --canvas: #f6f7f3;
  --canvas-2: #edf0ea;
  --surface: #ffffff;
  --surface-2: #f0f3ef;
  --surface-3: #e8ece7;
  --text: #111827;
  --text-soft: #4b5568;
  --muted: #667085;
  --line: rgba(17, 24, 39, .12);
  --accent: #087a55;
  --accent-strong: #066442;
  --accent-ink: #ffffff;
  --violet: #5b4bd8;
  --danger: #b4233b;
  --warning: #996109;
  --shadow: 0 22px 60px rgba(31, 42, 35, .14);
  --soft-shadow: 0 10px 28px rgba(31, 42, 35, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100dvh; overflow-x: hidden; background: var(--canvas); color: var(--text); font-size: 16px; font-weight: 400; line-height: 1.5; letter-spacing: -.008em; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 10% -10%, color-mix(in srgb, var(--violet) 16%, transparent), transparent 35%), radial-gradient(circle at 100% 20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32%); }
button, input, select { font: inherit; letter-spacing: -.006em; }
h1, h2, h3, .auth-brand, .brand-button, .desktop-brand { font-family: var(--font-display); font-variation-settings: "opsz" 36; text-wrap: balance; }
p { text-wrap: pretty; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 80%, white); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.boot-screen { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--text-soft); }
.boot-screen strong { color: var(--text); font-size: 28px; }
.boot-screen p { margin: 0; }
.brand-mark { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 14px; background: var(--accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 24%, transparent); }
.brand-mark::after { content: ""; margin-left: 3px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 12px solid var(--accent-ink); }

.auth-layout { position: relative; isolation: isolate; min-height: 100dvh; display: grid; align-items: center; overflow: hidden; padding: 24px 18px; }
.auth-wrap { position: relative; z-index: 2; width: min(1060px, 100%); margin: auto; display: grid; gap: 22px; }
.poster-cloud { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: .32; }
.poster-float { position: absolute; width: clamp(86px, 11vw, 132px); aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: linear-gradient(150deg, #20304b, #10192a); background-position: center; background-size: cover; box-shadow: 0 20px 54px rgba(0,0,0,.38); filter: saturate(.72); transform: rotate(var(--poster-rotate)); }
.poster-float span { position: absolute; inset: auto 8px 8px; color: rgba(255,255,255,.78); font-size: 10px; font-weight: 700; line-height: 1.15; }
.poster-1 { --poster-rotate: -9deg; left: 3%; top: -4%; }
.poster-2 { --poster-rotate: 8deg; left: 25%; top: -12%; }
.poster-3 { --poster-rotate: -6deg; right: 26%; top: -10%; }
.poster-4 { --poster-rotate: 10deg; right: 4%; top: -2%; }
.poster-5 { --poster-rotate: -7deg; right: 9%; bottom: -15%; }
.auth-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(7,16,31,.36), var(--canvas) 36%, var(--canvas) 100%), radial-gradient(circle at 50% 0, transparent, var(--canvas) 72%); }
.auth-story { padding: 22px 4px; }
.auth-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 720; letter-spacing: -.03em; }
.auth-story h1 { max-width: 680px; margin: 34px 0 14px; font-size: clamp(42px, 8vw, 76px); font-weight: 720; line-height: .98; letter-spacing: -.052em; }
.auth-story > p { max-width: 590px; margin: 0; color: var(--text-soft); font-size: clamp(17px, 2.5vw, 21px); line-height: 1.55; }
.auth-points { display: grid; gap: 10px; margin-top: 30px; }
.auth-point { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-weight: 600; }
.auth-point svg { width: 20px; color: var(--accent); }
.auth-panel { min-height: 470px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); }
.auth-panel h2 { margin: 8px 8px 4px; font-size: 25px; font-weight: 680; letter-spacing: -.025em; }
.auth-panel > p { margin: 0 8px 22px; color: var(--text-soft); }
.seo-loading-panel { display: grid; align-content: center; }
.seo-loading { min-height: 48px; display: grid; place-items: center; margin: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-soft); font-size: 14px; font-weight: 650; }
.auth-gate { display: grid; gap: 12px; width: 100%; }
.auth-gate .status-line { margin: 4px 0 0; text-align: center; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 8px 12px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.auth-switch button { min-height: 40px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--text-soft); font: inherit; font-size: 13px; font-weight: 680; cursor: pointer; }
.auth-switch button.active { background: var(--surface); color: var(--text); box-shadow: var(--soft-shadow); }
.clerk-auth-root[hidden] { display: none !important; }
.auth-modal-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; overflow-y: auto; padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); background: rgba(3,9,18,.78); backdrop-filter: blur(14px); }
.auth-modal { position: relative; width: min(440px, 100%); min-height: 300px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: #101b2f; color: #f4f7fb; box-shadow: 0 28px 90px rgba(0,0,0,.56); }
.auth-modal-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: #aebad0; }
.auth-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.auth-modal .auth-switch { margin-right: 44px; }
.auth-progress { min-height: 320px; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.auth-progress h3 { margin: 8px 0 0; font-size: 20px; }
.auth-progress p { margin: 0; color: var(--text-soft); }
.loading-spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: cue-spin .75s linear infinite; }
@keyframes cue-spin { to { transform: rotate(360deg); } }
.dev-login { display: grid; gap: 14px; padding: 16px 8px; }

.field { display: grid; gap: 7px; }
.field > span, .field label { color: var(--text-soft); font-size: 13px; font-weight: 650; letter-spacing: .005em; }
.input, .select { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 16px; transition: border-color .18s ease, box-shadow .18s ease; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); outline: none; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 700; transition: filter .18s ease, transform .18s ease, background .18s ease; }
.button:hover { filter: brightness(1.04); }
.button:active { transform: translateY(1px); }
.button.secondary { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.button.ghost { background: transparent; border-color: var(--line); color: var(--text-soft); }
.button.danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.button.full { width: 100%; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text-soft); }
.icon-button svg, .button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.onboarding { min-height: 100dvh; padding: max(20px, env(safe-area-inset-top)) 16px max(30px, env(safe-area-inset-bottom)); }
.onboarding-shell { width: min(780px, 100%); margin: auto; }
.onboarding-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.onboarding-tools { display: flex; align-items: center; gap: 8px; }
.onboarding-signout { min-height: 44px; padding-inline: 12px; }
.progress { height: 7px; margin: 22px 0 34px; overflow: hidden; border-radius: 99px; background: var(--surface-3); }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--violet)); transition: width .3s ease; }
.onboarding-card { padding: clamp(20px, 5vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--soft-shadow); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.onboarding-card h1, .page-heading h1 { margin: 0; font-size: clamp(30px, 6vw, 48px); font-weight: 700; line-height: 1.06; letter-spacing: -.042em; }
.lede { max-width: 620px; margin: 12px 0 26px; color: var(--text-soft); line-height: 1.55; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.option { min-height: 52px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--text); font-weight: 640; text-align: left; transition: .18s ease; }
.provider-option { min-width: 0; display: flex; align-items: center; gap: 10px; }
.provider-mark { min-width: 0; display: inline-flex; align-items: center; gap: 8px; }
.provider-logo { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; padding: 5px; overflow: hidden; border: 1px solid rgba(17,24,39,.1); border-radius: 10px; background: #fff; }
.provider-logo img { width: 100%; height: 100%; object-fit: contain; }
.provider-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent); }
.option[aria-pressed="true"]::before { content: "✓"; margin-right: 7px; color: var(--accent); }
.form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; }
.taste-stage { display: grid; gap: 16px; }
.taste-loading { min-height: 220px; border-radius: 16px; }
.onboarding-quiz-back { margin-top: 12px; }
.taste-counter { display: flex; align-items: center; justify-content: space-between; color: var(--text-soft); font-size: 13px; font-weight: 620; }
.taste-title { min-width: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.taste-title img { width: 112px; height: 166px; object-fit: cover; background: var(--surface-3); }
.taste-copy { min-width: 0; align-self: center; padding: 18px; }
.taste-copy h2 { margin: 5px 0 8px; overflow-wrap: anywhere; font-size: 23px; font-weight: 680; line-height: 1.1; letter-spacing: -.026em; }
.taste-copy p { margin: 0; color: var(--text-soft); font-size: 14px; }
.taste-actions { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.taste-actions button { min-width: 0; min-height: 48px; padding: 7px 4px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text-soft); font-size: 12px; font-weight: 680; }
.taste-actions button:active { border-color: var(--accent); color: var(--accent); }

.app-shell { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.topbar { height: 70px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: env(safe-area-inset-top) 16px 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 87%, transparent); backdrop-filter: blur(18px); }
.brand-button { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); font-size: 21px; font-weight: 740; letter-spacing: -.03em; }
.brand-button .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
.account-button { display: flex; align-items: center; gap: 9px; padding: 5px 7px 5px 5px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text); font-weight: 650; }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 75%, var(--surface)), var(--surface-3)); color: #fff; font-weight: 720; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-button span:last-child { display: none; }
.desktop-rail { display: none; }
.app-main { width: min(920px, 100%); margin: 0 auto; padding: 20px 16px 30px; }
.audience-strip { display: flex; gap: 8px; margin-bottom: 25px; overflow-x: auto; scrollbar-width: none; }
.audience-strip::-webkit-scrollbar { display: none; }
.audience-chip { flex: 0 0 auto; min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text-soft); font-weight: 650; }
.audience-chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--text); }
.audience-chip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.page { animation: page-in .22s ease both; }
@keyframes page-in { from { opacity: .35; transform: translateY(4px); } }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-heading h1 { font-size: clamp(31px, 7vw, 48px); }
.page-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--text-soft); line-height: 1.45; }
.filter-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 42px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--text-soft); font-weight: 650; }
.filter-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.status-line { min-height: 22px; margin: 0 0 10px; color: var(--text-soft); font-size: 13px; }

.pick-stage { width: min(520px, 100%); margin: 0 auto; }
.pick-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); touch-action: pan-y; transform-origin: center 90%; transition: transform .22s ease, opacity .22s ease; }
.pick-poster { aspect-ratio: 16 / 13; position: relative; overflow: hidden; background: var(--surface-3); }
.pick-poster img { width: 100%; height: 100%; object-fit: cover; }
.pick-poster::after { content: ""; position: absolute; inset: 28% 0 0; background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 96%, transparent)); }
.fit-badge { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 8px 10px; border-radius: 99px; background: rgba(7,16,31,.84); color: #fff; font-size: 12px; font-weight: 720; font-variant-numeric: tabular-nums; backdrop-filter: blur(10px); }
.provider-badge { min-width: 42px; min-height: 42px; position: absolute; top: 14px; right: 14px; z-index: 2; display: inline-grid; place-items: center; padding: 5px; overflow: hidden; border-radius: 14px; background: rgba(7,16,31,.84); color: #fff; font-size: 12px; font-weight: 780; backdrop-filter: blur(10px); }
.provider-badge .provider-logo { width: 32px; height: 32px; padding: 5px; border: 0; border-radius: 9px; }
.provider-list { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.provider-list .provider-logo { width: 30px; height: 30px; padding: 5px; border-radius: 9px; }
.pick-body { position: relative; z-index: 2; margin-top: -38px; padding: 0 20px 21px; }
.meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; color: var(--text-soft); font-size: 12px; font-weight: 620; letter-spacing: .004em; }
.meta span:not(:last-child)::after { content: "·"; margin-left: 7px; color: var(--muted); }
.pick-body h2 { margin: 0; overflow-wrap: anywhere; font-size: clamp(27px, 7vw, 38px); font-weight: 700; line-height: 1.06; letter-spacing: -.042em; }
.rating-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rating { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-soft); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rating strong { color: var(--text); }
.overview { display: -webkit-box; margin: 0; overflow: hidden; color: var(--text-soft); line-height: 1.5; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.reason { margin: 13px 0 0; padding: 11px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); color: var(--text); font-size: 13px; line-height: 1.45; }
.decision-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; margin-top: 12px; }
.decision { min-width: 0; min-height: 56px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text-soft); font-size: 10px; font-weight: 680; }
.decision svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.decision[data-action="love"], .decision[data-action="liked"] { color: var(--accent); }
.decision[data-action="disliked"] { color: var(--danger); }
.decision[data-action="save"] { color: var(--violet); }
.swipe-note { display: flex; justify-content: space-between; margin: 10px 4px 0; color: var(--muted); font-size: 11px; }
.empty-state { min-height: 330px; display: grid; place-content: center; justify-items: center; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.empty-state svg { width: 38px; color: var(--accent); }
.empty-state h2 { margin: 16px 0 6px; font-size: 25px; font-weight: 680; letter-spacing: -.03em; }
.empty-state p { max-width: 390px; margin: 0 0 18px; color: var(--text-soft); line-height: 1.5; }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 7%, transparent), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.search-wrap { position: relative; margin-bottom: 18px; }
.search-wrap svg { position: absolute; left: 14px; top: 14px; width: 20px; fill: none; stroke: var(--text-soft); stroke-width: 2; }
.search-wrap .input { padding-left: 44px; }
.title-grid { display: grid; gap: 11px; }
.title-row { min-width: 0; display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 13px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.title-row > img, .poster-placeholder { width: 74px; height: 108px; object-fit: cover; border-radius: 10px; background: var(--surface-3); }
.title-row-content { min-width: 0; display: grid; align-content: center; }
.title-row h3 { margin: 0 0 5px; overflow-wrap: anywhere; font-size: 18px; font-weight: 680; letter-spacing: -.018em; }
.title-row p { margin: 0; color: var(--text-soft); font-size: 13px; }
.title-row .provider-list { margin-top: 8px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.row-actions button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text-soft); font-size: 11px; font-weight: 650; }
.section-card { margin-bottom: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.section-card h2 { margin: 0 0 5px; font-size: 20px; font-weight: 680; letter-spacing: -.022em; }
.section-card > p { margin: 0 0 16px; color: var(--text-soft); line-height: 1.45; }
.group-list { display: grid; gap: 10px; }
.group-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.group-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.group-card h3 { margin: 0 0 4px; font-size: 18px; }
.member-stack { display: flex; align-items: center; margin-top: 12px; }
.member-stack .avatar { width: 34px; height: 34px; margin-right: -7px; border: 2px solid var(--surface-2); font-size: 12px; }
.group-actions { display: flex; gap: 8px; margin-top: 14px; }
.group-actions .button { flex: 1; min-height: 40px; font-size: 13px; }
.profile-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-hero .avatar { width: 64px; height: 64px; font-size: 22px; }
.profile-hero h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.profile-hero p { margin: 4px 0 0; color: var(--text-soft); }
.settings-grid { display: grid; gap: 14px; }
.profile-accordion { width: min(760px,100%); display: grid; gap: 10px; }
.profile-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.profile-panel h2 { margin: 0; }
.profile-panel-trigger { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 16px; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: 17px; font-weight: 680; letter-spacing: -.014em; cursor: pointer; touch-action: manipulation; }
.profile-panel-trigger:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.profile-panel-trigger:active { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.profile-panel-trigger[aria-expanded="true"] { color: var(--accent); }
.profile-panel-chevron { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); }
.profile-panel-chevron svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.profile-panel-trigger[aria-expanded="true"] .profile-panel-chevron { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.profile-panel-trigger[aria-expanded="true"] .profile-panel-chevron svg { transform: rotate(90deg); }
.profile-panel-content { padding: 16px; border-top: 1px solid var(--line); }
.profile-panel-content[hidden] { display: none; }
.profile-panel-content > p { margin: 0 0 16px; color: var(--text-soft); line-height: 1.45; }
.profile-save { margin-top: 4px; }
.choice-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-cloud .option { min-height: 42px; flex: 0 0 auto; }
.provider-choices .option { min-height: 52px; }
.range { width: 100%; accent-color: var(--accent); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.inline-fields { display: grid; gap: 12px; }
.account-actions { display: grid; gap: 8px; }

.bottom-nav { height: calc(var(--nav-h) + env(safe-area-inset-bottom)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5,1fr); padding: 8px 5px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 91%, transparent); backdrop-filter: blur(20px); }
.nav-button { min-width: 0; display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .006em; }
.nav-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-button[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

.toast-region { position: fixed; left: 14px; right: 14px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); z-index: 100; display: grid; justify-items: center; pointer-events: none; }
.toast { width: min(460px,100%); padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-3); color: var(--text); box-shadow: var(--shadow); font-size: 13px; font-weight: 620; animation: toast-in .2s ease both; }
.toast.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; padding: 12px; background: rgba(0,0,0,.56); backdrop-filter: blur(6px); }
.modal { width: min(560px,100%); max-height: min(86dvh, 760px); margin: 0 auto; overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal h2 { margin: 0; font-size: 25px; font-weight: 680; letter-spacing: -.03em; }
.modal p { color: var(--text-soft); line-height: 1.5; }
.invite-link { display: flex; gap: 8px; margin-top: 12px; }
.invite-link .input { min-width: 0; }

@media (min-width: 650px) {
  .auth-layout { padding: 40px; }
  .auth-wrap { grid-template-columns: minmax(0,1.2fr) minmax(360px,.8fr); align-items: center; }
  .onboarding { padding: 34px; }
  .option-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .app-main { padding: 30px 26px 50px; }
  .account-button span:last-child { display: inline; padding-right: 4px; }
  .title-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inline-fields { grid-template-columns: 1fr 160px; }
  .modal-backdrop { align-items: center; }
}

@media (min-width: 1024px) {
  .app-shell { padding: 0 0 0 224px; }
  .topbar { height: 78px; padding: 0 30px; }
  .brand-button { display: none; }
  .desktop-rail { width: 224px; position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; padding: 24px 16px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: blur(18px); }
  .desktop-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; font-size: 22px; font-weight: 740; letter-spacing: -.03em; }
  .desktop-brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .rail-nav { display: grid; gap: 5px; }
  .rail-nav .nav-button { min-height: 48px; grid-template-columns: 28px 1fr; justify-items: start; padding: 0 13px; font-size: 14px; }
  .rail-note { margin-top: auto; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--text-soft); font-size: 12px; line-height: 1.45; }
  .bottom-nav { display: none; }
  .app-main { width: min(1100px,100%); padding: 36px 34px 60px; }
  .picks-layout { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(400px,1fr); gap: 34px; align-items: start; }
  .picks-controls { position: sticky; top: 112px; }
  .pick-stage { width: 100%; }
  .title-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
}

@media (max-width: 649px) {
  html, body { overscroll-behavior-y: contain; }
  .auth-layout { min-height: 100svh; align-items: stretch; padding: max(14px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom)); }
  .auth-wrap { min-height: calc(100svh - 28px); margin: 0; align-content: center; gap: 14px; }
  .auth-story { padding: 0 4px; }
  .poster-cloud { opacity: .42; }
  .poster-float { width: 82px; border-radius: 12px; }
  .poster-1 { left: -8px; top: -42px; }
  .poster-2 { left: 28%; top: -66px; }
  .poster-3 { right: 20%; top: -58px; }
  .poster-4 { right: -12px; top: -34px; }
  .poster-5 { display: none; }
  .auth-vignette { background: linear-gradient(180deg, rgba(7,16,31,.25), var(--canvas) 25%, var(--canvas) 100%); }
  .auth-brand { gap: 9px; font-size: 21px; }
  .auth-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .auth-story h1 { margin: 18px 0 9px; font-size: clamp(35px, 11vw, 46px); line-height: .98; }
  .auth-story > p { font-size: 15px; line-height: 1.4; }
  .auth-points { display: none; }
  .auth-panel { min-height: 0; padding: 14px; border-radius: 20px; }
  .auth-panel h2 { margin: 2px 4px 3px; font-size: 21px; }
  .auth-panel > p { margin: 0 4px 14px; font-size: 14px; line-height: 1.4; }
  .auth-modal-backdrop { align-items: start; }
  .auth-modal { margin: max(18px, env(safe-area-inset-top)) 0; padding: 14px; border-radius: 20px; }

  .onboarding { padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .onboarding-shell { min-height: calc(100svh - max(22px, env(safe-area-inset-top))); display: flex; flex-direction: column; }
  .onboarding-top { min-height: 44px; }
  .onboarding-top .auth-brand { font-size: 19px; }
  .onboarding-signout { min-height: 44px; padding-inline: 10px; font-size: 13px; }
  .progress { margin: 9px 0 12px; }
  .onboarding-card { padding: 16px; border-radius: 20px; }
  .onboarding-card h1, .page-heading h1 { font-size: clamp(27px, 8vw, 34px); }
  .onboarding-card h2 { margin: 12px 0 7px; font-size: 16px; }
  .lede { margin: 7px 0 14px; font-size: 14px; line-height: 1.38; }
  .inline-fields { gap: 10px; }
  .option-grid { gap: 8px; }
  .option { min-height: 44px; padding: 7px 9px; font-size: 13px; }
  .provider-logo { width: 30px; height: 30px; }
  .form-actions { margin-top: 14px; }
  .choice-cloud { gap: 7px; }
  #languageOptions, #genreOptions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #languageOptions .option, #genreOptions .option { min-width: 0; width: 100%; overflow-wrap: anywhere; text-align: center; }

  .taste-stage { gap: 9px; }
  .taste-intro .lede { margin-bottom: 2px; }
  .taste-counter { min-height: 20px; }
  .taste-title { grid-template-columns: 86px minmax(0,1fr); border-radius: 15px; }
  .taste-title img, .taste-title .poster-placeholder { width: 86px; height: 128px; border-radius: 0; }
  .taste-copy { padding: 11px; }
  .taste-copy h2 { margin: 4px 0 6px; font-size: 19px; }
  .taste-copy p { font-size: 12px; }
  .taste-actions { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
  .taste-actions button { min-height: 44px; padding: 5px 2px; font-size: 10px; }
  .onboarding-quiz-back { margin-top: 8px; }
}

@media (max-width: 649px) and (max-height: 700px) {
  .auth-story h1 { margin-top: 12px; font-size: 34px; }
  .auth-panel > p { margin-bottom: 10px; }
  .onboarding-card { padding: 13px; }
  .taste-intro .lede { display: none; }
  .taste-title { grid-template-columns: 74px minmax(0,1fr); }
  .taste-title img, .taste-title .poster-placeholder { width: 74px; height: 110px; }
  .taste-copy h2 { font-size: 18px; }
}

@media (max-width: 390px) {
  .taste-title { grid-template-columns: 74px minmax(0,1fr); }
  .taste-title img, .taste-title .poster-placeholder { width: 74px; height: 110px; }
  .taste-copy { padding: 10px; }
  .taste-copy h2 { font-size: 18px; }
  .taste-actions { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .decision-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .decision { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
