/* ============================================================
   LUMEN STUDIO — "Aurora Desk"
   A calm, premium dark studio. Layered surfaces, hairline
   highlights, an indigo→cyan signature, expressive serif display.
   Built to feel finished and trustworthy.
   ============================================================ */

:root {
  /* "Hive at dusk" — warm near-black canvas, honey-gold signature, the bee yellow
     pops against the dark like a swarm. Layered warm surfaces. */
  --bg:        #0b0a06;
  --bg-2:      #100d08;
  --s1:        #16130c;   /* base panels */
  --s2:        #1d1910;   /* raised panels */
  --s3:        #251f14;   /* nested fields */
  --s4:        #322a19;   /* hover / active fields */
  --ink:       #fbf7ec;   /* warm white */
  --ink-soft:  #cbc1a6;
  --ink-faint: #8c8167;
  --line:      rgba(255,236,190,0.09);
  --line-2:    rgba(255,236,190,0.16);
  --hairline:  rgba(255,210,90,0.10);    /* warm top highlight on cards */

  /* Signature: honey → bee-yellow → amber */
  --accent:        #f5b500;   /* bee yellow */
  --accent-2:      #ffcf4a;
  --accent-deep:   #e09a00;
  --accent-bright: #ffce52;
  --accent-wash:   rgba(245,181,0,0.13);
  --accent-line:   rgba(245,181,0,0.36);
  --grad:          linear-gradient(120deg, #ffd24a 0%, #f5b500 52%, #ff9e00 115%);
  --grad-soft:     linear-gradient(120deg, rgba(245,181,0,0.18), rgba(255,158,0,0.08));
  --on-accent:     #1a1404;   /* dark ink for text on yellow */

  --gold:  #ffc94a;
  --green: #4fd39b;
  --red:   #ff6b6b;

  --r-sm: 9px;
  --r:    13px;
  --r-lg: 20px;
  --r-pill: 100px;

  --sh-sm: 0 1px 2px rgba(0,0,0,0.4);
  --sh:    0 14px 40px -12px rgba(0,0,0,0.6);
  --sh-lg: 0 40px 100px -24px rgba(0,0,0,0.75);
  --ring:  0 0 0 3px var(--accent-wash);
  --glow:  0 8px 30px -6px rgba(109,139,255,0.5);

  --serif: "Fraunces", "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;
  --ease:  cubic-bezier(0.22, 0.9, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  background-image:
    radial-gradient(120% 80% at 100% -10%, rgba(245,181,0,0.10), transparent 55%),
    radial-gradient(90% 70% at -10% 110%, rgba(255,158,0,0.06), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='96' viewBox='0 0 56 96'%3E%3Cg fill='none' stroke='%23ffd25a' stroke-opacity='0.05' stroke-width='1.5'%3E%3Cpath d='M28 0l24 14v28L28 56 4 42V14z'/%3E%3Cpath d='M28 56l24 14v28M28 56L4 70v28'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.boot-splash {
  position: fixed; inset: 0; z-index: 500; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
}
.boot-splash.gone { opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), visibility 0.25s; }
.boot-spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--accent-wash); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
/* Bigger, more prominent boot splash (scoped so it doesn't affect the header/poster logo). */
.boot-splash .brand-plate { padding: 22px 38px; border-radius: 22px; box-shadow: 0 18px 60px -16px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(0,0,0,0.06); }
.boot-splash .brand-logo { height: 76px; }
.boot-splash .boot-spin { width: 34px; height: 34px; border-width: 3px; }

.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2c3344; }

.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-bright);
}
.eyebrow.inverse { color: rgba(255,255,255,0.55); }
.display {
  font-family: var(--serif); font-weight: 460; font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.025em; line-height: 1.02; margin-top: 10px; font-optical-sizing: auto;
}

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 20px;
  box-shadow: var(--glow), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.brand-mark { color: var(--on-accent); }
.brand-img { height: 52px; width: auto; display: block; }
.brand.small .brand-img { height: 42px; }
.footer-brand .brand-img, .land-foot-brand .brand-img, .lf-brand .brand-img { height: 38px; }
.brand-word { font-family: var(--serif); font-weight: 560; font-size: 21px; letter-spacing: -0.01em; }
.brand-word .b-llm { color: var(--accent); }
.brand.small .brand-mark { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; }
.brand.small .brand-word { font-size: 17px; }
/* Full logo on a white plate (reads on any background, it's drawn for light) */
.brand-plate { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 8px 14px; box-shadow: 0 8px 30px -10px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(0,0,0,0.06); }
.brand-logo { height: 40px; width: auto; display: block; }

/* ---------- Buttons ---------- */
.btn-cta {
  position: relative; display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 22px;
  background: var(--grad); background-size: 160% 160%; color: var(--on-accent); border-radius: var(--r-pill);
  font-weight: 750; font-size: 14px; letter-spacing: -0.01em; white-space: nowrap;
  box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.16s var(--ease), box-shadow 0.2s, background-position 0.5s var(--ease);
}
.btn-cta:hover:not(:disabled) { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 14px 36px -8px rgba(109,139,255,0.6), inset 0 1px 0 rgba(255,255,255,0.22); }
.btn-cta:active:not(:disabled) { transform: translateY(0); }
.btn-cta:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-cta .cta-arrow { transition: transform 0.2s var(--ease); }
.btn-cta:hover .cta-arrow { transform: translateX(3px); }
.btn-cta.full { width: 100%; justify-content: center; height: 50px; font-size: 15px; }
.btn-cta.sm { height: 34px; padding: 0 15px; font-size: 12.5px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  font-weight: 560; font-size: 13.5px; color: var(--ink-soft); border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.02); transition: all 0.18s var(--ease);
}
.btn-ghost:hover:not(:disabled) { background: var(--s3); border-color: var(--ink-faint); color: var(--ink); transform: translateY(-1px); }
.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost.sm { height: 33px; padding: 0 13px; font-size: 12.5px; }
.btn-ghost.icon-btn svg { width: 16px; height: 16px; }
.btn-text { font-size: 13px; font-weight: 560; color: var(--ink-faint); padding: 4px 0; transition: color 0.15s; }
.btn-text:hover { color: var(--accent-bright); }

