/* ============================================================
   MyMovie.live — cinematic luxury theme
   ============================================================ */

:root {
    /* ---- HOLLYWOOD CINEMATIC NOIR ----
       Deep black backdrop, rich cinematic reds (#E11D2E), soft white
       typography, glassmorphism panels with backdrop-blur, subtle film
       grain, floating light particles, lens-flare warmth.
       Mood: Netflix / Apple TV+ / A24 / IMAX trailer — emotional,
       inspirational, magical, epic storytelling.

       Names kept stable for cascade compatibility: --chrome is the
       "card surface" (translucent glass), --on-chrome is "text on card"
       (white-with-alpha). --red is the primary cinematic accent. */

    /* Background gradient endpoints — deep cinema black */
    --bg: #050507;             /* near-black with a hint of blue */
    --bg-2: #0a0608;           /* warmer noir black */
    --bg-deep: #000000;        /* true theatrical black */

    /* Translucent surfaces — glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.045);
    --glass-bg-strong: rgba(255, 255, 255, 0.075);
    --glass-stroke: rgba(255, 255, 255, 0.10);
    --glass-edge: rgba(255, 255, 255, 0.28);  /* top "light reflection" rule */
    --glass-shadow:
        0 14px 44px rgba(0, 0, 0, 0.55),
        0 2px 6px rgba(0, 0, 0, 0.35);

    /* Legacy variable aliases so existing CSS rules keep working */
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.065);
    --stroke: var(--glass-stroke);
    --stroke-strong: rgba(255, 255, 255, 0.20);
    --chrome: var(--glass-bg);
    --chrome-2: rgba(255, 255, 255, 0.075);
    --chrome-stroke: var(--glass-stroke);
    --on-chrome: rgba(255, 255, 255, 0.94);
    --on-chrome-muted: rgba(255, 255, 255, 0.58);

    /* Text on the dark page — soft white */
    --text: rgba(255, 255, 255, 0.94);
    --muted: rgba(255, 255, 255, 0.58);

    /* Accent palette — cinematic red + supporting warmth */
    --red: #E11D2E;            /* primary cinematic red */
    --red-dark: #B81824;       /* hover / pressed */
    --red-deep: #7a0f17;       /* deep poster red */
    --red-glow: rgba(225, 29, 46, 0.55);
    --red-soft: rgba(225, 29, 46, 0.12);
    --ember: #ff5a3c;          /* lens-flare ember */
    --amber: #ffb86b;          /* warm light leak */

    /* Legacy color aliases — keep names alive but point at the new palette */
    --gold: #f5d28a;           /* soft champagne for premiere accents */
    --gold-deep: #d6b06a;
    --teal: #6cd6ff;           /* cool moonlight accent */
    --coral: var(--ember);
    --lavender: #c9a7ff;
    --pink: var(--ember);
    --violet: var(--lavender);
    --blue: var(--teal);
    --gradient: linear-gradient(135deg, #E11D2E 0%, #7a0f17 100%);
    --gradient-flare: radial-gradient(circle at 30% 30%, #ffb86b 0%, #E11D2E 45%, transparent 75%);

    --radius-lg: 20px;          /* glassmorphism softness */
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-card: var(--glass-shadow);
    --shadow-glow: 0 0 36px var(--red-glow);
}

/* Migraine accessibility — kill all non-essential motion for any user who
   has prefers-reduced-motion set in their OS. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

* { box-sizing: border-box; }

/* HTML5 [hidden] must always win over our `display:` rules on classes/IDs.
   Without this, .location-empty { display: flex } (and similar) keep the
   element visible even when hidden=true is toggled in JS. */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    /* Cinematic noir backdrop: theatrical black, warmed by a faint red
       vignette top-right and a cool moonlight wash bottom-left. The
       ambient orb / particle / grain layers float above this base. */
    background:
        radial-gradient(ellipse 70% 50% at 80% -10%, rgba(225, 29, 46, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 60% at 10% 110%, rgba(108, 214, 255, 0.06) 0%, transparent 65%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 55%, var(--bg-2) 100%) fixed;
    color: var(--text);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    /* Fluid base: scales gently across viewports. */
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Headlines / display type — Fraunces variable, italic personality. */
.hero-title, .hero-title em,
.feature-pill-title, .scoreTitle,
.auth-title, .auth-modal-title,
.profile-name, .profile-list-title,
.credits-explainer-title,
.movie-editor-title, .add-next-title,
.section-title, .display-h, .legal-title,
.admin-title, .admin-section-title {
    font-family: 'Fraunces', 'Plus Jakarta Sans', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

/* ----- ambient cinematic background -------------------------- */

.ambient {
    /* Fixed full-viewport layer for the animated diffused color blobs that
       define the Contemporary Warm Glassmorphism aesthetic. */
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    /* Each "orb" is a diffused cinematic light leak — projector-bulb red,
       lens-flare ember, distant moonlight teal, premiere-aisle amber.
       Heavy blur, low opacity, slow drift. Reads as anamorphic bokeh. */
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.32;
    will-change: transform;
    animation: orbDrift 26s ease-in-out infinite alternate;
}
.orb-1 { width: 560px; height: 560px; background: #E11D2E; top: -140px; left: -140px;  animation-delay: -3s;  opacity: 0.30; }
.orb-2 { width: 520px; height: 520px; background: #ff5a3c; top: 22%; right: -160px;    animation-delay: -8s;  opacity: 0.22; }
.orb-3 { width: 620px; height: 620px; background: #7a0f17; bottom: -200px; left: 26%;  animation-delay: -13s; opacity: 0.40; }
.orb-4 { width: 440px; height: 440px; background: #6cd6ff; top: 60%; left: -120px;     animation-delay: -18s; opacity: 0.10; }

@keyframes orbDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(60px, -40px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(0.94); }
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(12px, -8px) scale(1.02); }
}

.grain {
    /* Subtle film grain — a tiny SVG fractal noise tile, tiled over the
       whole viewport, multiplied lightly so it reads on black without
       muddying type. Animated to gently flicker like real stock. */
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.10;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.85 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 180px 180px;
    animation: grain-shift 1.2s steps(6) infinite;
}
@keyframes grain-shift {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-6px, 4px); }
    40%  { transform: translate(5px, -3px); }
    60%  { transform: translate(-4px, -5px); }
    80%  { transform: translate(3px, 6px); }
    100% { transform: translate(0, 0); }
}

/* ----- cinematic background allegory — film strips, lenses, reels ---------- */

.cine {
    /* White line-art props that whisper a film-studio atmosphere behind
       the glass UI. Slow drift; never grabs focus. */
    display: block;
    position: absolute;
    color: #fff;
    opacity: 0.07;
    pointer-events: none;
    animation: cine-drift 30s ease-in-out infinite;
}

.cine-clapper {
    top: 7%;
    right: 4%;
    width: 280px;
    height: 210px;
    transform: rotate(-12deg);
    animation-delay: -4s;
    opacity: 0.075;
}
.cine-reel {
    bottom: 16%;
    left: 2%;
    width: 340px;
    height: 340px;
    animation: cine-spin 90s linear infinite;
    opacity: 0.06;
}
.cine-lens {
    top: 36%;
    right: 6%;
    width: 260px;
    height: 260px;
    animation-delay: -12s;
    opacity: 0.06;
}
.cine-chair {
    bottom: 8%;
    right: 6%;
    width: 200px;
    height: 250px;
    transform: rotate(6deg);
    animation-delay: -18s;
    opacity: 0.07;
}
.cine-filmstrip {
    top: 50%;
    left: -5%;
    width: 110%;
    height: 70px;
    transform: rotate(-3deg);
    opacity: 0.055;
    animation: none;
}

@keyframes cine-drift {
    0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
    50%      { transform: translate(10px, -14px) rotate(var(--rot, 0deg)); }
}
.cine-clapper { --rot: -12deg; }
.cine-chair   { --rot: 6deg; }

@keyframes cine-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
    .cine-clapper, .cine-lens { display: none; }
    .cine-reel { width: 220px; height: 220px; }
    .cine-chair { width: 140px; height: 175px; }
}

/* ----- cinematic light leaks, lens flares, particles ----------------------- */

.flare {
    /* Anamorphic lens flare — warm amber→red radial bloom that pulses
       slowly, sitting just above the orbs and just below content. */
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    background: var(--gradient-flare);
    filter: blur(40px);
    mix-blend-mode: screen;
    opacity: 0.55;
    animation: flare-pulse 9s ease-in-out infinite;
}
.flare-1 { top: -8%; right: -6%; width: 520px; height: 520px; animation-delay: 0s; }
.flare-2 { bottom: -14%; left: -10%; width: 460px; height: 460px; opacity: 0.35; animation-delay: -4.5s; }
@keyframes flare-pulse {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.55; }
    50%      { transform: scale(1.08) translate(12px, -8px); opacity: 0.72; }
}

.light-sweep {
    /* IMAX-trailer light sweep: a thin diagonal sheen that travels across
       the whole viewport once every ~14s. Pure projector beam. */
    position: fixed;
    inset: -20% -40%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        transparent 0%,
        transparent 38%,
        rgba(255, 255, 255, 0.05) 48%,
        rgba(255, 184, 107, 0.10) 50%,
        rgba(255, 255, 255, 0.05) 52%,
        transparent 62%,
        transparent 100%
    );
    mix-blend-mode: screen;
    transform: translateX(-30%) rotate(8deg);
    animation: light-sweep 14s ease-in-out infinite;
}
@keyframes light-sweep {
    0%   { transform: translateX(-40%) rotate(8deg); opacity: 0; }
    20%  { opacity: 0.9; }
    50%  { transform: translateX(10%) rotate(8deg); opacity: 0.9; }
    80%  { opacity: 0; }
    100% { transform: translateX(40%) rotate(8deg); opacity: 0; }
}

.particles {
    /* Floating dust / light motes layer. Each .particle is a small
       white dot that drifts upward like backlit dust in a projector
       beam. Z below content; pointer-events off. */
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    bottom: -20px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.8),
        0 0 14px rgba(255, 184, 107, 0.45);
    opacity: 0;
    animation: particle-rise 18s linear infinite;
}
.particle:nth-child(1)  { left:  4%; animation-delay:  0s;   animation-duration: 22s; width: 2px; height: 2px; }
.particle:nth-child(2)  { left: 12%; animation-delay: -3s;   animation-duration: 18s; }
.particle:nth-child(3)  { left: 20%; animation-delay: -6s;   animation-duration: 26s; width: 4px; height: 4px; }
.particle:nth-child(4)  { left: 28%; animation-delay: -9s;   animation-duration: 20s; }
.particle:nth-child(5)  { left: 36%; animation-delay: -12s;  animation-duration: 24s; width: 2px; height: 2px; }
.particle:nth-child(6)  { left: 44%; animation-delay: -15s;  animation-duration: 19s; }
.particle:nth-child(7)  { left: 52%; animation-delay: -2s;   animation-duration: 27s; width: 4px; height: 4px; }
.particle:nth-child(8)  { left: 60%; animation-delay: -5s;   animation-duration: 21s; }
.particle:nth-child(9)  { left: 68%; animation-delay: -8s;   animation-duration: 23s; width: 2px; height: 2px; }
.particle:nth-child(10) { left: 76%; animation-delay: -11s;  animation-duration: 25s; }
.particle:nth-child(11) { left: 84%; animation-delay: -14s;  animation-duration: 20s; width: 3px; height: 3px; }
.particle:nth-child(12) { left: 92%; animation-delay: -17s;  animation-duration: 24s; }
@keyframes particle-rise {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
    8%   { opacity: 0.9; }
    50%  { transform: translate(28px, -55vh) scale(1); opacity: 0.85; }
    92%  { opacity: 0.4; }
    100% { transform: translate(-12px, -110vh) scale(0.7); opacity: 0; }
}

