/* ═══════════════════════════════════════════════════════════
   MASTERPROSE — GUIDED WIZARD STYLES
   wizard.css — Session 1 (Level Select + First Story)
═══════════════════════════════════════════════════════════ */

/* ── Overlay / Backdrop ────────────────────────────────── */
#wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 8, 20, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: wizardFadeIn 0.35s ease;
}
#wizard-overlay.hidden { display: none; }
@keyframes wizardFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Card Container ─────────────────────────────────────── */
.wizard-card {
  background: #110d22;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  padding: 40px 44px;
  position: relative;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.6),
    0 0 60px rgba(124, 58, 237, 0.1);
  animation: wizardCardIn 0.4s cubic-bezier(0.22,1,0.36,1);
}
@keyframes wizardCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Wide card for level select */
.wizard-card.wide {
  max-width: 880px;
}

/* ── Progress Bar ───────────────────────────────────────── */
.wizard-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}
.wizard-progress-track {
  flex: 1;
  height: 3px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #f59e0b);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-progress-label {
  font-size: 0.72rem;
  color: rgba(139, 92, 246, 0.7);
  font-family: 'Outfit', system-ui, sans-serif;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Step Screen Transitions ────────────────────────────── */
.wizard-step {
  animation: stepIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wizard-step.going-back {
  animation: stepInBack 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes stepInBack {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Typography ─────────────────────────────────────────── */
.wizard-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f59e0b;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 10px;
}
.wizard-heading {
  font-family: 'Cormorant', Georgia, serif;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 600;
  color: #ede9ff;
  line-height: 1.15;
  margin-bottom: 10px;
}
.wizard-subhead {
  font-size: 0.92rem;
  color: #9d8fd0;
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ── Input ──────────────────────────────────────────────── */
.wizard-input-wrap {
  position: relative;
  margin-bottom: 24px;
}
.wizard-input {
  width: 100%;
  background: rgba(139, 92, 246, 0.07);
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  color: #ede9ff;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  padding: 18px 20px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: #f59e0b;
}
.wizard-input::placeholder {
  color: rgba(157, 143, 208, 0.4);
  font-style: italic;
}
.wizard-input:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.wizard-char-count {
  position: absolute;
  right: 14px;
  bottom: 13px;
  font-size: 0.7rem;
  color: rgba(157, 143, 208, 0.5);
  font-family: 'Outfit', system-ui, sans-serif;
}
.wizard-textarea {
  width: 100%;
  background: rgba(139, 92, 246, 0.07);
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  color: #ede9ff;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 1.1rem;
  padding: 16px 18px;
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: #f59e0b;
  line-height: 1.65;
}
.wizard-textarea:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.wizard-input-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(157, 143, 208, 0.8);
  font-family: 'Outfit', system-ui, sans-serif;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: block;
}
.wizard-optional {
  font-weight: 400;
  color: rgba(157, 143, 208, 0.5);
  font-style: italic;
}

/* ── Genre Grid ─────────────────────────────────────────── */
.wizard-genre-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}
@media (max-width: 500px) {
  .wizard-genre-grid { grid-template-columns: repeat(2, 1fr); }
}
.wizard-genre-tile {
  background: rgba(139, 92, 246, 0.07);
  border: 1.5px solid rgba(139, 92, 246, 0.18);
  border-radius: 12px;
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
  position: relative;
  user-select: none;
}
.wizard-genre-tile:hover {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-2px);
}
.wizard-genre-tile.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}
.wizard-genre-tile .genre-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 6px;
}
.wizard-genre-tile .genre-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #b8aed4;
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.2;
}
.wizard-genre-tile.selected .genre-label { color: #fcd34d; }
.wizard-genre-ai-badge {
  position: absolute;
  top: -7px;
  right: -5px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  font-family: 'Outfit', system-ui, sans-serif;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ── Premise Card ───────────────────────────────────────── */
.wizard-premise-card {
  background: rgba(245, 158, 11, 0.05);
  border: 1.5px solid rgba(245, 158, 11, 0.2);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
  position: relative;
}
.wizard-premise-card .premise-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f59e0b;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 10px;
}
.wizard-premise-text {
  font-family: 'Cormorant', Georgia, serif;
  font-style: italic;
  font-size: 1.08rem;
  color: #ede9ff;
  line-height: 1.75;
}
.wizard-premise-alt-btn {
  background: none;
  border: none;
  color: rgba(139, 92, 246, 0.7);
  font-size: 0.78rem;
  font-family: 'Outfit', system-ui, sans-serif;
  cursor: pointer;
  padding: 6px 0;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.wizard-premise-alt-btn:hover { color: #a78bfa; }

/* Premise choice row */
.wizard-premise-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.wizard-premise-choice {
  background: rgba(139, 92, 246, 0.07);
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
}
.wizard-premise-choice:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.12);
}
.wizard-premise-choice.write-own-choice {
  border-style: dashed;
}
.wizard-premise-choice-icon {
  font-size: 1.2rem;
  margin-bottom: 6px;
  display: block;
}
.wizard-premise-choice-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ede9ff;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 4px;
}
.wizard-premise-choice-desc {
  font-size: 0.78rem;
  color: #9d8fd0;
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.45;
}

