/* ─────────────────────────────────────────────
   HOLO Veo · Studio 2026 — modern AI tool
   Pure dark · electric lime · glass · big type
   ───────────────────────────────────────────── */

:root {
  --bg:        #0a0a0b;
  --bg-2:      #111114;
  --surface:   rgba(255,255,255,0.035);
  --surface-2: rgba(255,255,255,0.06);
  --surface-3: rgba(255,255,255,0.09);
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);
  --line-3:    rgba(255,255,255,0.22);
  --ink:       #f4f4f5;
  --ink-2:     #a1a1aa;
  --ink-3:     #71717a;
  --ink-4:     #52525b;
  --accent:    oklch(0.93 0.22 128);  /* electric lime */
  --accent-2:  oklch(0.85 0.20 128);
  --accent-ink:#0a0a0b;
  --danger:    oklch(0.72 0.20 25);
  --warn:      oklch(0.85 0.16 80);
  --ok:        oklch(0.85 0.18 145);

  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "JetBrains Mono", monospace;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;
  --r-xl: 28px;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: -0.005em;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(800px 500px at 50% -8%, oklch(0.93 0.22 128 / 0.10), transparent 60%),
    radial-gradient(600px 400px at 90% 110%, oklch(0.55 0.20 280 / 0.08), transparent 70%);
  z-index: 0;
}

::selection { background: var(--accent); color: var(--accent-ink); }

button, input, textarea { font-family: inherit; }
input:focus, textarea:focus, button:focus { outline: none; }

/* ── Top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(10,10,11,0.7);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--accent-ink);
  font-weight: 700; font-size: 14px;
  position: relative;
  box-shadow: 0 0 24px oklch(0.93 0.22 128 / 0.4);
}
.brand-mark::after {
  content: ''; position: absolute; inset: 4px;
  border-radius: 5px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent 60%);
  pointer-events: none;
}
.brand-tag {
  margin-left: 8px;
  padding: 4px 10px;
  font-family: var(--mono); font-size: 10.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
}
.topmeta { display: flex; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.chip b { color: var(--ink); font-weight: 600; }
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ok);
  box-shadow: 0 0 0 4px oklch(0.85 0.18 145 / 0.18); }

/* Health chip — color reflects /health response. */
.chip.health-busy .dot    { background: var(--warn); box-shadow: 0 0 0 4px oklch(0.85 0.16 80 / 0.22); }
.chip.health-busy         { color: var(--warn); border-color: oklch(0.85 0.16 80 / 0.35); }
.chip.health-down .dot    { background: var(--danger); box-shadow: 0 0 0 4px oklch(0.72 0.20 25 / 0.25); }
.chip.health-down         { color: var(--danger); border-color: oklch(0.72 0.20 25 / 0.4); }
.chip.health-unknown .dot { background: var(--ink-3); box-shadow: none; }
.chip.health-unknown      { color: var(--ink-3); }

/* Service-wide banner (announcements / outages). */
.service-banner {
  position: sticky; top: 64px; z-index: 19;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 32px;
  background: oklch(0.85 0.16 80 / 0.12);
  border-bottom: 1px solid oklch(0.85 0.16 80 / 0.35);
  color: var(--warn);
  font-size: 13px;
  font-family: var(--mono);
  backdrop-filter: blur(12px);
}
.service-banner .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 4px oklch(0.85 0.16 80 / 0.22);
}
.service-banner.critical {
  background: oklch(0.72 0.20 25 / 0.12);
  border-bottom-color: oklch(0.72 0.20 25 / 0.4);
  color: var(--danger);
}
.service-banner.critical .dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px oklch(0.72 0.20 25 / 0.22);
}

/* ── Shell ── */
.shell {
  position: relative; z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  margin-bottom: 40px;
}
.hero h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(90deg, var(--accent), oklch(0.78 0.18 80));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 auto;
  max-width: 540px;
}

/* ── Composer (the centerpiece) ── */
.composer {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(0,0,0,0.4);
}
.composer-inner {
  background: var(--bg-2);
  border-radius: calc(var(--r-xl) - 8px);
  padding: 28px 28px 18px;
}

