/* ============================================================
   Yours — Desktop shell (>= 768px experience)
   Shared layout: sidebar + topbar + content + footer.
   Theme mirrors css/app.css tokens.
   ============================================================ */

:root {
  --ds-bg: #121212;
  --ds-surface: #1e1e1e;
  --ds-surface-2: #262626;
  --ds-surface-3: #303030;
  --ds-text: #f5f5f7;
  --ds-muted: #9a9a9e;
  --ds-line: rgba(255, 255, 255, 0.08);
  --ds-accent: #ff4d6d;
  --ds-accent-2: #ff5c35;
  --ds-gradient: linear-gradient(135deg, #c3244c 0%, #f02a53 50%, #ff3e86 100%);
  --ds-radius: 20px;
  --ds-radius-sm: 14px;
  --ds-sidebar-w: 232px;
  --ds-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Base ---------- */
.ds-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60vw 50vh at 85% -10%, rgba(255, 77, 109, 0.07), transparent 60%),
    var(--ds-bg);
  color: var(--ds-text);
  font-family: var(--ds-font);
  -webkit-font-smoothing: antialiased;
}
.ds-page *, .ds-page *::before, .ds-page *::after { box-sizing: border-box; }
.ds-page img { display: block; }
.ds-page a { color: inherit; text-decoration: none; }
.ds-page button { font-family: inherit; cursor: pointer; }
.ds-page ::placeholder { color: rgba(255, 255, 255, 0.35); }

/* ---------- Layout ---------- */
.ds-layout {
  display: flex;
  min-height: 100vh;
  /* Reserve space for the fixed sidebar so content never slides under it. */
  padding-left: var(--ds-sidebar-w);
}
.ds-content-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ds-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 40px 64px;
}

/* ---------- Sidebar ---------- */
.ds-sidebar {
  position: fixed;
  inset-block: 0;
  left: 0;
  width: var(--ds-sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 14px;
  background: #161616;
  border-right: 1px solid var(--ds-line);
  z-index: 40;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ds-surface-3) transparent;
}
.ds-logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.ds-logo img { height: 30px; width: auto; object-fit: contain; }

.ds-nav-group { display: flex; flex-direction: column; gap: 2px; }
.ds-nav-label {
  margin: 14px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ds-muted);
}
.ds-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ds-nav-item i { width: 20px; text-align: center; font-size: 15px; }
.ds-nav-item:hover { background: var(--ds-surface); color: var(--ds-text); }
.ds-nav-item.is-active { background: var(--ds-surface-2); color: var(--ds-text); border-color: var(--ds-line); }
.ds-nav-item .ds-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--ds-gradient);
  color: #fff;
}

.ds-sidebar-spacer { flex: 1 1 auto; min-height: 16px; }

.ds-upgrade-card {
  display: block;
  padding: 16px;
  border-radius: var(--ds-radius-sm);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 92, 53, 0.25), transparent 55%),
    var(--ds-surface);
  border: 1px solid var(--ds-line);
}
.ds-upgrade-card strong { display: block; font-size: 14px; font-weight: 800; }
.ds-upgrade-card .ds-upgrade-desc { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--ds-muted); }
.ds-upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--ds-gradient);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.ds-upgrade-btn:hover { filter: brightness(1.08); }
.ds-upgrade-btn:active { transform: scale(0.98); }

.ds-sidebar-foot { padding: 14px 10px 4px; font-size: 11px; color: rgba(255, 255, 255, 0.35); }

/* ---------- Topbar ---------- */
.ds-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 40px;
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ds-line);
}
.ds-topbar-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.ds-topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Buttons ---------- */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--ds-line);
  background: var(--ds-surface);
  color: var(--ds-text);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}
.ds-btn:hover { background: var(--ds-surface-2); }
.ds-btn:active { transform: scale(0.97); }
.ds-btn-primary { border-color: transparent; background: var(--ds-gradient); color: #fff; }
.ds-btn-primary:hover { background: var(--ds-gradient); filter: brightness(1.1); }
.ds-btn-lg { height: 48px; padding: 0 28px; font-size: 15px; }

.ds-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--ds-line);
  font-size: 13.5px;
  font-weight: 700;
}
.ds-wallet-chip i { color: var(--ds-accent); font-size: 12px; }
.ds-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ds-surface-3);
  background: var(--ds-surface-2);
}

