/* =========================================================
   喜帖工坊 · 全流程视觉系统 atelier-flow
   气质：雾青纸笺 · 手机优先 · 一事一屏
   ========================================================= */

:root {
  --af-bg: #e7eef1;
  --af-surface: #f5f8fa;
  --af-card: #ffffff;
  --af-ink: #122028;
  --af-muted: #5c6973;
  --af-faint: #8b969f;
  --af-line: rgba(18, 32, 40, 0.1);
  --af-soft: #e3eaee;
  --af-soft-2: #d7e2e7;
  --af-primary: #215665;
  --af-primary-2: #2d6f80;
  --af-ok: #1d6a4a;
  --af-danger: #b42318;
  --af-warm: #9a734c;
  --af-r: 1.05rem;
  --af-r-sm: 0.75rem;
  --af-gutter: 1.05rem;
  --af-max: 540px;
  --af-top: 60px;
  --af-dock: 108px;
  --af-font: "Outfit", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --af-display: "Cormorant Garamond", "Songti SC", "Noto Serif SC", serif;
  --af-ease: cubic-bezier(0.22, 0.75, 0.28, 1);
  --af-shadow: 0 14px 36px rgba(18, 40, 48, 0.1);
  --af-shadow-sm: 0 6px 18px rgba(18, 40, 48, 0.07);

  /* bridge to legacy vars used across app.css */
  --bg: var(--af-bg);
  --surface: var(--af-surface);
  --card: var(--af-card);
  --ink: var(--af-ink);
  --muted: var(--af-muted);
  --faint: var(--af-faint);
  --line: var(--af-line);
  --soft: var(--af-soft);
  --soft-2: var(--af-soft-2);
  --primary: var(--af-primary);
  --primary-soft: var(--af-primary-2);
  --secondary: var(--af-primary);
  --accent: var(--af-primary);
  --ok: var(--af-ok);
  --danger: var(--af-danger);
  --r: var(--af-r);
  --gutter: var(--af-gutter);
  --max: var(--af-max);
  --top: var(--af-top);
  --dock: var(--af-dock);
  --font: var(--af-font);
  --display: var(--af-display);
  --ease: var(--af-ease);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--af-ink);
  font-family: var(--af-font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background:
    radial-gradient(120% 70% at 50% -10%, #d2e5eb 0%, transparent 55%),
    radial-gradient(90% 55% at 100% 100%, #e3ece8 0%, transparent 48%),
    var(--af-bg);
}

body.has-dock { padding-bottom: calc(var(--af-dock) + env(safe-area-inset-bottom, 0px)); }

.pt-safe { padding-top: env(safe-area-inset-top, 0); }
.pb-safe { padding-bottom: max(10px, env(safe-area-inset-bottom, 0)); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0; white-space: nowrap;
}

/* ---------- Topbar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: color-mix(in srgb, #f4f8f9 86%, transparent);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  border-bottom: 1px solid color-mix(in srgb, var(--af-line) 55%, transparent);
  box-shadow: none;
  transition: background .25s var(--af-ease), border-color .25s var(--af-ease);
}
.topbar-inner {
  max-width: var(--af-max);
  margin: 0 auto;
  min-height: var(--af-top);
  padding: 0 var(--af-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand-caps {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--af-primary);
}
.brand-name {
  font-family: var(--af-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--af-ink);
}
.text-btn {
  appearance: none;
  border: 0;
  background: var(--af-soft);
  color: var(--af-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
}
.text-btn:active { transform: scale(0.97); }
.top-right { display: flex; gap: 8px; align-items: center; }

body.on-gate .topbar {
  background: linear-gradient(180deg, rgba(12, 24, 30, 0.42), transparent);
  border-bottom-color: transparent;
}
body.on-gate .brand-caps,
body.on-gate .brand-name { color: #f7fafb; text-shadow: 0 1px 10px rgba(0,0,0,.28); }
body.on-gate .text-btn {
  background: rgba(255,255,255,.14);
  color: #f7fafb;
  border: 1px solid rgba(255,255,255,.22);
}

body.gate-claimed .topbar {
  background: color-mix(in srgb, #f4f8f9 90%, transparent);
  border-bottom-color: color-mix(in srgb, var(--af-line) 55%, transparent);
}
body.gate-claimed .brand-caps { color: var(--af-primary); text-shadow: none; }
body.gate-claimed .brand-name { color: var(--af-ink); text-shadow: none; }
body.gate-claimed .text-btn {
  background: var(--af-soft);
  color: var(--af-ink);
  border-color: transparent;
}

/* ---------- Shell ---------- */
.shell {
  max-width: var(--af-max);
  margin: 0 auto;
  padding: calc(var(--af-top) + env(safe-area-inset-top, 0px) + 12px) var(--af-gutter) 28px;
}
.page-atmos {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.22;
}
.page-atmos-img {
  width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(0.95);
}
body.on-gate .page-atmos { opacity: 0; }
body.step-clean .page-atmos { opacity: 0.08; }
.float-ornament { display: none !important; }

/* ---------- Draft ---------- */
.draft-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; padding: 10px 12px;
  border-radius: 14px; background: #fff; box-shadow: var(--af-shadow-sm);
  font-size: 13px; font-weight: 600;
}
.draft-banner[hidden] { display: none !important; }
.draft-banner button {
  border: 0; background: var(--af-soft); border-radius: 999px;
  padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer;
}

/* ---------- Gate ---------- */
.product-gate { padding: 0 0 20px; }
.gate-stage {
  position: relative;
  margin: 0 calc(-1 * var(--af-gutter));
  min-height: min(54dvh, 440px);
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}
.gate-hero {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%;
  animation: afHeroIn 1s var(--af-ease) both;
}
.gate-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,22,28,.3) 0%, rgba(10,22,28,.12) 42%, rgba(10,22,28,.58) 100%);
}
.gate-copy {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2; padding: 26px 22px 34px; color: #f8fbfc;
  animation: afFadeUp .65s .12s var(--af-ease) both;
}
.gate-kicker {
  margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .18em; opacity: .88;
}
.gate-copy h1 {
  margin: 0; font-family: var(--af-display);
  font-size: clamp(38px, 11vw, 50px); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.02;
}
.gate-lead {
  margin: 10px 0 0; font-size: 14px; font-weight: 500; opacity: .92;
}
.gate-seal {
  position: absolute; right: 16px; bottom: 70px; z-index: 3;
  width: 76px; height: 76px; object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.28));
  animation: afSeal 4.8s ease-in-out infinite;
}

