:root {
  --bg: #07090f;
  --bg-alt: #0c111b;
  --panel: rgba(13, 18, 28, 0.92);
  --panel-strong: rgba(9, 13, 20, 0.96);
  --panel-border: rgba(63, 225, 194, 0.18);
  --text: #f5f7ff;
  --muted: #a6b0c4;
  --accent: #3fe1c2;
  --accent-2: #f29c4b;
  --accent-3: #d7e36a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --glow-shadow: 0 0 0 1px rgba(63, 225, 194, 0.12), 0 18px 50px rgba(7, 10, 18, 0.6);
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-display: 'Fraunces', serif;
  --text-xxl: clamp(2.4rem, 4.8vw, 4rem);
  --text-xl: clamp(1.6rem, 2.6vw, 2.4rem);
  --text-lg: 1.15rem;
  --text-md: 1rem;
  --text-sm: 0.9rem;
  --text-xs: 0.78rem;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background: radial-gradient(circle at 15% 20%, rgba(63, 225, 194, 0.18) 0%, transparent 48%),
    radial-gradient(circle at 85% 10%, rgba(242, 156, 75, 0.2) 0%, transparent 42%),
    radial-gradient(circle at 70% 85%, rgba(215, 227, 106, 0.14) 0%, transparent 52%),
    linear-gradient(140deg, #05060a 0%, #0b111b 45%, #07090f 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}


.glow {
  position: fixed;
  inset: -40vh -20vw auto auto;
  height: 55vh;
  width: 55vh;
  background: radial-gradient(circle, rgba(63, 225, 194, 0.3), rgba(242, 156, 75, 0.18) 35%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: float 12s ease-in-out infinite alternate;
}

@keyframes float {
  from {
    transform: translate(-10%, -5%);
  }
  to {
    transform: translate(10%, 5%);
  }
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 48px 8vw 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: 16px;
  text-shadow: 0 0 18px rgba(63, 225, 194, 0.35);
}

.lede {
  color: rgba(245, 247, 255, 0.72);
  font-size: var(--text-lg);
  max-width: 46ch;
}

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

.dropzone {
  border: 1.5px dashed rgba(63, 225, 194, 0.5);
  padding: 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  background: rgba(10, 14, 22, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(63, 225, 194, 0.1);
  box-shadow: 0 0 0 1px rgba(63, 225, 194, 0.35), 0 18px 40px rgba(5, 10, 18, 0.6);
}

.drop-title {
  margin: 0 0 6px;
  font-size: var(--text-lg);
  font-weight: 600;
}

.drop-sub {
  margin: 0;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.variant-config {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.variant-config select {
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.22);
  font-family: var(--font-body);
}

.variant-config input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.model-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.model-config select {
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.22);
  font-family: var(--font-body);
}

.model-meta {
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.9);
  line-height: 1.5;
}

.model-meta a {
  color: var(--accent-2);
  text-decoration: none;
}

.model-meta a:hover {
  text-decoration: underline;
}

.estimate-summary,
.cost-summary {
  margin-top: 10px;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.92);
  line-height: 1.5;
}

.estimate-summary.is-updated,
.cost-summary.is-updated {
  animation: estimatePulse 0.9s ease;
}

@keyframes estimatePulse {
  0% { opacity: 0.4; }
  30% { opacity: 1; }
  100% { opacity: 0.85; }
}

.estimate-summary em,
.cost-summary em {
  color: rgba(211, 221, 244, 0.7);
  font-style: normal;
}

.slide-selection {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(110, 170, 255, 0.18);
  background: rgba(10, 14, 22, 0.45);
}

.slide-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-sm);
  color: rgba(211, 221, 244, 0.92);
}

.slide-selection-actions {
  display: flex;
  gap: 8px;
}

.slide-selection-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.slide-selection-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(8, 12, 18, 0.6);
  border: 1px solid rgba(110, 170, 255, 0.12);
}

.slide-selection-item.is-generated {
  opacity: 0.5;
}

.slide-selection-item input {
  margin-top: 2px;
}

