@charset "UTF-8";
@font-face{font-family:"Roam CJK";font-style:normal;font-weight:400;font-display:swap;src:url("noto-sans-cjk-fallback.woff") format("woff");}
@font-face{font-family:"Roam Chinese";font-style:normal;font-weight:400;font-display:swap;src:url("noto-sans-sc-400.ttf") format("truetype");}
@font-face{font-family:"Roam Chinese";font-style:normal;font-weight:500;font-display:swap;src:url("noto-sans-sc-500.ttf") format("truetype");}
@font-face{font-family:"Roam Chinese";font-style:normal;font-weight:600;font-display:swap;src:url("noto-sans-sc-600.ttf") format("truetype");}
:root{color-scheme:light;--ink:#243641;--muted:#647681;--line:#d7dfe4;--paper:#f9fbfc;--water:#e3ebf0;--land:#d6dfe5;--accent:#bf6047;--shadow:0 10px 40px #273f5010,0 1px 3px #273f5008;font-family:Inter,"Segoe UI","Roam Chinese","Roam CJK","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--water);font-size:16px;-webkit-font-smoothing:antialiased}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.3}button:focus-visible,a:focus-visible,select:focus-visible,[role=button]:focus-visible{outline:2px solid #426b83;outline-offset:4px}button{touch-action:manipulation}a{color:inherit}svg.lucide{width:18px;height:18px;stroke-width:1.65;flex:none}[hidden]{display:none!important}.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}
.app-header{height:48px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:10;background:#f9fbfc;border-bottom:1px solid #d6e0e6}.wordmark{display:flex;gap:12px;align-items:center;text-decoration:none;font-size:23px;font-weight:650;letter-spacing:.08em;line-height:1}.brand-icon{width:36px;height:36px;display:grid;place-items:center;background:var(--ink);color:var(--paper);border-radius:50%}.brand-icon .lucide{width:24px;height:24px;stroke-width:1.3}.brand-caption{margin-left:17px;font-size:14px;font-weight:400;letter-spacing:.015em;color:#667784;border-left:1px solid var(--line);padding-left:17px}.about-button{display:flex;align-items:center;gap:8px;font-size:14px;border:0;background:none;padding:12px 0 12px 12px;color:#546977}.about-button:hover{color:var(--ink)}
.map-workspace{position:relative;height:calc(100vh - 48px);height:calc(100dvh - 48px);min-height:520px;overflow:hidden;background:var(--water)}.map-svg{width:100%;height:100%;display:block;cursor:grab;touch-action:none}.map-svg:active{cursor:grabbing}.map-country{fill:var(--land);stroke:#f8fbfd;stroke-width:.65;vector-effect:non-scaling-stroke}.map-region{stroke:#fbfcfd;stroke-width:.52;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .45s ease}.map-region.is-selected,.map-region.is-hovered{stroke:var(--ink);stroke-width:1.5}.map-region:focus-visible{stroke:var(--ink);stroke-width:2.5;outline:none}.map-graticule{fill:none;stroke:#bdccd6;stroke-width:.65;vector-effect:non-scaling-stroke;opacity:.38}.country-label{fill:#667a87;font-size:12px;font-weight:450;letter-spacing:.1em;text-anchor:middle;paint-order:stroke;stroke:#f3f6f8;stroke-opacity:.66;stroke-width:2;pointer-events:none}.selected-marker{pointer-events:none}.selected-marker circle{fill:#263b48;stroke:#fff;stroke-width:2}.selected-marker text{fill:#263b48;font-size:13px;font-weight:550;paint-order:stroke;stroke:#f6f8fa;stroke-width:3px;stroke-linejoin:round}
.map-caption{position:absolute;left:34px;top:28px;pointer-events:none;max-width:290px}.eyebrow{font-size:12px;font-weight:550;letter-spacing:.14em;color:#728591;line-height:1.5}.map-caption h1{font-size:27px;letter-spacing:-.045em;font-weight:550;margin:10px 0 16px;line-height:1.3}.coverage-note{display:flex;align-items:center;gap:8px;color:#546b7a;font-size:13px;line-height:1.5}.coverage-dot{width:5px;height:5px;border-radius:50%;background:#66899f}.period-note{font-size:12px;color:#768a98;margin:8px 0 0;line-height:1.6}.map-tooltip{position:absolute;pointer-events:none;z-index:12;background:#263a48;color:#fbfdff;padding:11px 14px;border-radius:8px;box-shadow:var(--shadow);max-width:280px;font-size:13px;line-height:1.7}.map-tooltip strong{display:block;font-weight:550;font-size:14px;white-space:normal}.map-tooltip small{color:#c2d3de;font-size:12px}.map-tooltip .tooltip-value{padding-top:4px;display:block;font-variant-numeric:tabular-nums}.map-controls{position:absolute;right:28px;bottom:174px;display:flex;flex-direction:column;padding:4px;border:1px solid #d8e1e8;border-radius:10px;background:#fbfcfdee;box-shadow:var(--shadow)}.icon-button{display:grid;place-items:center;width:36px;height:36px;border:0;background:none;border-radius:6px;transition:background .2s}.icon-button:hover{background:#e9eff3}.map-controls>span{height:1px;background:#e1e7eb;width:24px;margin:3px auto}.map-hint{position:absolute;bottom:172px;left:50%;transform:translateX(-50%);display:flex;gap:7px;align-items:center;font-size:12px;color:#708797;pointer-events:none;white-space:nowrap;transition:opacity .3s}.map-hint .lucide{width:14px;height:14px}.map-hint.is-hidden{opacity:0}
.map-legend{position:absolute;left:34px;bottom:171px;width:232px;pointer-events:none;background:#f6f9fbd9;padding:14px 16px;border-radius:8px;border:1px solid #dce5ea;backdrop-filter:blur(12px)}.legend-heading{display:flex;justify-content:space-between;font-size:12px;color:#4b6272;margin-bottom:12px;align-items:baseline}.legend-unit{color:#8596a1;font-size:12px}.legend-colors{display:grid;grid-template-columns:repeat(5,1fr);height:6px;gap:2px;border-radius:2px;overflow:hidden}.legend-colors span{background:var(--swatch)}.legend-labels{display:flex;justify-content:space-between;font-size:12px;color:#6c8190;font-variant-numeric:tabular-nums;margin-top:7px;gap:3px}.legend-caption{display:flex;justify-content:space-between;font-size:12px;color:#728896;margin-top:8px}.no-data-key{display:flex;gap:7px;align-items:center;font-size:12px;color:#8395a1;margin-top:13px}.no-data-key>span{width:9px;height:9px;background:#d6dfe5;border:1px solid #c9d3db}
.timeline{position:absolute;bottom:38px;left:32px;right:32px;max-width:1100px;margin:0 auto;display:flex;align-items:center;gap:25px;padding:18px 25px;background:#fdfefefa;border:1px solid #d5e0e6;box-shadow:var(--shadow);border-radius:12px;z-index:8}.timeline-date{display:flex;align-items:center;gap:16px;padding-right:24px;border-right:1px solid #e4e9ee}.year-select-wrap{position:relative;display:flex;align-items:center;color:#768792;align-self:center}.year-select-wrap select{border:0;appearance:none;background:none;color:#5c7180;font-size:14px;cursor:pointer;padding:8px 18px 8px 0;font-variant-numeric:tabular-nums}.year-select-wrap .lucide{position:absolute;right:0;width:12px;height:12px;pointer-events:none}.selected-month{display:flex;align-items:baseline;gap:4px;min-width:76px}.selected-month>span:first-child{font-size:39px;font-weight:450;letter-spacing:-.08em;line-height:1.2;font-variant-numeric:tabular-nums}.selected-month>span:last-child{font-size:13px;color:#6b7d89}.timeline-main{flex:1;min-width:0}.timeline-heading{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#82939e;margin-bottom:9px}.timeline-historical{color:#93a0a9;font-size:12px}.month-buttons{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:5px}.month-button{font-size:14px;background:none;border:0;padding:9px 0;border-radius:6px;position:relative;transition:background .2s,color .2s;font-variant-numeric:tabular-nums;min-width:24px}.month-button:hover{background:#eff3f6}.month-button[aria-pressed=true]{color:#fff;background:#2b3e4a}.play-button{border:1px solid #dce4e9;border-radius:50%;background:#f6f9fb;width:41px;height:41px;display:grid;place-items:center;flex:none;margin-top:13px}.play-button:hover{background:#e8eff4}.play-button .lucide{width:15px;height:15px}.map-footer{position:absolute;bottom:13px;left:34px;right:34px;display:flex;justify-content:space-between;gap:16px;font-size:12px;color:#8a9aa5;pointer-events:none}.empty-state{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);padding:16px 22px;background:#fff;border-radius:8px;box-shadow:var(--shadow);font-size:14px}
.about-dialog{border:1px solid #dce4e9;padding:30px 34px 26px;border-radius:16px;box-shadow:0 24px 120px #23344130;max-width:510px;width:calc(100% - 32px);max-height:calc(100dvh - 48px);color:var(--ink);background:#fafcfd;overflow:auto}.about-dialog::backdrop{background:#21384445;backdrop-filter:blur(5px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.about-dialog h2{font-size:27px;font-weight:550;letter-spacing:-.03em;margin:0 0 16px}.about-dialog p{font-size:16px;line-height:1.85;color:#647b8a;margin:0 0 20px}.about-dialog dl{margin:0}.about-dialog dl>div{padding:14px 0;border-top:1px solid #e3e9ee;display:grid;grid-template-columns:74px 1fr;gap:14px}.about-dialog dt{font-size:13px;color:#3e596a}.about-dialog dd{margin:0;font-size:14px;line-height:1.75;color:#738795}.dialog-links{margin-top:18px;display:grid;gap:10px}.dialog-links a{display:flex;align-items:center;justify-content:space-between;text-decoration:none;font-size:13px;color:#365b73;padding:12px 0;border-bottom:1px solid #e4ebef}.dialog-links .lucide{width:14px;height:14px}.about-dialog .dialog-footnote{margin:20px 0 0;font-size:12px;color:#91a1ac}.noscript{position:fixed;left:20%;top:40%;right:20%;padding:20px;background:#fff}

@media(min-width:1600px){.app-header{padding-inline:48px}.map-caption{left:48px;top:40px}.map-legend{left:48px}.map-controls{right:40px}.timeline{bottom:44px}.map-footer{left:48px;right:48px;bottom:15px}}
@media(max-width:1100px){.brand-caption{display:none}.map-caption{left:24px;top:24px}.map-caption h1{font-size:24px}.map-caption .eyebrow{font-size:12px}.map-legend{left:24px;width:212px;padding:12px}.timeline{left:20px;right:20px;gap:16px;padding:16px 18px}.timeline-date{padding-right:16px;gap:10px}.selected-month{min-width:64px}.month-buttons{gap:2px}.map-controls{right:20px}.map-hint{display:none}}
@media(max-width:700px){.app-header{height:66px;padding:0 18px}.wordmark{font-size:19px;gap:9px}.brand-icon{width:29px;height:29px}.brand-icon .lucide{width:20px;height:20px}.about-button{padding:8px;font-size:0}.about-button>span{display:none}.about-button .lucide{width:19px;height:19px}.map-workspace{height:calc(100vh - 66px);height:calc(100dvh - 66px);min-height:520px}.map-caption{left:20px;top:20px}.map-caption h1{font-size:21px;margin:6px 0 8px}.map-caption .eyebrow{display:none}.coverage-note{font-size:12px;gap:6px}.period-note{font-size:12px;margin-top:5px}.timeline{left:12px;right:12px;bottom:29px;border-radius:11px;padding:12px 13px;gap:12px;max-width:570px}.timeline-date{flex-direction:column;gap:0;padding-right:12px;align-items:flex-start}.year-select-wrap select{font-size:12px;padding-block:4px}.selected-month{min-width:52px}.selected-month>span:first-child{font-size:33px}.selected-month>span:last-child{font-size:12px}.timeline-heading{margin-bottom:5px;font-size:12px}.timeline-historical{font-size:12px}.month-buttons{grid-template-columns:repeat(6,1fr);gap:3px}.month-button{font-size:12px;padding:8px 0;min-height:32px}.play-button{width:32px;height:32px;margin-top:14px}.map-controls{right:14px;bottom:168px}.map-controls .icon-button{width:32px;height:32px}.map-legend{left:16px;bottom:168px;width:192px;padding:10px 11px;border-radius:7px;background:#f6f9fbe8}.legend-heading{font-size:12px;margin-bottom:9px}.legend-labels{font-size:12px}.legend-caption{display:none}.no-data-key{margin-top:10px;font-size:12px}.map-footer{left:16px;right:16px;bottom:9px;font-size:12px}.map-footer>span:last-child{display:none}.chart-heading{margin-bottom:12px}.month-chart{height:48px}.about-dialog{padding:22px 24px;border-radius:12px}.about-dialog h2{font-size:24px}}
@media(pointer:coarse){.icon-button{min-width:44px;min-height:44px}.month-button{min-height:38px}.map-controls .icon-button{width:40px;height:40px;min-width:40px;min-height:40px}.play-button{min-width:38px;min-height:38px}.chart-month:after{inset:-5px -2px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.map-outline{fill:none;stroke:var(--ink);stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:none}

/* Monthly controls and a quiet, unboxed selection readout. */
.metric-picker{pointer-events:auto;display:inline-flex;align-items:center;position:relative;margin:-3px 0 13px;border-bottom:1px solid #adbec8}
.metric-picker select{appearance:none;border:0;background:transparent;padding:6px 25px 7px 0;color:#38576a;font-size:14px;cursor:pointer}
.metric-picker .lucide{position:absolute;right:0;width:13px;height:13px;pointer-events:none}
.map-caption{max-width:360px}.map-caption h1{margin-bottom:12px}
.map-island{stroke:#fff;stroke-width:1.1}
.no-data-key>span:first-child{width:9px;height:9px;flex:none;background:#d6dfe5;border:1px solid #c9d3db}
.no-data-key>span:last-child{width:auto;height:auto;background:none;border:0}
.map-footer{font-size:11px}.map-region.is-selected{stroke-width:1.6}.map-region:focus{outline:none}
@media(min-width:1600px){}
@media(max-width:1100px){.map-footer>span:nth-child(2){display:none}}
@media(max-width:700px){.map-caption{max-width:calc(100% - 40px)}.metric-picker{margin:0 0 8px}.metric-picker select{font-size:13px;padding-block:4px}.map-footer>span:not(:first-child){display:none}.timeline-historical{font-size:10px}.map-legend{width:210px}}

.park-regions .map-region{stroke-width:1.1}.park-regions .map-region.is-selected{stroke-width:2.3}
@media(max-width:700px){.app-header{padding-inline:12px}.wordmark{font-size:17px;gap:6px}.brand-icon{width:25px;height:25px}.map-caption h1{max-width:190px}}
@media(max-width:360px){.timeline{gap:8px;padding-inline:10px}.timeline-historical{display:none}}

/* Shared floating menus; restrained surfaces, explicit selected state. */

.map-caption{z-index:9}.metric-picker{border-bottom:0}.roam-select{position:relative;pointer-events:auto}
.select-trigger{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:40px;padding:8px 11px;border:1px solid #c5d2db;background:#f9fbfce8;color:#38576a;font-size:14px;line-height:1.4;border-radius:8px;transition:background .15s,border-color .15s;white-space:nowrap}
.select-trigger:hover,.select-trigger[aria-expanded=true]{background:#fff;border-color:#8ea5b4}.select-trigger:focus-visible{outline:2px solid #426b83;outline-offset:3px}
.select-chevron{width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:-4px 2px 0 0;transition:transform .15s}.select-trigger[aria-expanded=true] .select-chevron{transform:rotate(225deg);margin-top:3px}
.select-menu{position:absolute;left:0;top:calc(100% + 7px);z-index:30;width:max-content;min-width:100%;max-width:min(310px,calc(100vw - 40px));max-height:min(390px,48dvh);overflow-y:auto;background:#fafcfd;border:1px solid #d3dee5;border-radius:11px;padding:6px;box-shadow:0 16px 48px #24364121,0 2px 8px #2436410a;scrollbar-width:thin;scrollbar-color:#b1c2cc transparent}
.select-option{position:relative;cursor:pointer;padding:10px 35px 10px 11px;border-radius:6px;line-height:1.4;font-size:14px;white-space:normal;color:#5b7180}.select-option.is-active{background:#eaf0f4;color:#243641}.select-option[aria-selected=true]{color:#243641;font-weight:500;background:#e5edf2}.select-option[aria-selected=true]:after{content:'';position:absolute;right:13px;top:15px;width:5px;height:9px;border:solid #42677c;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.opens-up .select-menu{top:auto;bottom:calc(100% + 9px)}.year-select-wrap .select-trigger{padding:7px 8px;gap:12px;min-height:36px;border-color:transparent;background:transparent;font-variant-numeric:tabular-nums}.year-select-wrap .select-trigger:hover{background:#eaf0f3}.year-select-wrap .select-menu{min-width:104px}.metric-picker>.lucide,.year-select-wrap>.lucide{display:none}
@media(max-width:700px){.select-trigger{font-size:14px;min-height:38px}.select-option{min-height:40px}.year-select-wrap .select-trigger{padding:5px 4px;gap:10px}.map-caption{max-width:calc(100% - 40px)}.select-menu{max-height:38dvh}}

/* Availability and persistent, responsive place details. */
.select-option[aria-disabled=true]{color:#a0adb6;cursor:not-allowed;background:transparent;opacity:.62}
.select-option[aria-disabled=true]:hover{background:transparent;color:#a0adb6}
.select-option[aria-disabled=true]::after{content:"无数据";position:static;width:auto;height:auto;border:0;transform:none;font-size:10px;margin-left:auto;padding-left:14px;color:#9caab3;white-space:nowrap}
.select-option{display:flex;align-items:center;gap:8px}
.month-button:disabled{opacity:1;color:#acb8c1;background:transparent}
.month-button:disabled:hover{background:transparent}
.timeline-heading{gap:12px}.timeline-heading>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.timeline-tag{flex:none}
.selection-panel{position:absolute;right:28px;top:28px;width:304px;max-height:calc(100% - 355px);overflow:auto;overscroll-behavior:contain;padding:18px 20px 20px;border:1px solid #d4dfe6;border-radius:12px;background:#fafcfcf7;box-shadow:0 12px 44px #273f5014;z-index:7;scrollbar-width:thin;scrollbar-color:#c1cfd7 transparent}
.selection-header{display:flex;align-items:center;justify-content:space-between;margin:-8px -8px 3px 0}.selection-header .eyebrow{font-size:10px;letter-spacing:.12em}.selection-header .icon-button{width:32px;height:32px}
.selection-panel h2{font-size:23px;font-weight:550;line-height:1.4;margin:5px 0 7px;overflow-wrap:anywhere}
#selection-period{font-size:12px;color:#758692;line-height:1.6;margin:0 0 13px}
#selection-value{display:block;font-size:26px;letter-spacing:-.035em;font-weight:550;font-variant-numeric:tabular-nums;line-height:1.5}
#selection-scope{font-size:11px;line-height:1.85;color:#7b8d99;margin:15px 0 9px;overflow-wrap:anywhere}
#selection-source{font-size:12px;color:#43657b;text-decoration:none;line-height:1.8}#selection-source:hover{text-decoration:underline}
.selection-parent{border:0;background:none;padding:4px 0;font-size:12px;line-height:1.6;color:#43657b;text-align:left}
.selection-range{font-size:11px;color:#8597a3;margin:12px 0 0;line-height:1.6}
.selection-chart{height:77px;display:grid;grid-template-columns:repeat(12,1fr);gap:5px;margin-top:15px;align-items:end}
.chart-month{padding:0;border:0;background:none;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:6px;height:77px}.chart-month>span{display:block;border-radius:3px 3px 0 0;background:#b2c9d4}.chart-month[aria-pressed=true]>span{background:#3f657a}.chart-month small{font-family:inherit;font-size:10px;color:#8397a2}.chart-month:disabled{opacity:1}.chart-month:disabled>span{background:#dfe6eb}.chart-month:disabled small{color:#b4c1c8}
#selection-children-heading{font-size:12px;font-weight:500;margin:18px 0 7px;color:#647f90}.selection-children{max-height:208px;overflow:auto;scrollbar-width:thin}.selection-children button{display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;width:100%;padding:9px 2px;border:0;border-top:1px solid #e7edf0;background:none;font-size:12px;line-height:1.6}.selection-children button:hover{background:#eef3f6}.selection-children button>span:first-child{overflow-wrap:anywhere}.selection-children button>span:last-child{white-space:nowrap;color:#68818f;font-size:11px;font-variant-numeric:tabular-nums}
@media(max-width:1100px){.selection-panel{right:20px;width:280px}}


.selection-notes{margin-top:7px}.selection-notes summary{font-size:11px;color:#7b8d99;cursor:pointer;line-height:1.8}.selection-notes #selection-scope{margin-top:8px}#selection-source{display:inline-block;margin-top:5px}



/* The map has its own measured viewport; controls never consume its height twice. */
.map-stage{position:absolute;inset:0;min-width:0;min-height:0}
.selection-actions{display:flex;align-items:center;gap:4px}
.details-toggle{display:none;border:0;background:none;color:#43657b;font-size:12px;padding:0 10px}
@media(pointer:coarse){
  .icon-button,.selection-panel .icon-button,.map-controls .icon-button,.play-button{min-width:44px;min-height:44px}
  .select-trigger,.year-select-wrap .select-trigger,.select-option,.selection-parent,.selection-children button,.selection-notes summary{min-height:44px}
  .month-button{min-height:44px}
}

/* Phones and portrait tablets: map, expandable detail, dates, then attribution. */
@media(max-width:900px), (max-width:1100px) and (max-height:540px){
  :root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--header-height:44px}
  body{overflow-x:hidden}
  .atlas-app{min-height:100vh;min-height:100dvh;padding:0 var(--safe-right) var(--safe-bottom) var(--safe-left)}
  .app-header{height:calc(var(--header-height) + var(--safe-top));padding:var(--safe-top) 16px 0;gap:16px}
  .wordmark{font-size:18px;gap:8px}.brand-icon{width:28px;height:28px}.brand-icon .lucide{width:20px;height:20px}
  .brand-caption{display:none}.about-button{font-size:13px;min-height:44px;min-width:44px;padding:8px;gap:6px}.about-button>span{display:inline}
  .map-workspace{height:calc(100vh - var(--header-height) - var(--safe-top) - var(--safe-bottom));height:calc(100dvh - var(--header-height) - var(--safe-top) - var(--safe-bottom));min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(200px,1fr) auto auto auto;gap:6px;overflow:visible;padding:0 12px}
  .map-stage{position:relative;inset:auto;grid-row:1;grid-column:1;margin:0 -12px;isolation:isolate;z-index:9}
  .map-svg{position:absolute;inset:0}
  .map-caption{left:16px;right:16px;top:12px;max-width:none}
  .map-caption h1,.map-caption .eyebrow,.period-note{display:none}
  .metric-picker{margin:0 0 6px;max-width:100%}.metric-picker .roam-select{max-width:100%}
  .select-trigger{min-height:44px;font-size:14px;max-width:100%;gap:16px}.select-trigger>span:first-child{overflow:hidden;text-overflow:ellipsis}.select-chevron{flex:none}
  .select-option{min-height:44px}.select-menu{max-width:calc(100vw - 40px - var(--safe-left) - var(--safe-right));max-height:45vh;max-height:45dvh;overscroll-behavior:contain;touch-action:pan-y}
  .coverage-note{font-size:11px;gap:6px;line-height:1.5;max-width:100%}.coverage-note>span:last-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .map-controls,.has-selection .map-controls{right:12px;bottom:90px;padding:2px;border-radius:9px}.map-controls .icon-button{width:44px;height:44px}.map-controls>span{margin:0 auto}
  .map-legend,.has-selection .map-legend{display:block;left:16px;right:16px;bottom:8px;width:auto;max-width:360px;padding:8px 10px;border-radius:8px}
  .legend-heading{font-size:10px;margin:0 0 5px}.legend-unit{font-size:10px}.legend-colors{height:5px}.legend-labels{font-size:10px;margin-top:4px}.legend-caption{display:none}.no-data-key{display:flex;font-size:10px;margin-top:5px;gap:5px}
  .map-hint{display:none}.empty-state{max-width:calc(100% - 90px);font-size:13px;padding:10px 12px}
  .selection-panel{position:relative;inset:auto;grid-row:2;grid-column:1;width:auto;max-height:none;padding:0 12px 10px;overflow:visible;border-radius:12px;z-index:7;margin:0}
  .selection-header{margin:0;min-height:44px}.selection-header .eyebrow{font-size:10px}.selection-panel .icon-button{width:44px;height:44px;min-height:44px;min-width:44px;margin-right:-8px}
  .details-toggle{display:block;min-height:44px}.selection-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 12px}
  .selection-panel h2{font-size:18px;line-height:1.4;margin:0;min-width:0}
  #selection-value{font-size:20px;line-height:1.4;grid-column:2;grid-row:1;max-width:100%;overflow-wrap:anywhere;text-align:right}
  #selection-period{font-size:11px;grid-column:1/-1;grid-row:2;margin:2px 0 0;line-height:1.5;overflow-wrap:anywhere}
  .selection-parent{padding:4px 0;min-height:44px;max-width:100%}
  .selection-panel:not(.is-expanded) #selection-body{display:none}
  #selection-body{max-height:min(35vh,280px);max-height:min(35dvh,280px);overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding-top:8px;border-top:1px solid #e7edf0;margin-top:10px}
  #selection-source{font-size:12px;min-height:44px;display:inline-flex;align-items:center;margin:0;overflow-wrap:anywhere}
  .selection-notes{margin:0}.selection-notes summary{min-height:44px;line-height:44px;font-size:12px}.selection-notes #selection-scope{font-size:12px;line-height:1.8;margin:0 0 10px}
  .selection-chart{display:grid;height:70px;gap:3px;margin-top:6px}.chart-month{height:70px}
  .selection-range{font-size:11px;margin-top:8px}#selection-children-heading{margin-top:14px}
  .selection-children{max-height:none;overflow:visible}.selection-children button{min-height:44px;font-size:13px}.selection-children button>span:last-child{font-size:12px}
  .timeline{position:relative;inset:auto;grid-row:3;grid-column:1;max-width:none;width:100%;margin:0;display:grid;grid-template-columns:minmax(0,1fr) 44px;padding:4px 10px;gap:2px 8px;border-radius:12px}
  .timeline-date{grid-column:1;grid-row:1;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;border:0;padding:0}
  .year-select-wrap .select-trigger{min-height:44px;font-size:13px;padding:5px 6px;gap:10px}.selected-month{min-width:0;gap:3px}.selected-month>span:first-child{font-size:26px}.selected-month>span:last-child{font-size:12px}
  .timeline-main{grid-column:1/-1;grid-row:2}.timeline-heading{display:none}.month-buttons{grid-template-columns:repeat(6,minmax(0,1fr));gap:2px 3px}
  .month-button{min-height:44px;font-size:13px;padding:8px 0}
  .play-button{grid-column:2;grid-row:1;width:44px;height:44px;min-width:44px;min-height:44px;margin:0}
  .map-footer{position:relative;inset:auto;grid-row:4;grid-column:1;min-height:16px;padding:0 4px 4px;font-size:10px;gap:8px}.map-footer>span:not(:first-child){display:none}
  .about-dialog{width:calc(100% - 32px - var(--safe-left) - var(--safe-right));max-height:calc(100vh - 32px - var(--safe-top) - var(--safe-bottom));max-height:calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));padding:18px 20px;border-radius:12px;overscroll-behavior:contain}.about-dialog p{font-size:14px}.about-dialog dl>div{grid-template-columns:64px minmax(0,1fr);gap:10px}.about-dialog dd{font-size:13px;overflow-wrap:anywhere}
}
@media(max-width:360px){
  .selection-summary{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}
  #selection-value{font-size:18px}.about-button>span{display:none}
}
/* Landscape phones use a side detail and one row of dates. */
@media(min-width:501px) and (max-width:1100px) and (max-height:540px) and (orientation:landscape){
  :root{--header-height:44px}
  .app-header{padding-inline:12px}.wordmark{font-size:16px}.brand-icon{width:25px;height:25px}
  .map-workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(140px,1fr) auto auto;min-height:0;gap:4px;padding:0 12px}
  .map-workspace.has-selection{grid-template-columns:minmax(0,1fr) minmax(224px,32%);column-gap:12px}
  .map-stage{grid-column:1;grid-row:1;margin:0;min-height:0}
  .map-caption{top:4px;left:0;right:0}.coverage-note{font-size:10px}.metric-picker{margin-bottom:2px}.map-controls,.has-selection .map-controls{bottom:58px;right:0;flex-direction:row}.map-controls>span{display:none}
  .map-legend,.has-selection .map-legend{left:0;right:0;bottom:2px;max-width:310px;padding:6px 8px}.legend-heading{display:none}
  .selection-panel{grid-column:2;grid-row:1;align-self:stretch;overflow:auto;min-height:0;padding:0 10px 8px;max-height:100%}
  .selection-summary{display:block}.selection-panel h2{font-size:17px}#selection-value{font-size:20px;text-align:left;margin-top:3px}#selection-period{font-size:10px;margin-top:4px}
  .selection-panel .selection-header{position:sticky;top:0;background:#fafcfc;z-index:2}.selection-actions .details-toggle{display:none}.selection-panel:not(.is-expanded) #selection-body{display:block}#selection-body{max-height:none;overflow:visible}
  .timeline{grid-row:2;grid-column:1/-1;grid-template-columns:auto minmax(0,1fr) 44px;align-items:center;gap:8px;padding:4px 8px}
  .timeline-date{grid-column:1;grid-row:1;gap:4px}.timeline-main{grid-column:2;grid-row:1}.month-buttons{grid-template-columns:repeat(12,minmax(0,1fr));gap:1px}.month-button{min-width:0;font-size:12px}.play-button{grid-column:3}.selected-month{display:none}
  .map-footer{grid-row:3;grid-column:1/-1;min-height:12px;padding-bottom:0;font-size:9px}
}

@media(min-width:501px) and (max-width:720px) and (max-height:540px) and (orientation:landscape){
  .map-workspace.has-selection{grid-template-columns:minmax(0,1fr) 208px;column-gap:8px}
  .month-buttons{grid-template-columns:repeat(6,minmax(0,1fr))}
  .map-caption{top:2px}.coverage-note{display:none}
  .map-controls,.has-selection .map-controls{top:2px;bottom:auto;right:0}.metric-picker{max-width:calc(100% - 144px)}.map-legend,.has-selection .map-legend{padding:5px 6px}.legend-labels{font-size:9px}.no-data-key{font-size:9px}
}

/* Compact mobile map chrome; menus rise above sibling stacking contexts. */
.timeline:has(.select-trigger[aria-expanded=true]){z-index:20}
@media(max-width:900px), (max-width:1100px) and (max-height:540px){
  .map-controls,.has-selection .map-controls{display:none}
  .map-legend,.has-selection .map-legend{left:16px;right:auto;bottom:8px;width:208px;max-width:calc(100% - 32px);padding:7px 9px;border:0;border-radius:6px;box-shadow:none}
  .legend-heading{display:flex;font-size:10px;margin-bottom:4px}
  .legend-colors{height:4px}.legend-labels{font-size:10px;margin-top:3px}
  .no-data-key{font-size:10px;margin-top:4px;line-height:1.4}
  .map-stage.is-short .map-caption{right:16px;max-width:none}
  .metric-picker,.map-stage.is-short .metric-picker{max-width:100%}
  .map-stage.is-short .coverage-note{display:none}
}
@media(max-width:500px), (max-width:900px) and (orientation:portrait){
  .timeline{grid-template-columns:66px minmax(0,1fr);gap:8px;padding:6px 8px}
  .timeline-date{grid-column:1;grid-row:1;flex-direction:column;align-items:flex-start;gap:0}
  .timeline-main{grid-column:2;grid-row:1}
  .selected-month{padding-left:6px}
  .play-button{display:none}
}

/* RoamWhen: a narrow brand bar leaves the map as the primary workspace. */
.wordmark{font-size:20px;letter-spacing:-.035em;gap:8px}.brand-icon{width:26px;height:26px}.brand-icon .lucide{width:19px;height:19px}.brand-caption{font-size:12px;margin-left:12px;padding-left:12px;letter-spacing:0}
.about-button{min-height:44px;font-size:12px;padding:8px;transition:color .15s}
.map-caption{top:16px}.map-caption h1,.map-caption>.eyebrow{display:none}.metric-picker{margin:0 0 6px}.period-note{margin-top:4px}
@media(min-width:901px) and (min-height:541px){.app-header{height:48px}.map-workspace{height:calc(100vh - 48px);height:calc(100dvh - 48px)}}
@media(max-width:900px), (max-width:1100px) and (max-height:540px){.wordmark{font-size:18px}.app-header{gap:8px}.map-caption{top:8px}}