/* ---------- Character cards ---------- */
.ds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.ds-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px;
  border-radius: var(--ds-radius);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, z-index 0s;
}
.ds-card:hover { transform: scale(1.02); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); z-index: 5; }
.ds-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 13px;
  overflow: hidden;
  background: var(--ds-surface-2);
}
.ds-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.ds-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 45%);
}
.ds-card-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}
.ds-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 4px; }
.ds-card-name { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; min-width: 0; }
.ds-card-name small { display: block; font-size: 11px; font-weight: 600; color: var(--ds-muted); text-transform: none; letter-spacing: 0; }
.ds-card-open {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ds-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: filter 0.15s ease;
}
.ds-card-open:hover { filter: brightness(1.12); }

/* ---------- Empty states ---------- */
.ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 16px;
}
.ds-empty p { margin: 0 0 22px; font-size: 15px; color: var(--ds-muted); }

/* ---------- Footer ---------- */
.ds-footer { border-top: 1px solid var(--ds-line); background: #141414; }
.ds-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px 26px;
}
.ds-footer-cols {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(120px, 1fr));
  gap: 32px 40px;
  align-items: start;
}
.ds-footer-col { min-width: 0; }
.ds-footer-col p {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ds-muted);
}
.ds-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ds-footer-col a { font-size: 13.5px; color: rgba(255, 255, 255, 0.78); }
.ds-footer-col a:hover { color: var(--ds-accent); }
.ds-footer-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.ds-footer-brand .ds-footer-tag { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ds-muted); max-width: 260px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ds-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--ds-line);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

/* ---------- Injected-sidebar pages (no .ds-layout shell) ---------- */
@media (min-width: 768px) {
  body.has-ds-sidebar { padding-left: var(--ds-sidebar-w); }
  /* Hide mobile-only floating bottom tab bars on desktop. */
  body.has-ds-sidebar nav.fixed.bottom-4 { display: none; }
}

/* ---------- Create funnel (stages 1-6) ---------- */
.cc-wrap { max-width: 820px; margin: 0 auto; padding: 8px 0 28px; text-align: center; }

.cc-steps { display: flex; align-items: flex-start; gap: 6px; width: min(560px, 92%); margin: 0 auto 34px; }
.cc-step { display: flex; flex-direction: column; align-items: center; gap: 7px; flex-shrink: 0; width: 56px; }
.cc-dot {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ds-surface-2); border: 1px solid var(--ds-line);
  color: var(--ds-muted); font-size: 13px;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.cc-dot i { font-size: 12px; }
.cc-dot.is-active { background: var(--ds-gradient); border-color: transparent; color: #fff; animation: cc-pulse 2.4s ease-in-out infinite; }
.cc-dot.is-done { background: rgba(240, 42, 83, 0.22); border-color: rgba(240, 42, 83, 0.45); color: #fff; }
.cc-step-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.38); white-space: nowrap; }
.cc-step.is-active .cc-step-label, .cc-step.is-done .cc-step-label { color: var(--ds-muted); }
@keyframes cc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 42, 83, 0.30); }
  50% { box-shadow: 0 0 0 7px rgba(240, 42, 83, 0); }
}
.cc-bar { position: relative; flex: 1; height: 3px; border-radius: 99px; background: var(--ds-surface-2); overflow: hidden; margin-top: 15px; }
.cc-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 99px; background: var(--ds-gradient); transition: width .45s ease; }

/* — horizontal rounded progress bar (icon-free) — */
.cc-progress { position: relative; width: min(380px, 82%); height: 6px; border-radius: 999px; background: var(--ds-surface-2); overflow: hidden; margin: 4px auto 12px; }
.cc-progress-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: var(--ds-gradient); transition: width .45s ease; }

/* — Hair-style card grid (reference: desktop-create-stage2) — */
.hair-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 680px; margin: 0 auto; }
@media (min-width: 640px) { .hair-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hair-card {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08);
  background: var(--ds-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 10px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
  cursor: pointer;
}
.hair-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-2px); }
.hair-card.is-selected { border-color: var(--ds-accent); box-shadow: 0 0 0 3px rgba(255,77,109,0.22); }
.hair-card .hair-icon { font-size: 28px; color: rgba(255,255,255,0.22); }
.hair-card .hair-label { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; }