.slide-selection-item span {
  display: block;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.9);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.slide-selection-status {
  margin-top: 10px;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.75);
}

button {
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
}

.ghost {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid rgba(110, 170, 255, 0.3);
  color: rgba(211, 221, 244, 0.9);
  font-size: var(--text-xs);
}

.ghost:hover {
  border-color: rgba(110, 170, 255, 0.6);
  color: #f7fbff;
}

button.loading {
  position: relative;
  padding-right: 36px;
  color: rgba(245, 247, 255, 0.7);
}

button.loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(245, 247, 255, 0.35);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 12px 34px rgba(63, 225, 194, 0.25), 0 10px 30px rgba(242, 156, 75, 0.18);
}

button.secondary {
  background: rgba(10, 14, 22, 0.6);
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.3);
}

a.primary,
a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: var(--font-display);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.primary {
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.95), rgba(242, 156, 75, 0.95));
  color: #04121a;
  box-shadow: 0 18px 40px rgba(4, 10, 18, 0.6);
}

a.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.28);
}

a.primary:hover,
a.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(110, 170, 255, 0.28);
  background: linear-gradient(145deg, rgba(18, 26, 40, 0.95), rgba(7, 12, 20, 0.75));
  color: rgba(211, 221, 244, 0.95);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 20px rgba(0, 0, 0, 0.35);
}

.icon-btn[data-tooltip] {
  position: relative;
}

.icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0f18;
  color: var(--text);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.icon-btn[data-tooltip]:hover::after {
  opacity: 1;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 170, 255, 0.6);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(4, 8, 14, 0.55);
}

.icon-btn.is-active {
  color: #0c131c;
  border-color: rgba(99, 255, 209, 0.7);
  background: linear-gradient(135deg, rgba(99, 255, 209, 0.8), rgba(58, 196, 255, 0.75));
}

.icon-btn[data-state='collapsed'] svg {
  transform: rotate(180deg);
}

.meta {
  margin-top: 16px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.paste-block {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.paste-block label {
  font-size: var(--text-sm);
  color: var(--muted);
}

.paste-block textarea {
  width: 100%;
  resize: vertical;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

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

.text-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.sample-json {
  margin-top: 16px;
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-md);
  padding: 12px;
  max-height: 260px;
  overflow: auto;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.35;
  white-space: pre-wrap;
}

#reviewJsonPreview {
  max-height: 45vh;
  min-height: 260px;
}

@media (max-width: 720px) {
  #reviewJsonPreview {
    max-height: 38vh;
    min-height: 200px;
  }
}

.status {
  position: relative;
  z-index: 1;
  padding: 8px 8vw 24px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status h2 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: var(--text-xl);
}

.timing {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(245, 247, 255, 0.3);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

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

.progress {
  height: 10px;
  background: rgba(63, 225, 194, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width 0.4s ease;
}

.download {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 40px 6vw;
  backdrop-filter: blur(6px);
}

.lightbox.active {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: min(1400px, 90vw);
  max-height: 90vh;
  width: 100%;
  background: #0a0f18;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.14);
  box-shadow: var(--shadow);
  padding: 16px;
}

.lightbox-inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 14, 22, 0.8);
  color: var(--text);
  padding: 8px 12px;
  font-size: var(--text-xs);
}

main {
  position: relative;
  z-index: 1;
  padding: 0 8vw 60px;
}

.slides {
  display: grid;
  gap: 28px;
}

.slide-card {
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.96), rgba(10, 14, 22, 0.94));
  border: 1px solid rgba(63, 225, 194, 0.14);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
}

.slide-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.slide-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.slide-collapse {
  border: 1px solid rgba(63, 225, 194, 0.24);
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  cursor: pointer;
  flex-shrink: 0;
}

.slide-collapse:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.slide-insert {
  border: 1px dashed rgba(63, 225, 194, 0.6);
  background: transparent;
  color: var(--accent);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.slide-insert:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.slide-archive {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.slide-archive:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.slide-archive-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}

.slide-card.is-archived {
  opacity: 0.7;
  border-color: rgba(255, 255, 255, 0.08);
}

.slide-card.is-collapsed .edit-controls {
  display: none;
}

.slide-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.slide-purpose {
  color: var(--muted);
  font-size: var(--text-sm);
}

.slide-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--muted);
}

