/* Step wizard (DESIGN.md Overlays › Step wizard): built from the demo's stepper, dialog chrome and panel hairlines; the demo has
   no wizard of its own, so the values below reuse its tokens (xl radius, floating shadow, dialog scrim, 13px body, 32.5px controls). */
.wizard { display: flex; flex-direction: column; min-height: 0; }
.wizard-head { display: grid; gap: 12px; padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.wizard-head h2 { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; }
.wizard-head h2 .tile { width: 29px; height: 29px; }
.wizard-lead { color: var(--ink-2); font-size: 13px; line-height: 1.5; max-width: 68ch; }
.wizard-head .wizard-lead { margin-top: -6px; }
.wizard-body { display: grid; align-content: start; gap: 13px; min-height: 0; padding: 16px 20px; overflow: auto; }
.wizard-step-head { display: grid; gap: 3px; }
.wizard-count { font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.wizard-step-title { font-size: 14.5px; font-weight: 700; outline: none; }
.wizard-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.wizard-foot-start { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.wizard-foot .btn .icon { margin: 0 -2px; }
.wizard-summary { display: grid; list-style: none; margin: 0; padding: 0; }
.wizard-summary li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wizard-summary li:last-child { border-bottom: 0; }
.wizard-summary li > strong { font-size: 13px; align-self: center; min-height: 27px; display: flex; align-items: center; }
.wizard-summary .val { grid-column: 1; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.wizard-summary li > .btn { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.panel.wizard { overflow: hidden; }
.stepper .step-pick { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.stepper .step-pick:hover { color: var(--ink); }
.stepper .step-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wizard-backdrop { position: fixed; z-index: 90; }
.wizard-layer { display: flex; flex-direction: column; width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: hidden; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); animation: pop 0.22s var(--ease-out); }
.wizard-layer .wizard { flex: 1; }
@media (max-width: 560px) {
  .wizard-head, .wizard-body { padding-left: 16px; padding-right: 16px; }
  .wizard-foot { padding: 10px 16px 14px; justify-content: flex-end; }
  .wizard-foot-start { width: 100%; margin-right: 0; }
  .wizard-foot-start:empty { display: none; }
  .wizard .stepper li:not(.cur) { font-size: 0; gap: 0; }
  .wizard .stepper li:not(.cur) + li::before, .wizard .stepper li + li:not(.cur)::before { width: 14px; }
}
@media (prefers-reduced-motion: reduce) { .wizard-layer { animation: none; } }
