@font-face {
  font-family: 'Nunito';
  font-weight: 600 900;
  font-display: swap;
  src: url(fonts/nunito-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Nunito';
  font-weight: 600 900;
  font-display: swap;
  src: url(fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #eef1f4;
  --card: #ffffff;
  --field: #f1f4f8;
  --fg: #12203a;
  --muted: #5f6b7d;
  --line: #e3e8ee;
  --switch-off: #c9d1dc;
  --accent: #1f8fff;
  --accent-ink: #ffffff;
  --accent-soft: #e5f1ff;
  --banner: #0f3a75;
  --report: #ff8a2b;
  --go: #12a150;
  --yellow: #ffcc00;
  --danger: #e5484d;
  --river-warning: #e8780c;
  --river-badge: #163a73;
  --shadow: 0 4px 14px rgba(18, 32, 58, 0.16);
  --shadow-lg: 0 14px 36px rgba(18, 32, 58, 0.2), 0 2px 6px rgba(18, 32, 58, 0.1);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --banner-bottom: calc(var(--safe-top) + 92px);
  --met-bg: #fff4e5;
  --met-ink: #5c2d00;
  --met-sub: #8a5a20;
  --met-line: #f5a524;
  --met-pill: #f5a524;
  --met-pill-ink: #2b1600;
  --flood-bg: #dcecff;
  --flood-ink: #0b4f8a;
  --tag-company-bg: #dcf3e8;
  --tag-company-ink: #0b6b49;
  --tag-gov-bg: #dde6f6;
  --tag-gov-ink: #163a73;
  color-scheme: light;
}

:root[data-theme='night'] {
  --bg: #0f1729;
  --card: #161c28;
  --field: #222a3a;
  --fg: #eef3fb;
  --muted: #9fb0c8;
  --line: #2a3650;
  --switch-off: #4a5876;
  --accent: #3aa6ff;
  --accent-soft: #173058;
  --banner: #12305e;
  --met-bg: #3a2a12;
  --met-ink: #ffd9a3;
  --met-sub: #e8b878;
  --met-line: #b7791f;
  --flood-bg: #12325a;
  --flood-ink: #9fd0ff;
  --tag-company-bg: #123d2c;
  --tag-company-ink: #8fe0b8;
  --tag-gov-bg: #1c2d52;
  --tag-gov-ink: #a9c4ff;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

:root[data-theme='night'] #banner {
  background: #1662c4;
}

:root[data-theme='night'] .sheet {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
html {
  touch-action: manipulation;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font: 600 16px/1.35 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

@media (display-mode: standalone) {
  html {
    min-height: min(100lvh, calc(100% + env(safe-area-inset-top, 0px)));
  }
}

#map {
  position: fixed;
  inset: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

svg {
  display: block;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.icon-btn svg,
.fab svg,
.round svg,
.quick svg {
  width: 24px;
  height: 24px;
}

.fab {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow);
}

.fab:active,
.round:active,
.btn:active,
.quick:active {
  transform: scale(0.96);
}

.fab-menu {
  position: fixed;
  top: calc(var(--safe-top) + 14px);
  left: 14px;
  z-index: 3;
}

#fabs {
  position: fixed;
  right: 14px;
  bottom: calc(var(--sheet-h, 0px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

body[data-mode='nav'] #fabs {
  display: none;
}

body.searching #fabs,
body.searching .fab-menu {
  display: none;
}

.fab-report {
  position: fixed;
  right: 14px;
  bottom: calc(var(--sheet-h, 0px) + 20px);
  width: 62px;
  height: 62px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: linear-gradient(150deg, #ffc53d, #ff8a00);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 138, 0, 0.42), 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease;
  z-index: 2;
}

.fab-report:active {
  transform: scale(0.92);
}

.fab-report svg {
  width: 34px;
  height: 34px;
}

.pill {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sheet-h, 0px) + 22px);
  transform: translateX(-50%);
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 2;
}

#speedo {
  position: fixed;
  left: 14px;
  bottom: calc(var(--sheet-h, 0px) + 20px);
  display: grid;
  place-items: center;
  align-content: center;
  width: 66px;
  height: 66px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  line-height: 1;
  z-index: 2;
}

#speedo b {
  font-size: 28px;
  font-weight: 900;
}

#speedo small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

#banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: calc(var(--safe-top) + 6px + min(14px, var(--safe-top))) 18px 12px;
  border-radius: 0 0 26px 26px;
  background: #101419;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

#man-icon {
  flex: none;
  width: 64px;
  height: 64px;
  color: #fff;
}

#man-icon svg {
  width: 64px;
  height: 64px;
  stroke-width: 5;
}

.man-body {
  flex: 1;
  min-width: 0;
}

#man-dist {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
}

#man-text {
  display: -webkit-box;
  margin-top: 2px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#man-then {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

#man-then svg {
  width: 34px;
  height: 34px;
}

#man-sign {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background: #0b6e3c;
  font-size: 20px;
  line-height: 1.2;
}

#man-sign b {
  flex: 1;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sign-exit {
  flex: none;
  padding: 1px 8px;
  border-radius: 6px;
  background: #fff;
  color: #0b6e3c;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

#man-sign .shield {
  flex: none;
  border: 2px solid #fff;
  font-size: 16px;
  vertical-align: 0;
}

#lanes {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

#lanes span {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
}

#lanes span + span {
  border-left: 2px dashed rgba(255, 255, 255, 0.32);
}

#lanes svg {
  width: 34px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
}

#lanes .off {
  stroke: #fff;
  opacity: 0.45;
}

#lanes .on {
  stroke: #0f1729;
  stroke-width: 3;
}

#lanes span.use svg {
  box-sizing: border-box;
  width: 36px;
  max-width: calc(100% - 8px);
  padding: 2px;
  border-radius: 10px;
  background: #fff;
}

#lanes span.use .off {
  stroke: #0f1729;
  opacity: 0.3;
}

.shield {
  display: inline-block;
  padding: 0 7px;
  border-radius: 7px;
  background: #0f8a5f;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  vertical-align: 2px;
}

#alert {
  position: fixed;
  top: calc(var(--banner-bottom) + 80px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
}

#alert[data-kind='camera'],
#alert[data-kind='report'] {
  background: var(--report);
  color: #fff;
}

#alert[data-kind='camera'][data-over='1'] {
  background: var(--danger);
}