@media (max-width: 720px) {
    .flare-1 { width: 320px; height: 320px; }
    .flare-2 { width: 280px; height: 280px; }
    .particle:nth-child(n+8) { display: none; }
}

/* ----- top bar ----------------------------------------------- */

.topbar {
    /* Cinematic noir navbar — black glass with a faint red ember beneath,
       backdrop-blurred over the projector-beam ambient layer. */
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(8, 4, 6, 0.55) 100%);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-bottom: 1px solid var(--glass-stroke);
    box-shadow: 0 1px 0 rgba(225, 29, 46, 0.18);
    color: var(--text);
}
.topnav { color: var(--muted); }
.topnav a:hover { color: var(--text); }
.lang-picker {
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--glass-stroke);
}
.lang-btn { color: var(--muted); }
.lang-btn:hover { color: var(--text); background: var(--red-soft); }
.lang-btn.is-active { background: var(--red); color: #fff; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: 0.02em; }

/* MyMovie.Live wordmark — the source PNG has dark text + red accents on
   a transparent background. Inverting then rotating hue 180° flips the
   dark glyphs to white while preserving the reds (red → cyan via
   invert, then cyan → red via hue-rotate). Drop-shadow gives the
   anamorphic glow that sits on the noir bar. */
.brand-logo {
    display: block;
    height: 34px;
    width: auto;
    filter:
        invert(1) hue-rotate(180deg)
        drop-shadow(0 0 14px rgba(225, 29, 46, 0.35));
    transition: filter 0.3s ease, transform 0.3s ease;
}
.brand:hover .brand-logo,
.auth-nav-brand:hover .brand-logo {
    filter:
        invert(1) hue-rotate(180deg)
        drop-shadow(0 0 22px rgba(225, 29, 46, 0.65));
    transform: translateY(-1px);
}
@media (max-width: 720px) {
    .brand-logo { height: 28px; }
}

.brand-mark {
    /* Premiere ticket — red-on-black with a soft ember halo. */
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow:
        0 6px 18px -6px var(--red-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.brand-mark::before { display: none; }
.brand-text {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 20px;
    color: var(--text);
}

.topnav { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--muted); }
.topnav a { transition: color 0.2s ease; }
.topnav a:hover { color: var(--text); }

.lang-picker {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface);
    border: 1.5px solid var(--stroke);
    border-radius: 999px;
}
.lang-btn {
    padding: 7px 12px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
    text-transform: uppercase;
}
.lang-btn:hover { color: var(--text); background: var(--red-soft); }
.lang-btn.is-active {
    color: white;
    background: var(--red);
}

/* ----- container --------------------------------------------- */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 40px 120px;
}

/* ----- hero -------------------------------------------------- */

.hero { text-align: center; margin-bottom: 64px; }

.badge {
    /* Glass pill tag on the hero — small caps, gold accent. */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold);
    margin-bottom: 28px;
}
.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--red);
    /* No glow + no pulse — pulsing is a known migraine trigger. */
}
@keyframes pulse {
    /* Kept as a no-op so any cascading reference doesn't break. */
    0%, 100% { opacity: 1; }
}

.hero-title {
    /* Fraunces italic variable — cinematic personality. 56px / 36px per spec. */
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(36px, 5.5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 22px;
    color: var(--text);
}
.hero-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-tagline {
    margin: 0 auto 16px;
    max-width: 720px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--gold);
}

.hero-sub {
    max-width: 640px;
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
    font-weight: 400;
}

/* ----- features strip --------------------------------------- */

.features-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 64px 0 96px;
}
.feature-pill {
    padding: 24px 24px 22px;
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.feature-pill:hover {
    transform: translateY(-2px);
    border-color: var(--stroke-strong);
}
.feature-pill-num {
    display: inline-block;
    margin-bottom: 16px;
    padding: 4px 9px;
    border: 1px solid var(--red);
    color: var(--red);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    border-radius: 3px;
}
.feature-pill-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.005em;
}
.feature-pill-body {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 880px) {
    .features-strip { grid-template-columns: 1fr; gap: 14px; margin: 48px 0 72px; }
}

.banner {
    margin: 28px auto 0;
    max-width: 620px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: rgba(225, 29, 46, 0.08);
    border: 1px solid rgba(225, 29, 46, 0.3);
    font-size: 14px;
    color: #ffe0eb;
}
.banner code {
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}

/* ----- glass surfaces ---------------------------------------- */

.glass {
    /* True glassmorphism — frosted translucent panel with a light-reflection
       hairline at the top edge, soft 8px-radius shadow underneath. */
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    color: var(--text);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}
/* Glass-edge: thin bright line at the top of every card (light catches
   the bevel of frosted glass). */
.glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--glass-edge);
    pointer-events: none;
}
/* Anything inside a chrome card that uses --text or --muted needs the
   on-chrome equivalents so it doesn't disappear into the dark surface. */
.glass,
.glass p, .glass h1, .glass h2, .glass h3, .glass h4,
.glass label, .glass li, .glass span:not([class]),
.glass .studio-label,
.glass .feature-pill-title,
.glass .feature-pill-body,
.glass .auth-title, .glass .auth-sub, .glass .auth-foot,
.glass .profile-name, .glass .profile-meta, .glass .profile-credits-label,
.glass .profile-list-title, .glass .profile-list-count,
.glass .credits-explainer-title, .glass .credits-explainer-body,
.glass .credits-explainer-list li, .glass .credits-explainer-foot,
.glass .scoreTitle, .glass .score-eyebrow,
.glass .movie-editor-title, .glass .movie-editor-sub,
.glass .add-next-title, .glass .add-next-sub, .glass .add-next-eyebrow,
.glass .admin-title, .glass .admin-sub, .glass .admin-section-title,
.glass .legal, .glass .legal p, .glass .legal h2, .glass .legal li {
    color: var(--on-chrome);
}
.glass .muted,
.glass .hint,
.glass .pane-hint,
.glass .section-hint,
.glass .auth-modal-sub,
.glass .feature-pill-body,
.glass .profile-meta,
.glass .profile-list-count,
.glass .scoreBriefDefault,
.glass .frame-count-hint,
.glass .credits-explainer-body,
.glass .credits-explainer-foot,
.glass .add-next-sub,
.glass .movie-editor-sub,
.glass .admin-sub {
    color: var(--on-chrome-muted);
}

/* ----- studio (script input) --------------------------------- */

.studio {
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 96px;
}

.studio-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 10px;
}
.studio-label .hint {
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    margin-left: 6px;
}

/* tabs */
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-stroke);
    border-radius: 999px;
    width: fit-content;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--on-chrome-muted);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.tab:hover { color: var(--on-chrome); }
.tab.is-active {
    color: #fff;
    background: var(--gold);
    box-shadow: 0 6px 18px -8px rgba(225, 29, 46, 0.55);
}
.tab-pane { display: none; }
.tab-pane.is-active { display: block; }

/* Guided form grid */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
}
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1.5px solid var(--chrome-stroke);
    border-radius: var(--radius-md);
    color: var(--on-chrome);
    font-family: inherit;
    font-size: 18px;
    font-weight: 450;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input[type="text"]::placeholder { color: #B19A88; }
.field input[type="text"]:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(242, 106, 74, 0.18);
}
.field input[type="text"].shake {
    animation: shake 0.4s ease;
    border-color: var(--pink);
}
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip.is-selected {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 20px -8px rgba(225, 29, 46, 0.6);
}

@media (max-width: 640px) {
    .field-grid { grid-template-columns: 1fr; }
}

textarea {
    width: 100%;
    min-height: 160px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: inherit;
    font-size: 17px;
    line-height: 1.55;
    font-weight: 400;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea::placeholder { color: rgba(255, 255, 255, 0.45); }
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.22);
}
textarea::placeholder { color: #B19A88; }
textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(242, 106, 74, 0.18);
}
textarea.shake { animation: shake 0.4s ease; border-color: var(--pink); }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.examples-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-right: 4px;
}
.chip {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-stroke);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    min-height: 36px;
}
.chip:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    background: rgba(225, 29, 46, 0.14);
}

/* ----- frame count slider ----------------------------------- */

.frame-count {
    margin-top: 22px;
    padding: 18px 18px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--radius-md);
    color: var(--text);
}
.frame-count-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.frame-count-row .studio-label {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.frame-count-value {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    text-transform: none;
}
.frame-count-cost {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.frame-count-cost #frame-count-cost-value {
    color: var(--red);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.frame-count-slider {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    background: var(--stroke);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
.frame-count-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(225, 29, 46, 0.5);
    transition: transform 0.15s ease;
}
.frame-count-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.frame-count-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(225, 29, 46, 0.5);
}
.frame-count-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
    font-size: 10px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ----- friendly explainer text (panes, sections, frame-count) ----- */
.pane-hint {
    color: var(--text);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 18px;
    padding: 14px 18px;
    background: rgba(225, 29, 46, 0.10);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
}
.section-hint {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 6px 0 14px;
}
.optional-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 999px;
    vertical-align: middle;
    font-weight: 500;
}
.frame-count-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    margin: 10px 0 0;
    text-align: center;
    font-style: italic;
}

/* ----- profile page: credits explainer ----- */
.credits-explainer {
    padding: 20px 24px;
    border-radius: var(--radius-lg, 16px);
    margin-bottom: 18px;
}
.credits-explainer-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    margin: 0 0 6px;
    color: var(--text);
}
.credits-explainer-body {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 12px;
}
.credits-explainer-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 18px;
}
.credits-explainer-list li {
    color: var(--text);
    font-size: 13px;
    opacity: 0.9;
    padding-left: 18px;
    position: relative;
    line-height: 1.45;
}
.credits-explainer-list li::before {
    content: "·";
    position: absolute;
    left: 6px;
    color: var(--red);
    font-weight: 700;
}
.credits-explainer-list li strong { color: var(--red); font-weight: 600; }
.credits-explainer-foot {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
    font-style: italic;
}
@media (max-width: 640px) {
    .credits-explainer-list { grid-template-columns: 1fr; }
}

