:root {
  --white: #fff;
  --ink: #151515;
  --muted: #66686c;
  --line: #e4e5e7;
  --soft: #f6f7f8;
  --blue: #1769e0;
  --red: #dd3b32;
  --yellow: #f1b51c;
  --green: #238b57;
  --bar-height: 64px;
  --panel-width: 356px;
  --font-serif: "EB Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: var(--soft); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.atlas-bar {
  position: relative;
  z-index: 1000;
  height: var(--bar-height);
  display: grid;
  grid-template-columns: var(--panel-width) 1fr auto;
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 10px rgba(0, 0, 0, .05);
  backdrop-filter: blur(18px) saturate(1.2);
}

.back-link, .icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.back-link { position: absolute; left: 16px; text-decoration: none; }
.back-link:hover, .icon-button:hover { border-color: #bdc0c4; background: var(--soft); }
.back-link svg, .icon-button svg { width: 18px; height: 18px; }

.atlas-title { display: flex; align-items: center; gap: 11px; padding-left: 66px; min-width: 0; }
.atlas-title div { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.atlas-title strong { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; }
.atlas-title span:not(.color-mark) { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.color-mark { display: grid; grid-template-columns: repeat(2, 5px); gap: 2px; width: 12px; }
.color-mark b { width: 5px; height: 5px; border-radius: 50%; }
.color-mark b:nth-child(1) { background: var(--blue); }
.color-mark b:nth-child(2) { background: var(--red); }
.color-mark b:nth-child(3) { background: var(--yellow); }
.color-mark b:nth-child(4) { background: var(--green); }

.island-switch {
  display: inline-flex;
  justify-self: center;
  padding: 3px;
  background: #eef0f2;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.extent-button {
  min-width: 70px;
  height: 34px;
  padding: 3px 12px;
  display: grid;
  place-content: center;
  gap: 1px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
}
.extent-button span { font-size: .72rem; }
.extent-button small { font-size: .55rem; }
.extent-button.is-active { color: var(--ink); background: var(--white); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.mobile-places-button { display: none; margin-right: 12px; }

.atlas-shell { position: relative; height: calc(100% - var(--bar-height)); }
body.is-embedded .atlas-bar { display: none; }
body.is-embedded .atlas-shell { height: 100%; }
.places-panel {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 800;
  width: var(--panel-width);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--line);
  transition: transform .28s ease;
}
.places-collapse-button {
  position: absolute;
  z-index: 910;
  top: 18px;
  left: calc(var(--panel-width) - 54px);
  transition: left .28s ease, box-shadow .28s ease;
}
.places-expand-icon { display: none; }
body.places-collapsed .places-panel { transform: translateX(-101%); }
body.places-collapsed .places-collapse-button { left: 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
body.places-collapsed .places-collapse-icon { display: none; }
body.places-collapsed .places-expand-icon { display: block; }
body.places-collapsed .atlas-bar { grid-template-columns: 0 1fr auto; }
.panel-heading { padding: 25px 24px 18px; }
.eyebrow { margin: 0 0 4px; color: var(--blue); font-size: .66rem; font-weight: 600; text-transform: uppercase; }
.panel-heading h1 { margin: 0; font-family: var(--font-serif); font-size: 2.15rem; line-height: 1.03; font-weight: 400; }
.panel-title-zh { margin: 4px 0 0; color: var(--muted); font-size: .76rem; font-weight: 500; }
.panel-lede { margin: 9px 0 0; color: var(--muted); font-family: var(--font-serif); font-size: .94rem; line-height: 1.32; }
.panel-lede-zh { margin-top: 2px; font-family: var(--font-sans); font-size: .68rem; }

.search-box {
  height: 42px;
  margin: 2px 24px 12px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.search-box:focus-within { background: var(--white); border-color: #aeb2b7; box-shadow: 0 0 0 3px rgba(23, 105, 224, .08); }
.search-box svg { width: 16px; height: 16px; color: var(--muted); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .76rem; }
.search-box input::placeholder { color: #8d9094; }
.search-box kbd { padding: 1px 5px; color: #85888c; background: var(--white); border: 1px solid #d8dadd; border-radius: 3px; font: 10px var(--font-sans); }

.filter-row { display: flex; gap: 5px; padding: 0 24px 13px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-button {
  flex: 0 0 auto;
  min-width: 47px;
  height: 35px;
  padding: 3px 9px;
  display: grid;
  place-content: center;
  gap: 1px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  line-height: 1;
}
.filter-button span { font-size: .64rem; }
.filter-button small { font-size: .51rem; }
.filter-button.is-active { color: var(--white); background: var(--ink); border-color: var(--ink); }

.result-meta { min-height: 38px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-block: 1px solid var(--line); color: var(--muted); font-size: .64rem; }
.result-meta strong { color: var(--ink); font-weight: 600; }
.route-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.route-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.route-toggle span { position: relative; width: 27px; height: 16px; background: #d1d1d1; border-radius: 9px; transition: background .2s; }
.route-toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--white); border-radius: 50%; transition: transform .2s; }
.route-toggle input:checked + span { background: var(--green); }
.route-toggle input:checked + span::after { transform: translateX(11px); }
.route-toggle input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.place-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #c8c8c8 transparent; }
.place-item {
  width: 100%;
  min-height: 82px;
  padding: 10px 24px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 11px;
  text-align: left;
  color: var(--ink);
  background: var(--white);
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.place-item:hover, .place-item.is-active { background: var(--soft); }
.place-item.is-active { box-shadow: inset 3px 0 var(--blue); }
.place-dot { width: 8px; height: 8px; border-radius: 50%; }
.place-dot.city { background: var(--blue); }
.place-dot.nature { background: var(--green); }
.place-dot.culture { background: var(--red); }
.place-dot.island { background: var(--yellow); border: 1px solid #9f7600; }
.place-copy { min-width: 0; }
.place-copy strong, .place-copy small, .place-copy .place-zh { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-copy strong { font-family: var(--font-serif); font-size: 1rem; font-weight: 500; }
.place-copy small { color: var(--muted); font-size: .6rem; }
.place-copy .place-zh { margin-top: 3px; color: #34363a; font-size: .64rem; }
.place-index { color: #a4a7aa; font-size: .58rem; font-variant-numeric: tabular-nums; }
.empty-state { padding: 30px 24px; color: var(--muted); font-family: var(--font-serif); }
.empty-state small { display: block; margin-top: 4px; font-family: var(--font-sans); }
.panel-footer { min-height: 38px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; color: #85888c; border-top: 1px solid var(--line); font-size: .55rem; text-transform: uppercase; }

.map-stage { --detail-offset: 0px; position: absolute; top: 0; right: 0; bottom: 0; left: var(--panel-width); overflow: hidden; background: #dbe1df; transition: left .28s ease; }
body.places-collapsed .map-stage { left: 0; }
body.places-collapsed .leaflet-control-zoom { margin-left: 62px !important; }
#map { position: absolute; inset: 0; z-index: 1; }
.leaflet-container { font-family: var(--font-sans); background: #dbe1df; }
.leaflet-control-zoom { margin: 16px 0 0 16px !important; border: 1px solid var(--line) !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .1) !important; }
.leaflet-control-zoom a { width: 34px !important; height: 34px !important; line-height: 32px !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { padding: 2px 5px !important; background: rgba(255, 255, 255, .88) !important; font-size: 9px !important; }
.atlas-marker { position: relative; width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid var(--white); border-radius: 50%; box-shadow: 0 1px 5px rgba(0, 0, 0, .4); transition: transform .18s; }
.atlas-marker::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--white); }
.atlas-marker:hover { transform: scale(1.18); }
.atlas-marker.city { background: var(--blue); }
.atlas-marker.nature { background: var(--green); }
.atlas-marker.culture { background: var(--red); }
.atlas-marker.island { background: var(--yellow); }
.marker-cluster { background: transparent !important; }
.marker-cluster div { margin: 0 !important; background: transparent !important; }
.atlas-cluster { width: 42px; height: 42px; display: grid; place-items: center; color: var(--white); background: rgba(20, 22, 26, .88); border: 3px solid rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 2px 9px rgba(0, 0, 0, .28); font-size: .68rem; font-weight: 600; backdrop-filter: blur(8px); }
.leaflet-tooltip.atlas-tooltip { padding: 7px 9px; color: var(--ink); background: var(--white); border: 0; border-radius: 6px; box-shadow: 0 3px 10px rgba(0, 0, 0, .17); }
.leaflet-tooltip.atlas-tooltip::before { display: none; }
.atlas-tooltip strong, .atlas-tooltip small { display: block; }
.atlas-tooltip strong { font-family: var(--font-serif); font-size: 13px; font-weight: 500; }
.atlas-tooltip small { color: var(--muted); font-size: 10px; }
.journey-line { filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .82)); }

.layer-button { position: absolute; z-index: 510; top: 16px; right: calc(16px + var(--detail-offset)); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); transition: right .28s ease; }
.layer-menu {
  position: absolute;
  z-index: 509;
  top: 62px;
  right: calc(16px + var(--detail-offset));
  width: 316px;
  padding: 14px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-5px);
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(218, 220, 223, .95);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .17);
  backdrop-filter: blur(20px) saturate(1.25);
  transition: right .28s ease, opacity .18s, transform .18s, visibility .18s;
}
.layer-menu.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
.layer-menu-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.layer-menu-heading strong { font-size: .78rem; }
.layer-menu-heading span { color: var(--muted); font-size: .62rem; }
.layer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.layer-option { min-width: 0; padding: 5px 5px 7px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; cursor: pointer; text-align: left; }
.layer-option:hover { background: var(--soft); }
.layer-option.is-active { color: var(--ink); background: #f2f6fc; border-color: rgba(23, 105, 224, .42); }
.layer-option > span { display: block; margin-top: 5px; overflow: hidden; font-size: .61rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.layer-option small { display: block; margin-top: 1px; color: var(--muted); font-size: .52rem; font-weight: 400; }
.layer-swatch { position: relative; display: block; width: 100%; height: 48px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .12); border-radius: 5px; background: #e5ebdf; }
.layer-swatch::before, .layer-swatch::after { content: ""; position: absolute; background: currentColor; transform: rotate(-21deg); }
.layer-swatch::before { width: 130%; height: 3px; top: 14px; left: -12px; }
.layer-swatch::after { width: 90%; height: 2px; top: 31px; left: 13px; transform: rotate(28deg); }
.layer-swatch.clarity { color: #f5a623; background: #dcebd2; }
.layer-swatch.street { color: #f1f1f1; background: #d9d4c8; }
.layer-swatch.mono { color: #fff; background: #c7c9cc; }
.layer-swatch.night { color: #506c8e; background: #20272d; }
.layer-swatch.terrain { color: #8caa73; background: #ded8bd; }
.layer-swatch.satellite { color: #94ac80; background: #456773; }

.map-key { position: absolute; z-index: 500; left: 16px; bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px 13px; max-width: calc(100% - 32px); padding: 8px 10px; color: var(--muted); background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 7px; backdrop-filter: blur(12px); font-size: .59rem; }
.map-key span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.key-dot { width: 7px; height: 7px; border-radius: 50%; }
.key-dot.city { background: var(--blue); }
.key-dot.nature { background: var(--green); }
.key-dot.culture { background: var(--red); }
.key-dot.island { background: var(--yellow); border: 1px solid #9f7600; }
.map-reset { position: absolute; z-index: 500; top: 92px; left: 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.map-loading { position: absolute; inset: 0; z-index: 650; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink); background: var(--soft); transition: opacity .3s, visibility .3s; }
.map-loading.is-hidden { opacity: 0; visibility: hidden; }
.map-loading span { width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
.map-loading strong { font-family: var(--font-serif); font-weight: 400; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail-panel { position: absolute; z-index: 900; top: 0; right: 0; bottom: 0; width: min(390px, calc(100% - var(--panel-width))); overflow-y: auto; background: var(--white); border-left: 1px solid var(--line); box-shadow: -12px 0 30px rgba(0, 0, 0, .08); transform: translateX(101%); transition: transform .28s ease; }
.detail-panel.is-open { transform: translateX(0); }
.detail-close { position: absolute; z-index: 2; top: 14px; right: 14px; }
.detail-color { height: 108px; background-color: var(--blue); background-position: center; background-size: cover; border-bottom: 7px solid rgba(255, 255, 255, .3); transition: height .24s ease; }
.detail-panel[data-category="nature"] .detail-color { background-color: var(--green); }
.detail-panel[data-category="culture"] .detail-color { background-color: var(--red); }
.detail-panel[data-category="island"] .detail-color { background-color: var(--yellow); }
.detail-panel.has-photo .detail-color { height: 190px; }
.detail-panel.has-photo .detail-close { color: var(--white); background: rgba(15, 17, 20, .42); border-color: rgba(255, 255, 255, .52); backdrop-filter: blur(10px); }
.detail-panel.has-photo .detail-close:hover { background: rgba(15, 17, 20, .62); border-color: rgba(255, 255, 255, .78); }
body.is-embedded .detail-panel.is-open .detail-close { right: 164px; }
.detail-content { padding: 24px 28px 36px; }
.detail-kicker { margin: 0 0 6px; color: var(--muted); font-size: .61rem; text-transform: uppercase; }
.detail-content h2 { margin: 0; font-family: var(--font-serif); font-size: 2rem; line-height: 1.03; font-weight: 400; }
.detail-maori { min-height: 16px; margin: 5px 0 0; color: var(--muted); font-family: var(--font-serif); font-size: .92rem; font-style: italic; }
.detail-title-zh { margin: 7px 0 0; font-size: .93rem; font-weight: 600; }
.detail-summary { margin: 20px 0 5px; font-family: var(--font-serif); font-size: 1.03rem; line-height: 1.5; }
.detail-summary-zh { margin: 0 0 20px; color: #424448; font-size: .76rem; line-height: 1.7; }
.detail-facts { margin: 0; border-top: 1px solid var(--line); }
.detail-facts div { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-facts dt { color: var(--muted); font-size: .62rem; }
.detail-facts dt small, .detail-facts dd small { display: block; margin-top: 2px; color: #8a8d91; font-size: .54rem; }
.detail-facts dd { margin: 0; font-size: .69rem; line-height: 1.45; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; }
.detail-tags span { padding: 4px 7px; color: var(--muted); background: var(--soft); border-radius: 4px; font-size: .58rem; }
.detail-panel.has-guide { width: min(540px, calc(100% - var(--panel-width))); }
body.places-collapsed .detail-panel { width: min(390px, 100%); }
body.places-collapsed .detail-panel.has-guide { width: min(540px, 100%); }
.city-guide { margin-top: 28px; border-top: 1px solid var(--ink); }
.city-guide[hidden] { display: none; }
.guide-lead, .guide-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.guide-eyebrow { margin: 0 0 8px; color: var(--blue); font-size: .58rem; font-weight: 600; text-transform: uppercase; }
.guide-lead h3, .guide-section h3, .guide-gallery h3 { margin: 0; font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.1; font-weight: 400; }
.guide-lead h3 small, .guide-section h3 small, .guide-gallery h3 small { display: block; margin-top: 5px; color: var(--muted); font-family: var(--font-sans); font-size: .62rem; font-weight: 500; }
.guide-lead > p, .guide-section-copy { margin: 14px 0 0; color: #303236; font-family: var(--font-serif); font-size: .93rem; line-height: 1.58; }
.guide-lead > p + p, .guide-section-copy + .guide-section-copy { margin-top: 6px; color: var(--muted); font-family: var(--font-sans); font-size: .69rem; line-height: 1.72; }
.guide-list { display: grid; margin: 18px 0 0; padding: 0; list-style: none; }
.guide-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.guide-number { padding-top: 2px; color: var(--blue); font-size: .56rem; font-weight: 600; }
.guide-item strong { display: block; font-family: var(--font-serif); font-size: .9rem; line-height: 1.25; font-weight: 500; }
.guide-item strong small { display: inline; color: var(--muted); font-family: var(--font-sans); font-size: .6rem; font-weight: 500; }
.guide-item p { margin: 6px 0 0; color: #44474b; font-size: .67rem; line-height: 1.6; }
.guide-item p + p { margin-top: 3px; color: var(--muted); font-size: .61rem; line-height: 1.7; }
.guide-routes { display: grid; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); }
.guide-route { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.guide-route dt { color: var(--blue); font-size: .61rem; font-weight: 600; }
.guide-route dt small { display: block; margin-top: 3px; color: var(--muted); font-size: .55rem; font-weight: 500; }
.guide-route dd { margin: 0; color: #3e4145; font-family: var(--font-serif); font-size: .79rem; line-height: 1.5; }
.guide-route dd small { display: block; margin-top: 5px; color: var(--muted); font-family: var(--font-sans); font-size: .61rem; line-height: 1.65; }
.guide-note { margin: 18px 0 0; padding-left: 12px; border-left: 2px solid var(--yellow); color: var(--muted); font-size: .61rem; line-height: 1.7; }
.guide-gallery { padding: 24px 0 4px; border-bottom: 1px solid var(--line); }
.guide-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 9px; margin-top: 18px; }
.guide-photo { min-width: 0; margin: 0; }
.guide-photo:first-child { grid-column: 1 / -1; }
.guide-photo-button { display: block; width: 100%; padding: 0; overflow: hidden; background: #e9ebea; border: 0; border-radius: 4px; cursor: zoom-in; }
.guide-photo-button img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .32s ease, filter .32s ease; }
.guide-photo:first-child .guide-photo-button img { aspect-ratio: 4 / 3; object-position: 50% 70%; }
.guide-photo-button:hover img { transform: scale(1.018); filter: saturate(1.04); }
.guide-photo figcaption { padding: 8px 2px 0; }
.guide-photo figcaption strong { display: block; font-family: var(--font-serif); font-size: .75rem; line-height: 1.25; font-weight: 500; }
.guide-photo figcaption strong small { color: var(--muted); font-family: var(--font-sans); font-size: .54rem; font-weight: 500; }
.guide-photo figcaption p { margin: 5px 0 0; color: #44474b; font-size: .58rem; line-height: 1.55; }
.guide-photo figcaption p + p { margin-top: 2px; color: var(--muted); font-size: .55rem; line-height: 1.6; }
.guide-photo-credit { display: inline-block; margin-top: 6px; color: var(--blue); font-size: .52rem; text-decoration: none; }
.guide-photo-credit:hover { text-decoration: underline; }

.gallery-viewer { position: fixed; z-index: 2000; inset: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 16px; padding: 38px 30px 30px; color: var(--white); background: rgba(9, 11, 13, .96); }
.gallery-viewer[hidden] { display: none; }
.gallery-viewer figure { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(240px, .55fr); align-items: center; gap: 28px; min-width: 0; max-width: 1320px; max-height: calc(100vh - 72px); margin: 0 auto; }
.gallery-viewer figure img { display: block; max-width: 100%; max-height: calc(100vh - 76px); margin: auto; object-fit: contain; }
.gallery-viewer figcaption { max-width: 360px; }
.gallery-viewer-count { display: block; margin-bottom: 14px; color: #aeb2b6; font-size: .6rem; }
.gallery-viewer figcaption strong { display: block; font-family: var(--font-serif); font-size: 1.55rem; line-height: 1.08; font-weight: 400; }
.gallery-viewer figcaption small { display: block; margin-top: 6px; color: #c2c5c8; font-size: .68rem; }
.gallery-viewer figcaption p { margin: 20px 0 0; color: #f2f3f4; font-family: var(--font-serif); font-size: .9rem; line-height: 1.55; }
.gallery-viewer figcaption .gallery-viewer-caption-zh { margin-top: 7px; color: #bfc3c6; font-family: var(--font-sans); font-size: .65rem; line-height: 1.7; }
.gallery-viewer figcaption a { display: inline-block; margin-top: 20px; color: #8db8ff; font-size: .62rem; text-decoration: none; }
.gallery-viewer figcaption a:hover { text-decoration: underline; }
.gallery-viewer-close { position: absolute; top: 18px; right: 18px; color: var(--white); background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); }
.gallery-viewer-arrow { color: var(--white); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); }
.gallery-viewer-prev { justify-self: end; }
.gallery-viewer-next { justify-self: start; }

@media (max-width: 880px) {
  :root { --panel-width: 312px; }
  .atlas-title span:not(.color-mark) { display: none; }
  .detail-panel { width: calc(100% - var(--panel-width)); }
}

@media (max-width: 680px) {
  :root { --bar-height: 58px; }
  .atlas-bar { grid-template-columns: 1fr auto 1fr; }
  .atlas-title { grid-column: 2; padding: 0; }
  .atlas-title strong { font-size: 1.18rem; }
  .atlas-title .color-mark { display: none; }
  .back-link { left: 10px; }
  .island-switch { display: none; }
  .mobile-places-button { display: inline-grid; grid-column: 3; justify-self: end; }
  .places-collapse-button { display: none; }
  .map-stage { inset: 0; }
  .places-panel { z-index: 950; width: min(89vw, 356px); transform: translateX(-101%); transition: transform .28s ease; box-shadow: 8px 0 24px rgba(0, 0, 0, .13); }
  .places-panel.is-open { transform: translateX(0); }
  .panel-heading { padding-top: 20px; }
  .detail-panel { z-index: 960; top: auto; width: 100%; max-height: 72%; border-top: 1px solid var(--line); border-left: 0; transform: translateY(101%); }
  .detail-panel.has-guide { width: 100%; max-height: 88%; }
  .detail-panel.is-open { transform: translateY(0); }
  .detail-color { height: 64px; }
  .detail-panel.has-photo .detail-color { height: 150px; }
  body.is-embedded .detail-panel.is-open .detail-close { right: 14px; }
  .detail-content { padding: 20px 22px 30px; }
  .detail-content h2 { font-size: 1.7rem; }
  .guide-lead h3, .guide-section h3, .guide-gallery h3 { font-size: 1.3rem; }
  .gallery-viewer { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 5px; padding: 58px 8px 18px; }
  .gallery-viewer figure { display: block; max-height: calc(100vh - 76px); overflow-y: auto; }
  .gallery-viewer figure img { max-height: 62vh; }
  .gallery-viewer figcaption { max-width: none; padding: 16px 10px 0; }
  .gallery-viewer figcaption strong { font-size: 1.25rem; }
  .gallery-viewer-arrow { width: 36px; height: 36px; }
  .layer-button { top: 12px; right: 12px; }
  .layer-menu { top: 58px; right: 12px; width: min(316px, calc(100% - 24px)); }
  .map-reset { top: 84px; left: 12px; }
  .map-key { display: none; }
  .leaflet-control-zoom { margin: 12px 0 0 12px !important; }
}

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