.gate-claim {
  position: relative; z-index: 4; margin-top: -24px; padding: 0;
}
.gate-claim-form {
  background: color-mix(in srgb, #fff 94%, #e8f1f3);
  border-radius: 22px; padding: 18px 16px 16px;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--af-shadow);
  backdrop-filter: blur(14px);
}
.claim-seal-row { display: flex; justify-content: center; margin: -38px 0 6px; }
.claim-seal-row img {
  width: 58px; height: 58px; object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.16));
}
.gate-pick-head { text-align: center; margin-bottom: 12px; }
.gate-pick-head h2 {
  margin: 0; font-family: var(--af-display); font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
}
.gate-pick-head p {
  margin: 6px auto 0; max-width: 28em; font-size: 13px; color: var(--af-muted); line-height: 1.45;
}
.claim-card { background: transparent; box-shadow: none; padding: 0; }
.claim-row { display: flex; gap: 8px; }
.claim-row input {
  flex: 1; min-width: 0; min-height: 52px; border: 1px solid transparent;
  border-radius: 15px; background: #f0f5f7; padding: 0 14px; font: inherit; font-size: 16px;
}
.claim-row input:focus {
  outline: none; background: #fff;
  border-color: color-mix(in srgb, var(--af-primary) 35%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-primary) 14%, transparent);
}
.claim-row .btn-dark,
.btn-dark {
  min-height: 52px; padding: 0 18px; border: 0; border-radius: 15px;
  background: linear-gradient(180deg, var(--af-primary-2), var(--af-primary));
  color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  box-shadow: 0 10px 20px rgba(33, 86, 101, 0.28); cursor: pointer;
}
.claim-row .btn-dark:active,
.btn-dark:active { transform: scale(0.98); }
.claim-row .btn-dark:disabled { opacity: .45; }
.claim-card .msg {
  margin: 10px 0 0; font-size: 13px; font-weight: 650; color: var(--af-danger);
}
.claim-card .msg.ok { color: var(--af-ok); }
.claim-card .msg[hidden] { display: none !important; }
.claim-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.claim-item {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--af-line);
  background: var(--af-soft); font: inherit; cursor: pointer;
}
.claim-item:active { background: var(--af-soft-2); }
.claim-item.is-blocked { opacity: .72; cursor: default; border-style: dashed; }
.claim-item-title { font-size: 14px; font-weight: 700; }
.claim-item-meta { font-size: 12px; color: var(--af-muted); line-height: 1.35; }
.claim-item-block { margin-top: 4px; font-size: 12px; font-weight: 650; color: var(--af-danger); }

