:root {
  color-scheme: dark;
  --bg: #102018;
  --bg-sheet: rgba(12, 24, 18, 0.92);
  --ink: #f4f1e8;
  --muted: #b7c4b6;
  --amber: #e8a317;
  --green: #3dcc7a;
  --danger: #e07a6a;
  --line: rgba(244, 241, 232, 0.12);
  --map-toolbar-stack: 420px;
  --map-control-gap: 10px;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  font-size: 12px;
}

.boot-error {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

body.auth-boot .map-hud,
body.auth-boot #map,
body.auth-boot .map-toolbar,
body.auth-boot .map-compass,
body.auth-boot .map-compass-wrap,
body.auth-boot .stats-chip,
body.auth-boot .next-turn-panel {
  visibility: hidden;
}

#auth-loading {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
}

body:not(.auth-boot) #auth-loading {
  display: none;
}

#map {
  position: fixed;
  inset: 0;
  z-index: 0;
  touch-action: none;
  width: 100%;
  height: 100%;
}

.google-maps-active #map > div {
  height: 100% !important;
  width: 100% !important;
}

/* Replace Google's "check the JavaScript console" overlay on phones with our toast. */
body.native-app .gm-err-container {
  display: none !important;
}

.leaflet-control-zoom {
  border: 0 !important;
  margin-right: 12px !important;
  margin-bottom: calc(var(--map-toolbar-stack) + env(safe-area-inset-bottom)) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-sheet) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 12px !important;
}

.leaflet-control-attribution {
  background: rgba(12, 24, 18, 0.55) !important;
  color: var(--muted) !important;
  margin-bottom: 4px !important;
  font-size: 12px !important;
}

.google-maps-active .gm-style .gmnoprint.gm-bundled-control {
  margin-right: 12px !important;
  margin-bottom: calc(var(--map-toolbar-stack) + env(safe-area-inset-bottom)) !important;
}

.google-maps-active .gm-style-cc {
  margin-right: 12px !important;
}

.google-html-marker {
  position: absolute;
  pointer-events: none;
  z-index: 1000;
  width: 36px;
  height: 36px;
}

.google-html-marker .pin {
  transform: translate(-50%, -100%);
}

.google-html-marker:has(.dest-flag) {
  width: 32px;
  height: 40px;
}

.google-html-marker .dest-flag {
  transform: translate(-50%, -100%);
}

.google-html-marker .you-marker {
  width: 36px;
  height: 36px;
}

.google-html-marker .you-marker.car-marker-3d,
.google-html-marker .you-marker.car-marker-img {
  width: 48px;
  height: 48px;
}

.leaflet-container,
.leaflet-popup-content {
  font-size: 12px !important;
}

.map-hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 0;
  pointer-events: none;
}

.map-hud-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.map-hud > * {
  pointer-events: auto;
}

.map-search-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
}

.map-search-row .map-search-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: calc(100vw - 20px);
  min-width: 0;
  padding: 0 4px 0 22px;
  gap: 4px;
  background: #fff;
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  backdrop-filter: none;
}

.map-search-row .map-search-icon {
  left: 7px;
  font-size: 11px;
  color: #666;
}

.map-search-row .map-search-wrap input {
  font-size: 11px;
  padding: 8px 0;
  color: #1a1a1a;
}

.map-search-row .map-search-wrap input::placeholder {
  color: #888;
}

.map-search-row .map-search-clear {
  width: 18px;
  height: 18px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.06);
  color: #555;
}

.map-search-row .map-search-mic {
  display: grid;
  width: 26px;
  height: 26px;
  background: rgba(94, 184, 255, 0.14);
  color: #5eb8ff;
}

.map-search-row .map-search-mic:hover,
.map-search-row .map-search-mic:focus-visible {
  background: rgba(94, 184, 255, 0.22);
  color: #7cc8ff;
}

.map-search-row .map-search-narrator:not(.selected) {
  background: rgba(0, 0, 0, 0.06);
  color: #555;
}

.map-search-narrator {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 241, 232, 0.08);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

@media (pointer: coarse) {
  .map-search-narrator,
  .map-search-row .map-search-mic,
  .map-search-clear {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .map-search-narrator-icon,
  .map-search-row .map-search-mic-icon {
    width: 18px;
    height: 18px;
  }
}

.map-search-narrator-icon {
  width: 15px;
  height: 15px;
  display: block;
}

.map-search-narrator:hover,
.map-search-narrator:focus-visible {
  color: var(--ink);
  background: rgba(244, 241, 232, 0.14);
}

.map-search-narrator.selected {
  background: var(--green);
  color: #082014;
}

.map-search-narrator.selected:hover,
.map-search-narrator.selected:focus-visible {
  background: #2fb868;
  color: #082014;
}

.map-search-row .map-search-mic-icon {
  width: 15px;
  height: 15px;
}

.map-search-row .map-search-results {
  width: max(240px, 100%);
  min-width: 240px;
}

.map-search-side-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.voice-search-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(340px, calc(100vw - 20px));
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(61, 204, 122, 0.35);
  background: rgba(12, 24, 18, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: voice-avatar-in 0.28s ease-out;
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 118px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 610;
  width: min(340px, calc(100vw - 24px));
}

.voice-search-avatar[hidden] {
  display: none !important;
}

.voice-search-avatar__figure {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
}

.voice-search-avatar__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.voice-search-avatar__ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(232, 163, 23, 0.55);
  animation: voice-avatar-ring 1.4s ease-out infinite;
}