/* ============================================================
   AUTH
   ============================================================ */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-poster {
  position: relative; overflow: hidden; padding: 56px 60px; color: #eef1fb;
  background:
    linear-gradient(100deg, rgba(7,7,4,0.95) 0%, rgba(7,7,4,0.70) 48%, rgba(7,7,4,0.32) 100%),
    url("/hero.png?v=bee7") center right / cover no-repeat;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-poster::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 50% at 85% -5%, rgba(245,181,0,0.40), transparent 60%),
    radial-gradient(55% 45% at 0% 105%, rgba(255,158,0,0.22), transparent 55%),
    radial-gradient(40% 40% at 50% 50%, rgba(255,210,90,0.12), transparent 70%);
}
.auth-poster::after {
  content: ""; position: absolute; inset: 0; opacity: 0.4; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.022) 40px, rgba(255,255,255,0.022) 41px);
}
.poster-top, .poster-mid, .poster-steps { position: relative; z-index: 1; }
.poster-top { display: flex; align-items: center; justify-content: space-between; }
.poster-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: rgba(255,255,255,0.42); }
.poster-mid { max-width: 480px; }
.poster-mid h1 {
  font-family: var(--serif); font-weight: 380; font-size: clamp(42px, 5vw, 66px); line-height: 1.0;
  letter-spacing: -0.03em; margin: 18px 0 22px; color: #fff;
}
.poster-mid p { font-size: 16.5px; line-height: 1.6; color: rgba(238,241,251,0.72); max-width: 410px; }
.poster-steps { list-style: none; display: flex; flex-direction: column; gap: 0; }
.poster-steps li {
  display: flex; align-items: center; gap: 16px; padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.08); font-size: 14.5px; color: rgba(238,241,251,0.86);
}
.poster-steps li span:first-child { font-family: var(--mono); font-size: 12px; color: var(--accent-bright); width: 24px; }

.auth-stage { display: grid; place-items: center; padding: 40px; }
.auth-form { width: 100%; max-width: 392px; }
.auth-switch {
  display: inline-flex; gap: 3px; padding: 4px; background: var(--s1);
  border: 1px solid var(--line); border-radius: var(--r-pill); margin-bottom: 30px;
}
.auth-mode { padding: 8px 22px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--ink-faint); transition: all 0.18s var(--ease); }
.auth-mode.active { background: var(--grad); color: var(--on-accent); box-shadow: var(--glow); }
#authHeading { font-family: var(--serif); font-weight: 420; font-size: 34px; letter-spacing: -0.02em; }
.auth-sub { color: var(--ink-soft); font-size: 14.5px; margin: 8px 0 28px; }
.auth-error { background: rgba(255,107,133,0.12); color: var(--red); font-size: 13.5px; padding: 12px 15px; border-radius: var(--r); margin-bottom: 18px; border: 1px solid rgba(255,107,133,0.3); }
.social-auth { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: var(--r); font-size: 14.5px; font-weight: 560; cursor: pointer; text-decoration: none; border: 1px solid var(--line-2); transition: filter 0.15s var(--ease), transform 0.05s; }
.btn-social:active { transform: translateY(1px); }
.btn-social.google { background: #fff; color: #1f1f1f; }
.btn-social.google:hover { filter: brightness(0.96); }
.btn-social.apple { background: #000; color: #fff; border-color: #000; }
.btn-social.apple:hover { filter: brightness(1.15); }
.social-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-faint); font-size: 12px; margin: 4px 0 2px; }
.social-divider::before, .social-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.field input {
  width: 100%; height: 48px; padding: 0 16px; background: var(--s2); border: 1.5px solid var(--line);
  border-radius: var(--r); font-size: 15px; transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--s3); }
.field input::placeholder { color: var(--ink-faint); }
.auth-form .btn-cta { margin-top: 10px; }
.cf-turnstile-box { display: flex; justify-content: center; margin: 10px 0 2px; }
.cf-turnstile-box.hidden { display: none; }
.fine { font-size: 12px; color: var(--ink-faint); text-align: center; margin-top: 18px; }

/* ============================================================
   APP SHELL
   ============================================================ */
.shell {
  min-height: 100vh; display: flex; flex-direction: column;
  /* Atmospheric hero behind the app, heavily darkened so cards/text stay readable. */
  background:
    linear-gradient(180deg, rgba(8,7,4,0.90) 0%, rgba(8,7,4,0.94) 55%, rgba(8,7,4,0.97) 100%),
    url("/hero1.png?v=bee7") center top / cover no-repeat fixed;
}
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 36px; border-bottom: 1px solid var(--line);
  background: rgba(8,9,14,0.72); backdrop-filter: blur(18px) saturate(1.2);
  position: sticky; top: 0; z-index: 50;
}
.masthead-left { display: flex; align-items: center; gap: 34px; }
.nav-rail { display: flex; gap: 4px; }
.nav {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  font-size: 14px; font-weight: 560; color: var(--ink-faint); border-radius: var(--r-sm);
  transition: color 0.18s, background 0.18s;
}
.nav svg { width: 17px; height: 17px; opacity: 0.8; }
.nav:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.nav.active { color: var(--ink); background: var(--s2); }
.nav.active svg { opacity: 1; color: var(--accent-bright); }
.btn-cta svg, .btn-ghost svg { width: 16px; height: 16px; }
.masthead-right { display: flex; align-items: center; gap: 12px; }

.user-pod {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 5px 7px 5px 5px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--s2);
}
.user-avatar {
  width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: var(--on-accent); font-family: var(--serif); font-weight: 700; font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}
.user-pod-meta { padding-right: 8px; line-height: 1.18; }
.user-pod-meta strong { display: block; font-size: 13px; font-weight: 600; }
.user-pod-meta span { font-size: 11px; color: var(--ink-faint); }
.user-pod-meta #userCredits { color: var(--accent-bright); font-weight: 700; font-size: 15px; }
.user-menu {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 210px; padding: 12px;
  background: var(--s2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--sh-lg);
  display: flex; flex-direction: column; gap: 9px; opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.2s var(--ease); z-index: 60;
}
.user-pod:hover .user-menu, .user-pod:focus-within .user-menu { opacity: 1; visibility: visible; transform: none; }
.mini-select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--s1); font-size: 13px; }
.user-menu .btn-text { text-align: left; padding: 6px 4px; }
.user-menu .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; }
.menu-row { display: flex; align-items: center; gap: 10px; }
.menu-row .mini-select { flex: 1; }
.mi-ic { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; transition: opacity 0.15s, color 0.15s; }
.user-menu .menu-item:hover .mi-ic { opacity: 1; }
.yt-status .mi-ic { opacity: 0.7; }
.menu-divider { height: 1px; background: var(--line); margin: 2px 0; }

/* ---------- Stage ---------- */
.stage { flex: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: 42px 36px 90px; }
.view { display: none; animation: rise 0.45s var(--ease); }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.view-head { margin-bottom: 30px; }
.view-sub { color: var(--ink-soft); font-size: 15px; margin-top: 12px; max-width: 580px; }

