/* ══════════════════════════════════════════════════════════════════════
   Create Muse — Immersive multi-step wizard (onboarding-style)
   ══════════════════════════════════════════════════════════════════════ */

/* ── Container ──────────────────────────────────────────────────────── */
.muse-container {
  display: flex; flex-direction: column; flex: 1;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 25% 30%, rgba(140, 90, 160, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 70% 60%, rgba(194, 105, 122, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 15% 15%, rgba(100, 60, 120, 0.15) 0%, transparent 100%),
    radial-gradient(ellipse 60% 80% at 85% 85%, rgba(90, 45, 80, 0.12) 0%, transparent 100%),
    radial-gradient(ellipse 120% 100% at 50% 100%, rgba(30, 15, 25, 0.5) 0%, transparent 60%),
    linear-gradient(160deg, #0c0610 0%, #0a050a 30%, #0e080c 60%, #08050a 100%);
}

/* ── Noise + sparkles (reuse onboarding classes) ────────────────────── */
.muse-noise {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 256px 256px;
}
.muse-sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.muse-sparkle {
  position: absolute; border-radius: 50%;
  background: rgba(200, 180, 240, 0.5);
  animation: sparkleFloat linear infinite, sparklePulse ease-in-out infinite;
}

/* ── Section progress bar ──────────────────────────────────────────── */
.muse-progress-row {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 28px 0; flex-shrink: 0; z-index: 2;
}
.muse-section-bar {
  display: flex; gap: 6px; flex: 1; align-items: flex-end;
}
.muse-section-bar-item {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.muse-section-bar-item[data-weight="13"] { flex: 13; }
.muse-section-bar-item[data-weight="6"] { flex: 6; }
.muse-section-bar-item[data-weight="2"] { flex: 2; }
.muse-section-bar-item[data-weight="1"] { flex: 1; }
.muse-section-bar-label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.3s;
}
.muse-section-bar-item.active .muse-section-bar-label,
.muse-section-bar-item.done .muse-section-bar-label { color: var(--muted); }
.muse-section-bar-track {
  height: 3px; border-radius: 2px; background: var(--border2);
  overflow: hidden; position: relative;
}
.muse-section-bar-fill {
  height: 100%; border-radius: 2px; background: var(--rose);
  transition: width 0.4s ease;
}
.muse-section-bar-item.done .muse-section-bar-fill { background: var(--rose); }
.muse-section-bar-item.active .muse-section-bar-fill { background: var(--rose-l); }

/* ── Screen area ────────────────────────────────────────────────────── */
.muse-screen {
  flex: 1; display: flex; flex-direction: column;
  align-items: center;
  padding: 28px 28px 16px; overflow-y: auto;
  position: relative; z-index: 1;
}
/* Center content on single-choice screens, top-align on scrollable screens */
.muse-screen.centered { justify-content: center; }
.muse-screen.slide-enter { animation: slideIn 300ms ease-out forwards; }
.muse-screen.slide-exit { animation: slideOut 200ms ease-in forwards; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.muse-footer {
  display: flex; justify-content: center; gap: 12px;
  padding: 16px 32px 28px; flex-shrink: 0; z-index: 2;
}
.muse-btn {
  padding: 12px 32px; border-radius: 12px; font-size: 15px;
  font-weight: 600; cursor: pointer; border: none;
  font-family: var(--ff-body); transition: all 0.2s;
}
.muse-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.muse-btn-primary { background: var(--rose); color: #fff; }
.muse-btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.muse-btn-back {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border2);
}
.muse-btn-back:hover { border-color: var(--muted); color: var(--cream); }
.muse-btn-text { background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; }
.muse-btn-text:hover { color: var(--cream); }
.muse-btn-cancel {
  background: none; border: none; color: var(--muted);
  font-size: 12px; cursor: pointer; white-space: nowrap;
  padding: 4px 0; transition: color 0.2s;
}
.muse-btn-cancel:hover { color: var(--cream); }

/* ── Question heading ───────────────────────────────────────────────── */
.muse-question { max-width: 600px; width: 100%; text-align: center; }
.muse-question h2 {
  font-family: var(--ff-display); font-size: 1.6rem; font-weight: 400;
  color: var(--cream); margin-bottom: 8px;
}
.muse-question p {
  font-size: 0.85rem; color: var(--muted); margin-bottom: 28px;
  font-style: italic;
}

/* ── Big cards (style/gender picker) ────────────────────────────────── */
.muse-big-cards {
  display: flex; gap: 16px; max-width: 500px; width: 100%;
  justify-content: center;
}
.muse-big-card {
  flex: 1; background: var(--panel); border: 2px solid var(--border2);
  border-radius: 16px; padding: 28px 20px; cursor: pointer;
  text-align: center; transition: all 0.2s;
  max-width: 220px;
}
.muse-big-card:hover { border-color: rgba(194,105,122,0.4); transform: translateY(-2px); }
.muse-big-card.selected {
  border-color: var(--rose); background: rgba(194,105,122,0.08);
  animation: cardPulse 300ms ease;
}
.muse-big-card-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.muse-big-card-label {
  font-family: var(--ff-display); font-size: 1.2rem; color: var(--cream);
  margin-bottom: 4px;
}
.muse-big-card-desc { font-size: 0.8rem; color: var(--muted); }
@keyframes cardPulse { 50% { transform: scale(1.03); } }

/* ── Archetype grid ─────────────────────────────────────────────────── */
.muse-arch-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; max-width: 760px; width: 100%;
}
.muse-arch-card {
  position: relative; border-radius: 12px; overflow: hidden;
  cursor: pointer; border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.muse-arch-card:hover {
  border-color: rgba(194,105,122,0.4); transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.muse-arch-card.selected { border-color: var(--rose); }
.muse-arch-card img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block;
}
.muse-arch-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
}
.muse-arch-name { font-weight: 600; font-size: 12px; color: #fff; }

/* ── Preview modal ──────────────────────────────────────────────────── */
.muse-preview-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.muse-preview-overlay.hidden { display: none; }
.muse-preview-card {
  background: var(--bg3); border-radius: 18px;
  border: 1px solid var(--border2); max-width: 360px; width: 90%;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.muse-preview-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.muse-preview-name {
  font-family: var(--ff-display); font-size: 22px; font-weight: 400;
  color: var(--cream); text-align: center; padding: 16px 16px 4px;
}
.muse-preview-style {
  font-size: 12px; color: var(--muted2); text-align: center;
  text-transform: capitalize; padding-bottom: 12px;
}
.muse-preview-actions {
  display: flex; gap: 10px; justify-content: center; padding: 0 20px 20px;
}

/* ── Form fields ────────────────────────────────────────────────────── */
.muse-form { max-width: 440px; width: 100%; }
.muse-field { margin-bottom: 20px; }
.muse-field label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--muted); margin-bottom: 6px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.muse-field input, .muse-field textarea, .muse-field select {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--border2); background: rgba(255,255,255,0.04);
  color: var(--cream); font-size: 15px;
  font-family: var(--ff-body); transition: border-color 0.2s;
}
.muse-field input:focus, .muse-field textarea:focus, .muse-field select:focus {
  outline: none; border-color: var(--rose);
}
.muse-field textarea { resize: vertical; min-height: 60px; }
.muse-field-hint { font-size: 11px; color: var(--muted2); margin-top: 4px; }

/* ── Pill chips (interests) ─────────────────────────────────────────── */
.muse-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.muse-pill {
  padding: 6px 14px; border-radius: 99px; font-size: 13px;
  border: 1px solid var(--border2); background: rgba(255,255,255,0.03);
  cursor: pointer; color: var(--muted); transition: all 0.2s;
}
/* ── Search autocomplete ─────────────────────────────────────────────── */
.muse-search-results {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 0 0 12px 12px; z-index: 10;
  max-height: 240px; overflow-y: auto;
}
.muse-search-results:empty { display: none; }
.muse-search-item {
  padding: 10px 16px; cursor: pointer; font-size: 14px;
  color: var(--cream); transition: background 0.15s;
}
.muse-search-item:hover { background: rgba(194,105,122,0.12); }
.muse-search-more {
  padding: 8px 16px; font-size: 12px; color: var(--muted2);
  text-align: center; font-style: italic;
}
.muse-field { position: relative; }

.muse-pill:hover:not(.disabled) { border-color: rgba(194,105,122,0.4); color: var(--cream); }
.muse-pill.selected {
  background: var(--rose); color: #fff; border-color: var(--rose);
  animation: cardPulse 300ms ease;
}
.muse-pill.disabled { opacity: 0.25; cursor: not-allowed; }

/* ── How-met options ────────────────────────────────────────────────── */
.muse-options {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; width: 100%; max-width: 480px;
}
.muse-option {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border2);
  border-radius: 12px; padding: 12px 14px; cursor: pointer;
  transition: all 0.2s; text-align: left;
  display: flex; align-items: center; gap: 8px;
}
.muse-option:hover { border-color: rgba(194,105,122,0.4); }
.muse-option.selected {
  border-color: var(--rose); background: rgba(194,105,122,0.08);
  animation: cardPulse 300ms ease;
}
.muse-option-icon { font-size: 18px; flex-shrink: 0; }
.muse-option-label { font-size: 13px; color: var(--cream); font-weight: 500; }
.muse-option-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.muse-options > .muse-option:last-child:nth-child(odd) {
  grid-column: 1 / -1; max-width: calc(50% - 4px); justify-self: center;
}
/* 3-item grids: single row instead of 2+1 centered orphan */
.muse-options:has(> :nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr);
}
.muse-options:has(> :nth-child(3):last-child) > .muse-option:last-child:nth-child(odd) {
  grid-column: auto; max-width: none; justify-self: auto;
}
@media (max-width: 480px) {
  .muse-options:has(> :nth-child(3):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
}
.muse-field-label-inline {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 8px;
}

/* ── Generating / reveal ────────────────────────────────────────────── */
.muse-generating { text-align: center; padding: 40px; max-width: 360px; margin: 0 auto; }
.muse-gen-stages {
  display: flex; justify-content: center; gap: 28px; margin-bottom: 32px;
}
.muse-gen-stage {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted2); transition: color 0.3s;
}
.muse-gen-stage.active { color: var(--cream); }
.muse-gen-stage.done { color: var(--rose); }
.muse-gen-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border2); transition: background 0.3s, box-shadow 0.3s;
  flex-shrink: 0;
}
.muse-gen-stage.active .muse-gen-dot {
  background: var(--rose);
  box-shadow: 0 0 8px rgba(194,105,122,0.5);
  animation: cm-pulse 1.5s ease-in-out infinite;
}
.muse-gen-stage.done .muse-gen-dot { background: var(--rose); }
@keyframes cm-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(194,105,122,0.4); }
  50% { box-shadow: 0 0 14px rgba(194,105,122,0.7); }
}
.muse-gen-bar {
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--border2); margin-bottom: 20px; overflow: hidden;
}
.muse-gen-fill {
  width: 5%; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--rose), var(--rose-l));
  transition: width 0.6s ease;
}
.muse-progress-text { font-size: 14px; color: var(--muted); }