.voice-search-avatar.listening .voice-search-avatar__ring {
  border-color: rgba(232, 163, 23, 0.85);
}

.voice-search-avatar__bubble {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

@keyframes voice-avatar-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes voice-avatar-ring {
  0% {
    transform: scale(0.92);
    opacity: 0.95;
  }
  70% {
    transform: scale(1.12);
    opacity: 0;
  }
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

.home-work-row {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
}

.home-work-btn {
  flex: 0 0 auto;
  width: auto;
  max-width: 88px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 25px;
  height: 25px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 24, 18, 0.92);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.home-work-btn.has-place {
  border-color: rgba(232, 163, 23, 0.45);
}

.home-work-btn.active-slot {
  border-color: var(--amber);
  color: var(--amber);
}

.home-work-icon {
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}

.home-work-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.map-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 24, 18, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.map-search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

.map-search-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 10px 0;
}

.map-search-wrap input::placeholder {
  color: var(--muted);
}

.map-search-wrap input:focus {
  outline: none;
}

.map-search-clear {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 241, 232, 0.08);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.map-search-mic {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(94, 184, 255, 0.14);
  color: #5eb8ff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.map-search-mic-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.map-search-mic:hover,
.map-search-mic:focus-visible {
  color: #7cc8ff;
  background: rgba(94, 184, 255, 0.22);
}

.map-search-mic.listening {
  color: var(--amber);
  background: rgba(232, 163, 23, 0.18);
  animation: mic-pulse 1.2s ease-in-out infinite;
}

.map-search-wrap.listening {
  border-color: rgba(232, 163, 23, 0.55);
}

@keyframes mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 163, 23, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(232, 163, 23, 0);
  }
}

.map-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 520;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 24, 18, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-height: min(42vh, 280px);
  overflow: auto;
}

.map-search-item,
.map-search-status {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.35;
}

.map-search-item {
  cursor: pointer;
}

.map-search-item:hover,
.map-search-item:focus-visible {
  background: rgba(244, 241, 232, 0.08);
}

.map-search-item strong,
.map-search-status {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.map-search-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.map-search-status {
  color: var(--muted);
  font-weight: 400;
}

.navigate-search-wrap {
  position: relative;
}

.navigate-search-wrap .map-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
}

.place-save-actions {
  display: grid;
  gap: 6px;
  padding: 8px 0 2px;
  border-top: 1px solid var(--line);
}

.place-save-label {
  font-size: 11px;
  color: var(--muted);
}

.place-save-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.btn.ghost.place-save-btn {
  min-height: 34px;
  height: auto;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.places-panel {
  width: min(92vw, 420px);
}

.places-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.places-tab {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.places-tab.active {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(232, 163, 23, 0.12);
}

.places-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(42vh, 320px);
  overflow: auto;
}

.place-list-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.place-pick {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.04);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.place-pick:hover,
.place-pick:focus-visible {
  border-color: var(--amber);
}

.place-pick strong {
  font-size: 12px;
  font-weight: 700;
}

.place-pick span {
  font-size: 11px;
  color: var(--muted);
}

.place-remove {
  width: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.04);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.place-remove:hover,
.place-remove:focus-visible {
  color: #ffb4a8;
  border-color: rgba(255, 120, 100, 0.45);
}

.travel-mode-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.travel-mode-options-large {
  gap: 10px;
}

.travel-mode-btn {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.travel-mode-btn:hover,
.travel-mode-btn:focus-visible:not(.active) {
  border-color: rgba(244, 241, 232, 0.22);
  background: rgba(244, 241, 232, 0.08);
}

.travel-mode-btn.active {
  border-color: rgba(61, 204, 122, 0.85);
  background: var(--green);
  color: #082014;
  font-weight: 600;
}

.travel-mode-btn.active:hover,
.travel-mode-btn.active:focus-visible {
  border-color: #2fb868;
  background: #2fb868;
}

.travel-mode-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 88px;
  font-weight: 600;
}

.travel-mode-icon {
  font-size: 24px;
  line-height: 1;
}

.trail-mode-choice {
  min-height: 96px;
}

.trail-mode-hint {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1.25;
  text-align: center;
}

#trail-mode-dialog .travel-mode-options {
  grid-template-columns: repeat(2, 1fr);
}

.car-picker-panel {
  width: min(92vw, 420px);
}

.wifi-pair-panel {
  gap: 16px;
}

.wifi-pair-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
}

.wifi-pair-qr {
  display: block;
  width: min(72vw, 280px);
  height: auto;
  border-radius: 8px;
}

.wifi-pair-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wifi-pair-url {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.05);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  word-break: break-all;
}

.wifi-pair-url-row .btn {
  flex-shrink: 0;
}

.car-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.car-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 88px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  touch-action: manipulation;
}

.car-choice img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.car-choice.active,
.car-choice:hover,
.car-choice:focus-visible {
  border-color: var(--amber);
  background: rgba(232, 163, 23, 0.12);
}

