:root {
  color-scheme: dark;
  --bg: #101d22;
  --paper: #edf0e1;
  --muted: #b4c6be;
  --gold: #e7c17e;
  --line: #acd0bd33;
  --panel: #17292d;
  --toolbar: #1b3034;
  --raised: #233b3e;
  --hover: #2a4647;
  --active: #e3e8cb;
  --active-ink: #193638;
  --stage: radial-gradient(ellipse at 48% 42%, #233f45, #12252c 62%, #0b1a21);
  --ambient: #213c3d;
  --hair: #76958a;
  --ink-primary: var(--muted);
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Noto Serif CJK SC", SimSun, Georgia, serif;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--paper);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edece2;
  --paper: #1d3737;
  --muted: #48615c;
  --gold: #775322;
  --line: #234c4033;
  --panel: #f8f7ee;
  --toolbar: #f0f0e5;
  --raised: #e6ebe0;
  --hover: #dee7da;
  --active: #204c47;
  --active-ink: #f9f6e9;
  --stage: radial-gradient(ellipse at 48% 40%, #e2ede3, #cddfd5 70%, #c2d5cd);
  --ambient: #d4e0d2;
  --hair: #496a5f;
}
* { box-sizing: border-box; }
body { margin: 0; display: flow-root; background: radial-gradient(ellipse at 22% 3%, var(--ambient), transparent 54rem), var(--bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .38; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.place-panel :focus-visible { scroll-margin-block-start: 6px; }
.map-trail :focus-visible { outline-offset: -1px; }
.stage:has(#globe:focus-visible)::after, .quiz-stage:has(canvas:focus-visible)::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid #f8f7ee;
  box-shadow: inset 0 0 0 2px #102329, 0 0 0 2px #102329;
  pointer-events: none;
  z-index: 1;
}
#globe:focus-visible, #quiz-globe:focus-visible { outline: none; }

.atlas input[type="range"] {
  --range-thumb: var(--gold);
  appearance: none;
  min-height: 28px;
  background: transparent;
  cursor: pointer;
}
.atlas input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 3px;
  background: var(--hair);
}
.atlas input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--range-thumb);
  box-shadow: 0 0 0 1px var(--range-thumb);
}
.atlas input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 3px;
  background: var(--hair);
}
.atlas input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--range-thumb);
  box-shadow: 0 0 0 1px var(--range-thumb);
}
a { color: inherit; }
[hidden] { display: none !important; }
.wonder-site-header { max-width: 1370px; color: var(--muted); margin-top: 15px; min-height: 54px; padding: 0 0 9px; }
.wonder-site-header .wonder-brand:hover { background: var(--hover); }
.header-actions { display: flex; align-items: center; gap: clamp(11px, 2vw, 27px); }
.header-actions > a { font-size: .81rem; text-decoration: none; white-space: nowrap; }
.header-actions > a:hover { color: var(--paper); }
.theme-toggle { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--paper); font-size: 1.1rem; line-height: 1; }
.theme-toggle:hover { background: var(--hover); }
.atlas { width: min(1370px, calc(100% - 64px)); margin: auto; }
.intro { display: flex; justify-content: space-between; gap: 24px; align-items: end; padding: 25px 0 20px; }
.kicker { margin: 0; color: var(--gold); font: .72rem/1.5 Georgia, var(--serif); letter-spacing: .15em; }
h1, h2, h3 { font-family: var(--serif); margin: 0; }
h1 { font-size: clamp(3rem, 5vw, 4.9rem); line-height: 1.06; letter-spacing: -.055em; margin-top: 5px; }
.intro-copy { max-width: 22em; margin: 0 1px 4px 0; color: var(--muted); font-size: .94rem; line-height: 1.65; text-wrap: pretty; }
.field { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 13px 35px #09171e13; scroll-margin-top: 14px; }
.field-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--toolbar); border-radius: 14px 14px 0 0; }
.layers { display: flex; align-items: center; gap: 5px; }
.layers button, .search-trigger { padding: 8px 15px; min-height: 42px; border: 1px solid transparent; color: var(--muted); border-radius: 7px; background: transparent; font-size: .84rem; white-space: nowrap; }
.layers button:hover, .search-trigger:hover { color: var(--paper); background: var(--hover); }
.layers button[aria-pressed="true"] { background: var(--active); color: var(--active-ink); font-weight: 700; }
.search-trigger { min-width: 146px; border-color: var(--line); background: var(--panel); display: flex; align-items: center; justify-content: flex-start; gap: 10px; }
kbd { display: inline-grid; place-items: center; min-width: 18px; min-height: 18px; margin-inline-start: auto; padding: 0 3px; border: 1px solid var(--line); border-radius: 4px; font: .69rem/1 ui-monospace, monospace; }
.magnifier { display: inline-block; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; margin-right: 3px; }
.magnifier::after { content: ""; position: absolute; right: -4px; bottom: -2px; width: 5px; border-top: 1.5px solid currentColor; transform: rotate(46deg); }
.field-body { --stage-height: clamp(420px, 56vh, 610px); --map-toolbar-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(325px, .46fr); }
.map-column { min-width: 0; }
.stage { position: relative; block-size: var(--stage-height); overflow: hidden; isolation: isolate; background: var(--stage); }
#globe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline-offset: -4px; }
#globe.dragging { cursor: grabbing; }
#globe.pointing { cursor: pointer; }
.map-hover { position: absolute; z-index: 1; pointer-events: none; padding: 5px 9px; border-radius: 6px; color: var(--paper); background: var(--panel); border: 1px solid var(--line); box-shadow: 0 4px 16px #07171933; font-size: .75rem; max-width: min(75%, 220px); line-height: 1.35; }
.map-hover strong { font-weight: 600; }
.map-hover small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.ocean-context { position: absolute; inset: auto auto 13px 13px; display: grid; gap: 2px; pointer-events: none; max-width: calc(100% - 26px); padding: 7px 10px; border: 1px solid var(--hair); border-radius: 6px; background: var(--panel); color: var(--paper); }
.ocean-context strong { font: 700 .95rem/1.3 var(--serif); }
.ocean-context span { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.map-toolbar { min-height: var(--map-toolbar-height); display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 5px 11px; border-top: 1px solid var(--line); border-radius: 0 0 0 13px; background: var(--toolbar); }
.map-readout { display: flex; align-items: center; gap: 7px; color: var(--muted); font: .71rem/1.2 ui-monospace, monospace; white-space: nowrap; }
.north { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold); }
.map-controls { display: flex; gap: 4px; }
.map-controls button { width: 38px; height: 38px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--paper); font: 1.28rem/1 sans-serif; }
.map-controls button:hover:enabled { background: var(--hover); }
#auto-rotate { display: grid; place-items: center; }
#auto-rotate[aria-pressed="true"] { border-color: var(--hair); color: var(--gold); }
#auto-rotate[aria-pressed="true"] .rotation-play, #auto-rotate[aria-pressed="false"] .rotation-pause { display: none; }
.map-help { margin: 0; color: var(--muted); font-size: .69rem; line-height: 1.4; text-align: center; }
.touch-help { display: none; }
.map-column:has(.stage[data-experiment]) .pick-help { display: none; }
@media (pointer: coarse) {
  .desktop-help, .search-trigger kbd { display: none; }
  .touch-help { display: inline; }
}
.map-status button { pointer-events: auto; }
.map-status {
  position: absolute;
  inset: 46% 12px auto;
  width: fit-content;
  margin-inline: auto;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--paper);
  text-align: center;
  pointer-events: none;
}
.place-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  border-radius: 0 0 11px 0;
  background: var(--panel);
  min-width: 0;
  max-height: calc(var(--stage-height) + var(--map-toolbar-height));
  overflow: auto;
  scrollbar-color: var(--hair) var(--panel);
  scroll-padding-block-start: 48px;
}
.place-content-stack { position: relative; }
.place-content-snapshot {
  position: absolute;
  inset: 0;
  overflow: clip;
  background: var(--panel);
  pointer-events: none;
}
.place-content { padding: 17px clamp(20px, 2.3vw, 32px) 26px; }
.place-content h2 { font-size: clamp(1.85rem, 2.6vw, 2.55rem); line-height: 1.22; margin: 7px 0 12px; overflow-wrap: anywhere; text-wrap: balance; letter-spacing: -.025em; }
.place-content p:not(.kicker) { color: var(--muted); line-height: 1.75; font-size: .91rem; margin: 0 0 16px; }
.place-meta { display: grid; gap: 9px; border-block: 1px solid var(--line); margin: 15px 0; padding: 11px 0; font-size: .84rem; }
.place-meta div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.place-meta dd { margin: 0; text-align: right; }
.place-meta dt { color: var(--muted); flex-shrink: 0; }
.place-content .prompt { border-left: 2px solid var(--gold); padding-left: 12px; }
.place-content .experiment-reading { color: var(--paper); font-size: 1rem; }
.panel-actions, .tour-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.panel-action, .tour-nav button {
  min-height: 38px;
  padding: 6px 11px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--toolbar);
  color: var(--paper);
  font-size: .82rem;
}
.panel-action:hover, .tour-nav button:hover:enabled { background: var(--hover); }
.panel-action[data-main] { background: var(--active); color: var(--active-ink); border-color: transparent; font-weight: 700; }
.panel-action[data-main]:hover { filter: brightness(1.1); }
.place-menu { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.place-menu button { width: 100%; min-height: 42px; padding: 5px 8px; color: var(--paper); text-align: left; border-radius: 5px; border: 1px solid var(--line); background: transparent; font-size: .85rem; }
.place-menu button:hover { background: var(--hover); }
.place-menu button::before { content: "·"; color: var(--gold); margin-right: .38em; }
.slider-label { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: .85rem; }
.slider-label output { color: var(--gold); font-variant-numeric: tabular-nums; }
.place-content input[type="range"] { display: block; width: 100%; accent-color: var(--gold); margin: 7px 0 15px; }
.chapter { border-top: 1px solid var(--line); margin-top: 38px; padding-top: 20px; scroll-margin: 15px; }
.chapter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 16px; }
.chapter-head h2 { font-size: clamp(1.65rem, 3vw, 2.05rem); }
.chapter-head p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.chapter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.experiments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chapter-card {
  min-width: 0;
  align-items: center;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  text-align: left;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}
