/* ============ Recess ============
   Look: editorial "exhibit" — warm beige page on a peach glow, high-contrast uppercase serif,
   black + one orange accent, pill buttons, organic blobs, tickets with barcodes,
   schedule boxes with a heavy black offset. All motion is anime.js (js/motion.js). */

:root {
  --bg: #e9e1d6;
  --bg-2: #e2d8ca;
  --peach: #f5d3c3;
  --paper: #fffdfa;
  --ink: #111111;
  --ink-2: #6f6860;
  --line: #cdc3b6;
  --orange: #ee8a55;
  --orange-d: #d96e37;
  --orange-t: #fbe4d7;
  --serif: 'Bodoni Moda', Didot, 'Bodoni 72', Georgia, serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --led: 'VT323', ui-monospace, Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--peach); }
html, body { margin: 0; }
body {
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  background: radial-gradient(120% 60% at 50% -10%, #f9dccd 0%, var(--peach) 60%, #f1c9b6 100%) fixed;
}
body.no-scroll { overflow: hidden; }
a { color: var(--ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange-d); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.display { word-break: keep-all; overflow-wrap: normal; font-family: var(--serif); font-weight: 400; text-transform: uppercase; letter-spacing: -0.02em; line-height: .9; font-size: clamp(52px, 16vw, 80px); }
.display.long { font-size: clamp(42px, 12.6vw, 66px); }
.eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; }
.lede { color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 32ch; margin: 16px 0 0; }
.h-sec { font-family: var(--serif); font-size: 22px; text-transform: uppercase; letter-spacing: -0.01em; margin: 30px 0 12px; }
.rule-note { font-size: 12.5px; color: var(--ink-2); margin: 10px 0; }
.empty { color: var(--ink-2); margin: 6px 0; }
.page-head { margin: 6px 0 24px; }

#app {
  position: relative; max-width: 560px; margin: 0 auto; min-height: 100dvh;
  background: var(--bg); padding-bottom: calc(96px + var(--safe-b));
}
@media (min-width: 600px) {
  #app { margin: 28px auto; min-height: calc(100dvh - 56px); border-radius: 28px; box-shadow: 0 40px 90px -30px rgba(217, 110, 55, .45); overflow: clip; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(14px + var(--safe-t)) 20px 12px;
  background: rgba(233, 225, 214, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 26px; letter-spacing: -0.02em; line-height: 1; }
.brand-bell { display: inline-block; color: var(--orange); font-family: var(--sans); font-size: 20px; }
.spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 16px; border-radius: 999px;
  background: transparent; border: 1.5px solid var(--ink);
  font-size: 12.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.chip.mini { min-height: 32px; padding: 0 10px; }
.chip.sel { background: var(--ink); color: #fff; }
.chip[hidden] { display: none; }
.purse { border-color: var(--orange); color: var(--orange-d); }
.purse b { font-weight: 600; font-variant-numeric: tabular-nums; }
#bus-chip b { font-family: var(--led); font-size: 18px; font-weight: 400; }
.iconbtn { display: grid; place-items: center; border: none; background: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; color: var(--ink); }
.iconbtn:hover { background: rgba(0, 0, 0, .05); }

.view { display: block; padding: 10px 20px 20px; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; padding: 0 12px calc(12px + var(--safe-b)); pointer-events: none; }
.tabbar-inner {
  pointer-events: auto; display: flex; gap: 2px; max-width: 520px; margin: 0 auto; padding: 6px;
  background: rgba(255, 253, 250, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--ink); border-radius: 999px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .35);
}
.tabbar a { flex: 1; display: grid; place-items: center; height: 44px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.tabbar a.active { background: var(--ink); color: #fff; }

/* ---------- buttons & cards ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font-size: 13.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.mint { background: var(--ink); color: #fff; }
.btn.red { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn.ghost { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.btn.danger { color: var(--orange-d); }
.row { display: flex; gap: 10px; margin: 16px 0; }
.row > * { flex: 1; }
.row .btn { padding: 0 14px; white-space: nowrap; }
.card { position: relative; display: block; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 18px; padding: 16px 18px; margin-bottom: 16px; color: inherit; text-decoration: none; }

/* ---------- ornaments ---------- */
.deco-blob { position: absolute; fill: var(--orange); }
.sticker { display: block; width: 76px; height: 76px; }
.sticker svg { display: block; width: 100%; height: 100%; }
.round-arrow {
  position: relative; display: grid; place-items: center; flex: none;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--orange); color: #fff; text-decoration: none;
}
.round-arrow svg { width: 24px; height: 24px; }
.round-arrow.big { width: 84px; height: 84px; }
.round-arrow.big svg { width: 32px; height: 32px; }
.ra-ring { position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--orange); pointer-events: none; }
.arrow-divider { display: flex; align-items: center; gap: 0; margin: 30px 0; }
.arrow-divider .ln { flex: 1; height: 1px; background: var(--ink); }
.barcode { display: block; padding: 12px 18px 12px; border-top: 1.5px dashed var(--ink); }
.barcode svg { display: block; width: 100%; height: 38px; fill: var(--ink); }
.barcode-meta { display: flex; justify-content: space-between; margin-top: 3px; font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; }
.h-ic { width: 26px; height: 26px; vertical-align: -3px; margin-left: 6px; }

/* tickets */
.ticket {
  position: relative; display: flex; flex-direction: column; text-align: left;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; color: var(--ink); text-decoration: none;
}
.ticket::before, .ticket::after { /* side notches */
  content: ''; position: absolute; bottom: 74px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink);
}
.ticket::before { left: -9px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -9px; clip-path: inset(0 50% 0 0); }
.ticket-head { display: block; padding: 12px 18px 10px; background: var(--orange); border-bottom: 1.5px solid var(--ink); font-family: var(--serif); font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.05; }
.ticket-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 16px; }
.ticket-kicker { font-family: var(--serif); font-weight: 700; font-size: 15px; text-transform: uppercase; line-height: 1.2; }
.ticket-lines { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.ticket-lines.small { font-size: 11.5px; }
.ticket-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; }
.ticket-row small, .ticket-price small { display: block; font-size: 11px; }
.ticket-row b, .ticket-price b { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1; }
.ticket-row .sticker { width: 62px; height: 62px; }
.btn-ink { align-self: flex-start; padding: 7px 14px; background: var(--ink); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 18px; text-transform: uppercase; }
.ticket-stack { position: relative; display: block; width: min(320px, 92%); padding: 20px 0 0 20px; margin: 0 auto 20px; text-decoration: none; }
.ticket-stack .ghost1, .ticket-stack .ghost2 { position: absolute; background: linear-gradient(var(--orange) 0 50px, var(--paper) 50px); }
.ticket-stack .ghost2 { top: 0; left: 0; right: 20px; bottom: 20px; }
.ticket-stack .ghost1 { top: 10px; left: 10px; right: 10px; bottom: 10px; }
.ticket-stack .ghost1::before, .ticket-stack .ghost1::after, .ticket-stack .ghost2::before, .ticket-stack .ghost2::after { display: none; }