.slide-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.65rem;
  border: 1px solid rgba(48, 242, 255, 0.2);
  background: rgba(48, 242, 255, 0.08);
  color: var(--text);
}

.slide-status-pill[data-status="ready"] {
  border-color: rgba(72, 255, 195, 0.35);
  background: rgba(72, 255, 195, 0.15);
  color: #bfffe9;
}

.slide-status-pill[data-status="generating"] {
  border-color: rgba(48, 242, 255, 0.45);
  background: rgba(48, 242, 255, 0.2);
  color: #e3fbff;
}

.slide-status-pill[data-status="queued"] {
  border-color: rgba(255, 209, 102, 0.3);
  background: rgba(255, 209, 102, 0.16);
  color: #fff3c8;
}

.slide-status-pill[data-status="editing"] {
  border-color: rgba(255, 106, 213, 0.35);
  background: rgba(255, 106, 213, 0.18);
  color: #ffd8f4;
}

.slide-status-pill[data-status="error"],
.slide-status-pill[data-status="partial"] {
  border-color: rgba(255, 88, 88, 0.35);
  background: rgba(255, 88, 88, 0.18);
  color: #ffd0d0;
}

.slide-status-pill[data-status="archived"],
.slide-status-pill[data-status="empty"] {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.slide-timing {
  font-variant-numeric: tabular-nums;
  color: rgba(245, 247, 255, 0.7);
}

.slide-card[data-status="generating"] {
  border-color: rgba(48, 242, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(48, 242, 255, 0.2), 0 20px 50px rgba(5, 10, 18, 0.5);
  animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(48, 242, 255, 0.2), 0 20px 50px rgba(5, 10, 18, 0.5);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 106, 213, 0.25), 0 24px 60px rgba(5, 10, 18, 0.6);
  }
}

