:root {
  color-scheme: light;
  --paper: #f5f7fb;
  --white: #fff;
  --ink: #15223c;
  --text: #33425d;
  --muted: #53647e;
  --blue: #2356df;
  --blue-deep: #1946c7;
  --blue-soft: #edf3ff;
  --line: #e0e6ef;
  --shadow: 0 2px 3px #192d5010, 0 8px 24px #192d5006;
  --radius: 19px;
  --green: #16806b;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
button {
  border: 0; cursor: pointer; color: inherit;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button:disabled { cursor: default; }
a { color: inherit; }
:focus-visible { outline: 3px solid #4678ff; outline-offset: 3px; }
.symbols { width: 0; height: 0; position: absolute; overflow: hidden; }
.icon { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-button { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; background: #fff; border-radius: 10px; color: var(--text); }
.icon-button:disabled { opacity: .48; }
.topbar { position: relative; z-index: 2; border-bottom: 1px solid var(--line); background: var(--white); padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 1160px; margin: auto; padding: 0 24px; height: 68px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; width: max-content; gap: 10px; align-items: center; text-decoration: none; font-size: 21px; font-weight: 790; letter-spacing: -.8px; }
.brand-light { color: var(--blue); }
.brand-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--blue); display: grid; place-items: center; color: white; }
.brand-icon .icon { width: 22px; height: 22px; }
.top-nav { display: flex; gap: 3px; padding: 4px; border-radius: 13px; background: var(--paper); }
.top-nav button { background: transparent; min-height: 40px; padding: 0 15px; border-radius: 10px; font-size: 14px; font-weight: 680; color: var(--muted); }
.top-nav button[aria-current="page"] { color: var(--blue-deep); background: white; box-shadow: 0 1px 3px #17244116; }
.gps-control { display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: end; min-height: 44px; min-width: 44px; padding: 0 13px; border-radius: 10px; border: 1px solid #d9e3ff; font-size: 13px; font-weight: 750; color: var(--blue-deep); background: var(--blue-soft); white-space: nowrap; }
.gps-control[data-kind="on"] { background: #e7f7f2; color: #146e5b; border-color: #caeade; }
.gps-control .icon { width: 18px; height: 18px; }
.app { max-width: 1160px; margin: 0 auto; padding: 39px 24px 22px; }
.route-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin: 0 0 23px; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: var(--blue-deep); font-weight: 780; letter-spacing: .105em; font-size: 11px; line-height: 1.25; text-transform: uppercase; }
.eyebrow-mark { width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 3px; transform: rotate(45deg); }
.demo-tag { margin-left: 4px; background: #e8edf5; color: var(--muted); border-radius: 5px; padding: 4px 6px; letter-spacing: .06em; white-space: nowrap; }
.route-heading h1 { margin: 5px 0 2px; font-size: clamp(34px, 4.5vw, 49px); line-height: 1.06; font-weight: 800; letter-spacing: -.055em; overflow-wrap: anywhere; }
.area, .muted { color: var(--muted); font-size: 15px; line-height: 1.55; }
.area { text-wrap: pretty; }
.route-stats { flex: none; display: flex; gap: 20px; align-items: center; background: white; box-shadow: var(--shadow); border: 1px solid var(--line); border-radius: 13px; padding: 11px 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat strong { font-size: 16px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.demo-notice { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 12px 2px 15px; margin-bottom: 15px; background: #eaf1ff; color: #233f79; border: 1px solid #dae5ff; border-radius: 12px; font-size: 14px; }
.demo-notice strong { font-weight: 760; }
.text-button { min-height: 44px; padding: 0 7px; border-radius: 9px; background: transparent; text-align: left; color: var(--blue-deep); font-size: 14px; font-weight: 730; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: #9e293b; }
.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 720; }
#progress-count { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
progress { flex: 1; width: 100%; height: 7px; border: none; border-radius: 12px; appearance: none; color: var(--blue); background: #dfe6f2; overflow: hidden; }
progress::-webkit-progress-bar { background: #dfe6f2; }
progress::-webkit-progress-value { background: var(--blue); border-radius: 12px; transition: width .2s; }
progress::-moz-progress-bar { background: var(--blue); border-radius: 12px; }
.guide-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.19fr); gap: 17px; align-items: start; }
.directions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.surface { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.turn-card { overflow: hidden; min-width: 0; color: white; background: radial-gradient(ellipse at 91% 0%, #253f75, #152543 67%); border: 1px solid #22365b; border-radius: var(--radius); box-shadow: 0 9px 23px #132a541e; padding: 14px 20px 16px; }
.turn-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.turn-current { display: flex; align-items: center; gap: 8px; color: #d5e0f5; font-weight: 740; font-size: 11px; letter-spacing: .105em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #86a8ff; box-shadow: 0 0 0 3px #94b3ff27; }
.audio-button { color: #f0f5ff; border: 1px solid #fff2; background: #d5e3ff16; }
.audio-button:hover { background: #d5e3ff30; }
.maneuver { display: flex; align-items: center; gap: 15px; margin: 8px 0 17px; min-height: 76px; }
.maneuver-icon { display: grid; place-items: center; flex: 0 0 69px; height: 69px; border-radius: 17px; color: #f7faff; background: #3159b9; box-shadow: inset 0 0 0 1px #a4bfff46; }
.maneuver-icon .icon { width: 43px; height: 43px; stroke-width: 1.85; }
.turn-action { margin: 0 0 3px; color: #dce9ff; font-size: 13px; font-weight: 710; line-height: 1.3; }
.maneuver-text { min-width: 0; }
.maneuver h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.044em; line-height: 1.07; text-wrap: pretty; overflow-wrap: anywhere; }
.turn-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 9px; min-height: 39px; padding-top: 10px; border-top: 1px solid #dce9ff33; }
.turn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; color: #e0eaff; font-size: 12px; font-weight: 700; background: #f2f6ff13; }
.turn-chip .icon { width: 15px; height: 15px; }
.turn-chip.service { background: #fdd982; color: #47320a; }
#turn-details { margin: -2px 0 14px; color: #edf3ff; font-size: 14px; line-height: 1.4; }
#turn-details ol { margin: 0; padding: 0 0 0 22px; }
#turn-details li + li { margin-top: 5px; }
.step-controls { display: grid; grid-template-columns: minmax(80px, .42fr) minmax(0, 1fr); gap: 9px; }
.primary, .secondary { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 48px; border-radius: 11px; border: 1px solid transparent; padding: 7px 13px; font-size: 15px; text-align: center; font-weight: 760; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-deep); }
.secondary { background: white; border-color: #d8dfeb; color: var(--text); }
.secondary:hover:not(:disabled) { background: #f3f6fc; }
.secondary:disabled, .primary:disabled { color: #707a8d; background: #eef1f6; border-color: #e0e5ed; }
.up-next { width: 100%; display: flex; text-align: left; align-items: center; gap: 11px; padding: 10px 13px; min-height: 65px; border-radius: 12px; }
.up-next:hover { border-color: #adbcdf; }
.up-next .up-text { flex: 1; min-width: 0; }
.up-label { display: block; color: var(--muted); font-weight: 780; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 3px; }
.up-next strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.up-next > .icon { width: 16px; height: 16px; color: var(--muted); }
.soft-icon { display: inline-grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-deep); --icon-bg: var(--blue-soft); }
.soft-icon .icon { width: 19px; height: 19px; }
.map-card { overflow: hidden; }
.map-header { padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.map-title { display: flex; gap: 8px; align-items: center; }
.map-title h2 { font-size: 16px; letter-spacing: -.025em; }
.map-title p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.map-live { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 740; color: var(--muted); white-space: nowrap; background: #f0f3f8; border-radius: 30px; padding: 5px 8px; }
.status-dot { width: 7px; height: 7px; background: #8492a8; border-radius: 50%; }
.map-live[data-kind="on"] { background: #eaf8f3; color: #176451; }
.map-live[data-kind="on"] .status-dot { background: var(--green); }
.map-live[data-kind="warning"] { background: #fff2d9; color: #644607; }
.map-live[data-kind="warning"] .status-dot { background: #a77619; }
.map-viewport { height: clamp(280px, 33vw, 407px); position: relative; display: grid; place-items: center; background: #eef0e4; border-block: 1px solid #e1e6dc; overflow: hidden; }
.map-viewport[data-zoomed="true"] { cursor: grab; }
.map-viewport[data-dragging="true"] { cursor: grabbing; }
#map-svg { display: block; width: 100%; height: 100%; user-select: none; }
.map-viewport[data-zoomed="true"] #map-svg { touch-action: none; }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.map-controls { display: grid; gap: 7px; position: absolute; top: 10px; right: 10px; }
.map-controls .icon-button { border: 1px solid #d0d9e6; box-shadow: 0 2px 6px #14213616; }
.map-controls .icon { width: 19px; height: 19px; }
.zoom-group { display: grid; overflow: hidden; border-radius: 10px; border: 1px solid #d0d9e6; box-shadow: 0 2px 6px #14213616; }
.zoom-group .icon-button { border: 0; border-radius: 0; box-shadow: none; min-width: 44px; min-height: 44px; }
.zoom-group .icon-button + .icon-button { border-top: 1px solid #d0d9e6; }
.map-controls button:hover:not(:disabled) { color: var(--blue-deep); background: #eff4ff; }
.map-footer { padding: 10px 14px 12px; }
.map-legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 11px; font-weight: 720; color: var(--text); }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 100%; background: var(--blue); }
.legend-dot.you { background: var(--green); }
#gps-status { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.map-distance { color: var(--blue-deep); font-size: 12px; margin-top: 3px; font-weight: 700; }
.map-credit { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.assist-status { color: var(--muted); font-size: 13px; margin: 9px 1px 0; line-height: 1.4; }
.app-footer { margin: 25px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; color: var(--muted); font-size: 14px; }
.app-footer span:first-child { font-weight: 770; }
.app-footer span + span::before { content: '/'; color: #8d9bb0; margin-right: 9px; }
.app-footer a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }
.app-footer a:hover { color: var(--blue-deep); }
.about-header { display: flex; justify-content: space-between; }
.about-home { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue-deep); font-size: 14px; font-weight: 700; text-underline-offset: 3px; }
.about-main { max-width: 780px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) 20px calc(24px + env(safe-area-inset-bottom)); }
.about-card { padding: clamp(24px, 5vw, 42px); }
.about-card h1 { margin-bottom: 24px; font-size: clamp(32px, 6vw, 44px); line-height: 1.1; letter-spacing: -.045em; }
.about-card h2 { margin: 32px 0 14px; font-size: clamp(24px, 5vw, 30px); line-height: 1.2; letter-spacing: -.035em; }
.about-card p { color: var(--text); font-size: 17px; line-height: 1.75; }
.about-card p + p { margin-top: 22px; }
.about-card ol { margin: 20px 0 0; padding-left: 26px; color: var(--text); font-size: 17px; line-height: 1.75; }
.about-card li + li { margin-top: 18px; }
.about-card a { color: var(--blue-deep); text-underline-offset: 3px; }
.about-card .about-credit { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 16px; }
.bottom-nav { display: none; }
.list-pane { padding: 21px; }
.pane-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pane-heading h2, .settings-card h2 { font-size: 24px; letter-spacing: -.04em; }
.pane-heading .eyebrow, .settings-card .eyebrow { margin-bottom: 4px; }
.list-tools { display: flex; gap: 9px; flex-wrap: wrap; }
.search { display: flex; flex: 1 1 235px; gap: 9px; align-items: center; min-height: 46px; padding: 0 11px; background: #f6f8fc; border: 1px solid #d9e2f0; border-radius: 10px; color: #5c7095; }
.search:focus-within { outline: 2px solid #6190ff; }
.search input { appearance: none; font-size: 16px; width: 100%; min-width: 0; padding: 9px 0; background: transparent; outline: none; border: 0; color: var(--ink); }
.search input:focus-visible { outline: 0; }
.filter-button { min-height: 44px; display: flex; align-items: center; gap: 6px; background: #f6f8fc; border: 1px solid #d9e2f0; border-radius: 10px; padding: 0 10px; color: var(--muted); font-size: 13px; font-weight: 750; }
.filter-button[aria-pressed="true"] { background: var(--blue-soft); border-color: #adc2ff; color: var(--blue-deep); }
.list-count { color: var(--muted); margin: 12px 0 8px; font-size: 12px; }
.step-list { padding: 0; margin: 0; list-style: none; }
.step-list li + li { border-top: 1px solid var(--line); }
.step-row { text-align: left; width: 100%; min-height: 57px; display: grid; grid-template-columns: 28px 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px; border-radius: 10px; background: white; }
.step-row:hover, .step-row[aria-current="step"] { background: #edf3ff; }
.step-row .soft-icon { width: 32px; height: 32px; }
.step-number { text-align: center; color: var(--muted); font-size: 12px; font-weight: 760; font-variant-numeric: tabular-nums; }
.step-name { display: block; font-weight: 780; overflow-wrap: anywhere; }
.step-description, .step-distance { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.step-distance { text-align: right; }
.step-service { display: block; color: #705318; font-weight: 700; }
.settings-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings-card { padding: 18px; }
.settings-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.settings-title .soft-icon { width: 42px; height: 42px; }
.settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.lower-actions { gap: 8px 12px; margin-top: 7px; }
.option { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 54px; padding: 7px 0; cursor: pointer; }
.option + .option { border-top: 1px solid var(--line); }
.option strong { display: block; font-size: 14px; }
.option small { display: block; color: var(--muted); line-height: 1.4; margin-top: 2px; font-size: 12px; }
.option input { flex: none; appearance: none; margin: 0; width: 44px; height: 28px; cursor: pointer; background: #adb9cd; border-radius: 30px; position: relative; }
.option input:checked { background: var(--blue); }
.option input:disabled { opacity: .48; cursor: default; }
.option input::after { content: ''; width: 22px; height: 22px; background: white; border-radius: 50%; position: absolute; left: 3px; top: 3px; box-shadow: 0 1px 4px #1223414a; transition: transform .15s; }
.option input:checked::after { transform: translateX(16px); }
.privacy-panel { grid-column: 1 / -1; }
.offline-state { color: #236250; font-weight: 700; font-size: 13px; margin-top: 8px; }
.toast { position: fixed; z-index: 4; right: 22px; bottom: 24px; border-radius: 11px; background: #172849; color: white; padding: 11px 14px; box-shadow: var(--shadow); max-width: min(360px, 90vw); font-size: 14px; line-height: 1.45; }
dialog { width: min(410px, 94%); border: 1px solid var(--line); border-radius: 15px; color: var(--ink); padding: 20px; box-shadow: 0 8px 50px #15223c42; }
dialog::backdrop { background: #15223c8a; }
dialog h2 { font-size: 23px; }
dialog p { color: var(--muted); line-height: 1.5; margin: 7px 0 17px; }
.dialog-actions { display: flex; gap: 8px; justify-content: end; }
@media (max-width: 720px) {
  .topbar-inner { height: 56px; grid-template-columns: 1fr auto; gap: 8px; padding: 0 14px; }
  .top-nav { display: none; }
  .brand { font-size: 19px; gap: 7px; }
  .brand-icon { width: 30px; height: 30px; border-radius: 8px; }
  .brand-icon .icon { width: 19px; height: 19px; }
  .gps-control { padding: 0 8px; font-size: 12px; }
  .gps-control .icon { width: 16px; height: 16px; }
  .app { padding: 17px 12px calc(76px + env(safe-area-inset-bottom)); }
  .route-heading { gap: 6px; margin-bottom: 14px; align-items: center; }
  .route-heading h1 { font-size: clamp(30px, 8.2vw, 40px); }
  .route-heading .eyebrow { font-size: 9px; letter-spacing: .08em; }
  .area { font-size: 12px; }
  .route-stats { padding: 7px 8px; gap: 8px; border-radius: 10px; }
  .stat { gap: 3px; }
  .stat + .stat { padding-left: 8px; }
  .stat strong { font-size: 13px; }
  .stat span { font-size: 10px; }
  .demo-notice { padding-left: 9px; margin-bottom: 10px; font-size: 12px; }
  .demo-notice .text-button { font-size: 12px; white-space: nowrap; padding: 0; }
  .progress-row { gap: 8px; margin-bottom: 9px; font-size: 12px; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .turn-card { padding: 9px 13px 11px; }
  .maneuver { margin: 5px 0 12px; min-height: 60px; gap: 12px; }
  .maneuver-icon { flex-basis: 58px; height: 58px; border-radius: 13px; }
  .maneuver-icon .icon { width: 36px; height: 36px; }
  .turn-meta { min-height: 36px; padding-top: 8px; }
  .step-controls button { min-height: 51px; }
  .up-next { padding: 7px 10px; min-height: 54px; }
  .map-header { padding: 9px 11px; }
  .map-viewport { height: clamp(225px, 64vw, 365px); }
  .map-controls { right: 7px; top: 7px; }
  .map-footer { padding: 8px 10px 10px; }
  .bottom-nav { display: flex; position: fixed; z-index: 2; left: 0; bottom: 0; right: 0; padding: 4px max(11px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(11px, env(safe-area-inset-left)); justify-content: space-evenly; gap: 5px; background: #fff; border-top: 1px solid var(--line); }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 47px; border-radius: 11px; background: white; font-size: 11px; font-weight: 720; color: var(--muted); }
  .bottom-nav button[aria-current="page"] { background: var(--blue-soft); color: var(--blue-deep); --icon-bg: var(--blue-soft); }
  .toast { bottom: calc(65px + env(safe-area-inset-bottom)); right: 12px; }
  .app-footer { margin-top: 16px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .pane-heading .secondary { display: none; }
  .list-pane { padding: 13px; }
  .step-row { gap: 6px; grid-template-columns: 24px 30px minmax(0, 1fr) auto; }
}
@media (max-width: 360px) {
  .route-stats { align-items: start; flex-direction: column; gap: 4px; }
  .stat { flex-direction: row; align-items: baseline; gap: 4px; }
  .stat + .stat { padding-left: 0; border-left: 0; }
  .eyebrow { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