/* prompt area */
.prompt-wrap { position: relative; }
.prompt-wrap textarea {
  width: 100%;
  min-height: 110px;
  background: transparent;
  border: 0;
  resize: none;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  font-weight: 400;
  padding: 4px 0;
}
.prompt-wrap textarea::placeholder { color: var(--ink-3); }

/* image attached strip */
.attached-strip {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 14px;
}
.attached-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
}
.attached-meta {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
}
.attached-meta .lbl {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
}
.attached-meta .desc {
  font-size: 13px; color: var(--ink-2);
}
.attached-x {
  background: transparent; border: 0;
  color: var(--ink-3); cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 18px;
  transition: background .15s, color .15s;
}
.attached-x:hover { background: var(--surface-2); color: var(--ink); }

/* Multi-slot reference list (R2V up to 3, I2V single, R2I single image). */
.attached-strip.multi {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}
.attached-head {
  display: flex; align-items: center; justify-content: space-between;
}
.attached-head .lbl {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
}
.attached-clear {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-3);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; cursor: pointer;
  transition: all .15s;
}
.attached-clear:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-2); }

.slot-list { display: flex; gap: 10px; flex-wrap: wrap; }
.slot-card {
  position: relative;
  width: 120px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.slot-thumb {
  width: 100%; height: 80px; object-fit: cover; display: block;
}
.slot-x {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
  transition: background .15s;
}
.slot-x:hover { background: var(--danger); }
.slot-frame-badge {
  position: absolute; bottom: 24px; left: 6px;
  background: rgba(0,0,0,0.7);
  font-family: var(--mono); font-size: 9.5px;
  color: var(--ink);
  padding: 2px 6px; border-radius: 999px;
  letter-spacing: 0.04em;
}
.slot-scrub {
  width: 100%;
  height: 18px;
  background: transparent;
  -webkit-appearance: none; appearance: none;
  margin: 0;
  padding: 6px 8px;
  cursor: ew-resize;
}
.slot-scrub::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line-2);
  border-radius: 999px;
}
.slot-scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent);
  margin-top: -4px;
  cursor: ew-resize;
}
.slot-scrub::-moz-range-track { height: 2px; background: var(--line-2); border-radius: 999px; }
.slot-scrub::-moz-range-thumb { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); border: 0; cursor: ew-resize; }

/* drop overlay */
.drop-overlay {
  position: absolute; inset: 0;
  border: 2px dashed var(--accent);
  border-radius: var(--r-xl);
  background: oklch(0.93 0.22 128 / 0.08);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 500;
  color: var(--accent);
  z-index: 10;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* Media-kind toggle (Video / Image) — segmented pill. */
.mode-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.mode-toggle-btn {
  border: 0;
  background: transparent;
  padding: 0 14px;
  height: 32px;
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.mode-toggle-btn:hover { color: var(--ink); }
.mode-toggle-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
}

/* control row */
.controls {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.ctl-btn, .ctl-pop {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  position: relative;
}
.ctl-btn:hover, .ctl-pop:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
  color: var(--ink);
}
.ctl-btn .icn, .ctl-pop .icn {
  width: 14px; height: 14px;
  display: inline-block;
}
.ctl-btn .v {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ctl-pop .caret {
  font-size: 9px; color: var(--ink-3); margin-left: 2px;
}

.ctl-spacer { flex: 1; }

.cost-pill {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  padding: 0 12px;
  height: 38px;
  display: inline-flex; align-items: center;
}
.cost-pill b { color: var(--ink); font-weight: 600; margin-left: 4px; }
.cost-pill .cost-tier {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10.5px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

.btn-go {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .08s, box-shadow .15s, opacity .15s;
  box-shadow: 0 0 0 1px oklch(0.93 0.22 128 / 0.4),
              0 8px 24px -6px oklch(0.93 0.22 128 / 0.4);
}
.btn-go:hover { box-shadow: 0 0 0 1px var(--accent), 0 10px 32px -6px oklch(0.93 0.22 128 / 0.6); }
.btn-go:active { transform: translateY(1px); }
.btn-go:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-go .arr {
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--accent-ink);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 11px;
}

/* ── Popover (control menus) ── */
.pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #18181b;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 6px;
  min-width: 220px;
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.7);
  z-index: 30;
  animation: popin .14s ease;
}
@keyframes popin {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.pop-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  transition: background .12s, color .12s;
}
.pop-row:hover { background: var(--surface-2); color: var(--ink); }
.pop-row.active { background: var(--surface-3); color: var(--ink); }
.pop-row.disabled { opacity: 0.35; cursor: not-allowed; }
.pop-row .meta {
  font-size: 11px; color: var(--ink-3); font-family: var(--mono);
}
.pop-row .check {
  width: 14px; height: 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line-3);
  display: inline-grid; place-items: center;
  flex-shrink: 0;
}
.pop-row.active .check {
  border-color: var(--accent); background: var(--accent);
}
.pop-row.active .check::after {
  content: ''; width: 5px; height: 5px; border-radius: 999px;
  background: var(--accent-ink);
}