/* — Eye / Hair color swatches (reference: Eye Color / Hair Color rows) — */
.color-grid { display: flex; flex-wrap: wrap; gap: 16px 18px; justify-content: center; max-width: 680px; margin: 0 auto; }
.color-option { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; background: transparent; border: 0; padding: 0; }
.color-swatch {
  width: 36px; height: 36px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.color-option.is-selected .color-swatch { border-color: #fff; box-shadow: 0 0 0 3px var(--ds-accent), inset 0 0 0 1px rgba(0,0,0,0.15); transform: scale(1.07); }
.color-option span { font-size: 11px; font-weight: 600; color: var(--ds-muted); }
.color-option.is-selected span { color: var(--ds-text); }

/* — Body / option equal-size cards (stage4) — */
.option-card-grid { display: grid; gap: 12px; max-width: 680px; margin: 0 auto; }
.option-card-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.option-card-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.option-card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .option-card-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .option-card-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.option-card {
  aspect-ratio: 1 / 1.15;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.08);
  background: var(--ds-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 12px;
  cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s;
}
.option-card:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-2px); }
.option-card.is-selected { border-color: var(--ds-accent); box-shadow: 0 0 0 3px rgba(255,77,109,0.22); }
.option-card i { font-size: 22px; color: rgba(255,255,255,0.28); }
.option-card span { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; }

/* — Stage5: Character Name / Age / Personality Details (matches stage5-ui.png) — */
.s5-name-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; max-width: 680px; margin: 0 auto; align-items: start; }
.s5-field { text-align: left; }
.s5-field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: none; color: var(--ds-muted); margin-bottom: 6px; text-align: center; }
.s5-name-input {
  width: 100%; height: 44px; text-align: center;
  border-radius: 10px; border: 1.5px solid rgba(255,77,109,0.9);
  background: rgba(0,0,0,0.35); color: var(--ds-text);
  font-family: inherit; font-size: 15px; font-weight: 700;
  outline: none; box-shadow: 0 0 0 3px rgba(255,77,109,0.12) inset;
}
.s5-name-input::placeholder { color: rgba(255,255,255,0.35); }
.s5-age-row { display: flex; align-items: center; gap: 6px; justify-content: center; padding-top: 6px; }
.s5-age-num {
  min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ds-muted);
  background: rgba(255,255,255,0.06); border: 1px solid transparent; cursor: pointer;
}
.s5-age-num.is-selected {
  background: rgba(30,30,30,0.95); border-color: rgba(255,77,109,0.9);
  color: #fff; font-size: 18px; font-weight: 800; min-width: 44px; height: 44px;
  box-shadow: 0 0 0 2px rgba(255,77,109,0.25);
}
.s5-hint { text-align: center; margin: 10px 0 12px; }
.s5-hint strong { display: block; font-size: 13px; font-weight: 600; color: var(--ds-text); }
.s5-hint span { font-size: 11px; color: var(--ds-muted); }
.s5-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 680px; margin: 0 auto; }
@media (max-width: 600px) { .s5-details-grid { grid-template-columns: 1fr; } }
.s5-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08);
  background: #1e1e1e;
  text-align: left; cursor: pointer; position: relative; overflow: hidden;
  min-height: 64px;
}
.s5-card-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ds-surface-2); color: rgba(255,255,255,0.55); font-size: 20px;
}
.s5-card-icon.is-pink { background: #ff5ca1; color: #fff; }
.s5-card-icon.is-play { background: #ff5ca1; color: #fff; border-radius: 999px; }
.s5-card-meta { flex: 1; min-width: 0; }
.s5-card-meta small { display: block; font-size: 11px; color: var(--ds-muted); }
.s5-card-meta strong { display: block; font-size: 14px; font-weight: 700; color: var(--ds-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s5-card-wave { position: absolute; left: 16px; right: 16px; bottom: 8px; height: 14px; display: flex; align-items: flex-end; gap: 2px; opacity: 0.9; }
.s5-card-wave i { flex: 1; max-width: 3px; background: rgba(255,255,255,0.35); border-radius: 999px; }
.s5-advanced {
  max-width: 680px; width: 100%; margin: 12px auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08);
  background: #1e1e1e;
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ds-text);
  box-sizing: border-box;
}
.s5-advanced span { font-weight: 400; color: var(--ds-muted); margin-left: 6px; }
.s5-next-wrap { display: flex; justify-content: center; margin-top: 22px; }
.s5-next {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 320px; height: 48px; padding: 0 28px;
  border-radius: 999px; border: 3px solid rgba(0,0,0,0.55);
  background: var(--ds-gradient); color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.06);
}
.s5-next small { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,0.22); padding: 2px 8px; border-radius: 999px; font-size: 12px; }