.gate-claimed-strip {
  display: flex; align-items: center; gap: 12px;
  margin: 6px 0 14px; padding: 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--af-ok) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--af-ok) 18%, transparent);
}
.gate-claimed-strip[hidden] { display: none !important; }
.claimed-seal { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.gate-claimed-copy { flex: 1; min-width: 0; }
.gate-claimed-strip .claim-ok-title {
  margin: 0; font-size: 12px; font-weight: 700; color: var(--af-ok);
}
.gate-claimed-strip .claim-ok-meta {
  margin: 2px 0 0; font-size: 13px; color: var(--af-ink); line-height: 1.35; word-break: break-word;
}
.gate-claimed-strip .linkish,
.linkish {
  flex: 0 0 auto; border: 0; background: none; padding: 0; font: inherit;
  font-size: 12px; font-weight: 650; color: var(--af-muted);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}

.gate-pick-wrap { padding: 2px 0 8px; }
.product-list { display: flex; flex-direction: column; gap: 12px; }
.product-card.has-visual {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 12px; align-items: center;
  width: 100%; padding: 12px; border: 0; border-radius: 18px; background: #fff;
  box-shadow: var(--af-shadow-sm); text-align: left; font: inherit; cursor: pointer;
  transition: transform .18s var(--af-ease), box-shadow .18s var(--af-ease);
}
.product-card.has-visual:active { transform: scale(0.985); box-shadow: var(--af-shadow); }
.product-visual {
  width: 100px; height: 122px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 8px 18px rgba(20, 40, 48, 0.12);
}
.product-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-title {
  display: block; font-family: var(--af-display); font-size: 23px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--af-ink);
}
.product-sub { display: block; margin-top: 4px; font-size: 13px; color: var(--af-muted); }
.product-meta {
  display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; color: var(--af-primary);
  background: color-mix(in srgb, var(--af-primary) 10%, transparent);
  padding: 4px 9px; border-radius: 999px;
}
.product-go { color: var(--af-primary); font-size: 22px; }

body.gate-claimed .gate-stage,
body.gate-claimed .gate-claim-form,
body.gate-claimed .page-atmos { display: none !important; }
body.gate-claimed .product-gate { padding-top: 8px; }

.sheet-rise { animation: afSheet .55s var(--af-ease) both; }

/* ---------- Form progress ---------- */
.form-progress {
  margin: 0 0 16px; padding: 14px 14px 12px; border-radius: 18px;
  background: color-mix(in srgb, #fff 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--af-line) 70%, transparent);
  box-shadow: var(--af-shadow-sm);
}
.form-progress-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px;
}
.form-progress-step {
  font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--af-primary);
}
.form-progress-hint {
  font-family: var(--af-display); font-size: 18px; font-weight: 600; color: var(--af-ink);
}
.form-progress-track {
  height: 5px; border-radius: 999px; background: var(--af-soft); overflow: hidden;
}
.form-progress-fill {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--af-primary), var(--af-primary-2));
  transition: width .35s var(--af-ease);
}
.form-progress-dots { display: flex; gap: 6px; margin-top: 10px; }
.form-progress-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--af-soft-2);
  transition: background .2s, transform .2s;
}
.form-progress-dots span.on { background: color-mix(in srgb, var(--af-primary) 55%, var(--af-soft-2)); }
.form-progress-dots span.current {
  background: var(--af-primary); transform: scale(1.25);
}

/* ---------- Panes ---------- */
.pane { margin: 0; padding: 0; border: 0; min-width: 0; animation: afFadeUp .4s var(--af-ease) both; }
.pane[hidden] { display: none !important; }
.pane-intro { margin: 0 0 16px; padding: 0 2px; }
.pane-intro .eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
  color: var(--af-primary);
}
.pane-intro h1 {
  margin: 8px 0 0; font-family: var(--af-display); font-size: clamp(28px, 7.5vw, 34px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; color: var(--af-ink);
}
.pane-intro p {
  margin: 8px 0 0; font-size: 14px; color: var(--af-muted); line-height: 1.5;
}
.pane-ornament {
  width: 42px; height: 42px; object-fit: contain; margin-bottom: 4px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.1));
}

