/* TransitAI web demo — visual language from the SwiftUI app:
   canvas #F6F6F6, white cards r16, black primary actions, gray #86868B. */
:root {
  --canvas: #F6F6F6;
  --card: #FFFFFF;
  --ink: #000000;
  --ink-2: #1d1d1f;
  --muted: #86868B;
  --muted-2: #8e8e93;
  --line: #E5E5EA;
  --soft: #F7F7F7;
  --danger: #E5383B;
  --ok: #34C759;
  --gps: #0A84FF;
  --shadow-card: 0 10px 20px rgba(0, 0, 0, .05);
  --shadow-float: 0 10px 25px rgba(0, 0, 0, .08);
  --page: #e9e9ee;
  --page-ink: #1d1d1f;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--page); color: var(--page-ink); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gps); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.muted-ic { color: var(--muted); flex: none; }
.ic { flex: none; display: block; }

/* ---- Demo bar ---- */
.demo-bar { position: fixed; inset: 0 0 auto 0; height: 32px; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: #1c1c1e; color: #e5e5ea; font-size: 12.5px; }
.demo-bar__back { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.demo-bar__back:hover { text-decoration: underline; }
.demo-bar__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar__note { color: #a1a1a6; white-space: nowrap; }
.demo-bar__spacer { flex: 1; }
.demo-bar__btn { white-space: nowrap; flex: none; height: 22px; min-width: 22px; border-radius: 11px; border: 1px solid #48484a; background: #2c2c2e; color: #fff; font-size: 12px; font-weight: 700; padding: 0 7px; }
.demo-bar__btn--text { font-weight: 600; padding: 0 10px; }
.demo-bar__btn:hover { background: #3a3a3c; }

/* ---- Stage ---- */
.stage { min-height: 100vh; padding: 52px 24px 24px; display: grid; grid-template-columns: minmax(0, 300px) auto minmax(0, 320px); gap: 44px; justify-content: center; align-items: start; }
.side { padding-top: 40px; font-size: 14px; line-height: 1.5; }
.side__eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side__eyebrow--gap { margin-top: 26px; }
.side__title { margin: 0 0 10px; font-size: 28px; font-weight: 900; letter-spacing: -.02em; color: #000; }
.side__title--sm { font-size: 20px; }
.side__lead { margin: 0 0 16px; color: #3a3a3c; }
.side__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-chip { border: 0; background: #fff; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.08); transition: transform .15s; }
.ex-chip:hover { transform: translateY(-1px); }
.side__list { margin: 0; padding-left: 18px; color: #3a3a3c; }
.side__list li { margin-bottom: 8px; }
.trace { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.trace li { background: #fff; border-radius: 12px; padding: 8px 12px; display: grid; gap: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.trace__k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.trace__v { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: #000; word-break: break-word; }
.trace .trace__empty { color: var(--muted); font-size: 13px; }
.rd { margin: 0 0 6px; font-size: 13px; color: #3a3a3c; }

/* ---- Phone frame ---- */
.phone { position: relative; padding: 13px; border-radius: 62px; background: #111; box-shadow: 0 0 0 2px #2a2a2c, 0 30px 70px rgba(0,0,0,.28), inset 0 0 0 2px #3a3a3c; }
.phone::before { content: ""; position: absolute; right: -4px; top: 190px; width: 4px; height: 90px; border-radius: 0 3px 3px 0; background: #2a2a2c; }
.phone::after { content: ""; position: absolute; left: -4px; top: 150px; width: 4px; height: 60px; border-radius: 3px 0 0 3px; background: #2a2a2c; box-shadow: 0 80px 0 #2a2a2c; }
.phone__screen { position: relative; width: 390px; height: min(844px, calc(100vh - 32px - 60px)); min-height: 640px; border-radius: 50px; overflow: hidden; background: var(--canvas); color: var(--ink); font-size: 15px; }

.statusbar { position: absolute; inset: 0 0 auto 0; height: 50px; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 40px; font-weight: 700; font-size: 16px; pointer-events: none; }
.statusbar__island { position: absolute; left: 50%; top: 11px; width: 120px; height: 34px; margin-left: -60px; border-radius: 20px; background: #000; }
.statusbar__icons { display: flex; align-items: center; gap: 6px; }
.statusbar__icons svg { fill: #000; }
.statusbar__battery { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 13px; border-radius: 4px; background: #000; color: #fff; font-size: 9.5px; font-weight: 800; position: relative; }
.statusbar__battery::after { content: ""; position: absolute; right: -3px; top: 4px; width: 2px; height: 5px; border-radius: 0 1px 1px 0; background: #000; opacity: .45; }
.home-indicator { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #000; z-index: 40; }

.view { position: absolute; inset: 50px 0 0 0; display: flex; flex-direction: column; overflow: hidden; }
.view[hidden] { display: none; }
.scroll-pad, .view--map { overflow-y: auto; }
.scroll-pad { flex: 1; padding: 0 20px 130px; }
.view--map { padding: 0 20px 130px; }

/* ---- Chat ---- */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: var(--canvas); border-bottom: 1px solid #ececf0; flex: none; }
.view--saved .chat-head { border-bottom: 0; }
.app-logo { width: 44px; height: 44px; border-radius: 12px; background: #000; color: #fff; display: grid; place-items: center; flex: none; }
.chat-head__titles { flex: 1; min-width: 0; }
.chat-head__name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.chat-head__sub { font-size: 10px; font-weight: 700; letter-spacing: .15em; color: var(--muted-2); }
.gps-chip { white-space: nowrap; display: flex; align-items: center; gap: 6px; border: 0; background: #efeff2; border-radius: 12px; padding: 7px 11px; font-size: 11px; font-weight: 600; color: var(--muted-2); max-width: 150px; }
.gps-chip__where { color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70px; }
.gps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.progress { height: 2px; background: linear-gradient(90deg, #000 0 40%, transparent 40%); background-size: 200% 100%; animation: prog 1s linear infinite; flex: none; }
@keyframes prog { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.messages { position: relative; flex: 1; overflow-y: auto; padding: 16px 16px 250px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 86%; }
.msg--user { align-self: flex-end; align-items: flex-end; gap: 4px; }
.msg--wide { max-width: 100%; width: 100%; }
.bubble { background: #fff; border-radius: 20px; padding: 13px 17px; box-shadow: 0 2px 8px rgba(0,0,0,.05); line-height: 1.42; font-size: 15px; }
.bubble--user { background: #000; color: #fff; }
.bubble--loading { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.bubble--loading .ic { color: #000; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.msg__meta { font-size: 10.5px; color: var(--muted); padding-right: 6px; }
.choices { display: grid; gap: 8px; width: 100%; min-width: 260px; }
.choice { display: flex; align-items: center; gap: 12px; border: 0; background: #fff; border-radius: 16px; padding: 11px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); text-align: left; }
.choice__n { width: 30px; height: 30px; border-radius: 15px; background: #000; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.choice__name { flex: 1; font-weight: 600; }
.choice__lines { display: flex; gap: 4px; }

/* line badges */
.lb { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--lc); color: var(--lt); font-weight: 800; font-size: 13px; flex: none; }
.lb--tram, .lb--bus { border-radius: 6px; }
.lb--sm { min-width: 22px; height: 20px; font-size: 11px; border-radius: 5px; padding: 0 5px; vertical-align: middle; margin-right: 4px; }

/* route card (RouteCard.swift) */
.route-card { width: 100%; background: var(--soft); border-radius: 20px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.nav-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; }
.nav-head__ic { width: 36px; height: 36px; border-radius: 11px; background: #000; color: #fff; display: grid; place-items: center; }
.nav-head__label { flex: 1; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.nav-head__chip { background: #000; color: #fff; font-size: 12.5px; font-weight: 800; padding: 5px 11px; border-radius: 12px; }
.nav-dir { display: grid; justify-items: center; gap: 6px; padding: 18px 12px 14px; text-align: center; }
.nav-dir__arrow { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: transform .4s; }
.nav-dir__t { font-weight: 800; font-size: 16px; margin-top: 4px; }
.nav-dir__s { color: var(--muted); font-size: 14px; font-weight: 500; }
.route-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route-sum > div { background: #fff; padding: 10px 6px; display: grid; justify-items: center; gap: 2px; }
.route-sum__k { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.route-sum__v { font-size: 16px; font-weight: 800; white-space: nowrap; }
.dep-banner { display: flex; align-items: center; gap: 6px; margin: 12px 14px 0; padding: 9px 12px; background: #000; color: #fff; border-radius: 14px; font-weight: 700; font-size: 14px; flex-wrap: wrap; }
.dep-banner__time { margin-left: auto; font-weight: 500; color: #c7c7cc; font-size: 12.5px; }
.route-note { display: flex; align-items: center; gap: 6px; margin: 8px 14px 0; font-size: 12.5px; color: #3a3a3c; background: #fff; padding: 7px 10px; border-radius: 10px; }
.steps { list-style: none; margin: 0; padding: 16px 16px 6px; }
.step { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.step::before { content: ""; position: absolute; left: 18px; top: 40px; bottom: 2px; width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--lc, #8e8e93) 35%, transparent); }
.step--last::before { display: none; }
.step--walk { --lc: #8e8e93; }
.step__badge { width: 40px; min-width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
.step__badge--walk { display: grid; place-items: center; background: #8e8e93; color: #fff; }
.step__body { min-width: 0; padding-top: 1px; }
.step__title { font-weight: 700; font-size: 15px; }
.step__meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.step__meta strong { color: #000; }
.step__dep { display: inline-block; margin-top: 5px; font-size: 12px; font-weight: 700; background: #fff; border-radius: 8px; padding: 3px 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.step__inter { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.step__inter summary { cursor: pointer; font-weight: 600; }
.step__inter ol { margin: 6px 0 0; padding-left: 18px; }
.steps--compact { padding: 12px 0 0; }
.steps--compact .step__dep { display: none; }
.route-actions { display: flex; gap: 8px; padding: 4px 14px 14px; }
.btn-soft { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: #fff; border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: 13.5px; box-shadow: 0 2px 8px rgba(0,0,0,.06); flex: 1; }
.btn-soft.is-on { background: #000; color: #fff; }
.btn-soft--sm { flex: none; padding: 8px 10px; }

/* composer + quick actions (ContentView.swift) */
.composer { position: absolute; left: 0; right: 0; bottom: 96px; z-index: 20; padding: 0 0 4px; background: linear-gradient(to bottom, rgba(246,246,246,0), var(--canvas) 16%); }
.composer[hidden] { display: none; }
.quick { display: flex; gap: 8px; padding: 22px 20px 10px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.qa { display: inline-flex; align-items: center; gap: 9px; border: 0; background: #fff; border-radius: 16px; padding: 11px 16px; font-weight: 700; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.12); white-space: nowrap; transition: transform .15s; }
.qa:active, .sq-btn:active, .tab:active { transform: scale(.95); }
.inputrow { display: flex; gap: 10px; padding: 6px 16px 8px; }
.inputbox { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 0 16px; height: 56px; box-shadow: var(--shadow-float); }
.inputbox:focus-within { box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.inputbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: #000; }
.inputbox input::placeholder { color: #c7c7cc; }
.inputbox__clear { border: 0; background: none; padding: 0; color: var(--muted); }
.inputbox--sheet { height: 46px; box-shadow: none; background: #f2f2f5; margin-bottom: 12px; }
.sq-btn { width: 56px; height: 56px; border: 0; border-radius: 16px; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-float); flex: none; transition: transform .15s, background .2s; }
.sq-btn--send { background: #000; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.sq-btn--send:disabled { background: var(--line); color: var(--muted); box-shadow: 0 8px 20px rgba(0,0,0,.05); cursor: default; }
.sq-btn.is-rec { background: #ff3b30; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,59,48,.18); } }

/* tab bar */
.tabbar { position: absolute; left: 16px; right: 16px; bottom: 26px; height: 64px; z-index: 25; display: flex; background: #fff; border-radius: 24px; box-shadow: 0 -8px 35px rgba(0,0,0,.15); }
.tab { flex: 1; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 24px; transition: transform .15s, color .2s; }
.tab[aria-current="page"] { color: #000; }

/* ---- Page headers ---- */
.page-head { padding: 14px 0 10px; }
.page-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.page-title { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.02em; }
.big-title { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: -.02em; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.settings-head { padding: 16px 0 6px; }
.sec-h { display: flex; align-items: center; gap: 6px; margin: 26px 12px 10px; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-card); }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 34px 20px; }
.empty p { margin: 0; }

/* ---- Map ---- */
.seg { display: inline-flex; background: #e9e9ee; border-radius: 12px; padding: 3px; flex: none; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button[aria-selected="true"] { background: #fff; color: #000; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.map-wrap { position: relative; background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); overflow: hidden; }
.map { display: block; width: 100%; height: auto; aspect-ratio: 1.3; background: #fbfbfd; }
.net { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.net--tram { opacity: .45; }
.net--bus { opacity: .55; }
.rt-casing { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.rt-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rt-walk { stroke: #555; stroke-linecap: round; }
.st { fill: #fff; }
.st--x { stroke: #000 !important; }
.st--route { fill: #fff; stroke: #000 !important; }
.st--blocked { fill: #ffd8d8; }
.st-label { fill: #1d1d1f; font-family: var(--font); font-weight: 600; paint-order: stroke; stroke: #fbfbfd; stroke-linejoin: round; }
.st-label--route { font-weight: 800; }
.gps-halo { fill: rgba(10,132,255,.18); }
.gps-pt { fill: var(--gps); stroke: #fff; }
.end-pin { fill: #000; }
.map-fit { position: absolute; top: 10px; right: 10px; border: 0; background: rgba(255,255,255,.95); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 12px 10px; font-size: 11.5px; color: var(--muted); border-top: 1px solid #f0f0f3; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 16px; height: 4px; border-radius: 2px; display: inline-block; }
.lg--metro { background: linear-gradient(90deg, #00A651 33%, #FFD700 33% 66%, #E51E25 66%); }
.lg--tram { background: #7A1631; opacity: .6; height: 3px; }
.lg--bus { background: repeating-linear-gradient(90deg, #0069B4 0 4px, transparent 4px 6px); }
.lg--walk { background: repeating-linear-gradient(90deg, #555 0 2px, transparent 2px 5px); }
.map-below { padding-top: 14px; display: grid; gap: 10px; }
.map-route { padding: 14px 16px 4px; }
.map-route__head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.map-route__to { font-weight: 800; font-size: 17px; }
.map-route__lines { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.nearby { padding: 12px 14px; }
.nearby__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nearby__name { font-weight: 800; }
.nearby__deps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.nearby__deps li { display: flex; align-items: center; gap: 6px; }
.nearby__deps span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Saved ---- */
.list { display: grid; gap: 10px; }
.sroute { display: flex; align-items: stretch; background: #fff; border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden; }
.sroute__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 12px 6px 12px 14px; text-align: left; }
.sroute__ic { width: 40px; height: 40px; border-radius: 12px; background: #000; color: #fff; display: grid; place-items: center; flex: none; }
.sroute__ic--muted { background: #f0f0f3; color: var(--muted); }
.sroute__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sroute__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sroute__path { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sroute__lines { display: flex; margin-top: 3px; }
.sroute__dur { font-weight: 800; font-size: 14px; white-space: nowrap; }
.sroute__acts { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 8px 6px 0; }
.sroute--hist .sroute__acts { flex-direction: row; align-items: center; }
.icon-btn { width: 30px; height: 30px; border: 0; border-radius: 9px; background: none; color: #c7c7cc; display: grid; place-items: center; }
.icon-btn:hover { background: #f2f2f5; color: #000; }
.icon-btn.is-on { color: #ffb800; }
.icon-btn--danger:hover { color: var(--danger); }

/* ---- Settings (SettingsScreen.swift) ---- */
.lang-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.lang-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; border: 0; border-radius: 14px; background: none; font-weight: 800; font-size: 17px; }
.lang-btn[aria-pressed="true"] { background: #000; color: #fff; }
.flag { font-size: 22px; }
.trow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; border: 0; background: none; text-align: left; position: relative; }
.trow + .trow::before { content: ""; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: #ececf0; }
.trow__ic { width: 32px; display: grid; place-items: center; flex: none; color: #000; }
.trow__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.trow__t { font-weight: 600; font-size: 17px; }
.trow__s { font-size: 14px; color: var(--muted); }
.trow--danger, .trow--danger .trow__ic { color: var(--danger); }
.switch { width: 58px; height: 34px; border-radius: 17px; border: 0; background: #ececf0; position: relative; flex: none; transition: background .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch[aria-checked="true"] { background: #000; }
.switch[aria-checked="true"] span { transform: translateX(24px); }
.mini-seg { display: inline-flex; background: #ececf0; border-radius: 10px; padding: 2px; flex: none; }
.mini-seg button { border: 0; background: none; border-radius: 8px; padding: 6px 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.mini-seg button[aria-checked="true"] { background: #fff; color: #000; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---- Sheets, toast ---- */
.sheet-layer { position: absolute; inset: 0; z-index: 60; }
.sheet-layer[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.28); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 78%; overflow-y: auto; background: var(--canvas); border-radius: 26px 26px 0 0; padding: 10px 18px 34px; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: #c7c7cc; margin: 0 auto 12px; }
.sheet__title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.sheet__sub { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.sheet__row { display: flex; gap: 8px; margin-top: 12px; }
.stop-list { display: grid; gap: 6px; }
.stop-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; background: #fff; border-radius: 12px; padding: 12px 14px; font-weight: 600; text-align: left; }
.stop-opt[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #000; }
.toast { position: absolute; left: 50%; top: 60px; transform: translateX(-50%); z-index: 70; background: rgba(0,0,0,.86); color: #fff; padding: 9px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; max-width: 86%; text-align: center; }
.toast[hidden] { display: none; }

/* ---- Tour ---- */
.tour { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.35); display: grid; place-items: center; padding: 16px; }
.tour[hidden] { display: none; }
.tour__card { width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 22px 22px 18px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.tour__step { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.tour__title { margin: 6px 0 8px; font-size: 22px; font-weight: 900; }
.tour__text { margin: 0 0 18px; line-height: 1.5; color: #3a3a3c; }
.tour__actions { display: flex; justify-content: flex-end; gap: 8px; }
.tour__skip, .tour__next { border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 700; }
.tour__skip { background: #f2f2f5; }
.tour__next { background: #000; color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 1180px) {
  .stage { grid-template-columns: auto; justify-items: center; gap: 28px; }
  .phone { grid-row: 1; }
  .side { max-width: 560px; width: 100%; padding-top: 0; }
}
@media (max-width: 600px) {
  .demo-bar { gap: 10px; padding: 0 10px; font-size: 12px; }
  .demo-bar__note { display: none; }
  .stage { padding: 32px 0 24px; gap: 24px; }
  .phone { padding: 0; border-radius: 0; background: none; box-shadow: none; width: 100%; }
  .phone::before, .phone::after { display: none; }
  .phone__screen { width: 100%; height: calc(100vh - 32px); height: calc(100dvh - 32px); min-height: 560px; border-radius: 0; }
  .statusbar, .home-indicator { display: none; }
  .view { top: 0; }
  .tabbar { bottom: 12px; }
  .composer { bottom: 82px; }
  .side { padding: 0 16px; }
  .toast { top: 14px; }
}
@media (max-width: 370px) {
  .route-sum { grid-template-columns: repeat(2, 1fr); }
  .gps-chip__where { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