@media (max-width: 360px) {
  .car-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bike-marker {
  background: rgba(12, 24, 18, 0.88);
  border: 2px solid #3dcc7a;
  border-radius: 10px;
  box-shadow: 0 0 0 6px rgba(61, 204, 122, 0.18);
}

.gps-pill {
  flex: 0 0 50vw;
  width: 50vw;
  max-width: 50vw;
  min-width: 0;
  margin: 0;
  padding: 6px 10px 6px 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.gps-pill--searching {
  flex: 0 1 auto;
  width: auto;
  max-width: min(100%, 320px);
  padding: 6px 10px;
  background: transparent;
  color: #e53935;
  border: 0;
  border-radius: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  font-weight: 700;
  box-shadow: none;
}

.gps-pill--ready {
  flex: 0 1 auto;
  width: auto;
  max-width: min(100%, 320px);
  padding: 8px 14px;
  background: #fff;
  color: #2ea85a;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  text-shadow: none;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.hud-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.stats-chip {
  position: fixed;
  left: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(12, 24, 18, 0.88);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.stats-chip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 44px;
}

.stats-chip .stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.stats-chip strong {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 700;
}

.stats-chip--nav {
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  border: none;
  border-radius: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  gap: 0;
  justify-content: space-around;
  background: #8ed9b0;
  backdrop-filter: none;
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.18);
  z-index: 400;
}

.stats-chip--nav .stats-chip-item {
  min-width: 0;
  flex: 1;
}

.stats-chip--nav .stat-label {
  color: #fff;
  opacity: 0.95;
  font-size: 11px;
}

.stats-chip--nav strong {
  color: #fff;
  font-size: 15px;
}

.stats-chip--nav #stat-time {
  font-size: 15px;
}

body:has(.stats-chip--nav) .nav-go-btn:not([hidden]) {
  bottom: calc(64px + env(safe-area-inset-bottom));
}

body:has(.stats-chip--nav) .bearing-chip:not([hidden]) {
  bottom: calc(76px + env(safe-area-inset-bottom));
}

.bearing-chip {
  position: fixed;
  left: 10px;
  right: 72px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 500;
  margin: 0;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(12, 24, 18, 0.82);
  border: 1px solid rgba(232, 163, 23, 0.35);
  backdrop-filter: blur(12px);
  font-size: 12px;
  line-height: 1.25;
  color: var(--amber);
  pointer-events: none;
}

.next-turn {
  position: fixed;
  top: calc(96px + env(safe-area-inset-top));
  right: 10px;
  left: auto;
  z-index: 501;
  display: flex;
  align-items: stretch;
  gap: 6px;
  max-width: min(300px, 78vw);
  padding: 6px;
  padding-top: 28px;
  border-radius: 16px;
  border: 1px solid rgba(102, 181, 255, 0.35);
  background: linear-gradient(180deg, rgba(16, 32, 48, 0.98), rgba(10, 22, 34, 0.96));
  backdrop-filter: blur(14px);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
}