/* ----- character upload ------------------------------------ */

.char-upload {
    margin-top: 22px;
}
.char-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.char-upload-drop {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.025);
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.char-upload-drop:hover {
    border-color: var(--red);
    background: rgba(225, 29, 46, 0.06);
}
.char-upload-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    text-align: center;
    padding: 8px;
    line-height: 1.2;
}
.char-upload-icon {
    font-size: 20px;
    font-weight: 300;
    color: var(--muted);
}
.char-upload-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
#char-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.char-upload-clear {
    padding: 7px 12px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.char-upload-clear:hover { color: var(--text); border-color: var(--stroke-strong); }

/* ----- cast grid (up to 5 character refs) ------------------- */
.cast-block { margin-top: 22px; }
.cast-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.cast-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    position: relative;
}
.cast-drop {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.025);
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.cast-card.is-filled .cast-drop {
    border-style: solid;
    border-color: rgba(225, 29, 46, 0.45);
}
.cast-drop:hover {
    border-color: var(--red);
    background: rgba(225, 29, 46, 0.06);
}
.cast-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    text-align: center;
    padding: 8px;
    line-height: 1.2;
}
.cast-empty-icon {
    font-size: 22px;
    font-weight: 300;
    color: var(--muted);
}
.cast-empty-text {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.cast-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cast-name {
    width: 100%;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
}
.cast-name::placeholder { color: var(--muted); opacity: 0.6; }
.cast-name:focus {
    outline: none;
    border-color: rgba(225, 29, 46, 0.6);
}
.cast-clear {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.cast-clear:hover { background: var(--red-dark); border-color: var(--red); }

/* ----- location reference --------------------------------- */
.location-block { margin-top: 22px; }
.location-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}
.location-drop {
    position: relative;
    width: 160px;
    height: 90px;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.025);
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.location-drop:hover {
    border-color: var(--red);
    background: rgba(225, 29, 46, 0.06);
}
.location-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    text-align: center;
    padding: 8px;
    line-height: 1.2;
}
.location-icon { font-size: 22px; font-weight: 300; color: var(--muted); }
.location-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
#location-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.location-clear {
    padding: 7px 12px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}
.location-clear:hover { color: var(--text); border-color: var(--stroke-strong); }

/* ----- camera control block (animate modal) ---------------- */
.camera-control-block {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.camera-control-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-top: 4px;
}

/* ----- per-frame dialogue + voiceover button --------------- */
.card-dialogue {
    margin: 6px 0 0;
    font-style: italic;
    color: var(--text);
    opacity: 0.85;
    font-size: 13px;
    line-height: 1.35;
}
.card-btn-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.card-voice-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.card-voice-btn:hover {
    color: var(--text);
    border-color: rgba(225, 29, 46, 0.55);
    background: rgba(225, 29, 46, 0.05);
}
.card-voice-btn svg {
    width: 13px;
    height: 13px;
    flex: none;
}
.card-voice-btn:disabled { opacity: 0.5; cursor: progress; }

.studio-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
}
.counter {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.cta {
    /* Warm gold pill — primary CTA. Generous touch target (48px+), subtle
       glow on hover. Per spec: border-radius 50px, padding 16px 36px. */
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    min-height: 52px;
    border: none;
    border-radius: 50px;
    background: var(--gold);
    color: #fff;
    font-family: 'Plus Jakarta Sans', inherit;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
    box-shadow: 0 8px 24px -10px rgba(225, 29, 46, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cta:hover {
    transform: translateY(-1px) scale(1.02);
    background: var(--gold-deep);
    box-shadow: 0 0 0 6px rgba(225, 29, 46, 0.14),
                0 14px 36px -12px rgba(225, 29, 46, 0.75);
}
.cta:focus-visible {
    outline: 3px solid rgba(225, 29, 46, 0.6);
    outline-offset: 3px;
}
.cta:disabled { cursor: progress; filter: saturate(0.7); }

.cta-spinner {
    display: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}
.cta.is-loading .cta-spinner { display: inline-block; }
.cta.is-loading .cta-label::after { content: 'ing'; }
.cta.is-loading .cta-label { font-style: italic; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- storyboard / scenes ---------------------------------- */

#scenes { display: flex; flex-direction: column; gap: 0; }

.scene {
    padding: 36px 0 56px;
    border-top: 1px solid var(--stroke);
}
.scene:first-child { border-top: none; padding-top: 16px; }

.scene-header { margin-bottom: 28px; }
.scene-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 8px;
}
.scene-eyebrow {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}
.scene-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 32px;
    margin: 0;
}
.scene-meta {
    color: var(--muted);
    font-style: italic;
    margin: 0;
    max-width: 720px;
}

/* ----- movie editor ----------------------------------------- */

.movie-editor {
    margin: 24px 0 0;
    padding: 24px 24px 22px;
    border-radius: var(--radius-lg);
}
.movie-editor-head { margin-bottom: 18px; }
.movie-editor-eyebrow {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--red);
    margin-bottom: 8px;
}
.movie-editor-title {
    margin: 0 0 6px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 22px;
}
.movie-editor-sub {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-clips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 18px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    min-height: 80px;
}
.movie-clip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    cursor: grab;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.movie-clip:hover { background: rgba(255, 255, 255, 0.07); }
.movie-clip:active { cursor: grabbing; }
.movie-clip.is-dragging { opacity: 0.4; }
.movie-clip.is-drop-target { border-color: var(--red); background: rgba(225, 29, 46, 0.08); }
.movie-clip.is-excluded { opacity: 0.4; }

.movie-clip-num {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--red);
    width: 24px;
    font-variant-numeric: tabular-nums;
}
.movie-clip-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    background: #000;
    flex-shrink: 0;
}
.movie-clip-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.movie-clip-scene {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.movie-clip-title {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.movie-clip-toggle {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.movie-clip-toggle:hover { color: var(--text); border-color: var(--stroke-strong); }

.movie-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.movie-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}
.movie-field input[type="text"]:focus {
    outline: none;
    border-color: rgba(225, 29, 46, 0.6);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.12);
}

.movie-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.movie-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.movie-toggle input { accent-color: var(--red); }

.movie-status {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
}

@media (max-width: 640px) {
    .movie-fields { grid-template-columns: 1fr; }
    .movie-clip-thumb { width: 60px; height: 34px; }
}

/* ----- export bar ------------------------------------------- */

.export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0 0;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
}
.export-bar-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.export-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.005em;
}
.export-bar-sub {
    font-size: 12px;
    color: var(--muted);
}
@media (max-width: 640px) {
    .export-bar { flex-direction: column; align-items: stretch; }
    .export-bar .cta { width: 100%; justify-content: center; }
}

/* ----- Add next scene panel --------------------------------- */

.add-next-scene {
    margin: 24px 0 96px;
    padding: 28px 28px 24px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.025);
}
.add-next-head { margin-bottom: 16px; }
.add-next-eyebrow {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--red);
    margin-bottom: 8px;
}
.add-next-title {
    margin: 0 0 6px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 22px;
}
.add-next-sub {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}
#add-next-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
}
#add-next-input:focus {
    outline: none;
    border-color: rgba(225, 29, 46, 0.6);
    box-shadow: 0 0 0 4px rgba(225, 29, 46, 0.12);
}
#add-next-input.shake { animation: shake 0.4s ease; border-color: var(--red); }
.add-next-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

/* ----- continuation suggestions ----------------------------- */

.suggestions-block {
    margin: 0 0 18px;
}
.suggestions-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--red);
    margin-bottom: 10px;
}
.suggestions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.suggestion-card {
    position: relative;
    text-align: left;
    padding: 14px 14px 14px 38px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    min-height: 80px;
}
.suggestion-card:hover {
    background: rgba(225, 29, 46, 0.06);
    border-color: rgba(225, 29, 46, 0.5);
    transform: translateY(-1px);
}
.suggestion-num {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--red);
}
.suggestion-text {
    display: block;
    color: var(--text);
}
.suggestion-card.is-loading {
    color: var(--muted);
    font-style: italic;
    padding-left: 14px;
    grid-column: 1 / -1;
    pointer-events: none;
}

@media (max-width: 720px) {
    .suggestions-row { grid-template-columns: 1fr; }
}

/* ----- loader ------------------------------------------------ */

.loader {
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-bottom: 24px;
    transition: opacity 0.4s ease;
}
.loader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.loader-message {
    font-size: 14px;
    color: var(--text);
    letter-spacing: 0.01em;
    transition: opacity 0.22s ease;
    font-style: italic;
}
.loader-count {
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    white-space: nowrap;
}
.loader-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.loader-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: var(--gradient);
    background-size: 200% 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 16px rgba(225, 29, 46, 0.6);
    animation: gradient-slide 3s linear infinite;
}
@keyframes gradient-slide {
    to { background-position: -200% 0; }
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--stroke);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--stroke-strong);
    box-shadow: 0 30px 60px -20px rgba(225, 29, 46, 0.5);
}

.card-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0a0a10;
}
.card-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}
.card:hover .card-frame img { transform: scale(1.06); }

.card-shot-no {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.card-clip-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--red);
    color: white;
    box-shadow: 0 4px 12px -3px rgba(225, 29, 46, 0.7);
}
.card-clip-badge svg {
    width: 11px;
    height: 11px;
    display: block;
}

.card-body { padding: 16px 18px 20px; }
.card-animate-btn {
    margin-top: 12px;
    width: 100%;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.card-animate-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(225, 29, 46, 0.4);
    transform: translateY(-1px);
}

.chip-row-sm .chip {
    padding: 5px 10px;
    font-size: 11px;
}
.cta-sm {
    padding: 9px 18px;
    font-size: 13px;
}
.cta-download {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 8px 22px -8px rgba(255, 255, 255, 0.3);
    font-size: 14px;
    padding: 10px 22px;
}
.cta-download:hover {
    background: #ffffff;
    box-shadow: 0 10px 28px -8px rgba(255, 255, 255, 0.5);
}

/* ----- animate modal — mobile-first ------------------------- */

/* The Animate ("Make this picture move") modal. Tricky layout: we need a
   big media preview AND a long controls column (chips wrap a lot). The
   panel itself scrolls — preview + controls live in normal flow inside
   it — so nothing ever gets cut off no matter how tall the chip rows
   grow.
   Viewport height uses 100dvh so the iOS Safari URL bar collapse never
   clips the bottom. */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 8px;
    overscroll-behavior: contain;
}
.modal[hidden] { display: none !important; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 6, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: fade-in 0.25s ease;
}
@keyframes fade-in { from { opacity: 0; } }
body.modal-open { overflow: hidden; }

.modal-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 16px);
    border-radius: var(--radius-lg);
    overflow: hidden;                    /* clip the corner radius */
    animation: panel-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes panel-in {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--stroke);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.85); transform: scale(1.08); }

