/* Wizard screens: sign-in pages (au-), AI setup wizard (wz-), step-by-step setup (su-). Uses the shared tokens and components from ../styles.css. */

/* ---------- sign-in, sign-up, forgot, reset, invite, confirm ---------- */
.au-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 14px 16px 24px; gap: 14px; }
.au-top { width: 100%; max-width: 440px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.au-card { width: 100%; max-width: 440px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 18px; }
.au-card > * + * { margin-top: 14px; }
.au-card h1 { font-size: 24px; margin: 0; }
.au-card .sub { margin: 4px 0 0; }
.au-links { display: grid; gap: 0; justify-items: start; margin-top: 8px; }
.au-links .btn { padding-left: 0; padding-right: 8px; }
.au-wa { border-top: 1px solid var(--line); padding-top: 14px; }
.au-ok { display: grid; gap: 14px; }
.au-card .check .hint { font-size: inherit; color: inherit; display: inline; }
.au-card .check a { font-weight: 700; }
.au-wrap .btn.primary.big { width: 100%; }
@media (min-width: 900px) { .au-wrap { justify-content: center; padding: 32px 16px; } .au-card { padding: 28px; } }
.embed .au-wrap { min-height: 0; padding-top: 8px; }

/* ---------- AI setup wizard ---------- */
.wz { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--panel); color: var(--ink); }
.wz-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.wz-top { display: flex; align-items: center; gap: 10px; }
.wz-top .logo-tile { width: 28px; height: 28px; border-radius: 8px; }
.wz-top .logo-tile::after { left: 6px; right: 6px; bottom: 6px; height: 3px; }
.wz-top b { font-size: 15px; }
.wz-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wz-title h1 { margin: 0; font-size: 20px; font-weight: 800; outline: none; }
.wz-stepno { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.wz-prog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wz-prog span { height: 4px; border-radius: 2px; background: var(--line); }
.wz-prog span.done { background: var(--ok); }
.wz-prog span.now { background: var(--blue); }
.wz-intro { margin: 0; font-size: 14px; color: var(--ink-2); }
.wz-main { flex: 1 1 auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.wz-main.stack > * + * { margin-top: 0; }
.wz-center { align-items: center; justify-content: center; text-align: center; padding-top: 40px; padding-bottom: 40px; }
.wz-center p { margin: 0; max-width: 34ch; }
.wz-big { font-size: 17px; font-weight: 700; }
.wz-spin { width: 40px; height: 40px; border-width: 5px; }
.wz-foot { position: sticky; bottom: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: stretch; }
.wz-foot .btn { border-radius: var(--r); text-align: center; line-height: 1.2; }
.wz-foot .btn.big { min-height: 50px; font-size: 15px; }
.wz-foot .btn.grow { flex: 1 1 auto; font-weight: 800; }
.wz-foot .btn.primary { font-weight: 800; }
.wz-alt { display: flex; justify-content: center; }

.wz-row { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; }
.wz-row.off { background: var(--panel); }
.wz-row.wz-chan { grid-template-columns: minmax(0, 1fr) auto; }
.wz-tick { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.wz-tick input { width: 22px; height: 22px; }
.wz-txt { min-width: 0; }
.wz-name { font-weight: 700; }
.wz-sub { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.wz-editbtn { padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 700; }
.wz-flag { grid-column: 1 / -1; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.wz-sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); vertical-align: -1px; }
.wz-logo { display: inline-block; width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; border-radius: 4px; }
.wz-fb { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: grid; gap: 6px; }
.wz-fb p { margin: 0; }
.wz-fb .btn { background: var(--paper); color: var(--ink); }

.wz-sheet .wz-fs { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 12px; margin: 0; min-width: 0; display: grid; gap: 8px; }
.wz-sheet .wz-fs > legend { padding: 0 6px; }
.wz-sheet input[type='color'] { width: 100%; min-height: var(--tap); padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.wz-sheet input[type='time'], .wz-sheet select { width: 100%; min-height: var(--tap); }
.wz-pl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 8px; }

@media (min-width: 900px) {
  .wz { min-height: 0; margin: 32px auto; width: min(680px, calc(100% - 48px)); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  .wz-foot { position: static; padding-bottom: 14px; }
  .wz-title h1 { font-size: 22px; }
  .wz-main { padding: 18px 20px; }
  .wz-head { padding: 14px 20px 16px; }
  .wz-foot { padding-left: 20px; padding-right: 20px; }
}
.wz-embed { min-height: 0; }

/* ---------- step-by-step setup (the manual flow) ---------- */
.su-wrap { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; padding: 14px 14px 24px; }
.su-card { width: 100%; max-width: 760px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; align-self: flex-start; }
.su-card > * + * { margin-top: 14px; }
.su-card h1 { margin: 0; }
.su-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.su-nav .primary { min-width: 120px; }
.su-fill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.su-kv { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .su-kv { grid-template-columns: 1fr 1fr; } .su-card { padding: 24px; } }
.su-plat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); min-height: var(--tap); }
.su-plat.done { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-ink); }
.su-plat b { flex: 1 1 120px; }
.su-logo { max-height: 60px; max-width: 160px; }
.su-card input[type='color'] { width: 100%; min-height: var(--tap); padding: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.su-card input[type='file'] { width: 100%; min-height: var(--tap); padding: 9px 4px; }
.su-file { position: relative; }
@media (min-width: 900px) { .su-wrap { padding-top: 32px; } }
