:root {
  --bg: #ffffff; --tint: #f5f5f7; --ink: #1d1d1f; --ink-2: #424245; --muted: #6e6e73; --line: #e3e3e8;
  --accent: #0071e3; --accent-2: #2997ff; --accent-soft: #e8f2fd; --ok: #1fa971;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.wordmark { font-weight: 700; font-size: 21px; letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.close { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); background: var(--tint); }
.progress { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 5; height: 3px; background: var(--tint); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 0 3px 3px 0; transition: width .5s var(--ease); }

.stage { position: relative; max-width: 620px; margin: 0 auto; padding: 34px 20px calc(110px + env(safe-area-inset-bottom)); min-height: calc(100dvh - 60px); }
.step { display: none; }
.step.active { display: block; animation: in .45s var(--ease) both; }
.step.active.back-anim { animation-name: in-back; }
@keyframes in { from { opacity: 0; transform: translateX(28px); } }
@keyframes in-back { from { opacity: 0; transform: translateX(-28px); } }

h1 { margin: 0; font-size: clamp(30px, 7vw, 44px); line-height: 1.08; letter-spacing: -0.035em; }
h2 { margin: 0; font-size: clamp(26px, 6vw, 34px); line-height: 1.12; letter-spacing: -0.03em; }
.lead { margin: 16px 0 0; font-size: 19px; color: var(--ink-2); }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.fine { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.hero-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 26px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-2) 60%, #64d2ff); color: #fff; box-shadow: 0 12px 30px rgba(0,113,227,.28); animation: float 3s ease-in-out infinite; }
.hero-icon svg { width: 30px; height: 30px; }
@keyframes float { 50% { transform: translateY(-5px); } }
.perks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.perks svg { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); stroke-width: 2.4; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; margin-top: 30px; padding: 0 24px; border: 0; border-radius: 16px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s; box-shadow: 0 8px 22px rgba(0,113,227,.22); }
.btn:hover { background: #0077ed; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: default; }

.options { display: grid; gap: 10px; margin-top: 24px; }
.options button { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 14px 18px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--bg);
  text-align: left; font-size: 17px; font-weight: 500; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; animation: pop .4s var(--ease) both; }
.options button:nth-child(2) { animation-delay: .03s; } .options button:nth-child(3) { animation-delay: .06s; } .options button:nth-child(4) { animation-delay: .09s; }
.options button:nth-child(5) { animation-delay: .12s; } .options button:nth-child(6) { animation-delay: .15s; } .options button:nth-child(7) { animation-delay: .18s; }
.options button:nth-child(8) { animation-delay: .21s; } .options button:nth-child(9) { animation-delay: .24s; } .options button:nth-child(10) { animation-delay: .27s; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.options button:hover { border-color: #c7c7cc; }
.options button:active { transform: scale(.98); }
.options button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.options button svg { color: var(--accent); }
.options.grid { grid-template-columns: 1fr 1fr; }
.options.grid button { flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 96px; font-size: 15px; }
.options.grid button svg { width: 26px; height: 26px; }
.options.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.options.chips button { min-height: 46px; padding: 10px 16px; border-radius: 999px; font-size: 15.5px; }
.options.chips button[aria-pressed="true"]::before { content: ""; width: 16px; height: 16px; margin-left: -4px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }

.meter { margin-top: 28px; padding: 28px 22px; border-radius: 22px; background: var(--tint); text-align: center; }
.meter .big { display: block; font-size: 72px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.meter .unit { display: block; margin-top: 6px; color: var(--muted); }
.meter input { width: 100%; margin: 26px 0 18px; accent-color: var(--accent); height: 28px; }
.cost { font-size: 17px; color: var(--ink-2); }
.cost b { color: var(--ink); font-variant-numeric: tabular-nums; }

textarea, .field input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 16px; outline: 0; transition: border-color .2s, box-shadow .2s; }
textarea { margin-top: 22px; resize: vertical; min-height: 130px; }
textarea:focus, .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,.12); }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field span { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .field { margin-top: 16px; }
.consent { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.consent a { color: var(--accent); }
.error { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #fdecea; color: #b42318; font-size: 15px; }

.days { display: flex; gap: 8px; margin: 24px -20px 0; padding: 4px 20px 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.days button { flex: none; display: grid; justify-items: center; gap: 2px; width: 64px; padding: 12px 0; border: 1.5px solid var(--line); border-radius: 16px; background: var(--bg); cursor: pointer; scroll-snap-align: start; transition: border-color .2s, background .2s; }
.days button small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.days button strong { font-size: 22px; letter-spacing: -0.02em; }
.days button[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.days button[aria-selected="true"] small { color: rgba(255,255,255,.85); }
.days button:disabled { opacity: .35; cursor: default; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.slots button { min-height: 50px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); font-weight: 600; font-size: 16px; cursor: pointer; animation: pop .35s var(--ease) both; transition: border-color .2s, background .2s; }
.slots button:hover { border-color: var(--accent); color: var(--accent); }
.empty { margin-top: 18px; color: var(--muted); }

.check { width: 84px; height: 84px; margin-bottom: 24px; }
.check svg { width: 84px; height: 84px; stroke: var(--ok); stroke-width: 3; }
.check circle { stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .7s var(--ease) forwards; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s var(--ease) .55s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; padding: 10px 20px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.back { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 18px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); color: var(--ink-2); font-weight: 500; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.back svg { width: 18px; height: 18px; }

@media (min-width: 720px) {
  .stage { padding-top: 64px; }
  .options.grid { grid-template-columns: repeat(3, 1fr); }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .btn { width: auto; min-width: 220px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
h1:focus, h2:focus { outline: none; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; }
.wordmark img { width: 28px; height: 28px; flex: none; }