#alert.pulse {
  animation: alert-pulse 0.4s ease-out;
}

@keyframes alert-pulse {
  30% {
    transform: translateX(-50%) scale(1.12);
    filter: brightness(1.4);
  }
}

@keyframes alert-flash {
  30% {
    filter: brightness(1.4);
  }
}

#alert[data-kind='toll'] {
  background: var(--yellow);
  color: #2b2100;
}

#alert[data-kind='weather'] {
  width: max-content;
  border-radius: 18px;
  background: var(--met-pill);
  color: var(--met-pill-ink);
  white-space: normal;
  text-align: center;
}

#alert[data-kind='weather'] span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.met {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--met-bg);
  color: var(--met-ink);
  box-shadow: inset 0 0 0 1.5px var(--met-line);
  font: inherit;
  text-align: left;
}

.met-ico {
  font-size: 24px;
  line-height: 1;
}

.met-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.met-text b,
.met-text small {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.met-text b {
  font-weight: 800;
}

.met-text small {
  color: var(--met-sub);
  font-size: 14px;
  font-weight: 600;
}

.met-chev {
  display: grid;
  justify-items: end;
  color: var(--met-sub);
  font-size: 22px;
  line-height: 1;
}

.met-more {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.met-item + .met-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.met-item h3 {
  margin: 0 0 4px;
}

.met-lines {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.met-lines p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.met-lines b {
  color: var(--fg);
}

#alert[data-kind='traffic'] {
  background: var(--danger);
  color: #fff;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 64vh;
  overflow: auto;
  padding: 8px 16px max(16px, var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

body.searching .sheet {
  top: 0;
  max-height: none;
  padding-top: calc(var(--safe-top) + 12px);
  border-radius: 0;
}

body.searching .grab {
  display: none;
}

.grab {
  position: relative;
  display: block;
  width: 44px;
  height: 5px;
  margin: 2px auto 12px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--line);
}

.grab::before {
  content: '';
  position: absolute;
  inset: -14px -48px;
}

body[data-mode='home']:not(.searching) .sheet {
  touch-action: none;
}

body.home-scrolls:not(.searching) .sheet {
  display: flex;
  flex-direction: column;
}

body.home-scrolls:not(.searching) #sheet-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

body[data-mode='home'] .sheet,
body[data-mode='routes'] .sheet {
  will-change: transform;
}

body[data-mode='nav'] .grab {
  display: none;
}

#searchbox {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 54px;
  padding: 0 6px 0 16px;
  border-radius: 18px;
  background: var(--field);
}

.search-icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.search-icon svg {
  width: 22px;
  height: 22px;
}

#q {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}

#q::placeholder {
  color: var(--muted);
  font-weight: 800;
}

#q::-webkit-search-cancel-button {
  display: none;
}

#results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

#results li + li {
  border-top: 1px solid var(--line);
}

#results button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  border: 0;
  background: transparent;
  text-align: left;
}

#results .has-menu {
  display: flex;
  align-items: center;
}

#results .icon-btn {
  flex: none;
  justify-content: center;
  width: 44px;
  padding: 0;
  color: var(--muted);
}

#results button > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#results em {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.nearby {
  display: flex;
  gap: 8px;
  margin: 10px -16px 0;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x;
}

.nearby::-webkit-scrollbar {
  display: none;
}

.nearby .chip {
  flex: none;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

#results b {
  font-weight: 800;
}

#results small,
.list-item small,
.shortcut small {
  color: var(--muted);
  font-weight: 600;
}

#results .msg {
  padding: 14px 4px;
  color: var(--muted);
}

.sheet h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.sheet p {
  margin: 4px 0 8px;
}

.hint {
  margin-top: 12px !important;
  text-align: center;
}

.label {
  margin: 16px 0 4px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.install-cta {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #1d72ff, #0a2577);
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 24px rgba(29, 114, 255, 0.35);
}

.install-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
}

.install-head img {
  flex: none;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.install-head b {
  display: block;
  font-size: 18px;
  font-weight: 900;
}

.install-head small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.88;
}

.btn.install-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  background: #fff;
  color: #0a2577;
  font-size: 17px;
  font-weight: 900;
}

.install-go svg {
  width: 20px;
  height: 20px;
}

.install-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.install-close svg {
  width: 16px;
  height: 16px;
}

.arrived .install-cta {
  width: 100%;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
}

.inline-icon svg {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0 2px;
  vertical-align: -4px;
  color: var(--accent);
}

.ask-wait {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--accent-soft);
}

.ask-wait > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ask-wait small {
  color: var(--muted);
}

.ask-wait-icon {
  font-size: 22px;
}

.ask-wait .btn {
  min-height: 40px;
  padding: 0 16px;
}

.shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 18px;
  background: var(--field);
  text-align: left;
}

.shortcut > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shortcut b,
.shortcut small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shortcut .commute {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.shortcut .commute:not(:empty)::after {
  content: ' · ';
  color: var(--muted);
  font-weight: 600;
}

.shortcut-icon,
.li-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 19px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.list-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row .list-item {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
}

.list-row .icon-btn {
  color: var(--muted);
}

.place-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.place-head .icon-btn {
  background: var(--field);
}

.chips,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  font-weight: 700;
}

.opts-row {
  flex-wrap: nowrap;
  align-items: center;
}

.chip.route-opts {
  flex: none;
  color: var(--fg);
  font: inherit;
  font-weight: 700;
}

.chip.route-opts svg {
  width: 20px;
  height: 20px;
}

.chip.route-opts.on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.opts-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
}

.opts-on {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  font-weight: 800;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent);
}


.btn.big {
  flex: 1;
  min-height: 56px;
  font-size: 19px;
  font-weight: 900;
}

.btn.block {
  display: block;
  width: 100%;
  margin-top: 14px;
}

.handoff-label {
  margin: 0 0 8px;
}

.handoff {
  display: flex;
  gap: 10px;
}

