:root {
  color-scheme: dark;
  --ink: #f0f4f7;
  --muted: #b4c4ce;
  --gold: #ebca98;
  --panel: #10202ef7;
  --line: #a6bbcd33;
  --north: #50bec5;
  --central: #88bd70;
  --south: #efa365;
  --panel-width: clamp(310px, 26vw, 420px);
  --edge: clamp(14px, 2vw, 42px);
  font-family: Inter, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { min-width: 320px; }
body { --dock-bottom: max(17px,env(safe-area-inset-bottom)); --dock-main-height: 43px; --dock-children-height: 0px; --dock-clearance: calc(var(--dock-bottom) + var(--dock-main-height) + var(--dock-children-height) + 9px); }
body:has(#section-nav:not([hidden]):not(:empty)) { --dock-children-height: 36px; }
button { color: inherit; cursor: pointer; border: 0; background: transparent; }
button:focus-visible, summary:focus-visible { outline: 2px solid #f6cc85; outline-offset: 2px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
button svg, .image-count svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#app { z-index: 1; pointer-events: none; }
#scene-cover { position: fixed; inset: 0; background: #223542 center / cover no-repeat; transition: opacity .6s; }
body.model-ready #scene-cover { opacity: 0; }
body.model-error .scene-canvas { visibility: hidden; }
.masthead { position: absolute; z-index: 4; top: 0; inset-inline: 0; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: max(18px,env(safe-area-inset-top)) var(--edge) 43px; background: linear-gradient(180deg,#0b1b2be8,#152a3e8c 54%,transparent); }
.identity { display: inline-flex; align-items: center; gap: clamp(10px,1.1vw,24px); padding: 0; color: white; pointer-events: auto; text-shadow: 0 2px 8px #0714219c; }
.official-logo { display: block; width: clamp(102px,8.8vw,162px); }
.brand-divider { height: 25px; width: 1px; background: #e7d9be8a; }
.scene-brand-project { font-size: clamp(18px,1.45vw,29px); letter-spacing: .09em; font-weight: 600; }
.scene-footer { position: absolute; z-index: 5; bottom: var(--dock-bottom); left: var(--edge); right: var(--edge); display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: end; pointer-events: none; }
.tools, #scene-dock { color: #eef2f5; pointer-events: auto; background: #0c1c2bf2; border: 1px solid #a6bfcc63; border-radius: 8px; backdrop-filter: blur(14px); box-shadow: 0 5px 24px #07101d4d; }
.tools { display: flex; align-items: center; grid-column: 3; justify-self: end; padding: 3px; }
.tools button { position: relative; height: 34px; }
.tools button + button::before { content: ''; position: absolute; left: -1px; height: 13px; top: 11px; width: 1px; background: #adc1ca36; }
.icon-button, .text-tool, .back-link, .photo-arrow { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 4px; }
.icon-button { width: 36px; height: 36px; padding: 0; }
.text-tool { padding: 0 10px; font-size: 13px; }
.tools button:hover, .tools button[aria-expanded=true] { background: #e6c69024; color: #fff2d9; }
.tools [aria-pressed=false] { color: #92a2ad; }
#scene-dock { grid-column: 2; min-width: 0; }
.dock-main, #scene-nav, .dock-actions, #section-nav { display: flex; align-items: center; }
.dock-main { gap: 5px; padding: 4px; }
#scene-nav { gap: 2px; }
.dock-actions { gap: 2px; padding-left: 6px; border-left: 1px solid #b1bfc547; }
#scene-dock button { display: inline-flex; gap: 6px; justify-content: center; align-items: center; min-height: 33px; padding: 0 clamp(8px,.85vw,15px); border-radius: 4px; color: #d2dce3; font-size: 13px; white-space: nowrap; }
#scene-dock button:hover { color: white; background: #dce9ee1c; }
#scene-nav button { font-weight: 600; }
#scene-nav #reset-view { color: #cdd9dd; }
body:not([data-scene-mode=industry]) #scene-nav [aria-current=true] { background: #e6cc9f; color: #142637; }
body:not([data-scene-mode=industry]) #scene-nav #reset-view[aria-current=true] { background: #2b3e4f; color: #efd5a7; }
#scene-dock .dock-actions button { color: #d7dddf; font-size: 12px; }
.dock-actions svg { width: 15px; height: 15px; }
#scene-dock #view-industry { color: #ecd1a6; }
body[data-scene-mode=industry] #scene-dock #view-industry { color: #ffe4b6; background: #574c3a; box-shadow: inset 0 -2px #dbb782; }
#scene-dock #open-directory[aria-expanded=true] { color: #f5f8fa; background: #324959; }
#section-nav { min-height: 36px; gap: 2px; padding: 3px 8px; border-top: 1px solid #94adbc38; background: #122737; border-radius: 0 0 8px 8px; }
#section-nav::before { content: ''; width: 9px; height: 8px; border-left: 1px solid #849ca9; border-bottom: 1px solid #849ca9; border-radius: 0 0 0 2px; margin: 0 3px 4px 4px; }
#scene-dock #section-nav button { min-height: 27px; padding-inline: 10px; font-size: 12px; color: #c0d0dc; }
#scene-dock #section-nav button:is([aria-current=true],[aria-current=page],[aria-pressed=true]) { color: #ffdeb0; background: #314554; }
button[data-zone=north] { --zone-color: var(--north); }
button[data-zone=central] { --zone-color: var(--central); }
button[data-zone=south] { --zone-color: var(--south); }
#scene-dock i, .zone-link i { width: 7px; height: 7px; background: var(--zone-color); border-radius: 50%; flex: none; }
#markers { position: absolute; inset: 0; overflow: hidden; }
.map-label { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: auto; white-space: nowrap; padding: 4px 7px; border-radius: 4px; border: 1px solid #bcd1e3b3; box-shadow: 0 2px 7px #0c1b2f80; font-size: 11px; line-height: 15px; font-weight: 620; color: #f3f7fb; background: #112638ed; }
.map-label::after { content: ''; position: absolute; left: 50%; top: 100%; height: 6px; border-left: 1px solid #edf5ff; box-shadow: 1px 0 2px #0a172c; }
.map-label.is-zone, .map-label.is-industry { padding: 7px 10px; border-color: #d8e6f0b0; color: #fff; background: #0d2031f5; font-size: 13px; letter-spacing: .045em; }
.map-label.is-zone::before, .map-label.is-industry::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 7px 1px 0; background: var(--cluster-color,var(--zone-color)); border-radius: 50%; }
.map-label:hover, .map-label.is-selected { z-index: 2; background: #eed5ad; border-color: #fff4de; color: #172635; }
.map-label.is-group { font-weight: 530; }
.tod-section-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 12px 0; }
.tod-section-card { position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; padding: 10px; min-width: 0; min-height: 64px; overflow: hidden; border: 1px solid #69809380; border-left: 3px solid var(--cluster-color); border-radius: 5px; color: white; text-align: left; }
.tod-section-card img, .tod-section-card::before { position: absolute; inset: 0; height: 100%; width: 100%; }
.tod-section-card img { object-fit: cover; z-index: -2; }
.tod-section-card::before { content: ''; z-index: -1; background: linear-gradient(0deg,#0a1929ec,#11223532); }
.tod-section-card strong { font-size: 13px; line-height: 1.25; }
.tod-section-card svg { width: 14px; height: 14px; flex-shrink: 0; }
.tod-section-card:hover { border-color: var(--cluster-color); }
.map-label.is-metro { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 4px; border: 1px solid #ffffffb5; background: #f6f5eff7; color: #172b39; border-radius: 5px; box-shadow: 0 2px 8px #0d22327d; line-height: 1.2; }
.map-label.is-metro:hover { background: #fff; }
.map-label::after { left: var(--stem-x,50%); top: var(--stem-y,100%); height: var(--stem-length,6px); transform-origin: top left; transform: rotate(var(--stem-angle,0rad)); pointer-events: none; }
.map-label.is-metro img { width: 18px; height: 18px; }
.metro-name { font-size: 12px; font-weight: 700; }
.metro-line { min-width: 15px; padding: 2px 3px; color: #fff; border-radius: 3px; text-align: center; font: 700 10px/1.15 "Segoe UI",sans-serif; }
.metro-line.line-9 { background: #8ac9e6; color: #183e52; }
.metro-line.line-12 { background: #087b68; }
.metro-line.line-14 { background: #667920; }
#detail-panel { position: absolute; z-index: 5; right: var(--edge); top: var(--panel-top,75px); width: var(--panel-width); max-height: calc(100% - var(--panel-top,75px) - var(--dock-clearance)); display: flex; flex-direction: column; color: var(--ink); background: var(--panel); border: 1px solid #b3c7d470; border-radius: 10px; box-shadow: 0 15px 55px #07132273; backdrop-filter: blur(15px); pointer-events: auto; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 41px; padding: 5px 10px 1px 17px; }
.panel-head .icon-button { width: 30px; height: 30px; margin-left: auto; color: #c2d0dc; }
.back-link { padding: 5px 0; color: #d6c4a6; font-size: 12px; }
.back-link svg { width: 13px; height: 13px; }
.back-link:hover:not(:disabled), .panel-head .icon-button:hover { color: white; background: #c7d6e214; }
#detail-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #536a7c transparent; }
#detail-body { padding: 0 18px 19px; }
.entry-title { margin: 3px 0 4px; color: #fff8e9; font-size: clamp(23px,1.8vw,34px); font-weight: 620; line-height: 1.3; letter-spacing: .015em; }
.entry-subtitle, .industry-intro { margin: 5px 0 12px; color: #bed0dd; line-height: 1.65; font-size: 13px; }
.entry-photos { margin: 13px 0; }
.photo-caption { color: #a8bac7; margin: 5px 0 2px; font-size: 11px; line-height: 1.5; }
.hero-button { display: block; position: relative; width: 100%; overflow: hidden; padding: 0; border: 1px solid #9cb5c544; border-radius: 6px; background: #203442; }
.hero-button img { display: block; width: 100%; aspect-ratio: 1.86; object-fit: cover; }
.hero-button img.plan-image { object-fit: contain; background: white; }
.image-count { position: absolute; right: 6px; bottom: 6px; display: inline-flex; gap: 4px; align-items: center; background: #0b1c2de8; color: white; padding: 4px 6px; border-radius: 3px; font-size: 11px; }
.image-count svg { width: 13px; height: 13px; }
.thumb-strip { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: thin; padding: 5px 1px 3px; }
.thumb { flex: none; padding: 1px; border: 2px solid transparent; border-radius: 4px; }
.thumb[aria-current=true] { border-color: var(--gold); }
.thumb img { width: 44px; height: 30px; object-fit: cover; display: block; border-radius: 1px; }
.facts { margin: 12px 0 0; font-size: 13px; }
.fact { display: grid; grid-template-columns: minmax(74px,.85fr) minmax(0,1.7fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.fact dt { color: #adbfcb; }
.fact dd { text-align: right; margin: 0; color: #edf2f4; font-variant-numeric: tabular-nums; white-space: pre-line; overflow-wrap: anywhere; }
.directory, .member-part { margin: 15px 0; }
.directory-group { margin: 12px 0; }
#scene-directory { padding: 0 18px 17px; }
#scene-directory .directory-section { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
#scene-directory h2 { margin-bottom: 13px; }
#scene-directory h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.directory-parent { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 2px 0; text-align: start; color: #f3e8d7; }
.directory-parent svg { width: 13px; height: 13px; color: #c2ad91; }
.directory-parent:hover { color: white; }
#scene-directory .atlas-entry { margin: 3px 0 0; }
#scene-directory .item-link[aria-current=true] { color: #ffe2ae; border-color: #b99b68; background: #37444a; }
.directory h3, .member-part h3 { margin: 0 0 7px; font-size: 12px; font-weight: 570; color: #bfced8; }
.item-links { display: flex; flex-wrap: wrap; gap: 5px; }
.item-link, .zone-link { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid #8aa5b749; border-radius: 4px; color: #e0e9ed; background: #223747; font-size: 12px; }
.item-link:hover, .zone-link:hover { background: #344a59; border-color: #b0c2cc; }
.industry-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.industry-metrics > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; padding: 9px 10px; border-top: 1px solid #b89e76; background: #243745; }
.industry-metrics strong { color: #f0d0a1; font: 500 25px/1.2 "Segoe UI",sans-serif; }
.industry-metrics small { color: #d6e0e6; font-size: 11px; }
.cluster-list { display: grid; gap: 7px; margin: 11px 0; }
.cluster-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 10px 0 0; border: 1px solid #8da9ba4d; border-radius: 5px; background: #203443; color: #edf2f6; text-align: left; overflow: hidden; }
.cluster-link:hover { border-color: var(--cluster-color); background: #2a4050; }
.cluster-link img { display: block; width: clamp(60px,5vw,89px); height: 51px; object-fit: cover; border-left: 3px solid var(--cluster-color); }
.cluster-copy { display: grid; gap: 4px; }
.cluster-copy strong { font-size: 13px; font-weight: 560; }
.cluster-copy small { color: #bdcdd8; font-size: 11px; }
.cluster-link > svg, .atlas-entry > svg, .parent-cluster > svg { margin-left: auto; width: 13px; height: 13px; }
.member-list { gap: 5px; }
.member-part + .member-part { border-top: 1px solid var(--line); padding-top: 12px; }
.parent-cluster, .atlas-entry { display: flex; align-items: center; width: 100%; gap: 7px; margin: 10px 0; padding: 9px 10px; border: 1px solid #b1b8a34f; background: #273c48; border-radius: 4px; color: #f1dabc; font-size: 12px; }
.parent-cluster::before { content: ''; width: 7px; height: 7px; background: var(--cluster-color); border-radius: 50%; }
.parent-cluster:hover, .atlas-entry:hover { background: #314754; }
.detail-fold { border-top: 1px solid var(--line); margin-top: 8px; }
.detail-fold > summary { display: flex; align-items: baseline; gap: 7px; cursor: pointer; padding: 11px 1px; list-style: none; font-size: 13px; font-weight: 560; }
.detail-fold > summary::-webkit-details-marker { display: none; }
.detail-fold > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid #acbecc; border-bottom: 1.5px solid #acbecc; transform: rotate(45deg); margin: 0 4px 3px auto; flex: none; }
.detail-fold[open] > summary::after { transform: rotate(225deg); margin-bottom: 0; }
.detail-fold > summary small { color: #aec0cf; font-size: 11px; font-weight: 400; }
.detail-fold .detail-fold { margin: 0 0 0 5px; padding-left: 9px; border: 0; border-left: 2px solid #536b7c; }
.detail-fold .detail-fold > summary { padding-block: 7px; font-weight: 500; }
.sheet-rows { padding: 0 6px 8px 0; margin: 0; }
.sheet-rows dt { padding: 6px 0 2px; font-size: 12px; font-weight: 600; line-height: 1.65; white-space: pre-line; }
.sheet-rows dd, .record-note, .sheet-heading { margin: 0 0 7px; font-size: 12px; line-height: 1.7; color: #bccdd8; white-space: pre-line; overflow-wrap: anywhere; }
.workbook-links { margin-block: 7px 12px; }
.plate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; padding-bottom: 8px; }
.plate-link { min-width: 0; padding: 0; text-align: left; align-self: start; font-size: 11px; line-height: 1.5; }
.plate-link img { width: 100%; height: auto; aspect-ratio: 1.7; background: white; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; display: block; }
.plate-link span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }
#loading { z-index: 6; border: 1px solid #b9cce275; border-radius: 6px; width: min(280px,80vw); padding: 15px 17px; background: #102235ef; }
.loading-copy strong { color: #efd4a7; }
.loading-bar { background: linear-gradient(90deg,#8baabb,#e9c28a); }
#scene-error { position: absolute; z-index: 4; bottom: var(--dock-clearance); left: var(--edge); max-width: min(410px,90vw); padding: 9px 12px; background: #112435f5; border: 1px solid #94a8b85e; color: #dfe8ed; font-size: 12px; border-radius: 4px; pointer-events: auto; }
#retry-model { color: var(--gold); font-weight: 600; text-decoration: underline; padding-inline: 3px; }
#lightbox { position: fixed; inset: 0; margin: auto; width: min(1250px,94vw); max-width: 96vw; height: min(88dvh,940px); max-height: 96dvh; padding: 0; border: 1px solid #96abbb73; border-radius: 9px; background: #122332; color: #edf2f4; box-shadow: 0 18px 100px #041120a6; }
#lightbox::backdrop { background: #07111de8; }
.lightbox-layout { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; }
.lightbox-top, .lightbox-foot { padding: 8px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lightbox-top { font-size: 13px; color: #cad8e2; }
.lightbox-stage { position: relative; min-height: 0; background: #091622; }
#photo-viewport { display: grid; place-items: center; width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; }
#large-photo { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; cursor: zoom-in; }
#photo-viewport.zoomed { display: block; }
#photo-viewport.zoomed img { width: auto; height: auto; min-width: 100%; min-height: 100%; max-width: none; object-fit: contain; cursor: zoom-out; }
.photo-arrow { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); width: 36px; height: 48px; background: #0e2333d1; color: white; border: 1px solid #ffffff58; }
#photo-prev { left: 9px; } #photo-next { right: 9px; }
.lightbox-foot { padding-block: 13px; }
.lightbox-foot h2 { margin: 0; font-size: 15px; font-weight: 550; }
#lightbox-count { color: #eacb99; font: 14px/1.3 "Segoe UI",sans-serif; white-space: nowrap; font-variant-numeric: tabular-nums; }
.photo-arrow:hover, .lightbox-top button:hover { background: #385060; }
@media (min-width: 681px) and (max-width: 950px) {
  .scene-footer { display: flex; justify-content: space-between; gap: 8px; }
  #scene-dock button { padding-inline: 7px; font-size: 12px; }
  .tools .text-tool { padding-inline: 7px; }
}
@media (max-width: 680px) {
  .masthead { padding: max(12px,env(safe-area-inset-top)) 11px 30px; gap: 5px; }
  .identity { gap: 6px; }
  .official-logo { width: clamp(78px,21vw,113px); }
  .brand-divider { height: 16px; }
  .scene-brand-project { font-size: clamp(14px,3.8vw,21px); letter-spacing: .02em; white-space: nowrap; }
  body { --dock-bottom: max(8px,env(safe-area-inset-bottom)); --dock-main-height: 75px; }
  body:has(#section-nav:not([hidden]):not(:empty)) { --dock-children-height: 32px; }
  .scene-footer { left: 8px; right: 8px; display: block; }
  #scene-dock { display: grid; grid-template-columns: 1fr; }
  .dock-main { display: contents; }
  #scene-nav { grid-row: 1; padding: 4px; }
  #scene-nav button { flex: 1; gap: 4px; min-height: 32px; font-size: 12px; padding: 0 3px; }
  #section-nav { grid-row: 2; min-height: 32px; justify-content: center; padding: 2px 3px; border-radius: 0; }
  #scene-dock #section-nav button { flex: 0 1 auto; min-height: 26px; padding-inline: clamp(3px,1.1vw,7px); font-size: 11px; }
  #section-nav::before { flex: none; width: 6px; margin-left: 0; margin-right: 1px; }
  .dock-actions { grid-row: 3; gap: 2px; border: 0; border-top: 1px solid #9caebd35; padding: 2px 4px; }
  #scene-dock .dock-actions button, .tools .text-tool { min-height: 28px; height: 28px; gap: 4px; padding: 0 5px; font-size: 11px; }
  .tools { position: absolute; bottom: 3px; right: 4px; padding: 0; border: 0; box-shadow: none; background: transparent; backdrop-filter: none; }
  .tools button { height: 28px; }
  .tools .icon-button { width: 28px; }
  .tools button + button::before { height: 12px; top: 8px; }
  #scene-dock button svg, .tools svg { width: 14px; height: 14px; }
  #scene-dock i { width: 6px; height: 6px; }
  #detail-panel { inset: auto 9px var(--dock-clearance); width: auto; max-height: min(40dvh,calc(100dvh - var(--dock-clearance) - 105px)); }
  .panel-head { min-height: 34px; padding: 2px 9px 0 13px; }
  #detail-body { padding: 0 13px 14px; }
  #scene-directory { padding: 0 13px 14px; }
  .entry-title { font-size: 20px; }
  .entry-photos { margin: 8px 0; }
  .hero-button img { aspect-ratio: 2.55; }
  .map-label { font-size: 10px; padding: 3px 5px; }
  .map-label.is-zone, .map-label.is-industry { padding: 5px 7px; font-size: 11px; }
  body.panel-open #scene-error { display: none; }
  #lightbox { width: 97vw; max-width: 97vw; height: 83dvh; }
  .photo-arrow { width: 27px; height: 38px; }
  .lightbox-top, .lightbox-foot { padding-inline: 10px; }
}
@media (max-width: 360px) {
  #reset-view svg { display: none; }
}
@media (max-height: 540px) and (min-width: 681px) {
  body { --dock-bottom: max(7px,env(safe-area-inset-bottom)); --panel-top: 55px; }
  .masthead { padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; } }