/* — Popup for stage5 details — */
.s5-modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; }
.s5-modal.is-open { display: flex; }
.s5-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(6px); }
.s5-modal-card {
  position: relative; width: min(520px, 100%); max-height: 80vh; overflow: auto;
  background: #1c1c1c; border: 1px solid rgba(255,255,255,0.10); border-radius: 18px;
  padding: 18px; box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}
.s5-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.s5-modal-head strong { font-size: 14px; font-weight: 800; color: var(--ds-text); text-transform: capitalize; }
.s5-modal-close { width: 32px; height: 32px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.s5-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.s5-option {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: #262626;
  color: var(--ds-text); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left;
}
.s5-option.is-selected { border-color: var(--ds-accent); background: rgba(255,77,109,0.14); }
.s5-option i { font-size: 14px; color: rgba(255,255,255,0.5); }

/* — Stage6: Summary (matches stage6.png) — */
.s6-layout { display: grid; grid-template-columns: 380px 1fr; gap: 18px; max-width: 880px; margin: 0 auto; text-align: left; }
@media (max-width: 860px) { .s6-layout { grid-template-columns: 1fr; } }
.s6-preview {
  position: relative; aspect-ratio: 3 / 4.2; border-radius: 18px; overflow: hidden;
  background: var(--ds-surface-2); border: 1px solid rgba(255,255,255,0.08);
}
.s6-preview img { width: 100%; height: 100%; object-fit: cover; }
.s6-preview-overlay {
  position: absolute; inset: auto 0 0 0; padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff;
}
.s6-preview-overlay strong { display: block; font-size: 14px; font-weight: 800; }
.s6-preview-overlay span { display: block; font-size: 12px; color: rgba(255,255,255,0.78); margin-top: 2px; line-height: 1.35; }
.s6-tags { margin-top: 10px; background: rgba(0,0,0,0.35); backdrop-filter: blur(6px); border-radius: 12px; padding: 10px; border: 1px solid rgba(255,255,255,0.08); }
.s6-tags small { display: block; font-size: 11px; color: rgba(255,255,255,0.55); margin-bottom: 6px; }
.s6-tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.s6-tag { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.12); font-size: 11px; font-weight: 600; color: #fff; }
.s6-panel { display: flex; flex-direction: column; gap: 12px; }
.s6-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
.s6-tab { height: 32px; border-radius: 999px; border: 0; background: transparent; color: var(--ds-muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.s6-tab.is-active { background: rgba(255,255,255,0.14); color: #fff; }
.s6-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.s6-detail-card {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(28,28,28,0.98), rgba(18,18,18,0.98));
}
.s6-detail-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--ds-surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: rgba(255,255,255,0.5); flex-shrink: 0; }
.s6-detail-icon.is-img { background: transparent; overflow: hidden; }
.s6-detail-icon.is-img img { width: 100%; height: 100%; object-fit: cover; }
.s6-detail-meta small { display: block; font-size: 10px; color: var(--ds-muted); }
.s6-detail-meta strong { display: block; font-size: 12px; font-weight: 700; color: #fff; }
.s6-note { padding: 12px; border-radius: 12px; border: 1px dashed rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }
.s6-note small { display: block; font-size: 10px; color: var(--ds-muted); }
.s6-note span { display: block; font-size: 11px; font-style: italic; color: rgba(255,255,255,0.45); margin-top: 2px; }
.s6-cta { display: flex; justify-content: center; margin-top: 18px; }
.s6-cta button {
  min-width: 300px; height: 48px; border-radius: 999px; border: 0;
  background: var(--ds-gradient); color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 0 0 5px rgba(255,255,255,0.06);
}

/* — Ethnicity + Skin Tone (stage3 from stage2.png) — */
.ethnicity-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; max-width: 680px; margin: 0 auto; }
@media (max-width: 680px) { .ethnicity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ethnicity-card {
  position: relative; aspect-ratio: 3 / 4.2; border-radius: 14px; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08); background: var(--ds-surface-2);
  cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .12s;
}
.ethnicity-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.16); }
.ethnicity-card.is-selected { border-color: #ff5ca1; box-shadow: 0 0 0 2px rgba(255,92,161,0.22); }
.ethnicity-card .eth-thumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2a1a2e, #3a2a3a); color: rgba(255,255,255,0.18); font-size: 28px; }
.ethnicity-card .eth-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 6px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.62), transparent);
  text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff;
}
.ethnicity-card .eth-check {
  position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 999px;
  background: #ff5ca1; color: #fff; display: none; align-items: center; justify-content: center; font-size: 10px;
}
.ethnicity-card.is-selected .eth-check { display: inline-flex; }
.skin-wrap { margin-top: 18px; }
.skin-grid { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; max-width: 680px; margin: 0 auto; }
.skin-option { display: flex; flex-direction: column; align-items: center; gap: 6px; background: transparent; border: 0; cursor: pointer; padding: 0; }
.skin-swatch { width: 36px; height: 36px; border-radius: 999px; border: 2px solid rgba(255,255,255,0.14); transition: transform .12s, border-color .12s, box-shadow .12s; }
.skin-option.is-selected .skin-swatch { border-color: #ff5ca1; box-shadow: 0 0 0 3px rgba(255,92,161,0.22); transform: scale(1.06); }
.skin-option span { font-size: 11px; font-weight: 600; color: var(--ds-muted); }
.skin-option.is-selected span { color: #fff; }

h1.cc-title {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
h1.cc-title .brand-word {
  background: linear-gradient(120deg, #ff3e86 0%, #f02a53 55%, #ff5c35 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
p.cc-sub { margin: 8px auto 16px; font-size: 14px; line-height: 1.6; color: var(--ds-muted); max-width: 52ch; }

/* Option chip groups */
.cc-group { margin-top: 14px; }
.cc-group-title {
  margin: 0 0 12px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ds-muted);
}
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 680px; margin: 0 auto; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--ds-line);
  background: var(--ds-surface);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px; font-weight: 600;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .1s ease;
}
.chip:hover { border-color: rgba(255, 77, 109, 0.45); color: #fff; }
.chip:active { transform: scale(0.97); }
.chip.is-selected { background: var(--ds-gradient); border-color: transparent; color: #fff; }
.chip .swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4); flex-shrink: 0; }

/* Text inputs (stage 5) */
.cc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 260px)); gap: 14px; justify-content: center; }
.cc-field { text-align: left; }
.cc-field label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ds-muted); }
.cc-input {
  width: 100%; height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--ds-line);
  background: var(--ds-surface);
  color: var(--ds-text); font-family: inherit; font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
}
.cc-input:focus { border-color: rgba(255, 77, 109, 0.55); }