.next-turn--approach {
  max-width: min(340px, 92vw);
  border-color: rgba(232, 163, 23, 0.55);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(232, 163, 23, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.next-turn--lane-close {
  border-color: rgba(61, 204, 122, 0.65);
  box-shadow:
    0 6px 22px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(61, 204, 122, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.next-turn--lane-close .next-turn-lanes {
  padding: 4px;
  border-radius: 12px;
  background: rgba(61, 204, 122, 0.1);
  border: 1px solid rgba(61, 204, 122, 0.35);
}

.next-turn--lane-close .turn-lane--valid {
  transform: scale(1.04);
  box-shadow:
    inset 0 0 0 1px rgba(61, 204, 122, 0.35),
    0 0 10px rgba(61, 204, 122, 0.25);
}

.next-turn-warn {
  margin: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(232, 163, 23, 0.18);
  border: 1px solid rgba(232, 163, 23, 0.45);
  color: #ffd98a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.next-turn-streetview-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a1218;
}

.next-turn-streetview {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  background: #1a2430;
}

.next-turn-lanes {
  width: 100%;
}

.turn-lanes__track {
  display: flex;
  gap: 6px;
  width: 100%;
}

.turn-lane {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.55;
}

.turn-lane--valid {
  opacity: 1;
  border-color: rgba(61, 204, 122, 0.65);
  background: rgba(61, 204, 122, 0.14);
  box-shadow: inset 0 0 0 1px rgba(61, 204, 122, 0.22);
}

.turn-lane__arrow {
  font-size: 18px;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}

.turn-lane--valid .turn-lane__arrow {
  color: #8ef0b8;
}

.turn-lane__num {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.next-turn-lane-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #d6e8ff;
  font-weight: 600;
}

.next-turn[hidden] {
  display: none !important;
}

.next-turn-card {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.next-turn-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 122, 106, 0.55);
  border-radius: 999px;
  background: rgba(12, 24, 18, 0.95);
  color: #ff7a6a;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.next-turn-close:hover,
.next-turn-close:focus-visible {
  background: rgba(24, 12, 12, 0.98);
  border-color: rgba(255, 122, 106, 0.85);
  color: #ff9588;
}

.next-turn-map {
  width: 100%;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  background: #1a2430;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.next-turn-map .leaflet-container {
  width: 100%;
  height: 100%;
  background: #dfe6eb;
}

.next-turn-map .leaflet-control-container,
.next-turn-map .leaflet-pane.leaflet-shadow-pane {
  display: none;
}

.next-turn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 2px;
}

.next-turn.dragging {
  opacity: 0.94;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.next-turn-drag {
  flex: 0 0 auto;
  align-self: center;
  width: 22px;
  height: 52px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.next-turn-drag:active,
.next-turn.dragging .next-turn-drag {
  cursor: grabbing;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.1);
}

.next-turn-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: transparent;
  padding: 0;
  overflow: visible;
}

.next-turn-icon .next-turn-arrow {
  width: 44px;
  height: 44px;
  display: block;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.45));
}

.next-turn-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.next-turn-copy strong {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-turn-copy span {
  font-size: 11px;
  line-height: 1.2;
  color: #8ec5ff;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.next-turn-you-pin,
.next-turn-junction-pin {
  background: transparent;
  border: 0;
}

.next-turn-you-marker {
  position: relative;
  width: 28px;
  height: 28px;
}

.next-turn-you-dot {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #1a73e8;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.next-turn-you-arrow {
  position: absolute;
  left: 50%;
  top: 1px;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid #1a73e8;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.next-turn-junction-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1a73e8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

@media (max-width: 420px) {
  .next-turn {
    max-width: min(260px, 72vw);
  }

  .next-turn-map {
    height: 96px;
  }
}

.volume-hud {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

.volume-indicator {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  min-height: 44px;
  justify-content: flex-end;
}

.volume-bar {
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.18);
  transition: background 0.15s ease;
}

.volume-bar.on {
  background: var(--green);
  box-shadow: 0 0 6px rgba(61, 204, 122, 0.45);
}

.volume-hud.is-muted .volume-bar.on {
  background: rgba(244, 241, 232, 0.18);
  box-shadow: none;
}

.volume-speaker-btn {
  width: 44px;
  height: 44px;
  font-size: 12px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.volume-speaker-btn.is-holding {
  animation: speaker-hold-pulse 4s linear;
  box-shadow: 0 0 0 3px var(--amber);
}

.volume-speaker-btn.listening,
.voice-assist-btn.listening {
  color: var(--amber);
  background: rgba(232, 163, 23, 0.18);
  animation: mic-pulse 1.2s ease-in-out infinite;
}

.volume-speaker-btn.is-muted,
.voice-assist-btn.is-muted {
  opacity: 0.5;
}

@keyframes speaker-hold-pulse {
  0% {
    box-shadow: 0 0 0 2px var(--amber);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(232, 163, 23, 0);
  }
}

.volume-panel {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  min-width: 148px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-sheet);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 8px;
}

.volume-panel[hidden] {
  display: none !important;
}

.volume-panel-label {
  font-size: 12px;
  color: var(--muted);
}

.volume-panel input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
}

.volume-panel output {
  font-size: 12px;
  color: var(--ink);
  text-align: center;
}

.map-toolbar {
  position: fixed;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 520;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--map-control-gap);
  max-height: calc(100vh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-x: visible;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.map-toolbar::-webkit-scrollbar {
  display: none;
}

.map-toolbar .map-compass {
  position: relative;
  right: auto;
  bottom: auto;
  flex-shrink: 0;
  margin-top: 6px;
}

.map-toolbar .map-compass[hidden] {
  display: none !important;
}

.map-toolbar .map-recenter-btn {
  position: static;
  flex-shrink: 0;
}

.map-toolbar .map-recenter-btn[hidden] {
  display: none !important;
}

.map-call-btn {
  width: 44px;
  height: 44px;
  background: #3dcc7a;
  color: #102018;
  border-color: rgba(61, 204, 122, 0.75);
  box-shadow: 0 2px 12px rgba(61, 204, 122, 0.35);
}

.map-call-btn:hover,
.map-call-btn:focus-visible {
  background: #49d684;
  color: #102018;
}

.map-call-btn .map-btn-icon {
  width: 22px;
  height: 22px;
}

.call-list .circle-item:hover,
.call-list .circle-item:focus-visible {
  border-color: rgba(61, 204, 122, 0.55);
  background: rgba(61, 204, 122, 0.08);
}

.call-list .call-item-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(61, 204, 122, 0.18);
  color: #3dcc7a;
  font-size: 16px;
}

.call-list .circle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  cursor: pointer;
}

.map-compass {
  width: 56px;
  height: 56px;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}

.map-compass-close {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 3;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(255, 122, 106, 0.55);
  border-radius: 999px;
  background: rgba(12, 24, 18, 0.95);
  color: #ff7a6a;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.map-compass-close:hover,
.map-compass-close:focus-visible {
  background: rgba(24, 12, 12, 0.98);
  border-color: rgba(255, 122, 106, 0.85);
  color: #ff9588;
}

.map-compass__bezel {
  pointer-events: none;
  position: relative;
  width: 100%;
  height: 100%;
}

.map-compass__dial {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 0.25s ease-out;
}

.map-compass__dial svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-compass__lubber {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  line-height: 0;
}

body.driving-nav-active .map-compass {
  animation: compass-pulse 1.6s ease-in-out infinite;
}

.compass-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding:
    calc(16px + env(safe-area-inset-top))
    calc(16px + env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 38%, rgba(24, 48, 72, 0.55), rgba(4, 8, 14, 0.98) 62%),
    #060a10;
}

.compass-fullscreen[hidden] {
  display: none !important;
}

body.compass-fullscreen-open {
  overflow: hidden;
}

.compass-fullscreen-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 122, 106, 0.55);
  border-radius: 999px;
  background: rgba(12, 24, 18, 0.92);
  color: #ff7a6a;
  font: inherit;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.compass-fullscreen-close:hover,
.compass-fullscreen-close:focus-visible {
  background: rgba(24, 12, 12, 0.98);
  border-color: rgba(255, 122, 106, 0.85);
  color: #ff9588;
}

.compass-fullscreen__readout {
  text-align: center;
  color: #fff;
}

.compass-fullscreen__degrees {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.compass-fullscreen__direction {
  margin-top: 8px;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--amber);
}

.compass-fullscreen__source {
  margin-top: 6px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.62);
}