.handoff .btn {
  display: grid;
  place-items: center;
  padding: 0 12px;
  font-size: 17px;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.handoff .btn.primary {
  color: var(--accent-ink);
}

.notice {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 14px;
}

.notice b {
  font-size: 16px;
}

body.no-map #fabs,
body.no-map #btn-report {
  display: none;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.quick {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 0;
  border-radius: 18px;
  background: var(--field);
  font-size: 13px;
  font-weight: 800;
}

.quick.on {
  background: var(--accent-soft);
  color: var(--accent);
}

.list-more {
  padding: 10px 2px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
  text-align: left;
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.field input {
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--field);
  font: inherit;
  font-weight: 700;
  color: inherit;
  outline: none;
}

.field input:focus {
  border-color: var(--accent);
}

.btn.danger {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.quick > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  font-size: 20px;
}

.route-list {
  display: grid;
  gap: 10px;
}

.route-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: 20px;
  background: var(--field);
  text-align: left;
}

.route-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.rc-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.rc-top b {
  font-size: 24px;
  font-weight: 900;
}

.rc-via {
  color: var(--muted);
  font-size: 14px;
}

.rc-via .shield,
#road-pill .shield {
  padding: 0 5px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 18px;
  vertical-align: 1px;
}

.rc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 800;
}

.tag.good {
  background: color-mix(in srgb, var(--go) 16%, transparent);
  color: var(--go);
}

.tag.toll {
  background: color-mix(in srgb, var(--yellow) 35%, transparent);
}

.tag.fare {
  background: var(--yellow);
  color: #2b2100;
}

.tag.free {
  background: color-mix(in srgb, var(--go) 14%, transparent);
}

.tag.flood {
  background: var(--flood-bg);
  color: var(--flood-ink);
}

.tag.jam {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}

.tag.river {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tag.river .gauge-icon {
  flex: none;
  width: 15px;
  height: 15px;
}

.river-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.river-dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  background: var(--river-badge);
  color: #fff;
}

.river-dot.warning {
  border-color: var(--river-warning);
}

.river-dot.danger {
  border-color: var(--danger);
}

.river-dot .gauge-icon {
  width: 15px;
  height: 15px;
}

.river-level {
  width: fit-content;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff4c2;
  color: #6b5200;
  font-size: 13px;
  font-weight: 800;
}

.river-level.warning {
  background: #fde3cc;
  color: #8a3f00;
}

.river-level.danger {
  background: #fde0e1;
  color: #b42318;
}

.river-bar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 4px;
}

.river-bar span {
  height: 7px;
  border-radius: 4px;
  background: #d0d5dd;
}

.river-bar span:nth-child(2) {
  background: var(--yellow);
}

.river-bar span:nth-child(3) {
  background: var(--river-warning);
}

.river-bar span:nth-child(4) {
  background: var(--danger);
}

.river-bar i {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 17px;
  margin-left: -2px;
  border-radius: 2px;
  background: #12203a;
  box-shadow: 0 0 0 2px #fff;
}

.river-pin .gauge-icon {
  width: 20px;
  height: 20px;
}

.river-pin.alert .gauge-icon {
  width: 14px;
  height: 14px;
}

.river-pin.danger .gauge-icon {
  width: 24px;
  height: 24px;
}

.tag.river.warning {
  background: color-mix(in srgb, var(--river-warning) 20%, transparent);
}

.tag.river.danger {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}

.river-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 3px solid var(--river-warning);
  border-radius: 50%;
  background: var(--river-badge);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.river-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
}

.river-pin.alert {
  width: 22px;
  height: 22px;
  border-width: 2.5px;
  border-color: var(--yellow);
}

.river-pin.danger {
  width: 40px;
  height: 40px;
  border-color: var(--danger);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 0 0 7px color-mix(in srgb, var(--danger) 28%, transparent),
    0 0 0 14px color-mix(in srgb, var(--danger) 14%, transparent);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  color: var(--danger);
  font-weight: 800;
}

body[data-mode='routes'] .sheet {
  padding-bottom: 0;
}

body[data-mode='routes'] .grab,
body[data-mode='routes'] .place-head {
  touch-action: none;
}

@media (max-width: 899px) {
  body.routes-collapsed .sheet .chips,
  body.routes-collapsed .sheet #met-slot,
  body.routes-collapsed .sheet .route-card:not(.selected),
  body.routes-collapsed .sheet .route-list + p {
    display: none;
  }
}

.actions.sticky {
  position: sticky;
  bottom: 0;
  margin: 10px -16px 0;
  padding: 12px 16px max(14px, var(--safe-bottom));
  background: var(--card);
  box-shadow: 0 -1px 0 var(--line);
}

body[data-mode='nav']:not(.searching) .sheet {
  padding-top: 14px;
}

.nav-bar {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 10px;
}

#road-pill {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sheet-h, 0px) + 34px);
  transform: translateX(-50%);
  max-width: calc(100% - 190px);
  padding: 8px 16px;
  border-radius: 14px;
  background: #0b6fd6;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow);
  z-index: 2;
}

#road-pill:not([hidden]) ~ #btn-recenter {
  bottom: calc(var(--sheet-h, 0px) + 86px);
}

.nav-more {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.trip-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 14px;
  margin: 2px 0 -6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.nav-more-open .trip-bar {
  display: none;
}

.tb-line {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--fg) 20%, var(--card));
}

.tb-line i {
  position: absolute;
  top: 0;
  bottom: 0;
  margin-left: -20px;
  border-radius: 3px;
}

.tb-line .tb-rr {
  top: 50%;
  bottom: auto;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -24.5px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--fg);
}

.tb-you {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: #33a7ff;
  transform: rotate(90deg);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.tb-end {
  position: absolute;
  right: 1px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -13px;
}

.tb-you svg,
.tb-end svg {
  width: 100%;
  height: 100%;
}

.trip-bar.has-jams {
  height: 34px;
}

.trip-bar.has-jams .tb-line,
.trip-bar.has-jams .tb-you,
.trip-bar.has-jams .tb-end {
  top: auto;
  margin-top: 0;
}

.trip-bar.has-jams .tb-line {
  bottom: 4px;
}

.trip-bar.has-jams .tb-you {
  bottom: -2px;
}

.trip-bar.has-jams .tb-end {
  bottom: 2px;
}

.tb-jam {
  position: absolute;
  top: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  height: 18px;
  padding: 0 6px;
  border: 2px solid var(--card);
  border-radius: 9px;
  background: var(--c);
  color: #fff;
  line-height: 14px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.tb-jam::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  margin: 1px 0 0 -5px;
  border: 5px solid transparent;
  border-top-color: var(--c);
}

.tb-jam b {
  font-size: 12px;
  font-weight: 900;
}

.tb-jam small {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.journey {
  display: grid;
  gap: 6px;
  padding: 2px 0 4px;
}

.jr-track {
  position: relative;
  height: 74px;
}

.jr-track.flat {
  height: 26px;
}

.jr-line {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 9px;
  height: 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--fg) 20%, var(--card));
}