/* Preview — capped at 36dvh on mobile so the controls always have room
   to breathe. Contains the still image OR the rendered video. */
.modal-preview {
    position: relative;
    background: #000;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 36dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.modal-preview img,
.modal-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Controls column — flex column. The PANEL scrolls (not this), so the
   whole thing flows naturally and chip rows can wrap freely. */
.modal-controls {
    padding: 18px 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(10, 10, 14, 0.92);
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;                    /* fallback scroll if a single view is taller than dvh */
    -webkit-overflow-scrolling: touch;
}

/* --- Tablet & up: stack the panel a touch wider, keep stacked layout --- */
@media (min-width: 640px) {
    .modal { padding: 16px; }
    .modal-panel { max-width: 600px; }
    .modal-controls { padding: 22px 24px 26px; }
}

/* --- Desktop: side-by-side preview + controls, full-height columns --- */
@media (min-width: 920px) {
    .modal { padding: 24px; }
    .modal-panel {
        flex-direction: row;             /* preview left, controls right */
        max-width: min(1100px, calc(100vw - 48px));
        max-height: calc(100dvh - 48px);
    }
    .modal-preview {
        flex: 1 1 60%;
        aspect-ratio: auto;              /* fill column height instead */
        max-height: none;
        min-width: 0;
    }
    .modal-controls {
        flex: 0 0 40%;
        max-width: 460px;
        min-width: 320px;
        padding: 26px 28px;
        gap: 14px;
        overflow-y: auto;                /* controls scroll, preview stays put */
    }
}
.modal-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.modal-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold);
}
.modal-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 18px;                     /* mobile default; desktop bumps it below */
    letter-spacing: -0.01em;
}
@media (min-width: 640px) {
    .modal-title { font-size: 22px; }
}
.modal-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}
#modal-motion {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 16px;                     /* 16px prevents iOS Safari zoom-on-focus */
    line-height: 1.5;
    resize: vertical;
    min-height: 76px;
}
@media (min-width: 920px) {
    #modal-motion { font-size: 14px; }
}
#modal-motion:focus {
    outline: none;
    border-color: rgba(225, 29, 46, 0.5);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.1);
}
.motion-duration {
    width: 100%;                         /* mobile default — fills column */
    padding: 11px 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}
/* Mobile-first: actions stack into full-width buttons. Desktop turns them
   back into a flex-wrap row, with the duration select sized to content. */
.modal-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 4px;
}
.modal-actions .cta,
.modal-actions .cta-ghost-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-left: 0;
}
.cta-ghost-btn {
    padding: 11px 14px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.cta-ghost-btn:hover { color: var(--text); border-color: var(--stroke-strong); }

@media (min-width: 920px) {
    .modal-actions {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    .modal-actions .cta,
    .modal-actions .cta-ghost-btn {
        width: auto;
    }
    .modal-actions .cta-ghost-btn { margin-left: auto; }
    .motion-duration { width: auto; padding: 9px 14px; font-size: 13px; }
}

.modal-loader {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.modal-loader-msg {
    margin: 0;
    font-style: italic;
    color: var(--text);
    font-size: 13px;
    transition: opacity 0.2s ease;
}
.modal-loader-msg.modal-loader-msg-error {
    font-style: normal;
    font-weight: 600;
    color: var(--red);
    background: rgba(225, 29, 46, 0.10);
    border: 1px solid rgba(225, 29, 46, 0.35);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    line-height: 1.45;
}

.card-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.card-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, #15151c 8%, #1f1f28 18%, #15151c 33%);
    background-size: 200% 100%;
}
.shimmer { animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton.failed {
    background: repeating-linear-gradient(45deg, #1a1a22, #1a1a22 8px, #15151c 8px, #15151c 16px);
    animation: none;
}

/* ----- soundtrack panel -------------------------------------- */

.score {
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
}
.score-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}
.score-eyebrow {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold);
    margin-bottom: 8px;
}
.score-title {
    margin: 0 0 6px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.01em;
}
.score-brief {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
    max-width: 520px;
    transition: opacity 0.22s ease;
}
.cta-ghost {
    background: transparent;
    border: 1px solid var(--stroke-strong);
    box-shadow: none;
    flex-shrink: 0;
}
.cta-ghost:hover {
    background: var(--surface-2);
    border-color: rgba(225, 29, 46, 0.4);
    box-shadow: 0 0 30px -8px rgba(225, 29, 46, 0.3);
}
.score-loader {
    margin-top: 18px;
    transition: opacity 0.4s ease;
}
.score-fill {
    width: 0%;
    transition: width 0.6s ease-out;
}
.score-fill.is-loading {
    width: 92%;
    transition: width 22s cubic-bezier(0.15, 0.7, 0.25, 1);
}
.score-fill.is-done {
    width: 100%;
    transition: width 0.4s ease-out;
}

#score-player {
    width: 100%;
    margin-top: 18px;
    accent-color: var(--gold);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
}

/* ----- roadmap ----------------------------------------------- */

.roadmap-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 36px;
    margin: 0 0 28px;
    text-align: center;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature {
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.feature:hover {
    transform: translateY(-2px);
    border-color: var(--stroke-strong);
}
.feature-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--gradient);
    color: white;
    font-size: 18px;
    margin-bottom: 14px;
    box-shadow: 0 10px 24px -8px rgba(225, 29, 46, 0.7);
}
.feature h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}
.feature p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

/* ----- footer ------------------------------------------------ */

.foot {
    border-top: 1px solid var(--stroke);
    padding: 26px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 12px;
}

/* ----- responsive -------------------------------------------- */

