:root {
  --primary: #047857;
  --primary-strong: #065f46;
  --primary-soft: #d1fae5;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --ink: #172033;
  --muted: #5d6879;
  --line: #d8dee8;
  --surface: #ffffff;
  --surface-alt: #f3f6f8;
  --danger: #b91c1c;
  --focus: #0f766e;
  --header-height: 68px;
  --radius: 6px;
  --content: 1180px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { display: block; width: 1.15em; height: 1.15em; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: 0; line-height: 1.2; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 2px; }
.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: 9999; left: 12px; top: -60px; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

.site-header { height: var(--header-height); padding: 0 24px; display: grid; grid-template-columns: minmax(190px, 260px) minmax(0, 1fr); gap: 22px; align-items: center; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .97); position: sticky; top: 0; z-index: 1200; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; background: var(--primary); color: #fff; border-radius: var(--radius); font-weight: 800; }
.brand-mark svg { width: 23px; height: 23px; }
.brand span:last-child { min-width: 0; display: flex; flex-direction: column; }
.brand strong { font-size: 19px; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.main-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.main-nav a { min-width: 64px; min-height: 44px; padding: 6px 10px; display: flex; align-items: center; justify-content: center; gap: 6px; color: #3c4859; border-radius: var(--radius); font-size: 14px; font-weight: 650; }
.main-nav a:hover { color: var(--primary-strong); background: var(--primary-soft); }

.home-intro, .page-heading, .detail-heading, .breadcrumbs, .content-band, .detail-content, .entity-facts, .error-page { width: min(100% - 40px, var(--content)); margin-inline: auto; }
.home-intro { min-height: 132px; padding: 28px 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--primary); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.home-intro h1, .page-heading h1, .detail-heading h1 { margin-bottom: 7px; font-size: clamp(28px, 4vw, 42px); }
.home-intro p, .page-heading p, .detail-heading p { max-width: 720px; margin-bottom: 0; color: var(--muted); }
.map-workspace { width: 100%; background: #dfe6e7; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-toolbar { min-height: 50px; padding: 7px max(20px, calc((100% - var(--content)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border-bottom: 1px solid var(--line); }
.layer-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.layer-button { min-height: 36px; padding: 7px 12px; white-space: nowrap; border: 1px solid transparent; border-radius: var(--radius); color: #3b4758; background: transparent; font-size: 14px; font-weight: 650; }
.layer-button:hover { background: var(--surface-alt); }
.layer-button.is-active { color: #fff; background: var(--primary); }
.map-actions { display: flex; gap: 6px; }
.live-coordinate { min-width: 164px; padding: 7px 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; font-variant-numeric: tabular-nums; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: #fff; }
.icon-button:hover { color: var(--primary); border-color: var(--primary); }
.map-stage { position: relative; width: 100%; height: min(65vh, 680px); min-height: 500px; }
#map { width: 100%; height: 100%; background: #d9e1e3; }
.coordinate-panel { position: absolute; z-index: 600; left: max(20px, calc((100% - var(--content)) / 2)); bottom: 22px; width: min(230px, calc(100% - 40px)); padding: 12px; background: rgba(255, 255, 255, .96); border: 1px solid #c6cfd9; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(23, 32, 51, .13); }
.coordinate-panel-title { margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.coordinate-panel label { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 7px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.coordinate-panel input { min-width: 0; height: 34px; padding: 5px 8px; border: 1px solid #bac4d0; border-radius: 4px; color: var(--ink); }
.coordinate-panel .button { width: 100%; margin-top: 9px; }
.map-status { position: absolute; z-index: 550; top: 12px; left: 50%; transform: translateX(-50%); padding: 7px 11px; color: #fff; background: rgba(23, 32, 51, .88); border-radius: 4px; font-size: 13px; }
.map-status[hidden] { display: none; }
.map-workspace:fullscreen { background: #fff; }
.map-workspace:fullscreen .map-stage { height: calc(100vh - 51px); }
.leaflet-control-zoom a { letter-spacing: 0; }
.leaflet-control-attribution { font-size: 10px; }

.button { min-height: 42px; padding: 9px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: var(--radius); font-weight: 750; }
.button-primary { color: #fff; background: var(--primary); }
.button-primary:hover { background: var(--primary-strong); }
.button-secondary { color: var(--primary-strong); background: #fff; border-color: var(--primary); }
.button-secondary:hover { background: var(--primary-soft); }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--primary-strong); font-weight: 750; }

.content-band { padding: 46px 0; }
.band-muted { width: 100%; padding-inline: max(20px, calc((100% - var(--content)) / 2)); background: var(--surface-alt); }
.section-heading { margin-bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 0; font-size: 25px; }
.city-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.city-item { min-height: 74px; padding: 12px 14px; display: grid; grid-template-columns: 36px 1fr 18px; align-items: center; gap: 10px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.city-item:hover { background: #f7fffb; }
.city-pin, .category-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: var(--radius); }
.city-item span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.city-item small { color: var(--muted); font-size: 12px; }
.city-item > svg { color: #9ca7b5; }
.place-list { background: #fff; border: 1px solid var(--line); }
.place-row { min-height: 72px; padding: 11px 14px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 120px 20px; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.place-row:last-child { border-bottom: 0; }
.place-row:hover { background: #f9fbfc; }
.place-copy { min-width: 0; display: flex; flex-direction: column; }
.place-copy small { overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.place-meta { color: var(--accent); font-size: 13px; font-weight: 700; text-align: right; }

.page-heading { min-height: 176px; padding: 38px 0 28px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.compact-heading { min-height: 140px; }
.region-jump { padding: 12px max(20px, calc((100% - var(--content)) / 2)); display: flex; gap: 7px; overflow-x: auto; background: var(--surface-alt); border-block: 1px solid var(--line); }
.region-jump a { padding: 6px 10px; white-space: nowrap; color: var(--primary-strong); background: #fff; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.region-list { width: min(100% - 40px, var(--content)); margin: 22px auto 50px; border-top: 1px solid var(--line); }
.region-row { padding: 22px 0; display: grid; grid-template-columns: 180px 1fr; gap: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.region-row h2 { margin: 2px 0 0; font-size: 18px; }
.region-row h2 > a:hover { color: var(--primary); }
.region-row h2 small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.city-links { display: flex; flex-wrap: wrap; gap: 6px; }
.city-links a, .inline-links a { padding: 6px 9px; color: #2f3b4b; background: var(--surface-alt); border-radius: 4px; font-size: 14px; }
.city-links a:hover, .inline-links a:hover { color: #fff; background: var(--primary); }

.breadcrumbs { min-height: 44px; padding-top: 18px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs svg { width: 14px; height: 14px; }
.detail-heading { min-height: 150px; padding: 24px 0 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.entity-facts { padding: 0 0 24px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; }
.entity-facts > div { min-width: 0; padding: 12px 14px; background: var(--surface-alt); border-top: 2px solid var(--line); }
.entity-facts dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.entity-facts dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
.entity-facts a { color: var(--primary-strong); }
.coordinate-readout { flex: 0 0 auto; padding: 10px 12px; display: flex; align-items: center; gap: 14px; background: var(--surface-alt); border-left: 3px solid var(--accent); color: var(--muted); font-size: 12px; }
.coordinate-readout span { display: flex; flex-direction: column; }
.coordinate-readout strong { color: var(--ink); font-size: 14px; }

.weather-section { padding-top: 38px; padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.weather-heading-row { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.weather-heading-row h2 { margin: 0; font-size: 26px; }
.weather-current { min-height: 112px; display: grid; grid-template-columns: 270px minmax(0, 1fr); align-items: stretch; border: 1px solid var(--line); border-left: 4px solid #2563a8; background: #fff; }
.weather-current-main { padding: 18px 22px; display: flex; align-items: center; gap: 16px; background: #eef6fc; }
.weather-current-main > svg { width: 48px; height: 48px; color: #b45309; }
.weather-current-main > div { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 9px; }
.weather-current-main span { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.weather-current-main strong { font-size: 34px; line-height: 1.1; }
.weather-current-main em { color: #2d4059; font-size: 15px; font-style: normal; font-weight: 700; }
.weather-current-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; }
.weather-current-facts > div { min-width: 0; padding: 15px 18px; border-left: 1px solid var(--line); }
.weather-current-facts dt { color: var(--muted); font-size: 12px; }
.weather-current-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 750; }
.weather-summary { margin: 14px 0 24px; color: #46546a; font-size: 14px; line-height: 1.75; }
.weather-forecast-nav { margin: 0 0 25px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.weather-forecast-nav a { min-height: 46px; padding: 9px 12px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #334155; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-alt); font-size: 14px; font-weight: 750; text-align: center; }
.weather-forecast-nav a:hover { color: var(--primary-strong); border-color: var(--primary); background: var(--primary-soft); }
.weather-forecast-nav a[aria-current="page"] { color: #fff; border-color: var(--primary); background: var(--primary); }
.weather-forecast-nav svg { flex: 0 0 auto; }
.forecast-group + .forecast-group { margin-top: 28px; }
.forecast-group-heading { margin-bottom: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.forecast-group-heading h3 { margin: 0; font-size: 18px; }
.forecast-group-heading span { color: var(--muted); font-size: 12px; }
.forecast-grid { display: grid; gap: 8px; }
.forecast-grid-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.forecast-grid-trend { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.forecast-day { min-width: 0; min-height: 176px; padding: 13px 12px; display: flex; align-items: center; flex-direction: column; border: 1px solid var(--line); border-radius: 4px; background: #fff; text-align: center; }
.forecast-day.is-today { border-top: 3px solid #2563a8; background: #f3f8fc; }
.forecast-day header { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
.forecast-day header strong { font-size: 14px; }
.forecast-day time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.forecast-day > svg { width: 30px; height: 30px; margin: 14px 0 5px; color: #b45309; }
.forecast-condition { color: #344156; font-size: 13px; }
.forecast-temperature { margin-top: 8px; display: flex; align-items: baseline; gap: 7px; }
.forecast-temperature strong { font-size: 20px; }
.forecast-temperature em { color: var(--muted); font-size: 14px; font-style: normal; }
.forecast-day small { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 4px; color: #4b657f; font-size: 11px; }
.forecast-day small svg { width: 13px; height: 13px; }
.forecast-day-compact { min-height: 128px; display: grid; grid-template-columns: minmax(0, 1fr) 30px auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; text-align: left; }
.forecast-day-compact header { display: flex; flex-direction: column; align-items: flex-start; }
.forecast-day-compact > svg { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.forecast-day-compact .forecast-condition { grid-column: 3; grid-row: 1 / span 2; }
.forecast-day-compact .forecast-temperature { grid-column: 4; grid-row: 1; margin: 0; }
.forecast-day-compact small { grid-column: 4; grid-row: 2; justify-self: end; margin: 0; padding: 0; }
.detail-content { padding: 44px 0 60px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 50px; }
.prose h2, .prose-band h2 { margin: 32px 0 12px; font-size: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose-band p { color: #3e4a5b; line-height: 1.85; }
.related-panel { align-self: start; border-top: 3px solid var(--primary); background: var(--surface-alt); }
.related-panel h2 { padding: 15px 16px 8px; margin: 0; font-size: 18px; }
.related-panel a { min-height: 64px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.related-panel a:hover { background: #fff; }
.related-panel a span { display: flex; flex-direction: column; }
.related-panel small { color: var(--muted); font-size: 12px; }
.empty-state { padding: 8px 16px 18px; color: var(--muted); }
.inline-links { display: flex; flex-wrap: wrap; gap: 7px; }
.layer-links { margin: 18px 0 8px; }
.nearby-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nearby-links a { min-width: 0; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-alt); border-left: 2px solid var(--line); }
.nearby-links a:hover { border-color: var(--primary); background: var(--primary-soft); }
.nearby-links strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-links span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.faq-section { margin-top: 38px; }
.faq-item { padding: 17px 0; border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 6px; font-size: 17px; }
.faq-item p { margin: 0; }
.source-note { margin-top: 24px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 9px; color: var(--muted) !important; background: var(--surface-alt); border-left: 3px solid var(--accent); font-size: 13px; }
.source-note svg { flex: 0 0 auto; margin-top: 2px; }

.region-heading { align-items: center; }
.region-summary { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.region-summary div { padding: 12px 15px; background: #fff; }
.region-summary dt { font-size: 19px; font-weight: 800; }
.region-summary dd { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.region-jump a[aria-current="page"] { color: #fff; background: var(--primary); border-color: var(--primary); }
.region-directory { padding-top: 32px; }
.world-country-directory { padding-top: 26px; }
.world-international { padding-top: 26px; }
.international-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.international-grid > a { min-width: 0; min-height: 68px; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; column-gap: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.international-grid > a:hover { background: var(--surface-alt); }
.international-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.international-grid span { grid-column: 1; color: var(--muted); font-size: 11px; }
.international-grid i { grid-column: 2; grid-row: 1 / span 2; }
.country-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.country-grid > a { min-width: 0; min-height: 58px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.country-grid > a:hover { background: var(--surface-alt); }
.country-grid > a > span { min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.country-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-grid small, .country-grid em { color: var(--muted); font-size: 11px; font-style: normal; white-space: nowrap; }
.world-index-link { width: min(100% - 40px, var(--content)); margin: 22px auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface-alt); border-left: 3px solid var(--accent); }
.world-index-link > div { display: flex; flex-direction: column; gap: 4px; }
.world-index-link .eyebrow { margin: 0; }
.world-index-link .button { flex: 0 0 auto; }
.section-count { color: var(--muted); font-size: 13px; }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.directory-grid > a { min-width: 0; min-height: 72px; padding: 11px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.directory-grid > a:hover { background: var(--surface-alt); }
.city-local-directory { padding-top: 36px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.city-local-directory .section-heading { margin-bottom: 4px; }
.city-local-directory .directory-grid { margin-top: 18px; background: #fff; }
.city-local-directory .directory-item { min-height: 86px; padding: 12px 13px; grid-template-columns: 38px minmax(0, 1fr) auto 18px; gap: 10px; }
.city-local-directory .directory-marker { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 4px; }
.city-local-directory .directory-marker svg { width: 18px; height: 18px; }
.city-local-directory .directory-copy { gap: 5px; }
.city-local-directory .directory-copy > strong { font-size: 15px; }
.city-local-directory .directory-copy small { display: flex; align-items: center; gap: 7px; }
.city-local-directory .directory-type { padding: 2px 5px; border-radius: 3px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.city-local-directory .directory-coordinate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.city-local-directory .directory-population { min-width: 72px; display: flex; align-items: flex-end; flex-direction: column; }
.city-local-directory .directory-population small { font-size: 10px; font-weight: 500; }
.city-local-directory .directory-population strong { color: #334155; font-size: 12px; font-weight: 750; }
.city-local-directory .is-county .directory-marker, .city-local-directory .is-county .directory-type { color: #1d4f91; background: #e8f1fb; }
.city-local-directory .is-township .directory-marker, .city-local-directory .is-township .directory-type { color: #047857; background: #e5f7ef; }
.city-local-directory .is-village .directory-marker, .city-local-directory .is-village .directory-type { color: #9a4d08; background: #fff3df; }
.city-local-directory .is-settlement .directory-marker, .city-local-directory .is-settlement .directory-type { color: #526174; background: #edf1f5; }
.directory-intro { max-width: 760px; margin: -3px 0 0; color: var(--muted); font-size: 14px; }
.directory-grid span { min-width: 0; display: flex; flex-direction: column; }
.directory-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.directory-grid small, .directory-grid em { color: var(--muted); font-size: 11px; font-style: normal; }
.section-action { display: flex; justify-content: center; padding-top: 20px; }
.weather-page-heading { align-items: center; }
.weather-page-heading .button { flex: 0 0 auto; }
.weather-copy { padding-top: 14px; }
.region-copy { width: 100%; }
.prose-wide { width: min(100% - 40px, 860px); margin-inline: auto; }

.places-heading { align-items: center; }
.archive-total { flex: 0 0 auto; min-width: 150px; padding: 13px 16px; display: flex; flex-direction: column; background: var(--surface-alt); border-left: 3px solid var(--accent); }
.archive-total strong { font-size: 23px; line-height: 1.1; }
.archive-total span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.category-nav { padding: 12px max(20px, calc((100% - var(--content)) / 2)); display: flex; gap: 7px; overflow-x: auto; background: var(--surface-alt); border-block: 1px solid var(--line); }
.category-nav a { padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--primary-strong); background: #fff; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.category-nav a span { color: var(--muted); font-size: 11px; }
.category-nav a[aria-current="page"] { color: #fff; background: var(--primary); border-color: var(--primary); }
.category-nav a[aria-current="page"] span { color: #d1fae5; }
.archive-band { padding-top: 30px; }
.landmark-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.landmark-item { min-width: 0; min-height: 76px; padding: 11px 13px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.landmark-item:hover { background: var(--surface-alt); }
.landmark-copy { min-width: 0; display: flex; flex-direction: column; }
.landmark-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.landmark-copy small, .landmark-coordinates { color: var(--muted); font-size: 12px; }
.landmark-coordinates { font-variant-numeric: tabular-nums; }
.pagination { margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 18px; }
.pagination a { min-height: 40px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 5px; color: var(--primary-strong); border: 1px solid var(--line); border-radius: 4px; }
.pagination span { color: var(--muted); font-size: 13px; }
.page-links { margin-top: 12px; display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; }
.page-links a { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.page-links a[aria-current="page"] { color: #fff; background: var(--primary); border-color: var(--primary); }
.archive-copy { width: 100%; }

.empty-panel { min-height: 260px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; border: 1px dashed #b7c1cc; }
.empty-panel svg { width: 42px; height: 42px; margin-bottom: 12px; }
.error-page { min-height: 60vh; padding: 100px 0; text-align: center; }
.error-code { color: var(--primary); font-size: 58px; font-weight: 850; }
.error-page p { color: var(--muted); }

.site-footer { min-height: 108px; padding: 25px max(20px, calc((100% - var(--content)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #c8d1dc; background: #172033; }
.site-footer div { display: flex; flex-direction: column; }
.site-footer span { font-size: 12px; }
.site-footer nav { display: flex; gap: 18px; font-size: 13px; }
.site-footer a:hover { color: #fff; }
.flash { max-width: var(--content); margin: 10px auto; padding: 10px 14px; border-radius: var(--radius); }
.flash-success { color: #065f46; background: #d1fae5; }
.flash-error { color: #991b1b; background: #fee2e2; }
.toast { position: fixed; z-index: 2000; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; color: #fff; background: #172033; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

/* Admin */
.admin-body { background: var(--surface-alt); }
.admin-header { height: 66px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.admin-header nav { display: flex; align-items: center; gap: 18px; }
.admin-header form { display: inline; }
.link-button { padding: 0; color: var(--danger); background: none; border: 0; }
.admin-main { width: min(100% - 40px, 1260px); margin: 0 auto; padding: 32px 0 60px; }
.login-panel { width: min(100%, 430px); margin: 50px auto; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.login-panel h1 { margin-bottom: 8px; }
.login-panel p { color: var(--muted); }
.stack-form { display: grid; gap: 14px; }
.stack-form label, .editor-form label { display: grid; gap: 5px; color: #3c4859; font-size: 13px; font-weight: 700; }
.stack-form input, .editor-form input, .editor-form select, .editor-form textarea { width: 100%; min-height: 42px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #b8c2ce; border-radius: 4px; }
.editor-form textarea { resize: vertical; }
.stack-form input:focus, .editor-form input:focus, .editor-form select:focus, .editor-form textarea:focus { border-color: var(--focus); outline: 3px solid color-mix(in srgb, var(--focus) 14%, transparent); }
.admin-titlebar { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.admin-titlebar h1 { margin: 0; }
.admin-actions { display: flex; gap: 8px; }
.admin-stats { margin-bottom: 24px; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; }
.admin-stats > div, .admin-stats > form { min-height: 84px; padding: 14px; display: flex; flex-direction: column; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-stats strong { font-size: 26px; }
.admin-stats span { color: var(--muted); font-size: 12px; }
.admin-stats form { align-items: center; }
.admin-section { margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-section-heading { min-height: 52px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.admin-section-heading h2 { margin: 0; font-size: 18px; }
.admin-section-heading span { color: var(--muted); font-size: 12px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { color: var(--muted); background: #f8fafb; }
.table-actions { display: flex; gap: 12px; color: var(--primary); }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--primary); font-size: 13px; }
.editor-form { display: grid; gap: 16px; }
.form-section { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.form-section h2 { margin-bottom: 16px; font-size: 17px; }
.form-section > label + label { margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor-form small { color: var(--muted); font-size: 11px; font-weight: 500; }
.form-options { display: flex; align-items: center; gap: 24px; }
.form-options > label { display: flex; align-items: center; gap: 8px; }
.form-options input[type="number"] { width: 100px; }
.form-options input[type="checkbox"] { width: 18px; min-height: 18px; }
.editor-actions { display: flex; gap: 10px; }
.danger-zone { margin-top: 28px; padding-top: 20px; border-top: 1px solid #fecaca; }
.danger-zone button { padding: 9px 12px; color: var(--danger); background: #fff; border: 1px solid #ef9a9a; border-radius: var(--radius); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: auto 1fr; gap: 12px; padding: 0 16px; }
  .brand small { display: none; }
  .main-nav { grid-column: 1 / -1; display: none; }
  .city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-content { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
  .entity-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .weather-current { grid-template-columns: 230px minmax(0, 1fr); }
  .weather-current-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-current-facts > div:nth-child(3), .weather-current-facts > div:nth-child(4) { border-top: 1px solid var(--line); }
  .forecast-grid-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landmark-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 721px) and (max-width: 980px) {
  .site-header { grid-template-columns: auto minmax(0, 1fr); }
  .main-nav { grid-column: auto; display: flex; gap: 0; }
  .main-nav a { min-width: 54px; padding-inline: 7px; }
}

@media (max-width: 720px) {
  :root { --header-height: 108px; }
  .site-header { height: auto; min-height: var(--header-height); padding: 10px 14px; grid-template-columns: 1fr; gap: 8px; position: relative; }
  .brand { width: max-content; }
  .brand small { display: none; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .main-nav { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .main-nav a { min-height: 44px; background: var(--surface-alt); }
  .home-intro, .page-heading, .detail-heading, .breadcrumbs, .content-band, .detail-content, .entity-facts, .error-page { width: min(100% - 28px, var(--content)); }
  .home-intro { min-height: 0; padding: 22px 0 18px; display: block; }
  .home-intro h1, .page-heading h1, .detail-heading h1 { font-size: 29px; }
  .map-toolbar { padding-inline: 8px; }
  .map-actions { flex: 0 0 auto; }
  .live-coordinate { display: none; }
  .map-stage { height: 62vh; min-height: 480px; }
  .coordinate-panel { left: 10px; right: 10px; bottom: 14px; width: auto; display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; align-items: end; }
  .coordinate-panel-title { grid-column: 1 / -1; margin: 0; }
  .coordinate-panel label { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; }
  .coordinate-panel .button { width: 46px; height: 46px; padding: 0; }
  .coordinate-panel .button svg { margin: auto; }
  .coordinate-panel .button { font-size: 0; }
  .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-band { padding-block: 34px; }
  .band-muted { padding-inline: 14px; }
  .place-row { grid-template-columns: 36px minmax(0, 1fr) 18px; }
  .place-meta { display: none; }
  .page-heading { min-height: 0; padding: 28px 0 22px; display: block; }
  .region-row { grid-template-columns: 1fr; gap: 12px; }
  .region-row h2 small { display: inline; margin-left: 8px; }
  .detail-heading { min-height: 0; padding: 22px 0; display: block; }
  .entity-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 18px; }
  .coordinate-readout { margin-top: 18px; width: 100%; justify-content: space-between; }
  .weather-heading-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .weather-current { grid-template-columns: 1fr; }
  .weather-current-main { justify-content: center; }
  .weather-current-facts > div:first-child, .weather-current-facts > div:nth-child(3) { border-left: 0; }
  .weather-forecast-nav { grid-template-columns: 1fr; }
  .forecast-grid-week, .forecast-grid-trend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forecast-day-compact { min-height: 156px; display: flex; text-align: center; }
  .forecast-day-compact header { flex-direction: row; align-items: baseline; }
  .forecast-day-compact > svg { margin: 12px 0 5px; }
  .forecast-day-compact .forecast-temperature { margin-top: 7px; }
  .forecast-day-compact small { margin-top: auto; padding-top: 7px; }
  .detail-content { grid-template-columns: 1fr; padding-block: 34px; }
  .related-panel { order: -1; }
  .region-heading { display: block; }
  .places-heading { display: block; }
  .archive-total { margin-top: 18px; }
  .region-summary { margin-top: 20px; }
  .directory-grid { grid-template-columns: 1fr; }
  .city-local-directory .section-heading { gap: 8px; flex-direction: column; }
  .city-local-directory .directory-item { grid-template-columns: 38px minmax(0, 1fr) auto 18px; }
  .weather-page-heading .button { width: 100%; margin-top: 18px; justify-content: center; }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .international-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-index-link { width: min(100% - 28px, var(--content)); align-items: flex-start; flex-direction: column; }
  .nearby-links { grid-template-columns: 1fr; }
  .landmark-item { grid-template-columns: 34px minmax(0, 1fr) 18px; }
  .landmark-coordinates { display: none; }
  .prose-wide { width: min(100% - 28px, 860px); }
  .result-type { display: none; }
  .site-footer { padding: 24px 14px; align-items: flex-start; flex-direction: column; }
  .site-footer nav { flex-wrap: wrap; }
  .admin-header { padding-inline: 14px; }
  .admin-main { width: min(100% - 24px, 1260px); padding-top: 22px; }
  .admin-titlebar { align-items: flex-start; flex-direction: column; }
  .admin-actions { width: 100%; }
  .admin-actions .button { flex: 1; }
  .form-grid, .three-columns { grid-template-columns: 1fr; }
  .form-options { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .brand small { display: none; }
  .layer-button { padding-inline: 9px; font-size: 13px; }
  .city-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 22px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

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