/* ---------- Occasion chips ---------- */
.choice-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 14px;
}
.choice { position: relative; cursor: pointer; user-select: none; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.choice-face {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 78px; padding: 10px 4px; border-radius: 16px;
  background: #fff; border: 1px solid transparent; box-shadow: var(--af-shadow-sm);
  transition: transform .15s var(--af-ease), box-shadow .15s, border-color .15s, background .15s;
}
.choice:active .choice-face { transform: scale(0.97); }
.choice-ico {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  background: var(--af-soft); color: var(--af-primary); font-size: 18px;
}
.choice-title { font-size: 12px; font-weight: 700; color: var(--af-ink); }
.choice:has(input:checked) .choice-face {
  border-color: color-mix(in srgb, var(--af-primary) 35%, transparent);
  background: color-mix(in srgb, var(--af-primary) 7%, #fff);
  box-shadow: 0 10px 22px rgba(33, 86, 101, 0.12);
}
.choice:has(input:checked) .choice-ico {
  background: var(--af-primary); color: #fff;
}

.custom-occasion {
  margin: 0 0 14px; padding: 14px; border-radius: 16px; background: #fff; box-shadow: var(--af-shadow-sm);
}
.custom-occasion label {
  display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--af-muted);
}

/* ---------- Info blocks ---------- */
.info-stack { display: flex; flex-direction: column; gap: 12px; }
.info-block {
  padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--af-shadow-sm);
}
.info-block-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px;
}
.info-block-head h3 {
  margin: 0; font-family: var(--af-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
}
.opt-tag, .weekday-badge {
  font-size: 11px; font-weight: 700; color: var(--af-primary);
  background: color-mix(in srgb, var(--af-primary) 10%, transparent);
  padding: 4px 8px; border-radius: 999px;
}
.info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.info-after-occasion { margin-top: 18px !important; }

.field { margin: 0 0 10px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block; margin: 0 0 7px; font-size: 12px; font-weight: 700; color: var(--af-muted);
}
.field em { color: var(--af-danger); font-style: normal; }
.opt {
  display: inline-block; margin-left: 4px; font-size: 10px; font-weight: 700;
  color: var(--af-faint); letter-spacing: .04em;
}
.field input,
.field textarea,
.field select,
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid transparent;
  border-radius: 14px; background: var(--af-soft); font: inherit; font-size: 16px; color: var(--af-ink);
  appearance: none; -webkit-appearance: none; transition: background .15s, box-shadow .15s, border-color .15s;
}
textarea { min-height: 96px; resize: none; line-height: 1.5; }
input:focus, textarea:focus {
  outline: none; background: #fff;
  border-color: color-mix(in srgb, var(--af-primary) 32%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--af-primary) 12%, transparent);
}
.field.invalid input,
.field.invalid textarea {
  background: color-mix(in srgb, var(--af-danger) 8%, #fff);
  border-color: color-mix(in srgb, var(--af-danger) 35%, transparent);
}
.field-error {
  margin: 6px 0 0; font-size: 12px; font-weight: 700; color: var(--af-danger);
}
.field-error[hidden] { display: none !important; }
.field-hint {
  margin: 6px 0 0; font-size: 11px; font-weight: 600; color: var(--af-faint);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiet-note {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 0;
  font-size: 12px; font-weight: 600; color: var(--af-muted);
}
.quiet-note .material-symbols-outlined { color: var(--af-ok); font-size: 18px; }

.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Photo upload ---------- */
.photo-hero,
.upload-zone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 180px; padding: 28px 18px; margin-bottom: 14px; text-align: center; cursor: pointer;
  border-radius: 20px; overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 78%, transparent), color-mix(in srgb, #fff 92%, transparent)),
    url("./assets/decor/texture-paper.jpg?v=ui2") center/cover;
  border: 1.5px dashed color-mix(in srgb, var(--af-primary) 28%, transparent);
  box-shadow: var(--af-shadow-sm);
  transition: transform .15s var(--af-ease), border-color .15s, box-shadow .15s;
}
.photo-hero:active,
.upload-zone:active { transform: scale(0.985); }
.photo-hero-ico,
.upload-zone .material-symbols-outlined {
  width: 54px; height: 54px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--af-primary) 12%, #fff); color: var(--af-primary); font-size: 26px;
}
.photo-hero strong,
.upload-zone strong { font-size: 16px; font-weight: 700; }
.photo-hero-count {
  display: inline-block; margin-top: 2px; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--af-primary) 10%, transparent);
  color: var(--af-primary); font-size: 12px; font-weight: 750;
}
.photo-hero em,
.upload-zone em {
  font-style: normal; font-size: 12px; color: var(--af-muted); max-width: 24em; line-height: 1.4;
}
.photo-hero input[type="file"],
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.upload-zone.compact {
  min-height: 0; flex-direction: row; justify-content: flex-start; gap: 12px;
  padding: 14px; text-align: left; margin-bottom: 8px;
}
.upload-zone.compact .material-symbols-outlined { width: 44px; height: 44px; font-size: 22px; flex: 0 0 auto; }