.jr-line i {
  position: absolute;
  top: 0;
  bottom: 0;
  margin-left: -20px;
  border-radius: 4px;
}

.jr-rr {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -26px;
  padding: 0;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--fg);
  cursor: pointer;
}

.jr-rr::after {
  content: '';
  position: absolute;
  inset: -14px;
}

.jr-you {
  position: absolute;
  left: 4px;
  bottom: 2px;
  width: 22px;
  height: 22px;
  color: #33a7ff;
  transform: rotate(90deg);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.jr-end {
  position: absolute;
  right: 2px;
  bottom: 5px;
  width: 24px;
  height: 24px;
}

.jr-you svg,
.jr-end svg {
  width: 100%;
  height: 100%;
}

.jr-pin {
  position: absolute;
  top: 6px;
  width: 44px;
  height: 54px;
  pointer-events: none;
}

.jr-pin svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.jr-pin path {
  fill: var(--c);
  stroke: var(--card);
  stroke-width: 2.5;
  stroke-linejoin: round;
  paint-order: stroke;
}

.jr-head {
  position: absolute;
  inset: 0 0 auto;
  height: 42px;
  display: grid;
  place-content: center;
  justify-items: center;
  color: #fff;
  line-height: 1;
}

.jr-head b {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.jr-pin.long .jr-head b {
  font-size: 14px;
}

.jr-head small {
  margin-top: 1px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.jr-report {
  top: 18px;
  width: 34px;
  height: 42px;
}

.jr-report .jr-head {
  height: 33px;
  font-size: 16px;
}

.jr-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.jr-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.jr-key i {
  width: 9px;
  height: 9px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 1px var(--muted);
}

.nav-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.nav-actions .tile {
  gap: 5px;
  padding: 11px 4px 10px;
  font-size: 12.5px;
  white-space: nowrap;
}

.nav-actions .tile span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-actions .tile[data-action='stop-share'] {
  align-content: start;
  color: var(--danger);
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

.nav-actions .tile svg {
  width: 22px;
  height: 22px;
}

.end-trip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  background: var(--danger);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.end-trip svg {
  width: 18px;
  height: 18px;
}

.tile {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 0;
  border-radius: 18px;
  background: var(--field);
  font-size: 13px;
  font-weight: 800;
}

body.nav-alts .sheet {
  max-height: calc(100% - var(--safe-top) - 120px);
}

.alt-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--field);
}

.alt-card.current {
  background: var(--accent-soft);
}

.alt-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.alt-top b {
  display: block;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.1;
}

.alt-top small {
  font-size: 15px;
  font-weight: 800;
}

.alt-top .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 44px;
  padding: 0 18px;
}

.alt-top .btn svg {
  width: 18px;
  height: 18px;
}

.alt-card:not(.current) .alt-top .btn {
  min-width: 96px;
  justify-content: center;
}

.alt-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.alt-strip svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transform: rotate(90deg);
}

.alt-strip > span {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

.alt-strip i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}

.tile svg {
  width: 24px;
  height: 24px;
}

.eta {
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.eta b {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.eta small {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.preview-chip {
  position: fixed;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 5px 0 14px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: var(--card);
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  cursor: pointer;
}

.preview-chip span,
.preview-chip b {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-box: trim-both cap alphabetic;
}

.preview-chip b {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  letter-spacing: 0;
}

body.searching .preview-chip,
body.nav-alts .preview-chip {
  display: none;
}

.next-poi {
  display: grid;
  gap: 3px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--field);
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
}

.next-poi:empty {
  display: none;
}

.nav-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

.nav-stop[hidden] {
  display: none;
}

.nav-stop > svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.nav-stop > svg path {
  fill: #6938ef;
}

.nav-stop span {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-stop .icon-btn {
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--muted);
}

.next-poi span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.round {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--field);
}

.puck {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

.puck svg,
.pin svg {
  width: 100%;
  height: 100%;
}

.pin {
  width: 38px;
  height: 38px;
}

.stop-pin {
  width: 32px;
  height: 32px;
}

.stop-pin path {
  fill: #6938ef;
}

.poi {
  white-space: nowrap;
  padding: 2px 7px;
  border: 2px solid #fff;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.poi-toll {
  background: var(--yellow);
  color: #2b2100;
  cursor: pointer;
}

.poi-toll::after {
  content: '';
  position: absolute;
  inset: -10px;
}

.toll-dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--yellow);
  color: #2b2100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toll-dot svg {
  width: 13px;
  height: 13px;
}

.toll-fare {
  justify-self: start;
  font-size: 16px;
  font-weight: 900;
}

.poi-camera {
  background: var(--report);
  font-size: 13px;
}

.poi-camera {
  cursor: pointer;
}

.cam-dot {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--report);
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cam-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cam-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.cam-text b {
  font-size: 15px;
  line-height: 1.2;
}

.cam-text small {
  color: #4a5568;
  font-size: 13px;
  font-weight: 800;
}

.cam-fine {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fdecea;
  color: #b42318;
  font-size: 14px;
  font-weight: 900;
}

.alert-fine {
  margin-left: 8px;
  font-style: normal;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff;
  color: #b42318;
  font-size: 0.85em;
  font-weight: 900;
}

.cam-limit {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 4px solid var(--danger);
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 900;
}

.poi-rr {
  background: #0f8a5f;
  color: #fff;
}

body[data-mode='nav'] .poi-rr {
  cursor: pointer;
}

body[data-mode='nav'] .poi-rr::before {
  content: '';
  position: absolute;
  inset: -12px;
}

.report-pin {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--card);
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.report-popup {
  display: grid;
  gap: 6px;
  color: #12203a;
  font-family: 'Nunito', system-ui, sans-serif;
}

.report-popup .actions {
  margin: 4px 0 0;
}

.report-popup .btn:not(.primary) {
  background: #e9eef5;
  color: #12203a;
}

.dialog {
  inset-block: var(--safe-top) var(--safe-bottom);
  width: min(460px, calc(100% - 24px));
  max-height: calc(100% - var(--safe-top) - var(--safe-bottom) - 32px);
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-lg);
}