.variants {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.edit-controls {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.edit-scope {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--muted);
  font-size: var(--text-xs);
}

.edit-controls .edit-prompt {
  width: 100%;
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

.edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.variant {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(10, 14, 22, 0.7);
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.variant.is-generating {
  border-color: rgba(48, 242, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(48, 242, 255, 0.18), 0 16px 30px rgba(6, 12, 20, 0.5);
}

.variant.is-ready {
  border-color: rgba(72, 255, 195, 0.3);
}

.variant.is-selected {
  border-color: rgba(72, 255, 195, 0.7);
  box-shadow: 0 18px 40px rgba(4, 10, 18, 0.55), 0 0 0 1px rgba(72, 255, 195, 0.35);
  background: rgba(10, 18, 24, 0.85);
}

@media (min-width: 900px) {
  .variants {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .variant {
    flex: 1 1 0;
    min-width: 0;
  }
}

.variant.is-error {
  border-color: rgba(255, 88, 88, 0.3);
}

.variant.is-queued {
  border-color: rgba(255, 209, 102, 0.25);
}

.variant.is-editing {
  border-color: rgba(255, 106, 213, 0.3);
}

.variant.is-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  opacity: 0.8;
}

.variant-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.variant-download {
  justify-self: flex-start;
  background: rgba(63, 225, 194, 0.12);
}

.variant-archive {
  justify-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.variant-download[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.variant.is-archived {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.06);
}

.variant.is-archived input,
.variant.is-archived .preview,
.variant.is-archived .variant-download {
  display: none;
}

.variant.is-archived .preview {
  filter: grayscale(1);
}

.variant:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 225, 194, 0.65);
  box-shadow: 0 16px 34px rgba(4, 8, 14, 0.55);
}

.variant input {
  accent-color: var(--accent);
}

.preview {
  position: relative;
  width: 100%;
  padding-top: 66.7%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #07090d;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.55));
}

.preview-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  z-index: 2;
  pointer-events: none;
}

.preview-text {
  position: absolute;
  color: #f7fbff;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.7);
  max-width: 80%;
  white-space: pre-line;
  z-index: 1;
}

.preview-text.upper-center { top: 8%; left: 50%; transform: translateX(-50%); text-align: center; }
.preview-text.bottom-center { bottom: 8%; left: 50%; transform: translateX(-50%); text-align: center; }
.preview-text.center { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.preview-text.left { top: 50%; left: 8%; transform: translateY(-50%); text-align: left; }
.preview-text.right { top: 50%; right: 8%; transform: translateY(-50%); text-align: right; }
.preview-text.upper-left { top: 8%; left: 8%; text-align: left; }
.preview-text.upper-right { top: 8%; right: 8%; text-align: right; }
.preview-text.bottom-left { bottom: 8%; left: 8%; text-align: left; }
.preview-text.bottom-right { bottom: 8%; right: 8%; text-align: right; }

.preview-notes {
  position: absolute;
  bottom: 6%;
  left: 6%;
  right: 6%;
  color: #f7fbff;
  font-size: var(--text-xs);
  line-height: 1.2;
  background: rgba(3, 5, 10, 0.6);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  display: none;
  z-index: 1;
}

body.show-notes .preview-notes {
  display: block;
}

.compact .variant {
  gap: 6px;
  padding: 10px;
}

.compact .variant .preview,
.compact .variant .variant-download {
  display: none;
}

.compact .variant-status {
  font-size: var(--text-xs);
}

.variant-status {
  color: var(--muted);
  font-size: var(--text-sm);
}

.variant-cost {
  color: rgba(211, 221, 244, 0.92);
  font-size: var(--text-xs);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-3);
}

@media (max-width: 720px) {
  .hero {
    padding: 32px 6vw 24px;
  }

  .status,
  main {
    padding: 0 6vw 40px;
  }

  .wizard {
    padding: 36px 6vw 64px;
  }

  .landing {
    padding: 36px 6vw 64px;
  }

  .auth-page {
    padding: 28px 6vw 56px;
  }

  .auth-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card {
    width: 100%;
  }

  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    gap: 12px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions a {
    width: 100%;
  }

  .panel-card {
    padding: 18px;
  }

  .slide-card {
    padding: 16px;
  }

  .admin-auth {
    grid-template-columns: 1fr;
  }

  .admin-job {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .admin-user {
    grid-template-columns: 1fr;
  }

  .admin-users-controls {
    width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
  }
}

/* Wizard layout */
.landing {
  padding: 48px 8vw 80px;
}

.wizard {
  padding: 48px 8vw 80px;
}

.wizard-hero {
  max-width: 1200px;
  margin: 0 auto 36px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(5, 8, 14, 0.6));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.brand:focus-visible {
  outline: 2px solid rgba(63, 225, 194, 0.6);
  outline-offset: 4px;
  border-radius: 12px;
}

.hero-shell {
  display: grid;
  gap: 32px;
  align-items: center;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(9, 13, 20, 0.78);
  box-shadow: var(--glow-shadow);
}

.account-meta {
  display: grid;
  gap: 4px;
}

.account-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.account-email {
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

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

.account-credits {
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 225, 194, 0.2);
  color: #9ff3dd;
}

.auth-page {
  padding: 32px 8vw 64px;
}

.auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.auth-shell {
  display: grid;
  gap: 28px;
  align-items: start;
}

.auth-intro {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.auth-perks {
  display: grid;
  gap: 12px;
}

.auth-perk {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.72);
}

.auth-perk-title {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 4px;
}

.auth-perk-note {
  font-size: var(--text-sm);
  color: var(--muted);
}

.auth-card {
  width: min(420px, 100%);
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 22px;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(9, 13, 20, 0.82);
  box-shadow: var(--glow-shadow);
}

.auth-card-header {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(8, 12, 18, 0.7);
  border: 1px solid rgba(63, 225, 194, 0.16);
  margin-bottom: 16px;
}

.auth-tabs .tab {
  border: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.auth-tabs .tab.active {
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.25), rgba(242, 156, 75, 0.2));
  color: #f1fff9;
}

.auth-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(10, 14, 22, 0.8);
  box-shadow: var(--glow-shadow);
  max-width: 360px;
}

.auth-header {
  display: grid;
  gap: 6px;
}

.auth-panel .status-note {
  margin: 0;
}

.auth-fields {
  display: grid;
  gap: 10px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auth-panel .panel-note {
  margin: 0;
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.6);
}

.auth-panel code {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: #e6f2ff;
  background: rgba(110, 170, 255, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

body.auth-locked .auth-panel {
  border-color: rgba(242, 156, 75, 0.35);
}

body.auth-locked .wizard-body {
  display: none;
}

body.auth-locked #studio {
  pointer-events: none;
  opacity: 0.55;
  filter: grayscale(0.2) saturate(0.85);
}

@media (min-width: 1024px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .auth-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }

  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: var(--text-xxl);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-shadow: 0 20px 40px rgba(5, 8, 14, 0.6);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 225, 194, 0.25);
  background: rgba(8, 12, 20, 0.65);
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-visual-card {
  background: linear-gradient(170deg, rgba(16, 22, 34, 0.92), rgba(8, 12, 20, 0.85));
  border: 1px solid rgba(63, 225, 194, 0.18);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-visual {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.18);
  box-shadow: var(--glow-shadow);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(4, 8, 14, 0.6);
}

.hero-visual-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.caption-label {
  color: var(--accent);
}

.hero-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 26px;
}