@media (max-width: 960px) {
    .container { padding: 60px 24px 100px; }
    .topbar { padding: 16px 24px; }
    .topnav { display: none; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .container { padding: 48px 18px 80px; }
    .studio { padding: 20px; }
    .grid { grid-template-columns: 1fr; }
    .roadmap-grid { grid-template-columns: 1fr; }
    .studio-actions { flex-direction: column; align-items: stretch; }
    .cta { justify-content: center; }
    .foot { flex-direction: column; text-align: center; padding: 22px 18px; }
}

/* ==============================================================
   Mobile-first overrides — consolidated pass
   ============================================================== */

@media (max-width: 720px) {
    /* layout */
    .container { padding: 32px 16px 64px; }
    .topbar { padding: 12px 16px; }
    .topnav { gap: 10px; }

    /* hero */
    .hero { margin-bottom: 36px; }
    .hero-title { font-size: clamp(34px, 9.5vw, 56px); line-height: 1.05; }
    .hero-tagline { font-size: 13px; margin-bottom: 14px; letter-spacing: 0.05em; }
    .hero-sub { font-size: 15px; padding: 0 4px; line-height: 1.6; }
    .badge { font-size: 11px; padding: 5px 12px; margin-bottom: 22px; }

    /* features strip */
    .features-strip { margin: 36px 0 56px; gap: 12px; }
    .feature-pill { padding: 18px 18px 16px; }
    .feature-pill-title { font-size: 15px; }
    .feature-pill-body { font-size: 13px; }

    /* tabs — full-width, equal share */
    .tabs { width: 100%; }
    .tab { flex: 1; text-align: center; justify-content: center; padding: 11px 14px; }

    /* studio panel */
    .studio { padding: 18px 16px 22px; margin-bottom: 64px; }
    textarea { font-size: 16px; padding: 14px; }   /* 16px avoids iOS auto-zoom */
    .examples { gap: 8px; }
    .chip { font-size: 12px; padding: 7px 12px; }

    /* guided form grid */
    .field-grid { grid-template-columns: 1fr; gap: 14px 0; }
    .field input[type="text"] { font-size: 16px; padding: 13px 14px; }

    /* frame-count widget */
    .frame-count { padding: 14px 14px 12px; }
    .frame-count-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .frame-count-cost { font-size: 11px; }
    .frame-count-value { font-size: 24px; }

    /* character upload (legacy) */
    .char-upload-row { gap: 12px; flex-wrap: wrap; }
    .char-upload-drop { width: 78px; height: 78px; }
    .char-upload-text { font-size: 9px; }

    /* cast grid — 5 slots collapse to a single scrollable row on phones */
    .cast-grid {
        grid-template-columns: repeat(5, minmax(110px, 1fr));
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 10px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .cast-card { scroll-snap-align: start; }
    .cast-name { font-size: 12px; }

    /* location reference card stacks */
    .location-row { flex-wrap: wrap; gap: 10px; }
    .location-drop { width: 140px; height: 80px; }

    /* per-card buttons stack neatly */
    .card-btn-row { width: 100%; }
    .card-voice-btn { flex: 1; justify-content: center; }
    .card-animate-btn { flex: 1; }

    /* studio actions — full-width primary CTA */
    .studio-actions { gap: 10px; margin-top: 18px; }
    .cta { width: 100%; padding: 14px 18px; font-size: 15px; }
    .counter { text-align: center; font-size: 11px; }

    /* scenes */
    .scene { padding: 26px 0 36px; }
    .scene-title-wrap { flex-wrap: wrap; gap: 8px; }
    .scene-title { font-size: 22px; }
    .scene-meta { font-size: 13px; }

    /* card grid uses 1-col already at 640; keep cards tighter */
    .grid { gap: 14px; }
    .card { border-radius: 10px; }
    .card-title { font-size: 15px; }

    /* card animate button */
    .card-animate-btn { padding: 10px 14px; font-size: 12.5px; }

    /* score / soundtrack panel */
    .score { padding: 18px 16px; }
    .score-head { flex-direction: column; align-items: stretch; gap: 12px; }
    .score-title { font-size: 18px; }
    .cta-ghost { width: 100%; justify-content: center; }
    #score-player { width: 100%; }

    /* suggestions (already 1-col below 720) — tighten */
    .suggestion-card { font-size: 12.5px; padding: 12px 12px 12px 34px; min-height: 70px; }

    /* add next scene */
    .add-next-scene { padding: 18px 16px 16px; margin: 18px 0 56px; }
    .add-next-title { font-size: 18px; }
    .add-next-sub { font-size: 13px; }
    #add-next-input { font-size: 16px; padding: 13px 14px; }
    .add-next-actions .cta { width: 100%; }

    /* export bar */
    .export-bar { padding: 14px 16px; flex-direction: column; align-items: stretch; gap: 12px; }
    .export-bar .cta { width: 100%; justify-content: center; }
    .export-bar-label { font-size: 14px; }
    .export-bar-sub { font-size: 12px; }

    /* movie editor — stack clip rows so meta isn't squeezed */
    .movie-editor { padding: 18px 16px 16px; }
    .movie-editor-title { font-size: 18px; }
    .movie-clips { padding: 8px; gap: 8px; }
    .movie-clip {
        display: grid;
        grid-template-columns: auto auto 1fr;
        grid-template-areas:
            "num thumb meta"
            "btn  btn   btn ";
        gap: 8px 12px;
        padding: 10px;
        align-items: center;
    }
    .movie-clip-num { grid-area: num; }
    .movie-clip-thumb { grid-area: thumb; width: 64px; height: 36px; }
    .movie-clip-meta { grid-area: meta; }
    .movie-clip-toggle { grid-area: btn; width: 100%; padding: 8px 12px; }
    .movie-fields { grid-template-columns: 1fr; gap: 10px; }
    .movie-field input[type="text"] { font-size: 16px; }
    .movie-actions { flex-direction: column; align-items: stretch; gap: 12px; }
    .movie-actions .cta { width: 100%; }
    .movie-toggle { justify-content: center; padding: 10px 0; }

    /* animate modal — extra-narrow polish (most modal styles are already
       mobile-first defaults; this just dials the padding even tighter on
       phones < 540px). */
    .modal-controls { padding: 16px 14px 20px; }

    /* language picker — tighter pills */
    .lang-picker { gap: 1px; padding: 2px; }
    .lang-btn { padding: 6px 8px; font-size: 10px; letter-spacing: 0.06em; }

    /* misc */
    .footer-tagline, .foot { font-size: 12px; }
    .ambient .cine-chair, .ambient .cine-reel { opacity: 0.03; }
    .ambient .cine-clapper, .ambient .cine-lens { display: none; }
}

@media (max-width: 380px) {
    .container { padding: 24px 12px 48px; }
    .topbar { padding: 10px 12px; }
    .hero-title { font-size: 30px; }
    .brand-text { display: none; }
    .lang-btn { padding: 5px 6px; font-size: 9px; }
    .card-shot-no { font-size: 10px; }
    .scene-title { font-size: 20px; }
    .movie-clip-thumb { width: 56px; height: 32px; }
}

/* ============================================================
   Auth, Profile & Admin
   ============================================================ */

/* ----- user menu in main navbar ----- */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    padding-left: 14px;
    border-left: 1px solid var(--stroke);
}
.user-menu-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.user-menu-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.user-menu-cta {
    background: var(--red);
    color: #fff;
    padding: 7px 12px;
    border-radius: 999px;
}
.user-menu-cta:hover { background: var(--red-dark); color: #fff; }
.user-menu-logout { display: inline; margin: 0; padding: 0; }
.user-menu-btn {
    background: transparent;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

/* ----- auth pages layout ----- */
.auth-body {
    /* Auth pages share the cinematic noir backdrop. The body element
       already paints the layered black + red vignette; we just keep
       this rule for the family/min-height fallback. */
    background: transparent;
    color: var(--text, #fff);
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.auth-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid var(--stroke);
}
.auth-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}
.auth-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 6px;
    background: transparent;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}
.auth-nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.auth-nav-cta {
    background: var(--red);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
}
.auth-nav-cta:hover { background: var(--red-dark); color: #fff; }
.auth-nav-btn { font-family: inherit; }

.auth-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

/* ----- login / signup card ----- */
.auth-card {
    max-width: 440px;
    margin: 60px auto 0;
    padding: 32px 28px;
    border-radius: var(--radius-lg, 16px);
}
.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 0 0 6px;
    color: var(--text);
}
.auth-sub {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 22px;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-form .studio-label { margin-top: 10px; }
.auth-form .cta { margin-top: 18px; width: 100%; justify-content: center; }
.auth-input {
    width: 100%;
    padding: 11px 13px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}
.auth-input::placeholder { color: var(--muted); opacity: 0.6; }
.auth-input:focus { outline: none; border-color: rgba(225, 29, 46, 0.6); }

.auth-foot {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.auth-foot a { color: var(--red); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.auth-alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0 0 16px;
    font-size: 13px;
}
.auth-alert-error { background: rgba(225, 29, 46, 0.12); border: 1px solid rgba(225, 29, 46, 0.4); color: #ffb3b3; }
.auth-alert-ok { background: rgba(40, 200, 110, 0.12); border: 1px solid rgba(40, 200, 110, 0.4); color: #b6f0c8; }

/* ----- profile page ----- */
.profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 26px;
    border-radius: var(--radius-lg, 16px);
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.profile-head-left { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    display: grid;
    place-items: center;
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
}
.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin: 0;
}
.profile-meta {
    color: var(--muted);
    font-size: 13px;
    margin: 4px 0 0;
}
.profile-head-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.profile-credits {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}
.profile-credits-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.profile-credits-value {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--text);
}

.profile-list {
    padding: 22px 26px;
    border-radius: var(--radius-lg, 16px);
}
.profile-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}
.profile-list-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin: 0;
}
.profile-list-count { color: var(--muted); font-size: 12px; }

.creations {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.creation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    padding: 10px 12px;
    transition: border-color 0.15s, background 0.15s;
}
.creation-row:hover { border-color: rgba(225, 29, 46, 0.4); background: rgba(225, 29, 46, 0.04); }
.creation-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}
.creation-thumb {
    width: 80px;
    height: 45px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    overflow: hidden;
    flex: none;
    display: grid;
    place-items: center;
}
.creation-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.creation-thumb-empty { color: var(--muted); font-size: 18px; }
.creation-body { display: flex; flex-direction: column; min-width: 0; }
.creation-title {
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.creation-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.creation-delete {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
}
.creation-delete:hover { color: #fff; background: var(--red-dark); }
.creations-empty { color: var(--muted); margin: 18px 0; }

/* ----- single creation view ----- */
.creation-view { padding-top: 8px; }
.creation-back {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.creation-back:hover { color: var(--text); }
.creation-view-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 0 0 4px;
}
.creation-view-meta { color: var(--muted); font-size: 12px; margin: 0 0 18px; }
.creation-block { color: var(--text); font-size: 14px; margin: 8px 0; opacity: 0.85; }
.creation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.creation-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    overflow: hidden;
}
.creation-card-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.creation-card-frame img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.creation-card-frame img.failed { opacity: 0.3; }
.creation-card-shot {
    position: absolute;
    top: 8px; left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}
.creation-card-body { padding: 12px 14px; }
.creation-card-title { font-size: 14px; margin: 0; color: var(--text); }
.creation-card-moment { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.creation-card-dialogue { font-style: italic; font-size: 12px; color: var(--text); opacity: 0.8; margin: 6px 0 0; }

/* ----- admin page ----- */
.admin-head { margin-bottom: 18px; }
.admin-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 0 0 4px;
}
.admin-sub { color: var(--muted); font-size: 13px; margin: 0; }

.admin-card {
    padding: 22px 26px;
    border-radius: var(--radius-lg, 16px);
    margin-bottom: 18px;
}
.admin-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    margin: 0 0 14px;
}

.admin-create-form {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}
.admin-create-form .cta { padding: 10px 14px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th, .admin-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--stroke);
    vertical-align: middle;
}
.admin-table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-weight: 500;
}
.admin-td-email { color: var(--text); font-weight: 500; white-space: nowrap; }
.admin-td-date { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-td-actions { white-space: nowrap; }
.admin-cell {
    width: 100%;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--stroke);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 12px;
    box-sizing: border-box;
}
.admin-cell-num { width: 90px; }
.admin-btn {
    background: transparent;
    border: 1px solid var(--stroke);
    color: var(--muted);
    font-family: inherit;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.admin-btn:last-child { margin-right: 0; }
.admin-btn-save { border-color: rgba(225, 29, 46, 0.45); color: #ffb3b3; }
.admin-btn-save:hover { background: var(--red); color: #fff; border-color: var(--red); }
.admin-btn-del:hover { background: #2a2a2a; color: #fff; }

/* ============================================================
   Advanced settings — collapsible panel + tier chip picker
   ============================================================ */
.advanced-block {
    margin-top: 22px;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}
.advanced-summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.15s;
    user-select: none;
}
.advanced-summary::-webkit-details-marker { display: none; }
.advanced-summary:hover { background: rgba(225, 29, 46, 0.05); }
.advanced-icon {
    font-size: 14px;
    color: var(--muted);
    width: 18px;
    text-align: center;
}
.advanced-block[open] .advanced-summary { background: rgba(225, 29, 46, 0.04); }
.advanced-block[open] .advanced-icon {
    color: var(--red);
    transform: rotate(60deg);
    transition: transform 0.2s, color 0.2s;
}
.advanced-tier-tag {
    margin-left: auto;
    font-size: 10px;
    padding: 3px 9px;
    background: rgba(225, 29, 46, 0.15);
    color: #ffb3b3;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0.02em;
}
.advanced-body {
    padding: 6px 18px 20px;
    border-top: 1px solid var(--stroke);
}

.tier-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.tier-chip {
    text-align: left;
    padding: 14px 14px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--stroke);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tier-chip:hover {
    background: rgba(225, 29, 46, 0.05);
    border-color: rgba(225, 29, 46, 0.4);
}
.tier-chip.is-active {
    background: linear-gradient(135deg, rgba(225, 29, 46, 0.18), rgba(184,29,36,0.10));
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red);
}
.tier-chip:active { transform: scale(0.98); }
.tier-chip-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: var(--text);
}
.tier-chip-desc {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.tier-chip-cost {
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    color: var(--red);
    margin-top: 2px;
    font-weight: 600;
}
.tier-cost-legend {
    color: var(--muted);
    font-size: 11px;
    margin: 12px 0 0;
    font-style: italic;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .tier-picker { grid-template-columns: 1fr; }
    .advanced-tier-tag { font-size: 9px; padding: 2px 6px; }
}

/* ============================================================
   App toast — ephemeral bottom-center notification
   ============================================================ */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translate(-50%, 12px);
    z-index: 250;
    max-width: min(560px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
    border: 1px solid var(--stroke);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}
.app-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.app-toast-warn  { border-color: rgba(225, 29, 46, 0.45); color: #ffd0d0; }
.app-toast-info  { border-color: var(--stroke); }
.app-toast-ok    { border-color: rgba(40, 200, 110, 0.45); color: #b6f0c8; }

@media (max-width: 720px) {
    .app-toast { bottom: 96px; font-size: 12px; padding: 10px 14px; }
}

/* ============================================================
   Cookie consent bar (fixed-bottom, dismissible)
   ============================================================ */
.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    color: var(--text);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
    animation: cookieBarIn 0.32s cubic-bezier(0.21, 1, 0.35, 1);
}
@keyframes cookieBarIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cookie-bar.is-dismissed {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}
.cookie-bar-text {
    flex: 1;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text);
    opacity: 0.92;
}
.cookie-bar-link {
    color: var(--red);
    text-decoration: none;
    border-bottom: 1px dotted rgba(225, 29, 46, 0.5);
}
.cookie-bar-link:hover { border-bottom-color: var(--red); }
.cookie-bar-btn {
    flex: none;
    padding: 10px 18px;
    background: var(--red);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
}
.cookie-bar-btn:hover { background: var(--red-dark); }
.cookie-bar-btn:active { transform: scale(0.97); }

/* Lift sticky footers / floating elements above the bar while it's visible. */
body.has-cookie-bar { padding-bottom: 90px; }

@media (max-width: 720px) {
    .cookie-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 14px 16px;
    }
    .cookie-bar-text { text-align: center; }
    .cookie-bar-btn { width: 100%; padding: 12px 18px; font-size: 13px; }
    body.has-cookie-bar { padding-bottom: 160px; }
}

/* ============================================================
   Legal pages (Terms, Privacy) and footer/consent links
   ============================================================ */
.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: 8px 4px 40px;
    color: var(--text);
    line-height: 1.6;
    font-size: 14.5px;
}
.legal-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    margin: 0 0 6px;
    color: var(--text);
}
.legal-updated {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 22px;
}
.legal-lede {
    font-size: 16px;
    color: var(--text);
    opacity: 0.92;
    margin: 0 0 24px;
}
.legal h2 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--text);
    margin: 32px 0 10px;
    padding-top: 8px;
    border-top: 1px solid var(--stroke);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal p, .legal li {
    color: var(--text);
    opacity: 0.88;
    margin: 8px 0;
}
.legal ul {
    padding-left: 22px;
    margin: 10px 0;
}
.legal a {
    color: var(--red);
    text-decoration: none;
    border-bottom: 1px dotted rgba(225, 29, 46, 0.4);
}
.legal a:hover { border-bottom-color: var(--red); }
.legal strong { color: var(--text); opacity: 1; }
.legal-foot {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--stroke);
    color: var(--muted);
    font-size: 12px;
}