/* Account popover (Credits chip) */
.chip-btn {
  border: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border-radius: 999px;
  font-size: 12.5px;
  transition: background .15s, border-color .15s, color .15s;
}
.chip-btn:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--ink); }
.chip-btn .caret { font-size: 9px; color: var(--ink-3); }

.account-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  bottom: auto;
  min-width: 320px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.acct-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.acct-name { font-weight: 600; color: var(--ink); font-size: 13.5px; letter-spacing: -0.01em; }
.acct-key { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }

.acct-row { display: flex; gap: 12px; }
.acct-cell {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.acct-cell .lbl {
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.acct-cell .val { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.acct-cell .val.big { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }

.acct-section-h {
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.acct-ladder { display: flex; flex-direction: column; gap: 4px; }
.acct-ladder-h {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--ink-2);
}
.acct-ladder-h b { color: var(--accent); font-weight: 500; }
.acct-ladder-h .meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.acct-bar {
  height: 4px; border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.acct-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s ease;
}

.acct-link {
  margin-top: 4px;
  text-align: center;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 12.5px;
  text-decoration: none;
  transition: all .15s;
}
.acct-link:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-2); }

/* count stepper inside popover */
.count-pop {
  padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.count-pop-head {
  font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-family: var(--mono);
}
.count-pills {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
}
.count-pills button {
  height: 34px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: all .12s;
}
.count-pills button:hover { background: var(--surface-2); color: var(--ink); }
.count-pills button.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* ── Section heading for results ── */
.section-h {
  display: flex; align-items: center; justify-content: space-between;
  margin: 56px 0 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.reel-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-chips {
  display: inline-flex; gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.filter-chip {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.filter-chip:hover { color: var(--ink); }
.filter-chip.active { background: var(--surface-3); color: var(--ink); }
.section-h h2 {
  font-size: 24px; font-weight: 500; letter-spacing: -0.02em;
  margin: 0;
}
.section-h h2 .count {
  color: var(--ink-3); margin-left: 10px; font-size: 18px; font-weight: 400;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface); }

/* ── Reel: results grid ── */
.empty {
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  padding: 80px 24px;
  text-align: center;
  color: var(--ink-3);
}
.empty-glyph {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  position: relative;
}
.empty-glyph::after {
  content: ''; position: absolute;
  width: 0; height: 0;
  border-left: 12px solid var(--ink-3);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}
.empty h3 {
  margin: 0 0 6px; font-size: 18px; font-weight: 500; color: var(--ink-2);
  letter-spacing: -0.01em;
}
.empty p { margin: 0; font-size: 13px; }

/* batch label */
.batch-h {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 12px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.batch-h::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.batch-h:first-of-type { margin-top: 0; }

.reel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.reel-grid.has-portrait {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.card:hover { border-color: var(--line-2); }
.card-stage {
  position: relative;
  background: #000;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: grid; place-items: center;
}
.card-stage.portrait { aspect-ratio: 9/16; }
.card-stage video, .card-stage img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* status overlays */
.stage-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
              repeating-linear-gradient(45deg,
                rgba(255,255,255,0.015) 0 20px,
                transparent 20px 40px);
}
.stage-num {
  font-size: 56px; font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.stage-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}
.stage-status .pulse {
  width: 6px; height: 6px; border-radius: 999px; background: var(--ink-3);
}
.s-queued .pulse { background: var(--ink-2); }
.s-processing .pulse { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.s-completed .pulse { background: var(--ok); }
.s-failed { color: var(--danger); border-color: oklch(0.72 0.20 25 / 0.4); }
.s-failed .pulse { background: var(--danger); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.4; }
}

/* progress arc for processing */
.scan-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; overflow: hidden;
}
.scan-bar::after {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 1.6s ease-in-out infinite;
}
@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(450%); }
}

/* card foot */
.card-foot {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.card-foot .prompt-text {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.card-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-transform: lowercase;
}
.tag.pri { color: var(--accent); border-color: oklch(0.93 0.22 128 / 0.3); background: oklch(0.93 0.22 128 / 0.06); }
.card-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  font-size: 13px;
}
.icon-btn:hover { color: var(--accent); border-color: var(--line-2); background: var(--surface-2); }
.dl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s, box-shadow .15s;
  box-shadow: 0 0 0 1px oklch(0.93 0.22 128 / 0.4),
              0 6px 18px -4px oklch(0.93 0.22 128 / 0.4);
  white-space: nowrap;
}
.dl-btn:hover { box-shadow: 0 0 0 1px var(--accent), 0 8px 22px -4px oklch(0.93 0.22 128 / 0.6); }
.dl-btn:active { transform: translateY(1px); }

.reuse-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.reuse-btn:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-2); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid; place-items: center;
  padding: 32px;
  animation: fade-in .18s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-stage {
  max-width: min(96vw, 1600px);
  max-height: 88vh;
  display: flex; flex-direction: column; gap: 12px;
}
.lightbox-stage video,
.lightbox-stage img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 14px;
  background: #000;
  object-fit: contain;
}
.lightbox-foot {
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
}
.lightbox-prompt { max-width: 900px; margin: 0 auto; line-height: 1.4; }
.lightbox-x {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
  transition: background .15s;
}
.lightbox-x:hover { background: rgba(255,255,255,0.18); }