.stat-card {
  background: rgba(9, 13, 20, 0.75);
  border: 1px solid rgba(63, 225, 194, 0.14);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--glow-shadow);
}

.stat-title {
  margin: 0 0 6px;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.stat-note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted);
}

.wizard-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.step-pill {
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.7);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  cursor: pointer;
}

.step-pill.active {
  color: #031019;
  border-color: rgba(63, 225, 194, 0.8);
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.9), rgba(242, 156, 75, 0.9));
  box-shadow: 0 12px 24px rgba(4, 8, 14, 0.5);
}

.wizard-body {
  max-width: 1200px;
  margin: 0 auto;
}

.landing-section {
  max-width: 1200px;
  margin: 0 auto 36px;
}

.section-header {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 0;
}

.section-header p {
  margin: 0;
  color: rgba(245, 247, 255, 0.7);
  max-width: 60ch;
}

.prop-grid,
.advantage-grid,
.timing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.prop-card,
.advantage-card,
.timing-card {
  background: linear-gradient(170deg, rgba(14, 20, 32, 0.95), rgba(8, 12, 20, 0.88));
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}

.prop-card h3,
.advantage-card h3,
.timing-card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.prop-card p,
.advantage-card p,
.timing-card p {
  margin: 0;
  color: rgba(245, 247, 255, 0.72);
  font-size: var(--text-sm);
}

.timing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.timing-tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}

.timing-value {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timing-note {
  font-size: var(--text-xs);
  color: var(--muted);
}

.cta-band {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 20px 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.15), rgba(242, 156, 75, 0.12));
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--glow-shadow);
}

.cta-band h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
}

.cta-band p {
  margin: 0;
  color: rgba(245, 247, 255, 0.7);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Admin */
.admin {
  padding: 48px 8vw 80px;
}

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-auth {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.7);
}

.admin-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-stat {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  box-shadow: var(--shadow);
}

.admin-stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-stat-value {
  font-size: var(--text-lg);
  font-weight: 600;
}

.admin-section h3 {
  font-family: var(--font-display);
  margin: 0 0 12px;
}

.admin-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-users-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-users-controls input {
  min-width: 220px;
}

.admin-users {
  display: grid;
  gap: 10px;
}

.admin-user {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, auto) minmax(240px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(9, 13, 20, 0.75);
  font-size: var(--text-sm);
}

.admin-user-meta {
  display: grid;
  gap: 4px;
}

.admin-user-email {
  font-family: var(--font-display);
}

.admin-user-sub {
  font-size: var(--text-xs);
  color: var(--muted);
}