/* ---------- Statline ---------- */
.statline {
  display: flex; margin-bottom: 34px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--s1); overflow: hidden; box-shadow: var(--sh-sm), inset 0 1px 0 var(--hairline);
}
.stat { flex: 1; padding: 22px 26px; border-right: 1px solid var(--line); position: relative; }
.stat:last-child { border-right: none; }
.stat strong { display: block; font-family: var(--serif); font-weight: 460; font-size: 36px; letter-spacing: -0.02em; line-height: 1; }
.stat strong.stat-text { font-family: var(--mono); font-size: 17px; font-weight: 500; }
.stat span { font-size: 11.5px; color: var(--ink-faint); margin-top: 9px; display: block; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Cards (shared surface) ---------- */
.card, .composer, .monitor {
  background: linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px;
  box-shadow: var(--sh-sm), inset 0 1px 0 var(--hairline);
}
.card-sub { font-size: 13px; color: var(--ink-faint); margin: -6px 0 18px; }

.work { display: grid; grid-template-columns: 1fr 1.22fr; gap: 26px; align-items: start; }

.composer-rule {
  display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 20px;
}
.composer-rule .num { font-family: var(--mono); color: var(--accent-bright); font-weight: 500; letter-spacing: 0; }
.composer-rule .rule-fill { flex: 1; height: 1px; background: var(--line); }

.topic-wrap { position: relative; margin-bottom: 4px; border-radius: var(--r); background: var(--s3); border: 1px solid var(--line); transition: border-color 0.18s, box-shadow 0.18s; }
.topic-wrap:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.topic-field {
  display: block; width: 100%; border: none; background: transparent; resize: none; overflow: hidden;
  font-family: var(--serif); font-weight: 380; font-size: 22px; line-height: 1.5; letter-spacing: -0.01em;
  color: var(--ink); padding: 17px 18px; min-height: 96px;
}
.topic-field:focus { outline: none; }
.topic-field::placeholder { color: var(--ink-faint); }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 22px; }
.ctrl { display: flex; flex-direction: column; gap: 7px; }
.ctrl.wide { grid-column: 1 / -1; }
.ctrl > span { font-size: 11px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.ctrl select, .ctrl input {
  height: 42px; padding: 0 13px; background: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 14px; transition: border-color 0.16s, box-shadow 0.16s, background 0.16s; appearance: none;
}
.ctrl select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%237f8aa3' stroke-width='1.7'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
}
.ctrl select:focus, .ctrl input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--s4); }

/* ---------- Cost estimate ---------- */
.estimate {
  margin-top: 20px; padding: 16px 18px; border-radius: var(--r);
  background: var(--grad-soft); border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.estimate-left { display: flex; flex-direction: column; gap: 3px; }
.estimate-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-bright); }
.estimate-break { font-size: 11.5px; color: var(--ink-soft); }
.estimate-total { display: flex; align-items: baseline; gap: 6px; }
.estimate-total b { font-family: var(--serif); font-weight: 500; font-size: 30px; letter-spacing: -0.02em; }
.estimate-total span { font-size: 12px; color: var(--ink-faint); }

/* ---------- Monitor ---------- */
.project-ref { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); margin: -10px 0 18px; word-break: break-all; }
.pill { font-size: 10.5px; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: 0.07em; background: var(--s3); color: var(--ink-faint); }
.pill.running, .pill.queued, .pill.researching { background: rgba(240,179,65,0.16); color: var(--gold); }
.pill.review { background: var(--accent-wash); color: var(--accent-bright); }
.pill.done { background: rgba(67,214,163,0.16); color: var(--green); }
.pill.error { background: rgba(255,107,133,0.16); color: var(--red); }

.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 22px; }
.step { padding: 12px; border-radius: var(--r-sm); background: var(--s1); border: 1px solid var(--line); position: relative; overflow: hidden; transition: all 0.25s var(--ease); }
.step-n { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); }
.step strong { display: block; font-size: 12.5px; font-weight: 560; margin-top: 3px; color: var(--ink-soft); }
.step.done { background: rgba(67,214,163,0.08); border-color: rgba(67,214,163,0.28); }
.step.done strong { color: var(--green); }
.step.done .step-n::after { content: " ✓"; }
.step.active { border-color: var(--accent-line); background: var(--accent-wash); }
.step.active strong { color: var(--accent-bright); }
.step.active::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: sweep 1.4s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.step-time { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); min-height: 13px; }
.step-time:empty { min-height: 0; }
.step.done .step-time { color: var(--green); }
.step-time.live { color: var(--accent-bright); }
.step-time.live::before { content: "⏱ "; }

.preview {
  background: #05060a; border-radius: var(--r); min-height: 300px; display: grid; place-items: center;
  overflow: hidden; margin-bottom: 22px; position: relative; border: 1px solid var(--line);
}
.preview::before, .preview::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 24px; z-index: 2;
  background-image: radial-gradient(circle, rgba(255,255,255,0.14) 2px, transparent 2.6px); background-size: 24px 19px; opacity: 0.45;
}
.preview::before { left: 0; } .preview::after { right: 0; }
.preview img, .preview video { width: 100%; max-height: 440px; object-fit: contain; display: block; position: relative; z-index: 1; }
.empty-preview { text-align: center; padding: 44px; color: var(--ink-soft); z-index: 1; }
.film-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--accent-line); background: var(--accent-wash); color: var(--accent-bright); margin-bottom: 16px; }
.film-icon svg { width: 22px; height: 22px; }
.empty-preview strong { display: block; font-family: var(--serif); font-weight: 420; font-size: 20px; color: var(--ink); margin-bottom: 8px; }
.empty-preview span { font-size: 13.5px; line-height: 1.55; max-width: 330px; display: inline-block; }
.queue-note { color: var(--gold); font-weight: 600; }

.monitor-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.mini-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 13px; }