.muse-reveal { text-align: center; }
.muse-reveal-carousel {
  display: flex; gap: 12px; justify-content: center;
  padding: 16px 0; overflow-x: auto;
}
.muse-reveal-carousel img {
  width: 160px; height: 220px; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--border2); flex-shrink: 0;
}

/* ── Reflection ─────────────────────────────────────────────────────── */
.muse-reflection { max-width: 460px; width: 100%; text-align: center; }
.muse-reflection-prompt {
  font-family: var(--ff-display); font-size: 1.2rem; font-weight: 400;
  color: var(--cream); line-height: 1.6; margin-bottom: 24px;
}
.muse-reflection textarea {
  width: 100%; min-height: 100px; padding: 14px;
  border-radius: 12px; border: 1px solid var(--border2);
  background: rgba(255,255,255,0.04); color: var(--cream);
  font-size: 14px; font-family: var(--ff-body); resize: vertical;
}
.muse-reflection textarea:focus { outline: none; border-color: var(--rose); }

/* ── Slots indicator ────────────────────────────────────────────────── */
.muse-slots {
  text-align: center; font-size: 12px; color: var(--muted2);
  letter-spacing: 0.03em; margin-bottom: 8px;
}

/* ── Welcome confirmation banner ───────────────────────────────────── */
.muse-welcome-banner {
  background: var(--panel); border: 1px solid rgba(194,105,122,0.25);
  border-radius: 18px; padding: 36px 40px; text-align: center;
  max-width: 440px; width: 100%;
}
.muse-welcome-banner h2 {
  font-family: var(--ff-display); font-size: 1.5rem; font-weight: 400;
  color: var(--cream); margin-bottom: 10px;
}
.muse-welcome-banner p {
  font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.6;
}
.muse-welcome-note {
  display: block; font-size: 12px; color: var(--muted2);
  margin-bottom: 24px; font-style: italic;
}