.compass-fullscreen__stage {
  position: relative;
  width: min(78vw, 78vh, 420px);
  height: min(78vw, 78vh, 420px);
}

.compass-fullscreen__dial {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 0.2s ease-out;
}

.compass-fullscreen__dial svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.55));
}

.compass-fullscreen__lubber {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  line-height: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

@keyframes compass-pulse {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 1;
  }
}

body.driving-nav-active .you-marker.nav-car:not(.car-marker-3d):not(.car-marker-img) {
  box-shadow: 0 0 0 8px rgba(232, 163, 23, 0.28);
}

.map-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(12, 24, 18, 0.9);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.map-car-picker-btn {
  overflow: hidden;
  border-color: rgba(232, 163, 23, 0.45);
}

.map-car-picker-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.map-share-btn {
  overflow: hidden;
}

.map-share-btn__img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
}

.map-btn-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.map-stop-gps-btn {
  border-color: rgba(229, 57, 53, 0.65);
}

.map-stop-gps-icon {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

body.driving-nav-active .map-car-picker-btn {
  box-shadow: 0 0 0 3px rgba(232, 163, 23, 0.28), 0 2px 10px rgba(0, 0, 0, 0.35);
}

.map-icon-btn.primary {
  width: 48px;
  height: 48px;
  font-size: 12px;
  background: var(--amber);
  border-color: rgba(232, 163, 23, 0.6);
  color: #1a1408;
  font-weight: 700;
}

.map-track-btn {
  overflow: hidden;
  padding: 0;
}

.map-track-btn__img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  display: block;
  pointer-events: none;
  border-radius: 50%;
}

.map-icon-btn.primary.busy {
  background: var(--green);
  border-color: rgba(61, 204, 122, 0.6);
  color: #082014;
}

.nav-go-btn {
  position: fixed;
  left: 10px;
  right: 62px;
  bottom: calc(54px + env(safe-area-inset-bottom));
  z-index: 502;
  min-width: 0;
  width: auto;
  padding: 16px 28px;
  border: none;
  border-radius: 14px;
  background: #2ea85a;
  color: #fff;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.12s ease;
}

.nav-go-btn:active:not(:disabled) {
  transform: scale(0.98);
  background: #268f4d;
}

.nav-go-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nav-go-btn--dialog {
  position: static;
  transform: none;
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  min-height: 42px;
  padding: 10px 16px;
  font-size: 14px;
  letter-spacing: 0.04em;
  box-shadow: none;
}

.nav-go-btn--dialog:active:not(:disabled) {
  transform: scale(0.98);
}

.map-icon-btn.danger {
  color: #ff7a6a;
  border-color: rgba(224, 122, 106, 0.55);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 1px rgba(255, 122, 106, 0.45);
}

#clear-btn:not(:disabled):hover,
#clear-btn:not(:disabled):focus-visible {
  color: #ff9588;
  border-color: rgba(255, 122, 106, 0.75);
}

.map-icon-btn.active,
.map-icon-btn.sharing-live {
  background: var(--green);
  border-color: rgba(61, 204, 122, 0.85);
  color: #082014;
  font-weight: 700;
}

.map-icon-btn.active:active,
.map-icon-btn.sharing-live:active {
  background: #2fb868;
  border-color: #2fb868;
}

#navigate-btn {
  font-size: 24px;
  line-height: 1;
}

#return-btn {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

#recenter-btn {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}

.map-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(to bottom, rgba(16, 32, 24, 0.92), rgba(16, 32, 24, 0.15));
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(232, 163, 23, 0.2);
}

.brand h1 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  pointer-events: auto;
}

.settings-menu {
  position: relative;
}

.settings-btn {
  min-width: 40px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg-sheet);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 4px;
  z-index: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.settings-panel[hidden] {
  display: none !important;
}

.settings-item {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.settings-item:hover,
.settings-item:focus-visible {
  background: rgba(244, 241, 232, 0.08);
  border-color: var(--line);
}

.settings-volume {
  display: grid;
  gap: 6px;
  padding: 8px 10px 4px;
  font-size: 12px;
  color: var(--muted);
}

.settings-volume input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
}

.settings-volume output {
  font-size: 12px;
  color: var(--ink);
  text-align: right;
}

.voice-volume-field .voice-volume-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.voice-volume-row input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
}

.voice-volume-row output {
  min-width: 2.5rem;
  font-size: 12px;
  color: var(--ink);
  text-align: right;
}

.icon-btn,
.btn,
.fab {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.icon-btn {
  min-width: 48px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sheet);
  color: var(--ink);
  padding: 0 10px;
}

.fab {
  position: fixed;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 500;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-sheet);
  color: var(--ink);
  font-size: 12px;
}

