/* WIMB web app — full passenger app (same features as the Android Public app).
   Mobile-first; ≥ 960px gets a side rail and a wider two-column canvas. */
:root {
  --ink: #0B1533; --ink-2: #14275A; --blue: #0B4DD6; --blue-2: #2F6BFF;
  --amber: #FFB020; --amber-ink: #3A2400; --green: #12B76A; --red: #E5484D; --warn: #F79009; --info: #2E7CF6;
  --bg: #F2F4F9; --card: #FFFFFF; --line: #E3E7F0; --text: #0E1630; --muted: #67708A; --soft: #EEF1F8;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 21, 51, .06), 0 8px 24px -12px rgba(11, 21, 51, .18);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 66px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(47, 107, 255, .55); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shell ---------- */
#app { min-height: 100vh; min-height: 100dvh; display: flex; }
.rail { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#screen { flex: 1; padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 18px); }
body.no-nav #screen { padding-bottom: calc(24px + var(--safe-bottom)); }
.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 16px; }
.wrap.flush { padding-top: 0; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line); display: flex; justify-content: center;
  padding: 6px 6px calc(6px + var(--safe-bottom));
}
.bottomnav .in { display: flex; width: 100%; max-width: 640px; }
body.no-nav .bottomnav { display: none; }
.navbtn {
  flex: 1; background: none; border: 0; padding: 4px 2px; display: flex; flex-direction: column; align-items: center;
  gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; min-width: 0;
}
.navbtn .pill { width: 54px; height: 30px; border-radius: 16px; display: grid; place-items: center; transition: background .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.navbtn.on { color: var(--ink); font-weight: 800; }
.navbtn.on .pill { background: rgba(255, 176, 32, .3); transform: scale(1.04); }
.navbtn span.l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff;
  padding: calc(12px + var(--safe-top)) 12px 12px; display: flex; align-items: center; gap: 10px;
}
.topbar .t { flex: 1; min-width: 0; }
.topbar h1 { margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar p { margin: 1px 0 0; font-size: 12.5px; color: #B9C1DA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .inner { width: 100%; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.ibtn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .1); color: #fff;
}
.ibtn.light { background: var(--soft); color: var(--ink); }
.ibtn.amber { background: var(--amber); color: var(--ink); }
.ibtn:active { transform: scale(.94); }

/* ---------- type ---------- */
h2, h3 { font-family: var(--display); color: var(--text); letter-spacing: -.01em; }
h2 { font-size: 22px; margin: 0 0 6px; }
h3 { font-size: 16.5px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 13.5px; }
.small { font-size: 12.5px; }
.label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 18px 4px 10px; }
.big-time { font: 800 34px/1 var(--display); letter-spacing: -.02em; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tap { cursor: pointer; transition: transform .12s, box-shadow .2s; }
.card.tap:active { transform: scale(.985); }
.card.tap:hover { box-shadow: 0 1px 2px rgba(11, 21, 51, .06), 0 14px 32px -14px rgba(11, 21, 51, .3); }
.card.ink { background: linear-gradient(160deg, var(--ink), var(--ink-2)); color: #fff; border: 0; }
.card.ink h3, .card.ink h2 { color: #fff; }
.card.tint { background: rgba(255, 176, 32, .12); border-color: rgba(255, 176, 32, .35); box-shadow: none; }
.row { display: flex; align-items: center; gap: 12px; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 176, 32, .25); color: var(--ink); }
.tile.soft { background: var(--soft); }
.tile.green { background: var(--green); color: #fff; }
.tile.lg { width: 48px; height: 48px; border-radius: 14px; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 30px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.amber { background: rgba(255, 176, 32, .3); color: var(--ink); }
.chip.green { background: rgba(18, 183, 106, .13); color: #0A7A47; }
.chip.red { background: rgba(229, 72, 77, .12); color: #B3262B; }
.chip.warn { background: rgba(247, 144, 9, .14); color: #9A5A00; }
.chip.ink { background: var(--ink); color: #fff; }
.chip.glass { background: rgba(255, 255, 255, .16); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; position: relative; }
.dot.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: currentColor; opacity: .35; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.8); opacity: 0; } }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 12px 16px;
  border-radius: 14px; border: 0; font-weight: 800; font-size: 15px; background: var(--ink); color: #fff; margin-top: 8px;
  transition: transform .1s, filter .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.amber { background: var(--amber); color: var(--ink); }
.btn.soft { background: rgba(11, 77, 214, .08); color: var(--blue); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--text); }
.btn.green { background: var(--green); color: #fff; }
.btn.red { background: rgba(229, 72, 77, .1); color: var(--red); }
.btn.sm { min-height: 40px; font-size: 14px; padding: 8px 12px; border-radius: 12px; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; }
.link { background: none; border: 0; padding: 4px 0; color: var(--blue); font-weight: 700; }

/* ---------- inputs ---------- */
.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 13px; font-weight: 700; margin: 0 2px 6px; }
.inp {
  display: flex; align-items: center; gap: 10px; background: var(--soft); border: 1.5px solid transparent; border-radius: 14px;
  padding: 0 14px; min-height: 50px; transition: border-color .15s, background .15s;
}
.inp:focus-within { border-color: var(--blue-2); background: #fff; }
.inp input, .inp select, .inp textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 13px 0; font-size: 16px; }
.inp textarea { resize: vertical; min-height: 84px; }
.inp .ic { color: var(--muted); }
.select-row { cursor: pointer; }
.select-row .val { flex: 1; padding: 13px 0; font-weight: 700; font-size: 16px; }
.select-row .val:empty::before { content: attr(data-ph); color: #A0A8BC; font-weight: 500; }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pillbtn { border: 1.5px solid var(--line); background: #fff; color: var(--text); border-radius: 30px; padding: 8px 14px; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.pillbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- home hero ---------- */
.hero {
  background: radial-gradient(120% 90% at 100% 0%, rgba(47, 107, 255, .55), transparent 55%), linear-gradient(170deg, var(--ink) 30%, #0E2466);
  color: #fff; padding: calc(18px + var(--safe-top)) 0 64px;
}
.hero .inner { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.hero .greet { font-size: 14px; color: #B9C1DA; font-weight: 600; }
.hero h2 { color: #fff; font-size: 30px; line-height: 1.08; margin: 4px 0 0; letter-spacing: -.025em; }
.search-card { margin-top: -46px; position: relative; z-index: 2; padding: 10px 14px 14px; }
.count-row { display: flex; align-items: center; gap: 10px; padding: 4px 2px 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.place { display: flex; align-items: center; gap: 14px; padding: 10px 52px 10px 2px; border-radius: 12px; cursor: pointer; width: 100%; background: none; border: 0; text-align: left; }
.place:hover { background: var(--soft); }
.place .ring { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--green); flex: none; background: #fff; }
.place.to .ring { border-color: var(--red); }
.place .k { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.place .v { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place .v:empty::before { content: attr(data-ph); color: #A0A8BC; font-weight: 600; }
.places { position: relative; }
.places .rail-line { position: absolute; left: 8px; top: 34px; bottom: 34px; width: 2px; background: repeating-linear-gradient(var(--line) 0 4px, transparent 4px 8px); }
.places .bus-run { position: absolute; left: 1px; top: 30px; color: var(--blue); animation: busrun 1.6s cubic-bezier(.6, 0, .2, 1) .4s both; }
@keyframes busrun { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { transform: translateY(40px); opacity: 0; } }
.places .swap { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.places .sep { height: 1px; background: var(--line); margin: 2px 56px 2px 34px; }
.quick { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.quick b { font-size: 14.5px; }
.quick span { font-size: 12.5px; color: var(--muted); }

/* ---------- bus / result cards ---------- */
.bus-time { font: 800 24px/1.1 var(--display); letter-spacing: -.02em; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 30px; background: rgba(18, 183, 106, .12); color: var(--green); font-weight: 800; font-size: 12px; }
.detail-hero { background: radial-gradient(110% 120% at 100% 0%, rgba(47, 107, 255, .5), transparent 60%), linear-gradient(160deg, var(--ink), var(--ink-2)); color: #fff; border: 0; }
.detail-hero .k { font-size: 11px; font-weight: 800; color: #B9C1DA; letter-spacing: .06em; }
.detail-hero .chip.green { background: #5BE3A7; color: var(--ink); }
.detail-hero .chip.amber { background: var(--amber); color: var(--ink); }
.detail-hero .route { font-size: 17px; font-weight: 700; margin-top: 8px; }

/* timeline */
.tl { position: relative; }
.tl .st { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.tl .st .rl { width: 28px; flex: none; position: relative; }
.tl .st .rl::before { content: ""; position: absolute; left: 50%; transform: translateX(-50%); top: 0; bottom: 0; width: 3px; background: var(--line); }
.tl .st:first-child .rl::before { top: 14px; }
.tl .st:last-child .rl::before { bottom: calc(100% - 14px); }
.tl .st:only-child .rl::before { display: none; }
.tl .st.passed .rl::before, .tl .st.now .rl::before { background: var(--green); }
.tl .dt { position: absolute; left: 50%; top: 9px; width: 11px; height: 11px; transform: translateX(-50%); border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); }
.tl .st:first-child .dt, .tl .st:last-child .dt { width: 14px; height: 14px; top: 7px; background: var(--ink); }
.tl .st.passed .dt { background: var(--green); border-color: var(--green); }
.tl .st.now .dt { width: 18px; height: 18px; top: 5px; background: var(--green); border: 4px solid rgba(18, 183, 106, .35); box-shadow: 0 0 0 6px rgba(18, 183, 106, .12); }
.tl .nm { font-size: 15px; padding-top: 4px; }
.tl .st:first-child .nm, .tl .st:last-child .nm, .tl .st.now .nm { font-weight: 800; font-size: 16px; }
.tl .st.passed .nm { color: var(--muted); }
.tl .sub { font-size: 12px; color: var(--muted); }

.info-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.info-row + .info-row { border-top: 1px dashed var(--line); }
.info-row .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.info-row .v { font-size: 15px; font-weight: 600; word-break: break-word; }

.nowbox { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: rgba(18, 183, 106, .08); border-radius: 16px; padding: 12px 14px; }
.nowbox .k { font-size: 11px; font-weight: 800; color: var(--muted); }
.nowbox .k.g { color: var(--green); }
.nowbox .v { font-weight: 800; font-size: 15.5px; }

/* map */
.map { height: 260px; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px; background: var(--soft); position: relative; border: 1px solid var(--line); z-index: 0; }
.map.tall { height: 340px; }
.bus-marker { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(18, 183, 106, .45); position: relative; }
.bus-marker::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--green); opacity: .5; animation: pulse 2s ease-out infinite; }
.me-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--blue-2); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47, 107, 255, .22); }
.leaflet-container { font-family: var(--body) !important; }

/* LR offer card */
.offer { padding: 0; overflow: hidden; }
.offer .hero-img { height: 150px; position: relative; background: linear-gradient(135deg, var(--ink), #2A3B6B 55%, rgba(255, 176, 32, .9)); background-size: cover; background-position: center; }
.offer .hero-img.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .65)); }
.offer .ribbon { position: absolute; left: 12px; top: 12px; z-index: 1; }
.offer .ht { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 1; color: #fff; }
.offer .ht b { font-size: 15.5px; }
.offer .ht div { font-size: 12px; color: #E6E9F5; }
.offer .wm { position: absolute; right: -8px; bottom: -14px; color: rgba(255, 255, 255, .14); }
.offer .in { padding: 12px 14px 14px; }
.legs { display: flex; gap: 10px; margin-top: 10px; }
.legs .ln { display: flex; flex-direction: column; align-items: center; padding-top: 5px; }
.legs .ln i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: block; }
.legs .ln i:last-child { background: var(--muted); }
.legs .ln s { width: 2px; height: 22px; background: var(--line); display: block; }
.legs .cities b { display: block; font-size: 14.5px; }
.legs .cities b + b { margin-top: 14px; }
.price { font: 800 20px/1 var(--display); color: #C77D00; }

/* seats */
.legend { display: flex; justify-content: center; gap: 16px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 14px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--green); display: inline-block; }
.legend i.occ { border-color: var(--info); background: rgba(46, 124, 246, .15); }
.legend i.pick { border-color: var(--amber); background: var(--amber); }
.bus-shell { background: #F8FAFE; border: 1.4px solid var(--line); border-radius: 28px; padding: 16px 14px 18px; max-width: 380px; margin: 0 auto; }
.bus-shell .front { width: 110px; height: 7px; border-radius: 30px; background: rgba(11, 21, 51, .1); margin: 0 auto 4px; }
.bus-shell .fl { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.seat-row { display: grid; grid-template-columns: repeat(2, 1fr) 14px repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.seat-row.front-row { grid-template-columns: repeat(3, 1fr) 14px 1fr 1fr; }
.seat {
  height: 50px; border-radius: 12px; border: 1.6px solid var(--green); background: rgba(18, 183, 106, .12); color: var(--green);
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; padding: 0;
}
.seat.taken { border-color: var(--info); background: rgba(46, 124, 246, .1); color: var(--info); opacity: .6; cursor: not-allowed; }
.seat.on { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.seat.fix { border: 0; background: var(--soft); color: var(--muted); font-size: 9px; cursor: default; }
.seat.gap { visibility: hidden; }
.fee .r { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); padding: 3px 0; }
.fee .r.t { color: var(--text); font-weight: 800; font-size: 15px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; }
.board { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--soft); margin-bottom: 6px; cursor: pointer; border: 1.5px solid transparent; width: 100%; text-align: left; }
.board.on { background: rgba(255, 176, 32, .16); border-color: var(--amber); }
.board .rd { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.board.on .rd { border: 6px solid var(--amber); }

/* ticket */
.ticket { border-radius: var(--r-lg); overflow: hidden; background: var(--card); border: 1px solid var(--line); margin-bottom: 14px; box-shadow: var(--shadow); }
.ticket .th { padding: 16px; position: relative; overflow: hidden; background: linear-gradient(160deg, var(--ink), var(--blue)); color: #fff; }
.ticket.old .th { background: var(--soft); color: var(--text); }
.ticket.cancel .th { background: rgba(229, 72, 77, .08); color: #8A1F2B; }
.ticket .th .wm { position: absolute; right: -8px; bottom: -12px; opacity: .14; }
.ticket:not(.old) .th .chip.amber { background: var(--amber); color: var(--ink); }
.ticket .rt { font: 800 20px/1.15 var(--display); margin: 10px 0 8px; }
.ticket .tb { padding: 14px 16px 16px; position: relative; }
.ticket .tb::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; border-top: 2px dashed var(--line); }
.stat { background: rgba(255, 176, 32, .12); border-radius: 16px; padding: 10px; text-align: center; }
.stat.g { background: rgba(18, 183, 106, .1); }
.stat b { display: block; font-size: 14.5px; }
.stat span { font-size: 10.5px; color: var(--muted); font-weight: 800; letter-spacing: .05em; }
.kv .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv .v { font-size: 14px; font-weight: 700; word-break: break-word; }
.qrbox { display: flex; flex-direction: column; align-items: center; padding: 14px; border-radius: 18px; background: rgba(255, 176, 32, .08); margin: 12px 0; cursor: zoom-in; }
.qrbox canvas, .qrbox img { background: #fff; padding: 8px; border-radius: 12px; }

/* misc */
.empty { text-align: center; padding: 34px 16px; }
.empty .ei { width: 64px; height: 64px; border-radius: 20px; background: var(--soft); display: grid; place-items: center; margin: 0 auto 14px; color: var(--muted); }
.empty h3 { margin-bottom: 4px; }
.skel { height: 96px; border-radius: var(--r-lg); background: linear-gradient(90deg, #E8ECF5 0%, #F3F5FA 50%, #E8ECF5 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; margin-bottom: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(11, 21, 51, .15); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 80vh; display: grid; place-items: center; gap: 12px; color: var(--muted); font-weight: 600; }
.menu .mi { display: flex; align-items: center; gap: 14px; padding: 11px 10px; border-radius: 14px; width: 100%; background: none; border: 0; text-align: left; font-weight: 600; font-size: 15px; }
.menu .mi:hover { background: var(--soft); }
.menu .mi .grow { color: var(--text); }
.progress { height: 10px; border-radius: 20px; background: rgba(11, 21, 51, .08); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--amber); border-radius: 20px; }
.avatar { width: 58px; height: 58px; border-radius: 20px; background: var(--amber); color: var(--ink); display: grid; place-items: center; font: 800 24px var(--display); flex: none; }
.photos { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 14px; scrollbar-width: none; }
.photos img { width: 240px; height: 150px; object-fit: cover; border-radius: 16px; flex: none; scroll-snap-align: start; background: var(--soft); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .th { width: 72px; height: 72px; border-radius: 12px; position: relative; background: var(--soft) center/cover; }
.thumbs .th button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; padding: 0; }
.welcome { min-height: 100vh; min-height: 100dvh; background: #fff; }
.welcome > .top { background: radial-gradient(120% 90% at 100% 0%, rgba(47, 107, 255, .55), transparent 55%), linear-gradient(170deg, var(--ink), #0E2466); color: #fff; padding: calc(48px + var(--safe-top)) 24px 36px; }
.welcome > .top h1 { font: 800 40px/1.02 var(--display); letter-spacing: -.03em; margin: 22px 0 10px; }
.welcome > .top p { color: #C9D0E6; font-size: 16px; margin: 0; max-width: 30em; }
.welcome .logo { width: 84px; height: 84px; border-radius: 24px; }
.terms { background: var(--soft); border-radius: 14px; padding: 14px; font-size: 12.5px; color: var(--muted); max-height: 240px; overflow: auto; white-space: pre-wrap; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: rgba(46, 124, 246, .08); color: #1B4FA8; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; }
.install { display: none; align-items: center; gap: 12px; }
.install.show { display: flex; }
.install img { width: 44px; height: 44px; border-radius: 12px; }

/* toast + sheet */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-bottom) + 18px); transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; z-index: 10002;
  transition: opacity .2s, transform .25s; max-width: calc(100% - 32px); box-shadow: 0 12px 30px rgba(11, 21, 51, .35); pointer-events: none;
}
.toast.err { background: #B3262B; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.scrim { position: fixed; inset: 0; z-index: 10001; background: rgba(11, 21, 51, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s both; }
.sheet {
  background: var(--card); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; max-height: 92vh; max-height: 92dvh;
  overflow: auto; padding: 10px 18px calc(18px + var(--safe-bottom)); animation: up .26s cubic-bezier(.2, .9, .3, 1) both; overscroll-behavior: contain;
}
.sheet .grab { width: 38px; height: 4px; background: var(--line); border-radius: 4px; margin: 4px auto 14px; }
.sheet .sh { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet .sh h3 { margin: 0; flex: 1; }
.sheet.full { height: 92vh; height: 92dvh; display: flex; flex-direction: column; }
.sheet.full .list { flex: 1; overflow: auto; margin: 0 -6px; }
.dialog { max-width: 420px; border-radius: 24px; margin: auto 16px; animation: pop .22s cubic-bezier(.2, .9, .3, 1.2) both; }
.scrim.center { align-items: center; }
.dialog .di { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px; }
.dialog p { white-space: pre-wrap; color: var(--muted); font-size: 14px; margin: 0 0 8px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px; border: 0; background: none; border-radius: 12px; text-align: left; font-size: 15.5px; font-weight: 600; }
.opt:hover, .opt:focus-visible { background: var(--soft); }
.opt .cnt { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 700; background: var(--soft); padding: 3px 8px; border-radius: 20px; }
.scanner { position: relative; border-radius: 20px; overflow: hidden; background: #000; aspect-ratio: 1; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border: 3px solid var(--amber); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }

.screen-in { animation: screenIn .22s ease-out both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- desktop / tablet ---------- */
@media (min-width: 960px) {
  :root { --nav-h: 0px; }
  .bottomnav { display: none; }
  #screen, body.no-nav #screen { padding-bottom: 32px; }
  .rail {
    display: flex; flex-direction: column; gap: 4px; width: 232px; flex: none; position: sticky; top: 0; height: 100vh;
    background: var(--ink); color: #fff; padding: 22px 14px;
  }
  .rail .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; }
  .rail .brand img { width: 40px; height: 40px; border-radius: 12px; }
  .rail .brand b { font: 800 20px var(--display); letter-spacing: -.02em; }
  .rail .brand small { display: block; color: #8F9AC0; font-size: 11.5px; }
  .rail .navbtn { flex: none; flex-direction: row; gap: 12px; padding: 10px 12px; border-radius: 14px; color: #B9C1DA; font-size: 14.5px; justify-content: flex-start; }
  .rail .navbtn .pill { width: auto; height: auto; background: none !important; }
  .rail .navbtn.on { background: rgba(255, 176, 32, .16); color: #fff; }
  .rail .navbtn.on .pill { color: var(--amber); }
  .rail .navbtn:hover { background: rgba(255, 255, 255, .06); }
  .rail .foot { margin-top: auto; font-size: 12px; color: #8F9AC0; padding: 8px; }
  .wrap { max-width: 760px; padding: 24px; }
  .topbar .inner { max-width: 760px; }
  .hero .inner { max-width: 760px; }
  .hero { padding-top: 34px; }
  .hero h2 { font-size: 40px; }
  .toast { bottom: 28px; }
  .sheet { border-radius: 24px; margin-bottom: 4vh; }
  .scrim { align-items: center; }
  .two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .two .sticky { position: sticky; top: 84px; }
  .map.tall { height: 520px; }
  .wrap:has(> .two), #screen:has(.two) .topbar .inner { max-width: 1100px; }
  .grid-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .grid-cards > .card { margin-bottom: 0; }
}

/* ---------- print (ticket PDF) ---------- */
#print { display: none; }
@media print {
  body > *:not(#print) { display: none !important; }
  #print { display: block; padding: 24px; }
  #print .ticket { box-shadow: none; break-inside: avoid; }
  #print .ticket .th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Google AdSense units (web app, iPhone home-screen app, installed PC app) */
.adwrap{margin:16px 0;border-radius:18px;background:var(--card,#fff);border:1px solid var(--line,#E3E7F0);padding:8px 8px 10px;overflow:hidden;min-height:0}
.adwrap .adlabel{font-size:10.5px;font-weight:700;letter-spacing:.04em;color:var(--muted,#6B7590);margin:0 4px 6px}
.adwrap ins.adsbygoogle{min-height:50px}
.adwrap:has(ins.adsbygoogle[data-ad-status="unfilled"]){display:none}
.grid-cards>.adwrap{grid-column:1/-1;margin:0}
@media print{.adwrap{display:none}}