.dialog::backdrop {
  background: rgba(6, 10, 18, 0.5);
}

.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 18px 20px 22px;
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -18px -20px 0;
  padding: 18px 20px 6px;
  background: var(--card);
}

.dialog-head .icon-btn {
  background: var(--field);
}

.dialog h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.dialog h2:focus {
  outline: none;
}

.dialog h3 {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 900;
}

.dialog p {
  margin: 0;
}

.privacy {
  display: grid;
  gap: 4px;
  font-size: 15px;
  line-height: 1.45;
}

.privacy h3:not(:first-child) {
  margin-top: 12px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: var(--field);
  font-weight: 700;
}

.lang-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  min-width: 0;
}

.lang-label svg {
  grid-row: span 2;
  width: 20px;
  height: 20px;
}

.lang-en {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
}

.row select {
  min-width: 0;
  max-width: 60%;
  min-height: 38px;
  text-overflow: ellipsis;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  font-weight: 700;
}

.row input[type='checkbox'] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.dialog-body.settings {
  gap: 6px;
  padding-bottom: 16px;
}

.group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-radius: 16px;
  background: var(--field);
  overflow: hidden;
}

.group-gap {
  margin-top: 6px;
}

.group .row {
  min-height: 44px;
  border-radius: 0;
  background: none;
}

.group .row + .row {
  border-top: 1px solid var(--line);
}

.dialog .group-label {
  margin: 6px 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row.link {
  width: 100%;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.row.link::after {
  content: '›';
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.row.link.update-row::after {
  content: none;
}

.update-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
}

.update-state svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.update-row.busy .update-state svg {
  animation: spin 0.9s linear infinite;
}

.row-end {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 72%;
}

.row-end select {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.play-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}

.play-btn svg {
  width: 18px;
  height: 18px;
}

.back-btn {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
}

.app-version {
  text-align: center;
}

#dlg-settings.more::after {
  content: '';
  position: sticky;
  bottom: 0;
  display: block;
  height: 48px;
  margin-top: -48px;
  background: linear-gradient(transparent, var(--card));
  pointer-events: none;
}

.settings input[role='switch'],
.sound-menu input[role='switch'] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--switch-off);
  transition: background 0.2s;
}

.settings input[role='switch']::before,
.sound-menu input[role='switch']::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.settings input[role='switch']:checked,
.sound-menu input[role='switch']:checked {
  background: var(--accent);
}

.settings input[role='switch']:checked::before,
.sound-menu input[role='switch']:checked::before {
  transform: translateX(18px);
}

.settings input[role='switch']:focus-visible,
.sound-menu input[role='switch']:focus-visible,
.play-btn:focus-visible,
.row.link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.report-kind {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 104px;
  border: 0;
  border-radius: 20px;
  background: var(--field);
  font-weight: 800;
}

.report-kind span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card);
  font-size: 30px;
  box-shadow: var(--shadow);
}

.rp-reasons {
  margin: 0;
}

.rp-reasons .chip[aria-checked='true'] {
  background: var(--accent);
  color: var(--accent-ink);
}

.rp-sent {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: var(--field);
  font-size: 14px;
  line-height: 1.45;
}

.rp-pics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.rp-pic {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rp-pic img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  transition: opacity 0.15s;
}

.rp-pic.off img {
  opacity: 0.3;
}

.rp-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.rp-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.rp-add {
  place-items: center;
  align-content: center;
  gap: 4px;
  aspect-ratio: 3 / 4;
  border: 2px dashed color-mix(in srgb, var(--fg) 28%, transparent);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.rp-add > span:first-of-type {
  font-size: 26px;
}

.rp-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.rp-add:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.rp-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.rp-remove svg {
  width: 16px;
  height: 16px;
}

.rp-error {
  color: var(--danger);
  font-weight: 700;
}

.rp-sent ul {
  margin: 2px 0 0;
  padding-left: 18px;
}

#rp-send:disabled {
  opacity: 0.45;
  box-shadow: none;
}

.rp-kept {
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sheet-h, 0px) + 96px);
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: #12203a;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-lg);
  z-index: 5;
}

#offer {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--sheet-h, 0px) + 14px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 16px 18px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 4;
  animation: drop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.offer-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.offer-text b {
  color: var(--go);
  font-size: 19px;
  font-weight: 900;
}

.offer-text span {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#offer .btn {
  min-height: 46px;
  padding: 0 16px;
  box-shadow: none;
}

#offer .btn.primary {
  background: var(--go);
}

.offer-timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--go);
  transform-origin: left;
  animation: offer-timer var(--offer-ms, 20s) linear forwards;
}

@keyframes offer-timer {
  to {
    transform: scaleX(0);
  }
}

#parking,
#solat {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--sheet-h, 0px) + 14px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 8px 12px 14px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 4;
  animation: drop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.solat-when {
  margin: 0 0 4px;
  padding-left: 6px;
  color: var(--muted);
  font-weight: 700;
}

.parking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 6px;
}

.parking-head b {
  overflow: hidden;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.parking-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.parking-row > span:first-child {
  display: grid;
  flex: 1;
  min-width: 0;
}

.parking-row b,
.parking-row small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.parking-row small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.parking-row .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  min-height: 42px;
  padding: 0 16px;
  box-shadow: none;
}

.parking-row .btn svg {
  width: 16px;
  height: 16px;
}

@media (min-width: 900px) {
  #offer,
  #parking,
  #solat {
    left: auto;
    width: 440px;
  }
}

@keyframes drop {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
}

.maplibregl-ctrl-bottom-left {
  bottom: calc(var(--sheet-h, 0px) + 4px);
}

@media (max-width: 899px) {
  body[data-mode='nav'] .maplibregl-ctrl-bottom-left {
    top: calc(var(--banner-bottom) + 148px);
    bottom: auto;
  }

  body.nav-alts .sheet {
    max-height: calc(100% - var(--banner-bottom) - 12px);
  }

  body.nav-alts .fab-menu {
    display: none;
  }
}

@media (max-width: 899px) and (orientation: portrait) {
  body[data-mode='nav'] .maplibregl-ctrl-bottom-left {
    top: auto;
    bottom: calc(var(--sheet-h, 0px) + 92px);
    left: auto;
    right: 22px;
  }
}