/* Stage nav buttons — unified height */
.cc-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.cc-back {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px;
  border: 1px solid var(--ds-line); border-radius: 999px;
  background: transparent;
  color: var(--ds-muted); font-size: 14px; font-weight: 700;
  transition: color .15s ease, border-color .15s ease, transform .1s ease;
}
.cc-back:hover { color: var(--ds-text); border-color: rgba(255, 255, 255, 0.22); }
.cc-back:active { transform: scale(0.97); }
.cc-continue {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 32px;
  border: 0; border-radius: 999px;
  background: var(--ds-gradient);
  color: #fff; font-size: 14px; font-weight: 800;
  transition: filter .15s ease, transform .15s ease;
}
.cc-continue:hover { filter: brightness(1.1); }
.cc-continue:active { transform: scale(0.98); }

@media (max-width: 767px) {
  .cc-step { width: auto; }
  .cc-step-label, .cc-bar + .cc-bar { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ds-main { padding: 24px 24px 56px; }
  .ds-topbar { padding: 12px 24px; }
  .ds-footer-inner { padding: 44px 24px 24px; }
  .ds-footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  :root { --ds-sidebar-w: 0px; }
  .ds-sidebar { display: none; }
  body.has-ds-sidebar { padding-left: 0; }
  .ds-main { padding: 18px 14px 90px; }
  .ds-topbar { padding: 12px 14px; }
  .ds-topbar-title { font-size: 15px; }
  .ds-footer-inner { padding: 36px 18px 20px; }
  .ds-footer-cols { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .ds-footer-brand { grid-column: 1 / -1; }
}
