/* A paper atlas with white light following each closed county boundary. */
.county-map{--county-ink:#20382f;--county-muted:#6f6a62;--county-paper:#f5f2ec;--county-light:#fff;color:var(--county-ink);min-width:0;isolation:isolate}
.county-map *{box-sizing:border-box}
.county-map-controls{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;border-bottom:1px solid #dfd9ce;padding-bottom:14px}
.county-map-select-label{display:flex;flex-direction:column;gap:8px;max-width:70%;min-width:0;font-size:12px;letter-spacing:.1em;color:var(--county-muted)}
.county-map-select{min-height:44px;min-width:170px;max-width:100%;font:inherit;font-size:16px;color:var(--county-ink);background:var(--county-paper);border:1px solid #dfd9ce;border-radius:8px;padding:10px 32px 10px 12px;cursor:pointer;letter-spacing:.04em}
.county-map-back{min-height:44px;padding:9px 0 9px 8px;border:0;background:transparent;color:var(--county-ink);font:inherit;font-size:12px;white-space:nowrap;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
.county-map-back:disabled{opacity:.38;cursor:default;text-decoration:none}
.county-map-heading{padding:20px 0 4px;min-height:92px}
.county-map .county-map-title{font-family:'Noto Serif TC','Songti TC',serif;font-size:clamp(22px,2.5vw,26px);font-weight:500;line-height:1.45;letter-spacing:.06em;margin:0}
.county-map-status{font-size:12px;line-height:1.8;margin:6px 0 0;color:var(--county-muted)}
.county-map-viewport{width:100%;max-width:570px;margin:0 auto;aspect-ratio:500 / 620;position:relative;overflow:hidden;contain:layout paint}
.county-map-svg{display:block;width:100%;height:100%;overflow:hidden}
.county-map-county{cursor:pointer;outline:none;touch-action:manipulation}
.county-map-land{transition:fill 180ms ease,stroke 180ms ease;stroke-linecap:round;stroke-linejoin:round}
.county-map-county:hover .county-map-land,.county-map-county:focus-visible .county-map-land{fill:#d7e2ca;stroke:#58704d;stroke-width:1.25}
.county-map-county.is-selected .county-map-land{fill:#cedcbd;stroke:#405d38;stroke-width:1.3}
.county-map-lights,.county-map-glow{pointer-events:none}
.county-map-glow{stroke-dashoffset:0}
.county-map-glow.is-active{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #fff);animation:county-border-light 2.4s linear infinite}
.county-map-light{display:none;opacity:0;pointer-events:none;stroke:var(--county-light);stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:12 88}
.county-map-glow.is-active .county-map-light{display:inline;opacity:1}
.county-map-county:focus-visible .county-map-land{stroke:#20382f;stroke-width:2.4}
.county-map-frames{transition:opacity 160ms ease;pointer-events:none}
.county-map.has-selection .county-map-frames{opacity:0}
.county-map-project{position:absolute;z-index:2;display:flex;flex-direction:column;align-items:center;width:126px;min-height:44px;transform:translate(-50%,-100%);color:var(--county-ink)!important;text-decoration:none!important}
.county-map-project>img{width:80px;height:auto;max-height:108px;object-fit:contain;display:block;filter:none}
.county-map-project-caption{display:flex;flex-direction:column;align-items:center;gap:4px;background:#f5f2ecf2;padding:7px 9px 8px;line-height:1.4;border-bottom:1px solid #20382f;white-space:nowrap}
.county-map-project-caption strong{font-family:'Noto Serif TC','Songti TC',serif;font-size:17px;font-weight:500;letter-spacing:.06em}
.county-map-project-caption>span{font-size:12px;color:#53664d;letter-spacing:.02em}
.county-map-project:hover .county-map-project-caption{border-bottom-color:#20382f;background:#fffdf8}
.county-map-project:focus-visible,.county-map-select:focus-visible,.county-map-back:focus-visible,.county-map-fallback-link:focus-visible{outline:3px solid #20382f;outline-offset:4px}
.county-map-instructions{margin:12px 0 0;padding-top:14px;border-top:1px solid #dfd9ce;color:var(--county-muted);font-size:12px;line-height:1.8;letter-spacing:.035em}
.county-map-fallback{padding:28px 0;min-height:130px;font-size:14px;line-height:1.8;color:var(--county-muted)}
.county-map-fallback-link{display:inline-block;padding:12px 0;color:var(--county-ink)!important;min-height:44px;text-decoration:underline;text-underline-offset:4px}
.county-map-supplements{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}
.county-map-supplement{margin:0;border-top:1px solid #dfd9ce;padding-top:8px}
.county-map-supplement svg{display:block;width:100%;height:90px}
.county-map-supplement figcaption{font-size:12px;color:var(--county-muted);line-height:1.7;margin-top:5px}
.county-map [hidden]{display:none!important}
.county-map[data-state=loading] .county-map-viewport{display:none}
@keyframes county-border-light{to{stroke-dashoffset:-100}}
@media(max-width:760px){.county-map-viewport{max-width:420px}.county-map-heading{padding-top:18px;min-height:87px}.county-map-project{width:116px}.county-map-project>img{width:68px;max-height:92px}.county-map-project-caption strong{font-size:16px}.county-map-project-caption{padding:6px 7px}.county-map-controls{gap:10px}.county-map-select{min-width:150px}}
@media(max-width:360px){.county-map-select{min-width:138px}.county-map-back{font-size:12px}.county-map-controls{gap:6px}}
@media(prefers-reduced-motion:reduce){.county-map-land,.county-map-frames{transition:none}.county-map-light{stroke-dasharray:none}.county-map-glow.is-active{animation:none}}
/* Overview keeps county hit regions exposed; the full building belongs to Taichung detail. */
.county-map:not(.has-selection) .county-map-project{width:44px;height:44px;min-height:44px;transform:translate(-50%,-50%);justify-content:center}
.county-map:not(.has-selection) .county-map-project::before{content:"";display:block;width:12px;height:12px;border-radius:50%;background:#20382f;border:3px solid #f5f2ec;outline:1px solid #20382f}
.county-map:not(.has-selection) .county-map-project>img{display:none}
.county-map:not(.has-selection) .county-map-project-caption{position:absolute;left:36px;top:7px;pointer-events:none;padding:4px 6px;border:0;gap:1px;box-shadow:none}
.county-map:not(.has-selection) .county-map-project-caption strong{font-size:13px}
.county-map:not(.has-selection) .county-map-project-caption>span{font-size:12px}

.county-map.is-moving .county-map-light{display:none}
.county-map.is-moving .county-map-glow{animation:none}

.county-map-frames text{font-size:16px;fill:var(--county-muted)}
.county-map-supplement figcaption{min-height:44px}

/* Beitun site view (Ben 2026-10-24): the project opens the base plate; each press toggles five exploded plates (none overlapping) and the centred base.
   Plates move, labels only fade, so text never moves or blurs. */
.county-map-site{position:absolute;inset:0;z-index:3;display:block;padding:0;border:0;margin:0;background:var(--county-paper);font:inherit;color:inherit;cursor:pointer;opacity:0;animation:county-site-in .3s ease-out .45s forwards}
.county-map-site-art{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:3% 2%;-webkit-mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(0deg,transparent,#000 7%);-webkit-mask-composite:source-in;mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent),linear-gradient(0deg,transparent,#000 7%);mask-composite:intersect}
.county-map-site:focus-visible{outline:3px solid #20382f;outline-offset:-3px}
.county-map[data-site] .county-map-svg{opacity:0;transition:opacity .25s ease .4s}
.site-stack{position:relative;display:block;height:100%;max-width:100%}
.site-stack svg{display:block;width:76%;height:auto;overflow:visible;transition:transform .8s cubic-bezier(.2,.8,.2,1)}
.site-stack .sm-plate{transition:transform .8s cubic-bezier(.2,.8,.2,1),opacity .4s ease;transition-delay:calc(var(--i) * .12s)}
.site-stack .sm-guide,.site-stack .sm-pin{transition:opacity .4s ease .7s}
.site-stack-label{position:absolute;left:calc(76% + 14px);transform:translateY(-50%);font-size:12px;letter-spacing:.08em;color:#4f4a43;white-space:nowrap;transition:opacity .4s ease;transition-delay:calc(var(--i) * .12s + .5s)}
.site-stack-label::before{content:"";position:absolute;right:calc(100% + 4px);top:50%;width:12px;border-top:1px dotted #8a8a84}
.county-map[data-site=base] .site-stack svg{transform:translate(var(--site-base-x),var(--site-base-y)) scale(var(--site-base-scale))}
.county-map[data-site=base] .site-stack .sm-plate{transform:translateY(calc(var(--i) * var(--site-gap)));opacity:0;transition-delay:0s}
.county-map[data-site=base] .site-stack [style="--i:0"]{opacity:1}
.county-map[data-site=base] .site-stack :is(.sm-guide,.sm-pin,.site-stack-label){opacity:0;transition-delay:0s}
.county-map-site-hint{position:absolute;left:0;right:0;bottom:12px;font-size:12px;letter-spacing:.06em;color:var(--county-muted);text-align:center}
.county-map[data-site=exploded] .county-map-site-hint{display:none}
.county-map-site-note{margin:10px 0 0;font-size:11px;line-height:1.7;color:var(--county-muted)}
.county-map-site-note a{color:inherit;text-decoration:underline;text-underline-offset:3px}
@keyframes county-site-in{to{opacity:1}}
@media(prefers-reduced-motion:reduce){.county-map-site{animation:none;opacity:1}.county-map[data-site] .county-map-svg,.site-stack svg,.site-stack .sm-plate,.site-stack .sm-guide,.site-stack .sm-pin,.site-stack-label{transition:none}}
