/* ── Reset & Variables ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080d1a;
  --surface:   rgba(15, 23, 48, 0.75);
  --border:    rgba(255,255,255,0.09);
  --text:      #f0f4ff;
  --muted:     #7b8db0;
  --blue:      #3b82f6;
  --blue-h:    #2563eb;
  --purple:    #8b5cf6;
  --purple-h:  #7c3aed;
  --pink:      #ec4899;
  --pink-h:    #db2777;
  --green:     #10b981;
  --red:       #ef4444;
  --radius:    18px;
  --shadow:    0 24px 64px -16px rgba(0,0,0,0.6);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem 4rem;
  overflow-x: hidden;
}

/* ── Animated Background ─────────────────────────────────────────── */
.bg-mesh {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 40%, rgba(59,130,246,0.12) 0%, transparent 50%),
    radial-gradient(circle at 75% 20%, rgba(139,92,246,0.12) 0%, transparent 45%),
    radial-gradient(circle at 60% 80%, rgba(236,72,153,0.08) 0%, transparent 40%);
  z-index: -1;
  animation: meshSpin 40s linear infinite;
  pointer-events: none;
}
@keyframes meshSpin { to { transform: rotate(360deg); } }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  width: 100%;
  max-width: 820px;
  padding: 2rem 0 1rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo svg { color: #60a5fa; -webkit-text-fill-color: initial; }
.header-tag {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: .3rem .8rem;
  border-radius: 20px;
}

/* ── Pipeline Tabs ───────────────────────────────────────────────── */
.pipeline-tabs {
  display: flex;
  gap: .5rem;
  width: 100%;
  max-width: 820px;
  margin-bottom: .25rem;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  width: auto;
  transition: all .25s;
}
.tab-btn:hover { border-color: var(--blue); color: var(--text); }
.tab-btn.active { border-color: var(--blue); color: var(--blue); background: rgba(59,130,246,.1); box-shadow: 0 0 16px rgba(59,130,246,.15); }
.tab-btn[data-tab="vids"].active { border-color: #14b8a6; color: #14b8a6; background: rgba(20,184,166,.1); box-shadow: 0 0 16px rgba(20,184,166,.15); }
.tab-btn[data-tab="vids"]:hover  { border-color: #14b8a6; color: #14b8a6; }

/* ── Teal theme (Google Vids pipeline) ───────────────────────────── */
:root { --teal: #14b8a6; --teal-h: #0d9488; }

/* ── Orange theme (Short Stories pipeline) ───────────────────────── */
:root { --orange: #f97316; --orange-h: #ea580c; }

.badge-orange { background: linear-gradient(135deg, var(--orange), #fb923c); box-shadow: 0 4px 12px rgba(249,115,22,.35); }
.btn-orange   { background: var(--orange); box-shadow: 0 4px 20px rgba(249,115,22,.4); }
.btn-orange:not(:disabled):hover { background: var(--orange-h); }
.thin-fill.orange-fill  { background: var(--orange); }
.fat-fill.orange-fat-fill { background: linear-gradient(90deg, var(--orange), #fb923c); }

.tab-btn[data-tab="story"].active { border-color: var(--orange); color: var(--orange); background: rgba(249,115,22,.1); box-shadow: 0 0 16px rgba(249,115,22,.15); }
.tab-btn[data-tab="story"]:hover  { border-color: var(--orange); color: var(--orange); }
.story-num { background: var(--orange) !important; }

/* Step indicator orange variant */
.steps-row.orange-steps .step.active .step-circle { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 16px rgba(249,115,22,.4); }
.steps-row.orange-steps .step.done   .step-circle { background: var(--orange); border-color: var(--orange); }
.steps-row.orange-steps .step.active .step-lbl { color: var(--text); }
.steps-row.orange-steps .step.done   .step-lbl  { color: var(--orange); }
.steps-row.orange-steps .step-line.active { background: var(--orange); }

/* Portrait image upload zone (9:16) */
.story-img-zone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  height: 200px;
  cursor: pointer;
  overflow: hidden;
  transition: all .25s;
  background: rgba(255,255,255,.02);
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-img-zone:hover { border-color: var(--orange); background: rgba(249,115,22,.06); }
.story-img-zone.uploaded { border-style: solid; border-color: var(--green); }
.story-img-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.story-img-zone .scene-img-placeholder { color: var(--muted); }
.story-img-zone .scene-img-placeholder svg { width: 28px; height: 28px; }
.story-img-zone .scene-img-preview {
  width: 100%; height: 100%; object-fit: cover; display: none; pointer-events: none;
}
.story-img-zone.uploaded .scene-img-preview    { display: block; }
.story-img-zone.uploaded .scene-img-placeholder { display: none; }
.portrait-hint {
  font-size: .7rem;
  color: var(--muted);
  text-align: center;
  margin-top: .2rem;
  opacity: .7;
}

/* Story scenes grid — narrower cards work better with portrait images */
.story-scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* Preset btn orange variant */
.preset-btn[data-ss-style].active { border-color: var(--orange); color: var(--orange); background: rgba(249,115,22,.12); }
.preset-btn[data-ss-style]:hover  { border-color: var(--orange); color: var(--orange); }

/* Duration badge on story drop zone */
.duration-hint {
  display: inline-block;
  margin-top: .6rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--orange);
  background: rgba(249,115,22,.1);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: 20px;
  padding: 2px 10px;
}

.badge-teal { background: linear-gradient(135deg, var(--teal), #2dd4bf); box-shadow: 0 4px 12px rgba(20,184,166,.35); }
.btn-teal   { background: var(--teal); box-shadow: 0 4px 20px rgba(20,184,166,.4); }
.btn-teal:not(:disabled):hover { background: var(--teal-h); }
.thin-fill.teal-fill  { background: var(--teal); }
.fat-fill.teal-fat-fill { background: linear-gradient(90deg, var(--teal), #2dd4bf); }

/* ── Video clip upload zone ──────────────────────────────────────── */
.scene-clip-zone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  height: 110px;
  cursor: pointer;
  overflow: hidden;
  transition: all .25s;
  background: rgba(255,255,255,.02);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scene-clip-zone:hover { border-color: var(--teal); background: rgba(20,184,166,.06); }
.scene-clip-zone.uploaded { border-style: solid; border-color: var(--teal); }
.scene-clip-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.clip-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  pointer-events: none; color: var(--muted);
}
.clip-placeholder svg  { width: 24px; height: 24px; }
.clip-placeholder span { font-size: .78rem; font-weight: 600; }
.clip-video-preview {
  width: 100%; height: 100%; object-fit: cover; display: none; pointer-events: none;
}
.scene-clip-zone.uploaded .clip-video-preview  { display: block; }
.scene-clip-zone.uploaded .clip-placeholder    { display: none; }
.clip-check {
  position: absolute; bottom: 5px; right: 5px;
  background: var(--teal); border-radius: 50%; width: 20px; height: 20px;
  display: none; align-items: center; justify-content: center;
}
.scene-clip-zone.uploaded .clip-check { display: flex; }
.clip-check svg { width: 12px; height: 12px; color: #fff; }

/* ── Vids scene num ──────────────────────────────────────────────── */
.vids-num { background: var(--teal) !important; }

/* ── Resume Banner ───────────────────────────────────────────────── */
.resume-banner {
  width: 100%;
  max-width: 820px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.35);
  border-radius: 14px;
  padding: .85rem 1.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  animation: fadeUp .4s ease;
}
.resume-info {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #c4b5fd;
  font-size: .95rem;
}
.resume-info svg { flex-shrink: 0; color: var(--purple); }
.resume-info strong { color: #fff; }
.resume-actions { display: flex; gap: .6rem; }
.btn-sm { padding: .45rem 1rem !important; font-size: .88rem !important; width: auto !important; }

/* ── Step Indicator ─────────────────────────────────────────────── */
.steps-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1.5rem 0 2.5rem;
  width: 100%;
  max-width: 820px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  color: var(--muted);
  transition: all .3s ease;
  background: var(--surface);
}
.step.active .step-circle  { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 16px rgba(59,130,246,.4); }
.step.done   .step-circle  { background: var(--blue); border-color: var(--blue); color: #fff; }
.step-lbl {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  transition: color .3s;
  white-space: nowrap;
}
.step.active .step-lbl { color: var(--text); }
.step.done   .step-lbl { color: var(--blue); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 .75rem;
  margin-bottom: 1.4rem;
  transition: background .4s;
}
.step-line.active { background: var(--blue); }

/* ── Main & Cards ────────────────────────────────────────────────── */
.main {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 32px 72px -16px rgba(0,0,0,.7); }

.stage-badge {
  display: inline-block;
  position: absolute;
  top: -13px;
  left: 28px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 3px 14px;
  border-radius: 20px;
}
.badge-blue   { background: linear-gradient(135deg, var(--blue),   #60a5fa); box-shadow: 0 4px 12px rgba(59,130,246,.35); }
.badge-purple { background: linear-gradient(135deg, var(--purple), #a78bfa); box-shadow: 0 4px 12px rgba(139,92,246,.35); }
.badge-pink   { background: linear-gradient(135deg, var(--pink),   #f472b6); box-shadow: 0 4px 12px rgba(236,72,153,.35); }

h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: .4rem; }
.subtitle { color: var(--muted); margin-bottom: 1.8rem; line-height: 1.5; }

/* ── Form Elements ───────────────────────────────────────────────── */
.field { margin-bottom: 1.4rem; }
.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
  gap: .5rem;
  flex-wrap: wrap;
}
.field-header label { margin-bottom: 0; }
.field-hint { font-size: .75rem; font-weight: 400; color: var(--muted); margin-left: .3rem; }
.preset-btns { display: flex; gap: .4rem; }
.preset-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .3rem .85rem;
  border-radius: 20px;
  cursor: pointer;
  width: auto;
  transition: all .2s;
}
.preset-btn:hover { border-color: var(--blue); color: var(--blue); }
.preset-btn.active { border-color: var(--blue); color: var(--blue); background: rgba(59,130,246,.12); }
.preset-btn[data-style="history"].active { border-color: #d97706; color: #fbbf24; background: rgba(217,119,6,.12); }
.preset-btn[data-style="history"]:hover  { border-color: #d97706; color: #fbbf24; }

label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .5rem;
  color: #c7d2ee;
}
input[type="text"], textarea {
  width: 100%;
  background: rgba(8,13,26,.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* ── Language Toggle ─────────────────────────────────────────────── */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.lang-opt {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s;
  min-width: 52px;
}
.lang-opt.active { color: var(--text); }

/* ── SRT Result ──────────────────────────────────────────────────── */
.srt-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: .85rem 1.2rem;
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: 12px;
  animation: fadeUp .4s ease;
  flex-wrap: wrap;
}
.srt-info {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  color: #6ee7b7;
}
.srt-info svg { flex-shrink: 0; }
.srt-info strong { color: #fff; }
.btn-srt {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(16,185,129,.2);
  border: 1px solid rgba(16,185,129,.5);
  color: #6ee7b7;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  padding: .45rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  flex-shrink: 0;
}
.btn-srt:hover { background: rgba(16,185,129,.3); color: #fff; }

/* ── Drop Zone ───────────────────────────────────────────────────── */
.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  margin-bottom: 1.4rem;
  background: rgba(255,255,255,.015);
}
.drop-zone:hover, .drop-zone.over {
  border-color: var(--blue);
  background: rgba(59,130,246,.05);
}
.drop-zone.has-file { border-color: var(--green); background: rgba(16,185,129,.05); }
.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drop-inner { pointer-events: none; }
.drop-icon {
  width: 48px;
  height: 48px;
  color: var(--muted);
  margin: 0 auto .75rem;
  display: block;
  transition: color .25s;
}
.drop-zone.has-file .drop-icon { color: var(--green); }
#audioLabel { color: var(--muted); font-size: .95rem; line-height: 1.6; }
#audioLabel span { font-size: .82rem; opacity: .7; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all .25s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn:not(:disabled):hover { transform: scale(1.015); }

.btn-blue   { background: var(--blue);   box-shadow: 0 4px 20px rgba(59,130,246,.4); }
.btn-blue:not(:disabled):hover   { background: var(--blue-h); }
.btn-purple { background: var(--purple); box-shadow: 0 4px 20px rgba(139,92,246,.4); }
.btn-purple:not(:disabled):hover { background: var(--purple-h); }
.btn-pink   { background: var(--pink);   box-shadow: 0 4px 20px rgba(236,72,153,.4); }
.btn-pink:not(:disabled):hover   { background: var(--pink-h); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: auto;
  padding: .45rem 1rem;
  font-size: .88rem;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-download {
  display: inline-flex;
  gap: .5rem;
  width: auto;
  background: var(--green);
  padding: .65rem 1.4rem;
  font-size: .95rem;
  border-radius: 10px;
  text-decoration: none;
  margin-top: .75rem;
  box-shadow: 0 4px 16px rgba(16,185,129,.4);
}

/* ── Spinner ─────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ── Stage 2 toolbar ─────────────────────────────────────────────── */
.s2-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.img-progress-wrap { display: flex; flex-direction: column; gap: .35rem; min-width: 200px; flex: 1; }
.img-progress-wrap span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.thin-bar { height: 4px; background: rgba(255,255,255,.07); border-radius: 2px; overflow: hidden; }
.thin-fill { height: 100%; background: var(--purple); border-radius: 2px; transition: width .4s ease; }

/* ── Scene Grid ──────────────────────────────────────────────────── */
.scenes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.scene-card {
  background: rgba(8,13,26,.5);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transition: border-color .25s;
}
.scene-card.uploaded { border-color: rgba(16,185,129,.5); }
.scene-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.scene-num {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  background: var(--purple);
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
}
.scene-card.uploaded .scene-num { background: var(--green); }
.scene-dur {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
}
.scene-prompt {
  font-size: .84rem;
  color: #a0aec9;
  line-height: 1.55;
  max-height: 90px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.scene-prompt::-webkit-scrollbar { width: 3px; }
.scene-prompt::-webkit-scrollbar-track { background: transparent; }
.scene-prompt::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.copy-prompt-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  width: auto;
  transition: all .2s;
}
.copy-prompt-btn:hover { border-color: var(--purple); color: var(--purple); }

/* Scene image upload zone */
.scene-img-zone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  height: 120px;
  cursor: pointer;
  overflow: hidden;
  transition: all .25s;
  background: rgba(255,255,255,.02);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scene-img-zone:hover { border-color: var(--purple); background: rgba(139,92,246,.06); }
.scene-img-zone.uploaded { border-style: solid; border-color: var(--green); }
.scene-img-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.scene-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  pointer-events: none;
  color: var(--muted);
}
.scene-img-placeholder svg { width: 24px; height: 24px; }
.scene-img-placeholder span { font-size: .78rem; font-weight: 600; }
.scene-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  pointer-events: none;
}
.scene-img-zone.uploaded .scene-img-preview   { display: block; }
.scene-img-zone.uploaded .scene-img-placeholder { display: none; }

/* ── Toggle ──────────────────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  margin-bottom: 1.25rem;
  font-size: .95rem;
  color: var(--muted);
  font-weight: 500;
}
.toggle-row input { display: none; }
.toggle-track {
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,.1);
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  transition: background .25s;
}
.toggle-thumb {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform .25s;
}
.toggle-row input:checked ~ .toggle-track { background: var(--pink); }
.toggle-row input:checked ~ .toggle-track .toggle-thumb { transform: translateX(20px); }

/* ── Progress bars ───────────────────────────────────────────────── */
.stitch-progress { margin-top: 1.5rem; }
.fat-bar {
  height: 8px;
  background: rgba(255,255,255,.07);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: .75rem;
}
.fat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), #f472b6);
  border-radius: 4px;
  transition: width .5s ease;
}
#stitchMsg { font-size: .9rem; color: var(--muted); font-weight: 500; }

/* ── Result Boxes ────────────────────────────────────────────────── */
.result-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid transparent;
  animation: fadeUp .4s ease;
}
.result-box.success { background: rgba(16,185,129,.1); border-color: var(--green); }
.result-box.error   { background: rgba(239,68,68,.1);  border-color: var(--red); }
.result-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-box.success .result-icon { background: rgba(16,185,129,.2); color: var(--green); }
.result-box.error   .result-icon { background: rgba(239,68,68,.2);  color: var(--red); }
.result-icon svg { width: 18px; height: 18px; }
.result-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.result-box p  { font-size: .88rem; color: var(--muted); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30,41,80,.95);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem 1.4rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 999;
  animation: toastIn .3s ease;
  white-space: nowrap;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .card { padding: 1.75rem 1.25rem; }
  .scenes-grid { grid-template-columns: 1fr; }
  .steps-row { gap: 0; }
  .step-lbl { display: none; }
}