.admin-user-roles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(12, 18, 28, 0.9);
  color: var(--muted);
}

.admin-role-owner {
  border-color: rgba(242, 156, 75, 0.45);
  color: #f2c38f;
}

.admin-role-admin {
  border-color: rgba(63, 225, 194, 0.35);
  color: #9ff3dd;
}

.admin-user-credits {
  font-weight: 600;
}

.admin-user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-user-actions input {
  width: 120px;
}

.admin-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.admin-jobs {
  display: grid;
  gap: 10px;
}

.admin-job {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) repeat(3, minmax(90px, auto));
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(9, 13, 20, 0.75);
  font-size: var(--text-sm);
}

.admin-job-id {
  font-family: var(--font-display);
}

.admin-job-status {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--text-xs);
  color: var(--accent);
}

.admin-job-meta {
  color: var(--muted);
  font-size: var(--text-xs);
}

.site-footer {
  padding: 32px 8vw 48px;
  color: var(--muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(63, 225, 194, 0.12);
  padding-top: 18px;
  font-size: var(--text-sm);
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.footer-link:hover {
  color: #eafff7;
}

.wizard-start {
  background: rgba(9, 13, 20, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.wizard-start-header {
  margin-bottom: 16px;
}

#wizard-start {
  scroll-margin-top: 120px;
}

.wizard-start-header h2 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: var(--text-xl);
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.mode-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mode-card {
  position: relative;
  background: linear-gradient(160deg, rgba(16, 22, 34, 0.95), rgba(10, 14, 22, 0.9));
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  border: 1px solid rgba(63, 225, 194, 0.25);
  color: var(--text);
  background: rgba(63, 225, 194, 0.12);
}

.badge-beginner {
  border-color: rgba(72, 255, 195, 0.35);
  background: rgba(72, 255, 195, 0.18);
}

.badge-advanced {
  border-color: rgba(242, 156, 75, 0.35);
  background: rgba(242, 156, 75, 0.2);
}

.badge-pro {
  border-color: rgba(255, 106, 213, 0.35);
  background: rgba(255, 106, 213, 0.18);
}

.badge-example {
  border-color: rgba(215, 227, 106, 0.4);
  background: rgba(215, 227, 106, 0.2);
  color: #f6ffe0;
}

.mode-card h3 {
  font-family: var(--font-display);
  margin-bottom: 6px;
  color: var(--text);
  font-size: var(--text-lg);
  text-shadow: 0 10px 22px rgba(5, 8, 14, 0.55);
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 18px 36px rgba(4, 8, 14, 0.55);
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

.json-guidance {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.65);
  color: var(--muted);
  font-size: var(--text-sm);
}

.json-guidance summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.json-guidance summary::marker {
  color: var(--accent);
}

.json-guidance ul {
  padding-left: 18px;
  margin: 0 0 12px;
}

.json-guidance li {
  margin-bottom: 6px;
}

.json-guidance pre {
  margin: 0;
  white-space: pre-wrap;
  border-radius: var(--radius-md);
  background: rgba(6, 10, 18, 0.8);
  border: 1px solid rgba(63, 225, 194, 0.12);
  padding: 12px;
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.85);
}

.text-guidance {
  margin: 10px 0 14px;
}

.demo-card .panel-note {
  margin-bottom: 8px;
}

.demo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.demo-steps {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.demo-step-pill {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.6);
  color: var(--muted);
  padding: 6px 12px;
  font-size: var(--text-xs);
  cursor: pointer;
}

.demo-step-pill.active {
  border-color: rgba(63, 225, 194, 0.7);
  color: #031019;
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.9), rgba(242, 156, 75, 0.8));
}

.demo-body {
  display: grid;
  gap: 16px;
}

.demo-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.demo-nav {
  justify-content: space-between;
}

