.onboarding-shell { width: min(820px, calc(100% - 32px)); padding: 36px 0 90px; }
.progress-rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 0 0 22px; padding: 0; list-style: none; }
.progress-rail li { position: relative; display: grid; justify-items: center; gap: 6px; color: #8f8392; font-size: 12px; }
.progress-rail li::before { position: absolute; z-index: -1; top: 16px; right: 50%; left: -50%; height: 2px; background: var(--line); content: ""; }
.progress-rail li:first-child::before { display: none; }
.progress-rail span { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--line); border-radius: 50%; background: #17121b; font-weight: 850; }
.progress-rail li.done, .progress-rail li.active { color: var(--ink); }
.progress-rail li.done span { border-color: var(--ok); background: #8ed7b422; color: var(--ok); }
.progress-rail li.active span { border-color: var(--gold); background: #f2ca7c1b; color: var(--gold); }
.progress-rail li.done::before, .progress-rail li.active::before { background: var(--ok); }
.stage { min-height: 440px; animation: stage-in 180ms ease both; }
@keyframes stage-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.consent-list { display: grid; gap: 10px; margin-top: 26px; }
.consent-list > label { position: relative; cursor: pointer; }
.consent-list > label:not(.policy-confirm) input { position: absolute; opacity: 0; }
.consent-list > label:not(.policy-confirm) > span { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 13px; min-height: 66px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 18px; background: #ffffff07; transition: border-color 160ms, background 160ms; }
.consent-list i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: #ffffff0a; color: var(--gold); font-style: normal; font-size: 13px; }
.consent-list > label:not(.policy-confirm) input:checked + span { border-color: var(--peach); background: #e8a77f15; }
.consent-list > label:not(.policy-confirm) input:checked + span i { background: var(--peach); color: #251823; }
.consent-list input:focus-visible + span { outline: 3px solid #f5d196; outline-offset: 3px; }
.policy-confirm { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; margin: 8px 0; color: var(--muted); font-size: 14px; }
.policy-confirm input { width: 20px; height: 20px; accent-color: var(--peach); }
.policy-confirm a { color: var(--gold); }

.language-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 16px; padding: 0; border: 0; }
.language-choice legend { width: 100%; margin-bottom: 3px; font-weight: 850; }
.language-choice label { position: relative; cursor: pointer; }
.language-choice input { position: absolute; inset: 0; opacity: 0; }
.language-choice span { display: block; min-width: 112px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: #ffffff07; color: var(--muted); text-align: center; font-weight: 750; }
.language-choice input:checked + span { border-color: var(--peach); background: #e8a77f1f; color: var(--ink); box-shadow: inset 0 0 0 1px #e8a77f55; }
.language-choice input:focus-visible + span { outline: 3px solid #f5d196; outline-offset: 3px; }
.prompt-card { max-height: 210px; padding: 20px; overflow-y: auto; border: 1px solid #ffffff12; border-radius: 18px; background: #ffffff07; }
.prompt-card p { margin: 0; font-size: 17px; line-height: 1.75; }
.voice-capture { margin-top: 16px; padding: 13px; border: 1px solid #ffffff12; border-radius: 18px; background: #ffffff06; }
.voice-capture-head { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
#voice-waveform { display: block; width: 100%; height: 76px; border-radius: 12px; background: linear-gradient(180deg, #120e17aa, #211829aa); }
.record-actions { display: flex; gap: 10px; margin-top: 16px; }
.recording-playback { width: 100%; margin-top: 14px; }
#record-continue { width: 100%; margin-top: 14px; }

.preview-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; padding: 0; border: 0; }
.preview-choices label { position: relative; display: grid; grid-template-rows: 115px auto auto; min-width: 0; padding: 10px 10px 16px; border: 1px solid var(--line); border-radius: 20px; background: #ffffff06; cursor: pointer; }
.preview-choices input { position: absolute; inset: 0; opacity: 0; }
.preview-choices label:has(input:checked) { border-color: var(--peach); background: #e8a77f14; box-shadow: inset 0 0 0 1px #e8a77f55; }
.preview-choices label:has(input:focus-visible) { outline: 3px solid #f5d196; outline-offset: 3px; }
.mini-cover { display: grid; place-items: center; width: 100%; height: 105px; border-radius: 14px; font-size: 42px; }
.preview-choices b { margin: 12px 4px 3px; line-height: 1.2; }
.preview-choices small { margin-inline: 4px; color: var(--muted); }
#create-preview { width: 100%; }
#back-to-recording { display: block; margin: 8px auto 0; }

.status-stage, .ready-stage { display: grid; justify-items: center; align-content: center; text-align: center; }
.status-stage p { margin: 6px 0; color: var(--muted); }
.status-orbit { display: grid; place-items: center; width: 86px; height: 86px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 50%; }
.status-orbit span { width: 52px; height: 52px; border: 5px solid #ffffff12; border-top-color: var(--peach); border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 18px; border-radius: 50%; background: #8ed7b424; color: var(--ok); font-size: 38px; }
.ready-cover { display: grid; place-items: center; width: 128px; height: 96px; margin: 16px 0 12px; border-radius: 22px; color: #fff8ed; font-family: Georgia, serif; font-size: 44px; box-shadow: 0 18px 42px #0000002c; }
.ready-stage audio { width: min(540px, 100%); margin: 18px 0; }

@media (max-width: 600px) {
  .onboarding-shell { width: min(100% - 22px, 540px); padding-top: 18px; }
  .progress-rail b { display: none; }
  .stage { min-height: 0; padding: 22px; }
  .preview-choices { grid-template-columns: 1fr; }
  .preview-choices label { grid-template-columns: 76px 1fr; grid-template-rows: auto auto; align-items: center; }
  .mini-cover { grid-row: 1 / 3; width: 66px; height: 66px; font-size: 28px; }
  .preview-choices b, .preview-choices small { margin-inline: 0; }
  .record-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .stage, .status-orbit span { animation: none; }
}
