@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --stage: #071633;
  --stage-0: rgba(7, 22, 51, 0);
  --navy: #092d74;
  --navy-mid: #0e2a66;
  --surface: #0f2557;
  --surface-2: #163271;
  --line: rgba(183, 195, 224, .16);
  --text: #ffffff;
  --text-2: #b7c3e0;
  --text-3: #8fa0c8;
  --gold: #e7a420;
  --gold-ink: #071633;
  --font: "Montserrat", system-ui, sans-serif;
  --pad: 20px;
  --r: 18px;
  --r-s: 12px;
  --badge-h: 44px;
  --bar-h: 60px;
  --tabs-h: 56px;
  --tabbar-h: 64px;
  --strip-h: 52px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--stage); color-scheme: dark; }
body {
  margin: 0;
  font: 500 16px/1.5 var(--font);
  color: var(--text);
  background: var(--stage);
  min-height: 100dvh;
  padding-bottom: calc(var(--badge-h) + var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body.page--menu, body.page--branches, body.page--gift { padding-bottom: calc(var(--badge-h) + var(--tabbar-h) + var(--strip-h) + env(safe-area-inset-bottom)); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { list-style: none; padding: 0; }
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--s { width: 16px; height: 16px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money small { font-size: .62em; font-weight: 700; margin-inline-start: .12em; vertical-align: .1em; }
.sample-tag { display: block; font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: .02em; color: var(--text-2, #b7c3e0); white-space: nowrap; }
.sample { display: inline-block; vertical-align: middle; margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--text-3); color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.4; }
.absent { color: var(--text-2); }
.nowrap { white-space: nowrap; }

.concept-badge {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  min-height: var(--badge-h);
  padding: 7px 16px calc(7px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-mid); color: var(--text); border-top: 1px solid var(--line);
  font: 600 11.5px/1.35 "Montserrat", system-ui, sans-serif; text-align: center;
}
.draft {
  margin: 0; padding: 7px var(--pad);
  background: rgba(231, 164, 32, .14); color: var(--gold);
  font-size: 12.5px; font-weight: 600;
}

/* Tab bar, fixed above the concept badge */
.tabbar {
  position: fixed; inset-inline: 0; bottom: calc(var(--badge-h) + env(safe-area-inset-bottom)); z-index: 20;
  height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--stage); border-top: 1px solid var(--line);
  max-width: 480px; margin: 0 auto;
}
.tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--text-2); font-size: 11px; font-weight: 700; transition: color .2s; }
.tabbar a .ico { stroke-width: 1.7; }
.tabbar a:hover { color: var(--text); }
.tabbar a[aria-current] { color: var(--gold); }

/* Member strip, docked above the tab bar on the working screens */
.strip {
  position: fixed; inset-inline: 0; bottom: calc(var(--badge-h) + var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 19;
  height: var(--strip-h); display: flex; align-items: center; gap: 4px; padding: 0 var(--pad);
  max-width: 480px; margin: 0 auto;
  background: var(--navy-mid); border-top: 1px solid var(--line);
  transition: background-color .2s;
}
.strip:hover { background: var(--surface-2); }
.strip-points { font-size: 17px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.strip-cta { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--text); }
.strip-cta .ico { width: 18px; height: 18px; }

/* Header bar and chips */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  min-height: var(--bar-h); padding: 8px 14px 8px var(--pad);
  background: var(--stage); color: var(--text);
}
.bar-end { margin-inline-start: auto; display: flex; gap: 8px; }
.logo img { height: 30px; width: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--text);
  font-size: 14px; font-weight: 700; transition: background-color .2s;
}
.chip:hover, .chip:active { background: rgba(255, 255, 255, .18); }
.bar--sub h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 22px; border-radius: 999px;
  font-size: 16px; font-weight: 700; transition: transform .2s var(--ease), background-color .2s;
}
.btn:active { transform: scale(.98); }
.btn--gold { background: var(--gold); color: var(--gold-ink); font-size: 17px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.btn--gold:hover { background: #f0b23a; }
.btn--ghost { background: transparent; color: var(--text); border: 1.5px solid var(--text-2); min-height: 48px; font-size: 14px; padding: 0 16px; line-height: 1.25; }
.btn--ghost:hover, .btn--ghost:active { background: rgba(255, 255, 255, .08); }
.btn--plain { background: var(--surface-2); color: var(--text); margin-top: 16px; width: 100%; }
.link { color: var(--gold); font-weight: 700; font-size: 14px; padding: 10px 0; min-height: 44px; }
.off { font-size: 13px; color: var(--text-2); padding: 2px 0 8px; }
.hint { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }

/* Home */
.hello { padding: 10px var(--pad) 22px; }
.hello h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.balance { margin-top: 12px; display: flex; align-items: center; }
.balance-n { font-size: 40px; line-height: 1; font-weight: 800; color: var(--gold); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rule { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--text-2); max-width: 34ch; }
.hello .btn--gold { margin-top: 16px; }

.stage { position: relative; height: 260px; overflow: hidden; background: var(--navy-mid); }
.stage-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.stage::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--stage) 0, var(--stage-0) 22%, var(--stage-0) 55%, var(--stage) 100%);
}
.season { display: block; }
.season-body { position: relative; margin-top: -58px; padding: 0 var(--pad); }
.season-body h2 { font-size: 24px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.season-body p { margin-top: 6px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.season-body .money { color: var(--gold); font-weight: 800; font-size: 16px; }

.near {
  margin: 20px var(--pad) 0; padding: 14px 16px; border-radius: var(--r); background: var(--surface);
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
}
.near h2 { font-size: 17px; font-weight: 800; line-height: 1.2; }
.near p { grid-column: 1 / -1; margin-top: 4px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.near-link { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 0; }

/* Wallet */
.wallet { padding: 8px var(--pad) 24px; }
.pass {
  display: grid; justify-items: center; gap: 8px; padding: 18px 18px 14px;
  border-radius: 22px; background: #fff; color: var(--gold-ink);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.qr { width: 196px; height: 196px; }
.member-no { display: flex; align-items: center; font-size: 15px; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.member-no .sample { border-color: #8fa0c8; color: #35508a; }
.pass-hint { font-size: 13px; font-weight: 600; color: #35508a; }
.wallet .btn--gold { margin-top: 18px; }
.history { margin-top: 22px; }
.history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.history-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.history-head p { font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; display: flex; align-items: center; }
.visits { margin-top: 10px; display: grid; gap: 6px; }
.visit {
  display: grid; grid-template-columns: 1fr auto 44px; align-items: center; gap: 10px;
  min-height: 64px; padding: 10px 6px 10px 14px; border-radius: 14px; background: var(--surface);
}
.visit-when, .visit-points { display: grid; gap: 2px; min-width: 0; }
.visit-when b { font-size: 15px; font-weight: 800; }
.visit-when span { font-size: 12.5px; color: var(--text-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-points span { font-size: 12px; line-height: 1.25; color: var(--text-2); font-weight: 600; max-width: 128px; }
.visit-points { text-align: end; }
.visit-points b { font-size: 18px; font-weight: 800; color: var(--gold); }
.visit--spent .visit-points b { color: var(--text-2); }
.visit--pending { outline: 1.5px solid rgba(231, 164, 32, .55); outline-offset: -1.5px; }
.visit--pending .visit-points span { color: var(--gold); }
.mark { width: 44px; height: 44px; padding: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mark--confirmed { color: var(--gold); }
.mark--pending { color: var(--gold); }
.mark--spent { color: var(--text-3); }
.history .link { display: block; margin-top: 6px; }

/* Menu, concept-final's rails inside the shell */
.tabs {
  position: sticky; top: var(--bar-h); z-index: 9; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  min-height: var(--tabs-h); padding: 8px var(--pad); background: var(--stage); scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs > * {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 700; scroll-snap-align: start;
  transition: background-color .2s, color .2s;
}
.tabs > :hover { color: var(--text); }
.tabs > [aria-current] { background: var(--gold); color: var(--gold-ink); }
.menu { padding: 0 0 28px; }
.home-head { padding: 14px var(--pad) 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.home-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.home-head p { color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source { padding: 4px var(--pad) 0; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.rail-sec { padding-top: 18px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--pad) 10px; }
.rail-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.rail-head span { font-size: 13px; font-weight: 700; color: var(--text-2); }
.rail {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--pad) 4px;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { flex: none; width: 156px; scroll-snap-align: start; }
.card {
  position: relative; width: 100%; display: grid; gap: 6px; border-radius: var(--r); background: var(--surface); overflow: hidden; padding-bottom: 12px;
  text-align: start; transition: transform .2s var(--ease), background-color .2s;
}
.card:hover { background: var(--surface-2); }
.card:active { transform: scale(.97); }
.card img { width: 156px; height: 156px; object-fit: cover; }
.card-name { padding: 4px 12px 0; font-size: 13.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-price { padding: 0 12px; font-size: 18px; font-weight: 800; color: var(--gold); }
.card-price .absent { font-size: 12px; font-weight: 600; line-height: 1.3; display: block; }

/* Branches */
.branches { padding: 6px var(--pad) 24px; }
.map { position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface); height: 150px; }
.map svg { width: 100%; height: 100%; display: block; }
.map-road { fill: none; stroke: var(--surface-2); stroke-width: 10; stroke-linecap: round; }
.map-road--thin { stroke-width: 4; }
.map-pin { fill: var(--gold); stroke: var(--gold); stroke-width: 2; }
.map-pin--dim { fill: none; stroke: var(--text-3); }
.map figcaption { position: absolute; inset-inline: 12px; bottom: 10px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.note { margin-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.branch-list { margin-top: 14px; display: grid; gap: 8px; }
.branch { padding: 14px 16px; border-radius: var(--r); background: var(--surface); display: grid; gap: 12px; }
.branch h2 { font-size: 17px; font-weight: 800; line-height: 1.2; }
.branch-text > p { margin-top: 3px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
.fields { margin-top: 10px; display: grid; gap: 4px; }
.fields div { display: flex; gap: 10px; font-size: 13.5px; }
.fields dt { flex: none; width: 64px; font-weight: 700; color: var(--text-2); }
.fields dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.fields .absent { font-weight: 600; }
.branch-actions { display: flex; gap: 8px; }
.branch-actions .btn { flex: 1; }

/* Gift */
.gift { padding: 8px 0 24px; }
.lead { padding: 0 var(--pad); font-size: 15px; line-height: 1.5; color: var(--text-2); }
.rail--gift { margin-top: 16px; }
.rail--gift .card[aria-pressed="true"] { background: var(--surface-2); outline: 2px solid var(--gold); outline-offset: -2px; }
.rail--gift .tick { position: absolute; top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); display: inline-flex; align-items: center; justify-content: center; }
.rail--gift .tick:empty { display: none; }
.rail--gift .tick .ico { width: 18px; height: 18px; stroke-width: 2.4; }
.field { display: grid; gap: 6px; margin: 16px var(--pad) 0; font-size: 13px; font-weight: 700; color: var(--text-2); }
.field input {
  font: 500 16px/1.4 var(--font); color: var(--text); background: var(--surface); border: 1.5px solid transparent; border-radius: 14px;
  min-height: 52px; padding: 0 16px; width: 100%; caret-color: var(--gold); transition: border-color .2s, background-color .2s;
}
.field input::placeholder { color: var(--text-3); }
.field input:hover { background: var(--surface-2); }
.field input:focus { outline: none; border-color: var(--gold); background: var(--surface-2); }
.gift .btn--gold { margin: 20px var(--pad) 0; }
.stamp { margin: 12px var(--pad) 0; font-size: 12.5px; color: var(--text-3); font-weight: 600; line-height: 1.45; }
.gift .off { padding: 0 var(--pad); }

/* Sheets */
.sheet {
  margin: auto auto 0; width: 100%; max-width: 520px; max-height: 86dvh; overflow: auto;
  padding: 22px var(--pad) 0;
  border: 0; border-radius: 24px 24px 0 0; background: var(--navy-mid); color: var(--text);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .45);
}
.sheet::backdrop { background: rgba(2, 8, 24, .7); }
.sheet[open] { animation: rise .4s var(--ease); }
.sheet h2 { font-size: 20px; font-weight: 800; outline: none; }
.sheet .hint { margin-top: 4px; font-size: 14px; }
.sheet .concept-badge { position: sticky; margin: 18px calc(-1 * var(--pad)) 0; }
.options { margin-top: 14px; display: grid; gap: 8px; }
.option {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 16px;
  background: var(--surface); border-radius: 14px; text-align: start; transition: background-color .2s;
}
.option:hover { background: var(--surface-2); }
.option[aria-pressed="true"] { background: var(--surface-2); outline: 2px solid var(--gold); outline-offset: -2px; }
.option-text { flex: 1; display: grid; }
.option-name { font-weight: 700; font-size: 16px; }
.option-sub { font-size: 13px; color: var(--text-2); font-weight: 600; }
.sheet .tick { width: 24px; color: var(--gold); display: inline-flex; }

@keyframes rise { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#app > main { animation: enter .45s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.noscript { padding: 24px; }
#app { max-width: 480px; margin: 0 auto; }
@media (min-width: 520px) { #app { min-height: 100dvh; box-shadow: 0 0 0 1px var(--line); } }