.wizard-nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.panel-card {
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.96), rgba(9, 12, 20, 0.92));
  border: 1px solid rgba(63, 225, 194, 0.14);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-note {
  color: rgba(245, 247, 255, 0.7);
  margin-bottom: 16px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.status-note {
  color: var(--muted);
  margin-top: 12px;
}

.status-note.is-error,
.inline-status.is-error {
  color: #ffd0d0;
  background: rgba(255, 88, 88, 0.12);
  border: 1px solid rgba(255, 88, 88, 0.35);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.status-note.is-success,
.inline-status.is-success {
  color: #bfffe9;
  background: rgba(72, 255, 195, 0.12);
  border: 1px solid rgba(72, 255, 195, 0.35);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.inline-status {
  margin: 12px 0 0;
  font-size: var(--text-sm);
  opacity: 1;
}

.status-note.fade-out,
.inline-status.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.wizard-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.wizard-status-line .status-note {
  margin: 0;
}

/* Builder */
.builder {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 18px;
}

.builder-sidebar {
  background: rgba(9, 12, 20, 0.65);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: 100%;
  box-shadow: var(--glow-shadow);
}

.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.slide-list {
  display: grid;
  gap: 10px;
}

.slide-item {
  background: rgba(12, 16, 26, 0.8);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 6px;
  cursor: grab;
  min-width: 0;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.slide-item.active {
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 16px 30px rgba(4, 8, 14, 0.45);
}

.slide-item-title {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.slide-item-meta {
  font-size: var(--text-xs);
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.slide-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.slide-item button {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
}

.builder-main {
  background: rgba(9, 12, 20, 0.65);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--glow-shadow);
}

.builder-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.builder-tabs .tab {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.18);
  color: var(--muted);
  cursor: pointer;
  font-size: var(--text-xs);
  transition: border 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.builder-tabs .tab.active {
  color: var(--text);
  border-color: rgba(63, 225, 194, 0.7);
  background: rgba(63, 225, 194, 0.12);
}

.builder-panel {
  display: block;
}

.form-section {
  margin-bottom: 20px;
}

.form-section h4 {
  font-family: var(--font-display);
  margin-bottom: 10px;
  font-size: var(--text-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 0 0 2px rgba(63, 225, 194, 0.18);
}

.field-inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.field-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  justify-self: start;
  accent-color: var(--accent);
}

.field-hint {
  color: rgba(245, 247, 255, 0.55);
  font-size: var(--text-xs);
}

.variant-count-status {
  color: rgba(245, 247, 255, 0.6);
  font-size: var(--text-xs);
}

.field .info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(63, 225, 194, 0.2);
  font-size: var(--text-xs);
  color: var(--muted);
  cursor: help;
  position: relative;
}

.field .info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0f18;
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  width: 200px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 5;
}

.field .info:hover::after {
  opacity: 1;
}

.field.span-2 {
  grid-column: span 2;
}

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

/* Studio wrapper */
.studio {
  padding-top: 12px;
}

.notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.notes-toggle input {
  accent-color: var(--accent);
}


.mode-card.active {
  border-color: rgba(63, 225, 194, 0.8);
  box-shadow: 0 18px 40px rgba(4, 8, 14, 0.6);
}

.mode-card p {
  color: rgba(245, 247, 255, 0.7);
}

.variant-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.variant-toggle {
  border-color: rgba(63, 225, 194, 0.2);
  color: var(--muted);
  width: 28px;
  height: 28px;
}

.variant.is-collapsed .preview {
  padding-top: 13.34%;
  background-position: top center;
}

.variant.is-collapsed .preview-text,
.variant.is-collapsed .preview-notes {
  display: none;
}

.variant.is-collapsed .variant-status {
  font-size: var(--text-xs);
}

.variants-collapsed .variant .preview {
  padding-top: 13.34%;
  background-position: top center;
}

.variants-collapsed .variant .preview-text,
.variants-collapsed .variant .preview-notes {
  display: none;
}

.variants-collapsed .variant-toggle {
  display: none;
}

.slide-card.is-collapsed .variant .preview {
  padding-top: 13.34%;
  background-position: top center;
}

.slide-card.is-collapsed .variant .preview-text,
.slide-card.is-collapsed .variant .preview-notes {
  display: none;
}