/* footer of auth-style pages (login/signup/profile/admin/terms/privacy) */
.auth-foot-links {
    text-align: center;
    padding: 28px 16px 36px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.06em;
}
.auth-foot-links a {
    color: var(--muted);
    text-decoration: none;
    margin: 0 6px;
}
.auth-foot-links a:hover { color: var(--text); }

/* footer of the main app (index.html) */
.foot-links a {
    color: var(--muted);
    text-decoration: none;
    margin: 0 6px;
}
.foot-links a:hover { color: var(--text); }

/* consent line on auth modal + signup page */
.auth-consent {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.45;
    text-align: center;
    margin: 12px 0 0;
}
.auth-consent a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
}
.auth-consent a:hover { color: var(--text); text-decoration-color: var(--red); }

/* ============================================================
   Inline Auth Modal (Sign Up / Sign In without page reload)
   ============================================================ */
.auth-modal-panel {
    max-width: 720px;
    width: 100%;
    padding: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 0;
}
.auth-modal-hero {
    padding: 36px 32px;
    background:
        radial-gradient(circle at 0% 0%, rgba(225, 29, 46, 0.18), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(225, 29, 46, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(20, 0, 0, 0.55), rgba(0, 0, 0, 0.85));
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--stroke);
}
.auth-modal-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--red);
    font-weight: 600;
}
.auth-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    line-height: 1.15;
    margin: 12px 0 10px;
    color: var(--text);
}
.auth-modal-sub {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0 0 18px;
}
.auth-modal-perks {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.auth-modal-perks li {
    color: var(--text);
    font-size: 13px;
    padding-left: 22px;
    position: relative;
    line-height: 1.4;
}
.auth-modal-perks li::before {
    content: "";
    position: absolute;
    left: 0; top: 7px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.18);
}

.auth-modal-form-wrap {
    padding: 28px 30px 30px;
    display: flex;
    flex-direction: column;
}
.auth-modal-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.auth-modal-tab {
    flex: 1;
    padding: 9px 14px;
    background: transparent;
    border: 0;
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.auth-modal-tab.is-active {
    background: var(--red);
    color: #fff;
}
.auth-modal-tab:not(.is-active):hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}
.auth-modal-form { gap: 4px; }
.auth-modal-form .studio-label { margin-top: 8px; }
.auth-modal-form .cta {
    margin-top: 14px;
    width: 100%;
    justify-content: center;
}

@media (max-width: 640px) {
    .auth-modal-panel {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow-y: auto;
    }
    .auth-modal-hero {
        padding: 22px 22px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--stroke);
    }
    .auth-modal-title { font-size: 24px; }
    .auth-modal-form-wrap { padding: 20px 22px 26px; }
}

/* ----- credit badge in navbar ----- */
.user-credits {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(225, 29, 46, 0.12);
    border: 1px solid rgba(225, 29, 46, 0.35);
    border-radius: 999px;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    transition: background 0.15s, border-color 0.15s;
}
.user-credits:hover { background: rgba(225, 29, 46, 0.22); border-color: var(--red); }
.user-credits-value {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.user-credits-label {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: 'Inter', sans-serif;
}

/* ----- transactions list (profile + admin) ----- */
.tx-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tx-row {
    display: grid;
    grid-template-columns: 96px 1fr auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    font-size: 12px;
}
.tx-kind {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 9px;
    color: var(--muted);
    padding: 3px 7px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    white-space: nowrap;
    text-align: center;
}
.tx-kind-signup     { color: #b6f0c8; background: rgba(40,200,110,0.12); }
.tx-kind-grant,
.tx-kind-admin_grant,
.tx-kind-bonus      { color: #b6f0c8; background: rgba(40,200,110,0.12); }
.tx-kind-charge     { color: #ffb3b3; background: rgba(225, 29, 46, 0.10); }
.tx-kind-refund     { color: #f6d18a; background: rgba(220,160,30,0.12); }
.tx-kind-admin_revoke { color: #ffb3b3; background: rgba(225, 29, 46, 0.10); }
.tx-note {
    color: var(--text);
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tx-num {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 50px;
}
.tx-pos { color: #88e0a0; }
.tx-neg { color: #ff9a9a; }
.tx-balance {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    min-width: 60px;
    text-align: right;
}
.tx-when { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ----- admin grant column ----- */
.admin-td-grant {
    display: flex;
    gap: 4px;
    align-items: center;
}
.admin-td-grant .admin-cell { width: 70px; }
.admin-btn-grant {
    border-color: rgba(40, 200, 110, 0.45);
    color: #b6f0c8;
}
.admin-btn-grant:hover {
    background: rgba(40, 200, 110, 0.15);
    border-color: #28c86e;
    color: #fff;
}
.admin-btn-log {
    text-decoration: none;
    display: inline-block;
}

/* mobile tweaks */
@media (max-width: 720px) {
    .user-menu { gap: 6px; margin-left: 4px; padding-left: 8px; }
    .user-menu-link { font-size: 11px; padding: 5px 6px; }
    .user-credits { padding: 4px 8px; }
    .user-credits-value { font-size: 13px; }
    .auth-card { padding: 22px 18px; }
    .auth-main { padding: 22px 12px 48px; }
    .profile-head { flex-direction: column; align-items: flex-start; }
    .profile-head-right { align-self: stretch; justify-content: space-between; }
    .creation-thumb { width: 60px; height: 36px; }
    .creation-title { font-size: 13px; }
    .admin-create-form { grid-template-columns: 1fr 1fr; }
    .admin-table { min-width: 820px; }
    .tx-row {
        grid-template-columns: 1fr auto auto;
        font-size: 11px;
    }
    .tx-row .tx-kind { grid-column: 1 / 2; }
    .tx-row .tx-note { grid-column: 1 / 4; order: 9; }
    .tx-balance { display: none; }
}

/* ============================================================
   CINEMA AT GOLDEN HOUR — flourishes
   Film-strip divider, letterbox rule, marquee tag — subtle, modern,
   never childish. Each one reads as filmmaking at a glance.
   ============================================================ */

/* ----- Film-strip divider --------------------------------------
   A thin row of 4 small dark squares with hairline rules above/below.
   Looks like a strip of 35mm film sprockets caught against a screen.
   Use as: <div class="film-strip"></div> between major sections. */
.film-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 36px auto;
    padding: 8px 0;
    max-width: 220px;
    border-top: 1px solid var(--red-deep);
    border-bottom: 1px solid var(--red-deep);
    opacity: 0.55;
}
.film-strip::before,
.film-strip::after {
    content: '';
    display: block;
    flex: 1;
    height: 1px;
}
.film-strip .sprocket {
    width: 10px;
    height: 14px;
    background: var(--red);
    border-radius: 2px;
    flex: none;
}

/* ----- Letterbox rule under the hero ---------------------------
   Two thin gold lines bracketing a piece of text, evoking the
   2.35:1 letterbox bars that frame every theatrical movie. */
.letterbox {
    position: relative;
    padding: 12px 0;
    margin: 18px auto;
    max-width: 720px;
    text-align: center;
}
.letterbox::before,
.letterbox::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, 86%);
    height: 1px;
    background: var(--red);
    opacity: 0.55;
}
.letterbox::before { top: 0; }
.letterbox::after  { bottom: 0; }

/* ----- "Now showing" small caps marker -----------------------
   Use inline for a small movie-vernacular flourish. */
.marquee-tag {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--red-deep);
    border-radius: 4px;
    color: var(--red);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 600;
}

/* ----- Scene cards take a hairline gold rule top -------------
   The card itself reads as a printed shot slip from the script
   supervisor — cream paper with a gold rule at the top. */
.scene > .scene-title-wrap,
.scene-title-wrap {
    border-top: 1px solid var(--red-deep);
    padding-top: 18px;
}

/* ----- Card-internal contrast hardening ----------------------
   Inputs inside a cream .glass card need to stay readable. */
.glass textarea,
.glass .field input[type="text"],
.glass .auth-input,
.glass .admin-cell {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text);
}
.glass textarea::placeholder,
.glass .field input[type="text"]::placeholder,
.glass .auth-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.glass textarea:focus,
.glass .field input[type="text"]:focus,
.glass .auth-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.22);
}

/* Chips inside glass cards — translucent pill that glows on hover. */
.glass .chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text);
}
.glass .chip:hover {
    background: rgba(229, 168, 57, 0.14);
    border-color: var(--red);
}
.glass .chip.is-selected {
    background: var(--red);
    color: #1A1714;
    border-color: var(--red);
}

/* ----- Hide the legacy "cinematic background" SVGs --
   They were white-on-black; on cream cards they'd be invisible
   anyway, and we have intentional movie flourishes now. */
.cine, .ambient .grain { display: none; }
/* ============================================================
   CONTEMPORARY WARM GLASSMORPHISM — new section components
   ============================================================ */

.section-title {
    font-size: clamp(28px, 3.5vw, 40px);
    line-height: 1.15;
    text-align: center;
    margin: 64px auto 28px;
    max-width: 800px;
    color: var(--text);
}

/* ---------- HERO grid ---------- */
.hero { text-align: left; margin-bottom: 56px; }
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
    padding-top: 56px;
}
.hero-text { max-width: 560px; }
.hero-cta { margin-top: 8px; }
.hero-microcopy {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.01em;
}
@media (max-width: 880px) {
    .hero { text-align: center; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
    .hero-text { margin: 0 auto; }
    .hero .badge { margin-left: auto; margin-right: auto; }
}

/* ---------- Phone mock ---------- */
.hero-visual { display: flex; justify-content: center; }
.phone-mock {
    position: relative;
    width: 280px;
    height: 560px;
    border-radius: 42px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-stroke);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.phone-mock::before {
    content: "";
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 22px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 14px;
    z-index: 2;
}
.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: linear-gradient(160deg, rgba(255, 107, 107, 0.18), rgba(46, 196, 182, 0.18) 60%, rgba(192, 132, 252, 0.18));
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 18px 28px;
    gap: 8px;
}
.phone-frame {
    height: 110px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    will-change: transform;
}
.phone-frame-1 { background: linear-gradient(135deg, #E11D2E 0%, #7a0f17 100%); opacity: 0.60; animation: phoneFloat 8s ease-in-out infinite; }
.phone-frame-2 { background: linear-gradient(135deg, #ff5a3c 0%, #E11D2E 100%); opacity: 0.55; animation: phoneFloat 8s ease-in-out -2.5s infinite; }
.phone-frame-3 { background: linear-gradient(135deg, #ffb86b 0%, #E11D2E 100%); opacity: 0.55; animation: phoneFloat 8s ease-in-out -5s infinite; }
.phone-caption {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-weight: 500;
    font-size: 15px;
    color: var(--text);
    text-align: center;
    margin-top: 6px;
    opacity: 0.85;
}
@keyframes phoneFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@media (max-width: 540px) {
    .phone-mock { width: 220px; height: 440px; padding: 10px; border-radius: 32px; }
    .phone-screen { border-radius: 22px; padding: 18px 14px 22px; }
    .phone-frame { height: 84px; }
}

/* ---------- Social proof bar ---------- */
.social-proof {
    margin: 32px auto 48px;
    max-width: 900px;
    padding: 16px 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14.5px;
    color: var(--text);
}
.proof-item strong { color: var(--gold); font-weight: 700; }
.proof-dot { color: var(--muted); font-weight: 700; }
@media (max-width: 720px) {
    .social-proof { font-size: 13px; gap: 10px; padding: 14px 20px; }
    .proof-dot { display: none; }
    .proof-item { flex-basis: 100%; text-align: center; }
}

/* ---------- Occasions grid ---------- */
.occasions { margin-bottom: 32px; }
.occasion-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    max-width: 1100px;
    margin: 0 auto;
}
.occasion-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 110px;
    padding: 20px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.occasion-chip::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--glass-edge);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.occasion-chip:hover,
.occasion-chip:focus-visible {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(225, 29, 46, 0.55);
    background: rgba(225, 29, 46, 0.10);
    outline: none;
}
.occasion-chip.is-active {
    border-color: var(--gold);
    background: rgba(225, 29, 46, 0.18);
}
.occ-emoji { font-size: 28px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)); }
@media (max-width: 960px) { .occasion-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) {
    .occasion-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .occasion-chip { min-height: 96px; padding: 16px 10px; font-size: 14px; }
    .occ-emoji { font-size: 24px; }
}

/* ---------- How it works ---------- */
.how-it-works { margin-bottom: 48px; }
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}
.steps::before {
    content: "";
    position: absolute;
    top: 36px;
    left: 16%;
    right: 16%;
    height: 0;
    border-top: 2px dotted rgba(225, 29, 46, 0.35);
    z-index: 0;
}
.step {
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--radius-lg);
    padding: 28px 22px 22px;
    text-align: center;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    overflow: hidden;
}
.step::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--glass-edge);
}
.step-num {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: "Fraunces", serif;
    font-style: italic;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 14px;
    box-shadow: 0 6px 18px -6px rgba(225, 29, 46, 0.55);
}
.step-title { font-size: 18px; line-height: 1.3; margin: 0 0 6px; color: var(--text); }
.step-body { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.55; }
@media (max-width: 880px) {
    .steps { grid-template-columns: 1fr; gap: 16px; }
    .steps::before { display: none; }
}

