  /* Material 3 roles mapped onto the Industry ramps; M3 shape scale (user choice) */
  :root {
    --pc: var(--color-accent-200); --on-pc: var(--color-accent-900);
    --sc: var(--color-accent-100); --on-sc: var(--color-accent-900);
    --sfc-low: color-mix(in srgb, var(--color-surface) 55%, var(--color-bg)); --sfc: var(--color-surface); --sfc-hi: var(--color-neutral-300);
    --outline: color-mix(in srgb, var(--color-text) 28%, transparent); --outline-v: var(--color-divider);
    --fire: #d7301f; /* classification color_hint of the burn_scar class */
    --sh-xs: 4px; --sh-sm: 8px; --sh-md: 12px; --sh-lg: 16px; --sh-xl: 28px; --sh-full: 999px;
  }
  body[data-theme="dark"] {
    --color-bg: #1d1f20; --color-surface: #2b2b2d; --color-text: #f2f2f3; --color-divider: color-mix(in srgb, #f2f2f3 18%, transparent);
    --pc: #2c455d; --on-pc: #d6ebff; --sc: #2c455d; --on-sc: #d6ebff; --sfc-hi: #424244; --color-neutral-100: #333537; --color-neutral-800: #e7e7ea; --color-accent-100: #2c455d; --color-accent-800: #d6ebff;
    --shadow-md: 0 3px 10px rgba(0,0,0,.5); --shadow-lg: 0 12px 32px rgba(0,0,0,.6);
  }
  body[data-theme="dark"] .osm-base { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92); }
  html, body { height: 100%; }
  body { overflow: hidden; font-size: 14px; }
  .muted { color: color-mix(in srgb, var(--color-text) 60%, transparent); }
  .mono { font-variant-numeric: tabular-nums; }
  h6 { margin: 0; }
  svg.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .btn, .input, .seg, .tag, .card { border-radius: var(--sh-full); }
  .input { border-radius: var(--sh-xs); min-height: 40px; }
  .btn { min-height: 36px; padding: 0 16px; }
  .btn-icon { width: 36px; height: 36px; padding: 0; border-color: transparent; }
  .btn-icon:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); }
  select.input { width: auto; appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }

  /* ── shell: rail | content ── */
  .shell { height: 100%; display: grid; grid-template-columns: 80px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "rail top" "rail prog" "rail app" "rail foot"; }
  .rail { grid-area: rail; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; background: var(--sfc-low); }
  .rail-brand { width: 44px; height: 44px; margin-bottom: 14px; display: grid; place-items: center; background: var(--color-accent); color: var(--color-bg); border-radius: var(--sh-md); font-family: var(--font-heading); font-weight: 600; font-size: 15px; letter-spacing: .02em; }
  /* the brand square resets the whole app (a fresh load of the bare path) */
  .rail-brand { cursor: pointer; user-select: none; }
  .rail-brand:focus-visible { outline: 2px solid var(--color-accent-700); outline-offset: 2px; }
  .dest { width: 80px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 10px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 500; color: var(--color-text); cursor: pointer; }
  .dest i { width: 56px; height: 32px; display: grid; place-items: center; border-radius: var(--sh-full); transition: background .15s; }
  .dest:hover i { background: color-mix(in srgb, var(--color-text) 8%, transparent); }
  .dest[aria-selected="true"] i { background: var(--sc); color: var(--on-sc); }
  .dest[aria-selected="true"] { font-weight: 700; }
  .dest:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; border-radius: var(--sh-md); }
  .top { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 10px 16px 6px; }
  .top h1 { font-size: 22px; margin: 0; white-space: nowrap; }
  .top h1 small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-accent-700); margin-top: -2px; }
  body[data-theme="dark"] .top h1 small { color: var(--color-accent-300); }
  /* project logos (vendored under img/, served from our origin): EOCube.Ro swaps to its light variant on the dark theme */
  .top-logos { display: flex; align-items: center; gap: 18px; margin-left: 6px; }
  .top-logos a { display: inline-flex; align-items: center; opacity: .88; border-radius: var(--sh-xs); }
  .top-logos a:hover, .top-logos a:focus-visible { opacity: 1; }
  .top-logos a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
  .top-logos img { display: block; height: 32px; width: auto; }
  .top-logos img[src$="hria.png"] { height: 36px; }
  .top-logos .logo-dark { display: none; }
  body[data-theme="dark"] .top-logos .logo-light { display: none; }
  body[data-theme="dark"] .top-logos .logo-dark { display: block; }
  .search { position: relative; flex: 0 1 380px; min-width: 180px; margin-left: auto; }
  .search .input { border-radius: var(--sh-full); background: var(--sfc-hi); border-color: transparent; padding-left: 40px; }
  .search .input:focus-visible { border-color: var(--color-accent); }
  .search > svg { position: absolute; left: 13px; top: 10px; pointer-events: none; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
  .search-results { position: absolute; z-index: 1200; left: 0; right: 0; top: calc(100% + 4px); background: var(--sfc); border-radius: var(--sh-md); box-shadow: var(--shadow-md); display: none; max-height: 260px; overflow: auto; padding: 4px 0; }
  .search-results.open { display: block; }
  .search-results button { display: block; width: 100%; text-align: left; font: inherit; font-size: 13px; padding: 9px 14px; border: 0; background: none; color: inherit; cursor: pointer; }
  .search-results button:hover, .search-results button:focus-visible { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
  .search-results .hint { padding: 9px 14px; font-size: 12px; }
  .progress { grid-area: prog; height: 4px; background: var(--pc); position: relative; overflow: hidden; margin: 0 16px; border-radius: var(--sh-full); }
  .progress[hidden] { display: none; }
  .progress i { position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--color-accent); border-radius: var(--sh-full); animation: slide 1.1s ease-in-out infinite; }
  @keyframes slide { from { left: -30%; } to { left: 100%; } }
  .foot { grid-area: foot; display: flex; gap: 16px; align-items: center; padding: 4px 16px 6px; font-size: 11px; color: color-mix(in srgb, var(--color-text) 65%, transparent); }
  .foot .status { margin-left: auto; white-space: nowrap; }

  /* ── app grid ── */
  .app { grid-area: app; display: grid; min-height: 0; position: relative; gap: 12px; padding: 6px 16px 10px; }
  body[data-layout="a"] .app { grid-template-columns: 400px minmax(0, 1fr); grid-template-areas: "panel map"; }
  body[data-layout="b"] .app { grid-template-rows: minmax(0, 1fr) minmax(0, 44%); grid-template-areas: "map" "panel"; }
  body[data-layout="c"] .app { grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "map panel"; }
  .panel { grid-area: panel; display: flex; flex-direction: column; min-height: 0; background: var(--sfc-low); border-radius: var(--sh-lg); overflow: hidden; }
  .pv { display: none; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; }
  body[data-view="fires"] .pv[data-view="fires"], body[data-view="data"] .pv[data-view="data"], body[data-view="settings"] .pv[data-view="settings"], body[data-view="layout"] .pv[data-view="layout"] { display: flex; }
  .pv-head { padding: 14px 16px 6px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .pv-head h3 { margin: 0; font-size: 20px; }
  .pv-body { padding: 8px 16px 16px; overflow: auto; font-size: 13.5px; display: grid; gap: 14px; align-content: start; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .map-wrap { grid-area: map; position: relative; min-height: 0; border-radius: var(--sh-lg); overflow: hidden; }
  #map { position: absolute; inset: 0; background: var(--sfc); }

  /* ── chips (M3 filter chips) ── */
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--outline); border-radius: var(--sh-sm); background: transparent; font: inherit; font-size: 13px; font-weight: 500; color: var(--color-text); cursor: pointer; white-space: nowrap; }
  .chip:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
  .chip[aria-pressed="true"] { background: var(--sc); color: var(--on-sc); border-color: transparent; }
  .chip[aria-pressed="true"]::before { content: ""; width: 10px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(-45deg); }
  .chip.assist { border-color: var(--outline); font-weight: 400; }

  /* ── filters ── */
  .filters { padding: 4px 16px 12px; display: grid; gap: 12px; flex: none; }
  .pv[data-view="fires"] { overflow: auto; }
  .pv[data-view="fires"] .list { flex: none; min-height: 0; }
  .pv[data-view="fires"] .list-body { overflow: visible; }
  body[data-layout="c"] .pv[data-view="fires"] .list { flex: 1 1 0; }
  body[data-layout="c"] .filters { position: absolute; z-index: 800; top: 12px; left: 12px; width: 352px; max-height: calc(100% - 24px); overflow: auto; padding: 12px 16px; background: color-mix(in srgb, var(--color-bg) 94%, transparent); border-radius: var(--sh-lg); box-shadow: var(--shadow-md); }
  body[data-layout="b"] .filters { grid-template-columns: minmax(280px, 1.3fr) 1fr 1fr; align-items: start; gap: 8px 24px; }
  .f-head { display: flex; align-items: center; justify-content: space-between; }
  .f-head .btn { min-height: 28px; padding: 0 8px; font-size: 12px; }
  .hist-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; gap: 8px; margin-top: 2px; }
  .hist { width: 100%; height: 72px; display: block; touch-action: none; cursor: crosshair; user-select: none; }
  .hist rect.bar { fill: var(--color-neutral-400); rx: 2; }
  .hist rect.bar.in { fill: var(--color-accent); }
  .hist rect.bar.hot { fill: var(--color-accent-700); }
  .hist .axis { stroke: var(--outline-v); stroke-width: 1; }
  .hist text { font-size: 10px; fill: color-mix(in srgb, var(--color-text) 60%, transparent); font-family: var(--font-body); }
  .hist .brush { fill: color-mix(in srgb, var(--color-accent) 14%, transparent); }
  .hist .asof { stroke: var(--color-text); stroke-width: 1.5; stroke-dasharray: 3 3; }
  .dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .field { display: block; }
  .field > label { display: flex; justify-content: space-between; font-size: 12px; }
  .field > label b { color: var(--color-text); font-weight: 600; }
  input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; margin: 0; cursor: pointer; }
  input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--pc); }
  input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--pc); }
  input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--color-accent); border: 0; box-shadow: var(--shadow-sm); }
  input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--color-accent); border: 0; }
  input[type="range"]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
  .row2 { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
  .seg { border-radius: var(--sh-full); border-color: var(--outline); }
  .seg-opt { padding: 5px 12px; font-size: 12.5px; font-weight: 500; }
  .seg-opt + .seg-opt { border-left-color: var(--outline); }
  .seg-opt:has(input:checked) { background: var(--sc); color: var(--on-sc); }
  .county-note { font-size: 12px; color: var(--color-accent-700); }
  body[data-theme="dark"] .county-note { color: var(--color-accent-300); }
  .check { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
  .check input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-accent); }

  /* ── list (M3 two-line list items) ── */
  .list { display: flex; flex-direction: column; min-height: 0; flex: 1 1 0; }
  .list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 16px 6px; font-size: 13px; }
  .list-body { overflow: auto; flex: 1; scroll-behavior: smooth; padding: 0 8px 8px; }
  .fire { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 0 12px; align-items: center; min-height: 64px; padding: 6px 8px 6px 8px; border-radius: var(--sh-md); cursor: pointer; }
  .fire:hover, .fire.hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
  .fire.selected { background: var(--sc); color: var(--on-sc); }
  .fire-top { display: flex; align-items: baseline; gap: 8px; }
  .fire-top .area { font-family: var(--font-heading); font-weight: 600; font-size: 18px; }
  .fire-top .date { font-size: 12.5px; }
  .fire-sub { font-size: 12.5px; margin-top: 1px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .tag { font-size: 10.5px; padding: 1px 8px; border-radius: var(--sh-xs); letter-spacing: .03em; }
  .cmp-btn { width: 36px; height: 36px; padding: 0; border-radius: var(--sh-full); border-color: transparent; color: var(--color-accent-700); }
  body[data-theme="dark"] .cmp-btn, .fire.selected .cmp-btn { color: inherit; }
  .cmp-btn:hover { background: color-mix(in srgb, var(--color-text) 10%, transparent); }
  .thumb { width: 56px; height: 56px; position: relative; overflow: hidden; background: var(--sfc); border-radius: var(--sh-md); }
  .thumb-tiles { position: absolute; inset: 0; background-repeat: no-repeat; }
  body[data-theme="dark"] .thumb-tiles { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92); }
  .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .thumb svg path, .thumb svg circle { fill: color-mix(in srgb, var(--fire) 30%, transparent); stroke: var(--fire); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
  .thumb svg path.x { fill: none; stroke-width: 2; }
  .load-more { padding: 8px 8px 12px; }
  .load-more .btn { width: 100%; justify-content: center; }
  .empty { padding: 28px 16px; font-size: 14px; }
  .empty h4 { margin-bottom: 6px; }
  .table-wrap { display: none; }
  body[data-layout="b"] .table-wrap { display: block; }
  body[data-layout="b"] .cards { display: none; }
  .table { font-size: 13px; }
  .table td { padding: 4px 8px; vertical-align: middle; }
  .table tbody tr { cursor: pointer; }
  .table tbody tr.selected { background: var(--sc); }
  .table tbody tr.hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
  .table .thumb { width: 36px; height: 36px; border-radius: var(--sh-sm); }
  .table .thumb-tiles { display: none; }

  /* ── settings / data / layout panels ── */
  .switch { position: relative; display: inline-flex; align-items: center; width: 52px; height: 32px; flex: none; }
  .switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
  .switch i { position: absolute; inset: 0; border-radius: var(--sh-full); border: 2px solid var(--outline); background: var(--sfc-hi); transition: background .15s; }
  .switch i::after { content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-neutral-700); transition: transform .15s, background .15s, width .15s, height .15s; }
  .switch input:checked + i { background: var(--color-accent); border-color: var(--color-accent); }
  .switch input:checked + i::after { transform: translateX(20px); background: var(--color-bg); }
  .switch input:focus-visible + i { outline: 2px solid var(--color-accent); outline-offset: 2px; }
  .setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
  .setting .lbl { display: grid; }
  .setting .lbl small { font-size: 12px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
  .radio-list { display: grid; gap: 4px; }
  .radio-list .radio { padding: 10px 12px; border-radius: var(--sh-md); }
  .radio-list .radio:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
  .radio-list .radio:has(input:checked) { background: var(--sc); color: var(--on-sc); }
  .radio-list .radio .lbl { display: grid; line-height: 1.3; }
  .radio-list .radio .lbl small { font-size: 12px; opacity: .75; }
  .source-pop { display: grid; gap: 0; min-width: 0; }
  .source-pop h6 { margin-bottom: 4px; }
  .src-item { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--outline-v); min-width: 0; }
  .src-item:last-child { border-bottom: 0; }
  .src-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
  .src-head b { font-weight: 600; }
  .src-ok { font-weight: 700; width: 14px; flex: none; }
  .src-ok.ok { color: #2d8a4e; } .src-ok.fail { color: var(--fire); }
  .src-url { font-size: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: color-mix(in srgb, var(--color-text) 60%, transparent); overflow-wrap: anywhere; line-height: 1.4; }
  .src-cols { display: flex; flex-wrap: wrap; gap: 4px; }
  .src-cols code, .source-pop code { font-size: 11px; background: color-mix(in srgb, var(--color-text) 6%, transparent); padding: 1px 6px; border-radius: var(--sh-xs); overflow-wrap: anywhere; }

  /* ── map chrome ── */
  .leaflet-container { font-family: var(--font-body); }
  .leaflet-bar { border: 0 !important; box-shadow: var(--shadow-sm) !important; border-radius: var(--sh-sm) !important; overflow: hidden; }
  .leaflet-bar a { background: var(--color-bg); color: var(--color-text); border-bottom-color: var(--outline-v); }
  .leaflet-bar a:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
  .leaflet-control-attribution { background: color-mix(in srgb, var(--color-bg) 85%, transparent) !important; color: var(--color-text); font-size: 10px; border-radius: var(--sh-xs) 0 0 0; }
  .leaflet-control-attribution a { color: inherit; }
  .leaflet-control-scale-line { background: color-mix(in srgb, var(--color-bg) 80%, transparent); border-color: var(--color-text); color: var(--color-text); font-size: 10px; }
  .leaflet-tooltip { background: var(--color-text); color: var(--color-bg); border: 0; box-shadow: none; font-size: 12px; padding: 4px 8px; border-radius: var(--sh-xs); }
  .leaflet-tooltip::before { display: none; }
  .cluster { display: grid; place-items: center; background: var(--fire); color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 13px; border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--fire) 30%, transparent); }
  .map-tools { position: absolute; z-index: 800; right: 12px; top: 12px; display: grid; gap: 6px; padding: 10px 14px 12px; background: color-mix(in srgb, var(--color-bg) 94%, transparent); border-radius: var(--sh-md); box-shadow: var(--shadow-sm); font-size: 12.5px; }
  .map-tools h6 { margin-bottom: 2px; }
  .source { position: absolute; z-index: 800; left: 12px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; background: color-mix(in srgb, var(--color-bg) 94%, transparent); border: 1px solid var(--outline); border-radius: var(--sh-sm); font: inherit; font-size: 12px; color: var(--color-text); cursor: pointer; box-shadow: var(--shadow-sm); }
  .source:hover { background: var(--color-bg); }
  .source i { width: 8px; height: 8px; border-radius: 50%; background: var(--color-neutral-500); }
  .source[data-kind="live"] i { background: #2d8a4e; }
  .source[data-kind="snapshot"] i, .source[data-kind="none"] i { background: var(--fire); }
  body[data-layout="c"] .source { left: auto; right: 12px; }
  .fab { position: absolute; z-index: 850; right: 16px; bottom: 24px; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: var(--sh-lg); background: var(--pc); color: var(--on-pc); font-family: var(--font-heading); font-weight: 600; font-size: 15px; letter-spacing: .01em; cursor: pointer; box-shadow: var(--shadow-md); transition: transform .15s, box-shadow .15s; }
  .fab:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
  .fab:active { transform: translateY(0); }
  .fab[hidden] { display: none; }
  body[data-layout="c"] .fab { right: 16px; bottom: 64px; }

  /* ── compare: M3 full-screen dialog ── */
  dialog.cmp { width: 100vw; height: 100vh; max-width: none; max-height: none; padding: 0; border: 0; margin: 0; background: var(--color-bg); color: var(--color-text); overflow: hidden; }
  dialog.cmp::backdrop { background: color-mix(in srgb, #1d1f20 50%, transparent); }
  .cmp-grid { height: 100%; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "tools" "stage" "meta"; }
  .cmp-head { grid-area: head; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
  .cmp-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .cmp-title h2 { margin: 0; font-size: 24px; }
  .cmp-title .sub { font-size: 14px; }
  .cmp-tags { display: flex; gap: 4px; flex-wrap: wrap; }
  .cmp-nav { margin-left: auto; display: flex; gap: 4px; }
  .cmp-tools { grid-area: tools; display: flex; align-items: center; gap: 16px; padding: 4px 16px 10px; flex-wrap: wrap; font-size: 13px; }
  .cmp-tools .pair { display: none; align-items: center; gap: 8px; }
  dialog.cmp[data-mode="swipe"] .pair { display: flex; }
  .cmp-stage { grid-area: stage; position: relative; padding: 8px 16px 16px; min-height: 0; display: flex; align-items: center; justify-content: center; }
  .frames { display: grid; gap: 12px; grid-auto-flow: column; grid-auto-columns: var(--fs, 300px); grid-auto-rows: var(--fs, 300px); }
  .frame { position: relative; background: var(--sfc); border-radius: var(--sh-md); overflow: hidden; }
  .frame-map { position: absolute; inset: 0; }
  .stamp { position: absolute; z-index: 700; left: 10px; top: 10px; padding: 5px 10px; background: color-mix(in srgb, #1d1f20 80%, transparent); color: #f2f2f3; font-size: 12px; display: flex; gap: 10px; align-items: baseline; pointer-events: none; border-radius: var(--sh-sm); }
  .stamp b { font-family: var(--font-heading); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
  .stamp .rel { font-variant-numeric: tabular-nums; }
  .stamp .rel.pos::before { content: "+"; }
  .unavail { position: absolute; z-index: 700; right: 10px; bottom: 10px; padding: 4px 10px; background: color-mix(in srgb, #1d1f20 80%, transparent); color: #f2f2f3; font-size: 11px; display: none; pointer-events: none; border-radius: var(--sh-sm); }
  .frame.unavailable .unavail { display: block; }
  .unavail .mono { display: block; font-size: 10px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
  .divider { position: absolute; z-index: 750; background: #f2f2f3; box-shadow: 0 0 0 1px #1d1f20; cursor: ew-resize; touch-action: none; }
  .divider.v { top: 0; bottom: 0; width: 2px; left: 50%; }
  .divider.h { left: 0; right: 0; height: 2px; top: 50%; cursor: ns-resize; }
  .divider::after { content: ""; position: absolute; width: 32px; height: 32px; border-radius: 50%; background: #1d1f20; border: 2px solid #f2f2f3; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .divider span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #f2f2f3; font-size: 14px; font-weight: 700; line-height: 1; z-index: 1; }
  .side-label { position: absolute; z-index: 700; bottom: 10px; padding: 4px 10px; background: color-mix(in srgb, #1d1f20 80%, transparent); color: #f2f2f3; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; pointer-events: none; border-radius: var(--sh-sm); }
  .side-label.l { left: 10px; } .side-label.r { right: 10px; bottom: auto; top: 10px; }
  .cmp-meta { grid-area: meta; padding: 10px 16px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; font-size: 13px; align-items: start; background: var(--sfc-low); }
  .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 20px; margin: 0; }
  .facts dt { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
  .facts dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
  .facts dd a { color: var(--color-accent-700); }
  body[data-theme="dark"] .facts dd a, dialog[data-chrome="dark"] .facts dd a { color: var(--color-accent-300); }
  .prov summary { cursor: pointer; font-weight: 600; font-size: 12px; list-style: none; }
  .prov summary::before { content: "+ "; color: var(--color-accent); }
  .prov[open] summary::before { content: "− "; }
  .prov dl { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12px; }
  .prov dt { color: color-mix(in srgb, var(--color-text) 60%, transparent); }
  .prov dd { margin: 0; word-break: break-all; }
  .cmp-foot { grid-column: 1 / -1; display: flex; gap: 16px; font-size: 11px; color: color-mix(in srgb, var(--color-text) 65%, transparent); flex-wrap: wrap; }
  .cmp-foot kbd { font: inherit; padding: 0 5px; border: 1px solid var(--outline-v); border-radius: 3px; }
  dialog[data-chrome="side"] .cmp-grid { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head head" "tools meta" "stage meta"; }
  dialog[data-chrome="side"] .cmp-meta { grid-template-columns: 1fr; align-content: start; overflow: auto; border-radius: var(--sh-lg) 0 0 0; }
  dialog[data-chrome="side"] .facts { grid-template-columns: 1fr; }
  dialog[data-chrome="dark"] { background: var(--color-accent-900); color: #f2f2f3; --color-text: #f2f2f3; --color-bg: var(--color-accent-900); --sfc: #2c455d; --sfc-low: #253a4e; --outline-v: color-mix(in srgb, #f2f2f3 20%, transparent); --outline: color-mix(in srgb, #f2f2f3 35%, transparent); --sc: #416180; --on-sc: #eef6ff; --color-accent-100: #416180; --color-accent-800: #eef6ff; --color-neutral-100: #2c455d; --color-neutral-800: #e7e7ea; }
  dialog[data-chrome="dark"] .osm-base { filter: grayscale(1) brightness(.55) contrast(1.1); }

  /* ── responsive: rail → bottom nav, panel → bottom sheet ── */
  @media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "top" "prog" "app" "rail"; }
    .rail { flex-direction: row; justify-content: space-around; padding: 4px 0 6px; gap: 0; }
    .rail-brand { display: none; }
    .top-logos { display: none; }
    .dest { width: auto; flex: 1; padding: 6px 0 4px; }
    .top { padding: 8px 12px 4px; flex-wrap: wrap; }
    .search { flex-basis: 100%; margin-left: 0; }
    .foot { display: none; }
    .app { padding: 4px 8px 8px; gap: 0; }
    body[data-layout] .app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); grid-template-areas: "map"; }
    .map-wrap { min-height: 0; }
    body[data-layout] .panel { position: absolute; left: 8px; right: 8px; bottom: 8px; top: auto; height: 34%; border-radius: var(--sh-xl) var(--sh-xl) 0 0; box-shadow: var(--shadow-lg); background: var(--color-bg); transition: height .25s; z-index: 900; }
    body.sheet-open .panel { height: 82%; }
    .sheet-handle { display: grid; place-items: center; height: 24px; border: 0; background: none; width: 100%; cursor: pointer; }
    .sheet-handle::before { content: ""; width: 32px; height: 4px; border-radius: 2px; background: var(--outline); }
    body[data-layout="c"] .filters { position: static; width: auto; max-height: none; box-shadow: none; padding: 4px 16px 12px; }
    body[data-layout="b"] .filters { grid-template-columns: 1fr; }
    .fab { bottom: calc(34% + 16px); }
    body.sheet-open .fab { display: none; }
    .source { bottom: calc(34% + 24px); }
    .cmp-grid, dialog[data-chrome="side"] .cmp-grid { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; grid-template-areas: "head" "tools" "stage" "meta"; overflow: auto; }
    .cmp-stage { padding: 8px 12px; }
    .frames { grid-auto-flow: row; grid-auto-columns: min(100%, 92vw); grid-auto-rows: min(100%, 92vw); }
    .cmp-meta { grid-template-columns: 1fr; }
  }
  @media (min-width: 861px) { .sheet-handle { display: none; } }