/* ---------- home ---------- */
.hero { position: relative; z-index: 2; }
.hero .cta { display: flex; gap: 12px; margin-top: 24px; }
.hero-art { position: relative; height: clamp(380px, 110vw, 520px); margin: 18px -6px 8px; }
.hero-art::before { content: ''; position: absolute; left: 20%; right: 8%; top: 20%; bottom: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(238, 138, 85, .45), transparent); filter: blur(10px); }
.blob-img { position: absolute; right: 4%; top: 2%; width: 82%; aspect-ratio: 4 / 5; clip-path: url(#blob-clip); background: var(--ink); }
.blob-img .scene-art { transform-origin: 50% 70%; }
.hero-art .b1 { width: 24%; right: -2%; top: 4%; }
.hero-art .b2 { width: 14%; left: 8%; top: 52%; }
.hero-art .b3 { width: 21%; left: 0; bottom: 4%; }
.hero-art > .sticker { position: absolute; right: 8%; bottom: 0; width: 92px; height: 92px; }

.bus-mini { display: flex; align-items: center; gap: 14px; margin: 26px 0 0; padding: 14px 18px; border-radius: 18px; background: var(--ink); color: #fff; text-decoration: none; }
.bm-txt { display: flex; flex-direction: column; }
.bm-txt b { font-family: var(--serif); font-size: 19px; text-transform: uppercase; font-weight: 400; }
.bm-txt small { color: #b7b0a7; font-size: 12px; }
.led-mini, .bus-mini-time { font-family: var(--led); color: var(--orange); font-size: 26px; }
.led-mini { min-width: 44px; }
.bus-mini-time { margin-left: auto; font-size: 34px; }

.sched { margin-top: 34px; }
.sched-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 28px 0 18px; }
.sched-h h2 { font-size: 26px; text-transform: uppercase; letter-spacing: -0.01em; }
.sched-h small { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.sched-count { font-size: 15px; font-weight: 600; color: var(--orange-d); font-variant-numeric: tabular-nums; }
.sched-box { position: relative; margin: 12px 0 0 12px; background: var(--paper); border: 1px solid var(--ink); box-shadow: -12px -12px 0 var(--ink); }
.sched-box.plain { box-shadow: none; margin-left: 0; }
.empty-row { margin: 0; padding: 18px; font-family: var(--serif); font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 30px 0 8px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.stats div { text-align: center; padding: 14px 4px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-family: var(--serif); font-size: 34px; font-weight: 400; line-height: 1.1; }
.stats small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- scene artwork ---------- */
.scene-art { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 2 / 3; overflow: hidden; }
.scene-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene-art.dusk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(238, 138, 85, .45), rgba(248, 201, 138, .12) 60%, transparent); mix-blend-mode: multiply; pointer-events: none; }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkle { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff6c8; box-shadow: 0 0 6px 2px rgba(255, 214, 120, .9), 0 0 14px 4px rgba(238, 138, 85, .4); }

/* ---------- tasks ---------- */
ul.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px 8px 16px; border-bottom: 1px solid var(--line); }
.task:last-child, .slot:last-child { border-bottom: none; }
.tickbox { position: relative; width: 22px; height: 22px; flex: none; border: 1.5px solid var(--ink); border-radius: 4px; background: transparent; padding: 0; cursor: pointer; }
.tickbox:hover { background: var(--orange-t); }
.tick { position: absolute; left: -3px; top: -12px; width: 36px; height: 32px; overflow: visible; pointer-events: none; }
.tick path { fill: none; stroke: var(--orange-d); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.ttext { flex: 1; min-width: 0; font-family: var(--serif); font-size: 18px; line-height: 1.2; text-transform: uppercase; letter-spacing: -0.01em; overflow-wrap: anywhere; cursor: text; }
.done .ttext { color: #a29a90; cursor: default; }
.gstar { font-size: 13px; }
.ttext-edit { flex: 1; min-width: 0; font: 18px var(--serif); text-transform: uppercase; border: none; border-bottom: 1.5px solid var(--orange); background: transparent; padding: 2px 0; outline: none; }
.remark { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-d); white-space: nowrap; }
.tools { display: flex; flex: none; }
.ic { border: none; background: none; font-size: 15px; width: 32px; height: 36px; border-radius: 50%; color: var(--ink-2); cursor: pointer; }
.ic:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.ic.star.on { color: var(--orange); font-size: 19px; }
.slot { display: flex; align-items: center; min-height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-style: italic; font-size: 17px; color: #a29a90; }

/* ---------- diary ---------- */
.add-row { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
.add-row input { flex: 1; min-width: 0; height: 50px; padding: 0 2px; border: none; border-bottom: 1.5px solid var(--ink); background: transparent; font: 20px var(--serif); outline: none; }
.add-row input::placeholder { color: #a29a90; font-style: italic; }
.to-today { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.to-today input { accent-color: var(--ink); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--orange-d); }
.dots i.f { background: var(--orange); }

/* ---------- bus ---------- */
.led {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--ink);
  font-family: var(--led); color: var(--orange); font-size: 32px; line-height: 1;
  background-image: radial-gradient(rgba(238, 138, 85, .12) 1px, transparent 1.3px); background-size: 4px 4px;
}
.led-no { min-width: 2.1em; }
.led-dest { flex: 1; overflow: hidden; white-space: nowrap; font-size: 24px; }
.road-wrap { position: relative; margin: 16px 0 6px; border-radius: 18px; overflow: hidden; background: var(--paper); border: 1px solid var(--ink); }
.road-svg { display: block; width: 100%; height: auto; }
.bus-sprite { position: absolute; left: 6px; bottom: 9%; width: 18%; }
.bus-art { display: block; width: 100%; height: auto; overflow: visible; }
.wheel { transform-box: fill-box; transform-origin: center; }
.puff { position: absolute; left: -6px; bottom: 18%; width: 12px; height: 12px; border-radius: 50%; background: #cfc5b8; }
.route-tickets { display: flex; gap: 16px; overflow-x: auto; padding: 10px 20px 18px; margin: 0 -20px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.route.ticket { flex: none; width: 210px; padding: 0; cursor: pointer; scroll-snap-align: center; }
.route.ticket .ticket-head { font-size: 24px; }
.route.ticket.sel { box-shadow: 8px 8px 0 var(--ink); transform: translate(-4px, -4px); }
.route.ticket:not(.sel) .ticket-head { background: var(--bg-2); }
.ticket-price { display: block; margin: 4px 0; }
.board-row { margin: 18px 0 8px; }
.reader-wrap { position: relative; display: grid; place-items: center; }
.reader-wrap .ring { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; border: 2px solid var(--orange); pointer-events: none; }
.big-time { font-family: var(--serif); font-size: clamp(86px, 28vw, 128px); font-weight: 400; text-align: center; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums lining-nums; margin: 18px 0 6px; }
.arrived { text-align: center; font-family: var(--serif); font-size: 30px; text-transform: uppercase; line-height: 1; margin-top: 18px; }
.cup { display: inline-block; color: var(--orange); font-family: var(--sans); }

/* ---------- the bus ticket machine (fare validator) ---------- */
.bus.idle .road-wrap { display: none; }
.validator-wrap { display: flex; justify-content: flex-end; padding: 6px 6px 0 0; margin: 0 0 22px; }
.validator { position: relative; width: 236px; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: 14px auto; filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .22)); }
.v-cap { grid-column: 2; grid-row: 1; margin-right: 6px; background: linear-gradient(180deg, #d7dadc, #b4b8bb); border: 1.5px solid var(--ink); border-bottom: none; border-radius: 12px 14px 0 0; }
.v-side {
  grid-column: 1; grid-row: 1 / 3; position: relative; margin-top: 10px;
  background: linear-gradient(90deg, #121212, #2a2a2a 70%, #1b1b1b); border: 1.5px solid var(--ink); border-right: none; border-radius: 10px 0 0 16px;
}
.v-exit { position: absolute; left: -3px; top: 40px; width: 6px; height: 132px; background: #000; border-radius: 3px; box-shadow: 0 0 0 1px #555; z-index: 2; }
.ticket-out { position: absolute; right: calc(100% - 1px); top: 38px; width: 108px; height: 170px; overflow: hidden; pointer-events: none; }
.ticket-out .pticket { box-shadow: -4px 6px 12px -6px rgba(0, 0, 0, .4); transform-origin: right top; }
.v-note { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); writing-mode: vertical-rl; rotate: 180deg; padding: 6px 2px; background: #fff; border-radius: 2px; font-size: 6.5px; line-height: 1.2; font-weight: 600; letter-spacing: .02em; color: var(--ink); max-height: calc(100% - 200px); overflow: hidden; }
.v-body {
  grid-column: 2; grid-row: 2; padding: 12px 12px 18px;
  background: linear-gradient(160deg, #f0453a 0%, #dc2f26 55%, #bd221b 100%);
  border: 1.5px solid var(--ink); border-radius: 4px 16px 30px 6px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .25), inset -3px -4px 0 rgba(0, 0, 0, .12);
}
.v-head { display: flex; align-items: center; justify-content: space-between; height: 50px; }
.v-sticker { display: grid; place-items: center; width: 82px; height: 46px; background: #fff; border: 1px solid var(--ink); border-radius: 4px; transform: rotate(-4deg); }
.v-sticker svg { width: 66px; height: 38px; }
.v-slot { position: relative; width: 58px; height: 34px; background: linear-gradient(180deg, #4c95e3, #2b6cc0); border: 1.5px solid var(--ink); border-radius: 7px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35); transition: box-shadow .2s; }
.v-slot i { position: absolute; left: 12%; right: 12%; top: 50%; height: 7px; margin-top: -3px; background: #0c2447; border-radius: 3px; box-shadow: inset 0 2px 2px rgba(0, 0, 0, .6); }
.v-slot.lit { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 0 0 3px rgba(255, 255, 255, .7), 0 0 22px 4px #8cc6ff; }
.v-panel { margin-top: 12px; padding: 10px 10px 12px; background: linear-gradient(180deg, #232326, #161618); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .7); }
.v-lcd { display: flex; align-items: center; justify-content: center; height: 32px; padding: 0 8px; background: linear-gradient(180deg, #a9c46a, #93b052); border-radius: 4px; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45); font-family: var(--led); font-size: 23px; color: #1f2c0b; letter-spacing: 1px; white-space: pre; overflow: hidden; }
.v-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin-top: 12px; }
.v-key {
  display: flex; align-items: center; justify-content: space-between; height: 28px; padding: 0 7px 0 5px;
  background: linear-gradient(180deg, #38383c, #26262a); border: 1px solid #000; border-radius: 4px; box-shadow: 0 2px 0 #000, inset 0 1px 0 rgba(255, 255, 255, .1); cursor: pointer;
}
.v-key:nth-child(even) { flex-direction: row-reverse; padding: 0 5px 0 7px; }
.v-key[disabled] { cursor: default; }
.v-win { min-width: 26px; padding: 1px 4px; background: linear-gradient(180deg, #5aa0ea, #3478c8); border-radius: 2px; color: #fff; font: 600 11px var(--sans); text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.v-led { width: 8px; height: 8px; border-radius: 50%; background: #4a1411; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6); }
.v-key.on .v-led { background: #ff3b30; box-shadow: 0 0 6px 2px rgba(255, 59, 48, .8); }
.v-key.on { background: linear-gradient(180deg, #44444a, #2e2e33); }

.farecard {
  position: relative; display: block; width: 240px; height: 150px; margin: 0 auto 8px; padding: 0; overflow: hidden; cursor: pointer; text-align: left;
  border: 1.5px solid var(--ink); border-radius: 12px; color: var(--ink);
  background: linear-gradient(118deg, transparent 0 46%, var(--orange) 46% 64%, transparent 64%), linear-gradient(160deg, #f6f1e6, #e8dfcd);
  box-shadow: 0 16px 24px -14px rgba(0, 0, 0, .45);
}
.fc-stripe { position: absolute; left: 0; right: 0; bottom: 22px; height: 22px; background: linear-gradient(180deg, #4a3526, #2c1f15); }
.fc-name { position: absolute; left: 16px; top: 14px; font-family: var(--serif); font-weight: 700; font-size: 22px; letter-spacing: .02em; }
.fc-hint { position: absolute; left: 16px; top: 44px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.fc-val { position: absolute; right: 14px; top: 14px; font-family: var(--led); font-size: 22px; }

/* the printed dot-matrix ticket */
.pticket {
  width: 104px; padding: 8px 8px 10px; background: #fbf8f1; color: #4b3c8f;
  font-family: var(--led); font-size: 13px; line-height: 1.15; letter-spacing: .3px;
  border: 1px solid #d9d2c4;
  background-image: radial-gradient(circle at 0 50%, transparent 3px, #fbf8f1 3.5px);
}
.pt-row { display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; }
.pt-big { text-align: center; font-size: 30px; line-height: 1; margin: 4px 0 6px; padding: 4px 0; border-top: 1px dashed #4b3c8f; border-bottom: 1px dashed #4b3c8f; }
.pt-big small { display: block; font-size: 11px; letter-spacing: 2px; }
.stub-wrap { display: flex; justify-content: center; margin: 22px 0 6px; }
.stub-wrap .pticket { transform: rotate(-4deg) scale(1.3); transform-origin: center; box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .4); margin: 26px 0; }

/* ---------- radio ---------- */
.rbox {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
  margin: 12px 0 0 12px; padding: 20px; background: var(--paper); border: 1px solid var(--ink); box-shadow: -12px -12px 0 var(--ink);
}
.grille {
  position: relative; grid-column: 1 / -1; justify-self: center; width: min(64vw, 260px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: repeating-radial-gradient(circle, #111 0 1.5px, #252525 1.5px 4px);
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .5);
}
.grille::after { /* record label */
  content: 'RECESS FM'; position: absolute; left: 50%; top: 50%; width: 34%; height: 34%; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; background: var(--orange); color: var(--ink); font: 700 11px var(--sans); letter-spacing: .1em;
}
.cone { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(238, 138, 85, .6), transparent 65%); opacity: .2; mix-blend-mode: screen; }
.rdial { background: var(--bg); border-radius: 12px; padding: 8px 12px 6px; font-family: var(--led); }
.rname { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.freq { margin-left: auto; color: var(--orange-d); }
.lamp { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.rbox.on .lamp { background: var(--orange); box-shadow: 0 0 10px var(--orange); }
.rscale { position: relative; height: 16px; margin: 4px 0 0; background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 8px); background-size: 100% 7px; background-repeat: no-repeat; background-position: bottom; }
.needle { position: absolute; top: -3px; bottom: 0; width: 2.5px; border-radius: 2px; background: var(--orange-d); left: 8%; }
.rband { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); }
.power { position: relative; width: 70px; height: 70px; border-radius: 50%; border: none; background: var(--ink); color: #fff; font: 600 12px var(--sans); letter-spacing: .1em; cursor: pointer; }
.power b { position: relative; z-index: 1; font-weight: 600; }
.rbox.on .power { background: var(--orange); color: var(--ink); }
.knob-mark { position: absolute; left: 50%; top: 50%; width: 4px; height: 30px; margin: -30px 0 0 -2px; transform-origin: 50% 100%; }
.knob-mark::before { content: ''; position: absolute; top: 3px; left: 0; width: 4px; height: 7px; border-radius: 2px; background: currentColor; }
.presets { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.channels { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.channels li { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.channels .em { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--ink); font-size: 22px; background: var(--paper); }
.channels li.live .em { background: var(--orange); border-color: var(--orange); }
.channels label { display: flex; flex-direction: column; }
.channels label b { font-family: var(--serif); font-weight: 400; font-size: 18px; text-transform: uppercase; line-height: 1.15; }
.channels label small { color: var(--ink-2); font-size: 12.5px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 6px 0 0; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--orange) var(--v, 0%), var(--ink) var(--v, 0%)); }
input[type=range]::-moz-range-track { height: 3px; background: linear-gradient(90deg, var(--orange) var(--v, 0%), var(--ink) var(--v, 0%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8.5px; border-radius: 50%; background: var(--orange); border: 1.5px solid var(--ink); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 1.5px solid var(--ink); }

/* ---------- shop ---------- */
.subtabs { display: flex; gap: 8px; margin-bottom: 20px; }
.subtabs button { flex: 1; min-height: 44px; padding: 0 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.subtabs button[aria-selected=true] { background: var(--ink); color: #fff; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 4px; border-radius: 10px; background: var(--orange); color: var(--ink); font-size: 11px; font-weight: 600; }
.shop .lede { margin: 0 0 18px; }

.due { background: var(--orange-t); border-color: var(--orange); }
.due-h { margin-bottom: 10px; font-size: 13px; }
.due-h b { font-family: var(--serif); font-size: 17px; text-transform: uppercase; font-weight: 400; }
.due-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.due-chip { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; text-align: left; }
.due-chip .em { font-size: 22px; }
.due-chip span { display: flex; flex-direction: column; line-height: 1.15; }
.due-chip small { color: var(--ink-2); font-size: 11px; }
.due-chip .plus { font-size: 20px; color: var(--orange-d); }

.quick-add { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-bottom: 8px; }
.quick-add input, .quick-add select, .restock input, .restock select { font: 15px var(--sans); height: 46px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 999px; background-color: var(--paper); min-width: 0; }
.quick-add select { max-width: 112px; padding: 0 10px; }
.quick-add .btn { min-height: 46px; padding: 0 16px; }
.shelf-tools { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

.aisle { margin-top: 24px; }
.aisle-h { display: flex; align-items: center; gap: 10px; font-size: 22px; text-transform: uppercase; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.aisle-h span { font-family: var(--sans); font-size: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px 10px; min-height: 100px; border: 1px solid var(--ink); border-radius: 16px; background: var(--paper); cursor: pointer; }
.tile .em { font-size: 30px; line-height: 1.2; }
.tile .nm { font-size: 12.5px; font-weight: 500; line-height: 1.2; text-align: center; }
.tile .rh { font-size: 10px; color: var(--orange-d); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tile.need { background: var(--orange-t); border-color: var(--orange-d); }
.tile .tag { position: absolute; top: -8px; right: -6px; padding: 2px 7px; font-size: 9.5px; font-weight: 600; letter-spacing: .08em; color: #fff; background: var(--ink); border-radius: 999px; }
.tile.editing { border-style: dashed; }
.tile .rm { position: absolute; top: -8px; left: -6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--ink); font-size: 11px; }

/* chit = ticket */
.chit { position: relative; margin: 6px 4px 20px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; }
.chit::before, .chit::after { content: ''; position: absolute; bottom: 92px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); }
.chit::before { left: -10px; clip-path: inset(0 0 0 50%); }
.chit::after { right: -10px; clip-path: inset(0 50% 0 0); }
.chit-head { padding: 14px 18px 12px; background: var(--orange); border-bottom: 1.5px solid var(--ink); }
.chit-stamp { font-family: var(--serif); font-weight: 700; font-size: 30px; text-transform: uppercase; line-height: 1; }
.chit-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.chit > .chit-group, .chit > .chit-empty, .chit > .chit-add, .chit > .chit-total, .chit > .chit-foot { margin-left: 18px; margin-right: 18px; }
.chit-group { margin-top: 14px; }
.chit-aisle { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.chit ul { list-style: none; margin: 2px 0 0; padding: 0; }
.chit-row { display: flex; align-items: center; gap: 12px; min-height: 46px; border-bottom: 1px solid var(--line); }
.chit-box { width: 22px; height: 22px; flex: none; border: 1.5px solid var(--ink); border-radius: 50%; background: transparent; cursor: pointer; padding: 0; }
.chit-row.done .chit-box { background: var(--orange); }
.chit-name { position: relative; flex: 1; font-family: var(--serif); font-size: 19px; text-transform: uppercase; }
.chit-row.done .chit-name { color: #a29a90; }
.strike { position: absolute; left: -2px; right: -2px; top: 50%; height: 2px; background: var(--orange-d); transform: scaleX(0); transform-origin: left; }
.chit-row.done .strike { transform: scaleX(1); }
.chit-empty { text-align: center; padding: 24px 0 8px; }
.chit-empty p { font-family: var(--serif); font-size: 24px; text-transform: uppercase; margin: 0 0 4px; }
.chit-empty small { color: var(--ink-2); }
.chit-add input { width: 100%; height: 46px; font: italic 18px var(--serif); border: none; border-bottom: 1px dashed var(--ink-2); background: transparent; outline: none; }
.chit-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; font-size: 11px; letter-spacing: .14em; }
.chit-total b { font-family: var(--serif); font-size: 34px; font-weight: 700; }
.chit-foot { font-size: 12px; color: var(--ink-2); margin-top: 2px; margin-bottom: 14px; }
.chit > .sticker { position: absolute; right: 14px; top: 34px; width: 72px; height: 72px; transform: rotate(12deg); }
.chit-copy { width: 100%; font: 14px/1.4 ui-monospace, Menlo, monospace; border: 1.5px solid var(--ink); border-radius: 12px; padding: 10px; }

/* sweet jars */
.jar-intro { margin: 0 0 16px; color: var(--ink-2); }
.jars { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.jar { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--ink); border-radius: 18px 18px 40px 40px; background: var(--paper); cursor: pointer; }
.jar .lid { width: 56%; height: 8px; border-radius: 4px; background: var(--c); border: 1px solid var(--ink); }
.jar .glass { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); }
.jar .em { font-size: 32px; }
.jar .nm { font-size: 12.5px; font-weight: 500; line-height: 1.2; text-align: center; min-height: 2.4em; }
.jar .price { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--orange-d); }
.jar.cant { opacity: .5; }
.manage { margin-top: 18px; }
.manage summary { cursor: pointer; }
.manage summary b { font-family: var(--serif); font-weight: 400; text-transform: uppercase; font-size: 17px; }
.restock { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }
.restock .btn { grid-column: 1 / -1; }
.emoji-in { text-align: center; }
.restock-list { list-style: none; padding: 0; margin: 12px 0 0; }
.restock-list li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 3px 0; }


.vouchers { list-style: none; margin: 0; padding: 0; }
.voucher { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; margin-bottom: 10px; border: 1px solid var(--ink); border-radius: 6px; background: var(--paper); }
.voucher::before, .voucher::after { content: ''; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--bg); border: 1px solid var(--ink); }
.voucher::before { left: -9px; clip-path: inset(0 0 0 50%); }
.voucher::after { right: -9px; clip-path: inset(0 50% 0 0); }
.voucher.gift { background: var(--orange-t); }
.voucher .em { font-size: 28px; }
.voucher .vt { flex: 1; display: flex; flex-direction: column; }
.voucher .vt b { font-family: var(--serif); font-weight: 400; text-transform: uppercase; font-size: 17px; }
.voucher small { color: var(--ink-2); }
.voucher .btn { min-height: 38px; padding: 0 16px; }

/* ---------- modal / toast / effects ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(17, 17, 17, .45); }
.modal { width: 100%; max-width: 420px; max-height: 84dvh; overflow: auto; padding: 24px; background: var(--paper); border: 1px solid var(--ink); box-shadow: -12px -12px 0 var(--ink); margin: 12px 0 0 12px; }
.modal h2 { margin-bottom: 8px; font-size: 30px; text-transform: uppercase; }
.modal > .btn, .modal .center > .btn { width: 100%; margin-top: 10px; }
.modal .row .btn { padding: 0 12px; }
.modal-em { font-size: 56px; display: inline-block; }
.paper-slip { margin-bottom: 12px; border: 1px solid var(--ink); }
.paper-slip h2 { margin: 0; padding: 14px 16px 10px; background: var(--orange); border-bottom: 1px solid var(--ink); font-size: 26px; font-weight: 700; text-transform: uppercase; }
.paper-slip p { margin: 0; padding: 14px 16px; color: var(--ink-2); }
.setrow { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 0; border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; font-weight: 500; cursor: pointer; }
.setrow input { width: 20px; height: 20px; accent-color: var(--ink); }
.setrow-d { padding: 14px 0; border-bottom: 1px solid var(--line); }
.setrow-d summary { font-weight: 500; cursor: pointer; }
.ledger { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.ledger li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ledger .pos { color: var(--ink); }
.ledger .neg { color: var(--orange-d); }

#toasts { position: fixed; left: 0; right: 0; bottom: calc(96px + var(--safe-b)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 20px; pointer-events: none; }
.toast { max-width: 440px; background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45); }
.toast b { color: var(--orange); font-weight: 600; }
.float-text { position: fixed; z-index: 70; transform: translateX(-50%); font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--orange-d); pointer-events: none; white-space: nowrap; }
.flyer { position: fixed; z-index: 72; display: grid; place-items: center; pointer-events: none; font-size: 26px; }
.coin-token { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--orange); border: 1.5px solid var(--ink); }
.cf { position: fixed; z-index: 80; width: 8px; height: 12px; border-radius: 1px; pointer-events: none; }
.cf.star { width: auto; height: auto; font-size: 18px; color: var(--orange-d); }

/* ---------- opening ---------- */
.opening { position: fixed; inset: 0; z-index: 100; background: #0d0f1c; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; overflow: hidden; }
.op-scene { position: absolute; inset: 0; overflow: hidden; }
.op-scene .scene-art { top: 0; bottom: auto; left: 50%; right: auto; height: 80dvh; min-width: 100%; transform: translateX(-50%); }
.op-scene .scene-art img { transform-origin: 50% 45%; }
.op-panel { position: relative; z-index: 2; width: 100%; max-width: 480px; padding: 80px 24px calc(32px + var(--safe-b)); text-align: center; background: linear-gradient(to bottom, transparent, rgba(13, 15, 28, .94) 34%); }
.op-body { min-height: 130px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 22px; perspective: 800px; }
.op-step { width: 100%; }
.op-h { font-family: var(--serif); font-size: clamp(44px, 13vw, 64px); text-transform: uppercase; letter-spacing: -0.02em; line-height: .95; }
.op-big { font-family: var(--serif); font-size: 26px; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
.op-sub { font-family: var(--serif); font-size: 24px; text-transform: uppercase; margin: 8px 0 0; color: var(--orange); }
.op-small { margin: 8px 0 0; opacity: .75; font-size: 14px; }
.op-next { min-width: 200px; background: var(--orange); border-color: var(--orange); color: var(--ink); }
.op-skip { display: block; margin: 14px auto 0; background: none; border: none; color: #b7b0a7; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; cursor: pointer; }
.xcard { text-align: left; color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; padding: 0 0 16px; font-size: 15px; line-height: 1.55; max-height: 54dvh; overflow: auto; }
.xcard p { margin: 0 20px 10px; }
.xcard-to { padding: 14px 20px 10px; margin-bottom: 14px; background: var(--orange); border-bottom: 1.5px solid var(--ink); font-family: var(--serif); font-weight: 700; font-size: 26px; text-transform: uppercase; }
.xcard-from { margin: 4px 20px 0; text-align: right; font-family: var(--serif); font-style: italic; font-size: 20px; }
.bigcoin { width: 128px; height: 128px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 30px; box-shadow: 0 0 0 6px #0d0f1c, 0 0 0 7.5px var(--orange); }

@media (max-width: 440px) {
  .topbar:has(.chip.mini:not([hidden])) .brand-word { display: none; }
}
@media (max-width: 380px) {
  .tools .ic { width: 28px; }
  .quick-add { grid-template-columns: 1fr auto; }
  .quick-add .btn { grid-column: 1 / -1; }
  .tabbar a { font-size: 10px; letter-spacing: .04em; }
}

/* ---------- illustrated icons (drawn on white; multiply makes the white vanish) ---------- */
.ico { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.ico-gen { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.ico-gen::after { content: '✎'; font-size: 18px; color: var(--orange-d); }
.ico-gen i { position: absolute; inset: 12%; border-radius: 50%; border: 2px dashed var(--orange); }
.rl-ic { width: 30px; height: 30px; flex: none; font-size: 18px; }
.rl-nm { flex: 1; }
.restock-list li { gap: 10px; }
.ico-em { display: grid; place-items: center; width: 100%; height: 100%; line-height: 1; }
.tile .em { width: 56px; height: 56px; font-size: 30px; }
.due-chip .em { width: 34px; height: 34px; font-size: 22px; }
.jar .glass { width: 70px; height: 70px; overflow: hidden; }
.jar .em { width: 60px; height: 60px; font-size: 32px; }
.voucher .em { width: 44px; height: 44px; flex: none; font-size: 28px; }
.aisle-ic { width: 34px; height: 34px; font-size: 18px; }
.chit-aisle { display: flex; align-items: center; gap: 6px; }
.chit-aisle-ic { width: 22px; height: 22px; font-size: 13px; }
.modal-em { width: 110px; height: 110px; margin: 0 auto; }
.slip-ic { width: 84px; height: 84px; margin: 12px auto 0; }
.channels .em { padding: 5px; overflow: hidden; }
.channels li.live .em { background: var(--orange-t); border-color: var(--orange-d); box-shadow: 0 0 0 3px var(--orange); }

/* dropdowns: custom chevron with breathing room instead of the native arrow */
select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: 40px !important;
  background-image: 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 1.5l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
}
.quick-add select { width: 124px; max-width: none; padding-left: 16px !important; }

.credits li { align-items: baseline; }
.credits a { color: var(--ink); text-underline-offset: 2px; }
.credits b { font-weight: 600; font-size: 11px; white-space: nowrap; color: var(--ink-2); }

/* ---------- first-time guide ---------- */
.coach-layer { position: fixed; inset: 0; z-index: 90; }
.coach-hole { position: fixed; border-radius: 20px; box-shadow: 0 0 0 9999px rgba(17, 17, 17, .58); outline: 2px solid var(--orange); outline-offset: 2px; pointer-events: none; }
.coach { position: fixed; padding: 18px 18px 14px; background: var(--paper); border: 1px solid var(--ink); box-shadow: -10px -10px 0 var(--ink); }
.coach-arrow { position: absolute; width: 14px; height: 14px; background: var(--paper); border: 1px solid var(--ink); transform: rotate(45deg); }
.coach-arrow.up { top: -8px; border-right: none; border-bottom: none; }
.coach-arrow.down { bottom: -8px; border-left: none; border-top: none; }
.coach-step { margin: 0 0 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-d); }
.coach-title { font-size: 24px; text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 6px; }
.coach-text { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.coach-text b { color: var(--ink); font-weight: 600; }
.coach-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.coach-skip { border: none; background: none; padding: 8px 4px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.coach-next { min-height: 44px; padding: 0 22px; }

/* ================= Biscuit Tin ================= */
.tin-hero { position: relative; display: grid; justify-items: center; margin: -6px 0 18px; }
.tin-btn { border: none; background: none; padding: 0; cursor: pointer; width: min(78vw, 340px); }
.tin-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 22px 22px rgba(43, 58, 103, .22)); }
.tin-hero > .sticker { position: absolute; right: 2%; top: 4%; width: 84px; height: 84px; }
.tin-count { margin: 4px 0 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
.tin-count b { font-family: var(--serif); font-size: 20px; letter-spacing: 0; color: var(--ink); font-weight: 700; }

.tin-add { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 26px; }
.add-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
  padding: 14px 12px 12px; border: 1px solid var(--ink); border-radius: 18px; background: var(--paper); color: var(--ink);
}
.add-btn:first-child { background: var(--orange); border-color: var(--orange-d); }
.add-btn:active { transform: scale(.97); }
.add-ic { font-family: var(--serif); font-size: 30px; line-height: .9; height: 26px; }
.add-btn b { font-family: var(--serif); font-weight: 700; font-size: 16px; text-transform: uppercase; line-height: 1.1; }
.add-btn small { font-size: 11px; line-height: 1.3; color: var(--ink-2); }
.add-btn:first-child small { color: rgba(17, 17, 17, .7); }

.on-this-day { margin: 0 0 26px; padding: 16px; border: 1.5px dashed var(--orange-d); border-radius: 18px; background: var(--orange-t); }
.on-this-day .eyebrow { color: var(--orange-d); margin-bottom: 10px; }
.backup-nudge { display: grid; gap: 10px; margin: 0 0 24px; padding: 16px; border: 1px solid var(--ink); border-radius: 18px; background: var(--paper); }
.backup-nudge p { margin: 0; font-size: 14px; color: var(--ink-2); }
.backup-nudge b { color: var(--ink); }

.kid-filter { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.kid-filter button { flex: none; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.kid-filter button[aria-selected=true] { background: var(--k, var(--ink)); border-color: var(--k, var(--ink)); color: #fff; }

.tin-month { font-size: 22px; text-transform: uppercase; letter-spacing: -0.01em; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.tin-empty { text-align: center; padding: 20px 10px 10px; color: var(--ink-2); }
.tin-empty-h { font-family: var(--serif); font-size: 26px; text-transform: uppercase; color: var(--ink); margin: 0 0 6px; }

/* memory cards */
.mem { position: relative; margin: 0 0 14px; padding: 18px 18px 14px; background: var(--paper); border: 1px solid var(--ink); border-radius: 4px; cursor: pointer; overflow: hidden; }
.mem:focus-visible { outline: 2px solid var(--orange-d); }
.mem.said { box-shadow: -8px -8px 0 var(--ink); margin-left: 8px; margin-top: 8px; }
.mem-quote { margin: 0 0 12px; font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.mem-quote::before { content: '“'; display: block; font-size: 54px; line-height: .6; height: 26px; color: var(--orange); }
.mem-text { margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
.mem-text.big { font-family: var(--serif); font-size: 20px; line-height: 1.35; }
.mem.photo, .mem.moment:has(img) { padding: 10px 10px 12px; }
.mem img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: cover; border-radius: 2px; margin-bottom: 10px; }
.mem.photo .mem-text, .mem.photo .mem-meta, .mem.moment:has(img) .mem-text, .mem.moment:has(img) .mem-meta { padding: 0 6px; }
.mem-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mem-date { margin-left: auto; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.mem-missing { padding: 30px; text-align: center; background: var(--bg); color: var(--ink-2); font-size: 13px; margin-bottom: 10px; }
.kid-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--k) 22%, #fff); }
.kid-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--k); }
.mem.ticket-mem { display: flex; gap: 16px; align-items: center; background: var(--bg-2); }
.mem-ticket .pticket { transform: rotate(-4deg); box-shadow: 0 8px 14px -8px rgba(0, 0, 0, .35); }
.mem-ticket-note { flex: 1; min-width: 0; }
.mem-sub { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-2); }

/* add / edit sheet */
.modal.sheet { max-width: 460px; }
.composer { display: grid; gap: 14px; }
.composer h2 { margin: -6px 0 0; }
.composer .eyebrow { margin: 0; }
.composer textarea { width: 100%; padding: 14px; border: 1.5px solid var(--ink); border-radius: 14px; background: #fff; font: 18px/1.4 var(--serif); resize: vertical; outline: none; }
.composer textarea:focus { border-color: var(--orange-d); }
.composer-row { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 10px; }
.composer-label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.composer input[type=date] { height: 42px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; font: 15px var(--sans); }
.composer-ticket { display: flex; justify-content: center; padding: 6px 0; }
.composer-ticket .pticket { transform: rotate(-3deg) scale(1.15); }
.photo-pick { display: block; cursor: pointer; }
.photo-preview { display: grid; place-items: center; min-height: 64px; border: 1.5px dashed var(--ink-2); border-radius: 14px; color: var(--ink-2); font-size: 13px; overflow: hidden; }
.photo-pick.big .photo-preview { min-height: 180px; background: var(--bg); }
.photo-preview img { display: block; width: 100%; max-height: 280px; object-fit: cover; }
.kid-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kid-chip { min-height: 34px; padding: 0 13px; border: 1.5px solid var(--k, var(--ink)); border-radius: 999px; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink); }
.kid-chip.on { background: var(--k, var(--ink)); color: #fff; }
.kid-chip.add { border-style: dashed; border-color: var(--ink-2); color: var(--ink-2); }
.kid-new { display: flex; gap: 6px; }
.kid-new input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 999px; font: 14px var(--sans); }

.mem-view .mem { cursor: default; margin-left: 8px; }
.mem-view .row { margin-bottom: 0; }

/* bus: the ride and arrival */
.ride-sub b { color: var(--ink); }
.arrived-sheet h2 { font-size: 34px; margin: 2px 0 10px; }
.arrived-ticket { position: relative; display: flex; flex-direction: column; align-items: center; margin: 4px 0 16px; }
.arrived-slot { width: 150px; height: 8px; border-radius: 4px; background: #111; box-shadow: inset 0 2px 3px rgba(255, 255, 255, .15); z-index: 1; }
.arrived-clip { overflow: hidden; margin-top: -2px; padding: 0 10px 14px; }
.arrived-clip .pticket { transform-origin: top center; transform: scale(1.25); margin: 18px 0 14px; }

/* opening: the tin */
.op-tin { display: block; width: min(62vw, 260px); height: auto; margin: 0 auto 10px; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); }

/* settings: kids */
.kids-list { list-style: none; margin: 0 0 10px; padding: 0; }
.kids-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kid-add { display: flex; gap: 8px; }
.kid-add input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 999px; font: 15px var(--sans); background: #fff; }

@media (max-width: 380px) {
  .tin-add { grid-template-columns: 1fr; }
  .add-btn { flex-direction: row; align-items: center; gap: 10px; }
  .add-btn small { display: none; }
}

/* welcome: their name */
.op-name { display: block; margin: 18px auto 4px; max-width: 300px; }
.op-name input { width: 100%; height: 56px; padding: 0 22px; border: 1.5px solid var(--orange); border-radius: 999px; background: rgba(255, 253, 250, .96); color: var(--ink); font: 22px var(--serif); text-align: center; outline: none; }
.op-name input:focus { box-shadow: 0 0 0 4px rgba(238, 138, 85, .35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* ticket: passenger name */
.pt-name { margin: 0 0 2px; font-size: 17px; letter-spacing: 1px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* add to home screen */
.op-install { margin: 16px auto 0; max-width: 340px; text-align: left; }
.install-steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; gap: 10px; }
.install-steps li { counter-increment: st; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.4; }
.install-steps li::before { content: counter(st); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--ink); font: 700 13px var(--sans); }
.install-steps li.install-or { counter-increment: none; opacity: .75; font-size: 12.5px; }
.install-steps li.install-or::before { display: none; }
.install-steps.alt { margin-top: 14px; }
.share-ic { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; margin: 0 2px; }
.install-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.45; opacity: .8; }
.install-go { width: 100%; }
.opening .op-install { color: #fff; }
.opening .install-steps b, .opening .install-note b { color: var(--orange); }
.install-light { margin: 14px 0 6px; }
.install-light .install-steps b, .install-light .install-note b { color: var(--ink); }
.install-light .install-note { color: var(--ink-2); opacity: 1; }
.opening .install-go { background: #fffdfa; border-color: #fffdfa; color: var(--ink); }

/* while the welcome is open: nothing behind it to scroll into view, and any gap iOS opens stays dark */
html.in-opening, html.in-opening body { background: #0d0f1c; overflow: hidden; }
html.in-opening #app { display: none; }
.opening { height: 100dvh; }