body[data-mode='nav'] .fab-menu {
  top: calc(var(--banner-bottom) + 16px);
}

body.nav-more-open #road-pill,
body.searching .fab-sound,
body.searching #speed-limit,
body.nav-search #sheet-body,
body.searching #banner,
body.searching #alert,
body.searching #road-pill,
body.searching .fab-report,
body.searching #speedo,
body.searching #nav-jam,
body.searching .pill {
  display: none !important;
}

body.has-results #sheet-body {
  display: none;
}

#sheet-body.enter {
  animation: rise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.route-card.skeleton {
  gap: 10px;
  pointer-events: none;
}

.skeleton span {
  display: block;
  width: 70%;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--line) 25%, var(--card) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.1s linear infinite;
}

.skeleton span:first-child {
  width: 40%;
  height: 24px;
}

.skeleton span:last-child {
  width: 30%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.trip-card {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 20px 20px max(18px, var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.trip-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.trip-eta {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.trip-meta {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.btn.trip-cta {
  display: grid;
  place-items: center;
  margin-top: 12px;
  font-size: 17px;
  text-align: center;
  text-decoration: none;
}

.btn.trip-cta:not(.primary) {
  color: var(--fg);
}

.ask-actions {
  display: flex;
  gap: 10px;
}

.ask-actions .btn {
  margin-top: 12px;
}

.ask-change {
  justify-self: start;
  margin-top: 6px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
}

.ask-private {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ask-pin {
  position: fixed;
  left: var(--pin-x, 50%);
  top: var(--pin-y, 50%);
  z-index: 1;
  transform: translate(-50%, -100%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .trip-card {
    left: 24px;
    right: auto;
    bottom: 24px;
    width: 400px;
    border-radius: var(--radius);
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings input[role='switch'],
  .settings input[role='switch']::before,
  .sound-menu input[role='switch'],
  .sound-menu input[role='switch']::before {
    transition: none;
  }

  #sheet-body.enter,
  .skeleton span {
    animation: none;
  }

  #alert.pulse {
    animation-name: alert-flash;
  }
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.maplibregl-popup-content {
  border-radius: 18px;
  padding: 14px 16px;
}

#map.zoomed-out .poi-rr,
#map.zoomed-out .poi-camera {
  display: none;
}

.poi-toll svg {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 3px;
  vertical-align: -2px;
}

.poi-toll.pay-later svg {
  margin-right: 0;
}

body:not([data-mode='nav']) .poi {
  padding: 1px 5px;
  border-width: 1.5px;
  border-radius: 6px;
  font-size: 9px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body:not([data-mode='nav']) .poi-camera {
  font-size: 10px;
}

.poi-rr .poi-fuel {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin: -2px -3px -2px 4px;
  vertical-align: middle;
}

body:not([data-mode='nav']) .poi-rr .poi-fuel {
  width: 12px;
  height: 12px;
  margin-left: 3px;
}

body:not([data-mode='nav']) .poi-toll svg {
  width: 10px;
  height: 10px;
  margin-right: 2px;
  vertical-align: -1px;
}

body:not([data-mode='nav']) .poi-toll.pay-later svg {
  margin-right: 0;
}

#map.zoomed-out .poi-toll {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
}

#map.zoomed-out .poi-toll .poi-label {
  display: none;
}

#map.zoomed-out .poi-toll svg {
  display: block;
  width: 15px;
  height: 15px;
  margin-right: 0;
}

@media (min-width: 900px) {
  .sheet {
    left: 14px;
    right: auto;
    top: calc(var(--safe-top) + 80px);
    bottom: auto;
    width: 420px;
    max-height: calc(100% - 100px);
    border-radius: var(--radius);
  }

  body.searching .sheet {
    top: calc(var(--safe-top) + 80px);
    bottom: auto;
    max-height: calc(100% - 100px);
    padding-top: 12px;
    border-radius: var(--radius);
  }

  body.searching .fab-menu {
    display: grid;
  }

  .grab {
    display: none;
  }

  body[data-mode='nav'] .sheet {
    top: auto;
    bottom: 14px;
  }

  #banner {
    top: calc(var(--safe-top) + 14px);
    left: 14px;
    right: auto;
    width: 420px;
    padding-top: 14px;
    border-radius: var(--radius);
  }

  #alert {
    left: calc(50% + 217px);
    max-width: calc(100% - 462px);
  }

  #fabs,
  .fab-report,
  .pill,
  #speedo {
    bottom: 24px;
  }

  body[data-mode='nav'] #fabs {
    bottom: 108px;
  }

  #speedo {
    left: 450px;
  }

  body[data-mode='nav'] .fab-menu {
    top: calc(var(--safe-top) + 14px);
    left: 448px;
  }

  .maplibregl-ctrl-bottom-left {
    left: 446px;
  }

  body[data-mode='nav'] .maplibregl-ctrl-bottom-left {
    left: 536px;
  }
}

.fab-sound {
  position: fixed;
  top: calc(var(--banner-bottom) + 16px);
  right: 14px;
  z-index: 2;
}

.radio-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--accent);
  font-size: 12px;
  line-height: 1;
}

.radio-pill {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  max-width: 200px;
  padding: 0 14px 0 5px;
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transform: translateY(-50%);
}

.fab-sound.pill-left .radio-pill {
  left: auto;
  right: calc(100% + 8px);
}

.radio-pill .sm-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 10px;
}

.radio-pill-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sound-menu {
  position: fixed;
  z-index: 6;
  display: grid;
  align-content: start;
  gap: 8px;
  width: min(320px, calc(100vw - 28px));
  padding: 12px;
  overflow-y: auto;
  border-radius: 20px;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-lg);
}

.sm-voice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--field);
  font-weight: 800;
}

.sm-voice span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-voice svg {
  width: 22px;
  height: 22px;
}

.sm-search {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
}

.sm-list {
  display: grid;
  gap: 6px;
}

.sm-st {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sm-st.on {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.sm-logo {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.sm-name {
  display: grid;
  min-width: 0;
}

.sm-name b {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-name small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sm-act {
  flex: none;
  margin-left: auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.sm-note {
  margin: 6px 2px;
  color: var(--muted);
  font-weight: 700;
}

.sm-mix {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--field);
}

.sm-vol {
  display: grid;
  grid-template-columns: minmax(0, 7.5em) 1fr 3.2em;
  align-items: center;
  gap: 10px;
}

.sm-vol span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-vol b {
  font-weight: 900;
  text-align: right;
}

.sm-mix input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  touch-action: none;
}

.sm-mix input[type='range']::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent) var(--v, 100%), color-mix(in srgb, var(--fg) 18%, transparent) var(--v, 100%));
}