/* ---------- Testimonials ---------- */
.testimonials { margin: 64px 0; }
.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 22px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
}
.testimonial {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    overflow: hidden;
    color: var(--text);
}
.testimonial::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--glass-edge);
}
.testimonial-center { transform: scale(1.05); border-color: rgba(225, 29, 46, 0.45); }
.testimonial-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: "Fraunces", serif;
    font-style: italic;
    font-weight: 700;
    font-size: 18px;
}
.testimonial-meta { line-height: 1.2; }
.testimonial-name { font-weight: 700; font-size: 15px; color: var(--text); }
.testimonial-age { font-size: 12px; color: var(--muted); }
.testimonial-stars { color: var(--gold); font-size: 14px; margin-bottom: 8px; letter-spacing: 0.1em; }
.testimonial-quote {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    margin: 0;
}
@media (max-width: 880px) {
    .testimonial-grid { grid-template-columns: 1fr; }
    .testimonial-center { transform: none; }
}

.hero .badge { margin-bottom: 18px; }

/* Hide cinema-theme-only flourishes that conflict with the new aesthetic. */
.film-strip, .letterbox, .cine { display: none !important; }

/* ---------- New footer ---------- */
.foot {
    margin: 80px auto 36px;
    padding: 36px 24px;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--glass-stroke);
    text-align: center;
}
.foot-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.foot-tagline {
    font-family: "Fraunces", serif;
    font-style: italic;
    font-weight: 500;
    font-size: 19px;
    color: var(--text);
    margin: 0;
    opacity: 0.95;
}
.foot-links {
    color: var(--muted);
    font-size: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
}
.foot-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.foot-links a:hover { color: var(--gold); }
.foot-copy {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    letter-spacing: 0.05em;
}
.foot-credit {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    letter-spacing: 0.04em;
}
.foot-credit a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid rgba(225, 29, 46, 0.4);
    padding-bottom: 1px;
    margin-left: 4px;
    transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}
.foot-credit a:hover {
    color: var(--red);
    border-bottom-color: var(--red);
    text-shadow: 0 0 12px var(--red-glow);
}
.auth-foot-links .foot-credit {
    display: block;
    margin-top: 10px;
}

/* ---------- Hero perks row (Any face · Any place · Any story) ---------- */
.hero-perks {
    list-style: none;
    margin: 16px 0 4px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.hero-perk {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hero-perk-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.18);
    flex: none;
}
@media (max-width: 880px) {
    .hero-perks { justify-content: center; gap: 14px; }
}
@media (max-width: 540px) {
    .hero-perks { font-size: 13px; gap: 10px; }
    .hero-perk-dot { width: 6px; height: 6px; box-shadow: 0 0 0 2px rgba(225, 29, 46, 0.18); }
}

/* ---------- "NEW · Now with real faces" gold announcement badge ---------- */
.new-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-family: "Plus Jakarta Sans", inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    box-shadow: 0 6px 18px -6px rgba(225, 29, 46, 0.55);
    line-height: 1;
}
.new-badge-tag {
    background: #000;
    color: var(--gold);
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}
@media (max-width: 540px) {
    .new-badge { font-size: 11px; padding: 3px 12px 3px 3px; }
    .new-badge-tag { font-size: 9px; padding: 4px 8px; }
}

/* ============================================================
   Consent modal (upload rights) — single-column glass dialog
   ============================================================ */
.consent-modal-panel {
    max-width: 520px;
    width: 100%;
    padding: 32px 30px 26px;
    color: var(--text);
}
.consent-modal-title {
    font-family: "Fraunces", Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2;
    margin: 0 0 10px;
    padding-right: 28px;
}
.consent-modal-sub {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 18px;
}
.consent-points {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.consent-points li {
    position: relative;
    padding-left: 28px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.92;
}
.consent-points li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.18);
}
.consent-modal-fineprint {
    color: var(--muted);
    font-size: 12.5px;
    margin: 0 0 16px;
    line-height: 1.5;
}
.consent-modal-fineprint a {
    color: var(--muted);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.25);
}
.consent-modal-fineprint a:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
}
.consent-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.consent-actions .cta-ghost-btn {
    background: transparent;
    border: 1px solid var(--glass-stroke);
    color: var(--muted);
    font-family: "Plus Jakarta Sans", inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 50px;
    cursor: pointer;
    min-height: 44px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.consent-actions .cta-ghost-btn:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 540px) {
    .consent-modal-panel { padding: 26px 22px 22px; }
    .consent-modal-title { font-size: 20px; }
    .consent-actions { flex-direction: column-reverse; align-items: stretch; }
    .consent-actions .cta, .consent-actions .cta-ghost-btn { width: 100%; }
}

/* ============================================================
   Contact form + Admin inbox
   ============================================================ */

.contact-card { max-width: 560px; }

/* Native file-picker styled to fit the glass aesthetic. */
.contact-file {
    padding: 12px 14px !important;
    cursor: pointer;
}
.contact-file::file-selector-button {
    margin-right: 14px;
    padding: 8px 14px;
    border: 1px solid var(--glass-stroke);
    border-radius: 999px;
    background: rgba(225, 29, 46, 0.14);
    color: var(--text);
    font-family: "Plus Jakarta Sans", inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.contact-file::file-selector-button:hover {
    background: rgba(225, 29, 46, 0.24);
    border-color: var(--gold);
}

/* ---------- Admin inbox ---------- */
.inbox-filter {
    display: inline-flex;
    gap: 8px;
    margin-top: 12px;
}
.inbox-filter .admin-btn { text-decoration: none; }

.inbox-table tr.inbox-unread {
    background: rgba(225, 29, 46, 0.06);
}
.inbox-table .inbox-from-name {
    color: var(--text);
    font-weight: 600;
}
.inbox-table .inbox-from-email {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}
.inbox-table .inbox-subject a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}
.inbox-table .inbox-subject a:hover { color: var(--gold); }
.inbox-dot {
    display: inline-block;
    width: 8px; height: 8px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.18);
    vertical-align: middle;
}