/* ── Draft resume banner ────────────────────────────────────────────── */
.muse-draft-banner {
  background: var(--panel); border: 1px solid rgba(194,105,122,0.25);
  border-radius: 14px; padding: 20px 24px; text-align: center;
  max-width: 400px; width: 100%;
}
.muse-draft-banner h3 {
  font-family: var(--ff-display); font-size: 1.2rem; color: var(--cream);
  margin-bottom: 8px;
}
.muse-draft-banner p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.muse-draft-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Browse sidebar Muse button ─────────────────────────────────────── */
.browse-muse-sep { height: 1px; margin: 8px 12px; background: var(--border2); }
.browse-muse-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 7px 0; margin: 4px 12px 12px 12px;
  border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--border2);
  transition: all 0.15s;
}
.browse-muse-btn:hover { color: var(--cream); border-color: var(--cream-15) }
.browse-muse-btn-text { font-size: 11px; font-weight: 500; color: var(--muted); transition: color 0.15s }
.browse-muse-btn:hover .browse-muse-btn-text { color: var(--cream) }

/* ── Thumbnail image grid ──────────────────────────────────────────── */
.muse-thumb-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; max-width: 520px; width: 100%;
}
@media (max-width: 600px) {
  .muse-thumb-grid { grid-template-columns: repeat(2, 1fr); }
}
.muse-thumb-tile {
  position: relative; border-radius: 12px; overflow: hidden;
  cursor: pointer; border: 2px solid var(--border2);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  aspect-ratio: 1;
}
.muse-thumb-tile:hover {
  border-color: var(--rose-40); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.muse-thumb-tile.selected {
  border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-20);
  animation: cardPulse 300ms ease;
}
.muse-thumb-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.muse-thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 12px; color: #fff; text-align: center; font-weight: 500;
}
.muse-let-decide {
  display: block; margin: 16px auto 0; max-width: 280px; width: 100%;
  text-align: center; padding: 12px 20px; border-radius: 12px;
  border: 1px dashed var(--border2); background: transparent;
  color: var(--muted); cursor: pointer; transition: all 0.2s;
  font-size: 13px; font-family: var(--ff-body);
}
.muse-let-decide:hover { border-color: var(--rose-40); color: var(--cream); }
.muse-let-decide.selected {
  border-color: var(--rose); color: var(--cream);
  background: rgba(194,105,122,0.06);
}