/* ── Loading State ──────────────────────────────────────── */
.wizard-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.83rem;
  color: #9d8fd0;
  font-family: 'Outfit', system-ui, sans-serif;
}
.wizard-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Action Buttons ─────────────────────────────────────── */
.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.wizard-btn-primary {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #06040a;
  border: none;
  border-radius: 100px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 13px 28px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.wizard-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(245, 158, 11, 0.45);
}
.wizard-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.wizard-btn-back {
  background: none;
  border: none;
  color: #7b6fa0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 4px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wizard-btn-back:hover { color: #b8aed4; }
.wizard-btn-skip {
  background: none;
  border: none;
  color: rgba(123, 111, 160, 0.6);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.wizard-btn-skip:hover { color: #7b6fa0; }

/* ── Pen Name Toggle ─────────────────────────────────────── */
.wizard-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.wizard-toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.wizard-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.wizard-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.wizard-toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #7b6fa0;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.wizard-toggle input:checked + .wizard-toggle-slider {
  background: rgba(245, 158, 11, 0.3);
}
.wizard-toggle input:checked + .wizard-toggle-slider::before {
  transform: translateX(16px);
  background: #f59e0b;
}
.wizard-toggle-label {
  font-size: 0.82rem;
  color: #9d8fd0;
  font-family: 'Outfit', system-ui, sans-serif;
}

/* ── Hint Text ──────────────────────────────────────────── */
.wizard-hint {
  font-size: 0.78rem;
  color: rgba(157, 143, 208, 0.6);
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.5;
  margin-top: -16px;
  margin-bottom: 20px;
}

/* ── Summary Preview Card ───────────────────────────────── */
.wizard-summary-book {
  background: linear-gradient(160deg, #1e1438, #150f2e);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.wizard-summary-book::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(245,158,11,0.15), transparent 70%);
  pointer-events: none;
}
.wizard-book-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.wizard-summary-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 6px;
  line-height: 1.2;
}
.wizard-summary-author {
  font-size: 0.85rem;
  color: rgba(157, 143, 208, 0.8);
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 12px;
}
.wizard-summary-genre-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 100px;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 16px;
}
.wizard-summary-premise-preview {
  font-family: 'Cormorant', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: #b8aed4;
  line-height: 1.7;
  max-height: 3.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Generation Progress ────────────────────────────────── */
.wizard-gen-screen {
  text-align: center;
  padding: 12px 0;
}
.wizard-gen-icon {
  font-size: 2.8rem;
  margin-bottom: 18px;
  animation: genPulse 2s ease-in-out infinite;
}
@keyframes genPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}
.wizard-gen-status {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 1.15rem;
  color: #ede9ff;
  margin-bottom: 8px;
  min-height: 1.5em;
  transition: opacity 0.3s;
}
.wizard-gen-sub {
  font-size: 0.8rem;
  color: #7b6fa0;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 28px;
}
.wizard-gen-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.wizard-gen-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #f59e0b);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-gen-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.wizard-gen-step-dot {
  font-size: 0.68rem;
  color: rgba(123, 111, 160, 0.5);
  font-family: 'Outfit', system-ui, sans-serif;
}
.wizard-gen-step-dot.active { color: #f59e0b; }
.wizard-gen-step-dot.done { color: #a78bfa; }

/* ── Completion Screen ──────────────────────────────────── */
.wizard-complete-screen {
  text-align: center;
  padding: 8px 0;
}
/* Cover image on completion screen */
.wizard-complete-cover-wrap {
  margin: 0 auto 20px;
  width: 120px;
  height: 168px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(124,58,237,0.3);
  animation: coverReveal 0.6s 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
.wizard-complete-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes coverReveal {
  from { transform: scale(0.8) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.wizard-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fcd34d;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 20px;
  animation: badgePop 0.5s 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes badgePop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.wizard-complete-heading {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ede9ff;
  margin-bottom: 10px;
}
.wizard-complete-sub {
  font-size: 0.92rem;
  color: #9d8fd0;
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.wizard-complete-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.wizard-btn-read {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  border: none;
  border-radius: 100px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 36px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  min-width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wizard-btn-read:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.5);
}
.wizard-upgrade-teaser {
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  margin-top: 24px;
  padding-top: 22px;
  text-align: center;
}
.wizard-upgrade-teaser p {
  font-size: 0.83rem;
  color: #7b6fa0;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-bottom: 12px;
  line-height: 1.5;
}
.wizard-btn-upgrade {
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  border-radius: 100px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.18s;
}
.wizard-btn-upgrade:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.6);
}

/* ═══════════════════════════════════════════════════════════
   LEVEL SELECT SCREEN
═══════════════════════════════════════════════════════════ */
.wizard-level-select {
  padding: 0;
}
.wizard-level-header {
  text-align: center;
  padding: 0 0 32px;
}
.wizard-level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 700px) {
  .wizard-level-grid { grid-template-columns: 1fr; }
  .wizard-card.wide { max-width: 640px; padding: 28px 22px; }
}
.wizard-level-card {
  background: #0f0c1e;
  border: 1.5px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.wizard-level-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.wizard-level-card.locked {
  opacity: 0.65;
  cursor: default;
}
.wizard-level-card.locked:hover { transform: none; }
.wizard-level-card.level-free:hover  { border-color: #10b981; box-shadow: 0 12px 40px rgba(16,185,129,0.15); }
.wizard-level-card.level-author:hover { border-color: #3b82f6; box-shadow: 0 12px 40px rgba(59,130,246,0.15); }
.wizard-level-card.level-pro:hover   { border-color: #8b5cf6; box-shadow: 0 12px 40px rgba(139,92,246,0.15); }
.wizard-level-card.level-series:hover { border-color: #14b8a6; box-shadow: 0 12px 40px rgba(20,184,166,0.18); }
.wizard-level-card.level-boxed:hover  { border-color: #c9a84c; box-shadow: 0 12px 40px rgba(201,168,76,0.22); }

.wlc-header {
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
}
.wlc-header.green { background: linear-gradient(135deg, #064e3b, #065f46); }
.wlc-header.blue  { background: linear-gradient(135deg, #1e3a5f, #1e40af); }
.wlc-header.purple{ background: linear-gradient(135deg, #3b0764, #4c1d95); }
.wlc-header.teal  { background: linear-gradient(135deg, #042f2e, #0f766e); }
.wlc-header.gold-premium { background: linear-gradient(135deg, #3b1f6e 0%, #6b3fa0 55%, #c9a84c 100%); }
.wlc-header.cinematic    { background: linear-gradient(135deg, #1a0a00, #7c2d12); }
.wlc-header.stage        { background: linear-gradient(135deg, #1a0a2e, #5b21b6); }

.wlc-icon { font-size: 1.6rem; margin-bottom: 8px; }
.wlc-name {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}
.wlc-sub {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.55);
  font-family: 'Outfit', system-ui, sans-serif;
  letter-spacing: 0.04em;
}
.wlc-body {
  padding: 16px 20px 20px;
}
.wlc-pitch {
  font-size: 0.82rem;
  color: #9d8fd0;
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.55;
  margin-bottom: 14px;
}
.wlc-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.wlc-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: #7b6fa0;
  font-family: 'Outfit', system-ui, sans-serif;
}
.wlc-meta-icon { font-size: 0.8rem; }
.wlc-btn {
  width: 100%;
  padding: 10px;
  border-radius: 100px;
  border: none;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.15s;
}
.wlc-btn.green { background: #10b981; color: white; }
.wlc-btn.green:hover { background: #059669; }
.wlc-btn.blue  { background: #3b82f6; color: white; }
.wlc-btn.blue:hover  { background: #2563eb; }
.wlc-btn.purple{ background: #7c3aed; color: white; }
.wlc-btn.purple:hover{ background: #6d28d9; }
.wlc-btn.locked { background: rgba(139,92,246,0.1); color: #7b6fa0; cursor: pointer; }
.wlc-btn.locked:hover { background: rgba(139,92,246,0.22); color: #a78bfa; transform: none; }
.wlc-btn.teal  { background: #0d9488; color: white; }
.wlc-btn.teal:hover  { background: #0f766e; }
.wlc-btn.gold  { background: linear-gradient(135deg, #c9a84c, #f0c040); color: #1a1028; font-weight: 800; }
.wlc-btn.gold:hover  { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,168,76,0.3); }
.wlc-btn.cinematic { background: linear-gradient(135deg, #c2410c, #ea580c); color: white; font-weight: 700; }
.wlc-btn.cinematic:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(234,88,12,0.35); }
.wlc-btn.stage  { background: linear-gradient(135deg, #6d28d9, #7c3aed); color: white; font-weight: 700; }
.wlc-btn.stage:hover  { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,58,237,0.35); }

/* ── Series Section Divider ── */
.wizard-series-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 28px 0 16px; color: rgba(255,255,255,0.2);
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  font-family: 'Outfit', system-ui, sans-serif;
}
.wizard-series-divider::before,
.wizard-series-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}
.wizard-series-divider span { color: rgba(201,168,76,0.5); white-space: nowrap; }

/* ── Series grid (2-column for the 2 new cards) ── */
.wizard-series-grid {
  grid-template-columns: 1fr 1fr !important;
}
@media (max-width: 700px) {
  .wizard-series-grid { grid-template-columns: 1fr !important; }
}
.wlc-lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.4);
  color: rgba(255,255,255,0.5);
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'Outfit', system-ui, sans-serif;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.wizard-level-footer {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(123, 111, 160, 0.5);
  font-family: 'Outfit', system-ui, sans-serif;
}
.wizard-level-footer a {
  color: rgba(139, 92, 246, 0.7);
  cursor: pointer;
  text-decoration: none;
}
.wizard-level-footer a:hover { color: #a78bfa; }

/* ── Confetti ───────────────────────────────────────────── */
.wizard-confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  top: -20px;
  animation: confettiFall linear forwards;
  pointer-events: none;
  z-index: 99999;
}
@keyframes confettiFall {
  to {
    top: 110vh;
    transform: rotate(720deg) translateX(var(--drift));
  }
}

/* ════════════════════════════════════════════════════════════
   WRITER'S STUDIO — Additional CSS
   ════════════════════════════════════════════════════════════ */

/* Sub-genre pills */
.ws-subgenre-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-subgenre-pill {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  color: rgba(190,210,255,0.8);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-family: 'Outfit', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.ws-subgenre-pill:hover  { border-color: rgba(59,130,246,0.5); color: #93c5fd; }
.ws-subgenre-pill.selected {
  background: rgba(59,130,246,0.2);
  border-color: #3b82f6;
  color: #93c5fd;
  font-weight: 600;
}

/* Voice cards */
.ws-voice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.ws-voice-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 20px 18px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}
.ws-voice-card:hover { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.06); }
.ws-voice-card.selected { border-color: #6366f1; background: rgba(99,102,241,0.12); }
.ws-voice-icon { font-size: 1.6rem; margin-bottom: 8px; }
.ws-voice-name { font-size: 1rem; font-weight: 700; color: rgba(220,225,255,0.95); margin-bottom: 6px; font-family: 'Playfair Display', serif; }
.ws-voice-example { font-style: italic; font-size: 0.8rem; color: rgba(150,160,200,0.7); margin-bottom: 8px; line-height: 1.4; }
.ws-voice-desc { font-size: 0.78rem; color: rgba(150,160,200,0.6); }
@media (max-width: 500px) { .ws-voice-cards { grid-template-columns: 1fr; } }

/* Character rows */
.ws-char-row {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.ws-char-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ws-char-num { font-size: 0.78rem; font-weight: 700; color: rgba(139,92,246,0.8); font-family: 'Outfit', system-ui, sans-serif; letter-spacing: 0.05em; text-transform: uppercase; }
.ws-char-remove { background: none; border: none; color: rgba(239,68,68,0.6); font-size: 0.75rem; cursor: pointer; padding: 2px 6px; border-radius: 6px; transition: color 0.15s; }
.ws-char-remove:hover { color: #ef4444; }
.ws-add-char-btn {
  width: 100%;
  background: rgba(99,102,241,0.06);
  border: 1px dashed rgba(99,102,241,0.3);
  color: rgba(139,92,246,0.8);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Outfit', system-ui, sans-serif;
  margin-top: 4px;
}
.ws-add-char-btn:hover { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.5); color: #a78bfa; }

/* Illustration style picker */
.ws-style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
@media (max-width: 600px) { .ws-style-grid { grid-template-columns: repeat(2, 1fr); } }
.ws-style-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px 10px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}
.ws-style-card:hover { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.06); }
.ws-style-card.selected { border-color: #f59e0b; background: rgba(245,158,11,0.1); }
.ws-style-icon { font-size: 1.5rem; margin-bottom: 6px; }
.ws-style-name { font-size: 0.82rem; font-weight: 700; color: rgba(220,225,255,0.9); margin-bottom: 4px; }
.ws-style-desc { font-size: 0.7rem; color: rgba(150,160,200,0.55); line-height: 1.3; }

/* WS Summary meta */
.ws-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: rgba(150,160,200,0.7);
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Chapter header progress dots */
.ws-chapter-header { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 24px; }
.ws-chapter-progress { display: flex; gap: 10px; align-items: center; }
.ws-ch-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  transition: all 0.25s;
  position: relative;
}
.ws-ch-dot.active {
  border-color: #6366f1;
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  box-shadow: 0 0 10px rgba(99,102,241,0.35);
}
.ws-ch-dot.done {
  border-color: #10b981;
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
}
.ws-ch-dot.done::after { content: '✓'; position: absolute; font-size: 0.75rem; font-weight: 700; }
.ws-chapter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(150,160,200,0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'Outfit', system-ui, sans-serif;
}

/* Direction picker cards */
.ws-direction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 580px) { .ws-direction-grid { grid-template-columns: 1fr; } }
.ws-direction-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.18s;
}
.ws-direction-card:hover { border-color: rgba(99,102,241,0.35); background: rgba(99,102,241,0.06); }
.ws-direction-card.selected { border-color: #6366f1; background: rgba(99,102,241,0.12); }
.ws-direction-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(139,92,246,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: 'Outfit', system-ui, sans-serif;
}
.ws-direction-text {
  font-size: 0.9rem;
  color: rgba(190,200,240,0.9);
  line-height: 1.55;
}

/* Chapter reveal */
.ws-chapter-illustration {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.ws-chapter-reveal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(220,225,255,0.95);
  margin-bottom: 10px;
}
.ws-chapter-preview {
  font-size: 0.88rem;
  color: rgba(160,170,210,0.75);
  line-height: 1.65;
  font-style: italic;
  border-left: 2px solid rgba(99,102,241,0.3);
  padding-left: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DUAL-AGENT LITERARY GHOST BATTLE UI
   Writer's Studio — Chapter Competition Screens
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Battle Screen ─────────────────────────────────────────────────────────── */

.ws-battle-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ws-gold, #c9a84c);
  text-align: center;
  margin-bottom: 8px;
}

.ws-battle-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
}

.ws-battle-arena {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}

/* Ghost panels */
.ws-ghost-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  transition: background 0.4s;
}

.ws-ghost-panel.done {
  background: rgba(16,185,129,0.06);
}

.ws-ghost-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.ws-ghost-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(180,200,255,0.8);
}

.ws-ghost-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  min-height: 1.4em;
  text-shadow: 0 0 20px rgba(160,180,255,0.4);
}

.ws-ghost-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(200,220,255,0.85);
  margin-top: 4px;
  font-weight: 500;
}

.ws-ghost-writing-anim {
  display: flex;
  gap: 3px;
  align-items: center;
}

.ws-typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(200,210,255,0.5);
  animation: wsDotPulse 1.2s infinite;
}
.ws-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ws-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wsDotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

.ws-ghost-done-check {
  color: #10b981;
  font-weight: 700;
}

.ws-ghost-word-count {
  font-size: 0.8rem;
  color: rgba(200,220,255,0.7);
  font-weight: 600;
  margin-top: 4px;
}

/* VS divider */
.ws-battle-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 1.8rem;
  color: rgba(255,255,255,0.5);
  border-left: 1px solid rgba(255,255,255,0.12);
  border-right: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.ws-battle-vs span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,210,255,0.6);
  margin-top: 4px;
}

/* Judge status banner */
.ws-battle-judge-status {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: rgba(255,235,180,0.9);
  animation: wsJudgePulse 2s infinite;
}

@keyframes wsJudgePulse {
  0%, 100% { border-color: rgba(201,168,76,0.2); }
  50% { border-color: rgba(201,168,76,0.5); }
}

.ws-judge-icon { font-size: 1.4rem; }

/* Battle lore box */
.ws-battle-lore {
  background: rgba(30,40,70,0.7);
  border-left: 3px solid rgba(201,168,76,0.7);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  font-size: 0.88rem;
  color: rgba(220,230,255,0.9);
  line-height: 1.7;
  margin-top: 12px;
}

.ws-battle-lore strong { color: rgba(201,168,76,0.8); }

/* ── Battle Reveal Screen ──────────────────────────────────────────────────── */

.ws-winner-announce {
  text-align: center;
  padding: 24px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 20px;
}

.ws-winner-crown {
  font-size: 2.4rem;
  margin-bottom: 8px;
  animation: wsWinnerBounce 0.6s cubic-bezier(.36,.07,.19,.97);
}

@keyframes wsWinnerBounce {
  0%  { transform: scale(0.4) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); }
  80% { transform: scale(0.95); }
  100%{ transform: scale(1) rotate(0deg); opacity: 1; }
}

.ws-winner-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(201,168,76,0.7);
  margin-bottom: 6px;
}

.ws-winner-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.ws-winner-score {
  font-size: 1.3rem;
  font-weight: 700;
  color: #10b981;
}

.ws-winner-score span {
  font-size: 0.85rem;
  color: rgba(200,210,255,0.4);
  font-weight: 400;
  margin: 0 6px;
}

.ws-winner-margin-label {
  font-size: 0.82rem;
  color: rgba(200,210,255,0.5);
  margin-top: 6px;
}

/* Judge quote */
.ws-judge-quote {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(30,40,70,0.8);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 20px;
  font-size: 1rem;
  color: rgba(235,240,255,0.95);
  font-style: italic;
  line-height: 1.75;
}

.ws-judge-quote-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }

/* Score breakdown */
.ws-score-breakdown {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.ws-score-breakdown-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,210,255,0.45);
  margin-bottom: 14px;
}

.ws-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ws-score-row:last-child { margin-bottom: 0; }

.ws-score-label {
  font-size: 0.85rem;
  color: rgba(210,220,255,0.9);
  width: 150px;
  flex-shrink: 0;
  font-weight: 500;
}

.ws-score-bar-wrap {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.ws-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

.ws-score-pts {
  font-size: 0.78rem;
  font-weight: 700;
  color: #10b981;
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* Battle record */
.ws-battle-record {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
}

.ws-battle-record-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,210,255,0.4);
  margin-bottom: 10px;
}

.ws-record-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.85rem;
}
.ws-record-row:last-child { border-bottom: none; }

.ws-record-ch {
  color: rgba(200,210,255,0.5);
  width: 72px;
  flex-shrink: 0;
}

.ws-record-winner {
  flex: 1;
  color: #fff;
  font-weight: 600;
}

.ws-record-score {
  color: #10b981;
  font-weight: 700;
  font-size: 0.82rem;
}

/* Sailor Quinn cross-promo banner */
.ws-sailor-quinn-banner {
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.12));
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: rgba(220,225,255,0.9);
  line-height: 1.5;
}

.ws-quinn-link {
  display: inline-block;
  margin-top: 6px;
  color: #a78bfa;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
}
.ws-quinn-link:hover { color: #c4b5fd; text-decoration: underline; }

/* Mobile adjustments */
@media (max-width: 540px) {
  .ws-battle-arena { flex-direction: column; }
  .ws-battle-vs {
    flex-direction: row;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 10px;
    gap: 8px;
  }
  .ws-score-label { width: 110px; font-size: 0.78rem; }
}

/* ── Per-chapter illustration style chips ───────────────────────── */
.ws-illus-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(150,160,200,0.25);
  background: rgba(30,32,60,0.6);
  color: rgba(180,190,220,0.75);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.ws-illus-chip:hover {
  border-color: rgba(245,158,11,0.45);
  background: rgba(245,158,11,0.07);
  color: rgba(220,225,255,0.9);
}
.ws-illus-chip.selected {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.14);
  color: #fde68a;
  font-weight: 600;
}
/* ── Writers Studio score cap display ───────────────────────────── */
.ws-score-cap-notice {
  font-size: 0.72rem;
  color: rgba(160,165,200,0.65);
  margin-top: 3px;
  font-style: italic;
}
.ws-upsell-cta {
  color: #f0a500;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
   SCREENPLAY & PLAYWRIGHT WIZARDS  (sw-* prefix)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Wizard Container ── */
.sw-wizard {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  background: var(--bg-primary, #0f0f1e);
  color: var(--text-primary, #e0e6ff);
  font-family: 'Source Sans 3', system-ui, sans-serif;
}

/* ── Header ── */
.sw-header {
  padding: 16px 20px 12px;
  border-bottom: 2px solid rgba(14,116,144,0.4);
  flex-shrink: 0;
}
.sw-play-theme.sw-header,
.sw-wizard.sw-play-theme .sw-header {
  border-bottom-color: rgba(139,32,53,0.4);
}
.sw-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.sw-wizard-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #5de0f4;
  background: rgba(14,116,144,0.15);
  border: 1px solid rgba(14,116,144,0.35);
  padding: 4px 12px;
  border-radius: 3px;
}
.sw-play-badge {
  color: #f9a8b8;
  background: rgba(139,32,53,0.15);
  border-color: rgba(139,32,53,0.35);
}
.sw-cancel-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
}
.sw-cancel-btn:hover { color: #ff6b6b; border-color: #ff6b6b; }
.sw-step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.sw-step-counter {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.sw-step-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5de0f4;
}
.sw-play-theme .sw-step-label { color: #f9a8b8; }
.sw-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.sw-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0e7490, #5de0f4);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.sw-progress-play .sw-progress-fill {
  background: linear-gradient(90deg, #8b2035, #f9a8b8);
}

/* ── Body ── */
.sw-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  -webkit-overflow-scrolling: touch;
}
.sw-step-content { max-width: 680px; margin: 0 auto; }
.sw-step-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #e8d5a3;
  margin-bottom: 8px;
}
.sw-step-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Fields ── */
.sw-field-group { margin-bottom: 20px; }
.sw-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.sw-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text-primary, #e0e6ff);
  font-size: 0.95rem;
}
.sw-select:focus { outline: none; border-color: #0e7490; }
.sw-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  margin-top: 6px;
}

/* ── Format / Venue Cards ── */
.sw-format-cards, .sw-venue-grid, .sw-budget-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.sw-format-card, .sw-venue-card, .sw-budget-card {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.15s;
}
.sw-format-card:hover, .sw-venue-card:hover, .sw-budget-card:hover {
  border-color: #0e7490;
  background: rgba(14,116,144,0.1);
}
.sw-format-card.selected, .sw-venue-card.selected, .sw-budget-card.selected {
  border-color: #5de0f4;
  background: rgba(14,116,144,0.18);
}
.sw-play-theme .sw-format-card.selected,
.sw-play-theme .sw-venue-card.selected,
.sw-play-theme .sw-budget-card.selected {
  border-color: #f9a8b8;
  background: rgba(139,32,53,0.15);
}
.sw-format-label, .sw-venue-label, .sw-budget-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e0e6ff;
  margin-bottom: 4px;
}
.sw-format-desc, .sw-venue-desc, .sw-budget-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}

/* ── Pills ── */
.sw-page-targets, .sw-cast-row, .sw-set-count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sw-pill, .sw-cast-pill {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}
.sw-pill:hover { border-color: #0e7490; color: #5de0f4; }
.sw-pill.active {
  border-color: #5de0f4;
  background: rgba(14,116,144,0.2);
  color: #5de0f4;
  font-weight: 700;
}
.sw-play-theme .sw-pill.active {
  border-color: #f9a8b8;
  background: rgba(139,32,53,0.2);
  color: #f9a8b8;
}

/* ── Callouts ── */
.sw-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: 6px;
  border-left: 3px solid;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 20px 0;
}
.sw-callout-icon { font-size: 1.2rem; flex-shrink: 0; }
.sw-callout-teal  { background: rgba(14,116,144,0.1);  border-color: #0e7490; color: rgba(200,240,255,0.9); }
.sw-callout-gold  { background: rgba(201,168,76,0.1);  border-color: #c9a84c; color: rgba(255,235,180,0.9); }
.sw-callout-red   { background: rgba(139,32,53,0.12);  border-color: #8b2035; color: rgba(255,200,210,0.9); }
.sw-callout-green { background: rgba(74,103,65,0.12);  border-color: #4a6741; color: rgba(180,240,180,0.9); }

/* ── Ghost Author Grid ── */
.sw-authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.sw-author-card {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.15s;
}
.sw-author-card:hover { border-color: rgba(255,255,255,0.3); }
.sw-author-card.selected {
  border-color: #5de0f4;
  background: rgba(14,116,144,0.12);
}
.sw-play-theme .sw-author-card.selected {
  border-color: #f9a8b8;
  background: rgba(139,32,53,0.12);
}
.sw-author-icon { font-size: 1.6rem; margin-bottom: 6px; }
.sw-author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #e0e6ff;
  margin-bottom: 2px;
}
.sw-author-style {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #5de0f4;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sw-play-theme .sw-author-style { color: #f9a8b8; }
.sw-author-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.55;
  margin-bottom: 10px;
}
.sw-author-check {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
}
.sw-author-card.selected .sw-author-check { color: #5de0f4; }
.sw-play-theme .sw-author-card.selected .sw-author-check { color: #f9a8b8; }
.sw-selection-count { text-align: center; padding: 12px; font-size: 0.85rem; }
.sw-count-warn { color: rgba(255,200,100,0.8); }
.sw-count-ok { color: rgba(100,255,150,0.8); }

/* ── Dramatic Spine Card ── */
.sw-spine-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.sw-spine-field { margin-bottom: 16px; }
.sw-spine-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
  display: block;
}
.sw-spine-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  color: #e0e6ff;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
}
.sw-spine-input:focus { outline: none; border-color: #0e7490; }

/* ── Scene Stats ── */
.sw-scene-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sw-stat-pill {
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(14,116,144,0.15);
  border: 1px solid rgba(14,116,144,0.3);
  color: #5de0f4;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Scenes List ── */
.sw-scenes-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin-bottom: 16px;
}
.sw-act-divider {
  padding: 8px 16px;
  background: rgba(14,116,144,0.2);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #5de0f4;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}
.sw-play-theme .sw-act-divider {
  background: rgba(139,32,53,0.2);
  color: #f9a8b8;
}
.sw-scene-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sw-scene-row:last-child { border-bottom: none; }
.sw-scene-num {
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  color: rgba(255,255,255,0.4);
}
.sw-scene-main { flex: 1; }
.sw-scene-slug {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #5de0f4;
  margin-bottom: 2px;
}
.sw-play-theme .sw-scene-slug { color: #f9a8b8; }
.sw-scene-purpose {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 4px;
}
.sw-scene-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
}
.sw-scene-pages { font-weight: 600; }
.sw-scene-edit-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 1rem;
}
.sw-scene-edit-btn:hover { color: rgba(255,255,255,0.6); }

/* ── Competition Grid ── */
.sw-competition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.sw-comp-card {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  transition: all 0.2s;
}
.sw-comp-card.winner {
  border-color: #c9a84c;
  background: rgba(201,168,76,0.1);
  box-shadow: 0 0 20px rgba(201,168,76,0.15);
}
.sw-comp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sw-comp-icon { font-size: 1.4rem; }
.sw-comp-name { font-weight: 700; font-size: 0.9rem; color: #e0e6ff; flex: 1; }
.sw-winner-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(201,168,76,0.25);
  border: 1px solid #c9a84c;
  color: #e8d5a3;
  padding: 2px 8px;
  border-radius: 3px;
}
.sw-score-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  position: relative;
  margin-bottom: 8px;
  overflow: visible;
}
.sw-score-fill {
  height: 100%;
  background: linear-gradient(90deg, #0e7490, #5de0f4);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.sw-score-play .sw-score-fill {
  background: linear-gradient(90deg, #8b2035, #f9a8b8);
}
.sw-score-num {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e8d5a3;
}
.sw-verdict {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  margin-bottom: 8px;
  font-style: italic;
}
.sw-sample-preview {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.sw-comp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-comp-writing {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  padding: 12px 0;
}

/* ── Generation Progress ── */
.sw-gen-progress { margin-bottom: 20px; }
.sw-gen-bar {
  height: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}
.sw-gen-bar-play .sw-gen-fill {
  background: linear-gradient(90deg, #8b2035, #f9a8b8);
}
.sw-gen-fill {
  height: 100%;
  background: linear-gradient(90deg, #0e7490, #5de0f4);
  border-radius: 6px;
  transition: width 0.3s ease;
}
.sw-gen-status {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  font-family: 'JetBrains Mono', monospace;
}
.sw-gen-scenes-preview { margin-top: 16px; }
.sw-gen-scene-card {
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  margin-bottom: 8px;
}
.sw-gen-scene-slug {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5de0f4;
  margin-bottom: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.sw-gen-scene-preview {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.4;
}
.sw-gen-complete {
  text-align: center;
  padding: 40px 20px;
}
.sw-complete-icon { font-size: 3rem; margin-bottom: 12px; }
.sw-complete-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e8d5a3;
  margin-bottom: 6px;
}
.sw-complete-desc { font-size: 0.88rem; color: rgba(255,255,255,0.5); }

/* ── Pitch Package ── */
.sw-pitch-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 20px;
}
.sw-pitch-section { margin-bottom: 20px; }
.sw-pitch-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #5de0f4;
  margin-bottom: 8px;
}
.sw-pitch-text {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
}
.sw-pitch-synopsis { max-height: 200px; overflow-y: auto; }
.sw-pitch-comps { display: flex; gap: 8px; flex-wrap: wrap; }
.sw-comp-pill {
  padding: 4px 12px;
  background: rgba(14,116,144,0.15);
  border: 1px solid rgba(14,116,144,0.3);
  border-radius: 16px;
  font-size: 0.8rem;
  color: #5de0f4;
}

/* ── Storyboard / Production Design Placeholder ── */
.sw-storyboard-preview, .sw-prod-design-preview {
  margin: 24px 0;
}
.sw-storyboard-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  background: rgba(255,255,255,0.03);
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: 8px;
  text-align: center;
}
.sw-sb-icon { font-size: 2.5rem; margin-bottom: 12px; }
.sw-sb-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}
.sw-sb-desc { font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* ── Export Cards ── */
.sw-export-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.sw-export-card {
  padding: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  text-align: center;
}
.sw-export-icon { font-size: 2rem; margin-bottom: 10px; }
.sw-export-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #e0e6ff;
  margin-bottom: 6px;
}
.sw-export-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Stageability Score ── */
.sw-stageability-result {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin: 20px 0;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}
.sw-stage-score {
  text-align: center;
  flex-shrink: 0;
  min-width: 80px;
}
.sw-score-number {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.sw-score-number span { font-size: 1rem; }
.sw-stage-score.good .sw-score-number { color: #4ade80; }
.sw-stage-score.ok  .sw-score-number { color: #fbbf24; }
.sw-stage-score.low .sw-score-number { color: #f87171; }
.sw-score-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.sw-stage-notes {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

/* ── Compression Card ── */
.sw-compression-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.sw-comp-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.sw-compress-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  color: #e0e6ff;
  font-size: 0.85rem;
  line-height: 1.6;
  resize: vertical;
}
.sw-compress-input:focus { outline: none; border-color: #8b2035; }
.sw-extern-options { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Act Block ── */
.sw-act-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.sw-act-title {
  padding: 8px 16px;
  background: rgba(139,32,53,0.2);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f9a8b8;
  text-transform: uppercase;
}
.sw-curtain-speech {
  padding: 12px 16px;
  background: rgba(201,168,76,0.08);
  border-top: 1px solid rgba(201,168,76,0.2);
}
.sw-curtain-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e8d5a3;
  margin-bottom: 4px;
}
.sw-curtain-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  font-style: italic;
}

/* ── Footer ── */
.sw-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── Buttons ── */
.sw-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.sw-btn-primary {
  background: #0e7490;
  color: #fff;
}
.sw-btn-primary:hover:not(:disabled) { background: #0a5f7a; }
.sw-play-theme .sw-btn-primary { background: #8b2035; }
.sw-play-theme .sw-btn-primary:hover:not(:disabled) { background: #6d1828; }
.sw-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
}
.sw-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.12); }
.sw-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.1);
}
.sw-btn-ghost:hover { color: rgba(255,255,255,0.7); }
.sw-btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.sw-btn-teal { background: rgba(14,116,144,0.3); color: #5de0f4; border: 1px solid rgba(14,116,144,0.4); }
.sw-btn-play { background: rgba(139,32,53,0.3); color: #f9a8b8; border: 1px solid rgba(139,32,53,0.4); }
.sw-btn-disabled, .sw-btn:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── Notices ── */
.sw-notice {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  border-left: 3px solid;
}
.sw-notice-warn { background: rgba(245,158,11,0.1); border-color: #f59e0b; color: rgba(255,235,170,0.9); }
.sw-notice-info { background: rgba(14,116,144,0.1); border-color: #0e7490; color: rgba(200,240,255,0.9); }

/* ── Modal ── */
.sw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.sw-modal {
  background: var(--bg-secondary, #1a1a2e);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  width: min(760px, 95vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.sw-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-weight: 700;
  color: #e0e6ff;
}
.sw-modal-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  cursor: pointer;
}
.sw-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
}
.sw-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.sw-score-summary {
  font-size: 0.85rem;
  color: #e8d5a3;
  margin-bottom: 14px;
  font-weight: 600;
}
.sw-screenplay-pre, .sw-play-pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: rgba(220,225,255,0.8);
  white-space: pre-wrap;
  line-height: 1.6;
  background: rgba(0,0,0,0.3);
  padding: 16px;
  border-radius: 6px;
}

/* ── Busy State ── */
.sw-busy-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 16px;
}
.sw-busy-msg {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  animation: sw-pulse 1.5s infinite;
}
@keyframes sw-pulse { 0%,100%{ opacity:0.5 } 50%{ opacity:1 } }

/* ── Spinner ── */
.sw-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #5de0f4;
  border-radius: 50%;
  animation: sw-spin 0.7s linear infinite;
  display: inline-block;
}
.sw-play-theme .sw-spinner { border-top-color: #f9a8b8; }
.sw-spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}
@keyframes sw-spin { to { transform: rotate(360deg); } }

/* ── Storyboard & Shot Sheet (Step 7) ────────────────────────────────────── */
.sw-storyboard-info { margin-bottom: 24px; }
.sw-sb-stat-row {
  display: flex; gap: 16px; margin-bottom: 20px;
}
.sw-sb-stat {
  flex: 1; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sw-sb-stat-num {
  font-size: 1.6rem; font-weight: 900; color: #f59e0b;
  line-height: 1;
}
.sw-sb-stat-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
}

/* Scene preview list */
.sw-sb-scene-preview {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 14px 16px; margin-top: 16px;
}
.sw-sb-preview-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.35); margin-bottom: 10px;
}
.sw-sb-scene-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem;
}
.sw-sb-scene-row:last-child { border-bottom: none; }
.sw-sb-scene-num {
  flex-shrink: 0; width: 56px;
  color: #f59e0b; font-weight: 700; font-size: 0.7rem;
}
.sw-sb-scene-slug { flex: 1; color: rgba(255,255,255,0.75); font-family: monospace; font-size: 0.75rem; }
.sw-sb-scene-beat {
  flex-shrink: 0; color: rgba(255,255,255,0.35); font-style: italic; font-size: 0.7rem;
}
.sw-sb-more { color: rgba(255,255,255,0.3); font-style: italic; }

/* Panels grid */
.sw-sb-panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin: 20px 0;
}
.sw-sb-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; overflow: hidden;
  transition: border-color 0.2s;
}
.sw-sb-panel:hover { border-color: rgba(245,158,11,0.35); }
.sw-sb-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: rgba(0,0,0,0.25);
}
.sw-sb-panel-num { font-size: 0.7rem; font-weight: 700; color: #f59e0b; }
.sw-sb-panel-shot {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.07); border-radius: 4px; padding: 2px 6px;
}
.sw-sb-panel-img {
  width: 100%; display: block;
  aspect-ratio: 16/9; object-fit: cover;
}
.sw-sb-panel-img-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.2); font-size: 0.8rem;
}
.sw-sb-panel-slug {
  padding: 8px 12px 4px;
  font-family: monospace; font-size: 0.68rem;
  color: rgba(255,255,255,0.6); line-height: 1.3;
}
.sw-sb-panel-note {
  padding: 2px 12px 10px;
  font-size: 0.7rem; color: rgba(255,255,255,0.35);
  font-style: italic; line-height: 1.3;
}

/* Export row */
.sw-sb-export-row {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: 8px;
}

/* ── Step 9 Export Page ── */
.sw-export-page .sw-step-content { max-width: 760px; }

.sw-fdx-info {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 18px;
  background: rgba(99,179,237,0.08);
  border: 1px solid rgba(99,179,237,0.2);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.sw-fdx-info-icon { font-size: 1.6rem; flex-shrink: 0; line-height: 1; }
.sw-fdx-info strong { color: #63b3ed; }

.sw-export-all-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.08));
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 10px;
  margin-bottom: 28px;
}
.sw-export-all-icon { font-size: 2.2rem; flex-shrink: 0; }
.sw-export-all-text { flex: 1; }
.sw-export-all-title { font-weight: 700; font-size: 1rem; color: #fbbf24; margin-bottom: 4px; }
.sw-export-all-sub { font-size: 0.78rem; color: rgba(255,255,255,0.5); }

.sw-btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0a0a18;
  font-weight: 700;
  border: none;
  padding: 12px 22px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.sw-btn-gold:hover { opacity: 0.9; }
.sw-btn-gold:disabled { opacity: 0.5; cursor: not-allowed; }

.sw-export-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 12px;
}

.sw-export-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sw-export-card2 {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  transition: background 0.15s;
}
.sw-export-card2:hover { background: rgba(255,255,255,0.07); }
.sw-export-card2-icon { font-size: 1.6rem; flex-shrink: 0; }
.sw-export-card2-body { flex: 1; }
.sw-export-card2-title { font-weight: 700; font-size: 0.9rem; color: #e0e6ff; margin-bottom: 3px; }
.sw-export-card2-desc { font-size: 0.75rem; color: rgba(255,255,255,0.4); line-height: 1.4; }

.sw-btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.sw-btn-teal {
  background: rgba(56,189,177,0.15);
  border: 1px solid rgba(56,189,177,0.4);
  color: #38bdb1;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  padding: 8px 16px;
  font-size: 0.8rem;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.sw-btn-teal:hover { background: rgba(56,189,177,0.25); }
.sw-btn-teal:disabled { opacity: 0.4; cursor: not-allowed; }

.sw-export-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(99,179,237,0.06);
  border: 1px solid rgba(99,179,237,0.15);
  border-radius: 8px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
