/* Alice brand (skill alice-brand): Noto Sans, Royal Blue primary, Navy text,
   Yellow as a rare accent. Delicate: thin lines, regular weights, small icons. */
:root {
  --blue: #2734EE;
  --blue-press: #1E29C9;
  --navy: #00032A;
  --yellow: #FDDC4B;
  --soft: #EEF0FF;
  --ground: #FFFFFF;
  --gray-bg: #F4F4F7;
  --line: #E3E4EC;
  --muted: #6A6D85;
  --error: #E5484D;
  --radius: 14px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ground);
  color: var(--navy);
  font-family: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#app { min-height: 100dvh; }

.mock-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10; pointer-events: none; opacity: .92;
  background: var(--yellow); color: var(--navy);
  font-size: 12px; text-align: center; padding: 4px 8px;
}

.wordmark {
  font-family: 'Lily Script One', cursive;
  color: var(--blue);
  font-size: 40px;
  line-height: 1;
}
.wordmark.small { font-size: 24px; }

/* ---------- page frame ---------- */
.page {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) calc(16px + env(safe-area-inset-bottom));
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding-top: env(safe-area-inset-top);
}
.back, .back-spacer { width: 36px; height: 36px; }
.back {
  border: 0; background: none; cursor: pointer; border-radius: 50%;
  font-size: 30px; line-height: 30px; color: var(--navy); padding: 0 0 4px;
}
.back:hover { background: var(--gray-bg); }
.progress { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.progress span { display: block; height: 100%; background: var(--blue); transition: width .3s ease; }

.content { flex: 1; padding-top: 20px; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.fine { color: var(--muted); font-size: 12px; text-align: center; margin: 12px 0 0; }
.note { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.note.center { text-align: center; }
.muted { color: var(--muted); }
.q { font-size: 14px; color: var(--muted); margin: 20px 0 8px; }
.foot { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; }
.stack { display: flex; flex-direction: column; gap: 6px; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  width: 100%; min-height: 52px; border-radius: 26px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 16px; padding: 0 20px;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
}
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-press); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--blue-press); }
.btn.secondary { background: var(--soft); color: var(--blue); box-shadow: 0 3px 0 #D6DAFB; }
.btn.secondary:active { transform: translateY(2px); box-shadow: 0 1px 0 #D6DAFB; }
.btn.quiet { background: none; color: var(--muted); font-weight: 400; min-height: 40px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.busy .label { visibility: hidden; }
.btn.busy::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
.link { border: 0; background: none; padding: 0; color: var(--blue); cursor: pointer; font-size: inherit; }
.link.center-block { display: block; margin: 4px auto 0; font-size: 14px; color: var(--muted); }

/* ---------- fields ---------- */
.fields { display: flex; flex-direction: column; gap: 14px; }
.field { display: block; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field-box {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 0 14px; min-height: 50px; transition: border-color .15s ease;
}
.field-box:focus-within { border-color: var(--blue); }
.field-box input, .field-box select, .field-box textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--navy);
  padding: 13px 0; font-size: 16px;
}
.field-box select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236A6D85' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right center;
  padding-right: 20px; }
.field-box textarea { resize: none; min-height: 100px; line-height: 1.45; }
.prefix { color: var(--navy); font-size: 15px; white-space: nowrap; padding-right: 8px; border-right: 1px solid var(--line); }
.eye { border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px 0 6px 6px; }
.hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; font-weight: 300; }
.count { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.count.right { text-align: right; }
.dob { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px; }
.dob input {
  border: 1px solid var(--line); border-radius: var(--radius); min-height: 50px; text-align: center;
  font: inherit; font-size: 16px; color: var(--navy); outline: 0; width: 100%;
}
.dob input:focus { border-color: var(--blue); }

.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: 12px; line-height: 1.6; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); cursor: pointer; }

.error { color: var(--error); font-size: 13px; margin: 8px 0 0; min-height: 0; }
.error:empty { margin: 0; }
.notice { background: var(--soft); color: var(--navy); border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin: 0 0 14px; }

