:root {
  --paper: #ffffff;
  --paper-light: #ffffff;
  --ink: #12221d;
  --muted: #607068;
  --line: #d4d8c9;
  --teal: #1a6c61;
  --teal-light: #a7c9b7;
  --gold: #b68a30;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); cursor: default; }
button, a { font: inherit; }
button, a, summary, label[for] { cursor: pointer; }
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]), textarea { cursor: text; user-select: text; -webkit-user-select: text; }
.topbar, .map-explorer { user-select: none; -webkit-user-select: none; }

.page-shell { min-height: 100vh; padding-top: var(--site-header-height,78px); overflow: hidden; background: var(--paper); }
.topbar { height: 78px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(18, 34, 29, .13); background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); position: fixed; inset: 0 0 auto; z-index: 1000; }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: 11px; text-decoration: none; letter-spacing: .02em; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; color: var(--paper-light); background: var(--ink); font-family: var(--serif); font-size: 21px; border-radius: 50% 46% 50% 43%; }
.brand strong { display: block; font-size: 15px; font-weight: 750; }
.brand em { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-style: normal; letter-spacing: .12em; text-transform: uppercase; }
nav { display: flex; gap: 32px; margin-left: 55px; }
nav a { position: relative; color: #68736c; text-decoration: none; font-size: 13px; }
nav a.is-current, nav a:hover { color: var(--ink); }
nav a.is-current::after { content: ''; position: absolute; left: 1px; right: 1px; bottom: -12px; height: 2px; background: var(--teal); }
.top-actions { display: flex; align-items: center; gap: 18px; }
.text-button, .outline-button { color: var(--ink); border: 0; background: none; font-weight: 650; font-size: 13px; }
.avatar-button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #d3a33d; color: #fffaf1; font-size: 12px; font-weight: 700; }

.world-stage { height: calc(100vh - var(--site-header-height,78px)); min-height: 580px; position: relative; isolation: isolate; background: #fff; overflow: hidden; }
.world-meta { position:absolute; z-index:35; left:50%; bottom:max(12px,calc(100% - (100vh - var(--site-header-height,78px)) + 12px)); display:flex; align-items:center; justify-content:center; gap:10px; padding:6px 10px; color:#718078; font-size:10px; transform:translateX(-50%); white-space:nowrap; }
.world-meta[hidden] { display:none; }
.world-public-security-filing { display:inline-flex;align-items:center;gap:3px;color:inherit;text-decoration:none; }
.world-public-security-filing img { display:block;width:14px;height:14px;object-fit:contain; }
.world-filing-number { color:inherit; text-decoration:none; }
.world-public-security-filing:hover,.world-public-security-filing:focus-visible,.world-filing-number:hover,.world-filing-number:focus-visible { color:var(--teal); text-decoration:underline; }
.world-contact { position:relative; }
.world-contact summary { list-style:none; padding:4px 8px; border:1px solid rgba(23,111,98,.18); border-radius:999px; color:var(--teal); background:rgba(255,255,255,.82); cursor:pointer; }
.world-contact summary::-webkit-details-marker { display:none; }
.world-contact>div { position:absolute; right:0; bottom:calc(100% + 7px); padding:9px 11px; border:1px solid rgba(23,111,98,.16); border-radius:10px; background:rgba(255,255,255,.96); box-shadow:0 10px 26px rgba(24,60,49,.12); }
.world-contact a { color:var(--teal); text-decoration:none; }
.world-contact a:hover,.world-contact a:focus-visible { text-decoration:underline; }
.hero-copy { position: absolute; z-index: 2; width: 340px; top: 12.5vh; left: 8.2vw; }
.eyebrow { margin: 0 0 16px; color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: .17em; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.045em; }
h1 { font-size: clamp(48px, 4.55vw, 76px); line-height: 1.03; }
.hero-lead { margin: 25px 0 30px; max-width: 315px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 11px 18px; padding-top: 21px; border-top: 1px solid rgba(18, 34, 29, .19); color: var(--muted); font-size: 10px; }
.hero-meta b { margin-right: 4px; color: var(--ink); font-family: var(--serif); font-size: 19px; font-weight: 500; }

.world-map-wrap { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.sketch-map { position: absolute; left: 50%; top: 49%; width: min(88vw, 1320px); transform: translate(-50%, -50%) scale(1); transform-origin: center; transition: transform .35s ease; }
.world-map { display: block; width: 100%; max-height: 78vh; object-fit: contain; overflow: visible; filter: saturate(.72) contrast(.96); }
.sketch-stroke { position: absolute; inset: 0; background: url('./assets/world-map.svg') center / contain no-repeat; pointer-events: none; mix-blend-mode: multiply; filter: sepia(.28) saturate(.75) hue-rotate(95deg); }
.sketch-stroke--one { transform: translate(1.5px, -1px); opacity: .16; }
.sketch-stroke--two { transform: translate(-1px, 1.5px); opacity: .1; }
.map-grid path { fill: none; stroke: #cfd9cc; stroke-width: 1; stroke-dasharray: 3 8; opacity: .65; }
.landmasses path { fill: rgba(177, 200, 182, .5); stroke: #75a290; stroke-width: 1.2; stroke-linejoin: round; }
.landmasses .china-land { fill: rgba(37, 115, 99, .36); stroke: var(--teal); stroke-width: 2; }
.sea-labels text { fill: #a4b1a7; font-family: var(--serif); font-size: 13px; letter-spacing: .45em; }
.country-point { position: absolute; left: 78.5%; top: 36.5%; width: 190px; height: 70px; padding: 0; border: 0; color: var(--ink); background: transparent; cursor: pointer; outline: none; transform: translate(-8px, -8px); }
.country-point .pulse { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border: 1px solid rgba(26,108,97,.38); border-radius: 50%; background: rgba(26,108,97,.12); animation: pulse 2.6s infinite; }
.point-core { position: absolute; left: 11px; top: 11px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px rgba(18,34,29,.18); }
.point-label { position: absolute; left: 42px; top: -1px; display: flex; flex-direction: column; align-items: flex-start; white-space: nowrap; text-align: left; }
.point-label::before { content: ''; position: absolute; left: -25px; top: 17px; width: 20px; border-top: 1px solid currentColor; opacity: .45; }
.point-label strong { font-size: 14px; }
.point-label small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.locked-mark circle { fill: #c3cabb; }
.map-caption { position: absolute; bottom: 7.8vh; right: 2vw; margin: 0; color: #78837b; font-family: var(--serif); font-size: 13px; font-style: italic; }
@keyframes pulse { 0%, 100% { transform: scale(.82); opacity: .5; } 50% { transform: scale(1.18); opacity: 1; } }

.map-toolbar { position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; right: 3.2vw; top: 5vh; padding: 8px; border: 1px solid rgba(18,34,29,.1); border-radius: 23px; background: rgba(255,255,255,.92); box-shadow: 0 9px 22px rgba(30,55,40,.07); }
.round-control { width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--ink); background: transparent; font-size: 22px; line-height: 1; }
.round-control:hover { background: #e7ecdf; }
.compass { color: var(--teal); font-family: var(--serif); font-size: 12px; font-weight: 700; }
.toolbar-rule { width: 17px; height: 1px; background: #d6dacf; }

.country-card { position: absolute; z-index: 4; width: 280px; padding: 24px; right: 5vw; bottom: 5vh; border: 1px solid rgba(18,34,29,.11); border-radius: 4px 21px 4px 21px; background: rgba(255,255,255,.96); box-shadow: 0 18px 42px rgba(27,51,38,.14); transition: opacity .2s, transform .2s; }
.country-card:not(.is-visible) { opacity: 0; pointer-events: none; transform: translateY(10px); }
.close-card { position: absolute; top: 13px; right: 14px; border: 0; color: var(--muted); background: transparent; font-size: 21px; }
.card-kicker { color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.card-kicker span { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--gold); }
.country-card h2 { margin-top: 11px; font-size: 39px; }
.country-card p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.country-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 17px 0; }
.country-stats span { padding: 5px 7px; border-radius: 20px; background: #edf1e6; color: #516058; font-size: 9px; }
.primary-button { width: 100%; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 3px 13px 3px 13px; color: var(--paper-light); background: var(--teal); font-size: 12px; font-weight: 750; transition: transform .2s, background .2s; }
.primary-button:hover { background: #155c53; transform: translateY(-1px); }
.primary-button i { font-size: 18px; font-style: normal; font-weight: 400; }

.entry-preview { min-height: 250px; padding: 70px 9vw; display: flex; justify-content: space-between; align-items: end; border-top: 1px solid rgba(18,34,29,.13); background: var(--ink); color: var(--paper-light); }
.entry-preview .eyebrow { color: #a9cdb9; }
.entry-preview h2 { font-size: 42px; line-height: 1.04; }
.outline-button { padding: 12px 0; border-bottom: 1px solid #c8d7cc; color: #eff2ea; }
.outline-button span { margin-left: 17px; color: #d5b25a; font-size: 17px; }

.china-dialog { width: 440px; padding: 35px; border: 0; border-radius: 5px 26px 5px 26px; color: var(--ink); background: var(--paper-light); box-shadow: 0 20px 90px rgba(0,0,0,.28); }
.china-dialog::backdrop { background: rgba(9,29,23,.45); backdrop-filter: blur(3px); }
.china-dialog h2 { font-size: 37px; }
.china-dialog p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.8; }
.dialog-close { position: absolute; right: 15px; top: 10px; border: 0; background: none; font-size: 24px; color: var(--muted); }
.flow { display: flex; align-items: center; gap: 9px; margin: 24px 0; color: #829087; font-size: 11px; }
.flow b { color: var(--gold); font-weight: 400; }
.flow .active { color: var(--teal); font-weight: 750; }

.top-actions { position: relative; }
.settings-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 0; border-radius: 18px; color: var(--ink); background: transparent; font-size: 12px; font-weight: 650; }
.settings-button:hover, .settings-button[aria-expanded="true"] { background: #f1f4f2; }
.settings-glyph { color: var(--teal); font-size: 17px; }
.settings-panel { position: absolute; top: 49px; right: 44px; width: 210px; padding: 15px; border: 1px solid rgba(18,34,29,.12); border-radius: 14px; background: rgba(255,255,255,.98); box-shadow: 0 16px 42px rgba(18,34,29,.15); }
.settings-panel p { margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.theme-option { padding: 10px 7px; border: 1px solid #dde4df; border-radius: 10px; color: #53615b; background: #fff; font-size: 11px; }
.theme-option span { display: block; margin-bottom: 4px; font-size: 16px; }
.theme-option.is-active { border-color: var(--teal); color: var(--teal); background: #f0f7f4; }

:root[data-theme="night"] { --paper: #07100e; --paper-light: #111b18; --ink: #edf4f0; --muted: #94a59e; --line: #263630; --teal: #55ab99; --teal-light: #315b50; --gold: #d5a83f; }
:root[data-theme="night"] body,
:root[data-theme="night"] .page-shell,
:root[data-theme="night"] .world-stage { background: #07100e; }
:root[data-theme="night"] .world-stage::before { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(circle at 77% 31%, rgba(55,132,112,.18), transparent 26%), radial-gradient(circle at 20% 13%, rgba(210,222,214,.055) 0 1px, transparent 1.5px); background-size: auto, 44px 44px; }
:root[data-theme="night"] .world-meta { color:#91a39a; }
:root[data-theme="night"] .world-contact summary,:root[data-theme="night"] .world-contact>div { border-color:#30483f; background:rgba(23,37,31,.94); }
:root[data-theme="night"] .topbar { border-color: rgba(222,240,232,.12); background: rgba(7,16,14,.92); }
:root[data-theme="night"] nav a { color: #8d9d96; }
:root[data-theme="night"] nav a.is-current,
:root[data-theme="night"] nav a:hover { color: var(--ink); }
:root[data-theme="night"] .brand-mark { color: #07100e; background: #edf4f0; }
:root[data-theme="night"] .avatar-button { color: #07100e; }
:root[data-theme="night"] .settings-button:hover,
:root[data-theme="night"] .settings-button[aria-expanded="true"] { background: #15211d; }
:root[data-theme="night"] .settings-panel { border-color: #293832; background: rgba(17,27,24,.98); }
:root[data-theme="night"] .theme-option { border-color: #34443e; color: #a7b6b0; background: #0c1613; }
:root[data-theme="night"] .theme-option.is-active { border-color: var(--teal); color: #bce6da; background: #17332c; }
:root[data-theme="night"] .map-toolbar { border-color: rgba(230,245,238,.12); background: rgba(17,27,24,.92); }
:root[data-theme="night"] .round-control { color: var(--ink); }
:root[data-theme="night"] .round-control:hover { background: #22312c; }
:root[data-theme="night"] .world-map--base { filter: invert(1) brightness(.39) sepia(.18) saturate(.8) hue-rotate(86deg); opacity: .86; }
:root[data-theme="night"] .sketch-stroke { mix-blend-mode: screen; filter: invert(1) brightness(.52) sepia(.32) saturate(.65) hue-rotate(82deg); opacity: .13; }
:root[data-theme="night"] .point-core { border-color: #07100e; }
:root[data-theme="night"] .country-card { border-color: #2b3d36; background: rgba(17,27,24,.96); box-shadow: 0 22px 55px rgba(0,0,0,.42); }
:root[data-theme="night"] .country-stats span { color: #abc0b7; background: #1d2c27; }
:root[data-theme="night"] .china-dialog { color: var(--ink); background: #111b18; }
:root[data-theme="night"] .china-dialog::backdrop { background: rgba(0,0,0,.65); }

@media (max-width: 980px) {
  .topbar { padding: 0 20px; }
  .brand em { display: none; }
  nav { gap: 15px; margin-left: 10px; }
  nav a { font-size: 13px; }
  .settings-button { gap: 0; padding: 8px; font-size: 0; }
  .settings-glyph { font-size: 18px; }
  .sketch-map { width: 105vw; }
  .country-point { left: 78%; top: 36%; }
  .country-card { right: 20px; bottom: 20px; }
}

@media (max-width: 1100px) { body { min-width: 0; } .topbar { padding: 0 28px; } nav { gap: 18px; margin-left: 0; } .world-stage { min-height: 660px; } .hero-copy { left: 5vw; width: 280px; } .world-map-wrap { inset-left: 20vw; } .country-card { right: 4vw; } }

/* Rotating, borderless map prototype */
:root[data-theme="day"] { --paper: #fff; --paper-light: #fff; --ink: #10211c; --muted: #64736c; --line: #d9e0dc; --teal: #176f62; --gold: #b98a2b; }
:root[data-theme="day"] body,
:root[data-theme="day"] .page-shell,
:root[data-theme="day"] .world-stage { background: #fff; }

.settings-glyph { width: 19px; height: 19px; color: var(--teal); fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.level-nav { position: absolute; z-index: 8; top: 24px; left: 4vw; display: flex; align-items: center; gap: 0; touch-action:none; }
.level-crumb { position: relative; padding: 8px 19px 8px 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 650; }
.level-crumb + .level-crumb { padding-left: 22px; }
.level-crumb + .level-crumb::before { content: '›'; position: absolute; left: 5px; color: #a7b1ac; }
.level-crumb.is-current { color: var(--ink); }

.map-explorer { --map-edge-inset:clamp(12px,2.4vw,42px); position: absolute; inset: 0; display: grid; grid-template-columns: clamp(104px, 14vw, 190px) minmax(0, 1fr) clamp(104px, 14vw, 190px); align-items: center; gap: clamp(4px, 1vw, 18px); padding: 10px var(--map-edge-inset) 10px; }
.map-explorer.is-world-explorer { padding-right:0; padding-bottom:72px; padding-left:0; }
.map-explorer.is-world-explorer .globe-window { margin-inline:0; }
.globe-window { position: relative; z-index: 7; grid-column: 1 / 4; grid-row: 1; width: auto; height: min(82vh, 790px); min-height: 470px; margin-inline: clamp(38px, 5.5vw, 96px); overflow: hidden; background: transparent; perspective: 1000px; cursor: grab; touch-action: none; }
.globe-window::after { display: none; }
.globe-window.is-dragging { cursor: grabbing; }
.map-belt { position: absolute; left: 0; top: 50%; z-index: 10; width: max-content; height: 100%; display: flex; align-items: center; transform: translateY(-50%); rotate: 0deg; transform-origin: center; animation: none !important; }
#globe-window { touch-action:none; }
#globe-window.is-world-zoomed { cursor:grab; }
#globe-window.is-world-zoomed.is-dragging { cursor:grabbing; }
.country-mosaic { position: relative; height: calc(var(--world-mosaic-height,225%) * var(--world-overview-fit,1)); width: auto; flex: 0 0 auto; aspect-ratio: 360 / 182.592; overflow: visible; pointer-events: none; transform: scale(1.25); transform-origin: center; }
.country-piece { position: absolute; z-index: 1; display: block; overflow: visible; outline: none; cursor: pointer; pointer-events: none; filter: drop-shadow(.7px 1px 0 rgba(31,77,64,.08)); transition: filter .22s ease, translate .22s ease; backface-visibility: hidden; }
.country-piece g { pointer-events: none; }
.country-piece path,
.country-piece polygon,
.country-piece circle,
.country-piece ellipse { pointer-events: visiblePainted; cursor: pointer; }
.country-piece .country-expanded-hit-area { pointer-events: all; cursor: pointer; }
.country-piece g,
.country-piece path { fill: #f6f8f7 !important; stroke: #77958a !important; stroke-width: .19 !important; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill .22s ease, stroke .22s ease; }
.country-piece[data-shade="soft"] g,
.country-piece[data-shade="soft"] path { fill: #eef4f1 !important; }
.country-piece[data-shade="light"] g,
.country-piece[data-shade="light"] path { fill: #fafcfb !important; }
.country-piece:hover g,
.country-piece:hover path,
.country-piece:focus-visible g,
.country-piece:focus-visible path { fill: #dcebe5 !important; stroke: #477b6d !important; }
.country-piece.is-open-country g,
.country-piece.is-open-country path { fill: #8fc2b2 !important; stroke: #176f62 !important; stroke-width: .34 !important; }
.floating-map-layer { position: absolute; inset: 0; z-index: 11; overflow: visible; pointer-events: none; }
.random-map-name { position: absolute; color: #173d32; font-family: var(--serif); font-size: 12px; font-weight: 750; line-height: 1; letter-spacing: .04em; text-align: center; white-space: nowrap; transform: translate(-50%, -50%); text-shadow: 0 1px 0 #fff, 1px 0 0 #fff, -1px 0 0 #fff, 0 -1px 0 #fff, 0 4px 12px rgba(20,55,44,.2); animation: map-name-appear .34s ease-out both; }
.random-map-name[hidden] { display: none; }
.random-map-name.is-open { color: #075f50; }
.country-piece.is-random-floating { z-index: 8; animation: country-fragment-float 3.8s ease-in-out var(--float-delay, 0s) infinite; filter: drop-shadow(3px 7px 3px rgba(31,77,64,.22)); }
.country-piece.is-random-floating g,
.country-piece.is-random-floating path { fill: #cce5dc !important; stroke: #267361 !important; }
.china-map-svg .province-shape.is-random-floating,
.guangxi-map-svg .city-shape.is-random-floating { transform-box: fill-box; transform-origin: center; animation: region-fragment-float 3.8s ease-in-out var(--float-delay, 0s) infinite; filter: drop-shadow(5px 9px 4px rgba(31,77,64,.2)); fill: #c8e2d8 !important; stroke: #176f62 !important; stroke-width: 1.8 !important; }
.guangxi-map-svg .city-shape-group.is-floating { transform-box: fill-box; transform-origin: center; animation: region-fragment-float 3.8s ease-in-out var(--float-delay, 0s) infinite; filter: drop-shadow(5px 9px 4px rgba(31,77,64,.2)); }
.guangxi-map-svg .city-shape-group.is-floating .city-shape.is-random-floating { animation: none; filter: none; }
@keyframes map-name-appear { from { opacity: 0; scale: .82; } to { opacity: 1; scale: 1; } }
@keyframes country-fragment-float { 0%,100% { translate: 0 -3px; } 50% { translate: 0 -9px; } }
@keyframes region-fragment-float { 0%,100% { transform: translateY(-3px) scale(1.01); } 50% { transform: translateY(-8px) scale(1.025); } }
.world-inline-map { width: 50%; height: auto; flex: 0 0 50%; overflow: visible; transform: scale(1.16); transform-origin: center; }
.world-inline-map .water,
.world-inline-map circle { display: none !important; }
.world-inline-map .country { fill: #f6f8f7 !important; stroke: #77958a !important; stroke-width: .19 !important; stroke-linecap: round; stroke-linejoin: round; transition: fill .25s, opacity .25s; }
.world-inline-map .country:nth-of-type(3n) { fill: #eef4f1 !important; }
.world-inline-map .country:nth-of-type(4n) { fill: #f9fbfa !important; }
.world-inline-map .country:hover { fill: #dcebe5 !important; }
.world-inline-map .is-open-country path { fill: #8fc2b2 !important; stroke: #176f62 !important; stroke-width: .36 !important; cursor: pointer; }
.globe-shadow { display: none; }
@keyframes globe-drift { from { transform: translate(0, -50%); } to { transform: translate(-50%, -50%); } }

.country-rail { position: relative; z-index: 15; grid-row: 1; min-height: 330px; display: flex; flex-direction: column; justify-content: center; gap: 24px; pointer-events: none; opacity: 1; transition: opacity .23s ease, transform .23s ease; }
.country-rail,
.connector-layer { display: none; }
.country-rail.is-transitioning { opacity: 0; }
.country-rail--left.is-transitioning { transform: translateX(-8px); }
.country-rail--right.is-transitioning { transform: translateX(8px); }
.country-rail--left { grid-column: 1; align-items: flex-start; }
.country-rail--right { grid-column: 3; align-items: flex-end; }
.rail-country { position: relative; min-width: 104px; padding: 5px 10px 5px 17px; border: 0; border-radius: 0; color: var(--muted); background: transparent; text-align: left; pointer-events: auto; transition: transform .25s, color .25s; animation: rail-enter .34s ease-out backwards; }
.rail-country:nth-child(2) { animation-delay: .05s; }
.rail-country:nth-child(3) { animation-delay: .1s; }
.rail-country::before { content: ''; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 10%, transparent); }
.country-rail--right .rail-country { text-align: right; }
.country-rail--right .rail-country { padding: 5px 17px 5px 10px; }
.country-rail--right .rail-country::before { left: auto; right: 0; }
.rail-country:hover { color: var(--teal); background: transparent; transform: translateX(4px); opacity: 1; }
.country-rail--right .rail-country:hover { transform: translateX(-4px); }
.rail-country strong { display: block; color: currentColor; font-size: 13px; font-weight: 650; }
.rail-country small { display: block; margin-top: 3px; color: #a0aaa5; font-size: 9px; }
.rail-country.is-open { color: var(--teal); background: transparent; text-shadow: 0 0 18px rgba(23,111,98,.25); }
.rail-country.is-open small { color: var(--teal); }
@keyframes rail-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.connector-layer { position: absolute; inset: 0; z-index: 12; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.connector-layer path { fill: none; stroke: rgba(74,121,105,.38); stroke-width: 1; stroke-dasharray: 2 5; }
.connector-layer circle { fill: var(--gold); stroke: #fff; stroke-width: 2; }
.connector-layer.is-detail path { stroke: rgba(42,112,91,.58); stroke-width: 1.15; stroke-dasharray: 3 5; }
.connector-layer.is-detail circle { fill: var(--gold); r: 3.5; }
.country-hover-label { position: absolute; z-index: 20; min-width: 84px; padding: 8px 12px; border: 1px solid rgba(23,111,98,.28); border-radius: 4px 14px 4px 14px; color: var(--ink); background: rgba(255,255,255,.94); box-shadow: 0 10px 28px rgba(20,55,44,.16); text-align: center; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); transition: left .08s linear, top .08s linear, opacity .18s; backdrop-filter: blur(8px); }
.country-hover-label[hidden] { display: none; }
.detail-hover-label { z-index: 28; }
.country-hover-label::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; border-right: 1px solid rgba(23,111,98,.28); border-bottom: 1px solid rgba(23,111,98,.28); background: inherit; transform: translateX(-50%) rotate(45deg); }
.country-hover-label strong { display: block; font-size: 12px; }
.country-hover-label small { display: block; margin-top: 2px; color: var(--teal); font-size: 8px; }

.rotation-status { position: absolute; z-index: 7; left: 50%; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateX(-50%); }
.rotation-status button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid #dce3df; border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.92); font-size: 10px; }
.rotation-status p { margin: 0; color: #8b9892; font-size: 9px; }
.pause-bars { color: var(--teal); font-weight: 800; }

.detail-stage { position: relative; z-index: 2; height: min(74vh, 700px); grid-column: 1 / 4; grid-row: 1; }
body.map-page .world-stage:has(.map-explorer:not(.is-world-explorer)) { height:calc(100dvh - var(--site-header-height,78px));min-height:0; }
.map-explorer:not(.is-city-explorer) .detail-stage { max-height:calc(100dvh - var(--site-header-height,78px) - 72px); }
.country-detail-map { position: absolute; inset: 0; display: grid; place-items: center; overflow: visible; }
.country-detail-map:not(.guilin-detail-map) { padding:16px;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr); }
.country-detail-map.is-gesture-map { touch-action:none; }
.country-detail-map.is-gesture-map > svg { transform-origin:0 0; will-change:transform; }
.country-detail-map.is-gesture-map.is-detail-zoomed { overflow:hidden; }
.country-detail-map.is-gesture-map.is-detail-zoomed > svg { cursor:grab; }
.country-detail-map.is-gesture-map.is-detail-panning > svg { cursor:grabbing; }
.china-map-svg,.guangxi-map-svg { width:100%;height:100%;overflow:visible;filter:drop-shadow(2px 4px 0 rgba(23,111,98,.1)); }
.china-map-svg .country,
.china-map-svg path { fill: #f2f7f4 !important; stroke: #507f70 !important; stroke-width: .25 !important; stroke-linecap: round; stroke-linejoin: round; }
.china-map-svg .province-boundaries path { fill: none !important; stroke: rgba(80,127,112,.42) !important; stroke-width: .16 !important; stroke-dasharray: .8 1.2; }
.china-map-svg .province-shape { fill: #f2f7f4 !important; stroke: #6e9588 !important; stroke-width: 1.15 !important; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s, stroke .2s; }
.china-map-svg .province-shape:nth-child(3n) { fill: #eaf2ee !important; }
.china-map-svg .province-shape:hover,
.china-map-svg .province-shape:focus-visible { fill: #dcebe5 !important; stroke: #287665 !important; }
.china-map-svg .province-shape.is-open { fill: #b8d8cc !important; stroke: #176f62 !important; stroke-width: 1.8 !important; }
.province-map-point,
.city-map-point,
.street-map-point { cursor: pointer; outline: none; }
.province-map-point,
.city-map-point,
.street-map-point,
.city-pin { opacity: 0; pointer-events: none; transition: opacity .24s ease, transform .24s ease; }
.map-explorer:not(.is-city-explorer) .province-map-point,
.map-explorer:not(.is-city-explorer) .city-map-point { opacity: 0 !important; pointer-events: none !important; }
.province-map-point.is-rail-visible,
.province-map-point.is-interacting,
.city-map-point.is-rail-visible,
.city-map-point.is-interacting,
.street-map-point.is-rail-visible,
.street-map-point.is-interacting,
.city-pin.is-rail-visible,
.city-pin.is-interacting { opacity: 1; pointer-events: auto; }
.province-map-point .point-halo,
.city-map-point .point-halo,
.street-map-point .point-halo { fill: rgba(185,138,43,.11); stroke: none; transition: r .2s, fill .2s; }
.province-map-point .point-core-svg,
.city-map-point .point-core-svg,
.street-map-point .point-core-svg { fill: var(--gold); stroke: #fff; stroke-width: 2; transition: r .2s; }
.province-map-point:hover .point-halo,
.province-map-point:focus-visible .point-halo,
.city-map-point:hover .point-halo,
.city-map-point:focus-visible .point-halo,
.street-map-point:hover .point-halo,
.street-map-point:focus-visible .point-halo { r: 19; fill: rgba(185,138,43,.18); }
.province-map-point:hover .point-core-svg,
.province-map-point:focus-visible .point-core-svg,
.city-map-point:hover .point-core-svg,
.city-map-point:focus-visible .point-core-svg,
.street-map-point:hover .point-core-svg,
.street-map-point:focus-visible .point-core-svg { r: 7; }
.province-map-point.is-open .point-halo,
.city-map-point.is-open .point-halo,
.street-map-point.is-open .point-halo { fill: rgba(23,111,98,.14); }
.province-map-point.is-open .point-core-svg,
.city-map-point.is-open .point-core-svg,
.street-map-point.is-open .point-core-svg { fill: var(--teal); }
.location-pin,
.street-pin { position: absolute; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; }
.province-pin,
.city-pin { position: absolute; z-index: 8; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; transform: translate(-50%, -50%); }
.province-pin span,
.city-pin span { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(185,138,43,.09); transform: translate(-50%, -50%); transition: transform .2s, box-shadow .2s; }
.province-pin:hover span,
.city-pin:hover span,
.province-pin:focus-visible span,
.city-pin:focus-visible span { transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 0 8px rgba(185,138,43,.13); }
.province-pin.is-open span,
.city-pin.is-open span { width: 11px; height: 11px; background: var(--teal); box-shadow: 0 0 0 7px rgba(23,111,98,.11); }
.location-pin span,
.street-pin span { display: block; width: 18px; height: 18px; border: 5px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px rgba(18,34,29,.2), 0 0 0 10px rgba(185,138,43,.09); }
.location-pin strong,
.street-pin strong { display: block; margin-top: 8px; font-size: 14px; }
.location-pin small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.guilin-pin { left: 67%; top: 62%; }
.level-hint { position: absolute; left: 50%; bottom: 0; margin: 0; color: #8a9791; font-family: var(--serif); font-size: 12px; font-style: italic; transform: translateX(-50%); white-space: nowrap; }

.street-sketch { width: min(68vw, 900px); height: min(62vh, 600px); overflow: visible; }
.guilin-real-map { position: relative; left: -18px; width: min(86vw, 1020px); height: min(72vh, 720px); overflow: visible; filter: none; }
.guilin-real-map.is-pannable { cursor: grab; touch-action: none; }
.guilin-real-map.is-panning { cursor: grabbing; user-select: none; }
.guilin-real-map.is-panning .city-map-viewport { transition: none; }
.guilin-real-map .city-poi { cursor: pointer; }
.map-explorer.is-city-explorer .country-rail,
.map-explorer.is-city-explorer .connector-layer { display: none; }
.guilin-detail-map { padding-top: 52px; }
.city-category-bar { position: absolute; z-index: 22; left: 50%; top: 0; width: min(92vw, 920px); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; border: 1px solid rgba(18,34,29,.09); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 10px 26px rgba(30,55,40,.07); transform: translateX(-50%); backdrop-filter: blur(12px); touch-action:none; }
.city-category { min-width: 76px; padding: 7px 11px; border: 0; border-radius: 13px; color: #67756f; background: transparent; font-size: 10px; white-space: nowrap; transition: color .2s, background .2s, transform .2s; }
.city-category span { width: 22px; height: 22px; display: inline-grid; place-items: center; margin-right: 5px; border-radius: 50%; color: var(--teal); background: #edf5f1; font-size: 10px; font-weight: 750; }
.city-category:hover { color: var(--teal); background: #f1f6f3; transform: translateY(-1px); }
.city-category.is-active { color: #fff; background: var(--teal); box-shadow: 0 7px 18px rgba(23,111,98,.17); }
.city-category.is-active span { color: var(--teal); background: #fff; }
.city-category--route { color: #8b671e; }
.city-category--route span { color: #8b671e; background: #f8f0dc; }
.city-route-summary { --route-toggle-overhang:18px; position: absolute; z-index: 24; left: max(4vw, calc(50% - 455px)); top: 96px; display:block; pointer-events: auto; }
.city-route-summary.is-collapsed .city-route-card { display:none; }
.city-route-summary-toggle { position:absolute;z-index:0;right:calc(-1 * var(--route-toggle-overhang));top:50%;display:grid;place-items:center;width:34px;height:50px;padding:0 0 4px 12px;border:1px solid rgba(23,111,98,.17);border-left:0;border-radius:0 13px 13px 0;color:var(--teal);background:rgba(255,255,255,.94);box-shadow:0 8px 20px rgba(43,55,40,.1);font-size:25px;line-height:1;cursor:pointer;transform:translateY(-50%);backdrop-filter:none;-webkit-backdrop-filter:none;-webkit-tap-highlight-color:transparent;}
.city-route-summary.is-collapsed { width:18px;height:50px; }
.city-route-summary.is-collapsed .city-route-summary-toggle { position:relative;right:auto;top:auto;width:18px;height:50px;padding:0 4px 4px 0;border-left:1px solid rgba(23,111,98,.17);border-radius:4px 13px 13px 4px;transform:none; }
.city-route-card { position: relative; z-index: 1; width: 210px; padding: 11px 14px; border: 1px solid rgba(182,138,48,.22); border-radius: 4px 15px 4px 15px; color: var(--ink); background: rgba(255,255,255,.92); box-shadow: 0 10px 25px rgba(43,55,40,.11); pointer-events: auto; transition: transform .2s, box-shadow .2s; backdrop-filter: blur(10px); }
.city-route-card.is-emphasized { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 30px rgba(182,138,48,.2); }
.city-route-card.is-route-muted { opacity: .62; }
.route-card-kicker { display: block; margin-bottom: 4px; color: var(--gold); font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.city-route-card strong { display: block; font-size: 12px; }
.city-route-card small { display: block; margin-top: 4px; color: #78847e; font-size: 8px; }
.route-card-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.route-card-actions button { min-width: 0; min-height: 28px; padding: 0 4px; overflow: hidden; border: 1px solid rgba(23,111,98,.16); border-radius: 9px; color: var(--teal); background: rgba(239,247,243,.92); font-size: 9px; font-weight: 700; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.route-card-actions button:last-child { color: #fff; border-color: var(--teal); background: var(--teal); }
.route-card-actions button:disabled { opacity:.5;cursor:not-allowed; }
.city-route-picker { position: absolute; z-index: 26; top: 88px; right: max(18px, calc(50% - 470px)); width: min(370px, calc(100% - 36px)); padding: 15px; border: 1px solid rgba(23,111,98,.16); border-radius: 18px 6px 18px 18px; background: rgba(255,255,255,.98); box-shadow: 0 18px 45px rgba(30,62,52,.2); backdrop-filter: blur(16px); }
.city-route-picker[hidden] { display: none; }
.city-route-picker header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.city-route-picker .route-picker-heading { display: grid; gap: 2px; }
.city-route-picker header span { color: var(--gold); font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.city-route-picker header strong { font-size: 15px; }
.city-route-picker .route-picker-header-actions { display: flex; align-items: center; gap: 6px; }
.city-route-picker [data-route-picker-guide] { min-height: 28px; padding: 0 9px; border: 1px solid rgba(23,111,98,.14); border-radius: 9px; color: var(--teal); background: #f1f7f4; font-size: 9px; font-weight: 700; }
.city-route-picker [data-route-picker-guide][hidden] { display: none; }
.city-route-picker [data-route-picker-close] { width: 28px; height: 28px; border: 0; border-radius: 50%; color: #60736a; background: #eff5f2; font-size: 19px; line-height: 1; }
.city-route-picker > p { margin: 8px 0 10px; color: #718078; font-size: 9px; line-height: 1.5; }
.city-route-options { display: grid; gap: 5px; max-height: 220px; overflow: auto; }
.city-route-options button { display: grid; gap: 2px; width: 100%; padding: 8px 9px; border: 1px solid rgba(23,111,98,.1); border-radius: 9px; color: var(--ink); background: #f5f8f5; text-align: left; cursor: pointer; }
.city-route-options .route-option-source { color: var(--gold); font-size: 8px; font-weight: 750; }
.city-route-options button strong { font-size: 10px; }
.city-route-options button small { margin: 0; font-size: 8px; }
.city-route-options button.is-active { border-color: rgba(182,138,48,.45); background: #fff8e9; box-shadow: inset 3px 0 0 var(--gold); }
.city-route-editor { position: absolute; z-index: 28; top: 88px; right: max(18px, calc(50% - 470px)); width: min(340px, 38vw); max-height: calc(100% - 128px); padding: 16px; overflow: auto; border: 1px solid rgba(23,111,98,.15); border-radius: 18px 5px 18px 18px; color: var(--ink); background: rgba(255,255,255,.96); box-shadow: 0 18px 45px rgba(23,55,44,.18); backdrop-filter: blur(16px); }
.city-route-editor[hidden] { display: none; }
.city-route-editor header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.city-route-editor header div { display: grid; gap: 2px; }
.city-route-editor header span { color: var(--gold); font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.city-route-editor header strong { font-size: 15px; }
.city-route-editor [data-route-close] { width: 28px; height: 28px; border: 0; border-radius: 50%; color: #60736a; background: #eff5f2; font-size: 19px; line-height: 1; }
.route-mode-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 13px; padding: 4px; border-radius: 12px; background: #f0f5f2; }
.route-mode-group button { min-height: 30px; border: 0; border-radius: 9px; color: #63736c; background: transparent; font-size: 10px; }
.route-mode-group button.is-active { color: #fff; background: var(--teal); box-shadow: 0 5px 12px rgba(23,111,98,.18); }
.route-picker-mode-group { margin: 0 0 10px; }
.route-transport-filter { grid-template-columns: repeat(4, 1fr); }
.route-topology-filter { margin-top: -5px; }
.route-options-empty { margin: 8px 0; padding: 18px 10px; border: 1px dashed rgba(23,111,98,.18); border-radius: 10px; color: #819087; text-align: center; font-size: 9px; }
.route-editor-hint { margin: 10px 0; color: #6b7973; font-size: 9px; line-height: 1.55; }
.route-stop-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.route-stop-item { display: grid; grid-template-columns: 14px 24px minmax(0,1fr) auto; align-items: center; gap: 6px; min-height: 46px; padding: 6px 7px; border: 1px solid rgba(23,111,98,.1); border-radius: 11px; background: #fbfdfc; }
.route-stop-item--return { border-color: rgba(182,138,48,.22); background: #fdfaf2; }
.route-stop-item.is-dragging { opacity: .45; }
.route-drag-handle { color: #9aa9a2; cursor: grab; font-size: 11px; letter-spacing: -3px; }
.route-stop-index { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--gold); font-size: 9px; font-weight: 800; }
.route-stop-item > div:not(.route-stop-actions) { min-width: 0; display: grid; }
.route-stop-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.route-stop-item small { overflow: hidden; color: #819087; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.route-stop-actions { display: flex; gap: 2px; }
.route-stop-actions button { min-width: 24px; height: 24px; padding: 0 5px; border: 0; border-radius: 7px; color: var(--teal); background: #edf5f1; font-size: 8px; }
.route-stop-actions button:disabled { color: #b4beb9; background: #f5f7f6; }
.route-stop-index.is-return { color: var(--gold); border: 1px solid rgba(182,138,48,.34); background: #fff; font-size: 13px; }
.route-stop-empty { padding: 18px 10px; border: 1px dashed rgba(23,111,98,.2); border-radius: 11px; color: #819087; text-align: center; font-size: 9px; }
.route-custom-place-form { margin: 10px 0 0; padding: 8px; border: 1px solid rgba(23,111,98,.13); border-radius: 11px; background: #f6faf8; }
.route-custom-place-form[hidden] { display: none; }
.route-custom-place-form label { display: block; margin-bottom: 5px; color: #607269; font-size: 8px; font-weight: 700; }
.route-custom-place-form > div { display: grid; grid-template-columns: minmax(0,1fr) repeat(3,auto); gap: 4px; }
.route-custom-place-form input { min-width: 0; height: 30px; padding: 0 8px; border: 1px solid rgba(23,111,98,.17); border-radius: 8px; color: var(--ink); background: #fff; font-size: 9px; outline: none; }
.route-custom-place-form input:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(23,111,98,.09); }
.route-custom-place-form button { min-height: 30px; padding: 0 7px; border: 0; border-radius: 8px; color: var(--teal); background: #e7f2ed; font-size: 8px; font-weight: 700; }
.route-custom-place-form button:disabled { color: #aab7b1; background: #f0f3f1; cursor: wait; }
.route-custom-place-form [data-route-custom-confirm] { color: #fff; background: var(--teal); }
.route-custom-place-form.is-picking { border-color: rgba(182,138,48,.4); background: #fdf9ee; }
.city-live-map.is-route-custom-picking { cursor: crosshair; }
.route-editor-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 11px; }
.route-editor-actions button { min-height: 32px; padding: 0 6px; border: 1px solid rgba(23,111,98,.15); border-radius: 9px; color: var(--teal); background: #f3f8f5; font-size: 9px; font-weight: 700; }
.route-editor-actions button:last-child { color: #fff; border-color: var(--teal); background: var(--teal); }
.route-editor-feedback { min-height: 1.5em; margin: 8px 1px 0; color: #6c7d74; font-size: 8px; line-height: 1.5; }
.city-map-viewport { transform-origin: 0 0; }
/* Keep map tiles clipped to their own stacking context, below category/route controls. */
.city-live-map { position: absolute; z-index: 1; isolation: isolate; inset: 72px 0 22px; border: 0; border-radius: 0; background: #f1f6f3; font-family: var(--sans); }
.city-live-map:not([data-boundary-state="ready"]) .leaflet-map-pane { visibility: hidden; }
.city-live-map[data-tile-state="loading"] .leaflet-map-pane { opacity:0; }
.city-live-map .leaflet-map-pane { opacity:1;transition:opacity .18s ease; }
.city-map-load-error { position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:9px;padding:24px;color:#36544b;background:#f1f6f3;text-align:center; }
.city-map-load-error strong { font-size:15px; }
.city-map-load-error span { color:#6f8179;font-size:11px; }
.city-map-load-error button { min-height:36px;padding:0 16px;border:1px solid rgba(23,111,98,.18);border-radius:10px;color:#fff;background:var(--teal);font-weight:700;cursor:pointer; }
.city-map-credit { position: absolute; bottom: 0; right: 8px; z-index: 2; line-height: 22px; font-size: 11px; color: #52665b; }
.city-map-credit a { color: inherit; }
.city-live-map::after { content: ''; position: absolute; z-index: 1000; inset: 0; box-shadow: inset 0 0 10px 4px rgba(255,255,255,.7); pointer-events: none; }
.city-map-status { position: absolute; z-index: 25; top: 72px; left: 8px; right: 8px; padding: 5px 9px; background: rgba(255,255,255,.94); color: #566960; border-radius: 5px; font-size: 10px; }
.city-map-status[hidden] { display: none; }
.city-map-status button { margin-left: 8px; border: 0; color: var(--teal); background: #e8f3ee; border-radius: 4px; }
.guilin-detail-map.has-map-warning .city-route-summary { top: 132px; }
.city-live-map:focus { outline: none; }
.city-live-map:focus-visible { outline: 2px solid #599b88; outline-offset: -2px; }
.city-live-map .city-pin-marker { background: transparent; border: 0; transition: opacity .18s; }
.city-live-map .city-pin-marker svg { overflow: visible; }
.city-poi-favorite-stars{display:none;pointer-events:none;fill:#d9a12a;stroke:#fff;stroke-width:1;stroke-linejoin:round}
.city-poi.is-favorited .city-poi-favorite-stars{display:inline}
.city-live-map.is-route-editing .city-poi.is-route-candidate { opacity: .62; }
.city-live-map.is-route-editing .city-poi.is-route-candidate:hover { opacity: 1; }
.city-live-map .city-poi.is-in-route svg { filter: drop-shadow(0 0 7px rgba(182,138,48,.78)); }
.city-live-map .city-poi.is-in-route .city-poi-pin { stroke: #f3c45e; stroke-width: 3.5; }
.city-live-map .city-poi:focus-visible { outline: 2px solid #1a6c61; outline-offset: 4px; border-radius: 10px; }
.city-live-map .city-poi.is-filtered-out { pointer-events: none; }
.city-service-endpoint { display:none; pointer-events:none; transition:opacity .2s; }
.city-service-endpoint.is-service-visible { display:block; }
.city-service-endpoint span { display:grid; place-items:center; width:22px; height:22px; border:2px solid white; border-radius:50%; background:#d9edf0; color:#245f6c; box-shadow:0 3px 9px rgba(25,77,88,.3); font-size:9px; font-weight:850; }
.city-service-endpoint .service-endpoint-symbol { grid-area:1 / 1; font:inherit; }
.city-service-endpoint .service-endpoint-symbol--loop { opacity:0; }
.city-service-endpoint.service-direction-round-trip.is-service-visible span { animation:service-return-pin-blink 9s linear infinite; }
.city-service-endpoint.service-direction-round-trip.is-service-visible .service-endpoint-symbol--primary { animation:service-return-symbol-primary 9s linear infinite; }
.city-service-endpoint.service-direction-round-trip.is-service-visible .service-endpoint-symbol--loop { animation:service-return-symbol-loop 9s linear infinite; }
.city-service-endpoint.service-direction-one-way.is-service-visible span { transform-origin:center;animation:service-endpoint-scale 1s ease-in-out infinite; }
.city-service-endpoint.is-in-route span { background:#2d7f91; color:white; box-shadow:0 0 0 3px rgba(45,127,145,.2),0 3px 9px rgba(25,77,88,.3); }
.city-service-endpoint.is-filtered-out { opacity:.08; }
.city-service-endpoint.is-search-hidden { display:none!important; }
@keyframes service-return-pin-blink { 0%,33.333%,50%,83.333%,100% { opacity:1; } 41.667%,91.667% { opacity:.28; } }
@keyframes service-return-symbol-primary { 0%,33.333% { opacity:1; } 50%,83.333% { opacity:0; } 100% { opacity:1; } }
@keyframes service-return-symbol-loop { 0%,33.333% { opacity:0; } 50%,83.333% { opacity:1; } 100% { opacity:0; } }
@keyframes service-endpoint-scale { 0%,100% { transform:scale(1); } 50% { transform:scale(1.2); } }
.city-live-map .leaflet-tooltip.city-poi-tooltip { color: var(--ink); border-color: #c8ded4; font-size: calc(var(--city-label-size, 10px) + 2px); padding: 8px 10px; }
.city-live-map .city-poi-popup .leaflet-popup-content { color: var(--ink); font-size: 12px; line-height: 1.6; margin: 12px 24px 12px 14px; }
.city-live-map .city-poi-popup .leaflet-popup-content-wrapper { border-radius: 10px; }
.city-route-stop { pointer-events: none; background: transparent; border: 0; transition: opacity .18s; }
.city-route-stop.is-filtered-out { opacity: .08; }
.city-route-stop span { display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid white; border-radius: 50%; background: var(--gold); color: white; font-weight: 750; font-size: 10px; }
.city-live-map .city-poi-label { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); white-space: nowrap; line-height: 1.4; padding: 1px 3px; border-radius: 3px; background: rgba(255,255,255,.84); color: #254237; font-size: var(--city-label-size, 10px); pointer-events: none; }
.city-live-map .city-poi-label[hidden],
.city-live-map.is-city-labels-hidden .city-poi-label,
.city-live-map.is-city-labels-hidden .city-poi-tooltip { display: none; }
:root[data-theme="night"] .city-map-status { background: #14281f; color: #c7dacf; }
.guilin-real-map .guilin-district-shape { fill: #f4f8f6; stroke: rgba(85,126,112,.48); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.guilin-real-map .guilin-district-shape:nth-child(3n) { fill: #edf5f1; }
.guilin-real-map .guilin-district-labels { opacity: 1; transition: opacity .18s; }
.guilin-real-map.is-urban-zoom .guilin-district-labels { opacity: 0; }
.guilin-real-map .guilin-district-label { fill: #42685c; font-size: 10px; font-weight: 700; paint-order: stroke; stroke: rgba(255,255,255,.92); stroke-width: 3px; pointer-events: none; }
.guilin-real-map .map-parks path { fill: #e8f2e5; stroke: #d4e6d2; stroke-width: .8; vector-effect: non-scaling-stroke; }
.guilin-real-map .map-water-areas path { fill: #dceff2; stroke: #b9dce1; stroke-width: 1; vector-effect: non-scaling-stroke; }
.guilin-real-map .map-waterways path { fill: none; stroke: #afd7dd; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.guilin-real-map .map-roads path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.guilin-real-map .map-roads--local path { stroke: #fff; stroke-width: 1.25; }
.guilin-real-map .map-roads--pedestrian path { stroke: #d8ddd9; stroke-width: .85; stroke-dasharray: 2 2; }
.guilin-real-map .map-roads--collector path { stroke: #fff; stroke-width: 2.4; }
.guilin-real-map .map-roads--major path { stroke: #f4d9aa; stroke-width: 4.1; }
.guilin-real-map .map-road-labels text { fill: #66736d; font-size: 10px; font-weight: 550; paint-order: stroke; stroke: rgba(247,248,245,.95); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.guilin-real-map .official-route path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.guilin-real-map .official-route-casing { stroke: rgba(255,255,255,.94); stroke-width: 8; }
.guilin-real-map .official-route-line { stroke: #b68a30; stroke-width: 4; stroke-dasharray: 3 5; }
.guilin-real-map.is-route-focus .official-route-line { stroke-width: 5.5; filter: drop-shadow(0 2px 3px rgba(182,138,48,.34)); }
.guilin-real-map:not(.is-route-focus) .official-route { opacity: .34; }
@keyframes route-flow { to { stroke-dashoffset: -16; } }
.city-poi { cursor: pointer; outline: none; transition: opacity .22s, transform .22s; }
.city-poi.is-filtered-out { opacity: .08; pointer-events: none; }
.city-poi-halo { fill: rgba(23,111,98,.1); transition: r .2s, fill .2s; }
.city-poi-pin { fill: #4b9b8d; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 4px 5px rgba(20,55,44,.24)); }
.city-poi-face { fill: #fff; }
.city-poi-dispute-mark { display: none; pointer-events: none; }
.city-poi.is-disputed .city-poi-dispute-mark { display: block; }
.city-poi-dispute-mark circle { fill: none; stroke: #b86f0c; stroke-width: 2; stroke-dasharray: 3 2; }
.city-poi-dispute-mark>path { fill: #ffe5a2; stroke: #986014; stroke-width: 1.2; stroke-linejoin: round; }
.city-poi-dispute-mark .city-poi-dispute-exclamation { fill: none; stroke: #653b00; stroke-width: 1.8; stroke-linecap: round; }
.place-dispute-label { display: block; color: #875413; margin-block: 6px; }
.city-poi-symbol { fill: #2b7c6e; font-size: 9px; font-weight: 800; pointer-events: none; }
.city-poi:hover .city-poi-halo,
.city-poi:focus-visible .city-poi-halo { r: 25; fill: rgba(23,111,98,.17); }
.city-poi:hover .city-poi-pin,
.city-poi:focus-visible .city-poi-pin { fill: #115e52; }
.city-poi[data-poi-category="food"] .city-poi-pin,
.city-poi[data-poi-category="drink"] .city-poi-pin { fill: #c58b60; }
.city-poi[data-poi-category="food"] .city-poi-symbol,
.city-poi[data-poi-category="drink"] .city-poi-symbol { fill: #aa6a3a; }
.city-poi[data-poi-variant="large-chain"] .city-poi-pin { fill: #8e4f25; }
.city-poi[data-poi-variant="large-chain"] .city-poi-symbol { fill: #713b1b; }
.city-poi[data-poi-variant="snack"] .city-poi-pin { fill: #d36f45; }
.city-poi[data-poi-variant="snack"] .city-poi-symbol { fill: #a7472d; }
.city-poi[data-poi-variant="official-attraction"] .city-poi-pin { fill: #176f62; }
.city-poi[data-poi-variant="official-attraction"] .city-poi-symbol { fill: #0d5c51; }
.city-poi[data-poi-category="stay"] .city-poi-pin { fill: #6e719a; }
.city-poi[data-poi-category="stay"] .city-poi-symbol { fill: #5a5d87; }
.city-poi[data-poi-variant="large-chain-stay"] .city-poi-pin { fill: #4e527f; }
.city-poi[data-poi-variant="large-chain-stay"] .city-poi-symbol { fill: #3c406d; }
.city-poi[data-poi-variant="homestay"] .city-poi-pin { fill: #9296bd; }
.city-poi[data-poi-variant="homestay"] .city-poi-symbol { fill: #7378a5; }
.city-poi[data-poi-category="travel"] .city-poi-pin { fill: #3b7893; }
.city-poi[data-poi-category="travel"] .city-poi-symbol { fill: #316b83; }
.city-poi[data-poi-category="wear"] .city-poi-pin { fill: #a5657f; }
.city-poi[data-poi-category="wear"] .city-poi-symbol { fill: #8f506a; }
.city-live-map .city-poi.is-custom-place .city-poi-pin { fill: #7b55b7; stroke: #fff4c9; stroke-width: 3; }
.city-live-map .city-poi.is-custom-place .city-poi-face { fill: #fff8dc; }
.city-live-map .city-poi.is-custom-place .city-poi-symbol { fill: #67429f; font-size: 13px; }
.city-live-map .city-poi.is-custom-place .city-poi-label { color: #5d3d8e; border: 1px solid rgba(123,85,183,.24); }
.city-live-map .city-poi[data-creator-state="draft"] .city-poi-pin { fill:#6878a8; stroke:#e9edff; stroke-width:3; }
.city-live-map .city-poi[data-creator-state="draft"] .city-poi-symbol { fill:#4d5f94; }
.city-live-map .city-poi[data-creator-state="pending"] .city-poi-pin { fill:#b68a30; stroke:#fff4cd; stroke-width:3; }
.city-live-map .city-poi[data-creator-state="pending"] .city-poi-symbol { fill:#8d6719; }
.city-live-map .city-poi[data-creator-state="returned"] .city-poi-pin { fill:#b85b4b; stroke:#ffe5df; stroke-width:3; }
.city-live-map .city-poi[data-creator-state="returned"] .city-poi-symbol { fill:#914336; }
.city-live-map .city-poi[data-creator-state] .city-poi-label { border:1px solid currentColor; }
.city-live-map .city-poi.is-pending-custom-place svg { filter: drop-shadow(0 0 9px rgba(123,85,183,.75)); animation: pending-pin-pulse 1.1s ease-in-out infinite alternate; }
.city-live-map .city-poi.is-pending-route-place svg { filter: drop-shadow(0 0 9px rgba(182,138,48,.9)); }
@keyframes pending-pin-pulse { to { transform: translateY(-3px); } }
.route-stop-number { fill: var(--gold); stroke: #fff; stroke-width: 2; }
.route-stop-text { fill: #fff; font-size: 8px; font-weight: 800; text-anchor: middle; pointer-events: none; }
.route-stop-overlay { pointer-events: none; }
.poi-name { fill: #24332e; font-size: 9px; font-weight: 750; paint-order: stroke; stroke: rgba(255,255,255,.95); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.guangxi-map-svg .region-shape { fill: #f1f7f4; stroke: #4f8272; stroke-width: 3; stroke-linejoin: round; }
.guangxi-map-svg .region-line { fill: none; stroke: rgba(79,130,114,.45); stroke-width: 1.5; stroke-dasharray: 5 8; }
.guangxi-map-svg .city-shape { fill: #f2f7f4; stroke: #6e9588; stroke-width: 1.15; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s, stroke .2s; }
.guangxi-map-svg .city-shape:nth-child(3n) { fill: #eaf2ee; }
.guangxi-map-svg .city-shape:hover,
.guangxi-map-svg .city-shape { outline:none; }
.guangxi-map-svg .city-shape:focus-visible { fill: #dcebe5; stroke: #287665; }
.guangxi-map-svg .city-shape.is-open { fill: #b8d8cc; stroke: #176f62; stroke-width: 1.8; }
/* Regional A/B artwork and hover presentation live in map-region-art.css. */
.street-sketch path { fill: none; stroke-linecap: round; }
.street-sketch .river { stroke: rgba(62,145,128,.28); stroke-width: 22; }
.street-sketch .river-thread { stroke: #438f80; stroke-width: 2; }
.street-sketch .mountain { stroke: #8bb7a8; stroke-width: 2; }
.street-sketch .street { stroke: #c5a451; stroke-width: 2; stroke-dasharray: 5 9; }
.pin-eastwest { left: 42%; top: 46%; }
.pin-zhengyang { left: 57%; top: 63%; }
.pin-binjiang { left: 33%; top: 70%; }
.map-toast { position: fixed; z-index: 50; left: 50%; bottom: 30px; padding: 10px 16px; border-radius: 20px; color: #fff; background: rgba(16,33,28,.92); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
.map-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

:root[data-theme="night"] .world-inline-map .country { fill: #101b17 !important; stroke: #55766a !important; }
:root[data-theme="night"] .world-inline-map .country:nth-of-type(3n) { fill: #15241f !important; }
:root[data-theme="night"] .world-inline-map .country:nth-of-type(4n) { fill: #0c1512 !important; }
:root[data-theme="night"] .world-inline-map .is-open-country path { fill: #276f61 !important; stroke: #83c9b8 !important; }
:root[data-theme="night"] .country-piece g,
:root[data-theme="night"] .country-piece path { fill: #101b17 !important; stroke: #55766a !important; }
:root[data-theme="night"] .country-piece[data-shade="soft"] g,
:root[data-theme="night"] .country-piece[data-shade="soft"] path { fill: #15241f !important; }
:root[data-theme="night"] .country-piece[data-shade="light"] g,
:root[data-theme="night"] .country-piece[data-shade="light"] path { fill: #0c1512 !important; }
:root[data-theme="night"] .country-piece.is-open-country g,
:root[data-theme="night"] .country-piece.is-open-country path { fill: #276f61 !important; stroke: #83c9b8 !important; }
:root[data-theme="night"] .random-map-name { color: #d5ebe3; text-shadow: 0 1px 0 #07100e, 1px 0 0 #07100e, -1px 0 0 #07100e, 0 -1px 0 #07100e, 0 4px 12px rgba(0,0,0,.5); }
:root[data-theme="night"] .globe-window { background: transparent; }
:root[data-theme="night"] .globe-window::after { display: none; }
:root[data-theme="night"] .country-hover-label { border-color: rgba(103,174,150,.38); background: rgba(12,23,19,.94); box-shadow: 0 10px 28px rgba(0,0,0,.34); }
:root[data-theme="night"] .rail-country:hover { border-color: #2b3c36; background: rgba(17,28,24,.88); }
:root[data-theme="night"] .rail-country.is-open { border-color: #3e796b; background: #143028; }
:root[data-theme="night"] .connector-layer path { stroke: rgba(113,174,153,.42); }
:root[data-theme="night"] .connector-layer circle { stroke: #07100e; }
:root[data-theme="night"] .rotation-status button { border-color: #2d3e38; background: rgba(12,22,18,.92); }
:root[data-theme="night"] .china-map-svg .country,
:root[data-theme="night"] .china-map-svg path { fill: #12241e !important; stroke: #79aa99 !important; }
:root[data-theme="night"] .china-map-svg .province-shape { fill: #12241e !important; stroke: #587f72 !important; }
:root[data-theme="night"] .china-map-svg .province-shape:nth-child(3n) { fill: #172b24 !important; }
:root[data-theme="night"] .china-map-svg .province-shape.is-open { fill: #285f52 !important; stroke: #8bc8b7 !important; }
:root[data-theme="night"] .location-pin span,
:root[data-theme="night"] .street-pin span { border-color: #07100e; }
:root[data-theme="night"] .province-pin span,
:root[data-theme="night"] .city-pin span { border-color: #07100e; }
:root[data-theme="night"] .guangxi-map-svg .region-shape { fill: #12241e; stroke: #79aa99; }
:root[data-theme="night"] .guangxi-map-svg .city-shape { fill: #12241e; stroke: #587f72; }
:root[data-theme="night"] .guangxi-map-svg .city-shape:nth-child(3n) { fill: #172b24; }
:root[data-theme="night"] .guangxi-map-svg .city-shape.is-open { fill: #285f52; stroke: #8bc8b7; }
:root[data-theme="night"] .guilin-real-map .guilin-district-shape { stroke: rgba(135,170,157,.25); }
:root[data-theme="night"] .guilin-real-map .guilin-district-shape { fill: #13241e; }
:root[data-theme="night"] .guilin-real-map .guilin-district-shape:nth-child(3n) { fill: #182c24; }
:root[data-theme="night"] .guilin-real-map .guilin-district-label { fill: #a7c5ba; stroke: #10201b; }
:root[data-theme="night"] .guilin-real-map .map-parks path { fill: #172a22; stroke: #294438; }
:root[data-theme="night"] .guilin-real-map .map-water-areas path { fill: #15313a; stroke: #28525b; }
:root[data-theme="night"] .guilin-real-map .map-waterways path { stroke: #275967; }
:root[data-theme="night"] .guilin-real-map .map-roads--local path { stroke: #263832; }
:root[data-theme="night"] .guilin-real-map .map-roads--pedestrian path { stroke: #31453e; }
:root[data-theme="night"] .guilin-real-map .map-roads--collector path { stroke: #385047; }
:root[data-theme="night"] .guilin-real-map .map-roads--major path { stroke: #6b5c3d; }
:root[data-theme="night"] .guilin-real-map .map-road-labels text { fill: #9aacA4; stroke: #10201b; }
:root[data-theme="night"] .city-category-bar,
:root[data-theme="night"] .city-route-card,
:root[data-theme="night"] .city-route-picker,
:root[data-theme="night"] .city-category { color: #9caaa4; }
:root[data-theme="night"] .city-category span { background: #193128; }
:root[data-theme="night"] .city-category.is-active { color: #fff; background: #287665; }
:root[data-theme="night"] .city-category.is-active span { background: #eaf4ef; }
:root[data-theme="night"] .city-route-card small { color: #8fa098; }
:root[data-theme="night"] .poi-name { fill: #dce8e2; stroke: rgba(16,32,27,.96); }

@media (max-width: 980px) {
  .map-explorer { --map-edge-inset:10px; grid-template-columns: 96px minmax(0, 1fr) 96px; gap: 4px; padding: 6px var(--map-edge-inset); }
  .rail-country { min-width: 98px; padding: 8px; }
  .rail-country strong { font-size: 11px; }
  .globe-window { height: min(80vh, 710px); min-height: 455px; margin-inline: 30px; }
  .detail-stage { grid-column: 1 / 4; }
}

@media (max-width: 720px) {
  html.map-page-root, body.map-page { width:100%; height:100%; overflow:hidden; overscroll-behavior:none; }
  body.map-page .page-shell { width:100%; height:100dvh; min-height:0; overflow:hidden; }
  body.map-page .world-stage { height:calc(100dvh - var(--site-header-height,78px)); min-height:0; }
  .map-explorer { --map-edge-inset:5px; grid-template-columns: 86px minmax(0, 1fr) 86px; padding-left:var(--map-edge-inset);padding-right:var(--map-edge-inset); }
  .globe-window { min-height: 470px; margin-inline: 14px; }
  .country-mosaic { --world-mosaic-height:231%; }
  .random-map-name { font-size: 10px; }
  .rail-country { min-width: 82px; padding-left: 13px; padding-right: 13px; }
  .guilin-detail-map { padding-top: 64px; }
  .city-category-bar { top: -2px; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .city-category-bar::-webkit-scrollbar { display: none; }
  .city-category { min-width: max-content; padding: 6px 9px; }
  .city-category span { width: 20px; height: 20px; }
  .city-route-summary { --route-toggle-overhang:17px; left: 5px; top: 78px; }
  .city-route-card { width: min(224px, calc(100vw - 10px)); padding: 9px 11px; }
  .city-route-summary-toggle { width:32px;height:46px;font-size:24px; }
  .city-route-summary.is-collapsed { width:17px;height:46px; }
  .city-route-summary.is-collapsed .city-route-summary-toggle { width:17px;height:46px;padding:0 3px 4px 0; }
  .city-route-picker { top: 196px; left: 7px; right: 7px; width: auto; max-height: calc(100% - 225px); overflow: auto; border-radius: 16px 16px 5px 5px; }
  .route-card-actions { margin-top: 7px; }
  .route-card-actions button { min-height: 28px; font-size: 8px; }
  .city-route-editor { position: absolute; top: auto; left: 7px; right: 7px; bottom: 25px; width: auto; max-height: 49%; padding: 13px; border-radius: 16px 16px 5px 5px; }
  .city-category-bar,.city-route-card,.city-route-picker,.city-route-editor { background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none; }
  .route-stop-item { grid-template-columns: 12px 22px minmax(0,1fr) auto; gap: 4px; }
  .route-stop-actions button { min-width: 22px; padding: 0 4px; }
  .route-stop-actions button:nth-child(4) { display: none; }
  .route-custom-place-form > div { grid-template-columns: minmax(0,1fr) repeat(3,auto); }
  .route-editor-actions { grid-template-columns: repeat(2, 1fr); }
  .guilin-real-map { left: -12px; width: 98vw; height: min(66vh, 620px); }
}
.country-floating-anchor { fill:transparent!important; stroke:none!important; pointer-events:none!important; }
/* Frame the rectangular map viewport, not geographic boundaries. An inset
   overlay remains visible during zoom/pan and cannot intercept map gestures. */
.map-explorer:not(.is-city-explorer) .detail-stage:not([hidden])::after { content:"";position:absolute;inset:0;z-index:30;box-sizing:border-box;pointer-events:none;border:1px solid rgba(105,110,115,.38);box-shadow:inset 0 0 12px 2px rgba(105,110,115,.22); }
:root[data-theme="night"] .map-explorer:not(.is-city-explorer) .detail-stage:not([hidden])::after { border-color:rgba(182,188,194,.48);box-shadow:inset 0 0 12px 2px rgba(182,188,194,.24); }