.sheet {
  display: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.stats div {
  background: rgba(244, 241, 232, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.stats strong {
  font-size: 12px;
}

.bearing {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--amber);
  min-height: 1.2em;
}

.actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
}

.secondary-row {
  margin-top: 8px;
  grid-template-columns: 1fr 1fr 1fr;
}

.secondary-row .btn {
  min-height: 52px;
  height: 52px;
  font-size: 12px;
}

.btn {
  border: 0;
  border-radius: 14px;
  min-height: 48px;
  padding: 0 12px;
  color: var(--ink);
}

.btn.primary {
  background: var(--amber);
  color: #1a1408;
  font-weight: 700;
}

.btn.primary.busy {
  background: var(--green);
  color: #082014;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.btn.ghost.place-save-btn.active {
  border-color: rgba(61, 204, 122, 0.85);
  background: var(--green);
  color: #082014;
  font-weight: 600;
}

.btn.ghost.place-save-btn.active:hover,
.btn.ghost.place-save-btn.active:focus-visible {
  border-color: #2fb868;
  background: #2fb868;
  color: #082014;
}

.btn.small {
  min-height: 40px;
  font-size: 12px;
}

.secondary-row .btn.small {
  min-height: 52px;
  height: 52px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.danger {
  color: var(--danger);
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(48px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 800;
  max-width: min(92vw, 420px);
  padding: 8px 12px;
  border-radius: 10px;
  background: #1c3328;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
}

.pin {
  background: transparent;
  border: 0;
}

.start-pin span {
  display: inline-block;
  background: var(--green);
  color: #082014;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

.dest-pin span {
  display: inline-block;
  background: #4aa8ff;
  color: #082014;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

.dest-flag-marker {
  background: transparent;
  border: 0;
}

.dest-flag {
  width: 32px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.dest-flag svg {
  display: block;
}

.you-pin {
  background: transparent;
  border: 0;
}

.you-marker {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.you-marker svg {
  width: 32px;
  height: 32px;
  display: block;
}

.arrow-marker {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

.arrow-marker svg {
  display: block;
}

.car-marker {
  background: rgba(26, 20, 8, 0.88);
  border: 2px solid #e8a317;
  border-radius: 10px;
  box-shadow: 0 0 0 6px rgba(232, 163, 23, 0.22);
}

.car-marker-3d {
  width: 40px;
  height: 52px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.48));
}

.car-marker-img {
  width: 48px;
  height: 48px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
}

.car-marker-image {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

body.driving-nav-active .you-marker.car-marker-img {
  filter: drop-shadow(0 0 12px rgba(232, 163, 23, 0.5))
    drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
}

.car-marker-3d svg {
  width: 40px;
  height: 52px;
  display: block;
}

body.driving-nav-active .you-marker.car-marker-3d {
  filter: drop-shadow(0 0 12px rgba(232, 163, 23, 0.55))
    drop-shadow(0 3px 7px rgba(0, 0, 0, 0.48));
}

.you-pin i {
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  border-radius: 50%;
  background: #4aa8ff;
  border: 3px solid #fff;
  box-shadow: 0 0 0 8px rgba(74, 168, 255, 0.28);
}

.leaflet-div-icon {
  background: transparent;
  border: 0;
}

.share-banner {
  position: fixed;
  top: calc(44px + env(safe-area-inset-top));
  left: 10px;
  right: 58px;
  z-index: 600;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(28, 51, 40, 0.92);
  border: 1px solid rgba(61, 204, 122, 0.35);
  backdrop-filter: blur(12px);
}

.share-banner strong {
  display: block;
  font-size: 12px;
}

.share-banner p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

body.sharing-active .leaflet-control-attribution {
  margin-bottom: 4px !important;
}

.circle-dialog {
  border: 0;
  padding: 0;
  width: min(96vw, 440px);
  max-height: min(88vh, 720px);
  border-radius: 18px;
  background: #13241c;
  color: var(--ink);
  margin: auto;
}

.circle-dialog[open] {
  display: flex;
  flex-direction: column;
}

.circle-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

#navigate-dialog {
  background: #e6e6e6;
  color: #1a1a1a;
  max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: hidden;
}

#navigate-dialog .circle-panel {
  gap: 8px;
  padding: 12px;
  overflow: visible;
}

#navigate-dialog .circle-header {
  gap: 8px;
  align-items: center;
}

#navigate-dialog .circle-header h2 {
  font-size: 13px;
  color: #1a1a1a;
}

#navigate-dialog #navigate-dialog-subtitle,
#navigate-dialog .navigate-dialog-hint {
  display: none;
}

#navigate-dialog .navigate-dialog-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 8px;
  align-items: end;
}

#navigate-dialog .navigate-dialog-row .field {
  min-width: 0;
}

#navigate-dialog .place-save-buttons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#navigate-dialog .btn.ghost.place-save-btn {
  min-height: 30px;
  padding: 4px 4px;
  font-size: 10px;
}

#navigate-dialog .place-save-label {
  font-size: 10px;
  display: none;
}

#navigate-dialog .travel-mode-btn {
  min-height: 34px;
  padding: 6px 4px;
  font-size: 11px;
  border-radius: 10px;
}

#navigate-dialog .travel-mode-options {
  gap: 4px;
}

#navigate-dialog .field {
  gap: 4px;
  font-size: 10px;
}

#navigate-dialog .field input {
  min-height: 38px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 10px;
  background: #fff;
  border-color: rgba(0, 0, 0, 0.16);
  color: #1a1a1a;
}

#navigate-dialog .field input.address-selected {
  border-color: rgba(61, 204, 122, 0.85);
  background: var(--green);
  color: #082014;
  font-weight: 600;
}

#navigate-dialog .map-search-item.selected {
  background: var(--green);
  color: #082014;
}

#navigate-dialog .map-search-item.selected strong,
#navigate-dialog .map-search-item.selected span {
  color: #082014;
}