.scene-deck { display: flex; flex-direction: column; gap: 9px; max-height: 380px; overflow-y: auto; padding-right: 5px; }
.scene-card { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-sm); transition: border-color 0.16s; }
.scene-anim-tag { position: absolute; top: 13px; left: 13px; background: rgba(0,0,0,0.62); color: var(--accent-bright); font-size: 9px; font-weight: 700; letter-spacing: 0.3px; padding: 2px 6px; border-radius: 999px; pointer-events: none; }
.scene-card:hover { border-color: var(--line-2); }
.scene-card img, .scene-placeholder { width: 92px; height: 54px; border-radius: 6px; object-fit: cover; background: var(--s3); }
.scene-card img { cursor: zoom-in; transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.scene-card img:hover { transform: scale(1.04); box-shadow: 0 6px 18px -6px rgba(0,0,0,0.6); }

/* Image lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(4,4,7,0.86); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 4vw; cursor: zoom-out; animation: rise 0.18s var(--ease); }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--r); box-shadow: var(--sh-lg); border: 1px solid var(--line-2); }
.lightbox .lb-close { position: absolute; top: 22px; right: 26px; width: 42px; height: 42px; border-radius: 50%; background: var(--s2); color: var(--ink); font-size: 20px; display: grid; place-items: center; border: 1px solid var(--line-2); }
.lightbox .lb-close:hover { background: var(--s3); }

.review-actions { display: flex; gap: 10px; align-items: center; }

/* Thumbnail row */
.thumb-row { display: grid; grid-template-columns: 248px 1fr; gap: 16px; align-items: center; margin-bottom: 22px; padding: 12px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); }
.thumb-img { width: 248px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); cursor: zoom-in; border: 1px solid var(--line-2); transition: transform 0.15s var(--ease); }
.thumb-img:hover { transform: scale(1.02); }
.thumb-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.thumb-hint { font-size: 12px; color: var(--ink-faint); line-height: 1.4; }
@media (max-width: 680px) { .thumb-row { grid-template-columns: 1fr; } .thumb-img { width: 100%; } }
.scene-placeholder { display: grid; place-items: center; font-size: 9.5px; color: var(--ink-faint); border: 1px dashed var(--line-2); text-align: center; }
.scene-body span { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.scene-body strong { display: block; font-size: 13px; font-weight: 600; margin: 1px 0 3px; }
.scene-body p { font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scene-body .btn-ghost { margin-top: 8px; }

.logs { display: flex; flex-direction: column; gap: 1px; max-height: 380px; overflow-y: auto; padding-right: 5px; }
.log { padding: 9px 11px; border-radius: 7px; transition: background 0.14s; border-left: 2px solid transparent; }
.log:hover { background: var(--s1); border-left-color: var(--accent-line); }
.log strong { display: block; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); margin-bottom: 2px; }
.log span { font-size: 12.5px; color: var(--ink-soft); }
.log.muted span { color: var(--ink-faint); }

/* ---------- Library / dashboard gallery ---------- */
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.project-card {
  display: flex; flex-direction: column; background: linear-gradient(180deg, var(--s2), var(--s1));
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 1px 0 var(--hairline);
  transition: border-color 0.18s, transform 0.14s var(--ease), box-shadow 0.18s;
}
.project-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--sh); }
.card-thumb {
  position: relative; aspect-ratio: 16 / 9; background: #05060a; color: var(--accent-bright);
  display: grid; place-items: center; font-size: 30px; font-family: var(--mono); overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb.done { color: var(--green); } .card-thumb.error { color: var(--red); }
.card-thumb.playable { cursor: pointer; }
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 0.18s; background: rgba(4,5,9,0.32);
}
.card-play svg { width: 46px; height: 46px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.card-thumb.playable:hover .card-play { opacity: 1; }
.card-badge {
  position: absolute; top: 10px; left: 10px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 9px; border-radius: var(--r-pill); background: rgba(8,9,13,0.78); color: var(--ink-soft); backdrop-filter: blur(4px);
}
.card-badge.done { background: rgba(74,222,128,0.92); color: #06210f; }
.card-badge.review { background: var(--accent); color: #1a1300; }
.card-badge.error { background: rgba(255,93,115,0.92); color: #2a0008; }
.card-badge.busy { background: rgba(240,179,65,0.92); color: #221700; }
.card-body { padding: 13px 14px 6px; flex: 1; }
.card-body strong { display: block; font-family: var(--serif); font-weight: 480; font-size: 16px; line-height: 1.25; letter-spacing: -0.01em; max-height: 2.5em; overflow: hidden; }
.card-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.card-actions { display: flex; gap: 8px; align-items: center; padding: 10px 14px 14px; }
.card-actions .btn-trash { margin-left: auto; }
.empty-list { grid-column: 1 / -1; text-align: center; padding: 76px 20px; color: var(--ink-faint); font-family: var(--serif); font-size: 18px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--s1); }

/* in-app preview player (Plyr, brand-colored) */
:root { --plyr-color-main: #f5b500; }
#preview .plyr { width: 100%; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); }
.video-lightbox .vlb-stage { position: relative; display: flex; align-items: center; justify-content: center; cursor: default; }
.video-lightbox .plyr { width: min(900px, 92vw); max-height: 84vh; border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-lg); }
.video-lightbox .plyr video { max-height: 84vh; }
/* Fullscreen fix: make the player + video fill the screen (avoids the video shrinking
   into a corner with black around it). Covers native :fullscreen and Plyr's fallback. */
.plyr:fullscreen,
.plyr:-webkit-full-screen,
.plyr--fullscreen-active {
  width: 100% !important; height: 100% !important; max-height: none !important;
  border-radius: 0 !important; box-shadow: none !important;
}
.plyr:fullscreen .plyr__video-wrapper,
.plyr:-webkit-full-screen .plyr__video-wrapper,
.plyr--fullscreen-active .plyr__video-wrapper {
  height: 100% !important; padding: 0 !important;
}
.plyr:fullscreen video,
.plyr:-webkit-full-screen video,
.plyr--fullscreen-active video {
  width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain !important;
}

/* ---------- Admin: sidebar layout ---------- */
.admin-shell { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.admin-side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 18px; }
.admin-nav { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 14px; border-radius: var(--r-md); color: var(--ink-soft); font-size: 14px; font-weight: 600; text-align: left; transition: background 0.15s, color 0.15s; }
.admin-nav:hover { background: var(--s2); color: var(--ink); }
.admin-nav.active { background: var(--accent-wash); color: var(--accent-bright); }
.admin-nav .mi-ic { width: 17px; height: 17px; opacity: 0.85; }
.admin-main { min-width: 0; }
.admin-sec { display: none; }
.admin-sec.active { display: block; }
@media (max-width: 760px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; flex-direction: row; overflow-x: auto; gap: 6px; }
  .admin-nav { white-space: nowrap; }
}

/* ---------- Admin: all-projects oversight ---------- */
.admin-project-list { display: flex; flex-direction: column; gap: 8px; }
.adm-proj { display: grid; grid-template-columns: 150px 1fr auto auto auto; align-items: center; gap: 14px; padding: 10px 14px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-md); }
.adm-owner { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-topic { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* readable status chips (colored text on a subtle tint, not solid-on-dark) */
.adm-proj .card-badge { position: static; background: var(--s3); color: var(--ink-soft); }
.adm-proj .card-badge.done { background: rgba(74,222,128,0.14); color: #5fe08f; }
.adm-proj .card-badge.error { background: rgba(255,93,115,0.15); color: #ff8da0; }
.adm-proj .card-badge.review { background: var(--accent-wash); color: var(--accent-bright); }
.adm-proj .card-badge.running, .adm-proj .card-badge.queued, .adm-proj .card-badge.researching { background: rgba(240,179,65,0.16); color: var(--gold); }
.adm-date { font-size: 11.5px; color: var(--ink-faint); font-family: var(--mono); white-space: nowrap; }
.adm-actions { display: flex; gap: 6px; align-items: center; }
@media (max-width: 720px) { .adm-proj { grid-template-columns: 1fr auto; } .adm-topic, .adm-date { display: none; } }

/* ---------- Admin: audit log ---------- */
.audit-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.audit-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 14px; padding: 9px 14px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13px; }
.audit-action { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 9px; border-radius: var(--r-pill); background: var(--s3); color: var(--ink-soft); justify-self: start; }
.audit-action.a-login { background: rgba(74,222,128,0.14); color: #5fe08f; }
.audit-action.a-suspend, .audit-action.a-delete_user, .audit-action.a-account_delete { background: rgba(255,93,115,0.15); color: #ff8da0; }
.audit-action.a-password_change, .audit-action.a-password_reset { background: var(--accent-wash); color: var(--accent-bright); }
.audit-actor { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-target { color: var(--ink-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-date { color: var(--ink-faint); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 720px) { .audit-row { grid-template-columns: 1fr auto; } .audit-target { display: none; } }

/* ---------- Admin: error log ---------- */
.error-list { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow-y: auto; }
.err-row { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-md); }
.err-row summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.err-row summary::-webkit-details-marker { display: none; }
.err-where { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #ff8da0; background: rgba(255,93,115,0.12); padding: 3px 9px; border-radius: var(--r-pill); flex-shrink: 0; }
.err-msg { flex: 1; font-size: 12.5px; color: var(--ink-soft); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.err-date { font-size: 11px; color: var(--ink-faint); font-family: var(--mono); white-space: nowrap; }
.err-ctx { font-size: 11.5px; color: var(--ink-faint); padding: 0 14px 8px; font-family: var(--mono); }
.err-trace { margin: 0; padding: 12px 14px; background: #0a0b0f; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; overflow-x: auto; border-radius: 0 0 var(--r-md) var(--r-md); }

/* chat typing indicator + appear animation */
.chat-msg .typing { display: inline-flex; gap: 5px; align-items: center; }
.chat-msg .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); display: inline-block; animation: typingdot 1.1s infinite ease-in-out; }
.chat-msg .typing i:nth-child(2) { animation-delay: 0.15s; }
.chat-msg .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingdot { 0%, 70%, 100% { opacity: 0.25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.chat-msg.appear { animation: chatrise 0.22s var(--ease); }
@keyframes chatrise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Admin ---------- */
.admin-grid { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.admin-stats { display: flex; flex-direction: column; margin-bottom: 18px; }
.admin-stats > div { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.admin-stats > div:last-child { border-bottom: none; }
.admin-stats span { font-size: 13px; color: var(--ink-soft); }
.admin-stats strong { font-family: var(--serif); font-weight: 460; font-size: 22px; }
.admin-stats strong.stat-text { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.switch { display: flex; align-items: center; gap: 11px; padding: 13px; border-radius: var(--r-sm); background: var(--s1); font-size: 13.5px; cursor: pointer; border: 1px solid var(--line); }
.switch input { width: 17px; height: 17px; accent-color: var(--accent); }
.config-editor { width: 100%; min-height: 480px; background: #05060a; color: #cfe0ff; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; padding: 18px; resize: vertical; }
.config-editor:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.user-table-wrap { margin-top: 18px; }
.user-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.user-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); padding: 8px; border-bottom: 1px solid var(--line-2); }
.user-table th:first-child, .user-table td:first-child { width: 40%; }
.user-table td { font-size: 13px; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Actions cell must NOT clip — otherwise the leftmost button (+ créditos) is hidden. */
.user-table td.u-actions { overflow: visible; white-space: normal; }
.role-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 9px; border-radius: var(--r-pill); background: var(--s3); color: var(--ink-soft); }
.role-tag.admin { background: var(--accent-wash); color: var(--accent-bright); }

/* Pricing editor (admin) */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 6px 0 18px; }
.price-field { display: flex; flex-direction: column; gap: 6px; }
.price-field.wide { grid-column: 1 / -1; }
.price-field > span { font-size: 11px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.price-field input { height: 40px; padding: 0 12px; background: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; font-family: var(--mono); }
.price-field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.price-note { font-size: 12px; color: var(--ink-faint); line-height: 1.5; margin-top: 4px; }

/* ---------- YouTube ---------- */
.yt-btn { display: inline-flex; align-items: center; gap: 8px; }
.yt-btn svg { width: 17px; height: 17px; }
.btn-yt { background: #ff0033; color: #fff; box-shadow: 0 8px 24px -8px rgba(255,0,51,0.55), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-yt:hover:not(:disabled) { background: #e60030; transform: translateY(-1px); }
.yt-status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.yt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.yt-dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.publish-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; padding: 14px 16px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); }
.publish-row .pub-meta { flex: 1; min-width: 160px; }
.publish-row .pub-meta strong { display: block; font-size: 13.5px; }
.publish-row .pub-meta span { font-size: 12px; color: var(--ink-faint); }
.yt-link { color: var(--accent-bright); font-size: 12.5px; word-break: break-all; }
.yt-link:hover { text-decoration: underline; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 26px; right: 26px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-radius: var(--r); background: var(--s2); color: var(--ink); box-shadow: var(--sh-lg); font-size: 13.5px; min-width: 250px; border: 1px solid var(--line-2); border-left: 3px solid var(--green); animation: slidein 0.35s var(--ease); }
.toast.err { border-left-color: var(--red); }
.toast::before { font-weight: 700; }
.toast.ok::before { content: "✓"; color: var(--green); }
.toast.err::before { content: "!"; color: var(--red); }
@keyframes slidein { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,5,9,0.6); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 150; animation: rise 0.2s var(--ease); }
.modal { width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; background: var(--s2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--sh-lg); }

/* account modal + avatar */
.user-avatar.has-img { padding: 0; overflow: hidden; }
.user-avatar.has-img img { width: 100%; height: 100%; object-fit: cover; }
.acct-id { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.acct-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #1a1300; display: grid; place-items: center; font-weight: 800; font-size: 22px; overflow: hidden; flex-shrink: 0; }
.acct-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-email { font-size: 12.5px; color: var(--ink-faint); }
.acct-avatar-actions { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.acct-divider { height: 1px; background: var(--line); margin: 20px 0; }
.acct-sec-title { display: block; font-size: 14px; margin-bottom: 10px; }
.modal #acctSaveName, .modal #acctSavePw { margin-top: 6px; }
.acct-danger { border: 1px solid rgba(255,93,115,0.3); background: rgba(255,93,115,0.06); border-radius: var(--r-md); padding: 14px 16px; }
.acct-danger strong { color: #ff8da0; font-size: 13.5px; }
.acct-danger p { font-size: 13px; color: var(--ink-soft); margin: 6px 0 12px; }
.btn-danger.sm { height: 34px; padding: 0 14px; font-size: 13px; }

/* 2FA */
.twofa-on { display: flex; align-items: center; gap: 12px; }
.twofa-step { font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }
.twofa-qr { display: inline-block; padding: 12px; background: #fff; border-radius: var(--r-md); margin-bottom: 12px; }
.twofa-qr img, .twofa-qr canvas { display: block; }
.twofa-secret { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 12px; }
.twofa-secret code { font-family: var(--mono); color: var(--accent-bright); background: var(--s3); padding: 2px 7px; border-radius: 6px; letter-spacing: 1px; }

/* admin user table: status + actions */
.u-badge { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-pill); }
.u-badge.ok { background: rgba(74,222,128,0.14); color: #5fe08f; }
.u-badge.sus { background: rgba(255,93,115,0.15); color: #ff8da0; }
.u-suspended td { opacity: 0.55; }
.u-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.u-self { font-size: 11px; color: var(--ink-faint); font-style: italic; }
.modal h3 { font-family: var(--serif); font-weight: 460; font-size: 23px; margin-bottom: 10px; }
.modal p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 24px; }
.modal.wide { max-width: 560px; }
.pub-field { display: block; margin-bottom: 14px; }
.pub-field > span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 6px; }
.pub-field input, .pub-field textarea, .pub-field select {
  width: 100%; background: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 13.5px; line-height: 1.5; resize: vertical; appearance: none;
}
.pub-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%237f8aa3' stroke-width='1.7'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.pub-field input:focus, .pub-field textarea:focus, .pub-field select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.pub-field .hint { font-size: 11px; color: var(--ink-faint); margin-top: 4px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-danger { height: 40px; padding: 0 18px; border-radius: var(--r-pill); background: var(--red); color: #fff; font-weight: 600; font-size: 13.5px; }
.btn-danger:hover { background: #e6566f; }

/* ---------- Buy credits ---------- */
.modal-sub { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 20px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin-bottom: 22px; }
.pack-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 22px 10px 16px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--s3); cursor: pointer; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.pack-card:hover { border-color: var(--accent); background: var(--accent-wash); transform: translateY(-2px); }
.pack-card.popular { border-color: var(--accent-line); background: var(--accent-wash); }
.pack-label { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.pack-credits { font-family: var(--mono); font-size: 12px; color: var(--accent-bright); }
.pack-bonus { font-size: 10px; font-weight: 700; color: var(--green, #4ade80); letter-spacing: 0.02em; }
.pack-price { font-family: var(--serif); font-size: 25px; font-weight: 500; margin-top: 4px; }
.pack-save { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.pack-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; padding: 3px 8px; border-radius: var(--r-pill); background: var(--accent); color: #1a1300; }
@media (max-width: 560px) { .pack-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Reference image field (regenerate modal) ---------- */
.ref-field { margin: 6px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.ref-field > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-bright); }
.ref-hint { font-size: 12px; color: var(--ink-faint); margin: 5px 0 9px; line-height: 1.5; }
.ref-row { display: flex; align-items: center; gap: 10px; }
.ref-preview { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line-2); margin-left: auto; }

/* ---------- Brand modal ---------- */
.brand-grid { display: grid; grid-template-columns: 200px 1fr; gap: 22px; margin-bottom: 22px; }
.brand-logo-col { display: flex; flex-direction: column; gap: 10px; }
.brand-logo-drop { aspect-ratio: 16/10; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: var(--s3); display: grid; place-items: center; cursor: pointer; overflow: hidden; padding: 10px; text-align: center; transition: border-color 0.15s, background 0.15s; }
.brand-logo-drop:hover { border-color: var(--accent); background: var(--accent-wash); }
.brand-logo-drop img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo-drop span { font-size: 12px; color: var(--ink-soft); line-height: 1.4; }
.brand-logo-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn-ghost.sm, .btn-text.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.brand-fields { display: flex; flex-direction: column; gap: 12px; }
.brand-fields .pub-field.row { flex-direction: row; align-items: center; justify-content: space-between; }
.brand-fields .pub-field.row input[type=color] { width: 52px; height: 32px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: none; cursor: pointer; }
.brand-enable { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; margin-top: 4px; }
.brand-enable input { width: 16px; height: 16px; accent-color: var(--accent); }
@media (max-width: 560px) { .brand-grid { grid-template-columns: 1fr; } }
.brand-voice { border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 20px; }
.bv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.bv-head strong { font-size: 14px; }
.bv-status { font-size: 12px; color: var(--ink-soft); font-family: var(--mono); }
.bv-status.on { color: var(--green, #4ade80); }
.brand-voice .modal-sub { margin-bottom: 12px; }
.bv-script { border: 1px solid var(--accent-line); background: var(--accent-wash); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px; }
.bv-script-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-bright); margin-bottom: 8px; }
.bv-script p { font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--ink); margin: 0; }
.bv-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.bv-row .btn-text.sm { margin-left: auto; }
#bvRecord.recording { color: #ff5d73; border-color: #ff5d73; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.bv-preview { width: 100%; height: 38px; margin-bottom: 12px; }
.brand-voice #bvSave { margin-top: 4px; }

/* ---------- Credit history ---------- */
.txn-list { display: flex; flex-direction: column; max-height: 56vh; overflow-y: auto; margin: 6px 0 20px; border: 1px solid var(--line); border-radius: var(--r-md); }
.txn-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.txn-row:last-child { border-bottom: none; }
.txn-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.txn-kind { flex-shrink: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 9px; border-radius: var(--r-pill); }
.txn-kind.purchase { background: var(--accent-wash); color: var(--accent-bright); }
.txn-kind.signup { background: rgba(74,222,128,0.14); color: #4ade80; }
.txn-kind.spend { background: var(--s3); color: var(--ink-soft); }
.txn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.txn-text strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-sub { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-date { font-size: 11px; color: var(--ink-faint); font-family: var(--mono); }
.txn-amt { flex-shrink: 0; font-family: var(--mono); font-weight: 600; font-size: 14px; text-align: right; }
.txn-amt.pos { color: #4ade80; }
.txn-amt.neg { color: var(--ink-soft); }
.txn-bal { display: block; font-size: 10.5px; color: var(--ink-faint); font-weight: 400; }

/* ---------- Research chat ---------- */
.chat-panel { margin-top: 18px; border: 1px solid var(--accent-line); background: var(--accent-wash); border-radius: var(--r-md); padding: 14px 16px; }
.chat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.chat-head strong { font-size: 14px; }
.chat-head .chat-hint { font-size: 11.5px; color: var(--ink-faint); margin-left: 2px; }
.chat-head .mi-ic { color: var(--accent-bright); opacity: 1; }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; margin-bottom: 12px; }
.chat-log:empty { display: none; }
.chat-msg { display: flex; }
.chat-msg span { font-size: 13.5px; line-height: 1.5; padding: 8px 12px; border-radius: 12px; max-width: 85%; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user span { background: var(--accent); color: #1a1300; border-bottom-right-radius: 4px; }
.chat-msg.assistant span { background: var(--s2); border: 1px solid var(--line-2); color: var(--ink-soft); border-bottom-left-radius: 4px; }
.chat-msg.thinking span { opacity: 0.6; font-style: italic; }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--s1); font-size: 13.5px; color: var(--ink); }
.chat-input input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* The "Edit with AI" chat sits inline in the review column, below the script/sources. */
.chat-panel:not(.hidden) .chat-log { max-height: 280px; overflow-y: auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: auto; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 24px 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-mark { width: 26px; height: 26px; font-size: 14px; border-radius: 8px; }
.footer-brand .brand-word { font-size: 15px; }
.footer-tag { font-size: 12px; color: var(--ink-faint); margin-left: 4px; }
.footer-links { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-faint); }
.footer-links code { font-family: var(--mono); color: var(--ink-soft); }
.footer-dot { opacity: 0.5; }
.footer-links a { color: var(--ink-faint); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent-bright); }

/* ---------- Cookie notice ---------- */
.cookie-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 400;
  width: min(720px, calc(100vw - 32px)); display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--s2); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: 14px 18px; box-shadow: var(--sh-lg); animation: rise 0.25s var(--ease);
}
.cookie-banner p { flex: 1; min-width: 220px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.cookie-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
@media (max-width: 520px) { .cookie-banner { bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; } .cookie-actions { width: 100%; justify-content: flex-end; } }

/* ---------- Legal pages ---------- */
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 32px 24px 80px; }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); margin-bottom: 30px; flex-wrap: wrap; }
.legal-top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.legal-top .brand-word { font-size: 17px; }
.legal-langs { display: flex; gap: 6px; }
.legal-langs button { height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--s2); color: var(--ink-soft); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.legal-langs button.active { background: var(--accent); color: #1a1300; border-color: var(--accent); }
.legal-wrap h1 { font-family: var(--serif); font-weight: 480; font-size: 34px; margin-bottom: 6px; }
.legal-updated { font-size: 13px; color: var(--ink-faint); margin-bottom: 28px; }
.legal-wrap h2 { font-family: var(--serif); font-weight: 460; font-size: 22px; margin: 32px 0 10px; }
.legal-wrap h3 { font-size: 15px; font-weight: 700; margin: 18px 0 6px; }
.legal-wrap p, .legal-wrap li { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.legal-wrap ul { padding-left: 22px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.legal-wrap a { color: var(--accent-bright); }
.legal-wrap .lead { font-size: 16px; color: var(--ink); }
.legal-note { border: 1px solid var(--accent-line); background: var(--accent-wash); border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; color: var(--ink-soft); margin: 18px 0; }
.legal-lang { display: none; }
.legal-lang.show { display: block; }
.legal-foot { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lf-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.lf-brand .brand-mark { width: 24px; height: 24px; font-size: 13px; }
.lf-links { display: flex; gap: 16px; flex-wrap: wrap; }
.lf-links a { color: var(--ink-faint); text-decoration: none; font-size: 13px; transition: color 0.15s; }
.lf-links a:hover { color: var(--accent-bright); }
.lf-c { font-size: 12px; color: var(--ink-faint); font-family: var(--mono); }
/* footer link labels follow the page language (set on <html lang>) */
html[lang="en"] .lf-es { display: none; }
html[lang="es"] .lf-en { display: none; }
.auth-legal { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; font-size: 12.5px; color: var(--ink-faint); }
.auth-legal a { color: var(--ink-faint); text-decoration: none; transition: color 0.15s; }
.auth-legal a:hover { color: var(--accent-bright); }

.btn-trash { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; color: var(--ink-faint); transition: all 0.16s var(--ease); filter: grayscale(1); opacity: 0.6; }
.btn-trash:hover { background: rgba(255,107,133,0.14); opacity: 1; filter: none; }
.film-icon.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Research review ---------- */
.review-panel { border: 1px solid var(--accent-line); background: var(--grad-soft); border-radius: var(--r-lg); padding: 24px; margin-bottom: 24px; box-shadow: inset 0 1px 0 var(--hairline); }
.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.review-title { font-family: var(--serif); font-weight: 480; font-size: 23px; letter-spacing: -0.015em; margin-top: 4px; }
.review-note { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 18px; max-width: 480px; }
.review-field { display: block; margin-bottom: 16px; }
.review-field > span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 7px; }
.review-panel textarea, .review-panel input { width: 100%; background: var(--s2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; font-size: 13.5px; line-height: 1.5; resize: vertical; transition: border-color 0.15s, box-shadow 0.15s; }
.review-panel textarea:focus, .review-panel input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.review-panel textarea[readonly], .review-panel input[readonly] { opacity: 0.85; cursor: default; }
.review-scenes { display: flex; flex-direction: column; gap: 11px; max-height: 360px; overflow-y: auto; padding-right: 5px; }
.review-scene { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.review-scene-n { font-family: var(--mono); font-size: 12px; color: var(--accent-bright); padding-top: 11px; }
.review-scene-fields { display: flex; flex-direction: column; gap: 6px; }
.review-scene-fields input[data-f=title] { font-family: var(--serif); font-size: 15px; font-weight: 500; }
.review-sources { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.review-sources-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); }
.review-sources a { font-size: 12px; color: var(--accent-bright); word-break: break-all; }
.review-sources a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .work { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-poster { display: none; }
}
@media (max-width: 680px) {
  .masthead { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .masthead-left { gap: 18px; }
  .stage { padding: 28px 16px 60px; }
  .statline { flex-wrap: wrap; } .stat { min-width: 50%; }
  .controls, .pricing-grid, .monitor-grid { grid-template-columns: 1fr; }
  /* Keep credits visible on mobile (only hide the longer name to save space). */
  .user-pod-meta strong { display: none; }
  .user-pod-meta { padding-right: 4px; }
  .nav span { display: none; }
}

/* ===================== LANDING (logged-out home) ===================== */
/* Bilingual blocks: show only the active language (html[lang] is kept by applyLanguage). */
html[lang="es"] .t-en, html[lang="en"] .t-es { display: none; }

.landing { position: relative; z-index: 1; height: 100vh; overflow-y: auto; scroll-behavior: smooth;
  background:
    radial-gradient(1100px 540px at 78% -10%, rgba(245,181,0,0.16), transparent 60%),
    radial-gradient(820px 520px at 8% 4%, rgba(245,181,0,0.06), transparent 55%),
    radial-gradient(760px 760px at 50% 118%, rgba(245,181,0,0.05), transparent 60%),
    var(--bg); }
/* Subtle film grain for premium texture (sits above the bg, behind all content). */
.landing::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"); }
.landing .brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink); text-decoration: none; }
.landing .brand-mark { font-size: 20px; }
.landing .b-llm { color: var(--accent); }

.land-nav { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 30px; background: rgba(11,10,6,0.72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.land-links { display: flex; gap: 26px; }
.land-links a { color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color 0.15s var(--ease); }
.land-links a:hover { color: var(--ink); }
.land-right { display: flex; align-items: center; gap: 14px; }
.land-langs { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; }
.land-langs button { background: transparent; border: 0; color: var(--ink-faint); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; cursor: pointer; }
.land-langs button.active { background: var(--accent-wash); color: var(--accent-2); }

.land-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 70px 30px 60px; }
.land-hero-copy .eyebrow { margin-bottom: 16px; }
.land-h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 20px; }
.land-lead { font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 40ch; margin: 0 0 28px; }
.land-cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.land-cta-row.center { justify-content: center; margin-top: 30px; }
.land-cta-row .btn-cta, .land-cta-row .btn-ghost { text-decoration: none; }
.land-fineprint { margin-top: 16px; font-size: 13px; color: var(--ink-faint); }
.land-hero-center { grid-template-columns: 1fr; max-width: 840px; text-align: center; padding-top: 84px; padding-bottom: 30px; }
.land-hero-center .land-lead { margin-left: auto; margin-right: auto; }
.land-hero-center .land-cta-row { justify-content: center; }

/* Hero entrance: staggered fade-up on load. */
@media (prefers-reduced-motion: no-preference) {
  .land-hero-copy > * { opacity: 0; animation: land-rise 0.7s var(--ease, cubic-bezier(.2,.7,.2,1)) forwards; }
  .land-hero-copy > .eyebrow { animation-delay: 0.05s; }
  .land-hero-copy > .land-h1 { animation-delay: 0.14s; }
  .land-hero-copy > .land-lead { animation-delay: 0.24s; }
  .land-hero-copy > .land-cta-row { animation-delay: 0.34s; }
  .land-hero-copy > .land-fineprint { animation-delay: 0.42s; }
  .land-showcase { opacity: 0; animation: land-rise 0.8s var(--ease, cubic-bezier(.2,.7,.2,1)) 0.5s forwards; }
}
@keyframes land-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Real-outputs marquee */
.land-showcase { max-width: 1240px; margin: 4px auto 8px; padding: 0 30px 8px; }
.land-showcase-label { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 16px; }
.land-showcase-mask { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.land-showcase-track { display: flex; gap: 16px; width: max-content; animation: land-marquee 46s linear infinite; }
.land-showcase-mask:hover .land-showcase-track { animation-play-state: paused; }
.land-shot { margin: 0; flex: 0 0 auto; width: 232px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-2); box-shadow: 0 14px 34px rgba(0,0,0,0.45); background: var(--s2);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.land-shot:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 22px 48px rgba(0,0,0,0.55); }
.land-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes land-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 8px)); } }
@media (prefers-reduced-motion: reduce) { .land-showcase-track { animation: none; } }
.land-style-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.land-style-chips span { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--ink-soft);
  border: 1px solid var(--line-2); border-radius: 100px; padding: 5px 13px; background: rgba(245,181,0,0.04); }
.auth-back { display: inline-block; margin: 0 0 20px; color: var(--ink-faint); text-decoration: none; font-size: 14px; transition: color 0.15s var(--ease); }
.auth-back:hover { color: var(--ink); }
.land-hero-form { background: var(--s1); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 30px 28px; box-shadow: var(--sh-lg), inset 0 1px 0 var(--hairline); }
.land-hero-form .auth-form { width: 100%; }

.land-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.land-band-inner { max-width: 880px; margin: 0 auto; padding: 56px 30px; text-align: center; }
.land-band-text { font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.5; color: var(--ink); margin: 14px 0 0; }

.land-section { max-width: 1100px; margin: 0 auto; padding: 74px 30px; }
.land-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.land-h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(27px, 3.4vw, 40px); line-height: 1.1; color: var(--ink); margin: 12px 0 0; }
.land-sub { font-size: 16.5px; line-height: 1.6; color: var(--ink-soft); margin: 16px auto 0; max-width: 60ch; }
.landing .eyebrow { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); }

.land-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; padding: 0; margin: 0; }
.land-steps li { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 22px; }
.land-step-n { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.land-steps h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ink); margin: 10px 0 8px; }
.land-steps p { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.land-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 18px; }
.land-card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 22px; transition: border-color 0.15s var(--ease), transform 0.15s var(--ease); }
.land-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.land-card h3 { font-family: var(--serif); font-weight: 600; font-size: 18px; color: var(--ink); margin: 0 0 9px; }
.land-card p { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.land-price-points { max-width: 760px; margin: 0 auto; padding: 0; list-style: none; display: grid; gap: 14px; }
.land-price-points li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.land-price-points li::before { content: "🐝"; position: absolute; left: 0; top: 1px; font-size: 15px; }

.land-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.land-faq details { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 20px; }
.land-faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 16px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.land-faq summary::-webkit-details-marker { display: none; }
.land-faq summary::after { content: "+"; color: var(--accent); font-size: 20px; margin-left: 14px; }
.land-faq details[open] summary::after { content: "–"; }
.land-faq p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
.land-faq a { color: var(--accent-2); }

.land-foot { border-top: 1px solid var(--line); background: var(--bg-2); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; max-width: 1100px; margin: 40px auto 0; padding: 30px; }
.land-foot-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 600; color: var(--ink); }
.land-foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.land-foot-links a { color: var(--ink-faint); text-decoration: none; font-size: 14px; }
.land-foot-links a:hover { color: var(--ink); }
.land-foot-note { color: var(--ink-faint); font-size: 13px; margin: 0; }

@media (max-width: 860px) {
  .land-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
  .land-links { display: none; }
  .land-nav { padding: 14px 18px; }
  .land-section { padding: 54px 20px; }
}

/* Doodle cast sheet (sprite) preview in the review panel */
.cast-preview { border: 1px solid var(--accent-line); border-radius: var(--r); background: var(--accent-wash); padding: 16px 18px; margin: 14px 0; }
.cast-head { font-family: var(--serif); font-weight: 600; color: var(--ink); }
.cast-note { font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }
.cast-img { width: 100%; max-width: 520px; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; margin-bottom: 10px; background: #fff; }
.cast-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.doc-name { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-gate { display: grid; place-items: center; min-height: 100vh; color: var(--ink-faint); font-family: var(--mono); font-size: 13px; }

/* Per-stage timing summary in the activity feed */
.timings-row { background: var(--accent-wash); border: 1px solid var(--accent-line); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 10px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.timings-row strong { color: var(--accent-2); }
.timings-row.admin-cost { background: rgba(120,120,140,0.10); border-color: var(--line-2); }
.timings-row.admin-cost .muted { color: var(--ink-faint); font-size: 11.5px; }
.timings-row.admin-cost strong.ok { color: var(--green); }
.timings-row.admin-cost strong.bad { color: #ff6b6b; }