/* Inbox-view message body — preserve newlines from textarea. */
.inbox-message {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--glass-stroke);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    color: var(--text);
    font-family: "Plus Jakarta Sans", inherit;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 6px 0 20px;
    max-height: 560px;
    overflow-y: auto;
}
.inbox-attachment {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.inbox-attachment-label {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Unread badge in the brand nav, when admin is signed in. */
.inbox-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* ============================================================
   MOBILE POLISH PASS
   Targeted fixes for narrow viewports — 12 items in priority
   order. Layered after all other rules so they always win.
   ============================================================ */

/* Global: gold tap-highlight on every touch + smooth tap feedback. */
html {
    -webkit-tap-highlight-color: rgba(225, 29, 46, 0.25);
}

/* Tablet + phone (≤ 720px) */
@media (max-width: 720px) {
    /* 1. Container padding tighter — cards get more usable width. */
    .container {
        padding: 48px 16px 64px;
    }

    /* 4. Studio panel padding reduced on mobile. */
    .studio {
        padding: 18px 16px 22px;
    }

    /* Generic section padding tighten — applies to anything using .glass
       as the outer wrapper, only if not already overridden. */
    .glass.scene-template-wrap,
    .auth-card,
    .credits-explainer,
    .profile-head,
    .profile-list,
    .admin-card,
    .social-proof,
    .step,
    .testimonial,
    .occasion-chip {
        padding-inline: 18px;
    }

    /* 6. Bigger frame-slider thumb for fingertip accuracy. */
    .frame-count-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        border-width: 3px;
        box-shadow: 0 3px 10px rgba(225, 29, 46, 0.55);
    }
    .frame-count-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
        border-width: 3px;
    }

    /* 11. Enforce 16px+ on every focusable input — stops iOS auto-zoom. */
    input, select, textarea {
        font-size: 16px !important;
    }
    .frame-count-value { font-size: 22px !important; }   /* not an input */

    /* 5. Occasion chips tighter — less vertical real estate. */
    .occasion-chip {
        min-height: 86px;
        padding: 14px 10px;
        font-size: 14px;
        gap: 8px;
    }
    .occ-emoji { font-size: 24px; }

    /* 8. Hero perks stack tighter — wrapping in middle looks ugly. */
    .hero-perks {
        flex-direction: column;
        gap: 8px;
        align-items: center;
        margin-top: 18px;
    }
    .hero-perk {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--glass-stroke);
        padding: 8px 16px;
        border-radius: 999px;
        min-width: 200px;
        justify-content: center;
    }
}

/* Smaller phones (≤ 540px) */
@media (max-width: 540px) {
    /* 2. Hide the phone mock — saves ~440px of vertical, gets CTA above fold. */
    .hero-visual { display: none; }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 28px;
    }

    /* 3. Topbar overhaul — at 375px the brand text + nav + lang picker overflow.
       Hide brand text, shrink everything, hide non-essential nav. */
    .topbar {
        padding: 12px 14px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    .brand-text { display: none; }      /* logo mark stays, text drops */
    .topnav {
        gap: 8px;
        flex: 1;
        justify-content: flex-end;
        overflow-x: auto;
        scrollbar-width: none;            /* hide scrollbar Firefox */
    }
    .topnav::-webkit-scrollbar { display: none; }
    .topnav > a:first-child { display: none; }   /* "Make a movie" link not needed on mobile, hero is right below */
    .lang-picker {
        padding: 2px;
        flex: none;
    }
    .lang-btn {
        padding: 5px 7px;
        font-size: 10px;
    }
    .user-menu {
        gap: 4px;
        margin-left: 4px;
        padding-left: 6px;
    }
    .user-menu-link {
        font-size: 10px;
        padding: 5px 6px;
    }
    .user-menu-cta {
        padding: 6px 10px;
    }
    .user-credits {
        padding: 4px 8px;
    }
    .user-credits-value { font-size: 13px; }
    .user-credits-label { font-size: 8px; }

    /* 7. Cast grid → 2-column grid (was horizontal-scrolling row).
       More discoverable on touch + the 5th slot wraps to a partial row,
       which actually reads as "5 max" rather than feeling like content
       cut off. */
    .cast-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
        scroll-snap-type: none;
        gap: 10px;
    }
    .cast-card { scroll-snap-align: none; }
    .cast-name { font-size: 14px; }

    /* New-badge tighter so it doesn't bleed off the right on tiny phones. */
    .new-badge { font-size: 11px; }
    .new-badge-tag { font-size: 9px; padding: 4px 7px; }

    /* Hero text padding so it doesn't kiss the screen edges. */
    .hero-text { padding: 0 4px; }
    .hero-title { font-size: clamp(30px, 8vw, 40px); }

    /* Social proof needs less padding on tiny phones. */
    .social-proof {
        padding: 12px 16px;
        font-size: 13px;
    }

    /* Animate modal — full-screen on phones so the controls don't squeeze. */
    .modal-panel { max-width: 100%; max-height: calc(100vh - 16px); }
    .auth-modal-panel,
    .consent-modal-panel { max-width: 100%; }
}

/* 9. iOS safe-area insets — keep the cookie bar, toast, and footer clear
   of the iPhone notch & home-indicator strip. Applied on ALL viewports. */
.cookie-bar {
    bottom: max(16px, env(safe-area-inset-bottom));
    left:   max(16px, env(safe-area-inset-left));
    right:  max(16px, env(safe-area-inset-right));
}
.app-toast {
    bottom: max(80px, calc(env(safe-area-inset-bottom) + 70px));
}
.foot,
.auth-foot-links {
    padding-bottom: max(36px, calc(env(safe-area-inset-bottom) + 20px));
}

/* Make sure nothing ever causes horizontal page scroll on phones. */
body { overflow-x: hidden; }
img, video, .phone-mock, .phone-screen { max-width: 100%; }

/* 12. The bottom fixed CTA isn't used — we keep CTAs in flow so they
   never cover content. (This block intentionally left empty as a note.) */

/* ============================================================
   Mission page — premium cinematic editorial layout
   ============================================================ */
.mission-page {
    max-width: 920px;
    padding: 16px 4px 60px;
}
.mission-hero {
    text-align: center;
    padding: 40px 0 56px;
    border-bottom: 1px solid var(--stroke);
    margin-bottom: 36px;
}
.mission-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--red);
    margin: 0 0 18px;
}
.mission-title {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
    margin: 0 auto 18px;
    max-width: 18ch;
    text-shadow: 0 0 60px rgba(225, 29, 46, 0.25);
}
.mission-lede {
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.55;
    color: var(--text);
    opacity: 0.88;
    max-width: 60ch;
    margin: 0 auto 28px;
}
.mission-cta-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.mission-cta {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    border: 0;
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow:
        0 12px 30px -10px var(--red-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mission-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 40px -10px var(--red-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.mission-cta-secondary {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 999px;
    color: var(--text) !important;
    border: 1px solid var(--stroke) !important;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.mission-cta-secondary:hover {
    border-color: var(--red) !important;
    background: var(--red-soft);
}

.mission-section {
    margin: 44px 0;
}
.mission-section h2 {
    font-size: clamp(22px, 2.6vw, 28px);
    border-top: 0;
    padding-top: 0;
    margin: 0 0 14px;
}
.mission-section p {
    font-size: 15.5px;
    line-height: 1.7;
}

.mission-beliefs {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    gap: 18px;
}
.mission-beliefs li {
    padding: 18px 22px;
    background: var(--glass-bg);
    border: 1px solid var(--stroke);
    border-left: 3px solid var(--red);
    border-radius: var(--radius-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 15px;
    line-height: 1.6;
}
.mission-beliefs strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
    font-size: 15.5px;
}

.mission-audience {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.mission-audience-card {
    padding: 22px;
    background: var(--glass-bg);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.mission-audience-card:hover {
    transform: translateY(-3px);
    border-color: var(--red);
    box-shadow: 0 14px 40px -16px var(--red-glow);
}
.mission-audience-card h3 {
    font-family: 'Fraunces', 'Plus Jakarta Sans', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 18px;
    margin: 0 0 8px;
    color: var(--text);
}
.mission-audience-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    opacity: 0.82;
}

.mission-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    gap: 14px;
}
.mission-steps li {
    position: relative;
    padding: 16px 20px 16px 64px;
    background: var(--glass-bg);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    counter-increment: step;
    font-size: 15px;
    line-height: 1.6;
}
.mission-steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 6px 18px -6px var(--red-glow);
}
.mission-steps strong {
    display: block;
    margin-bottom: 2px;
}

.mission-promise {
    padding: 28px 30px;
    background:
        linear-gradient(135deg, rgba(225, 29, 46, 0.10) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(225, 29, 46, 0.25);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.mission-promise h2 { margin-top: 0; }
.mission-promise p {
    font-size: 15.5px;
    line-height: 1.7;
    margin: 0;
}

.mission-final-cta {
    text-align: center;
    padding: 48px 24px 36px;
    margin-top: 56px;
    border-top: 1px solid var(--stroke);
}
.mission-final-cta h2 {
    font-size: clamp(26px, 3vw, 34px);
    margin: 0 0 10px;
}
.mission-final-cta p {
    max-width: 50ch;
    margin: 0 auto 22px;
    font-size: 16px;
    color: var(--text);
    opacity: 0.88;
}
.mission-fineprint {
    margin: 18px auto 0;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

@media (max-width: 540px) {
    .mission-hero { padding: 24px 0 36px; }
    .mission-steps li { padding-left: 56px; }
    .mission-promise { padding: 22px 18px; }
}

/* ============================================================
   Credits modal — cinematic paywall for any 402 in the app
   ============================================================ */
#credits-modal .modal-backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.credits-modal-panel {
    max-width: 460px;
    width: calc(100% - 32px);
    text-align: center;
    padding: 36px 30px 28px;
    background:
        radial-gradient(circle at 50% -10%, rgba(225, 29, 46, 0.22) 0%, transparent 60%),
        var(--glass-bg-strong);
    border: 1px solid rgba(225, 29, 46, 0.30);
    box-shadow:
        0 30px 80px -30px var(--red-glow),
        0 14px 44px rgba(0, 0, 0, 0.55);
}
.credits-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    color: var(--red);
    background: rgba(225, 29, 46, 0.14);
    border: 1px solid rgba(225, 29, 46, 0.35);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(225, 29, 46, 0.35);
}
.credits-modal-icon svg {
    width: 32px;
    height: 32px;
}
.credits-modal-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
}
.credits-modal-title {
    font-family: 'Fraunces', 'Plus Jakarta Sans', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(22px, 3.4vw, 28px);
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 12px;
}
.credits-modal-detail {
    color: var(--text);
    opacity: 0.85;
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 auto 24px;
    max-width: 36ch;
}
.credits-modal-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 4px;
}
.credits-modal-buy {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    border: 0;
    box-shadow:
        0 12px 30px -10px var(--red-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.credits-modal-buy:hover {
    transform: translateY(-2px);
    box-shadow:
        0 18px 40px -10px var(--red-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.credits-modal-later {
    background: transparent;
    border: 1px solid var(--stroke);
    color: var(--muted);
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.credits-modal-later:hover {
    color: var(--text);
    border-color: var(--stroke-strong);
}

@media (max-width: 480px) {
    .credits-modal-panel { padding: 28px 22px 24px; }
    .credits-modal-icon { width: 56px; height: 56px; margin-bottom: 14px; }
    .credits-modal-icon svg { width: 28px; height: 28px; }
}

/* ============================================================
   Contact form anti-spam — honeypot (invisible) + math captcha
   ============================================================ */

/* Honeypot wrapper: removed from layout, off-screen, untabbable, hidden
   from screen readers AND from sighted users. Visually-hidden technique
   so bots that respect "display: none" still see the input in the DOM
   (and dutifully fill it). */
.hp-wrap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Math captcha — narrow, monospace digits, modest width since the answer
   is always 2..18. Otherwise inherits the .auth-input look. */
.contact-captcha {
    max-width: 200px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
}