#navigate-dialog .field input::placeholder {
  color: #888;
}

#navigate-dialog .icon-btn {
  min-width: 34px;
  height: 30px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  border-color: rgba(0, 0, 0, 0.16);
  color: #333;
}

#navigate-dialog .voice-volume-row output {
  font-size: 10px;
  min-width: 2rem;
  color: #333;
}

#navigate-dialog .place-save-actions {
  padding: 4px 0 0;
  gap: 4px;
  border-top-color: rgba(0, 0, 0, 0.12);
}

#navigate-dialog .btn.ghost.place-save-btn:not(.active) {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.18);
  color: #333;
}

#navigate-dialog .travel-mode-btn:not(.active) {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #333;
}

#navigate-dialog .travel-mode-btn:not(.active):hover,
#navigate-dialog .travel-mode-btn:not(.active):focus-visible {
  border-color: rgba(0, 0, 0, 0.28);
  background: #f5f5f5;
}

#navigate-dialog .voice-volume-field .voice-volume-row {
  gap: 6px;
}

#navigate-dialog .nav-go-btn--dialog {
  min-height: 40px;
  margin-top: 0;
  padding: 8px 12px;
}

#navigate-dialog .stop-navigate-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-weight: 600;
}

#navigate-dialog .stop-navigate-btn:hover,
#navigate-dialog .stop-navigate-btn:focus-visible {
  background: #c96858;
  color: #fff;
}

#navigate-dialog .stop-navigate-btn:active {
  background: #b85a4a;
}

#stop-nav-confirm-dialog .stop-navigate-btn {
  min-height: 40px;
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-weight: 600;
}

#stop-nav-confirm-dialog .stop-navigate-btn:hover,
#stop-nav-confirm-dialog .stop-navigate-btn:focus-visible {
  background: #c96858;
  color: #fff;
}

#stop-nav-confirm-dialog .stop-navigate-btn:active {
  background: #b85a4a;
}

#navigate-dialog .circle-header p,
#navigate-dialog .field,
#navigate-dialog .hint,
#navigate-dialog .place-save-label {
  color: #555;
}

#navigate-dialog .navigate-search-wrap .map-search-results {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.14);
  color: #1a1a1a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

#navigate-dialog .map-search-item:hover,
#navigate-dialog .map-search-item:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

#navigate-dialog .map-search-item strong,
#navigate-dialog .map-search-status {
  color: #1a1a1a;
}

#navigate-dialog .map-search-item span,
#navigate-dialog .map-search-status {
  color: #666;
}

.circle-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.circle-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.circle-header h2 {
  margin: 0;
  font-size: 12px;
}

.circle-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.field input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.05);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.add-contact {
  display: grid;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.account-api-key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.usage-disclaimer {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(232, 163, 23, 0.45);
  background: rgba(232, 163, 23, 0.1);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.usage-disclaimer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--amber);
  font-size: 11px;
}

.usage-disclaimer p {
  margin: 0 0 6px;
}

.usage-disclaimer p:last-child {
  margin-bottom: 0;
}

.usage-disclaimer em {
  font-style: normal;
  color: var(--amber);
}

.usage-disclaimer-panel {
  gap: 14px;
}

.usage-disclaimer-dialog p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
}

.usage-disclaimer-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.circle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 34vh;
  overflow: auto;
}

.circle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(244, 241, 232, 0.04);
}

.circle-item-info strong {
  display: block;
  font-size: 12px;
}

.circle-item-info span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.narrator-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.narrator-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.narrator-filter-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
}

.narrator-filter-btn.active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(61, 204, 122, 0.12);
}

.narrator-filter-btn[data-narrator-filter="cloud"].active {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(232, 163, 23, 0.12);
}

.narrator-toolbar input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.05);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
}

.narrator-sort-btn {
  flex-shrink: 0;
  min-width: 64px;
}

.narrator-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(46vh, 360px);
  overflow: auto;
}

.narrator-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.public-voices-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.public-voices-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.public-voices-tab.active {
  background: rgba(255, 255, 255, 0.14);
}

.public-voices-mode select {
  margin-left: 8px;
}

.public-voices-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.public-voices-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-voice-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