.gallery-block {
  margin: 0 0 12px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: var(--af-shadow-sm);
}
.gallery-head {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px;
  font-size: 12px; font-weight: 700; color: var(--af-muted);
}
.gallery-hint { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--af-faint); }
.thumbs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.link-skip {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
  border: 0; background: none; padding: 8px 0; font: inherit; font-size: 13px;
  font-weight: 700; color: var(--af-primary); cursor: pointer;
}

/* ---------- Summary / more ---------- */
.summary {
  margin: 0 0 14px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--af-shadow-sm);
}
.summary h3 {
  display: flex; align-items: center; gap: 6px; margin: 0 0 10px;
  font-family: var(--af-display); font-size: 20px; font-weight: 600;
}
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.more {
  margin-top: 8px; border-radius: 16px; background: #fff; box-shadow: var(--af-shadow-sm); overflow: hidden;
}
.more > summary {
  list-style: none; display: flex; align-items: center; gap: 8px;
  padding: 14px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--af-ink);
}
.more > summary::-webkit-details-marker { display: none; }
.more-body { padding: 0 14px 14px; }

.form-msg {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--af-danger) 8%, #fff);
  color: var(--af-danger); font-size: 13px; font-weight: 700;
}
.form-msg[hidden] { display: none !important; }
.form-msg a { color: inherit; }