.sm-mix input[type='range']::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--fg) 18%, transparent);
}

.sm-mix input[type='range']::-moz-range-progress {
  height: 8px;
  border-radius: 4px;
  background: var(--accent);
}

.sm-mix input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--card), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.sm-mix input[type='range']::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--card), 0 2px 6px rgba(0, 0, 0, 0.35);
}

.sm-mix-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sm-chip {
  flex: none;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.sm-chip small {
  margin-left: 5px;
  opacity: 0.7;
  font-weight: 800;
}

.sm-chip.on {
  background: var(--accent);
  color: var(--accent-ink);
}

.sm-h {
  display: flex;
  justify-content: space-between;
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sm-h span {
  letter-spacing: 0;
}

.sm-all {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--field);
  color: var(--accent);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

body:not([data-mode='nav']) .fab-sound {
  top: calc(var(--safe-top) + 14px);
}

#speedo.limit-left #speed-limit {
  right: auto;
  left: -24px;
}

#speed-limit {
  position: absolute;
  top: -16px;
  right: -24px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 4px solid var(--danger);
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow);
}

#speedo.over {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, var(--card));
}

#speedo.over b {
  color: var(--danger);
}

.callout {
  max-width: 220px;
  padding: 6px 12px;
  border-radius: 12px 12px 12px 4px;
  background: #0b6fd6;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow);
  pointer-events: none;
}

#alert {
  display: flex;
  align-items: center;
  gap: 8px;
}

#alert span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#alert small {
  font-size: 13px;
  opacity: 0.85;
}

#alert button {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  font-size: 18px;
}

body[data-mode='nav']:not(.nav-alts):not(.searching) .sheet {
  touch-action: none;
}

.arrived {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 0 4px;
  text-align: center;
}

.arrived .btn.block {
  width: 100%;
}

.arrived-icon {
  font-size: 44px;
}

@media (orientation: landscape) and (max-height: 500px) {
  body[data-mode='nav'] {
    --gl: max(8px, env(safe-area-inset-left, 0px));
    --gr: max(8px, env(safe-area-inset-right, 0px));
    --gb: max(8px, var(--safe-bottom));
    --side-w: min(330px, 44vw);
    --map-l: calc(var(--gl) + var(--side-w) + 10px);
    --map-w: calc(100vw - var(--map-l) - var(--gr));
    --map-c: calc(var(--map-l) + var(--map-w) / 2);
  }

  body[data-mode='nav'] #banner {
    top: 8px;
    left: var(--gl);
    right: auto;
    width: var(--side-w);
    padding: 10px 14px 12px;
    gap: 6px 12px;
    border-radius: var(--radius);
  }

  body[data-mode='nav'] #man-icon,
  body[data-mode='nav'] #man-icon svg {
    width: 52px;
    height: 52px;
  }

  body[data-mode='nav'] #man-dist {
    font-size: 26px;
  }

  body[data-mode='nav'] #man-text {
    font-size: 20px;
  }

  body[data-mode='nav'] #lanes span {
    height: 34px;
  }

  body[data-mode='nav'] #lanes svg {
    width: 30px;
  }

  body[data-mode='nav'] #lanes span.use svg {
    width: 32px;
  }

  body[data-mode='nav']:not(.searching) .sheet {
    top: auto;
    left: var(--gl);
    right: auto;
    bottom: var(--gb);
    width: var(--side-w);
    max-height: calc(100% - 8px - var(--gb));
    padding: 8px 12px 10px;
    border-radius: var(--radius);
  }

  body[data-mode='nav'].nav-alts:not(.searching) .sheet,
  body[data-mode='nav'].nav-more-open:not(.searching) .sheet {
    top: 8px;
    z-index: 4;
  }

  body[data-mode='nav'] .grab {
    display: none;
  }

  body[data-mode='nav'] .fab-menu {
    top: 10px;
    left: var(--map-l);
  }

  body[data-mode='nav'] .fab-sound {
    top: 10px;
    right: var(--gr);
  }

  body[data-mode='nav'] .maplibregl-ctrl-bottom-left {
    top: 66px;
    bottom: auto;
    left: calc(var(--map-l) - 6px);
  }

  body[data-mode='nav'] #alert {
    top: 12px;
    left: var(--map-c);
    max-width: calc(var(--map-w) - 130px);
  }

  body[data-mode='nav'] .fab-report {
    right: var(--gr);
    bottom: var(--gb);
  }

  body[data-mode='nav'] #fabs {
    right: var(--gr);
    bottom: calc(var(--gb) + 74px);
  }

  body[data-mode='nav'] #speedo {
    left: var(--map-l);
    bottom: var(--gb);
  }

  body[data-mode='nav'] #road-pill,
  body[data-mode='nav'] .pill {
    left: var(--map-c);
    bottom: calc(var(--gb) + 14px);
    max-width: calc(var(--map-w) - 170px);
  }

  body[data-mode='nav'] #road-pill:not([hidden]) ~ #btn-recenter {
    bottom: calc(var(--gb) + 66px);
  }

  body[data-mode='nav'] #toast {
    left: var(--map-c);
    bottom: calc(var(--gb) + 120px);
    max-width: calc(var(--map-w) - 20px);
  }

  body[data-mode='nav'] #offer,
  body[data-mode='nav'] #parking,
  body[data-mode='nav'] #solat {
    top: 70px;
    left: var(--map-l);
    right: var(--gr);
    bottom: auto;
    width: auto;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (min-width: 900px) and (min-height: 501px) {
  body[data-mode='nav'] #road-pill,
  body[data-mode='nav'] .pill {
    left: calc(50% + 217px);
  }

  body.drive-right .sheet,
  body.drive-right #banner {
    left: auto;
    right: 14px;
  }

  body.drive-right .fab-menu {
    left: auto;
    right: 14px;
  }

  body.drive-right[data-mode='nav'] .fab-menu {
    right: 448px;
  }

  body.drive-right .fab-sound,
  body.drive-right .fab-report,
  body.drive-right #fabs,
  body.drive-right #offer,
  body.drive-right #parking,
  body.drive-right #solat {
    left: 14px;
    right: auto;
  }

  body.drive-right #speedo {
    left: auto;
    right: 450px;
  }

  body.drive-right #alert,
  body.drive-right[data-mode='nav'] #road-pill,
  body.drive-right[data-mode='nav'] .pill {
    left: calc(50% - 217px);
  }

  body.drive-right .maplibregl-ctrl-bottom-left {
    left: auto;
    right: 446px;
  }

  body.drive-right[data-mode='nav'] .maplibregl-ctrl-bottom-left {
    right: 536px;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 500px) {
  body.drive-right[data-mode='nav'] {
    --map-l: var(--gl);
    --map-r: calc(var(--gr) + var(--side-w) + 10px);
    --map-w: calc(100vw - var(--gl) - var(--map-r));
  }

  body.drive-right[data-mode='nav'] #banner,
  body.drive-right[data-mode='nav']:not(.searching) .sheet {
    left: auto;
    right: var(--gr);
  }

  body.drive-right[data-mode='nav'] .fab-menu {
    left: auto;
    right: var(--map-r);
  }

  body.drive-right[data-mode='nav'] .fab-sound,
  body.drive-right[data-mode='nav'] .fab-report,
  body.drive-right[data-mode='nav'] #fabs {
    left: var(--gl);
    right: auto;
  }

  body.drive-right[data-mode='nav'] .maplibregl-ctrl-bottom-left {
    left: auto;
    right: calc(var(--map-r) - 6px);
  }

  body.drive-right[data-mode='nav'] #speedo {
    left: auto;
    right: var(--map-r);
  }

  body.drive-right[data-mode='nav'] #offer,
  body.drive-right[data-mode='nav'] #parking,
  body.drive-right[data-mode='nav'] #solat {
    right: var(--map-r);
  }
}

