@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --ink: #15201c;
  --muted: #68746e;
  --line: #dfe5e1;
  --paper: #f8faf8;
  --white: #ffffff;
  --green: #17634a;
  --green-soft: #dfeee7;
  --lime: #cce95d;
  --orange: #ef7c45;
  --red: #d84f38;
  --shadow: 0 12px 32px rgba(18, 39, 31, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: "DM Sans", sans-serif; color: var(--ink); background: var(--paper); overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }

.topbar {
  height: 68px; display: flex; align-items: center; gap: 18px; padding: 0 24px;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: relative; z-index: 1001;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 20px "Manrope", sans-serif; letter-spacing: -.5px; }
.brand-name { white-space: nowrap; }
.brand-name > span { color: var(--green); }
.brand-mark { width: 29px; height: 29px; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-radius: 9px; background: var(--green); padding: 6px; overflow: hidden; }
.brand-mark i { display: block; width: 18px; height: 2px; border-radius: 50%; background: var(--lime); transform: rotate(-10deg); }
.brand-mark i:nth-child(2) { width: 12px; margin-left: 3px; opacity: .8; }
.brand-mark i:nth-child(3) { width: 8px; margin-left: 6px; opacity: .55; }
.live-pill { display: flex; align-items: center; gap: 7px; color: var(--green); background: var(--green-soft); border-radius: 30px; padding: 6px 11px; font-size: 12px; font-weight: 700; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #2fa66f; box-shadow: 0 0 0 4px rgba(47,166,111,.12); }
.language-switch { margin-left: auto; display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.language-switch button { min-width: 35px; border: 0; border-radius: 6px; padding: 5px 7px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.language-switch button.active { background: var(--green); color: white; box-shadow: 0 2px 7px rgba(23,99,74,.2); }
.mobile-panel-toggle { display: none; margin-left: auto; }

main { height: calc(100% - 68px); display: grid; grid-template-columns: minmax(0, 1fr) 410px; }
.map-shell { position: relative; min-width: 0; overflow: hidden; }
#map { position: absolute; inset: 0; background: #dbe6dc; }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; }
.leaflet-control-zoom a { color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255,255,255,.82) !important; }

.map-search { position: absolute; z-index: 500; top: 20px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 160px)); }
.map-search form { height: 48px; display: flex; align-items: center; padding: 5px 5px 5px 15px; background: var(--white); border: 1px solid rgba(42,64,54,.1); border-radius: 12px; box-shadow: var(--shadow); }
.map-search svg { width: 19px; fill: none; stroke: var(--muted); stroke-width: 2; }
.map-search input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; padding: 0 10px; color: var(--ink); }
.map-search input::placeholder { color: #8e9994; }
.map-search button { border: 0; background: var(--green); color: white; border-radius: 8px; padding: 8px 13px; font-weight: 700; font-size: 12px; cursor: pointer; }
.search-results { margin-top: 7px; border-radius: 10px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.search-result { width: 100%; display: block; text-align: left; border: 0; border-bottom: 1px solid var(--line); padding: 11px 14px; background: white; cursor: pointer; font-size: 13px; }
.search-result:hover { background: var(--paper); }

.map-tools { position: absolute; z-index: 500; left: 18px; top: 20px; display: flex; flex-direction: column; gap: 8px; }
.map-button, .icon-button { width: 42px; height: 42px; border: 1px solid rgba(42,64,54,.1); background: white; border-radius: 10px; box-shadow: 0 7px 20px rgba(18,39,31,.12); cursor: pointer; display: grid; place-items: center; }
.map-button svg { width: 21px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-button:hover, .refresh-button:hover { background: var(--green-soft); }
.layers-popover { position: absolute; z-index: 600; left: 70px; top: 70px; width: 210px; padding: 14px; border-radius: 12px; background: white; box-shadow: var(--shadow); font-size: 13px; }
.layers-popover strong { font: 700 13px "Manrope"; }
.layers-popover label { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; cursor: pointer; }
.layers-popover label span { display: flex; align-items: center; gap: 8px; }
.layer-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.layer-dot.fire { background: var(--orange); box-shadow: 0 0 0 3px #fee0d0; }
.layer-dot.smoke { background: #9b71a8; box-shadow: 0 0 0 3px rgba(155,113,168,.18); }
.layer-dot.wildfire-smoke { background: #3679bd; box-shadow: 0 0 0 3px rgba(54,121,189,.18); }
.layer-dot.satellite { background: linear-gradient(135deg, #5c71bb, #f0c54e, #bc3939); box-shadow: 0 0 0 3px rgba(91,113,187,.14); }
.layer-dot.truecolor { background: linear-gradient(135deg, #6a8b68 0 45%, #f3f3ef 46% 70%, #788a9f 71%); box-shadow: 0 0 0 3px rgba(106,139,104,.14); }
.layer-dot.radius { border: 2px solid var(--green); background: #e2efe9; }

.legend { position: absolute; z-index: 500; bottom: 31px; left: 22px; display: flex; align-items: center; gap: 16px; padding: 10px 13px; border-radius: 9px; background: rgba(255,255,255,.93); box-shadow: 0 6px 18px rgba(18,39,31,.1); font-size: 10px; font-weight: 600; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-fire { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.legend-fire.recent { background: var(--orange); }
.legend-fire.strong { background: var(--red); box-shadow: 0 0 0 3px rgba(216,79,56,.18); }
.legend-smoke { width: 18px; height: 8px; display: inline-block; border-radius: 6px; }
.legend-smoke.satellite { width: 22px; background: linear-gradient(90deg, #4b75bb, #54b5a6, #e8d44f, #da6a3d, #9b2f43); }
.legend-smoke.model { width: 22px; background: linear-gradient(90deg, rgba(174,194,193,.65), #eeb04c, #cf6f5c, #79428f); }
.legend-smoke.wildfire { width: 22px; background: linear-gradient(90deg, rgba(75,183,194,.45), #3978bd, #46318d); }
.legend-home { width: 9px; height: 9px; border-radius: 50%; background: var(--green); border: 2px solid white; box-shadow: 0 0 0 2px var(--green); }
.map-message { position: absolute; z-index: 700; left: 50%; bottom: 72px; transform: translateX(-50%); background: var(--ink); color: white; padding: 9px 14px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow); }
.map-source-strip { position: absolute; z-index: 500; left: 22px; bottom: 6px; display: flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.9); color: var(--muted); box-shadow: 0 3px 10px rgba(18,39,31,.08); font-size: 8px; }
.map-source-strip strong { color: var(--ink); }
.map-source-strip a { color: var(--green); font-weight: 700; text-decoration: none; }
.map-source-strip a:hover { text-decoration: underline; }

.side-panel { min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; background: var(--white); border-left: 1px solid var(--line); position: relative; z-index: 800; }
.panel-scroll { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; padding: 30px 28px 20px; }
.panel-scroll::-webkit-scrollbar { width: 8px; }
.panel-scroll::-webkit-scrollbar-track { background: transparent; }
.panel-scroll::-webkit-scrollbar-thumb { background: #c6d0ca; border: 2px solid white; border-radius: 8px; }
.eyebrow { color: var(--green); font-weight: 800; font-size: 10px; letter-spacing: 1.3px; text-transform: uppercase; margin-bottom: 4px; }
.location-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.location-heading h1 { margin: 0; font: 800 25px/1.2 "Manrope"; letter-spacing: -.7px; }
.location-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.refresh-button { flex: 0 0 auto; border: 1px solid var(--line); background: white; border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.refresh-button svg { width: 17px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.refresh-button.loading svg { animation: spin .8s linear infinite; }

.condition-card { margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #fff, #f8fbf9); overflow: hidden; box-shadow: 0 8px 24px rgba(18,39,31,.06); }
.condition-main { display: grid; grid-template-columns: 62px 1fr; gap: 15px; padding: 19px; align-items: center; }
.condition-icon { width: 62px; height: 62px; position: relative; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; overflow: hidden; }
.condition-icon::before { content: ""; width: 21px; height: 21px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 8px rgba(23,99,74,.12); }
.condition-icon span { position: absolute; height: 2px; border-radius: 4px; background: var(--green); opacity: .55; }
.condition-icon span:nth-child(1) { width: 23px; top: 17px; left: 5px; }
.condition-icon span:nth-child(2) { width: 17px; bottom: 16px; right: 4px; }
.condition-icon span:nth-child(3) { width: 9px; top: 25px; right: 4px; }
.condition-icon.moderate { background: #fff2c7; }.condition-icon.moderate::before,.condition-icon.moderate span { background: #c89018; }
.condition-icon.unhealthy { background: #fee0d7; }.condition-icon.unhealthy::before,.condition-icon.unhealthy span { background: var(--red); }
.card-label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.condition-main h2 { margin: 2px 0; font: 800 19px "Manrope"; }
.condition-main p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.metrics { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.metrics div { min-width: 0; padding: 12px 14px; border-right: 1px solid var(--line); }
.metrics div:last-child { border: 0; }
.metrics span { display: block; color: var(--muted); font-size: 9px; font-weight: 600; white-space: nowrap; }
.metrics strong { display: inline-block; margin-top: 2px; font: 800 18px "Manrope"; }
.metrics small { display: inline-block; color: var(--muted); font-size: 8px; margin-left: 3px; }

.section-block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; }
.section-heading > div { display: flex; align-items: center; gap: 8px; }
.section-heading h2 { margin: 0; font: 800 14px "Manrope"; }
.section-icon { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 9px; }
.fire-icon { color: var(--orange); background: #ffebe0; }
.forecast-icon { color: var(--green); background: var(--green-soft); font-size: 17px; }
.source-badge { padding: 4px 7px; border-radius: 5px; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; background: #ffebe0; color: #a44326; }
.source-badge.live { background: var(--green-soft); color: var(--green); }
.source-badge.neutral { background: #edf0ee; color: var(--muted); }
.forecast-caption { margin: 7px 0 0; color: var(--muted); font-size: 9px; }
.section-description { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.nearest-fire { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px; border-radius: 10px; background: #fff7f2; }
.distance-ring { flex: 0 0 auto; width: 48px; height: 48px; border: 3px solid var(--orange); border-radius: 50%; display: grid; place-content: center; text-align: center; }
.distance-ring span { font: 800 13px "Manrope"; line-height: 1; }.distance-ring small { color: var(--muted); font-size: 7px; }
.nearest-fire > div:last-child { display: grid; gap: 3px; }
.nearest-fire strong { font-size: 11px; }.nearest-fire > div:last-child span { color: var(--muted); font-size: 9px; }

.forecast-chart { margin-top: 15px; height: 86px; display: flex; align-items: end; gap: 4px; }
.chart-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 4px; }
.chart-bar i { width: 100%; min-height: 4px; border-radius: 3px 3px 1px 1px; background: var(--green-soft); border-top: 2px solid var(--green); transition: height .3s; }
.chart-bar span { color: var(--muted); font-size: 7px; white-space: nowrap; }
.chart-empty { margin: auto; color: var(--muted); font-size: 11px; }

.advice-card { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin-top: 20px; padding: 13px; border-radius: 10px; background: #eef5f1; }
.advice-card svg { width: 19px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.advice-card strong { font-size: 11px; }.advice-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.advice-card.warning { background: #fff1e8; }.advice-card.warning svg { stroke: var(--red); }
.smoke-note { margin-top: 16px; padding: 12px 13px; border: 1px solid #e4ddea; border-radius: 10px; background: #faf7fb; }
.smoke-note > div { display: flex; align-items: center; gap: 8px; }
.smoke-note strong { font-size: 10px; }
.smoke-note > div small { margin-left: auto; color: var(--muted); font-size: 8px; font-weight: 700; }
.smoke-note p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.smoke-swatch { width: 20px; height: 9px; border-radius: 8px; background: linear-gradient(90deg, rgba(238,163,76,.55), rgba(121,66,143,.65)); }
.aod-legend { display: block; width: 100%; height: 58px; object-fit: fill; margin: 6px 0 1px; }
.smoke-note details { border-top: 1px solid #e4ddea; margin-top: 10px; padding-top: 8px; }
.smoke-note summary { color: var(--green); font-size: 9px; font-weight: 700; cursor: pointer; }
.data-sources-card { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; }
.data-sources-card h2 { margin: 0 0 9px; font: 800 12px "Manrope"; }
.data-sources-card ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.data-sources-card li { display: grid; grid-template-columns: 112px 1fr; gap: 8px; align-items: start; }
.data-sources-card a { color: var(--green); font-size: 9px; font-weight: 800; text-decoration: none; }
.data-sources-card a:hover { text-decoration: underline; }
.data-sources-card li span, .data-sources-card p { color: var(--muted); font-size: 8.5px; line-height: 1.4; }
.data-sources-card p { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--line); }
.side-panel footer { flex: 0 0 auto; min-height: 48px; border-top: 1px solid var(--line); padding: 0 28px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; }
.side-panel footer button { border: 0; background: none; color: var(--green); font-size: 9px; font-weight: 700; cursor: pointer; }

dialog { width: min(560px, calc(100% - 32px)); max-height: min(760px, calc(100dvh - 32px)); overflow-y: auto; border: 0; border-radius: 18px; padding: 28px; color: var(--ink); box-shadow: 0 24px 80px rgba(10,30,20,.28); }
dialog::backdrop { background: rgba(12,28,21,.55); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 25px; cursor: pointer; }
.dialog-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 25px; }
.dialog-heading { display: flex; align-items: center; gap: 13px; padding-right: 26px; }
.dialog-eyebrow { display: block; margin-bottom: 2px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
dialog h2 { margin: 0; font: 800 21px "Manrope"; }
dialog p, dialog li { color: var(--muted); font-size: 12px; line-height: 1.55; }
.dialog-lead { margin: 15px 0; }
.freshness-list { display: grid; gap: 8px; }
.freshness-list > div { display: grid; grid-template-columns: 132px 1fr; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.freshness-list strong { color: var(--ink); font-size: 10px; }
.freshness-list span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.refresh-note { margin: 13px 0; padding: 10px 12px; border-left: 3px solid var(--orange); border-radius: 0 8px 8px 0; background: #fff7f2; }
.interpretation-details { border-top: 1px solid var(--line); padding-top: 11px; }
.interpretation-details summary { color: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
dialog ul { margin-bottom: 0; padding-left: 18px; }
dialog li { margin-bottom: 8px; }
.dialog-sources { border-top: 1px solid var(--line); margin: 13px 0 0; padding-top: 11px; font-size: 9px; }
.dialog-sources a { color: var(--green); font-weight: 700; text-decoration: none; }
.dialog-sources a:hover { text-decoration: underline; }
.analytics-consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin-top: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; cursor: pointer; }
.analytics-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); }
.analytics-consent span { display: grid; gap: 3px; }
.analytics-consent strong { font-size: 11px; }
.analytics-consent small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.dialog-primary { width: 100%; min-height: 44px; margin-top: 13px; border: 0; border-radius: 10px; background: var(--green); color: white; font-weight: 800; cursor: pointer; }
.dialog-primary:hover { background: #11543e; }

.fire-marker { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 3px solid white; box-shadow: 0 0 0 2px rgba(239,124,69,.35), 0 3px 8px rgba(40,20,10,.25); }
.fire-marker.high { background: var(--red); box-shadow: 0 0 0 6px rgba(216,79,56,.2), 0 3px 8px rgba(40,20,10,.25); }
.user-marker { width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 4px solid white; box-shadow: 0 0 0 3px rgba(23,99,74,.3); }
.smoke-model-overlay { image-rendering: auto; }
.smoke-model-overlay { filter: blur(5px) saturate(1.12); mix-blend-mode: multiply; }
.wildfire-smoke-overlay { filter: blur(7px) saturate(1.18); mix-blend-mode: multiply; }
.city-label-overlay { filter: contrast(1.5) drop-shadow(0 0 1px white) drop-shadow(0 0 2px white); opacity: 1 !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  main { grid-template-columns: 1fr 350px; }.panel-scroll { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 720px) {
  body { overflow: hidden; }
  .topbar { height: 60px; padding: 0 14px; gap: 10px; }
  .brand { gap: 8px; font-size: 18px; }
  .brand-mark { width: 28px; height: 28px; }
  .live-pill { display: none; }
  .language-switch { margin-left: auto; }
  .language-switch button { min-width: 33px; min-height: 32px; }
  .mobile-panel-toggle { display: grid; margin-left: 3px; }
  .mobile-panel-toggle span { width: 17px; height: 2px; background: var(--ink); display: block; margin: 2px; transition: transform .2s, opacity .2s; }
  .mobile-panel-toggle.active span:first-child { transform: translateY(6px) rotate(45deg); }
  .mobile-panel-toggle.active span:nth-child(2) { opacity: 0; }
  .mobile-panel-toggle.active span:last-child { transform: translateY(-6px) rotate(-45deg); }
  main { height: calc(100dvh - 60px); display: block; }
  .map-shell { height: 100%; }
  .side-panel { position: fixed; inset: 60px 0 0 0; height: auto; z-index: 1000; transform: translateX(105%); transition: transform .25s ease; box-shadow: -10px 0 30px rgba(18,39,31,.18); }
  .side-panel.open { transform: translateX(0); }
  .panel-scroll { padding: 22px 18px 18px; scrollbar-gutter: auto; }
  .location-heading h1 { font-size: 23px; }
  .condition-card { margin-top: 17px; }
  .condition-main { grid-template-columns: 54px 1fr; gap: 13px; padding: 16px; }
  .condition-icon { width: 54px; height: 54px; }
  .metrics div { padding: 11px 10px; }
  .section-block { padding: 19px 0; }
  .data-sources-card li { grid-template-columns: 105px 1fr; }
  .side-panel footer { min-height: 52px; padding: 0 18px max(0px, env(safe-area-inset-bottom)); }
  .side-panel footer button { min-height: 44px; }
  .map-search { top: 12px; left: 66px; right: 12px; width: auto; transform: none; }
  .map-search form { height: 44px; padding-left: 12px; }
  .map-search input { font-size: 16px; }
  .map-search button { display: none; }
  .search-results { max-height: min(50dvh, 320px); overflow-y: auto; }
  .map-tools { top: 12px; left: 12px; }
  .map-tools .map-button:last-child { margin-top: 48px; }
  .map-button, .icon-button { width: 44px; height: 44px; }
  .layers-popover { top: 112px; left: 62px; right: 12px; width: min(260px, calc(100% - 74px)); padding: 15px; }
  .layers-popover label { min-height: 43px; padding-top: 7px; }
  .layers-popover input { width: 20px; height: 20px; }
  .legend { left: 10px; right: 10px; bottom: 34px; gap: 12px; padding: 9px 11px; overflow-x: auto; scrollbar-width: none; }
  .legend::-webkit-scrollbar { display: none; }
  .legend span { font-size: 9px; flex: 0 0 auto; }
  .map-source-strip { left: 10px; bottom: 7px; max-width: calc(100% - 20px); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .map-source-strip::-webkit-scrollbar { display: none; }
  .leaflet-control-zoom { margin-right: 10px !important; margin-bottom: 86px !important; }
  dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; padding: 22px 18px max(20px, env(safe-area-inset-bottom)); }
  .dialog-heading { align-items: flex-start; }
  dialog h2 { font-size: 20px; }
  .freshness-list > div { grid-template-columns: 1fr; gap: 3px; }
  .dialog-primary { position: sticky; bottom: 0; box-shadow: 0 -8px 18px rgba(248,250,248,.92); }
}
@media (max-width: 380px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 26px; height: 26px; padding: 5px; }
  .language-switch button { min-width: 30px; padding: 4px; }
  .mobile-panel-toggle { width: 40px; height: 40px; }
  .panel-scroll { padding-left: 14px; padding-right: 14px; }
  .metrics span { font-size: 8px; }
  .metrics strong { font-size: 16px; }
}