/* ---------- code ---------- */
.otp {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); outline: 0;
  font: inherit; font-size: 28px; letter-spacing: 0.6em; text-align: center; padding: 12px 0 12px 0.6em; color: var(--navy);
}
.otp:focus { border-color: var(--blue); }
.resend { margin-top: 18px; font-size: 14px; }

/* ---------- choices + chips ---------- */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choices.two { flex-direction: row; }
.choices.two .choice { flex: 1; }
.choice {
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius); min-height: 52px; padding: 12px 16px;
  text-align: left; cursor: pointer; font-size: 16px; transition: border-color .15s ease, background .15s ease;
}
.choices.two .choice { text-align: center; }
.choice:hover { border-color: #C9CCE0; }
.choice.on { border-color: var(--blue); background: var(--soft); color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer;
}
.chip.on { border-color: var(--blue); background: var(--blue); color: #fff; }

.ticks { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; color: var(--muted); font-size: 15px; }
.ticks li::before {
  content: ''; position: absolute; left: 2px; top: 6px; width: 10px; height: 5px;
  border-left: 1.5px solid var(--blue); border-bottom: 1.5px solid var(--blue); transform: rotate(-45deg);
}

/* ---------- photos ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  position: relative; aspect-ratio: 4 / 5; border: 1px dashed #C9CCE0; border-radius: 12px; background: var(--gray-bg);
  cursor: pointer; overflow: hidden; padding: 0; display: flex; align-items: center; justify-content: center;
}
.slot.filled { border-style: solid; border-color: var(--line); }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot .plus { font-size: 24px; color: var(--blue); font-weight: 300; }
.slot.busy { opacity: .6; }
.slot .spinner.small { position: absolute; }
.slot .badge { position: absolute; bottom: 6px; left: 6px; background: var(--error); color: #fff; font-size: 11px; border-radius: 6px; padding: 1px 6px; }

/* ---------- hook + taste ---------- */
.hook { min-height: 100dvh; display: flex; flex-direction: column; max-width: 440px; margin: 0 auto; }
.hook-art {
  flex: 1; min-height: 38vh; background: url('/assets/town-aerial.jpg') center 35% / cover no-repeat;
  border-radius: 0 0 28px 28px;
}
.hook-body { padding: 24px var(--gutter) calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.hook-body h1 { margin-top: 8px; }
.taste-art { width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; background: url('/assets/town-meet.jpg') center top / cover no-repeat; margin-bottom: 18px; }

/* ---------- plans ---------- */
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'name price' 'tag perday';
  align-items: center; row-gap: 2px; text-align: left;
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
}
.plan.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--soft); }
.plan-name { grid-area: name; font-weight: 600; }
.plan-price { grid-area: price; font-weight: 600; text-align: right; }
.per-day { grid-area: perday; font-size: 12px; color: var(--muted); text-align: right; }
.tag { grid-area: tag; justify-self: start; font-size: 11px; background: var(--yellow); color: var(--navy); border-radius: 6px; padding: 1px 7px; }
.timer { font-size: 13px; color: var(--navy); background: var(--gray-bg); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.charge { font-size: 13px; color: var(--muted); margin: 0; text-align: center; line-height: 1.5; }

.spinner { width: 28px; height: 28px; margin: 32px auto; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.small { width: 18px; height: 18px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.turnstile { margin-top: 16px; }

@media (min-width: 600px) {
  .page, .hook { padding-top: 24px; }
  .hook-art { border-radius: 28px; min-height: 380px; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 2s !important; }
}

body.mock #app { padding-top: 22px; }

.exists { background: var(--soft); border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.exists p { margin: 0; font-size: 14px; color: var(--navy); }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
#closed-get-app { margin-top: 12px; }
.exists .btn.secondary { background: #fff; box-shadow: 0 2px 0 #D6DAFB; }
