@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/overpass-400.woff2') format('woff2'); }
@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/overpass-600.woff2') format('woff2'); }
@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/overpass-800.woff2') format('woff2'); }

:root {
  --green: #0F5B3A;
  --green-d: #0A4A2F;
  --asphalt: #23272B;
  --sand: #EFE6D6;
  --bone: #FAF6EE;
  --amber: #E8A317;
  --red: #C2412D;
  --sky: #5B8DB8;
  --muted: #595E63;
  --line: #E0D6C4;
  --edge: #C9BEA9;
  --white: #FFFFFF;
  --panel: var(--sand);
  --hover: #E3D7C1;
  --mine: #DCE9E0;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --top-b: calc(var(--safe-t) + 72px);
  --ease: cubic-bezier(.3, .7, .2, 1);
  --slow: 320ms;
  --shadow: 0 1px 2px rgba(35, 39, 43, .12), 0 4px 14px rgba(35, 39, 43, .14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Overpass', system-ui, sans-serif; font-size: 16px; line-height: 1.4;
  color: var(--asphalt); background: var(--asphalt); -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- buttons ---------- */
.ibtn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--asphalt);
}
.ibtn svg { display: block; }
.ibtn:hover:not(:disabled) { background: var(--hover); }
.ibtn:disabled { opacity: .4; }
.ibtn.on { background: var(--green); color: var(--bone); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--edge); border-radius: 12px; background: var(--white); color: var(--asphalt);
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--hover); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--bone); }
.btn.primary:hover:not(:disabled) { background: var(--green-d); }
.btn.danger { background: var(--red); border-color: var(--red); color: var(--white); }
.btn.danger-outline { color: var(--red); border-color: var(--red); }
.btn.wide { width: 100%; }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 14px; }
.linkish {
  align-self: flex-start; min-height: 44px; padding: 0 2px; border: 0; background: none;
  color: var(--green); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.danger-text { color: var(--red); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { display: flex; align-items: baseline; gap: 4px; font-size: 13px; font-weight: 600; }
.field-label .unit { color: var(--muted); font-weight: 400; }
.field-label .need { margin-left: auto; color: var(--red); font-size: 12px; font-weight: 800; }
.field-hint { font-size: 13px; color: var(--muted); }
input:not([type=checkbox]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--edge); border-radius: 10px;
  background: var(--white); font-size: 16px; line-height: 1.3;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
.field.needed input, .field.needed select { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.form-error { margin: 0; padding: 9px 12px; border-radius: 8px; background: #FBE9E5; color: #9E2F1E; font-size: 14px; font-weight: 600; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch { position: relative; flex: none; width: 42px; height: 26px; border-radius: 13px; background: #CFC6B6; transition: background var(--slow) var(--ease); }
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform var(--slow) var(--ease);
}
.switch-row input:checked + .switch { background: var(--green); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ---------- sign in ---------- */
body.auth { background: var(--green); }
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b)); }
.auth-card { width: min(400px, 100%); padding: 28px 24px 22px; border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--green); font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.brand img { border-radius: 10px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; }
.auth-form p { margin: 0; }

/* ---------- app frame ---------- */
body.in-app { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; }
body[data-snap=collapsed] { --sheet-h: calc(96px + var(--safe-b)); }
body[data-snap=half] { --sheet-h: 52dvh; }
body[data-snap=full] { --sheet-h: calc(100dvh - var(--top-b)); }
.map { position: fixed; inset: 0; background: #E9E4DA; }

.topbar {
  position: fixed; z-index: 5; top: calc(var(--safe-t) + 8px); left: 8px; right: 8px; height: 56px;
  display: flex; align-items: center; gap: 2px; padding: 0 6px;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow);
}
.top-title {
  flex: 1; min-width: 0; height: 48px; display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 0 6px; border: 0; border-radius: 10px; background: none; text-align: left;
}
.top-title:hover { background: var(--hover); }
.trip-name { font-size: 16px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-chip { display: flex; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; line-height: 1.2; }
.route-chip .dot { opacity: .7; }
.wx-pill {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 44px; padding: 0 12px 0 10px;
  border: 0; border-radius: 22px; background: var(--bone); font-size: 16px; font-weight: 800;
}
.wx-pill.alerting { box-shadow: inset 0 0 0 2px var(--amber); }
.wx-alerts {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: var(--white); font-size: 12px; line-height: 1;
}

.banner {
  position: fixed; z-index: 5; top: calc(var(--top-b) + 4px); left: 8px; right: 8px;
  display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border-radius: 12px;
  background: #FBE9E5; border: 1px solid var(--red); color: var(--asphalt); font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
}
.banner > svg { flex: none; color: var(--red); }
.banner > span { flex: 1; }
.banner.soft { background: var(--bone); border-color: var(--edge); }
.banner.soft > svg { color: var(--muted); }

.toast {
  position: fixed; z-index: 30; top: calc(var(--top-b) + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px;
  background: var(--asphalt); color: var(--bone); font-size: 15px; font-weight: 600; box-shadow: var(--shadow);
}
body.has-banner .toast { top: calc(var(--top-b) + 70px); }

.controls {
  position: fixed; z-index: 4; right: 10px; bottom: calc(var(--sheet-h) + 12px);
  display: flex; flex-direction: column; gap: 8px; transition: bottom var(--slow) var(--ease), opacity var(--slow) var(--ease);
}
.ibtn.ctl { background: var(--panel); box-shadow: var(--shadow); }
.ibtn.ctl:hover { background: var(--hover); }
.ibtn.ctl.on { background: var(--green); color: var(--bone); }
body[data-snap=full]:not(.desk) .controls { opacity: 0; pointer-events: none; }
.layers-card {
  position: absolute; right: 54px; top: 0; width: 230px; padding: 10px 14px 4px;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow);
}
.layers-title { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 2px 0 2px; }
.layers-card .switch-row { font-size: 15px; font-weight: 600; }
.maplibregl-ctrl-bottom-left { bottom: calc(var(--sheet-h) + 2px); transition: bottom var(--slow) var(--ease); }
body[data-snap=full]:not(.desk) .maplibregl-ctrl-bottom-left { opacity: 0; }

/* ---------- chat sheet ---------- */
.sheet {
  position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; height: var(--sheet-h);
  display: flex; flex-direction: column; padding-bottom: var(--safe-b);
  background: var(--panel); border-radius: 18px 18px 0 0; box-shadow: 0 -2px 18px rgba(35, 39, 43, .18);
  transition: height var(--slow) var(--ease);
}
body.dragging .sheet, body.dragging .controls, body.dragging .maplibregl-ctrl-bottom-left { transition: none; }
.handle { flex: none; touch-action: none; }
.grab { flex: none; height: 20px; width: 100%; display: grid; place-items: center; padding: 0; border: 0; background: none; touch-action: none; cursor: grab; }
.grip { width: 40px; height: 5px; border-radius: 3px; background: #BBB09D; }
.sheet-head { flex: none; height: 40px; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 4px; }
.peek {
  flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  border: 0; border-radius: 10px; background: none; text-align: left; font-size: 15px;
}
.peek-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body:not([data-snap=collapsed]) .peek, body.desk .peek { font-weight: 800; }
.peek.busy { color: var(--muted); font-weight: 600; }
.log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 10px; }
body[data-snap=collapsed]:not(.desk):not(.dragging) .log, body[data-snap=collapsed]:not(.desk):not(.dragging) .chips { display: none; }
body[data-snap=collapsed]:not(.desk) .grab { height: 12px; }
body[data-snap=collapsed]:not(.desk) .sheet-head { height: 28px; }
body[data-snap=collapsed]:not(.desk) .peek { height: 28px; font-size: 14px; }
body[data-snap=collapsed]:not(.desk) .sheet-head .ibtn { display: none; }
body[data-snap=collapsed]:not(.desk) .composer { padding-top: 4px; }
body[data-snap=collapsed]:not(.desk) .chat-input { max-height: 44px; }
.log-empty, .notice { margin: 8px 0; color: var(--muted); font-size: 15px; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--bone); border: 1px solid var(--edge); color: var(--asphalt); }

.msg { margin: 12px 0; }
.msg.user { display: flex; flex-direction: column; align-items: flex-start; }
.msg.user.mine { align-items: flex-end; }
.who { margin: 0 4px 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bubble {
  max-width: 86%; padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--white); border: 1px solid var(--line);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.mine .bubble { border-radius: 14px 14px 4px 14px; background: var(--mine); border-color: #C4DACB; }
.pending .bubble { opacity: .7; }
.md { overflow-wrap: anywhere; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 22px; }
.md li { margin: 2px 0; }
.md li::marker { color: var(--green); font-weight: 800; }
.md code { font-family: ui-monospace, monospace; font-size: 14px; background: var(--bone); padding: 0 4px; border-radius: 4px; }
.md-h { margin-top: 4px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tool { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.live-status { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.chips { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 6px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 999px;
  background: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip:hover:not(:disabled) { background: var(--hover); }
.chip:disabled { opacity: .45; }
.composer { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 6px 10px 8px; }
.chat-input { flex: 1; min-width: 0; max-height: 120px; resize: none; padding: 11px 14px; border-radius: 22px; }
.chat-input:disabled { background: var(--hover); }
.ibtn.send { background: var(--green); color: var(--bone); border-radius: 22px; }
.ibtn.send:hover:not(:disabled) { background: var(--green-d); }
#app .ibtn.on:not(.ctl):not(.send) { background: var(--red); color: var(--white); }
.desk-only, .panel-tab { display: none; }

/* ---------- desktop ---------- */
body.desk .sheet {
  top: 0; left: auto; width: 400px; height: auto; padding-top: 8px; border-radius: 0;
  border-left: 1px solid var(--line); box-shadow: none; transition: transform var(--slow) var(--ease);
}
body.desk .grab { display: none; }
body.desk .sheet-head { height: 52px; padding: 0 8px 0 8px; border-bottom: 1px solid var(--line); }
body.desk .desk-only { display: inline-grid; }
body.desk.panel-closed .sheet { transform: translateX(100%); }
body.desk.panel-docked .map { right: 400px; }
body.desk .controls { bottom: 28px; right: 12px; transition: right var(--slow) var(--ease); }
body.desk:not(.panel-closed) .controls { right: 412px; }
body.desk .maplibregl-ctrl-bottom-left { bottom: 0; }
body.desk .topbar { right: auto; width: min(560px, calc(100vw - 440px)); left: 12px; top: 12px; }
body.desk .banner { left: 12px; right: auto; width: min(560px, calc(100vw - 440px)); top: 76px; }
body.desk { --top-b: 72px; }
body.desk .toast { left: calc((100vw - 400px) / 2); }
body.desk.panel-closed .toast { left: 50%; }
body.desk .panel-tab {
  position: fixed; z-index: 6; right: 0; top: 12px; width: 48px; height: 96px;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 14px 0 0 14px; background: var(--panel); box-shadow: var(--shadow); color: var(--asphalt);
}
body.desk.panel-closed .panel-tab { display: flex; }
body.desk .panel-tab:hover { background: var(--hover); }

/* ---------- markers and popups ---------- */
.mk { padding: 0; border: 0; background: none; cursor: pointer; }
.mk-weather { padding: 7px; }
.mk-wx {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px 0 8px; border-radius: 15px;
  background: var(--bone); border: 1.5px solid rgba(35, 39, 43, .28); color: var(--asphalt);
  font-size: 14px; font-weight: 800; box-shadow: var(--shadow); white-space: nowrap;
}
.hz-amber .mk-wx { background: var(--amber); border-color: #9C6C00; }
.hz-red .mk-wx { background: var(--red); border-color: #7E2618; color: var(--white); }
.mk-place { width: 44px; height: 44px; display: grid; place-items: center; }
.mk-dot {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: var(--green); color: var(--bone); border: 2px solid var(--bone); box-shadow: var(--shadow);
}
.mk-trav { position: relative; width: 22px; height: 22px; cursor: default; }
.cone {
  position: absolute; left: -17px; top: -17px; width: 56px; height: 56px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from -28deg, rgba(91, 141, 184, .55) 0deg 56deg, transparent 56deg 360deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
}
.trav-dot {
  position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--asphalt); border: 3px solid var(--white); box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.me .trav-dot { background: var(--sky); }
.trav-label {
  position: absolute; top: 25px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 6px;
  background: var(--panel); font-size: 12px; font-weight: 800; white-space: nowrap; text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.trav-label small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.stale { opacity: .6; }
.stale .trav-dot { background: #8A8F94; }
body.hide-weather .mk-weather, body.hide-places .mk-place, body.hide-travelers .mk-trav { display: none; }

.pop .maplibregl-popup-content {
  padding: 14px 16px 10px; border-radius: 14px; background: var(--panel); color: var(--asphalt);
  font-family: 'Overpass', system-ui, sans-serif; font-size: 15px; box-shadow: var(--shadow);
}
.pop .maplibregl-popup-close-button { width: 40px; height: 40px; font-size: 24px; line-height: 1; border-radius: 0 14px 0 10px; color: var(--muted); }
.pop .maplibregl-popup-close-button:hover { background: var(--hover); }
.pop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--panel); }
.pop.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--panel); }
.pop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--panel); }
.pop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--panel); }
.card { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.card-title { display: flex; align-items: center; gap: 8px; padding-right: 30px; font-size: 16px; font-weight: 800; line-height: 1.25; }
.card-glyph { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: var(--bone); }
.wx-title svg { flex: none; }
.wx-title.hz-amber svg { color: #8A5E00; }
.wx-title.hz-red svg { color: var(--red); }
.card-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.card-note, .card-line { margin: 2px 0 0; font-size: 14px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.card .linkish { font-size: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 6px 0 2px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.alerts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.alerts li { display: flex; align-items: flex-start; gap: 8px; color: #9E2F1E; font-weight: 600; font-size: 14px; }
.alerts li svg { flex: none; margin-top: 1px; }
.alerts.big li { padding: 10px 12px; border-radius: 10px; background: #FBE9E5; color: var(--asphalt); font-weight: 400; }
.alerts.big li svg { color: var(--red); }
.alerts.big strong { color: #9E2F1E; }

/* ---------- dialogs ---------- */
.dlg { padding: 0; border: 0; background: var(--panel); color: var(--asphalt); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg::backdrop { background: rgba(35, 39, 43, .45); }
.dlg-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.dlg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; }
.dlg-body > p:first-child { margin-top: 0; }
.dlg-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
.modal { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border-radius: 18px; }
.modal .dlg-foot { padding-bottom: 12px; }
.panel { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
.panel .dlg-head { padding-top: calc(6px + var(--safe-t)); }
.drawer { width: min(320px, 86vw); height: 100dvh; max-height: 100dvh; margin: 0 auto 0 0; border-radius: 0 18px 18px 0; }
.drawer .dlg-head { padding-top: calc(6px + var(--safe-t)); }
.drawer .dlg-foot { justify-content: flex-start; }
@media (min-width: 900px) {
  .panel { width: 560px; height: min(860px, calc(100dvh - 48px)); margin: auto; border-radius: 18px; }
  .panel .dlg-head { padding-top: 6px; }
  .panel .dlg-foot { padding-bottom: 12px; }
}
.version { font-size: 13px; color: var(--muted); }
.save-status { margin-right: auto; font-size: 14px; color: var(--muted); }

.menu-user { display: flex; flex-direction: column; padding: 0 4px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.menu-user strong { font-size: 17px; }
.menu-user .muted { font-size: 14px; overflow-wrap: anywhere; }
.menu-list { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 0 10px;
  border: 0; border-radius: 10px; background: none; font-size: 16px; font-weight: 600; text-align: left;
}
.menu-item:hover { background: var(--hover); }
.menu-item svg { color: var(--green); }

.profile-form { display: flex; flex-direction: column; }
.group { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.group legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: .07em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid .span, .grid .switch-row { grid-column: 1 / -1; }
.grid .switch-row { min-height: 40px; font-size: 15px; font-weight: 600; }
.pair { display: flex; align-items: center; gap: 6px; }
.pair input { flex: 1; min-width: 0; padding: 9px 6px; }
.needed-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 18px; padding: 10px 12px; border: 1px solid #E3C98A; border-radius: 10px; background: #FBF0D6; font-size: 14px; }
.needed-note svg { flex: none; color: #8A5E00; }

.set-block { margin-bottom: 24px; }
.set-block h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.set-block p { margin: 0 0 10px; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.usage { width: 100%; border-collapse: collapse; font-size: 14px; }
.usage th, .usage td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.usage th:first-child { text-align: left; }
.usage thead th { font-size: 12px; color: var(--muted); font-weight: 600; }

.route-sum { display: flex; gap: 28px; margin-bottom: 6px; }
.route-sum div { display: flex; flex-direction: column; }
.route-sum strong { font-size: 24px; font-weight: 800; line-height: 1.2; }
.route-sum .muted { font-size: 13px; }
.legs { margin: 10px 0; padding-left: 20px; font-size: 14px; }
.legs li { display: flex; flex-direction: column; margin-bottom: 4px; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: step; }
.step {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 4px;
  border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 15px;
}
.step:hover { background: var(--hover); }
.step-dist { flex: none; color: var(--muted); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-now > svg { flex: none; color: var(--green); }
.wx-big { font-size: 30px; font-weight: 800; line-height: 1.1; }
.kv.compact { margin-left: auto; }
.hours { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 16px 0; }
.hour { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; border-radius: 10px; background: var(--bone); font-size: 14px; }
.hour .small { font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

@media (max-width: 380px) {
  .topbar { gap: 0; padding: 0 4px; }
  .top-title { padding: 0 4px; }
  .route-chip { gap: 4px; font-size: 12px; }
  .wx-pill { gap: 3px; padding: 0 8px; }
}
