/* Boppeto interactive demo — plain CSS mirroring the Flutter app's design
   tokens (app/lib/core/theme/tokens.dart) and components (app/lib/core/ui/).
   Light only, like the app. */

@font-face { font-family: Inter; src: url(fonts/Inter-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/Inter-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Jakarta; src: url(fonts/PlusJakartaSans-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Jakarta; src: url(fonts/PlusJakartaSans-ExtraBold.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --primary: #1B5E20; --primary-hover: #164D1A; --primary-pressed: #113D14;
  --pc: #E8F5E9; --accent: #66BB6A; --accent-text: #2E7D32;
  --warn: #F57F17; --warn-text: #B54708; --warn-c: #FFF4E5;
  --err: #C62828; --err-c: #FDECEC; --info: #175CD3; --info-c: #EFF6FF;
  --white: #fff; --canvas: #F6F7F9;
  --n50: #F9FAFB; --n100: #F2F4F7; --n200: #EAECF0; --n300: #E4E7EC; --n500: #858D9A;
  --n600: #5B6476; --n700: #475467; --n800: #344054; --n900: #101828;
  --night: #0A1F0D; --night-2: #0F2A14;
  --e1: 0 1px 2px rgba(16,24,40,.08); --e2: 0 4px 12px rgba(16,24,40,.08); --e3: 0 12px 24px rgba(16,24,40,.08);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --ease: cubic-bezier(.33,1,.68,1);
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: Jakarta, Inter, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--body); color: var(--n900); background: var(--night); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-14 { width: 14px; height: 14px; } .i-16 { width: 16px; height: 16px; } .i-24 { width: 24px; height: 24px; } .i-32 { width: 32px; height: 32px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Stage: side panel + phone (desktop) / full screen (phone) ---------- */
.stage { height: 100%; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 24px;
  background: radial-gradient(1200px 600px at 20% 10%, #16401b 0%, transparent 60%), radial-gradient(900px 500px at 90% 90%, #12361a 0%, transparent 55%), var(--night); }
.side { width: 340px; color: #fff; display: flex; flex-direction: column; gap: 20px;
  /* Never taller than the window: on a short screen it scrolls on its own. */
  max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
/* Short desktop windows: a tighter side panel. */
@media (min-width: 900px) and (max-height: 760px) {
  .side { gap: 12px; }
  .side h2 { font-size: 24px; }
  .side-box { padding: 12px; gap: 8px; }
}
.side-brand { display: flex; align-items: center; gap: 12px; }
.side-brand img { width: 44px; height: 44px; border-radius: 12px; background: #fff; padding: 4px; }
.side-brand b { font: 800 22px/1 var(--display); letter-spacing: -.3px; }
.side h2 { font: 800 30px/1.2 var(--display); letter-spacing: -.5px; margin: 0; }
.side p { margin: 0; color: rgba(255,255,255,.75); font-size: 15px; line-height: 1.55; }
.side-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.tag-demo { display: inline-flex; align-items: center; gap: 6px; background: #FFF4E5; color: #B54708; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; }
.seg-dark { display: flex; background: rgba(255,255,255,.08); border-radius: 12px; padding: 4px; gap: 4px; }
.seg-dark button { flex: 1; border: 0; background: transparent; color: rgba(255,255,255,.8); border-radius: 9px; padding: 8px 10px; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
.seg-dark button[aria-pressed="true"] { background: #fff; color: var(--primary); }
.side-links { display: flex; gap: 8px; flex-wrap: wrap; }
.link-dark { border: 1px solid rgba(255,255,255,.2); background: transparent; color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; min-height: 40px; }
.link-dark:hover { background: rgba(255,255,255,.08); }

.hint { display: flex; gap: 10px; align-items: flex-start; }
.hint-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--night); display: grid; place-items: center; flex: none; }
.hint-text { font-size: 14px; line-height: 1.5; color: #fff; }
.hint-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hint-btn { border: 0; background: #fff; color: var(--primary); font-weight: 700; font-size: 13px; border-radius: 10px; padding: 8px 12px; min-height: 36px; display: inline-flex; gap: 6px; align-items: center; }
.hint-btn.alt { background: rgba(255,255,255,.14); color: #fff; }

.phone { position: relative; width: 390px; height: 844px; border-radius: 52px; padding: 12px; background: #0b0f0c;
  box-shadow: 0 0 0 2px #2a312c, 0 30px 80px rgba(0,0,0,.55); flex: none;
  /* Always the same 390×844 frame, scaled down to fit the window's height
     (--s, set from the window size in demo-core.js), so the app's layout is
     the same on every desktop. The negative margins make the layout box the
     scaled size, so the gap to the side panel stays 56px. */
  transform: scale(var(--s, 1)); transform-origin: center;
  margin: calc((var(--s, 1) - 1) * 422px) calc((var(--s, 1) - 1) * 195px); }
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 112px; height: 32px; background: #000; border-radius: 20px; z-index: 50; }
.device { position: relative; width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: var(--canvas); display: flex; flex-direction: column; isolation: isolate; }
.statusbar { height: 50px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0; font: 600 15px var(--body); color: var(--n900); background: var(--sb-bg, var(--canvas)); transition: background .2s; }
.statusbar .sb-icons { display: flex; gap: 6px; align-items: center; }
.statusbar.on-green { --sb-bg: var(--primary); color: #fff; }
.statusbar.on-map { --sb-bg: transparent; position: absolute; inset: 0 0 auto; z-index: 40; pointer-events: none; }
.strip, .mhint { display: none; }

/* Phone-sized viewport: the app fills the screen, demo controls shrink into a strip.
   Width only: a wide but short window (a laptop at 125–150% display scaling)
   keeps the side panel and a scaled-down phone. */
@media (max-width: 899px) {
  body { background: var(--canvas); }
  .stage { padding: 0; display: block; background: var(--canvas); }
  .side { display: none; }
  .phone { height: 100%; width: 100%; border-radius: 0; padding: 0; box-shadow: none; background: var(--canvas); transform: none; margin: 0; }
  .phone::before { display: none; }
  .device { border-radius: 0; height: 100dvh; }
  .statusbar { display: none; }
  .strip { display: flex; align-items: center; gap: 8px; height: 44px; flex: none; padding: 0 8px 0 12px; background: var(--night); color: #fff; padding-top: env(safe-area-inset-top); box-sizing: content-box; }
  .strip .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
  .strip .strip-role { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .strip button { border: 0; background: rgba(255,255,255,.1); color: #fff; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
  .strip button[aria-pressed="true"] { background: var(--accent); color: var(--night); }
  .mhint { display: block; flex: none; background: var(--night-2); padding: 10px 12px 12px; border-top: 1px solid rgba(255,255,255,.08); }
  .mhint[hidden] { display: none; }
  .mhint .hint-ico { width: 28px; height: 28px; }
  .mhint .hint-text { font-size: 13px; }
}

/* ---------- App ---------- */
.app { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; isolation: isolate; z-index: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--canvas); }
.screen.enter { animation: enter .25s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.appbar { height: 56px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 16px; background: var(--canvas); }
.appbar.has-back { padding-left: 4px; }
.appbar h1 { flex: 1; min-width: 0; margin: 0; font: 700 18px/24px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-actions { display: flex; align-items: center; gap: 2px; }
.icon-btn { width: 48px; height: 48px; border: 0; background: transparent; border-radius: 999px; display: grid; place-items: center; color: var(--n900); position: relative; flex: none; }
.icon-btn:hover { background: rgba(16,24,40,.05); }
.icon-btn .dot { position: absolute; top: 11px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--canvas); }
.text-btn { border: 0; background: transparent; color: var(--primary); font-weight: 600; font-size: 14px; padding: 10px 12px; border-radius: var(--r-md); min-height: 40px; }
.body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 24px; scrollbar-width: thin; }
.body.flush { padding: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-top { display: flex; align-items: flex-start; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--n700); } .faint { color: var(--n600); }
.pinned { flex: none; background: #fff; border-top: 1px solid var(--n300); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.pinned .caption { text-align: center; font-size: 13px; color: var(--n700); font-weight: 600; }

/* Type scale (app_typography.dart) */
.d-s { font: 700 28px/36px var(--display); letter-spacing: -.4px; margin: 0; }
.h-l { font: 700 26px/34px var(--display); letter-spacing: -.3px; margin: 0; }
.h-m { font: 700 22px/30px var(--display); letter-spacing: -.2px; margin: 0; }
.h-s { font: 700 19px/26px var(--display); margin: 0; }
.t-l { font: 700 18px/24px var(--display); margin: 0; }
.t-m { font: 600 16px/22px var(--body); margin: 0; }
.t-s { font: 600 14px/20px var(--body); margin: 0; }
.b-l { font: 400 16px/24px var(--body); margin: 0; }
.b-m { font: 400 14px/20px var(--body); margin: 0; }
.b-s { font: 400 12px/16px var(--body); color: var(--n700); margin: 0; }
.l-m { font: 600 13px/18px var(--body); }
.l-s { font: 600 11px/14px var(--body); letter-spacing: .4px; }
.amount { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.c-primary { color: var(--primary); }

/* Buttons (app_button.dart) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: var(--r-md); border: 0; font: 600 15px/20px var(--body); background: var(--primary); color: #fff; transition: background .15s, transform .15s; text-decoration: none; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn-lg { height: 56px; } .btn-sm { height: 40px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-secondary { background: #fff; color: var(--primary); box-shadow: inset 0 0 0 1px var(--n500); }
.btn-secondary:hover:not(:disabled) { background: var(--n50); }
.btn-tonal { background: var(--pc); color: var(--primary); }
.btn-tonal:hover:not(:disabled) { background: #dcefdd; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover:not(:disabled) { background: rgba(27,94,32,.06); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a92222; }
.btn:disabled { background: var(--n200); color: var(--n600); box-shadow: none; cursor: default; }
.btn-ghost:disabled { background: transparent; }
.btn .spin { width: 20px; height: 20px; border-width: 2.5px; border-color: currentColor; border-right-color: transparent; }
.tonal-round { width: 48px; height: 48px; border-radius: 999px; border: 0; background: var(--pc); color: var(--primary); display: grid; place-items: center; flex: none; }

/* Cards (app_card.dart) */
.card { background: #fff; border-radius: var(--r-lg); padding: 16px; box-shadow: inset 0 0 0 1px var(--n300), var(--e1); }
.card-elev { box-shadow: var(--e2); }
.card-flat { background: var(--n100); box-shadow: none; }
.card-brand { background: var(--primary); color: #fff; box-shadow: var(--e2); }
.card.tap { cursor: pointer; transition: box-shadow .15s, transform .15s; text-align: left; width: 100%; border: 0; }
:where(button.card, a.card) { display: block; }
.card.tap:hover { box-shadow: inset 0 0 0 1px var(--n300), var(--e2); }
.card-elev.tap:hover { box-shadow: var(--e3); }
.card.tap:active { transform: scale(.985); }
.card.p0 { padding: 0; }
.divider { height: 1px; background: var(--n300); margin: 12px 0; border: 0; }

/* Badges & tone icons (data_display.dart) */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font: 600 11px/14px var(--body); letter-spacing: .4px; background: var(--n100); color: var(--n700); white-space: nowrap; }
.tone-success { background: var(--pc); color: var(--primary); }
.tone-warning { background: var(--warn-c); color: var(--warn-text); }
.tone-info { background: var(--info-c); color: var(--info); }
.tone-error { background: var(--err-c); color: var(--err); }
.tone-neutral { background: var(--n100); color: var(--n700); }
.tone-icon { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; }
.icon-sq { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--pc); color: var(--primary); display: grid; place-items: center; flex: none; transition: background .15s, color .15s; }

/* Info rows */
.info-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.info-row .i { color: var(--n700); }
.info-row .k { color: var(--n700); font-size: 14px; flex: none; }
.info-row .v { flex: 1; text-align: right; font: 600 14px/20px var(--body); min-width: 0; overflow-wrap: anywhere; }
.info-row.full { align-items: flex-start; }
.info-row.full .kv { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.info-row.full .v { text-align: left; }
.info-rows > .info-row + .info-row { border-top: 1px solid var(--n300); padding-top: 10px; margin-top: 6px; }

/* Selection (selection.dart) */
.sel { display: block; width: 100%; text-align: left; border: 0; background: #fff; border-radius: var(--r-lg); padding: 16px; box-shadow: inset 0 0 0 1px var(--n300); transition: box-shadow .15s, background .15s; }
.sel:hover { box-shadow: inset 0 0 0 1px var(--n500); }
.sel.on { background: var(--pc); box-shadow: inset 0 0 0 2px var(--primary); }
.sel.on .icon-sq { background: var(--primary); color: #fff; }
.step { display: flex; flex-direction: column; gap: 8px; }
.step-top { display: flex; justify-content: space-between; font: 600 13px/18px var(--body); }
.step-top span:last-child { color: var(--n600); }
.step-bar { height: 6px; background: var(--n200); border-radius: 999px; overflow: hidden; }
.step-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .35s var(--ease); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { border: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--n300); border-radius: 999px; padding: 8px 14px; font: 600 13px/18px var(--body); color: var(--n700); white-space: nowrap; min-height: 36px; }
.chip.on { background: var(--pc); color: var(--primary); box-shadow: inset 0 0 0 1px var(--pc); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.seg { display: flex; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--n300); overflow: hidden; background: #fff; }
.seg button { flex: 1; border: 0; background: transparent; height: 48px; font: 600 15px var(--body); color: var(--n700); }
.seg button + button { border-left: 1px solid var(--n300); }
.seg button[aria-pressed="true"] { background: var(--pc); color: var(--primary); }

/* Fields (app_text_field.dart) */
.field { position: relative; }
.field-box { position: relative; display: flex; align-items: center; min-height: 56px; background: #fff; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--n500); transition: box-shadow .15s; }
.field-box:focus-within { box-shadow: inset 0 0 0 2px var(--primary); }
.field.err .field-box { box-shadow: inset 0 0 0 2px var(--err); }
.field-box > .i { margin-left: 16px; color: var(--n700); }
.field input, .field textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 22px 16px 8px 12px; font-size: 16px; line-height: 22px; resize: none; }
.field textarea { padding-top: 24px; }
.field-box > .i + .prefix + input, .field-box > .prefix + input { padding-left: 0; }
.field label { position: absolute; left: 48px; top: 17px; color: var(--n700); font-size: 16px; pointer-events: none; transition: all .15s var(--ease); white-space: nowrap; }
.field.no-icon label { left: 16px; } .field.no-icon input { padding-left: 16px; }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label, .field textarea:focus ~ label, .field textarea:not(:placeholder-shown) ~ label, .field.has-prefix label { top: 7px; font-size: 12px; color: var(--n700); }
.field-box:focus-within label { color: var(--primary); }
.field .prefix { padding: 22px 6px 8px 12px; font-size: 16px; line-height: 22px; color: var(--n900); }
.field .suffix { margin-right: 4px; }
.field .help { font-size: 12px; color: var(--n600); padding: 4px 16px 0; }
.field.err .help { color: var(--err); }

/* Lists */
.tile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: #fff; width: 100%; text-align: left; border: 0; min-height: 64px; }
.tile .tile-ico { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--n100); color: var(--n700); display: grid; place-items: center; flex: none; }
.tile .chev { color: var(--n500); }
button.tile:hover, .tile.tap:hover { background: var(--n50); }
.stat { display: flex; align-items: center; gap: 12px; }
.stat .val { font: 700 19px/26px var(--display); }
.switch { width: 52px; height: 32px; border-radius: 999px; background: var(--n200); border: 2px solid var(--n500); position: relative; flex: none; transition: all .15s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--n500); transition: all .15s var(--ease); }
.switch.on { background: var(--primary); border-color: var(--primary); }
.switch.on::after { left: 22px; top: 2px; width: 24px; height: 24px; background: #fff; }

/* Feedback (feedback.dart) */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); font-size: 14px; line-height: 20px; }
.banner .i { margin-top: 0; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 24px; }
.empty .circle { width: 56px; height: 56px; border-radius: 50%; background: var(--n100); color: var(--n700); display: grid; place-items: center; }
.skel { background: var(--n200); border-radius: var(--r-lg); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.spin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--primary); border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Overlays */
.layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(16,24,40,.4); pointer-events: auto; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.dialog { position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); background: #fff; border-radius: var(--r-xl); padding: 24px; pointer-events: auto; box-shadow: var(--e3); animation: pop .2s var(--ease); max-height: 85%; overflow-y: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(-50%) scale(.95); } }
.dialog .d-ico { color: var(--primary); margin-bottom: 12px; display: flex; justify-content: center; }
.dialog .d-ico.warn { color: var(--warn); }
.dialog h2 { font: 700 19px/26px var(--display); margin: 0 0 8px; text-align: center; }
.dialog .d-body { color: var(--n700); font-size: 14px; line-height: 20px; white-space: pre-line; }
.dialog .d-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 8px 16px 24px; pointer-events: auto; animation: up .25s var(--ease); max-height: 80%; overflow-y: auto; }
@keyframes up { from { transform: translateY(100%); } }
.sheet .handle { width: 32px; height: 4px; border-radius: 2px; background: var(--n300); margin: 4px auto 16px; }
.snack { position: absolute; left: 16px; right: 16px; bottom: 88px; background: var(--n900); color: #fff; border-radius: var(--r-md); padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 20px; pointer-events: auto; box-shadow: var(--e3); animation: snack .25s var(--ease); z-index: 70; }
.snack.error { background: var(--err); }
.snack .snack-act { margin-left: auto; color: var(--accent); background: none; border: 0; font-weight: 700; padding: 6px; }
.snack b { display: block; }
@keyframes snack { from { opacity: 0; transform: translateY(12px); } }
.menu { position: absolute; background: #fff; border-radius: var(--r-md); box-shadow: var(--e3), inset 0 0 0 1px var(--n300); padding: 6px; pointer-events: auto; min-width: 180px; animation: fade .15s; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 12px; border-radius: 8px; font-size: 15px; text-align: left; min-height: 48px; }
.menu button:hover { background: var(--n100); }
.menu .i { color: var(--primary); }

/* Bottom navigation (app_shell.dart) */
.nav { flex: none; height: 72px; background: #fff; border-top: 1px solid var(--n300); display: flex; padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box; }
.nav button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 500 11px/14px var(--body); color: var(--n700); position: relative; }
.nav .pill { width: 64px; height: 32px; border-radius: 999px; display: grid; place-items: center; transition: background .2s; position: relative; }
.nav button.on { color: var(--primary); font-weight: 600; }
.nav button.on .pill { background: var(--pc); }
.nav .pill .dot { position: absolute; top: 4px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 2px #fff; }

/* ---------- Screen specifics ---------- */
.splash { background: var(--primary); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.logo-tile { width: 96px; height: 96px; border-radius: var(--r-xl); background: #fff; display: grid; place-items: center; box-shadow: var(--e2); }
.logo-tile img { width: 72px; height: 72px; }
.logo-tile.sm { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--e1); }
.logo-tile.sm img { width: 30px; height: 30px; }
.logo-tile.md { width: 72px; height: 72px; border-radius: 20px; }
.logo-tile.md img { width: 52px; height: 52px; }
.splash .spin { border-color: #fff; border-right-color: transparent; width: 28px; height: 28px; border-width: 2.5px; }
.welcome { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 4px; }
.welcome .h-l span { color: var(--accent-text); }
.trust { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--n700); font-size: 12px; text-align: center; }

.bell-wrap { display: grid; place-items: center; padding: 18px 0 6px; }
.bell { position: relative; width: min(220px, 55vw); aspect-ratio: 1; display: grid; place-items: center; }
.bell .ring { position: absolute; inset: -6%; border-radius: 50%; background: rgba(232,245,233,.55); }
.bell .ring.outer { inset: -15%; background: rgba(232,245,233,.35); animation: breathe 2.4s ease-in-out infinite alternate; }
@keyframes breathe { from { transform: scale(.92); } to { transform: scale(1); } }
.bell button { position: relative; width: 100%; height: 100%; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 12px 30px rgba(27,94,32,.35); transition: transform .15s, background .15s; padding: 16px; }
.bell button:hover { background: var(--primary-hover); }
.bell button:active { transform: scale(.97); }
.bell .i { width: 48px; height: 48px; }
.bell b { font: 700 16px/22px var(--body); max-width: 80%; text-align: center; }
.bell .spin { border-color: #fff; border-right-color: transparent; width: 40px; height: 40px; }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick .card { display: flex; flex-direction: column; gap: 10px; }
.quick .top { display: flex; justify-content: space-between; align-items: flex-start; }

.timeline { display: flex; flex-direction: column; }
.tl-step { display: flex; gap: 12px; min-height: 56px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; width: 24px; flex: none; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--n500); background: #fff; display: grid; place-items: center; color: #fff; flex: none; transition: all .3s; }
.tl-step.done .tl-dot { background: var(--primary); border-color: var(--primary); }
.tl-line { flex: 1; width: 2px; background: var(--n300); margin: 2px 0; transition: background .3s; }
.tl-step.done .tl-line { background: var(--primary); }
.tl-step:last-child .tl-line { display: none; }
.tl-text { padding-top: 2px; padding-bottom: 12px; color: var(--n600); }
.tl-step.done .tl-text { color: var(--n900); }

.result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px; }
.result .big { width: 112px; height: 112px; border-radius: 50%; background: var(--pc); color: var(--primary); display: grid; place-items: center; animation: scalein .5s cubic-bezier(.34,1.56,.64,1); margin-bottom: 8px; }
.result .big .i { width: 56px; height: 56px; }
@keyframes scalein { from { transform: scale(.6); opacity: 0; } }

.map { position: absolute; inset: 0; background: #e8ecef; z-index: 0; }
.map-wrap { position: relative; flex: 1; min-height: 0; }
.map-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; z-index: 500; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 0; box-shadow: var(--e2); display: grid; place-items: center; color: var(--n900); flex: none; }
.search-pill { flex: 1; height: 48px; border-radius: 999px; background: #fff; border: 0; box-shadow: var(--e2); display: flex; align-items: center; gap: 10px; padding: 0 16px; color: var(--n600); font-size: 15px; text-align: left; min-width: 0; }
.search-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.center-pin { position: absolute; left: 50%; top: 50%; z-index: 450; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; pointer-events: none; transition: transform .15s; }
.center-pin.lift { transform: translate(-50%, calc(-100% - 8px)); }
.center-pin .head { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: var(--e3); }
.center-pin .stem { width: 3px; height: 14px; background: var(--primary); border-radius: 0 0 2px 2px; }
.osm { position: absolute; left: 8px; bottom: 8px; z-index: 500; background: rgba(255,255,255,.85); font-size: 11px; padding: 2px 6px; border-radius: 6px; color: var(--n800); text-decoration: none; }
.panel { flex: none; background: #fff; border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -8px 24px rgba(16,24,40,.08); padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 2; margin-top: -24px; }
.coords { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--n600); }
.leaflet-container { font-family: var(--body); background: #e8ecef; }
.leaflet-control-attribution { display: none; }
.pin-marker { color: var(--primary); filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.pin-marker.red { color: var(--err); }
.pin-marker svg { width: 40px; height: 40px; fill: currentColor; stroke: #fff; stroke-width: 1.5; }
.rider-marker { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: var(--e3); display: grid; place-items: center; color: var(--info); }
.rider-marker svg { width: 22px; height: 22px; fill: var(--info); stroke: var(--info); transition: transform .3s linear; }

.nav-banner { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 500; }
.nav-banner .card-brand { display: flex; gap: 14px; align-items: center; padding: 16px; }
.nav-banner .man { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; }
.nav-banner .man .i { width: 32px; height: 32px; }
.nav-banner .dist { font: 800 28px/32px var(--display); letter-spacing: -.4px; }
.nav-banner .instr { color: rgba(255,255,255,.82); font-size: 15px; line-height: 20px; }
.nav-fabs { position: absolute; right: 12px; z-index: 500; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 500; }
.nav-bottom .card { display: flex; gap: 12px; align-items: center; }
.eta { font: 800 24px/30px var(--display); color: var(--primary); }

.av { width: 56px; height: 56px; border-radius: 50%; background: var(--pc); color: var(--primary); display: grid; place-items: center; font: 700 22px var(--display); flex: none; }
.grp { font: 600 13px/18px var(--body); color: var(--n600); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 -4px; }
.notif { display: flex; gap: 12px; align-items: flex-start; }
.notif .icon-sq.read { background: var(--n100); }
.notif .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 6px; vertical-align: middle; }

/* Start screen (demo only) */
.start { background: linear-gradient(180deg, var(--primary) 0, var(--primary) 220px, var(--canvas) 220px); }
.start .body { padding-top: 24px; }
.start-hero { color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 8px; }
/* "Already subscribed: go straight to the home screen" is longer than the phone is wide in English: let it wrap. */
.start .btn-ghost { white-space: normal; height: auto; min-height: 48px; padding: 12px 16px; text-align: center; }
.start-hero p { color: rgba(255,255,255,.85); font-size: 14px; line-height: 20px; margin: 0; max-width: 320px; }
.role-card { display: flex; gap: 14px; align-items: flex-start; }
.role-card .icon-sq { width: 52px; height: 52px; border-radius: 16px; }
.role-card .icon-sq .i { width: 26px; height: 26px; }
.lang-mini { display: flex; justify-content: center; gap: 8px; }
.lang-mini button { border: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--n300); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; color: var(--n700); min-height: 40px; }
.lang-mini button[aria-pressed="true"] { background: var(--pc); color: var(--primary); box-shadow: inset 0 0 0 1px var(--pc); }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 18px; color: var(--n700); background: var(--warn-c); border-radius: var(--r-md); padding: 12px; }
.note .i { color: var(--warn-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.stack > .badge, .stack-sm > .badge { align-self: flex-start; }

/* ---------- Onboarding (guide_screen.dart, onboarding_welcome_screen.dart) ---------- */
.intro-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px 8px; }
.intro-body { display: flex; flex-direction: column; }
.intro-pic { width: 168px; height: 168px; border-radius: 50%; background: var(--pc); color: var(--primary); display: grid; place-items: center; margin-bottom: 12px; }
.intro-pic .i { width: 72px; height: 72px; }
.dots { display: flex; justify-content: center; gap: 4px; padding: 12px 0 4px; }
.dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--n300); transition: width .2s var(--ease), background .2s; }
.dots i.on { width: 24px; background: var(--primary); }
.num-dot { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--pc); color: var(--primary); display: grid; place-items: center; font: 700 16px/1 var(--display); }
.num-dot.done { background: var(--primary); color: #fff; }
.ask { margin-bottom: 4px; }
.ask p { margin-top: 4px; }