/* ── Interstitial / transition screens ─────────────────────────────── */
.muse-interstitial {
  text-align: center; max-width: 480px; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0;
}
.muse-interstitial h2 {
  font-family: var(--ff-display); font-size: 2rem; font-weight: 300;
  color: var(--cream); margin-bottom: 12px;
  opacity: 0; animation: missionFadeIn 700ms ease forwards;
}
.muse-interstitial p {
  font-size: 1rem; color: var(--muted); line-height: 1.7;
  opacity: 0; animation: missionFadeIn 500ms 300ms ease forwards;
}
.muse-interstitial .muse-compliment {
  font-family: var(--ff-display); font-style: italic;
  color: var(--rose-l); font-size: 1.15rem; margin-top: 20px;
  opacity: 0; animation: missionFadeIn 500ms 700ms ease forwards;
}

/* ── Segmented control (height picker) ─────────────────────────────── */
.muse-segmented {
  display: flex; max-width: 400px; width: 100%;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border2);
}
.muse-segmented-opt {
  flex: 1; padding: 14px 16px; text-align: center;
  cursor: pointer; background: var(--panel); color: var(--muted);
  font-size: 14px; font-family: var(--ff-body); font-weight: 500;
  transition: all 0.2s; border-right: 1px solid var(--border2);
}
.muse-segmented-opt:last-child { border-right: none; }
.muse-segmented-opt:hover { color: var(--cream); background: rgba(255,255,255,0.03); }
.muse-segmented-opt.selected {
  background: var(--rose); color: #fff;
}

/* ── Small option pills (appearance fallback) ──────────────────────── */
.muse-options-wrap {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.muse-option-sm {
  padding: 8px 14px; font-size: 12px; border-radius: 10px;
  border: 1px solid var(--border2); background: rgba(255,255,255,0.03);
  color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.muse-option-sm:hover { border-color: var(--rose-40); color: var(--cream); }
.muse-option-sm.selected {
  border-color: var(--rose); background: rgba(194,105,122,0.08);
  color: var(--cream); animation: cardPulse 300ms ease;
}
.muse-option-null { border-style: dashed; }
