:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --line: #d8dee8;
  --text: #1b2430;
  --muted: #667084;
  --accent: #145af2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

.panel {
  padding: 1rem;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.subtitle,
.hint,
.status-list,
.mode-hint {
  color: var(--muted);
}

h1,
h2 {
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1rem;
  margin-top: 1.25rem;
}

input,
button,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.7rem 0.8rem;
  font: inherit;
}

button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
}

.button-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.row-actions {
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 0.5rem;
}

#rf-overlay-button {
  margin-top: 0.5rem;
}

.mode-hint {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
}

.route-grid {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.route-point-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #fbfcfe;
  margin-bottom: 0.75rem;
}

.route-point-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.route-point-head label {
  font-weight: 700;
}

.route-badge {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.route-badge-from {
  background: #1d9a6c;
}

.route-badge-to {
  background: #d63b3b;
}

.route-point-card input + input {
  margin-top: 0.45rem;
}

.compact-results {
  margin-top: 0.5rem;
}

.compact-results li {
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
}

.point-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.point-summary-text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.point-details-toggle {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.point-details-toggle[aria-expanded="true"] .point-details-chevron {
  transform: rotate(180deg);
}

.point-details-chevron {
  display: inline-block;
  transition: transform 140ms ease;
}

.point-details {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #ffffff;
}

.point-details.is-hidden {
  display: none;
}

.point-detail-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: start;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-top: 1px solid var(--line);
}

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

.point-detail-row:hover {
  background: #f8fbff;
}

.point-detail-label {
  color: var(--muted);
  font-size: 0.78rem;
  padding-top: 0.12rem;
}

.point-detail-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  word-break: break-word;
}

.point-detail-copy {
  width: auto;
  padding: 0.22rem 0.45rem;
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--muted);
}

.rf-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
}

.rf-overlay.is-hidden {
  display: none;
}

.rf-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
}

.rf-dialog {
  position: relative;
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.rf-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.rf-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.rf-controls label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.rf-controls button {
  align-self: end;
}

.rf-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.rf-chart {
  display: block;
  width: 100%;
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #eef6ff 0%, #f9fbfe 100%);
}

.rf-ground-area {
  fill: rgba(121, 88, 57, 0.18);
}

.rf-ground-line {
  fill: none;
  stroke: #6f5336;
  stroke-width: 2.4;
}

.rf-los-line {
  fill: none;
  stroke: #145af2;
  stroke-width: 2.2;
  stroke-dasharray: 7 5;
}

.rf-fresnel-line {
  fill: none;
  stroke: #28a067;
  stroke-width: 1.8;
  stroke-dasharray: 5 4;
}

.rf-status-text {
  margin-top: 0.6rem;
}

.results,
.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.results li {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fafbfd;
  margin-bottom: 0.5rem;
}

#route-results.is-expanded {
  max-height: min(32rem, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 0.35rem;
}

.route-steps-toggle {
  margin-top: 0.25rem;
}

.result-title {
  font-weight: 700;
}

.result-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.elevation-panel.is-hidden {
  display: none;
}

.settings-list {
  display: grid;
  gap: 0.5rem;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fafbfd;
}

.setting-item input {
  width: auto;
  margin: 0;
}

.setting-item input:disabled + span {
  color: var(--muted);
}

.elevation-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.elevation-stat {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fafbfd;
}

.elevation-stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.elevation-stat-value {
  display: block;
  font-weight: 700;
  margin-top: 0.15rem;
}

.elevation-chart {
  display: block;
  width: 100%;
  height: 140px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #eef5ff 0%, #f9fbfe 100%);
}

.elevation-area {
  fill: rgba(20, 90, 242, 0.16);
}

.elevation-line {
  fill: none;
  stroke: #145af2;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.elevation-cursor-line {
  stroke: rgba(20, 90, 242, 0.45);
  stroke-width: 1.2;
  display: none;
}

.elevation-cursor-point {
  fill: #145af2;
  stroke: #ffffff;
  stroke-width: 1.5;
  display: none;
}


#map {
  min-height: 100vh;
}

@media (min-width: 901px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .panel {
    min-height: 0;
    overscroll-behavior: contain;
  }

  #map {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(50vh, 1fr);
  }

  .panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rf-controls,
  .rf-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Atlas workbench: shared planning, guest and driving-preview shells. */
