:root {
  --paper: #f3f1ea;
  --surface: #fffefa;
  --ink: #172031;
  --muted: #626a75;
  --line: #d8d6cf;
  --red: #dd4935;
  --blue: #356fc8;
  --green: #167d60;
  --gold: #b77d10;
  --violet: #6d52ad;
  --shadow: 0 20px 55px rgba(23, 32, 49, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 9999; padding: 9px 15px; color: white; background: var(--ink); }
.skip-link:focus { top: 10px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 76px;
  padding: 0 4vw;
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 241, 234, .96);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: var(--ink); text-decoration: none; }
.brand-symbol { display: grid; place-items: center; width: 40px; height: 40px; color: white; background: var(--ink); font-size: 23px; font-weight: 900; line-height: 1; }
.brand strong { display: block; font-size: 20px; letter-spacing: .13em; line-height: 1; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.app-nav { display: flex; align-items: stretch; height: 72px; }
.app-nav a { display: grid; place-items: center; min-width: 76px; padding: 0 13px; border-right: 1px solid var(--line); color: #4d5560; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.app-nav a:first-child { border-left: 1px solid var(--line); }
.app-nav a:hover, .app-nav a.active { color: white; background: var(--ink); }
.live-clock { justify-self: end; display: flex; align-items: center; gap: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 700; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #2aa56d; box-shadow: 0 0 0 4px rgba(42,165,109,.12); }

/* Common page layout */
.app-main { width: min(1280px, calc(100% - 48px)); min-height: calc(100vh - 148px); margin: 0 auto; padding: 66px 0 90px; }
.page-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr); align-items: end; gap: 55px; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(42px, 6vw, 72px); letter-spacing: -.06em; line-height: 1.08; }
.page-heading > p { max-width: 540px; margin: 0; color: var(--muted); font-size: 14px; }
.app-footer { display: flex; justify-content: space-between; align-items: center; min-height: 72px; padding: 0 4vw; color: #939aa5; background: #0c121e; font-size: 10px; }
.result-status { min-height: 28px; margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.result-status.loading::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { grid-column: 1 / -1; padding: 50px 20px; color: var(--muted); background: var(--surface); text-align: center; }

/* Disaster list */
.weather-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; }
.feed-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.feed-tabs button, .refresh-button { min-height: 40px; padding: 8px 15px; border: 1px solid var(--line); color: #59616c; background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.feed-tabs button:hover, .feed-tabs button.active { color: white; border-color: var(--ink); background: var(--ink); }
.refresh-button:hover { color: var(--ink); border-color: var(--ink); }
.weather-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.weather-item { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 18px; min-height: 168px; padding: 23px; color: var(--ink); background: var(--surface); text-decoration: none; transition: background .18s ease; }
.weather-item:hover { background: white; }
.weather-time { color: #7b838d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.weather-category { display: block; width: fit-content; margin-top: 10px; padding: 2px 7px; color: var(--red); border: 1px solid rgba(221, 73, 53, .28); font-family: inherit; font-weight: 800; }
.weather-content { min-width: 0; }
.weather-content h3 { margin: 0 0 7px; font-size: 16px; line-height: 1.5; }
.weather-content p { display: -webkit-box; overflow: hidden; margin: 0; color: #59616c; font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.weather-source { display: block; margin-top: 12px; color: var(--red); font-size: 10px; font-weight: 800; }
.source-guidance { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 25px; margin-top: 30px; padding: 22px 25px; color: #c0c7d1; background: var(--ink); }
.source-guidance strong { color: white; font-size: 12px; }
.source-guidance p { margin: 0; font-size: 11px; }
.source-guidance a { color: white; font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; }

/* Search forms */
.search-panel { margin-bottom: 22px; padding: 28px; border: 1px solid var(--line); border-top: 4px solid var(--red); background: var(--surface); box-shadow: var(--shadow); }
.search-panel.gold-panel { border-top-color: var(--gold); }
.search-panel.violet-panel { border-top-color: var(--violet); }
.search-panel label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 800; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 2px solid var(--ink); }
.search-row input { min-width: 0; padding: 10px 3px 15px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: clamp(20px, 2.5vw, 30px); font-weight: 700; }
.search-row button { display: flex; align-items: center; gap: 30px; padding: 12px 17px; border: 0; color: white; background: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.search-row button:hover { background: var(--red); }
.gold-panel .search-row button:hover { background: var(--gold); }
.violet-panel .search-row button:hover { background: var(--violet); }
.suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 15px; }
.suggestions span { margin-right: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.suggestions button { padding: 4px 11px; border: 1px solid var(--line); border-radius: 20px; color: #535c67; background: transparent; font-size: 10px; cursor: pointer; }
.suggestions button:hover { border-color: var(--ink); color: var(--ink); }
.filter-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: -7px 0 17px; }
.filter-toolbar label { display: flex; align-items: center; gap: 7px; padding-left: 11px; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.48); font-size: 9px; font-weight: 800; }
.filter-toolbar select { min-height: 36px; padding: 5px 28px 5px 9px; border: 0; border-left: 1px solid var(--line); outline: 0; color: var(--ink); background: var(--surface); font-size: 10px; cursor: pointer; }
.filter-toolbar select:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.filter-toolbar .filter-search { flex: 1 1 240px; min-width: 210px; }
.filter-toolbar input { min-width: 0; min-height: 36px; padding: 5px 10px; border: 0; border-left: 1px solid var(--line); outline: 0; color: var(--ink); background: var(--surface); font-size: 10px; }
.filter-toolbar .filter-search input { flex: 1; }
.filter-toolbar input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.filter-toolbar .filter-number { width: 92px; }
.weather-filter-toolbar { justify-content: flex-start; margin: 0 0 16px; }

/* Law results */
.result-list { border-top: 1px solid var(--line); }
.law-item { display: grid; grid-template-columns: 105px minmax(0, 1fr) 25px; gap: 25px; padding: 25px 8px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.law-item:hover { background: rgba(255,255,255,.55); }
.law-meta { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.law-meta strong { display: block; width: fit-content; margin-bottom: 8px; padding: 2px 7px; color: var(--red); border: 1px solid rgba(221,73,53,.3); }
.law-body { min-width: 0; }
.law-body h3 { margin: 0 0 5px; font-size: 18px; }
.law-body small { color: var(--muted); font-size: 10px; }
.law-body p { margin: 9px 0 0; color: #515a65; font-size: 12px; }
.result-arrow { align-self: center; }

/* Open data cards */
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.dataset-card { display: flex; flex-direction: column; min-width: 0; min-height: 265px; padding: 22px; border: 1px solid var(--line); background: var(--surface); }
.dataset-card:hover { box-shadow: var(--shadow); }
.dataset-source { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.dataset-source span { color: var(--gold); font-weight: 800; }
.dataset-card h3 { margin: 14px 0 7px; font-size: 15px; line-height: 1.5; }
.dataset-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.tag-row, .resource-links { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-row { margin: 13px 0; }
.tag-row span { padding: 2px 6px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.resource-links { margin-top: auto; }
.resource-links a { padding: 4px 7px; color: white; background: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; text-decoration: none; }
.dataset-detail { margin-top: 10px; font-size: 10px; font-weight: 800; text-decoration: none; }

/* Library results */
.books-page { background: #ebe7f1; }
.book-list { counter-reset: books; }
.book-item { counter-increment: books; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 22px; align-items: start; padding: 24px 5px; border-top: 1px solid rgba(79,61,112,.2); }
.book-item:last-child { border-bottom: 1px solid rgba(79,61,112,.2); }
.book-item::before { content: counter(books, decimal-leading-zero); color: var(--violet); font-family: Georgia, serif; font-size: 24px; font-style: italic; }
.book-main { min-width: 0; }
.book-main h3 { margin: 0 0 5px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 17px; }
.book-main p { margin: 9px 0 0; color: #655e70; font-size: 11px; }
.book-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #766d80; font-size: 10px; }
.book-item > a { padding: 7px 11px; border: 1px solid rgba(79,61,112,.3); color: #51436f; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }

/* Dedicated map page */
.map-page { background: #e8eee8; }
.map-main { display: grid; grid-template-columns: 310px minmax(0, 1fr); width: 100%; min-height: calc(100dvh - 76px); }
.map-page-tools { padding: 48px 30px 42px 4vw; color: white; background: var(--green); }
.map-page-tools h1 { margin: 0; font-size: clamp(42px, 5vw, 66px); letter-spacing: -.06em; line-height: 1; }
.map-page-tools > div:first-child > p:last-child { margin: 20px 0 0; color: rgba(255,255,255,.8); font-size: 12px; }
.map-page-tools .eyebrow { color: rgba(255,255,255,.7); }
.map-search { margin-top: 28px; }
.map-search label { display: block; margin-bottom: 7px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 800; }
.map-search > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid rgba(255,255,255,.65); }
.map-search input { min-width: 0; padding: 9px 4px; border: 0; outline: 0; color: white; background: transparent; font-size: 12px; }
.map-search input::placeholder { color: rgba(255,255,255,.55); }
.map-search button { padding: 7px 10px; border: 0; color: var(--green); background: white; font-size: 9px; font-weight: 800; cursor: pointer; }
.map-search-status { min-height: 18px; margin: 7px 0 0; color: rgba(255,255,255,.7); font-size: 9px; }
.map-search-status.loading::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border: 1px solid rgba(255,255,255,.35); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.map-search-results { display: grid; max-height: 210px; margin-top: 5px; overflow-y: auto; border-top: 1px solid rgba(255,255,255,.2); }
.map-search-results button { display: block; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid rgba(255,255,255,.2); color: white; background: transparent; text-align: left; cursor: pointer; }
.map-search-results button:hover { background: rgba(255,255,255,.12); }
.map-search-results strong, .map-search-results small { display: block; }
.map-search-results strong { font-size: 10px; line-height: 1.45; }
.map-search-results small { margin-top: 2px; color: rgba(255,255,255,.62); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 32px 0; }
.map-actions button { padding: 8px 11px; border: 1px solid rgba(255,255,255,.4); color: white; background: transparent; font-size: 10px; cursor: pointer; }
.map-actions button:hover { color: var(--green); background: white; }
.map-actions button:disabled { cursor: wait; opacity: .65; }
.location-status { min-height: 38px; margin: -20px 0 25px; color: rgba(255,255,255,.76); font-size: 10px; line-height: 1.6; }
.map-readout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.3); }
.map-readout dt { color: rgba(255,255,255,.65); font-size: 8px; font-weight: 800; }
.map-readout dd { margin: 2px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.map-page-frame { position: relative; min-width: 0; height: calc(100dvh - 76px); min-height: 580px; padding: 12px; background: white; }
.map-page-frame #map { width: 100%; height: 100%; background: #dbe3dd; }
.map-layer-switch { position: absolute; top: 28px; right: 28px; z-index: 500; display: flex; padding: 4px; background: rgba(255,255,255,.96); box-shadow: 0 7px 24px rgba(20,40,30,.2); }
.map-layer-switch button { padding: 7px 10px; border: 0; color: #53605c; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.map-layer-switch button.active { color: white; background: var(--green); }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 9px !important; }

/* Leaflet core layout fallback: keeps tiles aligned even if CDN CSS is delayed. */
.leaflet-container { position: relative; overflow: hidden; outline-offset: 1px; -webkit-tap-highlight-color: transparent; }
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer { position: absolute; top: 0; left: 0; }
.leaflet-map-pane { z-index: 200; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-tile {
  display: block;
  width: 256px;
  height: 256px;
  max-width: none !important;
  max-height: none !important;
  padding: 0;
  margin: 0;
  border: 0;
  user-select: none;
  pointer-events: none;
}
.leaflet-tile-container { pointer-events: none; }
.leaflet-tile { visibility: hidden; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-zoom-animated { transform-origin: 0 0; }

/* Disaster detail */
.detail-main { max-width: 1000px; }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); font-size: 11px; font-weight: 800; text-decoration: none; }
.weather-detail { overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.weather-detail-header { padding: 36px 40px; color: white; background: var(--ink); }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-badges span { padding: 3px 8px; border: 1px solid rgba(255,255,255,.25); color: #d4dae2; font-size: 9px; font-weight: 800; }
.weather-detail-header h1 { margin: 0; font-size: clamp(29px, 5vw, 48px); letter-spacing: -.04em; line-height: 1.3; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 25px 50px; margin: 27px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.17); }
.detail-meta div { min-width: 140px; }
.detail-meta dt { color: #9099a6; font-size: 8px; font-weight: 800; }
.detail-meta dd { margin: 2px 0 0; font-size: 11px; }
.detail-headline { padding: 30px 40px; border-bottom: 1px solid var(--line); background: #fff4e6; }
.detail-headline h2, .detail-section h2 { margin: 0 0 12px; color: var(--red); font-size: 11px; letter-spacing: .05em; }
.detail-headline p { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.95; }
.detail-section { padding: 29px 40px; border-bottom: 1px solid var(--line); }
.area-group { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.area-group > strong { font-size: 12px; }
.area-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.area-group span { padding: 3px 8px; border: 1px solid var(--line); background: white; font-size: 10px; }
.detail-note { margin: 0 0 14px; color: #515a65; font-size: 12px; line-height: 1.9; }
.xml-body-section { padding-bottom: 35px; }
.xml-filter-toolbar { justify-content: flex-start; margin: 0 0 8px; }
.xml-filter-status { margin: 0 0 11px; color: var(--muted); font-size: 9px; }
.xml-sections { border-top: 1px solid var(--line); }
.xml-section { border-bottom: 1px solid var(--line); }
.xml-section summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 4px; font-size: 12px; font-weight: 800; cursor: pointer; }
.xml-section summary:hover { color: var(--red); }
.xml-section summary small { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 600; }
.xml-entry-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.xml-entry { min-width: 0; padding: 16px; background: white; }
.xml-entry h3 { margin: 0 0 10px; font-size: 12px; }
.xml-entry dl { display: grid; gap: 7px; margin: 0; }
.xml-entry dl div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
.xml-entry dt { color: var(--muted); font-size: 8px; font-weight: 800; }
.xml-entry dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #3f4854; font-size: 10px; line-height: 1.65; }
.detail-source { display: flex; justify-content: space-between; gap: 20px; padding: 20px 40px; color: var(--muted); font-size: 9px; }
.detail-source a { font-weight: 800; text-decoration: none; }

@media (max-width: 980px) {
  .app-header { grid-template-columns: auto 1fr; padding: 0 18px; }
  .live-clock { display: none; }
  .app-nav { justify-self: end; overflow-x: auto; }
  .app-nav a { min-width: 64px; padding: 0 8px; }
  .page-heading { grid-template-columns: 1fr; gap: 18px; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-main { grid-template-columns: 250px minmax(0, 1fr); }
  .source-guidance { grid-template-columns: 110px 1fr; }
  .source-guidance a { grid-column: 2; }
}

@media (max-width: 720px) {
  .app-header { position: static; display: block; height: auto; padding: 12px 14px 0; }
  .app-header .brand { margin-bottom: 11px; }
  .app-nav { width: calc(100% + 28px); height: 50px; margin-left: -14px; overflow-x: auto; border-top: 1px solid var(--line); }
  .app-nav a { flex: 1 0 auto; min-width: 70px; height: 50px; font-size: 10px; }
  .app-main { width: calc(100% - 30px); padding: 43px 0 65px; }
  .page-heading { margin-bottom: 28px; padding-bottom: 23px; }
  .page-heading h1 { font-size: 43px; }
  .page-heading > p { font-size: 12px; }
  .weather-toolbar { display: block; }
  .feed-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .feed-tabs button { width: 100%; }
  .refresh-button { width: 100%; margin-top: 7px; }
  .weather-list { grid-template-columns: 1fr; }
  .weather-item { grid-template-columns: 58px minmax(0, 1fr); gap: 13px; min-height: 150px; padding: 18px 15px; }
  .weather-content h3 { font-size: 14px; }
  .source-guidance { grid-template-columns: 1fr; gap: 8px; padding: 19px; }
  .source-guidance a { grid-column: 1; }
  .search-panel { padding: 20px 16px; }
  .search-row { grid-template-columns: 1fr; border: 0; }
  .search-row input { border-bottom: 2px solid var(--ink); font-size: 20px; }
  .search-row button { justify-content: space-between; width: 100%; margin-top: 11px; }
  .filter-toolbar { display: grid; grid-template-columns: 1fr; margin-top: -8px; }
  .filter-toolbar label { justify-content: space-between; }
  .law-item { grid-template-columns: 70px minmax(0, 1fr); gap: 13px; padding: 21px 0; }
  .result-arrow { display: none; }
  .result-grid { grid-template-columns: 1fr; }
  .dataset-card { min-height: 235px; }
  .book-item { grid-template-columns: 40px minmax(0, 1fr); gap: 11px; }
  .book-item > a { grid-column: 2; width: fit-content; }
  .map-main { display: block; min-height: 0; }
  .map-page-tools { padding: 38px 20px 28px; }
  .map-page-tools h1 { font-size: 44px; }
  .map-actions { margin: 23px 0; }
  .map-page-frame { height: 64dvh; min-height: 430px; padding: 7px; }
  .map-layer-switch { top: 17px; right: 17px; }
  .weather-detail-header, .detail-headline, .detail-section { padding: 25px 20px; }
  .area-group { grid-template-columns: 1fr; gap: 8px; }
  .xml-entry-list { grid-template-columns: 1fr; }
  .xml-entry dl div { grid-template-columns: 75px minmax(0, 1fr); }
  .detail-source { align-items: flex-start; flex-direction: column; padding: 18px 20px; }
  .app-footer { min-height: 64px; padding: 14px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