/* ---------- Dock / buttons ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: color-mix(in srgb, #f4f8f9 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  border-top: 1px solid color-mix(in srgb, var(--af-line) 70%, transparent);
  box-shadow: 0 -10px 30px rgba(18, 40, 48, 0.06);
}
.dock[hidden] { display: none !important; }
.dock-inner {
  max-width: var(--af-max); margin: 0 auto;
  padding: 12px var(--af-gutter) 4px;
  display: flex; gap: 10px; align-items: stretch;
}
.btn-prev,
.btn-next,
.btn-submit,
.sheet-ok,
.btn-success-primary,
.btn-success-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; border-radius: 16px; font: inherit; font-size: 15px; font-weight: 750;
  cursor: pointer; transition: transform .15s var(--af-ease), filter .15s, opacity .15s;
  text-decoration: none;
}
.btn-prev:active,
.btn-next:active,
.btn-submit:active,
.sheet-ok:active,
.btn-success-primary:active,
.btn-success-ghost:active { transform: scale(0.98); }
.btn-prev {
  width: 52px; flex: 0 0 52px; border: 1px solid var(--af-line); background: #fff; color: var(--af-ink);
}
.btn-prev[hidden] { display: none !important; }
.btn-next,
.btn-submit,
.sheet-ok,
.btn-success-primary {
  flex: 1; border: 0; color: #fff;
  background: linear-gradient(180deg, var(--af-primary-2), var(--af-primary));
  box-shadow: 0 12px 24px rgba(33, 86, 101, 0.28);
}
.btn-next[hidden],
.btn-submit[hidden] { display: none !important; }
.btn-next:disabled,
.btn-submit:disabled { opacity: .45; box-shadow: none; }
.dock-note {
  max-width: var(--af-max); margin: 0 auto; padding: 0 var(--af-gutter) 10px;
  text-align: center; font-size: 11px; font-weight: 600; color: var(--af-faint);
}

/* ---------- Success ---------- */
.success {
  position: relative; padding: 8px 0 24px;
  animation: afFadeUp .5s var(--af-ease) both;
}
.success::before {
  content: ""; position: absolute; inset: -20px -16px auto; height: 220px; z-index: -1;
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(180deg, color-mix(in srgb, #fff 55%, transparent), var(--af-bg)),
    url("./assets/decor/success-mist.jpg?v=ui2") center/cover;
  opacity: .9;
}
.success-ornament {
  display: block; width: 72px; height: 72px; margin: 8px auto 10px; object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.14));
  animation: afSeal 5s ease-in-out infinite;
}
.success-hero { text-align: center; padding: 4px 0 18px; }
.success-mark { display: none; }
.success-pill {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--af-ok) 12%, #fff);
  color: var(--af-ok); font-size: 12px; font-weight: 750;
}
.success-pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--af-ok);
  animation: pulse 1.6s ease infinite;
}
.success-hero h2 {
  margin: 12px 0 0; font-family: var(--af-display); font-size: clamp(30px, 8vw, 38px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
}
.success-hero h2 em { font-style: italic; color: var(--af-primary); }
.success-lead {
  margin: 10px auto 0; max-width: 28em; font-size: 14px; color: var(--af-muted); line-height: 1.5;
}
.proof-card,
.voucher,
.journey {
  margin-top: 12px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--af-shadow-sm);
}
.voucher-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.voucher-label { display: block; font-size: 11px; font-weight: 700; color: var(--af-muted); margin-bottom: 4px; }
.voucher-code {
  font-family: var(--af-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; word-break: break-all;
}
.voucher-copy {
  flex: 0 0 auto; border: 0; min-height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--af-soft); color: var(--af-ink); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer;
}
.voucher-hint {
  display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0;
  font-size: 12px; color: var(--af-muted); line-height: 1.4;
}
.journey-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.journey-head h3 { margin: 0; font-family: var(--af-display); font-size: 20px; font-weight: 600; }
.journey-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.journey-list li {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
}
.journey-list .j-ico {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center;
  background: var(--af-soft); color: var(--af-muted); font-size: 16px;
}
.journey-list li.done .j-ico { background: color-mix(in srgb, var(--af-ok) 14%, #fff); color: var(--af-ok); }
.journey-list li.now .j-ico { background: color-mix(in srgb, var(--af-primary) 14%, #fff); color: var(--af-primary); }
.journey-list strong { display: block; font-size: 14px; }
.journey-list span { font-size: 12px; color: var(--af-muted); }

.success-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.success-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-success-ghost {
  border: 1px solid var(--af-line); background: #fff; color: var(--af-ink);
}

/* ---------- Help sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet[hidden] { display: none !important; }
.sheet-mask { position: absolute; inset: 0; background: rgba(12, 24, 30, 0.45); backdrop-filter: blur(4px); }
.sheet-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: var(--af-max); margin: 0 auto;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0; background: #fff;
  box-shadow: 0 -16px 40px rgba(0,0,0,.16);
  animation: afSheet .4s var(--af-ease) both;
}
.sheet-card h3 {
  margin: 0 0 12px; font-family: var(--af-display); font-size: 26px; font-weight: 600;
}
.sheet-card ul {
  margin: 0 0 14px; padding-left: 1.1em; color: var(--af-muted); line-height: 1.55; font-size: 14px;
}
.help-xianyu {
  margin: 0 0 14px; padding: 12px; border-radius: 14px; background: var(--af-soft);
}
.help-xianyu strong { display: block; margin-bottom: 4px; font-size: 13px; }
.help-xianyu p { margin: 0; font-size: 13px; color: var(--af-muted); line-height: 1.45; }
.sheet-ok { width: 100%; }

.copy-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  background: rgba(18, 32, 40, 0.92); color: #fff; font-size: 13px; font-weight: 650;
  box-shadow: var(--af-shadow);
}
.copy-toast[hidden] { display: none !important; }

/* ---------- Motion ---------- */
@keyframes afHeroIn {
  from { transform: scale(1.08); opacity: .65; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes afFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes afSheet {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes afSeal {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@media (max-width: 380px) {
  .choice-list { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .choice-face { min-height: 72px; }
  .product-card.has-visual { grid-template-columns: 84px 1fr auto; }
  .product-visual { width: 84px; height: 104px; }
  .info-grid,
  .field-row { grid-template-columns: 1fr; }
}

@media (min-width: 540px) {
  .gate-stage { margin: 0; border-radius: 28px; }
}