.chapter-card:hover, .chapter-card[aria-current="true"] { border-color: var(--hair); background: var(--hover); }
.card-copy { display: grid; gap: 5px; }
.card-copy strong { font-family: var(--serif); font-size: 1.11rem; }
.card-copy > span { color: var(--muted); font-size: .78rem; line-height: 1.52; }
.card-arrow { color: var(--gold); }
.card-art { position: relative; width: 44px; height: 44px; border: 1px solid #82b4a6; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #489181, #1a4848 50%, #0f2d36); }
.card-art::after, .card-art::before { position: absolute; content: ""; }
.ocean-art::before { inset: 7px 4px; border-block: 1px solid #b6dacc; border-radius: 50%; transform: rotate(-25deg); }
.ocean-art::after { inset: 3px 11px; border: 1px solid #b6dacc8f; border-radius: 50%; transform: rotate(26deg); }
.river-art { background: radial-gradient(circle at 34% 26%, #a8a776, #5b704f 50%, #283c36); }
.river-art::before { inset: 5px 10px 6px 9px; border-left: 2px solid #bee5d3; border-bottom: 2px solid #bee5d3; border-radius: 30% 0 46% 28%; transform: rotate(-41deg); }
.poles-art { background: linear-gradient(#e3edde, #60928f 29%, #215453 53%, #9cbcb1 82%, #e3edde); }
.poles-art::before { inset: 8px 12px; border: 1px solid #e3edde; border-radius: 50%; }
.day-art { background: linear-gradient(105deg, #e8c782 0%, #bc9357 46%, #0b1f2c 48%, #102f3c 100%); }
.latitude-art::before { inset: 9px 4px; border-block: 1px solid #b6dacc; border-radius: 50%; }
.latitude-art::after { inset: -1px 12px; border: 1px solid #b6dacc8f; border-radius: 50%; }
.sources { margin: 35px 0 45px; color: var(--muted); font-size: .8rem; line-height: 1.75; }
.sources summary { cursor: pointer; width: fit-content; color: var(--paper); }
.sources p { max-width: 78ch; }
.sources a { text-underline-offset: .2em; }
.footer-line { border-top: 1px solid var(--line); padding: 22px max(18px, calc((100% - 1280px) / 2)); }
.noscript { color: var(--gold); }
#search-dialog { color: var(--paper); background: var(--panel); width: min(610px, calc(100% - 24px)); height: min(680px, calc(100dvh - 28px)); border: 1px solid var(--hair); border-radius: 13px; padding: 19px 22px 15px; box-shadow: 0 20px 90px #000a; }
#search-dialog[open] { display: flex; flex-direction: column; }
#search-dialog::backdrop { background: #041317bc; backdrop-filter: blur(4px); }
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.close-search { width: 40px; height: 40px; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 5px; font-size: 1.4rem; }
.search-field { position: relative; }
.search-field > svg { position: absolute; inset: 13px auto auto 13px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
#search-input { border: 1px solid var(--hair); border-radius: 7px; width: 100%; min-height: 45px; padding: 8px 12px 8px 39px; background: var(--toolbar); color: var(--paper); }
#search-input::placeholder { color: var(--muted); opacity: 1; }
#search-status { color: var(--muted); margin: 11px 0 7px; font-size: .79rem; line-height: 1.45; }
#search-results { min-height: 0; padding: 3px 4px; margin-inline: -4px; overflow: auto; overscroll-behavior: contain; scrollbar-color: var(--hair) var(--panel); }
.search-group + .search-group { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); }
.search-group h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 5px; font: 700 .85rem/1.4 var(--sans); }
.search-group h3 svg { flex: none; width: 18px; height: 18px; color: var(--gold); }
.search-group h3 span { margin-inline-start: auto; color: var(--muted); font-size: .72rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.search-group ul { display: grid; gap: 3px; list-style: none; margin: 0; padding: 0; }
.search-group li { min-width: 0; }
#search-results button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 43px; padding: 6px 9px; border: 1px solid transparent; border-radius: 6px; background: var(--toolbar); color: var(--paper); text-align: start; }
#search-results button:hover, #search-results button:focus-visible { border-color: var(--hair); background: var(--hover); }
#search-results button:focus-visible { outline-offset: -1px; }
.search-result-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.search-result-text strong { font-size: .86rem; }
.search-result-text small { color: var(--muted); font-size: .74rem; line-height: 1.35; }
.search-result-text .search-result-hint { color: var(--gold); }
.search-result-arrow { color: var(--muted); flex: none; font-size: .88rem; }
#search-results .search-more { justify-content: flex-start; min-height: 32px; margin-top: 2px; background: transparent; color: var(--gold); font-size: .76rem; }
.search-region-note { padding: 12px 13px; border-inline-start: 2px solid var(--gold); border-radius: 0 7px 7px 0; margin: 10px 0 16px; background: var(--toolbar); }
.search-region-note h3 { margin: 0 0 6px; font: 700 .96rem/1.4 var(--serif); }
.place-content .search-region-note p { margin: 0 0 8px; font-size: .83rem; line-height: 1.6; }
.search-region-note .topic-sources { margin-bottom: 0; }
@media (max-width: 470px) {
  #search-dialog { padding: 13px 14px 11px; }
  .search-head { margin-bottom: 10px; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.map-trail { position: sticky; top: 0; z-index: 2; flex-shrink: 0; background: var(--panel); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; min-height: 42px; padding: 7px clamp(20px, 2.3vw, 32px); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.4; }
.map-trail:empty { display: none; }
.map-trail button { min-width: 24px; min-height: 24px; border: 0; border-radius: 4px; padding: 3px 0; color: var(--muted); background: transparent; }
.map-trail button:hover { color: var(--paper); text-decoration: underline; text-underline-offset: .2em; }
.map-trail [aria-current] { color: var(--paper); font-weight: 700; }
.earth-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0; padding: 11px 0; background: var(--raised); border: 1px solid var(--line); border-radius: 9px; }
.earth-stats div { padding: 0 7px; text-align: center; }
.earth-stats div + div { border-left: 1px solid var(--line); }
.earth-stats dd { margin: 0; font: 1.35rem/1.25 Georgia, var(--serif); }
.earth-stats dt { margin-bottom: 5px; font-size: .72rem; color: var(--muted); }
.panel-actions + .reading-note { margin-top: 12px; }
.panel-subhead { font-size: 1.08rem; margin: 18px 0 8px; }
.place-stack { display: grid; gap: 5px; margin: 0 0 12px; padding: 0; list-style: none; }
.place-stack--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.place-stack button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; text-align: left; color: var(--paper); background: var(--toolbar); }
.place-stack button:hover, .place-stack button:focus-visible { background: var(--hover); border-color: var(--hair); }
.place-stack button span { display: block; font-size: .85rem; font-weight: 650; }
.place-stack button small { display: block; color: var(--muted); font-size: .73rem; font-weight: 400; line-height: 1.45; margin-top: 2px; }
.place-stack button::after { content: "↗"; font-size: .85rem; color: var(--gold); }
.reading-note { padding: 9px 12px; color: var(--muted); background: var(--toolbar); border-left: 2px solid var(--gold); border-radius: 0 6px 6px 0; }
.reading-note summary { cursor: pointer; font-size: .86rem; color: var(--paper); font-weight: 700; }
.place-content .reading-note p { margin: 8px 0 2px; font-size: .83rem; }
.reading-note a { color: var(--gold); text-underline-offset: .2em; }
.nearby { margin-top: 15px; padding: 9px 0; border-top: 1px solid var(--line); }
.nearby summary { cursor: pointer; color: var(--paper); font-size: .86rem; }
.nearby summary span { display: inline-block; margin-left: 3px; color: var(--muted); font: .72rem/1.1 ui-monospace, monospace; }
.tour-progress { display: flex; gap: 5px; margin: 0 0 13px; padding: 0; list-style: none; }
.tour-progress li { flex: 1; }
.tour-progress button { width: 100%; min-height: 38px; padding: 5px 2px; font-size: .76rem; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid var(--line); }
.tour-progress button:hover { color: var(--paper); }
.tour-progress button[aria-current] { border-color: var(--gold); color: var(--paper); font-weight: 700; }
button { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease; }
button:active:not(:disabled) { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
@media (max-width: 1080px) {
  .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-help { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .chapter-card { grid-template-columns: minmax(0, 1fr) auto; }
  .card-art { display: none; }
}
@media (max-width: 760px) {
  .atlas { width: min(620px, calc(100% - 28px)); }
  .wonder-site-header { width: min(620px, calc(100% - 28px)); }
  .header-actions { gap: 10px; }
  .header-actions > a { font-size: .74rem; }
  .intro { padding: 17px 0 15px; display: block; }
  .intro-copy { max-width: 29em; margin: 6px 0 0; font-size: .83rem; }
  .field-body { --stage-height: clamp(255px, 75vw, 440px); grid-template-columns: 1fr; }
  .map-toolbar { border-radius: 0; }
  .place-panel { max-height: none; border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; }
  .map-trail { padding-inline: 15px; min-height: 36px; }
  .place-content { padding: 15px 15px 20px; }
  .field-bar { flex-wrap: wrap; padding: 5px 7px; gap: 4px 6px; }
  .layers { gap: 3px; }
  .layers button, .search-trigger { padding: 5px 7px; min-height: 40px; font-size: .77rem; }
  .search-trigger { min-width: auto; margin-left: auto; }
  .chapter-grid { grid-template-columns: 1fr; gap: 8px; }
  .chapter { margin-top: 30px; }
  .chapter-head { display: block; }
  .chapter-head p { margin-top: 4px; }
  .chapter-card { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; padding: 11px; }
  .card-art { display: block; width: 38px; height: 38px; }
}
@media (max-width: 470px) {
  .field-bar { display: grid; grid-template-columns: 1fr; }
  .layers { justify-content: space-between; }
  .layers button { flex: 1; }
  .search-trigger { justify-content: center; margin: 0; min-height: 37px; }
}
@media (max-width: 335px) {
  .header-actions { gap: 7px; }
  .layers button { padding-inline: 4px; }
  .map-readout { font-size: .64rem; }
}

/* Political layer controls and country profiles. */
.field-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.boundary-trigger { min-height: 42px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--paper); font-size: .8rem; line-height: 1.3; }
.boundary-trigger:hover { background: var(--hover); }
#boundary-dialog { color: var(--paper); background: var(--panel); width: min(480px, calc(100% - 24px)); max-height: calc(100dvh - 28px); border: 1px solid var(--hair); border-radius: 13px; padding: 22px; box-shadow: 0 20px 90px #0008; }
#boundary-dialog::backdrop { background: #041317bc; backdrop-filter: blur(4px); }
#boundary-dialog p { color: var(--muted); font-size: .89rem; line-height: 1.65; }
#boundary-dialog label { display: block; margin: 14px 0 5px; font-size: .8rem; }
#boundary-select { display: block; width: 100%; min-height: 42px; padding: 5px 8px; border-radius: 6px; font: inherit; color: var(--paper); background: var(--toolbar); border: 1px solid var(--hair); }
.boundary-legend { display: grid; gap: 8px; padding: 0; list-style: none; color: var(--muted); font-size: .8rem; }
.boundary-legend li { display: flex; align-items: center; gap: 10px; }
.boundary-legend i { width: 22px; border-block-start: 2px solid var(--paper); }
.boundary-legend li:nth-child(2) i { border-block-start-style: dashed; border-block-start-color: var(--gold); }
.boundary-legend li:nth-child(3) i { border-block-start-style: dotted; }
.boundary-legend li:nth-child(4) i { border-block-start-style: dashed; border-block-start-color: #6e9ca7; }

.search-scope { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.search-scope button { padding: 4px 9px; min-height: 33px; border-radius: 5px; border: 1px solid var(--line); background: var(--toolbar); color: var(--muted); font-size: .79rem; }
.search-scope button[aria-pressed="true"] { color: var(--active-ink); background: var(--active); }
@media (max-width: 470px) {
  .search-scope { gap: 3px; }
  .search-scope button { min-height: 40px; padding-inline: 7px; }
}

.country-profile { margin: 13px 0 19px; border: 1px solid var(--line); border-radius: 8px; background: var(--toolbar); overflow: hidden; }
.country-explorer { margin: 0 0 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--toolbar); }
.country-journey {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 55px; padding: 9px 12px; border: 0;
  border-radius: 8px 8px 0 0; background: transparent; color: var(--paper);
  text-align: left; line-height: 1.45;
}
.country-journey:only-child { border-radius: 8px; }
.country-journey:hover { background: var(--hover); }
.country-journey:active { background: var(--raised); }
.country-journey span:first-child { display: grid; gap: 3px; }
.country-journey small { color: var(--muted); font-size: .73rem; }
.country-journey strong, .country-journey span[aria-hidden] { color: var(--gold); }
.country-explorer-areas {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px;
  padding: 7px 9px; border-top: 1px solid var(--line); align-items: start;
}
.country-explorer-areas:first-child { border-top: 0; }
.country-region-list { display: contents; }
.country-explorer-areas .country-region-list summary { padding: 6px 1px; min-height: 39px; }
.country-explorer-areas .panel-action { grid-column: 2; grid-row: 1; min-height: 39px; margin: 0; text-align: center; }
.place-content .country-region-list p { grid-column: 1 / -1; margin: 0; font-size: .77rem; }
.country-region-list .place-menu, .country-region-list .topic-sources { grid-column: 1 / -1; margin-block: 0 5px; }
.country-region-list .place-menu li { min-width: 0; }
.country-region-list .place-menu button { overflow-wrap: anywhere; }
@media (pointer: coarse) {
  .country-explorer-areas .country-region-list summary, .country-explorer-areas .panel-action { min-height: 44px; }
  .country-region-list .place-menu button { min-height: 44px; }
}
.profile-capital { padding: 12px 12px 10px; }
.profile-capital h3 { margin: 0 0 6px; color: var(--muted); font: inherit; font-size: .76rem; }
.capital-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.capital-list button, .capital-list > span { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-start; gap: 0 6px; min-height: 34px; max-width: 100%; padding: 4px 7px; color: var(--paper); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; text-align: left; font-size: .87rem; }
.capital-list button:hover { background: var(--hover); border-color: var(--hair); }
.capital-list :is(small, button > span) { color: var(--gold); font-size: .72rem; }
.profile-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.profile-figure { min-width: 0; padding: 10px 11px; border-top: 1px solid var(--line); }
.profile-figure:nth-child(even) { border-inline-start: 1px solid var(--line); }
.profile-figure dt, .profile-number small, .profile-byline { color: var(--muted); font-size: .75rem; }
.profile-figure dd { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.profile-figure .profile-number { margin-block: 3px 5px; font-size: 1rem; font-weight: 680; font-variant-numeric: tabular-nums; }
.profile-number small { white-space: nowrap; font-weight: 500; }
.profile-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.profile-stat-source { flex-basis: 100%; }
.profile-stat-source a, .profile-stat-method .profile-sources a { color: var(--gold); text-underline-offset: 2px; }
.profile-stat-status { padding: 1px 4px; border-radius: 3px; background: var(--toolbar); color: var(--paper); font-size: .7rem; }
.profile-year select {
  max-width: 100%; min-height: 32px; padding: 3px 6px; border: 1px solid var(--line);
  border-radius: 4px; background: var(--toolbar); color: var(--paper); font: inherit;
}
.profile-year select:focus-visible { outline: 1px solid var(--gold); }
.profile-year option { color: var(--paper); background: var(--panel); }
.profile-details { border-top: 1px solid var(--line); padding: 8px 12px; }
.profile-details summary { cursor: pointer; font-size: .8rem; color: var(--paper); }
.profile-details dl { display: grid; gap: 8px; margin: 10px 0; }
.profile-details dl > div { display: grid; grid-template-columns: 7.25em minmax(0, 1fr); gap: 7px; align-items: baseline; font-size: .8rem; }
.profile-details dt { color: var(--muted); line-height: 1.55; }
.profile-details dd { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.profile-value-note { display: inline-block; color: var(--muted); font-size: .73rem; white-space: nowrap; }
.place-content .profile-details p { margin: 7px 0; padding-left: 7px; border-left: 2px solid var(--line); font-size: .77rem; }
.profile-sources { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 7px 0 3px; color: var(--gold); font-size: .75rem; }
.profile-stat-method > dl { margin: 4px 0 0; gap: 0; }
.profile-stat-method dl > div { display: block; padding-block: 9px; border-bottom: 1px solid var(--line); }
.profile-stat-method dl > div:last-child { border-bottom: 0; }
.profile-stat-method dt { color: var(--paper); font-weight: 650; }
.place-content .profile-stat-method p { padding: 0; border: 0; margin: 3px 0 0; }
.profile-stat-method summary { min-height: 30px; line-height: 30px; }
@media (pointer: coarse) {
  .profile-year select, .profile-stat-method summary { min-height: 44px; }
  .profile-stat-method summary { line-height: 44px; }
}

@media (max-width: 760px) {
  .boundary-trigger { min-height: 40px; padding: 5px 9px; }
}
@media (max-width: 470px) {
  .field-actions .search-trigger { flex: 1; }
  .field-actions .boundary-trigger { min-height: 37px; }
}

.map-key { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px; background: var(--toolbar); border-bottom: 1px solid var(--line); }
.map-key button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 8px; white-space: nowrap; background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; font-size: .76rem; }
.map-key button[aria-pressed="true"] { color: var(--paper); border-color: var(--hair); }
.map-key button::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; flex: none; }
.map-key button[aria-pressed="true"]::before { background: #80d9c5; border-color: #377069; }
#map-key-label, #region-status { color: var(--muted); font-size: .74rem; }
#region-status:empty { position: absolute; }
#region-credits { margin-inline-start: auto; color: var(--muted); font-size: .67rem; white-space: nowrap; }
.field-body:has(.map-key:not([hidden])) .place-panel { max-height: calc(var(--stage-height) + var(--map-toolbar-height) + 40px); }
.geography-topics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin: 0 0 15px; border-bottom: 1px solid var(--line); }
.geography-topics button { min-height: 40px; padding: 4px; white-space: nowrap; color: var(--muted); font-size: .81rem; background: transparent; border: 0; border-bottom: 2px solid transparent; }
.geography-topics button:hover, .season-controls button:hover { color: var(--paper); background: var(--hover); }
.geography-topics button[aria-pressed="true"] { color: var(--paper); border-color: var(--gold); font-weight: 700; }
.topic-title { font-size: 1.18rem; line-height: 1.4; margin: 0 0 8px; }
.topic-sources { display: grid; gap: 5px; list-style: none; padding: 0; font-size: .76rem; color: var(--gold); }
.topic-sources a, .profile-sources a { display: inline-block; min-height: 24px; text-underline-offset: .22em; }
.season-compare { padding: 8px 11px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--toolbar); }
.season-controls { display: inline-flex; gap: 4px; margin-bottom: 7px; }
.season-controls button { min-width: 55px; min-height: 40px; border-radius: 4px; border: 0; padding: 2px 7px; background: var(--panel); color: var(--muted); font-size: .79rem; }
.season-controls button[aria-pressed="true"] { background: var(--active); color: var(--active-ink); }
.place-content .season-compare p { margin: 0; font-size: .83rem; }
.story-list { display: grid; gap: 8px; }
.story-list button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-left: 2px solid var(--gold); border-radius: 5px; background: var(--toolbar); color: var(--paper); text-align: left; }
.story-list button:hover { background: var(--hover); }
.story-copy { display: grid; gap: 5px; }
.story-copy strong { font-family: var(--serif); line-height: 1.42; }
.story-copy span { font-size: .81rem; color: var(--muted); line-height: 1.5; }
.story-copy small, .story-arrow { color: var(--gold); }
@media (max-width: 760px) {
  .field-body:has(.map-key:not([hidden])) .place-panel { max-height: none; }
}
#map-place-details { color: var(--paper); text-decoration: underline; text-underline-offset: .23em; overflow-wrap: anywhere; }
#map-place-details::before { content: none; }
.map-scale { flex: 0 0 auto; min-width: 50px; text-align: center; display: grid; justify-items: center; gap: 4px; color: var(--muted); font: .65rem/1.1 ui-monospace, monospace; }
#map-scale-line { height: 5px; border: 1px solid var(--hair); border-top: 0; }
.map-toolbar:has(.map-scale:not([hidden])) .map-help { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.place-content .place-link-error { border-left: 2px solid var(--gold); padding: 8px 10px; background: var(--toolbar); border-radius: 0 5px 5px 0; }
@media (max-width: 470px) {
  .map-toolbar:has(.map-scale:not([hidden])) .north { display: none; }
  .map-toolbar { flex-wrap: wrap; gap: 6px; padding-inline: 7px; }
  .map-readout { font-size: .66rem; }
  .map-controls { margin-inline-start: auto; }
  .map-controls button { width: 36px; }
}

.climate-chart { --station-one: #79c4b6; --station-two: #deb77a; margin: 0 0 15px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
:root[data-theme="light"] .climate-chart { --station-one: #23736c; --station-two: #9b6537; }
@media (max-width: 470px) {
  .climate-chart { padding-inline: 6px; }
  .climate-chart .chart-body { grid-template-columns: 22px minmax(288px, 1fr); overflow-x: auto; }
  .climate-chart .chart-months { gap: 0; }
}
.climate-chart figcaption { display: grid; gap: 3px; margin-bottom: 9px; }
.climate-chart figcaption strong { font: 700 1.05rem var(--serif); }
.climate-chart figcaption small { color: var(--muted); font-size: .72rem; }
.climate-chart .station-0 { --series: var(--station-one); }
.climate-chart .station-1 { --series: var(--station-two); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 7px; }
.chart-types { display: grid; gap: 3px; margin: 0 0 9px; font-size: .74rem; color: var(--muted); }
.chart-types a { width: fit-content; color: var(--gold); }
.chart-types small { font-size: inherit; overflow-wrap: anywhere; }
.climate-station { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); text-decoration: none; font-size: .72rem; }
.climate-station:hover { color: var(--paper); text-decoration: underline; }
.climate-station::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; background: var(--series); }
.chart-body { display: grid; grid-template-columns: 26px minmax(0, 1fr); }
.chart-scale { display: grid; grid-template-rows: 1fr auto 17px; font: .62rem/1.1 ui-monospace, monospace; color: var(--muted); }
.chart-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1px; }
.chart-months button { display: grid; align-content: end; grid-template-rows: 74px 19px; min-width: 0; min-height: 94px; padding: 0; border: 0; background: transparent; color: var(--muted); font: .65rem/1.75 ui-monospace, monospace; }
.chart-months button:hover, .chart-months button[aria-pressed="true"] { background: var(--hover); color: var(--paper); }
.chart-months button[aria-pressed="true"] { box-shadow: inset 0 -2px var(--gold); }
.chart-months button:focus-visible { outline-offset: -2px; }
.chart-bars { position: relative; display: block; background: linear-gradient(to top, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line) 1px, transparent 1px); }
.chart-bars i { position: absolute; width: 31%; border-radius: 2px; background: var(--series); }
.chart-bars .station-0 { left: 14%; }
.chart-bars .station-1 { right: 14%; background: repeating-linear-gradient(135deg, var(--series) 0 3px, transparent 3px 4px); }
.climate-station.station-1::before { background: repeating-linear-gradient(135deg, var(--series) 0 3px, transparent 3px 4px); }
.chart-reading { min-height: 40px; display: flex; flex-wrap: wrap; gap: 3px 9px; align-items: center; padding-top: 7px; margin-top: 4px; border-top: 1px solid var(--line); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-reading strong { color: var(--paper); }
.place-content .climate-chart .chart-scope { margin: 6px 0 0; color: var(--muted); font-size: .75rem; }
.chart-bars::before { content: ""; position: absolute; inset: var(--zero) 0 auto; border-top: 1px solid var(--hair); }
@media (max-width: 335px) {
  .map-toolbar { gap: 4px; padding-inline: 7px; }
  .map-controls button { width: 34px; }
  .map-scale { min-width: 44px; }
}

.atoll-map { margin: 0 0 15px; padding: 8px 8px 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--toolbar); }
.atoll-map figcaption { padding: 2px 3px 7px; color: var(--paper); font: 700 .93rem var(--serif); }
.atoll-figure { position: relative; overflow: hidden; background: #1b5261; border-radius: 4px; }
.atoll-figure canvas { display: block; width: 100%; height: auto; }
.atoll-north { position: absolute; inset: 8px auto auto 10px; color: #dbeeea; font: .7rem ui-monospace, monospace; }
.atoll-figure button { position: absolute; top: var(--pin-y); left: var(--pin-x); transform: translate(-50%,-50%); min-height: 28px; padding: 3px 5px; border: 1px solid #7eb2ad; border-radius: 4px; white-space: nowrap; background: #123d4a; color: #e1f6ed; font-size: .72rem; }
.atoll-figure button:last-of-type { left: min(calc(var(--pin-x) + 5px), calc(100% - 78px)); transform: translateY(-50%); }
@media (max-width: 335px) {
  .atoll-figure button:last-of-type { top: calc(var(--pin-y) + 16px); }
}
.atoll-figure button[aria-current], .atoll-figure button:hover { background: #e4ca83; color: #203536; border-color: #daca9d; }
.atoll-scale { position: absolute; inset: auto auto 7px 10px; border-bottom: 1px solid #c3e0d8; width: var(--scale); text-align: center; padding: 0 0 3px; color: #dbeeea; font: .63rem ui-monospace, monospace; }
.place-content .atoll-credit { margin: 5px 3px 1px; font-size: .65rem; }
#relief-toggle::before { background: transparent; border-color: currentColor; border-radius: 2px; }
#relief-toggle[aria-pressed="true"]::before { background: linear-gradient(135deg,#82b095 34%,#c7a573 35% 67%,#ebdbbf 68%); border-color: var(--hair); }
.thematic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: .79rem; }
.thematic-bar label { font-weight: 650; }
.thematic-bar select { min-height: 36px; min-width: 9.5em; max-width: 100%; padding: 4px 8px; border: 1px solid var(--hair); border-radius: 6px; outline-offset: 3px; color: var(--paper); background: var(--toolbar); font: inherit; }
.island-directory { display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-inline-start: auto; min-height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--toolbar); color: var(--paper); white-space: nowrap; }
.island-directory:hover:enabled { background: var(--hover); }
.island-directory span { display: grid; place-items: center; width: 11px; height: 11px; border: 1px solid #f3ce8b; border-radius: 50%; background: #1a3941; }
.island-directory span::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #f3ce8b; }
#thematic-status:empty { display: none; }
.thematic-legend { border-top: 1px solid var(--line); color: var(--muted); font-size: .79rem; line-height: 1.6; }
.map-column:has(.thematic-legend:not([hidden])) .map-toolbar { border-radius: 0; }
.thematic-legend summary { padding: 8px 13px; cursor: pointer; color: var(--paper); }
.thematic-legend summary:hover { background: var(--hover); }
.thematic-legend summary span { margin-inline-start: 10px; color: var(--muted); font-size: .73rem; }
.thematic-description { display: grid; row-gap: 8px; padding: 3px 14px 13px; }
.thematic-description p { margin: 0; }
.thematic-scale, .thematic-credits { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; }
.thematic-scale { list-style: none; margin: 0; padding: 0; color: var(--paper); font-variant-numeric: tabular-nums; }
.thematic-scale li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.thematic-scale i { --swatch: var(--legend-dark); display: inline-block; width: 14px; height: 9px; border-radius: 2px; background: var(--swatch); }
:root[data-theme="light"] .thematic-scale i { --swatch: var(--legend-light); }
.thematic-scale [data-line] { display: grid; place-items: center; width: 25px; height: 12px; padding: 0 4px; background: #c6cfb5; }
.thematic-scale [data-line]::before { content: ""; width: 100%; border-top: 2px solid var(--swatch); }
.thematic-scale [data-line="dashed"]::before, .thematic-scale [data-line="maritime"]::before { border-top-style: dashed; }
.thematic-scale [data-line="dotted"]::before { border-top-style: dotted; }
.thematic-scale [data-line="maritime"] { background: #38636b; }
:root[data-theme="light"] .thematic-scale [data-line="maritime"] { background: #b6d8da; }
.thematic-description .thematic-readout { width: fit-content; padding: 2px 7px; border-radius: 4px; background: var(--raised); color: var(--paper); font-variant-numeric: tabular-nums; }
.thematic-readout:empty { display: none; }
.thematic-credits a { color: var(--gold); text-underline-offset: 3px; }
.thematic-time { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px; }
.thematic-time input { flex: 1 1 125px; min-width: 65px; min-height: 28px; margin: 0; accent-color: var(--gold); }
.thematic-time output { font-variant-numeric: tabular-nums; }
@media (max-width: 470px) {
  .map-key { gap: 6px; flex-wrap: wrap; }
  .thematic-bar select, .island-directory { min-height: 40px; }
  .thematic-scale { gap: 4px 10px; }
}

.study-context { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1fr); gap: 13px 10px; padding: 15px 0 10px; border-top: 1px solid var(--line); }
.country-locator { grid-column: 1; margin: 0; align-self: start; }
.country-locator canvas { display: block; width: 100%; height: auto; background: var(--toolbar); border: 1px solid var(--line); border-radius: 7px; }
.country-locator figcaption { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.country-context-title, .study-reading h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.4; }
.country-context-title { margin: 0; }
.country-context-title, .country-water, .country-neighbors, .study-context-note,
.country-land-status, .country-relation-method { grid-column: 1 / -1; min-width: 0; }
.country-neighbors h4, .country-water h4, .study-map-title, .terrain-reading h4 { margin: 0; font-size: .88rem; color: var(--paper); }
.place-content .country-water p, .place-content p.study-context-note, .place-content p.country-land-status { margin: 0; font-size: .8rem; }
.place-content .country-water p { margin-top: 4px; }
.country-water .country-neighbors { margin-top: 8px; }
.country-water .country-neighbors h4 { color: var(--muted); font-size: .75rem; }
.country-neighbors .place-menu { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 0; }
.country-neighbors .place-menu button { min-height: 42px; padding: 5px 9px; background: var(--toolbar); font-size: .8rem; }
.country-neighbors .place-menu button::before { content: none; }
.country-neighbors .place-menu button::after { content: " ↗"; color: var(--gold); }
.country-neighbors .place-menu button:hover { background: var(--hover); }
.country-neighbors .place-menu button:active { background: var(--raised); }
.place-content p.country-distance {
  display: grid; align-content: center; gap: 3px; min-width: 0; margin: 0; padding: 8px 9px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--toolbar); font-size: .76rem; line-height: 1.45;
}
.country-distance strong, .country-distance b, .country-water strong { color: var(--paper); }
.country-distance b { font-variant-numeric: tabular-nums; }
.country-distance b span { display: inline-block; color: var(--muted); font-weight: 400; }
.study-context .country-relation-method { padding: 4px 0; }
.study-method, .chart-method { padding: 8px 0; font-size: .79rem; }
.study-method summary, .chart-method summary { cursor: pointer; color: var(--paper); }
.place-content :is(.study-method,.chart-method) p { margin: 7px 0 0; font-size: .77rem; }
.study-method .topic-sources { margin-bottom: 0; }
.study-map-title { margin-bottom: 7px; }
.terrain-reading { display: grid; gap: 9px; margin: 15px 0 9px; }
.terrain-reading section { border-left: 2px solid var(--line); padding: 3px 0 3px 10px; }
.place-content .terrain-reading p { margin: 4px 0 0; font-size: .83rem; }
.study-reading { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 15px; }
.place-content .study-history { font-size: .84rem; margin-bottom: 8px; }
.study-culture, .study-tidbits { display: grid; gap: 7px; list-style: none; padding: 0; margin: 0; }
.study-reading li:has(>strong) { padding: 7px 9px; border-radius: 5px; background: var(--toolbar); }
.study-reading li > strong { font-size: .84rem; color: var(--paper); }
.place-content .study-reading li > p { font-size: .82rem; margin: 4px 0; }
.study-reading li .topic-sources { margin: 3px 0 0; }
@media (pointer: coarse) {
  .country-neighbors .place-menu button { min-height: 44px; }
}

.atlas-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 27px;
  margin-inline-start: .46em;
  vertical-align: .05em;
}
.atlas-flag svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--hair);
}
.profile-zone {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr);
  align-items: baseline;
  gap: 5px 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
}
.profile-zone > span, .profile-zone dt { color: var(--muted); }
.profile-zone strong { font-variant-numeric: tabular-nums; }
.profile-zone details { grid-column: 2; color: var(--muted); font-size: .74rem; }
.profile-zone summary { cursor: pointer; min-height: 28px; line-height: 28px; -webkit-tap-highlight-color: transparent; }
.profile-zone summary:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.profile-zone dl { display: grid; gap: 6px; margin: 4px 0 8px; }
.profile-zone dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1px 9px; }
.profile-zone dt { overflow-wrap: anywhere; }
.profile-zone dd { margin: 0; color: var(--paper); font-variant-numeric: tabular-nums; }
.profile-zone a { color: var(--gold); }
.place-content .profile-zone p { margin: 7px 0; font-size: .74rem; }
.climate-chart[data-stations="1"] .chart-bars .station-0 { left: 25%; width: 50%; }

.map-fullscreen, .fullscreen-pane { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--paper); font-size: .8rem; white-space: nowrap; }
.map-fullscreen:hover, .fullscreen-pane:hover { background: var(--hover); }
.map-fullscreen svg { flex: none; }
.map-fullscreen .contract-icon, .fullscreen-pane, .field[data-fullscreen] .map-fullscreen .expand-icon { display: none; }
.field[data-fullscreen] .map-fullscreen .contract-icon { display: inline; }
.field[data-fullscreen] { display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; background: var(--panel); }
.field[data-fullscreen="viewport"] { position: fixed; inset: 0; z-index: 100; height: 100dvh; }
:root:has(.field[data-fullscreen="viewport"]) { overflow: hidden; }
.field[data-fullscreen] .field-bar { flex: none; border-radius: 0; padding-top: max(7px, env(safe-area-inset-top)); }
.field[data-fullscreen] .field-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.field[data-fullscreen] .map-column { display: flex; flex-direction: column; min-height: 100%; }
.field[data-fullscreen] .map-column > :not(.stage) { flex: none; }
.field[data-fullscreen] .stage { flex: 1; block-size: auto; min-block-size: 10rem; }
.field[data-fullscreen] .field-body .place-panel { max-height: none; border-radius: 0; }
.field[data-fullscreen] .thematic-description { max-height: min(28dvh, 12rem); overflow: auto; }
@media (max-width: 760px) {
  .field[data-fullscreen] .field-body { display: block; }
  .field[data-fullscreen] .place-panel { min-height: 100%; }
  .field[data-fullscreen] .fullscreen-pane { display: inline-flex; }
  .map-fullscreen, .fullscreen-pane { min-height: 40px; }
}
@media (max-width: 470px) {
  .field-actions { flex-wrap: wrap; }
  .field-actions .search-trigger { flex: 1; }
  .field[data-fullscreen] .field-actions :is(.search-trigger, .boundary-trigger, .map-fullscreen, .fullscreen-pane) { padding-inline: 7px; font-size: .75rem; }
}

.regional-facts { margin: 0 0 20px; }
.regional-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; border: 1px solid var(--hair); border-radius: 8px; background: var(--toolbar); }
.regional-metrics div { min-width: 0; padding: 10px 8px; }
.regional-metrics div + div { border-inline-start: 1px solid var(--line); }
.regional-metrics dt, .regional-readings dt { color: var(--muted); font-size: .72rem; }
.regional-metrics dd { margin: 3px 0 0; font: 700 clamp(1rem,1.34vw,1.27rem)/1.25 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.regional-metrics dd small, .regional-readings dd small { display: block; color: var(--muted); font: 400 .72rem/1.45 var(--sans); }
.regional-readings { margin: 0; border-block: 1px solid var(--line); }
.regional-readings div { display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: baseline; gap: 8px; padding: 7px 1px; }
.regional-readings div + div { border-top: 1px solid var(--line); }
.regional-readings dd { margin: 0; line-height: 1.45; font-size: .88rem; overflow-wrap: anywhere; }
.regional-link { color: var(--paper); background: transparent; border: 0; padding: 0; font: inherit; font-weight: 700; text-align: start; text-underline-offset: .2em; }
.regional-link:hover { text-decoration: underline; }
.regional-link span { color: var(--gold); }
.continent-climates { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.continent-climates li { display: flex; align-items: start; gap: 10px; font-size: .82rem; line-height: 1.48; }
.climate-band { border-radius: 4px; flex: 0 0 22px; height: 22px; display: grid; place-items: center; background: var(--band-dark); color: #081719; font: 700 .72rem/1 ui-monospace,monospace; }
[data-theme="light"] .climate-band { background: var(--band-light); }
.continent-climates strong, .continent-climates li div span { display: block; }
.continent-climates li div span { color: var(--muted); }
.regional-action { margin-top: 12px; }
.regional-sources { margin-top: 12px; }

#ocean-flow { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.ocean-current-card { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--toolbar); }
.ocean-facts .panel-subhead { margin-block-start: 16px; }
.ocean-deep { margin: 6px 0 13px; text-align: end; font-size: .8rem; }
.ocean-flow-legend, .regional-switches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 11px; }
.ocean-flow-legend { margin: 0 0 9px; padding: 0; list-style: none; color: var(--muted); font-size: .72rem; }
.ocean-flow-legend li { display: flex; align-items: center; gap: 5px; }
.ocean-flow-legend li::before { content: ""; width: 15px; height: 3px; border-radius: 6px; background: var(--current-dark); }
[data-theme="light"] .ocean-flow-legend li::before { background: var(--current-light); }
.regional-switches { gap: 6px; }
.regional-switches button { min-height: 36px; border: 1px solid var(--line); border-radius: 5px; padding: 4px 9px; color: var(--paper); background: var(--panel); font-size: .8rem; text-align: start; }
.regional-switches button:hover { background: var(--hover); }
.regional-switches button[aria-pressed="true"] { color: var(--active-ink); background: var(--active); border-color: var(--active); font-weight: 650; }
.monsoon-choice { margin-top: 10px; display: grid; gap: 5px; font-size: .75rem; color: var(--muted); }
.current-explanation { margin-top: 10px; }
.place-content .current-explanation p { margin: 0; font-size: .83rem; line-height: 1.62; }
.monsoon-reading { display: block; color: var(--gold); font-size: .77rem; margin-bottom: 5px; font-weight: 650; }
.ocean-preview { margin-top: 9px; }
.ocean-water-groups { margin: 0; border-block: 1px solid var(--line); }
.ocean-water-groups > div { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 7px; align-items: start; padding: 7px 0; }
.ocean-water-groups > div + div { border-top: 1px solid var(--line); }
.ocean-water-groups dt { color: var(--muted); padding-top: 8px; font-size: .77rem; }
.ocean-water-groups dd { margin: 0; min-width: 0; }
.ocean-water-groups .place-menu { display: flex; flex-wrap: wrap; margin: 0; gap: 5px; }
.ocean-water-groups button { padding: 5px 8px; min-height: 35px; }
@media (min-width: 901px) { .ocean-preview { display: none; } }

#journey-list .card-copy small { color: var(--gold); font-size: .73rem; font-variant-numeric: tabular-nums; }
.tour-dock { background: var(--toolbar); border-block: 1px solid var(--line); padding: 9px 11px 10px; display: grid; gap: 6px; }
.map-column:has(.tour-dock:not([hidden])) .map-toolbar { border-radius: 0; }
.tour-dock-heading { display: flex; align-items: center; gap: 11px; }
#tour-status { color: var(--muted); min-width: 0; font-size: .77rem; font-variant-numeric: tabular-nums; }
#tour-meter { height: 5px; flex: 1; min-width: 28px; max-width: 120px; appearance: none; border: 0; border-radius: 8px; background: var(--line); overflow: hidden; }
#tour-meter::-webkit-progress-bar { background: var(--line); }
#tour-meter::-webkit-progress-value { background: var(--gold); border-radius: 8px; }
#tour-meter::-moz-progress-bar { background: var(--gold); }
.tour-dock-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.tour-dock button { min-height: 39px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 5px; color: var(--paper); background: var(--panel); font-size: .82rem; }
.tour-dock button:not([data-tour-action="next"]):hover:enabled { background: var(--hover); }
.tour-dock button:disabled { opacity: .5; }
.tour-dock .tour-exit { margin-inline-start: auto; color: var(--muted); min-height: 28px; padding: 2px 8px; background: transparent; }
.tour-dock [data-tour-action="next"] { background: var(--active); color: var(--active-ink); border-color: var(--active); font-weight: 700; }
.tour-dock [data-tour-action="next"]:hover { filter: brightness(.93); background: var(--active); }
.tour-dock .tour-read { margin-inline-start: auto; }
.tour-progress { margin-block: 0 14px; }
.tour-progress li { min-width: 0; }
.tour-progress button[data-visited] { color: var(--paper); border-color: var(--hair); }
.tour-progress button[aria-current] { border-color: var(--gold); background: var(--toolbar); border-radius: 4px 4px 0 0; }
.tour-reading { display: flow-root; }
.tour-reading h3, .tour-summary h3 { font: 700 1.03rem/1.35 var(--serif); margin: 13px 0 7px; }
.tour-reading .tour-layer { min-height: 30px; color: var(--muted); font-size: .72rem; padding: 3px 8px; }
.place-content .tour-reading > p { margin-top: 9px; }
.tour-question { margin: 13px 0; padding: 10px 11px; border-inline-start: 2px solid var(--gold); border-radius: 0 6px 6px 0; background: var(--toolbar); }
.tour-question strong { color: var(--gold); font-size: .75rem; }
.place-content .tour-question p { margin: 2px 0 0; font-size: .84rem; line-height: 1.6; }
.tour-summary .tour-complete-count { color: var(--gold); font-size: .82rem; font-weight: 700; }
.tour-recap { padding-inline-start: 1.45rem; margin: 0 0 12px; color: var(--gold); }
.tour-recap li { padding-inline-start: 3px; margin-block: 6px; }
.tour-recap small { display: block; color: var(--muted); font-size: .75rem; }
.tour-map-return { margin: 0 0 10px; }
@media (min-width: 901px) {
  .field-body:has(.tour-dock:not([hidden])) .place-panel { max-height: calc(var(--stage-height) + var(--map-toolbar-height) + 124px); }
  .field[data-fullscreen] .field-body .place-panel { max-height: none; }
}
@media (max-width: 470px) {
  .tour-dock-controls { display: grid; grid-template-columns: .95fr .88fr 1.2fr .82fr; gap: 5px; }
  .tour-dock-controls button { margin: 0; padding-inline: 2px; white-space: nowrap; min-width: 0; font-size: .75rem; }
}