@media (pointer: coarse) and (orientation: landscape) and (min-width: 900px) and (min-height: 501px) {
  body:is([data-text='large'], [data-text='xl']) :is(#banner, .sheet, #speedo, #road-pill, .pill, .fab-menu, .fab-sound, .fab-report, #fabs, #alert, #offer, #parking, #solat, #toast, .maplibregl-ctrl-bottom-left) {
    zoom: 1.25;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (min-width: 1200px) and (min-height: 640px) {
  body[data-text='xl'] :is(#banner, .sheet, #speedo, #road-pill, .pill, .fab-menu, .fab-sound, .fab-report, #fabs, #alert, #offer, #parking, #solat, #toast, .maplibregl-ctrl-bottom-left) {
    zoom: 1.5;
  }
}

.nav-jam {
  --jam: #f5b301;
  position: fixed;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 26px;
  pointer-events: none;
}

.nav-jam.m2 {
  --jam: #f08c00;
}

.nav-jam.m3 {
  --jam: #e03131;
}

.nav-jam.m4 {
  --jam: #a61e1e;
}

.jam-rail {
  position: relative;
  flex: 1;
  width: 26px;
  padding: 9px 0;
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.jam-line {
  position: absolute;
  inset: 22px 9px 9px;
  border-radius: 4px;
  background: linear-gradient(to top, color-mix(in srgb, var(--jam) 30%, var(--card)) var(--at), var(--jam) var(--at));
}

.jam-line::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 13px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--jam), #6cc3ff);
}

.jam-dot {
  position: absolute;
  left: 50%;
  bottom: calc(9px + (100% - 31px) * var(--at-n, 0));
  width: 20px;
  height: 20px;
  margin: 0 0 -10px -10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #33a7ff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.jam-card {
  position: absolute;
  bottom: max(30px, calc(9px + (100% - 31px) * var(--at-n, 0)));
  left: calc(100% + 12px);
  transform: translateY(50%);
  display: grid;
  padding: 5px 11px 6px;
  border-radius: 12px;
  background: var(--card);
  color: var(--fg);
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.jam-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -7px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: var(--card);
  transform: rotate(45deg);
  border-radius: 2px;
}

.nav-jam.card-left .jam-card {
  left: auto;
  right: calc(100% + 12px);
}

.nav-jam.card-left .jam-card::before {
  left: auto;
  right: -7px;
}

.jam-card small {
  position: relative;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.jam-card b {
  position: relative;
  font-size: 17px;
  font-weight: 900;
}

.sos-open {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 18px;
  background: #d92d20;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  text-align: left;
}

.sos-open b,
.sos-open small {
  display: block;
}

.sos-open small {
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.92;
}

#sos-highway {
  display: grid;
  gap: 8px;
}

.sos-call {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--field);
  color: var(--fg);
  text-decoration: none;
}

.sos-call b {
  display: block;
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.sos-call small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.sos-ph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--go);
  font-size: 18px;
}

.sos-call.red .sos-ph {
  background: #d92d20;
}

.sos-call em {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sos-call small .shield,
.hotline-row .shield {
  padding: 0 5px;
  border-radius: 5px;
  font-size: 13px;
  vertical-align: 1px;
}

.sos-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  min-height: 56px;
  padding: 8px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: none;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sos-more b {
  font-size: 17px;
  font-weight: 800;
}

.sos-more small {
  color: var(--muted);
  font-weight: 700;
}

.sos-more i {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--muted);
  font-size: 26px;
  font-style: normal;
}

.hotline-search {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
}

.hotline-group {
  padding: 0 6px;
}

.hotline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px;
  border-top: 1px solid var(--line);
  color: var(--fg);
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.hotline-row:first-child {
  border-top: 0;
}

.hotline-row.mine {
  margin: 4px -2px;
  border: 2px solid var(--accent);
  border-radius: 14px;
}

.hotline-row b {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.hotline-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--tag-company-bg);
  color: var(--tag-company-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.hotline-tag.gov {
  background: var(--tag-gov-bg);
  color: var(--tag-gov-ink);
}

#dlg-hotlines {
  height: calc(100% - var(--safe-top) - var(--safe-bottom) - 32px);
}

#dlg-hotlines .dialog-body {
  align-content: start;
}

.sos-where {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  font-weight: 700;
}

.sos-where small {
  color: var(--muted);
}

.sos-where b {
  font-size: 18px;
}

.sos-share {
  margin-top: 4px;
  min-height: 48px;
}