.public-voices-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.public-voices-allow-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.public-voices-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-voice-item {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.public-voice-item input {
  margin-top: 3px;
}

.public-voice-item strong {
  display: block;
}

.public-voice-item span {
  display: block;
  font-size: 0.85rem;
  opacity: 0.85;
}

.public-voices-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.public-voices-list {
  max-height: min(40vh, 320px);
}

.usage-analytics-panel {
  max-width: min(96vw, 720px);
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.analytics-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-card strong {
  font-size: 1.15rem;
}

.analytics-card span {
  font-size: 0.78rem;
  opacity: 0.85;
}

.analytics-section {
  margin-top: 14px;
}

.analytics-section h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.analytics-table-wrap {
  overflow: auto;
  max-height: min(28vh, 220px);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.analytics-table th,
.analytics-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-table th {
  position: sticky;
  top: 0;
  background: rgba(20, 24, 32, 0.95);
}

.analytics-recent {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(24vh, 180px);
  overflow: auto;
}

.analytics-recent-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.analytics-recent-item span {
  opacity: 0.8;
  font-size: 0.76rem;
}

.narrator-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(244, 241, 232, 0.04);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.narrator-preview-btn {
  flex-shrink: 0;
  width: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(244, 241, 232, 0.06);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}

.narrator-preview-btn:hover,
.narrator-preview-btn:focus-visible {
  color: var(--ink);
  border-color: rgba(232, 163, 23, 0.45);
}

.narrator-preview-btn.playing {
  color: var(--amber);
  border-color: var(--amber);
  background: rgba(232, 163, 23, 0.14);
  animation: narrator-preview-pulse 1.2s ease-in-out infinite;
}

@keyframes narrator-preview-pulse {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 1;
  }
}

.narrator-item strong {
  font-size: 12px;
}

.narrator-item span {
  color: var(--muted);
  font-size: 11px;
}

.narrator-item:hover,
.narrator-item:focus-visible {
  border-color: rgba(232, 163, 23, 0.45);
}

.narrator-item.selected {
  border-color: var(--amber);
  background: rgba(232, 163, 23, 0.12);
}

.narrator-item-cloud {
  border-color: rgba(232, 163, 23, 0.35);
}

.narrator-item-free {
  border-color: rgba(61, 204, 122, 0.35);
}

.narrator-item-free.selected {
  border-color: var(--green);
  background: rgba(61, 204, 122, 0.12);
}

.narrator-item-google-free {
  border-color: rgba(66, 133, 244, 0.4);
}

.narrator-item-google-free .narrator-tier {
  color: #5b9cf5;
}

.narrator-item-google-free.selected {
  border-color: #4285f4;
  background: rgba(66, 133, 244, 0.12);
}

.narrator-tier {
  font-style: normal;
  color: var(--green);
}

.narrator-item-cloud .narrator-tier {
  color: var(--amber);
}

.narrator-item-cloud.selected {
  border-color: var(--amber);
  background: rgba(232, 163, 23, 0.12);
}

.circle-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.share-step {
  display: grid;
  gap: 10px;
}

.share-choice-btn {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  border: none;
}

.share-choice-btn--circle {
  background: #2ea85a;
  color: #fff;
}

.share-choice-btn--circle:hover,
.share-choice-btn--circle:focus-visible {
  background: #268f4d;
  color: #fff;
}

.share-choice-btn--other {
  background: #4285f4;
  color: #fff;
}

.share-choice-btn--other:hover,
.share-choice-btn--other:focus-visible {
  background: #3367d6;
  color: #fff;
}

.share-back-btn {
  justify-self: start;
  padding-inline: 14px;
  background: #d93025;
  color: #fff;
  font-weight: 700;
  border: none;
}

.share-back-btn:hover,
.share-back-btn:focus-visible {
  background: #b3261e;
  color: #fff;
}

.share-pick-list {
  max-height: 28vh;
}

.share-pick-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(244, 241, 232, 0.04);
  cursor: pointer;
}

.share-pick-item.selected {
  border-color: rgba(232, 163, 23, 0.55);
  background: rgba(232, 163, 23, 0.12);
}

.share-pick-item strong {
  display: block;
  font-size: 12px;
}

.share-pick-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.share-send-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-send-actions .btn {
  width: 100%;
}

.view-page .leaflet-control-zoom {
  margin-right: 12px !important;
  margin-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
}

.view-page .leaflet-control-attribution {
  margin-right: 12px !important;
  margin-bottom: calc(4px + env(safe-area-inset-bottom)) !important;
}

.view-page.google-maps-active .gm-style .gmnoprint.gm-bundled-control {
  margin-right: 12px !important;
  margin-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
}

.view-maps-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.view-maps-actions .btn {
  width: 100%;
}

.view-toolbar {
  position: fixed;
  left: 14px;
  bottom: calc(108px + env(safe-area-inset-bottom));
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.view-panel {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 500;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-sheet);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.view-panel.compact {
  padding: 12px 14px;
}

.view-legend {
  margin: 6px 0 0;
}

.view-panel h2 {
  margin: 0 0 8px;
  font-size: 12px;
}

.view-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.4;
}

.view-panel .btn {
  width: 100%;
}

.auth-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
}

.auth-card {
  width: min(96vw, 420px);
  padding: 20px;
  border-radius: 18px;
  background: #13241c;
  border: 1px solid var(--line);
}

.auth-brand {
  margin-bottom: 14px;
  align-items: center;
}

.auth-brand h1 {
  margin: 0;
}

.auth-tagline {
  width: min(96vw, 420px);
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.auth-install {
  width: min(96vw, 420px);
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.install-app-btn {
  width: 100%;
}

.install-app-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-tab {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.auth-tab.active {
  background: rgba(232, 163, 23, 0.15);
  border-color: rgba(232, 163, 23, 0.45);
  color: var(--ink);
  font-weight: 600;
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.show-password {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.show-password input {
  width: 16px;
  height: 16px;
  accent-color: var(--amber);
  cursor: pointer;
}

.remember-signin {
  margin-top: 0;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.google-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.auth-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.auth-success {
  margin: 12px 0 0;
  color: var(--green);
  font-size: 12px;
}

.auth-footer-link {
  margin: 0;
  text-align: right;
  font-size: 12px;
}

.auth-footer-link a {
  color: var(--amber);
  text-decoration: none;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

.reset-method-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

.reset-method-fieldset legend {
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.reset-method-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}

.reset-method-option input {
  accent-color: var(--amber);
}

.dev-hint {
  color: var(--amber);
}

.account-btn {
  max-width: 72px;
  font-size: 12px;
}

.google-auth-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
}