:root { --bg:#f5f4ed; --panel:#faf9f4; --line:#dddeda; --text:#213b36; --muted:#6b7771; --accent:#1d6256; font-family:'Avenir Next',Avenir,'Trebuchet MS',sans-serif; color-scheme:light; }
[hidden], .is-hidden { display:none!important; }
html,body { width:100%; height:100%; overflow:hidden; }
body { font-size:14px; }
button,input,select { font:inherit; }
button,a,input,select,summary { -webkit-tap-highlight-color:transparent; }
button { font-weight:600; transition:background .15s,color .15s; }
button:hover { filter:brightness(.96); }
button:disabled { opacity:.45; cursor:not-allowed; }
:focus-visible { outline:3px solid #c66c31; outline-offset:3px; }
input,select { background:#fff; color:var(--text); min-height:44px; border-radius:9px; }
input::placeholder { color:#87908a; }
input:focus { border-color:var(--accent); outline:2px solid #1d625622; }
button { border-radius:9px; min-height:42px; }
.button-secondary { background:#fffefa; border-color:var(--line); color:var(--text); }
.button-text { background:transparent; border:0; width:auto; min-height:34px; padding:5px 0; color:var(--accent); font-size:12px; }
.icon-button { width:34px; min-height:34px; flex:0 0 34px; padding:0; border:0; background:transparent; color:var(--muted); font-size:22px; }
.app-header { height:76px; display:flex; align-items:center; padding:0 26px; gap:40px; background:var(--panel); border-bottom:1px solid var(--line); position:relative; z-index:3; }
.brand { display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; flex:0 0 286px; }
.brand svg { width:38px; height:38px; fill:none; stroke:var(--accent); stroke-width:1.8; }
.brand>span { font-size:22px; font-weight:800; letter-spacing:4px; line-height:1; }
.brand small { display:block; font-size:8px; letter-spacing:2.1px; margin-top:6px; font-weight:600; }
.mode-nav { display:flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:12px; background:#eeeee7; }
.mode-nav button { width:auto; background:transparent; color:var(--muted); border:0; min-height:36px; padding:8px 18px; white-space:nowrap; font-size:13px; }
.mode-nav button[aria-pressed=true] { background:#fffefa; color:var(--text); box-shadow:0 1px 4px #20332e12; }
.header-end { margin-left:auto; display:flex; gap:18px; align-items:center; }
.local-pill { white-space:nowrap; font-size:11px; display:flex; align-items:center; gap:7px; }
.local-pill::before { content:''; width:6px; height:6px; background:#b2874b; border-radius:50%; }
.local-pill[data-state=ok]::before { background:#3e8463; }
.edition { font-size:10px; color:var(--muted); padding-left:18px; border-left:1px solid var(--line); }
.shell { display:grid; grid-template-columns:352px minmax(0,1fr); height:calc(100dvh - 76px); min-height:0; overflow:hidden; }
.panel { display:flex; flex-direction:column; min-height:0; padding:0; background:var(--panel); overflow-y:auto; border-right:1px solid var(--line); }
.panel-content { padding:29px 24px 24px; flex:1 0 auto; }
.eyebrow { font-size:9px; font-weight:700; letter-spacing:1.7px; color:#8b6b4a; margin:0 0 12px; }
h1 { font-size:27px; font-weight:650; letter-spacing:-1px; line-height:1.15; margin-bottom:14px; }
h2 { font-size:14px; font-weight:650; margin:0 0 12px; }
.intro { color:var(--muted); font-size:13px; line-height:1.7; margin:0 0 25px; }
.field-label { display:block; font-size:11px; font-weight:600; margin:0 0 9px; }
.search-wrap { position:relative; }
.search-wrap>span { position:absolute; top:7px; left:12px; font-size:26px; line-height:30px; color:var(--muted); }
.search-wrap input { padding-left:40px; height:48px; }
.explore-note { display:flex; align-items:flex-start; gap:15px; margin:34px 0 40px; }
.note-symbol { color:#b78b5b; font-size:26px; }
.explore-note p { font-size:12px; line-height:1.6; margin:0; }
.explore-note small { display:block; color:var(--muted); margin-top:7px; font-size:12px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.section-heading h1,.section-heading h2 { margin:0; }
.small-tag { font-size:7px; letter-spacing:.8px; color:var(--muted); white-space:nowrap; }
.favorites-section { padding-top:23px; border-top:1px solid var(--line); }
.favorites-list { list-style:none; padding:0; margin:0; }
.favorites-list li { display:flex; align-items:center; border-bottom:1px solid #e8e8e1; gap:6px; }
.favorite-open { background:transparent; color:var(--text); border:0; text-align:left; min-width:0; padding:12px 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.empty-favorites { color:var(--muted); font-size:12px; line-height:1.6; padding:0!important; border:0!important; }
.panel-footer { padding:0 24px 15px; flex:0 0 auto; }
details { border-top:1px solid var(--line); padding:12px 0; }
summary { display:flex; justify-content:space-between; cursor:pointer; font-size:12px; font-weight:600; list-style:none; min-height:22px; align-items:center; }
summary::-webkit-details-marker { display:none; }
summary span { font-size:17px; }
.settings-list { padding-top:12px; }
.setting-item { background:transparent; border:0; padding:6px 0; font-size:12px; }
input[type=checkbox] { min-height:0; accent-color:var(--accent); }
.status-list { padding-top:10px; font-size:11px; }
.status-list li { display:flex; justify-content:space-between; padding:5px 0; }
.status-dot { width:6px; height:6px; background:#778e7e; border-radius:50%; }
.guest-link { display:block; color:var(--accent); font-size:11px; text-decoration:none; padding-top:8px; }
.attribution { color:#8a918b; font-size:9px; margin:16px 0 0; }
#map { min-height:0; height:100%; position:relative; }
.map-topline { position:absolute; z-index:2; left:20px; top:18px; display:flex; align-items:center; gap:8px; }
.map-context,.map-chip { background:#faf9f4f0; border:1px solid #d5d8cd; box-shadow:0 2px 10px #213b3609; color:var(--text); border-radius:7px; }
.map-context { font-size:9px; letter-spacing:1.25px; padding:12px 14px; }
.map-chip { width:38px; min-height:38px; padding:0; font-size:20px; }
.map-bottomline { position:absolute; bottom:29px; left:20px; display:flex; gap:20px; pointer-events:none; font-size:8px; font-weight:600; letter-spacing:.8px; color:#3d5047; text-shadow:0 1px 3px white; z-index:2; }
.maplibregl-ctrl-top-right { top:8px; right:8px; }
.maplibregl-ctrl-group { border:1px solid var(--line); border-radius:9px!important; overflow:hidden; box-shadow:0 2px 8px #1a32261a!important; }
.maplibregl-ctrl-group button { width:36px; height:36px; min-height:36px; }
.maplibregl-ctrl-attrib { font-size:9px!important; }
.maplibregl-ctrl-scale { border-color:#667467!important; font-size:10px!important; }
.place-card { margin-top:22px; padding:17px; border:1px solid #d1dacf; background:#f0f3eb; border-radius:12px; }
.place-heading { display:flex; align-items:center; justify-content:space-between; }
.place-heading .eyebrow { margin:0; font-size:8px; }
.place-card h2 { font-size:20px; line-height:1.3; margin:8px 0; overflow-wrap:anywhere; }
.muted { color:var(--muted); font-size:12px; line-height:1.5; }
.place-coordinates { font-size:10px; color:var(--muted); margin:14px 0 17px; font-variant-numeric:tabular-nums; }
.place-card .row { grid-template-columns:1fr 1fr; }
.place-card .button-text { margin-top:8px; }
.results li { background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:12px 0; margin:0; }
.results li button.search-result { text-align:left; border:0; background:transparent; color:var(--text); padding:5px 0; min-height:40px; font-weight:400; }
.results li:has(.search-result):hover { background:#eaf0e6; }
.result-title { font-size:12px; font-weight:600; line-height:1.5; }
.result-meta { font-size:10px; line-height:1.5; color:var(--muted); margin-top:4px; }
.compact-results { max-height:320px; overflow-y:auto; margin:4px 0 0; }
.route-point-card { padding:12px; border-radius:10px; background:#f1f2eb; margin-bottom:10px; }
.route-point-head { margin-bottom:8px; gap:8px; font-size:11px; }
.route-badge { width:21px; height:21px; font-size:10px; }
.route-badge-from { background:#387161; }.route-badge-to { background:#bc6944; }
.route-point-card input { font-size:12px; }
.point-summary { margin-top:6px; }.point-summary-text { font-size:9px; }
.point-details-toggle { min-height:26px; width:26px; height:26px; }
.point-detail-row { grid-template-columns:65px 1fr; padding:8px; gap:5px; }
.point-detail-label { font-size:8px; }.point-detail-value { font-size:10px; }
.point-detail-copy { grid-column:2; justify-self:start; min-height:28px; }
.profile-row { margin-top:16px; grid-template-columns:1fr 1.2fr; }.profile-row>* { font-size:12px; }
.route-utilities { grid-template-columns:1.4fr 1fr; margin-top:8px; }.route-utilities button { font-size:10px; padding:8px 4px; }
.mode-hint { font-size:10px; line-height:1.6; margin:12px 0 22px; color:var(--muted); }
.route-output { padding-top:21px; border-top:1px solid var(--line); }
#route-results li:first-child { background:#e8eee3; border:0; border-radius:10px; padding:14px; margin-bottom:4px; }
#route-results li:first-child .result-title { color:var(--accent); }
#route-results li:first-child .result-meta { font-size:14px; color:var(--text); }
.route-steps-toggle { font-size:11px; margin-top:10px; }
.preview-button { display:flex; justify-content:space-between; background:var(--text); border-color:var(--text); margin-top:18px; font-size:12px; }
.preview-note { font-size:9px; color:var(--muted); line-height:1.5; }
#rf-overlay-button { margin-top:24px; font-size:12px; background:transparent; }
.elevation-panel { margin-top:24px; }
.elevation-chart { background:#edf2e8; }.elevation-line { stroke:var(--accent); }.elevation-area { fill:#1d625622; }
.elevation-stat { background:#f0f2ea; }.elevation-stat-label { font-size:10px; }.elevation-stat-value { font-size:13px; }
.map-selection { position:absolute; z-index:3; bottom:65px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:7px; padding:10px; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 30px #1b332526; max-width:calc(100% - 32px); }
.map-selection>span { font-size:11px; padding:0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:200px; }.map-selection button { width:auto; font-size:11px; white-space:nowrap; }
.toast { position:fixed; z-index:70; bottom:35px; left:50%; transform:translateX(-50%); padding:14px 22px; border:1px solid #d5ddcf; border-radius:10px; color:#fff; background:#233e37; box-shadow:0 5px 25px #0002; font-size:12px; max-width:calc(100vw - 30px); }
body[data-edition=guest] .personal-only { display:none!important; }
body.panel-collapsed .shell { grid-template-columns:0 minmax(0,1fr); }body.panel-collapsed .panel { visibility:hidden; }
#mobile-panel-toggle { display:none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
body[data-mode=drive] .app-header,body[data-mode=drive] .panel { display:none; }
body[data-mode=drive] .shell { display:block; height:100dvh; }
body[data-mode=drive] .map-topline,body[data-mode=drive] .map-bottomline { display:none; }
.drive-view { position:fixed; inset:0; z-index:5; pointer-events:none; display:flex; flex-direction:column; align-items:center; padding:18px; }
.drive-view button,.drive-view section,.drive-view footer { pointer-events:auto; }
.drive-top { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; }.drive-top button { width:auto; }.drive-top span { font-size:9px; letter-spacing:1px; background:#faf9f4eb; padding:10px; border-radius:6px; }
.maneuver-card { display:flex; gap:20px; align-items:center; background:#193e39; color:#fff; width:min(560px,100%); margin-top:22px; padding:25px; border-radius:18px; box-shadow:0 8px 40px #193e3933; }
.maneuver-card .eyebrow { color:#accab3; }.maneuver-card h1 { font-size:22px; line-height:1.4; margin:0; letter-spacing:-.3px; }.maneuver-card p:last-child { font-size:13px; color:#c4d6cb; margin:10px 0 0; }.maneuver-icon { font-size:48px; }
.drive-bottom { margin-top:auto; width:min(560px,100%); background:var(--panel); padding:18px; border-radius:16px; box-shadow:0 4px 30px #0002; }.drive-summary { display:flex; align-items:center; gap:18px; margin-bottom:15px; }.drive-summary strong { font-size:24px; }.drive-summary>span { font-size:13px; }.preview-badge { margin-left:auto; border:1px solid #d7b479; color:#87632e; border-radius:5px; padding:5px 7px; font-size:10px!important; }.drive-step-controls { display:flex; gap:10px; }
.rf-dialog { background:var(--panel); }.rf-dialog h2 { font-size:20px; }.rf-controls label { font-size:12px; }.rf-stats .elevation-stat-value { font-size:15px; }
@media(min-width:1600px) { .shell { grid-template-columns:380px minmax(0,1fr); }.brand { flex-basis:314px; }.panel-content { padding:34px 28px; }.panel-footer { padding-left:28px; padding-right:28px; } }
@media(max-width:1100px) { .edition { display:none; }.app-header { gap:20px; padding:0 20px; }.brand { flex-basis:180px; }.local-pill { font-size:10px; }.header-end { gap:10px; } }
@media(max-width:700px) { .app-header { height:65px; padding:0 13px; gap:10px; }.brand { flex:0 0 auto; }.brand svg { width:29px; }.brand>span { display:none; }.mode-nav button { padding:7px 10px; font-size:11px; }.header-end { gap:0; }.local-pill { display:none; }#mobile-panel-toggle { display:block; width:auto; font-size:10px; padding:6px 9px; min-height:36px; }.shell { display:block; height:calc(100dvh - 65px); position:relative; }.panel { position:absolute; top:65px; bottom:12px; left:12px; width:min(330px,calc(100% - 24px)); z-index:4; border:1px solid var(--line); border-radius:14px; box-shadow:0 5px 30px #203b3620; max-height:calc(100% - 90px); }.panel-content { padding:22px 20px; }.panel-footer { padding:0 20px 14px; }body.panel-collapsed .panel { display:none; }#map { height:100%; }.map-topline { top:14px; left:12px; }#panel-collapse { display:none; }.map-selection { bottom:45px; flex-wrap:wrap; width:calc(100% - 24px); justify-content:center; }.map-selection>span { width:100%; text-align:center; }.map-bottomline span:last-child { display:none; }.drive-view { padding:10px; }.drive-top span { font-size:8px; }.maneuver-card { margin-top:15px; padding:18px; gap:14px; }.maneuver-card h1 { font-size:18px; }.drive-bottom { padding:14px; }.drive-summary { gap:12px; }.drive-top button { font-size:12px; }.rf-dialog { padding:15px; }.rf-controls { grid-template-columns:1fr 1fr; } }
@media(max-height:500px) and (orientation:landscape) { .drive-view { align-items:flex-start; padding:10px; }.drive-top { width:100%; }.drive-top span { margin-right:45px; }.maneuver-card { width:300px; padding:16px; margin-top:12px; }.maneuver-card h1 { font-size:16px; }.maneuver-icon { font-size:30px; }.drive-bottom { width:300px; padding:12px; }.drive-summary { margin-bottom:8px; }.drive-summary strong { font-size:18px; }.drive-step-controls button { min-height:35px; font-size:10px; padding:7px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; } }
.shell { grid-template-rows:minmax(0,1fr); }
#plan-panel>.intro { margin-bottom:16px; font-size:12px; }
#plan-panel .route-point-card { padding:10px 12px; }
#plan-panel .route-point-card input { min-height:39px; padding:8px 10px; }
#plan-panel .point-summary { min-height:18px; }
#plan-panel .point-details-toggle { width:22px; height:22px; min-height:22px; }
#plan-panel .route-point-head { margin-bottom:6px; }
#plan-panel .profile-row { margin-top:12px; }
#plan-panel .mode-hint { margin:10px 0 16px; }
.route-map-summary { position:absolute; left:50%; bottom:60px; transform:translateX(-50%); z-index:2; width:auto; max-width:calc(100% - 30px); white-space:nowrap; background:#193e39; color:#fff; box-shadow:0 5px 20px #193e392b; padding:14px 22px; font-size:13px; border:1px solid #fff9; border-radius:12px; }
body[data-mode=drive] .route-map-summary { display:none; }
.map-selection { z-index:3; }
@media(max-width:700px) { .route-map-summary { font-size:11px; padding:12px; bottom:50px; } }
@media(max-height:500px) and (orientation:landscape) { .drive-summary { gap:8px; }.drive-summary strong,.drive-summary>span { white-space:nowrap; }.drive-summary>span { font-size:10px; }.preview-badge { font-size:8px!important; padding:5px; } }

/* Coordinate formats belong to the explored place, independently of route A/B. */
#place-details { margin:0 0 16px; }
#place-details summary { font-size:11px; }
#place-detail-rows { margin-top:12px; background:#fafbf7; overflow:hidden; }
#place-detail-rows .point-detail-row { grid-template-columns:74px minmax(0,1fr); }
#place-detail-rows .point-detail-value { overflow-wrap:anywhere; }
#place-save[aria-pressed="true"] { color:#8b563a; }
/* Persistent vehicle navigation and the independent simulator console. */
.navigation-tools { margin-top:28px; padding-top:22px; border-top:1px solid var(--line); }
.navigation-tools h2 { font-size:13px; }.navigation-tools .row { grid-template-columns:1fr 1.2fr; }
.button-link { display:flex; align-items:center; justify-content:center; text-align:center; border:1px solid var(--line); border-radius:9px; color:var(--accent); text-decoration:none; padding:8px; font-size:10px; }
#navigation-tools button { font-size:11px; }#nav-session-label { line-height:1.6; }
.sim-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:12px 0; }
.sim-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:12px 0; }
.sim-options label { font-size:10px; color:var(--muted); }.sim-options input,.sim-options select { display:block; font-size:12px; margin-top:5px; }
#simulator-panel { margin-top:14px; }#sim-jump { margin-top:8px; }
/* Independent position controls stay on the map across workbench modes. */
#simulator-panel.position-console { position:absolute; top:64px; right:56px; z-index:30; margin:0; width:340px; max-width:calc(100% - 24px); background:var(--panel,#faf9f4); border:1px solid var(--line); border-radius:14px; box-shadow:0 6px 24px #193e3926; color:var(--text); }
.position-console>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; cursor:pointer; font-size:12px; font-weight:700; }
.position-console>summary::after { content:'⌄'; }
.position-console[open]>summary::after { content:'⌃'; }
.position-console>summary::-webkit-details-marker { display:none; }
.position-console .small-tag { font-size:8px; letter-spacing:.3px; }
.position-console-body { padding:0 15px 15px; max-height:calc(100dvh - 220px); overflow-y:auto; overscroll-behavior:contain; }
.position-console button { font-size:11px; }
.position-source-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.position-source-actions button[aria-pressed=true] { background:var(--accent); color:#fff; border-color:var(--accent); }
.position-console #vehicle-position { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
@media(max-width:700px) { #simulator-panel.position-console { right:12px; top:64px; width:310px; }.position-console-body { max-height:calc(100dvh - 240px); } }
@media(max-height:600px) { .position-console-body { max-height:calc(100dvh - 155px); } }
/* Shared map position: one expanded instrument at a time. */
.map-instruments { position:absolute; top:64px; right:56px; z-index:30; width:340px; max-width:calc(100% - 24px); display:grid; gap:8px; }
body[data-mode=drive] .map-instruments { display:none; }
.map-instruments #simulator-panel.position-console { position:relative; inset:auto; width:100%; max-width:100%; padding:0; }
.sun-console { padding:0; background:var(--panel,#faf9f4); border:1px solid var(--line); border-radius:14px; box-shadow:0 6px 24px #193e3926; overflow:hidden; }
.map-instruments summary>span:not(.small-tag) { font-size:12px; }
.sun-console>summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 15px; font-size:12px; font-weight:700; cursor:pointer; }
.sun-console>summary::after { content:'⌄'; }.sun-console[open]>summary::after { content:'⌃'; }
.sun-console>summary::-webkit-details-marker { display:none; }
.sun-console .small-tag { font-size:8px; letter-spacing:.3px; }
.sun-console-body { padding:0 15px 15px; max-height:calc(100dvh - 270px); overflow-y:auto; overscroll-behavior:contain; }
.sun-status { color:var(--accent); font-size:12px; line-height:1.5; margin:3px 0 0; }
#sun-ring { display:block; width:100%; max-height:270px; margin:5px auto; }
#sun-ring path[role=button] { cursor:pointer; }#sun-ring path[role=button]:focus { outline:none; stroke-width:3; filter:drop-shadow(0 0 2px #193e3999); }
.sun-cardinal { fill:#426257; font-size:14px; font-weight:700; }.sun-vehicle-label { fill:#426257; font-size:9px; letter-spacing:1px; font-weight:700; }
.sun-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; font-size:9px; color:var(--muted); }
.sun-legend span { display:flex; align-items:center; gap:4px; }.sun-legend i { width:9px; height:9px; border-radius:3px; }.sun-visible { background:#dda83d; }.sun-shadow { background:#fff; border:1.5px solid #dda83d; }.sun-unknown { background:#a9b3ad; }
.sun-sector-detail { min-height:26px; font-size:10px; line-height:1.4; color:var(--muted); text-align:center; margin:9px 0; }
.sun-events { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.sun-events span { display:block; font-size:8px; letter-spacing:.7px; color:var(--muted); }.sun-events strong { display:block; font-size:23px; color:var(--accent); margin:4px 0; font-variant-numeric:tabular-nums; }.sun-events small { font-size:11px; color:var(--muted); }
.sun-location { margin:12px 0; font-size:11px; }.sun-location>div { display:grid; grid-template-columns:96px minmax(0,1fr); gap:8px; padding:5px 0; }.sun-location dt { color:var(--muted); }.sun-location dd { margin:0; overflow-wrap:anywhere; }
#sun-open-gps { width:100%; font-size:11px; }
@media(max-width:700px) { .map-instruments { right:12px; width:310px; }.sun-console-body { max-height:calc(100dvh - 235px); }.map-instruments .position-console-body { max-height:calc(100dvh - 235px); } }
@media(max-height:600px) { .sun-console-body,.map-instruments .position-console-body { max-height:calc(100dvh - 270px); } }
.nav-vehicle { width:60px; height:60px; filter:drop-shadow(0 3px 8px #20362d77); z-index:8; }.nav-vehicle svg { width:100%;height:100%; }.nav-vehicle[data-quality=stale] { filter:grayscale(1) drop-shadow(0 2px 6px #3336); opacity:.65; }
body[data-mode=drive] .maplibregl-marker:not(.nav-vehicle) { display:none; }
.drive-view { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto auto auto 1fr auto; align-items:start; gap:10px; padding:16px; }
.drive-top { grid-column:1/-1; }.drive-top span { background:#243e36; color:#fff; font-weight:700; border:1px solid #fff8; }
.maneuver-card { grid-column:1; grid-row:2; width:min(540px,100%); margin:0; padding:20px; gap:18px; border-radius:16px; }.maneuver-card h1 { font-size:19px; }.maneuver-card .eyebrow { margin-bottom:6px; }
.turn-distance { display:block; font-size:36px; line-height:1.1; margin:3px 0 8px; font-variant-numeric:tabular-nums; }
.maneuver-card #drive-road { font-size:12px; margin:6px 0 0; }.maneuver-icon { font-size:45px; }
.junction-card { grid-column:2; grid-row:2/4; background:#faf9f4f5; width:220px; padding:12px; border-radius:15px; box-shadow:0 4px 25px #193e3920; pointer-events:none!important; }
.junction-heading,.lane-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:8px; letter-spacing:1px; font-weight:700; }.junction-heading { flex-direction:column; align-items:flex-start; }.junction-heading small { color:var(--muted); font-size:8px; letter-spacing:0; font-weight:400; }
#junction-svg { display:block; width:100%; height:170px; }.junction-road { fill:none;stroke:#c0c7bd;stroke-width:16;stroke-linecap:round; }.junction-road.closed { stroke:#d9ddd5; }.junction-path { fill:none;stroke:#157360;stroke-width:9;stroke-linecap:round;stroke-linejoin:round; }
.lane-card { grid-column:1; grid-row:3; width:min(540px,100%); border-radius:13px; background:#193e39; color:#fff; padding:12px 18px; box-shadow:0 3px 20px #193e3926; }
.lane-arrows { display:flex; justify-content:center; gap:4px; margin:10px 0 3px; }.lane { flex:1 1 0; max-width:80px; padding:9px 4px; border-right:1px dashed #fff4; color:#789c90; font-size:28px; text-align:center; }.lane:last-child { border:0; }.lane.active { background:#e7f1ce; color:#365548; border-radius:7px; }.lane.valid { color:#e7f1ce; }.lane .selected-direction { font-weight:800; color:#fff; }.lane.active .selected-direction { color:#123c30; }.lane-card p { text-align:center; margin:6px 0 0; font-size:9px; color:#b9cfc3; }.lane-heading small { font-size:11px; letter-spacing:0; }
.drive-bottom { grid-column:1/-1; grid-row:5; align-self:end; justify-self:center; width:min(560px,100%); margin:0; padding:15px 20px; }
.drive-summary { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; margin-bottom:8px; }.drive-summary strong { display:block; font-size:24px; white-space:nowrap; }.drive-summary small { display:block; font-size:8px; color:var(--muted); letter-spacing:1px; margin-top:4px; }
.drive-footer-state { display:flex; align-items:center; justify-content:space-between; gap:10px; border-top:1px solid var(--line); padding-top:5px; }.drive-footer-state>span { font-size:10px; color:var(--muted); }.drive-footer-state button { font-size:11px; }
.drive-connection { position:absolute; left:50%; top:70px; transform:translateX(-50%); z-index:8; background:#983c29; color:#fff; border:2px solid white; border-radius:10px; padding:13px; width:min(450px,calc(100% - 25px)); text-align:center; font-size:12px; box-shadow:0 4px 20px #0003; }
.drive-recenter { position:absolute; right:18px; bottom:165px; width:auto; min-height:46px; background:var(--panel); color:var(--accent); border-color:var(--line); pointer-events:auto; font-size:12px; }
@media(max-width:700px) { .drive-view { padding:10px; gap:8px; grid-template-columns:1fr 130px; }.drive-top { gap:8px; }.drive-top span { font-size:8px; padding:9px; }.maneuver-card { grid-column:1/-1; padding:16px; gap:14px; }.maneuver-card h1 { font-size:17px; }.turn-distance { font-size:32px; }.maneuver-icon { font-size:36px; }.junction-card { grid-row:3; grid-column:2; width:130px; padding:8px; }#junction-svg { height:105px; }.junction-heading { font-size:7px; }.junction-heading small { font-size:7px; }.lane-card { grid-column:1; padding:10px; }.lane { font-size:20px; padding:8px 1px; }.lane-heading { font-size:7px; }.lane-heading small { font-size:9px; }.drive-bottom { padding:13px 15px; }.drive-summary strong { font-size:21px; }.drive-summary { gap:8px; }.drive-footer-state>span { font-size:9px; }.drive-recenter { bottom:150px; } }
@media(max-height:600px) and (orientation:landscape) { .drive-view { padding:10px; grid-template-columns:290px 1fr 180px; grid-template-rows:40px auto 1fr auto; gap:8px; }.drive-top { grid-column:1/-1; }.maneuver-card { grid-column:1;grid-row:2;width:290px;padding:12px;gap:10px; }.maneuver-card h1 { font-size:14px; }.turn-distance { font-size:26px; }.maneuver-card .eyebrow { font-size:7px; }.maneuver-card #drive-road { display:none; }.maneuver-icon { font-size:28px; }.lane-card { grid-column:3;grid-row:3;align-self:end;width:180px;padding:8px; }.lane { font-size:22px;padding:5px 1px; }.lane-card p { font-size:8px; }.junction-card { grid-column:3;grid-row:2;width:180px;padding:8px; }#junction-svg { height:115px; }.junction-heading { font-size:7px; }.drive-bottom { grid-column:1;grid-row:4;width:290px;padding:10px; }.drive-summary strong { font-size:17px; }.drive-summary small { font-size:7px; }.drive-footer-state>span { font-size:8px; }.drive-footer-state button { min-height:26px;font-size:10px; }.drive-recenter { right:210px;bottom:25px; }.drive-top span { margin-right:40px; } }

/* Calm cruising; junction detail belongs to the maneuver it explains. */
.maneuver-card { display:flex; align-items:center; gap:12px; }
.maneuver-copy { flex:1; min-width:0; }
.maneuver-card .junction-card { flex:0 0 112px; width:112px; grid-area:auto; padding:0 0 0 10px; border-left:1px solid #ffffff25; border-radius:0; background:transparent; box-shadow:none; }
.maneuver-card #junction-svg { height:108px; }
.maneuver-card .junction-heading { color:#d0e4d7; font-size:7px; letter-spacing:.6px; gap:4px; }
.maneuver-card .junction-heading small { color:#b6ccbf; font-size:8px; }
.maneuver-card .junction-road { stroke:#607d72; }
.maneuver-card .junction-road.closed { stroke:#3b5c52; }
.maneuver-card .junction-path { stroke:#e3f3b2; }
.maneuver-card[data-emphasis="quiet"] { padding:12px 16px; gap:12px; box-shadow:0 3px 16px #193e391c; }
.maneuver-card[data-emphasis="quiet"] .turn-distance { font-size:21px; font-weight:500; color:#c3d5ca; margin:0 0 4px; }
.maneuver-card[data-emphasis="quiet"] h1 { font-size:14px; font-weight:500; color:#d8e3dc; line-height:1.4; }
.maneuver-card[data-emphasis="quiet"] .maneuver-icon { font-size:25px; color:#a9c4b5; }
.maneuver-card[data-emphasis="quiet"] .eyebrow { font-size:8px; font-weight:500; color:#9dbbaa; }
.maneuver-card[data-emphasis="quiet"] #drive-road { display:none; }
@media(max-width:700px) { .drive-view { grid-template-columns:1fr; }.lane-card { grid-column:1; }.maneuver-card { padding:14px; gap:10px; }.maneuver-card h1 { font-size:16px; }.maneuver-card .junction-card { flex-basis:100px;width:100px; }.maneuver-card #junction-svg { height:100px; }.maneuver-card:has(.junction-card:not([hidden])) .maneuver-icon { display:none; } }
@media(max-height:600px) and (orientation:landscape) { .drive-view { grid-template-columns:310px 1fr 150px; }.maneuver-card { width:310px; }.maneuver-card .junction-card { flex-basis:90px;width:90px; }.maneuver-card #junction-svg { height:85px; }.maneuver-card:has(.junction-card:not([hidden])) .maneuver-icon { display:none; }.lane-card { grid-column:3; width:150px; }.drive-recenter { right:170px; } }

/* Anchor the three trip values to the full card width. */
.drive-summary { width:100%; grid-template-columns:repeat(3,minmax(0,1fr)); }
.drive-summary > div:first-child { text-align:left; }
.drive-summary > div:nth-child(2) { text-align:center; }
.drive-summary > div:last-child { text-align:right; }
@media(max-width:350px) { .drive-summary strong { font-size:18px; } }

.maneuver-card .junction-unused-exit { fill:none; stroke:#8da79a; stroke-width:9; stroke-linecap:round; opacity:.85; }

.lane:has(.lane-destination) { max-width:160px; }
.lane-destination { display:block; font-size:11px; font-weight:600; line-height:1.35; margin:7px 4px 3px; overflow-wrap:anywhere; }
@media(max-height:600px) and (orientation:landscape) { .lane-destination { font-size:9px; margin:5px 2px 2px; } }
.lane-arrows:has(.lane-destination) .lane { max-width:160px; }

.maneuver-card #drive-arrival-side { margin:12px 0 0; padding-top:10px; border-top:1px solid #ffffff30; color:#e3f3b2; font-size:16px; font-weight:700; line-height:1.4; }
.maneuver-card #drive-arrival-side[data-known="false"] { color:#b6ccbf; font-size:12px; font-weight:400; }

.drive-obstruction { border-bottom:1px solid var(--line); margin-bottom:10px; padding-bottom:8px; font-size:12px; }
.drive-obstruction summary { cursor:pointer; min-height:30px; padding:7px 0; font-weight:600; }
.drive-obstruction p { font-size:11px; margin:5px 0 9px; }
.drive-obstruction button { min-height:40px; }
#drive-block-status { font-size:11px; color:#975020; margin:0 0 8px; }
#drive-block-status:empty { display:none; }

/* Idle driving view keeps the current camera and only the exit control. */
.drive-view[data-navigation="idle"] > :not(.drive-top) { display:none!important; }
.drive-view[data-navigation="idle"] .drive-top > span { display:none; }

.place-name-dialog { width:min(420px,calc(100% - 32px)); border:1px solid var(--line); border-radius:16px; padding:24px; background:var(--panel); color:var(--text); box-shadow:0 12px 60px #132c3650; }
.place-name-dialog::backdrop { background:#172f3655; }
.place-name-dialog h2 { margin:0 0 22px; font-size:22px; }
.place-name-dialog label { display:block; font-size:13px; margin-bottom:8px; }
.place-name-dialog input { width:100%; font-size:16px; padding:12px; border:1px solid var(--line); border-radius:8px; }
.place-name-dialog form > div { display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
#favorites-list li { grid-template-columns:minmax(0,1fr) auto auto; }
