:root {
  color-scheme: dark;
  --bg: #06100d;
  --surface: #0b1915;
  --surface-2: #10241e;
  --surface-3: #173128;
  --line: #31584a;
  --text: #ecfff7;
  --muted: #9fc0b3;
  --green: #28f19c;
  --green-dark: #073122;
  --red: #ff4d67;
  --blue: #69baff;
  --yellow: #ffd166;
  --shadow: 0 16px 44px rgba(0, 0, 0, .3);
  --radius: 16px;
  --map-height: 54vh;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eff7f3;
  --surface: #ffffff;
  --surface-2: #e6f1ec;
  --surface-3: #d9ebe2;
  --line: #a9cabb;
  --text: #0b251c;
  --muted: #4d6a5e;
  --green: #087f54;
  --green-dark: #d7f2e5;
  --red: #c91e3c;
  --blue: #0969a7;
  --yellow: #8a5b00;
  --shadow: 0 14px 38px rgba(16, 52, 39, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(circle at 12% -8%, rgba(40, 241, 156, .12), transparent 31rem);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; touch-action: manipulation; }
a { color: inherit; }
.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; }
.skip-link { position: fixed; z-index: 1000; left: 12px; top: -80px; background: var(--green); color: #00150d; padding: 10px 14px; border-radius: 8px; font-weight: 900; }
.skip-link:focus { top: 12px; }

.topbar, main, footer { width: calc(100% - 18px); max-width: 1240px; margin-inline: auto; }
.topbar { min-height: 72px; padding-top: env(safe-area-inset-top); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; text-decoration: none; letter-spacing: .03em; }
.brand-mark { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid var(--green); border-radius: 12px; color: var(--green); font-size: 29px; line-height: 1; box-shadow: inset 0 0 18px rgba(40, 241, 156, .14); }
.brand strong { display: block; font-size: .98rem; letter-spacing: .14em; }
.brand small { display: none; color: var(--muted); font-size: .58rem; letter-spacing: .12em; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.language-control select, .icon-button, .audio-button, .map-controls button { min-width: 42px; min-height: 42px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; cursor: pointer; }
.language-control select { padding: 0 5px; font-weight: 900; }
.audio-button { padding: 0 9px; color: var(--green); font-size: .68rem; font-weight: 900; }
.audio-button[aria-pressed="false"] { color: var(--muted); }
.status-badge { display: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: var(--muted); font: 800 .64rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.status-badge.online { color: var(--green); border-color: var(--green); }
.status-badge.offline { color: var(--red); border-color: var(--red); }

main { display: grid; gap: 12px; padding-bottom: 28px; }
.hero-pitch, .emergency-strip, .command-panel, .hero-panel, .cpr-panel, .map-panel, .data-panel, .device-panel, .results-panel, .trust-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-pitch { padding: clamp(18px, 4vw, 30px); background: linear-gradient(135deg, var(--surface), var(--surface-2)); border-color: var(--green); }
.hero-pitch h1 { max-width: 24ch; margin: 5px 0 7px; font-size: clamp(1.55rem, 7vw, 3.25rem); line-height: 1.02; letter-spacing: -.035em; }
.hero-pitch > p:last-child { max-width: 76ch; margin: 0; color: var(--muted); font-size: clamp(.84rem, 2.9vw, 1.05rem); }
.emergency-strip { display: grid; gap: 14px; padding: 17px; border-left: 4px solid var(--red); }
.emergency-strip h1 { margin: 3px 0 0; font-size: clamp(1.12rem, 5.3vw, 2rem); line-height: 1.14; }
.emergency-actions { display: grid; gap: 8px; }
.eyebrow { margin: 0; color: var(--green); font: 900 .66rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.sos-button { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--red); color: white; padding: 12px 16px; border-radius: 12px; text-decoration: none; font-weight: 950; box-shadow: 0 8px 26px rgba(255, 77, 103, .24); }
.sos-button strong { font-size: 1.45rem; }

.command-panel, .hero-panel, .cpr-panel, .data-panel, .device-panel, .results-panel { padding: 16px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading.compact { align-items: center; }
.section-heading h2 { margin: 2px 0 0; font-size: clamp(1.1rem, 4.6vw, 1.5rem); }
.primary-button, .secondary-button, .danger-button, .secondary-link { min-height: 46px; border-radius: 10px; padding: 10px 13px; font: 850 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; cursor: pointer; text-align: center; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: #00150d; }
.secondary-button, .secondary-link { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; }
.secondary-link[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.danger-button { border: 1px solid var(--red); background: var(--red); color: white; }
button:disabled { opacity: .52; cursor: wait; }

.search-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; align-items: stretch; }
.mic-button { min-width: 74px; min-height: 56px; border: 2px solid #7dffbe; border-radius: 12px; background: #1dff8f; color: #00170d; box-shadow: 0 0 18px rgba(29, 255, 143, .42); font: 950 .72rem ui-monospace, monospace; cursor: pointer; }
.mic-button.listening { background: var(--red); border-color: #ff9aaa; color: white; animation: pulse 1s infinite; }
.search-field { position: relative; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; border: 1px solid var(--green); background: var(--bg); border-radius: 13px; padding: 0 10px; }
.search-field > span { color: var(--green); font-size: 1.35rem; }
.search-field input { position: relative; z-index: 3; display: block; width: 100%; min-width: 0; min-height: 56px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: max(16px, 1rem); -webkit-appearance: none; appearance: none; pointer-events: auto; }
.search-field input::placeholder { color: var(--muted); }
.search-field button { min-width: 40px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 1.55rem; cursor: pointer; }
.first-aid-suggestion { margin-top: 10px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; border: 2px solid var(--red); background: rgba(255, 77, 103, .1); border-radius: 12px; padding: 12px; }
.first-aid-suggestion[hidden] { display: none; }
.first-aid-suggestion strong, .first-aid-suggestion span { display: block; }
.first-aid-suggestion span { color: var(--muted); font-size: .78rem; }
.first-aid-suggestion button { min-height: 44px; border: 0; border-radius: 9px; padding: 8px 12px; background: var(--red); color: white; font-weight: 900; cursor: pointer; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 11px; }
.filter-chip { flex: 0 0 auto; min-height: 42px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 8px 11px; cursor: pointer; font-size: .76rem; font-weight: 800; }
.filter-chip[aria-pressed="true"] { background: var(--green-dark); border-color: var(--green); color: var(--green); }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.hero-action { min-height: 76px; display: grid; gap: 4px; align-content: center; text-align: left; border: 2px solid var(--red); border-radius: 13px; background: rgba(255, 77, 103, .08); color: var(--text); padding: 13px 15px; cursor: pointer; }
.hero-action strong { color: var(--red); font: 950 1rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.hero-action span { color: var(--muted); font-size: .76rem; }

.tempo-badge { align-self: center; flex: 0 0 auto; border: 1px solid var(--green); border-radius: 999px; padding: 7px 10px; color: var(--green); font: 900 .68rem ui-monospace, monospace; }
.cpr-mode-grid { display: grid; gap: 9px; grid-template-columns: 1fr; }
.cpr-mode { min-height: 70px; display: grid; gap: 4px; align-content: center; text-align: left; border: 2px solid var(--line); border-radius: 13px; background: var(--surface-2); color: var(--text); padding: 12px 14px; cursor: pointer; }
.cpr-mode strong { color: var(--green); font-size: .86rem; }
.cpr-mode span { color: var(--muted); font-size: .74rem; }
.cpr-mode.selected { border-color: var(--green); background: var(--green-dark); }
.cpr-now { margin-top: 12px; border: 1px solid var(--line); background: var(--bg); border-radius: 13px; padding: 14px; }
.cpr-counter { margin: 0 0 10px; color: var(--green); text-align: center; font: 950 clamp(2rem, 12vw, 4.6rem) ui-monospace, monospace; line-height: 1; }
.cpr-counter.beat { color: white; text-shadow: 0 0 20px var(--green); }
.cpr-steps ol { margin: 0; padding-left: 1.35rem; }
.cpr-steps li { margin: 7px 0; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.action-row > * { flex: 1 1 145px; display: grid; place-items: center; }
.source-note { margin: 12px 0 0; color: var(--muted); font-size: .72rem; font-style: italic; }

.workspace { display: grid; gap: 12px; grid-template-columns: 1fr; }
.map-panel { overflow: hidden; }
.panel-toolbar { min-height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.muted { margin: 2px 0 0; color: var(--muted); font-size: .76rem; }
.map-controls { display: flex; gap: 5px; }
.map-frame { position: relative; height: clamp(310px, var(--map-height), 670px); background: #edf1e8; overflow: hidden; touch-action: pan-x pan-y pinch-zoom; }
#streetMap { width: 100%; height: 100%; background: #d7e3db; z-index: 1; }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 9px; }
.map-text-label { border: 0; background: transparent; pointer-events: none; }
.map-text-label > span { position: absolute; left: 0; top: 0; display: block; width: max-content; max-width: 180px; transform: translate(-50%, -50%); color: #10261d; font-weight: 950; line-height: 1.1; text-align: center; text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff, 1px 1px 0 #fff, -1px -1px 0 #fff; }
.map-place-label > span { font-size: 13px; letter-spacing: .01em; }
.map-road-label > span { color: #243b32; font-size: 10px; white-space: nowrap; }
.road-ref { display: inline-grid; place-items: center; min-width: 25px; min-height: 18px; border: 2px solid #254c99; border-radius: 5px; background: #fff; color: #183b7d; padding: 1px 4px; font: 900 10px ui-monospace, monospace; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.map-legend { position: absolute; z-index: 500; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.2); background: rgba(3,13,9,.86); color: #e9fff6; border-radius: 9px; padding: 6px 8px; font-size: .65rem; }
.map-legend span, .map-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.map-legend i { margin-left: 5px; background: var(--blue); box-shadow: 0 0 0 3px rgba(105,186,255,.25); }
.map-note { margin: 0; border-top: 1px solid var(--line); padding: 9px 12px; color: var(--muted); font-size: .7rem; }
.score { display: grid; place-items: center; min-width: 48px; min-height: 48px; border: 1px solid var(--green); color: var(--green); border-radius: 50%; font: 900 .7rem ui-monospace, monospace; }
.readiness-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.readiness-list li, .data-stats div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.readiness-list span, .data-stats dt { color: var(--muted); font-size: .76rem; }
.readiness-list strong, .data-stats dd { margin: 0; text-align: right; font: 800 .7rem ui-monospace, monospace; }
.readiness-list strong.ready { color: var(--green); }
.readiness-list strong.missing { color: var(--red); }
.data-stats { margin: 9px 0 0; }
.storage-warning { margin-top: 12px; border: 1px solid var(--red); border-radius: 11px; padding: 11px; color: var(--red); }
.storage-warning strong { display: block; margin-bottom: 8px; }
.button-stack { display: grid; gap: 8px; margin-top: 15px; }
.inline-message { min-height: 1.5em; margin: 10px 0 0; color: var(--muted); font-size: .74rem; }

.device-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.device-explain { display: grid; gap: 5px; margin-top: 11px; }
.device-explain p { margin: 0; color: var(--muted); font-size: .74rem; }
.results-list { display: grid; grid-template-columns: 1fr; gap: 9px; }
.result-card { min-width: 0; border: 1px solid var(--line); background: var(--surface-2); border-radius: 13px; padding: 13px; }
.result-title-row { display: flex; justify-content: space-between; gap: 9px; align-items: flex-start; }
.result-card h3 { margin: 0; font-size: .96rem; line-height: 1.24; }
.result-card p { margin: 5px 0 0; color: var(--muted); font-size: .75rem; }
.tag { flex: 0 0 auto; border-radius: 999px; padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); font: 800 .58rem ui-monospace, monospace; text-transform: uppercase; }
.tag.verified { color: var(--green); border-color: var(--green); }
.result-meta { display: flex; flex-wrap: wrap; gap: 5px 9px; margin-top: 8px; color: var(--muted); font-size: .68rem; }
.result-meta .location, .result-meta .coordinates, .result-meta .open-today { flex: 1 0 100%; font-size: .76rem; }
.result-meta .location, .result-meta .coordinates { color: var(--text); }
.result-meta .coordinates { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.result-meta .open-today { color: var(--green); font-weight: 900; }
.result-meta .opening-now { flex: 0 0 auto; border-radius: 999px; padding: 3px 7px; font-weight: 950; }
.result-meta .opening-now.open { background: var(--green-dark); color: var(--green); }
.result-meta .opening-now.closed { background: rgba(255,77,103,.12); color: var(--red); }
.result-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.result-actions a, .result-actions button { min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; border-radius: 9px; padding: 7px 9px; font-size: .68rem; font-weight: 850; cursor: pointer; }
.result-actions .call { background: var(--green); border-color: var(--green); color: #00150d; }
.result-actions .call.lower-level { background: var(--yellow); border-color: var(--yellow); color: #171000; }
.empty-state { border: 1px dashed var(--line); border-radius: 13px; padding: 23px; text-align: center; color: var(--muted); }
.trust-grid { display: grid; gap: 9px; grid-template-columns: 1fr; }
.trust-grid article { padding: 16px; }
.trust-grid span { color: var(--green); font: 900 .68rem ui-monospace, monospace; }
.trust-grid h3 { margin: 6px 0 4px; font-size: .94rem; }
.trust-grid p { margin: 0; color: var(--muted); font-size: .74rem; }
.trust-grid .risk-card p { color: var(--red); font-style: italic; }
footer { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 16px 0 max(22px, env(safe-area-inset-bottom)); color: var(--muted); font: 700 .65rem ui-monospace, monospace; border-top: 1px solid var(--line); }
footer p { margin: 0; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.footer-actions button { min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); padding: 8px 10px; font: 850 .66rem ui-monospace, monospace; cursor: pointer; }
.invite-note { max-width: 62ch; }

dialog:not([open]) { display: none; }
dialog[open] { display: block; position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); z-index: 2000; max-height: calc(100vh - 20px); overflow: auto; }
dialog { width: calc(100% - 18px); max-width: 560px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); padding: 17px; box-shadow: var(--shadow); }
dialog.fullscreen-dialog { max-width: 760px; }
dialog::backdrop { background: rgba(0,0,0,.78); }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.dialog-head h2 { margin: 0; }
.dialog-close { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: 1.5rem; cursor: pointer; }
.guide-summary { color: var(--red); font-weight: 900; }
.guide-steps { padding-left: 1.4rem; }
.guide-steps li { margin: 9px 0; font-size: 1rem; }
.guide-sources { margin: 14px 0; display: grid; gap: 6px; }
.guide-sources a { color: var(--blue); font-size: .76rem; }
.guide-sources a[aria-disabled="true"] { color: var(--muted); pointer-events: none; }
.offline-warning { color: var(--red); font-style: italic; }
textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); padding: 10px; font-size: 16px; }
.dialog-field, .medical-grid label { display: grid; gap: 5px; color: var(--muted); font-size: .74rem; font-weight: 800; }
.dialog-field { margin-bottom: 9px; }
.dialog-field input, .medical-grid input, .medical-grid select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); padding: 9px 10px; font-size: 16px; }
.medical-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hub-form { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hub-form label { display: grid; gap: 5px; color: var(--muted); font-size: .74rem; font-weight: 800; }
.hub-form input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); padding: 9px 10px; font-size: 16px; }
.hub-output { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; margin-top: 14px; }
.qr-box { min-height: 240px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px; overflow: auto; }
.qr-box svg { display: block; width: min(100%, 320px); height: auto; }
.hub-preview { min-height: 170px; max-height: 310px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); padding: 11px; font: 700 .7rem/1.5 ui-monospace, monospace; }
.markdown-document { max-width: 76ch; margin-inline: auto; }
.markdown-document h1, .markdown-document h2, .markdown-document h3 { line-height: 1.2; }
.markdown-document h1 { font-size: 1.45rem; }
.markdown-document h2 { margin-top: 1.4em; font-size: 1.2rem; color: var(--green); }
.markdown-document h3 { margin-top: 1.25em; font-size: 1rem; }
.markdown-document p, .markdown-document li { font-size: .9rem; }
.markdown-document a { color: var(--blue); }
.markdown-document code { overflow-wrap: anywhere; }
.call-option { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.call-option .handler-button { display: grid; place-items: center; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; font-weight: 850; cursor: pointer; }
.call-option.confirmed .handler-button { border-color: var(--green); color: var(--green); }
.call-option button { min-width: 92px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: .7rem; font-weight: 850; }
.call-qr { width: min(220px, 70vw); min-height: 180px; display: grid; place-items: center; margin: 14px auto 5px; border-radius: 12px; background: #fff; padding: 8px; color: #111; }
.call-qr svg { display: block; width: 100%; height: auto; }
.noscript { margin: 18px; padding: 18px; background: #501020; color: white; }

@keyframes pulse { 50% { transform: scale(.97); opacity: .82; } }

@media (min-width: 560px) {
  .brand small, .status-badge { display: block; }
  .emergency-strip { grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 20px; }
  .emergency-actions { min-width: 220px; }
  .cpr-mode-grid, .hero-grid, .device-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .device-actions > :last-child { grid-column: 1 / -1; }
  .results-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .trust-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hub-form { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hub-form .wide { grid-column: 1 / -1; }
  .medical-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .medical-grid .wide { grid-column: 1 / -1; }
  .hub-output { grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); }
  footer { grid-template-columns: auto 1fr; align-items: center; }
  .footer-actions { justify-content: flex-end; }
  .invite-note { grid-column: 1 / -1; }
}

@media (min-width: 860px) {
  .topbar, main, footer { width: calc(100% - 30px); }
  main { gap: 16px; }
  .command-panel, .cpr-panel, .data-panel, .device-panel, .results-panel { padding: 21px; }
  .workspace { grid-template-columns: minmax(0, 1.85fr) minmax(300px, .75fr); gap: 16px; }
  .map-frame { height: min(62vh, 650px); }
  .device-actions { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .device-actions > :last-child { grid-column: auto; }
  dialog.fullscreen-dialog { width: min(760px, calc(100% - 32px)); }
}

@media (max-width: 380px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; padding-bottom: 8px; }
  .top-actions { width: 100%; justify-content: space-between; }
  .top-actions { gap: 4px; }
  .audio-button { width: 45px; overflow: hidden; white-space: nowrap; padding: 0 6px; }
  .status-badge { display: none; }
  .search-row { grid-template-columns: 68px minmax(0,1fr); }
  .mic-button { min-width: 68px; }
  .first-aid-suggestion { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-heading > button { width: 100%; }
  .map-frame { height: clamp(300px, var(--map-height), 480px); }
}

@supports (height: 100svh) {
  :root { --map-height: 54svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mic-button.listening { animation: none; }
}