.stage-dl {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  display: grid; place-items: center;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  transition: background .15s, color .15s, transform .08s;
  z-index: 5;
  opacity: 0;
}
.card:hover .stage-dl { opacity: 1; }
.stage-dl:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stage-dl:active { transform: scale(0.94); }

/* Cancel-queued — always visible so users can abort without hovering. */
.stage-cancel {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  color: var(--ink-2);
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .08s;
  z-index: 5;
  padding: 0;
}
.stage-cancel:hover { background: oklch(0.72 0.20 25 / 0.9); color: #fff; border-color: var(--danger); }
.stage-cancel:active { transform: scale(0.94); }

.card-err {
  padding: 10px 14px;
  margin: 0 12px 12px;
  background: oklch(0.72 0.20 25 / 0.08);
  border: 1px solid oklch(0.72 0.20 25 / 0.2);
  border-radius: 8px;
  font-family: var(--mono); font-size: 11px;
  color: var(--danger);
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  background: #18181b;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  animation: toast-in .3s ease;
}
.toast.err { border-color: oklch(0.72 0.20 25 / 0.5); color: var(--danger); }
.toast .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.toast.err .dot { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 720px) {
  .shell { padding: 32px 16px 80px; }
  .topbar { padding: 14px 16px; }
  .controls { gap: 6px; }
  .ctl-btn, .ctl-pop { padding: 0 10px; font-size: 12.5px; }
  .reel-grid { grid-template-columns: 1fr; }
  .topmeta .chip { display: none; }
}
