:root {
  --location-ink: #0e1a17;
  --location-ink-soft: #172923;
  --location-paper: #e7e7dc;
  --location-mist: #cbd3c8;
  --location-gold: #c9a96b;
  --location-gold-soft: rgba(201, 169, 107, .55);
  --location-line: rgba(220, 204, 165, .34);
  --location-copy: rgba(237, 240, 229, .74);
  --location-serif: "Songti TC", "STSong", "Noto Serif TC", Georgia, serif;
}

.location-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  padding: clamp(118px, 14vh, 164px) 0 clamp(82px, 10vh, 126px);
  background:
    radial-gradient(circle at 92% 8%, rgba(154, 175, 137, .19), transparent 22%),
    radial-gradient(circle at 8% 78%, rgba(190, 155, 96, .12), transparent 27%),
    linear-gradient(140deg, #0c1714 0%, #14241e 44%, #101b17 100%);
  color: #f4f2e9;
}
.location-section::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(223, 223, 203, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 223, 203, .045) 1px, transparent 1px),
    repeating-radial-gradient(ellipse at 50% 50%, transparent 0 37px, rgba(205, 174, 110, .05) 38px 39px, transparent 40px 75px);
  background-position: center;
  background-size: 44px 44px, 44px 44px, auto;
  content: "";
  opacity: .72;
  pointer-events: none;
}
.location-section::after {
  position: absolute;
  z-index: -1;
  top: -26vw;
  right: -15vw;
  width: min(72vw, 970px);
  aspect-ratio: 1;
  border: 1px solid rgba(213, 191, 136, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(214, 196, 152, .025), 0 0 0 137px rgba(214, 196, 152, .015);
  content: "";
}

.location-inner { width: min(1440px, calc(100% - 12vw)); margin: 0 auto; }
.location-heading { max-width: 840px; }
.location-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 23px; color: rgba(224, 203, 154, .88); font-size: 10px; font-weight: 600; letter-spacing: .23em; }
.location-eyebrow span:first-child { display: inline-grid; width: 28px; height: 20px; place-items: center; border: 1px solid rgba(214, 185, 122, .66); color: rgba(241, 224, 184, .92); font-size: 9px; }
.location-title { max-width: 840px; margin: 0; color: #f4f1e8; font-family: var(--location-serif); font-size: clamp(44px, 5vw, 81px); font-weight: 500; letter-spacing: .065em; line-height: 1.12; }
.location-title-line { display: block; overflow: hidden; padding-bottom: .08em; }
.location-title-line > span { display: block; opacity: 0; transform: translateY(108%); transition: transform 830ms cubic-bezier(.16, 1, .3, 1), opacity 460ms ease; }
.location-section.is-revealed .location-title-line > span { opacity: 1; transform: translateY(0); }
.location-section.is-revealed .location-title-line:nth-child(2) > span { transition-delay: 140ms; }
.location-intro { max-width: 670px; margin: 25px 0 0; color: var(--location-copy); font-size: clamp(13px, 1.08vw, 16px); font-weight: 300; letter-spacing: .04em; line-height: 1.86; }

.location-atlas { margin-top: clamp(34px, 6vh, 64px); }
.location-atlas-topline { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 14px; color: rgba(224, 206, 163, .76); font-size: 9px; letter-spacing: .2em; }
.location-atlas-label { display: flex; align-items: center; gap: 12px; margin: 0; }
.location-atlas-label::before { width: 30px; height: 1px; background: var(--location-gold); content: ""; }
.location-north { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.location-north i { position: relative; display: inline-block; width: 19px; height: 19px; border: 1px solid rgba(230, 217, 183, .68); transform: rotate(45deg); }
.location-north i::after { position: absolute; top: 2px; left: 2px; width: 6px; height: 6px; background: var(--location-gold); content: ""; }

.location-atlas-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(236px, 286px); align-items: stretch; border: 1px solid var(--location-line); background: rgba(7, 16, 13, .45); box-shadow: 0 35px 100px rgba(0, 0, 0, .22); }
.location-map-shell { position: relative; min-height: clamp(416px, 51vw, 674px); overflow: hidden; outline: none; background: linear-gradient(135deg, #cdd2c6, #aab6a8); cursor: zoom-in; }
.location-map-shell:focus-visible { outline: 1px solid #f1d68b; outline-offset: -6px; }
.location-map-shell::before, .location-map-shell::after { position: absolute; z-index: 4; content: ""; pointer-events: none; }
.location-map-shell::before { inset: 18px; border: 1px solid rgba(239, 224, 181, .48); }
.location-map-shell::after { inset: 0; background: linear-gradient(90deg, rgba(9, 23, 18, .2), transparent 18%, transparent 82%, rgba(9, 23, 18, .14)), linear-gradient(0deg, rgba(9, 23, 18, .24), transparent 22%); }
.location-map-frame { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.location-map-image { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; filter: saturate(.84) contrast(1.04); transform: scale(1.065); transition: opacity 760ms ease, transform 1500ms cubic-bezier(.16, 1, .3, 1), filter 620ms ease; }
.location-map-image.is-visible { opacity: 1; transform: scale(1); }
.location-map-shell.is-changing .location-map-image { filter: saturate(.35) brightness(.86); transform: scale(.985); }
.location-map-grid { position: absolute; z-index: 2; inset: 0; background-image: linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px); background-size: 62px 62px; mix-blend-mode: soft-light; opacity: .42; pointer-events: none; }
.location-scan { position: absolute; z-index: 3; right: 0; left: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(236, 210, 143, .9), transparent); box-shadow: 0 0 12px rgba(241, 202, 113, .58); opacity: .72; animation: location-scan 6.8s ease-in-out infinite; pointer-events: none; }
.location-site-pin { position: absolute; z-index: 5; top: 50.2%; left: 49.7%; display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid rgba(255, 238, 189, .9); border-radius: 50%; opacity: 0; transform: translate(-50%, -50%) scale(.75); transition: opacity 380ms ease, transform 380ms ease; }
.location-site-pin::before { width: 6px; height: 6px; border-radius: 50%; background: #dc403a; box-shadow: 0 0 0 6px rgba(220, 64, 58, .17), 0 0 18px rgba(255, 156, 116, .65); content: ""; animation: location-pulse 2.6s ease-in-out infinite; }
.location-map-shell[data-layer="0"] .location-site-pin { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.location-map-open { position: absolute; z-index: 7; right: 31px; bottom: 29px; display: grid; width: 48px; height: 48px; padding: 0; place-items: center; border: 1px solid rgba(248, 229, 178, .95); border-radius: 50%; background: rgba(13, 30, 23, .78); color: #efcf84; box-shadow: 0 0 0 4px rgba(216, 180, 107, .16), 0 10px 24px rgba(0, 0, 0, .27); backdrop-filter: blur(10px); transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.location-map-open:hover, .location-map-open:focus-visible { outline: 0; background: rgba(59, 80, 58, .92); box-shadow: 0 0 0 7px rgba(224, 190, 112, .16), 0 12px 28px rgba(0, 0, 0, .32); transform: scale(1.08); }
.location-map-open svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.6; }
.location-map-scale { position: absolute; z-index: 6; bottom: 27px; left: 31px; display: flex; align-items: end; gap: 9px; color: rgba(255, 250, 232, .78); font-size: 8px; letter-spacing: .16em; pointer-events: none; }
.location-map-scale i { display: inline-block; width: 74px; height: 5px; border: 1px solid rgba(255, 246, 215, .68); background: linear-gradient(90deg, rgba(255,255,255,.86) 0 50%, rgba(20,36,29,.9) 50%); }

.location-layer-panel { display: flex; flex-direction: column; border-left: 1px solid var(--location-line); background: linear-gradient(180deg, rgba(231, 231, 218, .10), rgba(7, 15, 13, .12)); }
.location-layer { position: relative; flex: 1; display: grid; grid-template-columns: 33px minmax(0, 1fr) 9px; gap: 9px; align-items: center; min-height: 88px; padding: 13px 16px; border: 0; border-bottom: 1px solid rgba(229, 213, 172, .19); background: transparent; color: rgba(236, 236, 221, .54); text-align: left; transition: background 300ms ease, color 300ms ease, padding 300ms ease; }
.location-layer:last-child { border-bottom: 0; }
.location-layer:hover, .location-layer.is-active { padding-left: 21px; background: linear-gradient(90deg, rgba(203, 172, 105, .19), rgba(217, 212, 184, .04)); color: #fff8e8; }
.location-layer-number { color: rgba(223, 197, 140, .78); font-size: 9px; letter-spacing: .14em; }
.location-layer-name { font-family: var(--location-serif); font-size: clamp(15px, 1.28vw, 18px); font-weight: 500; letter-spacing: .06em; }
.location-layer-dot { width: 6px; height: 6px; border: 1px solid rgba(230, 213, 167, .62); border-radius: 50%; transition: background 240ms ease, box-shadow 240ms ease; }
.location-layer.is-active .location-layer-dot { border-color: #f5d988; background: #f5d988; box-shadow: 0 0 0 5px rgba(245, 217, 136, .14), 0 0 16px rgba(245, 217, 136, .64); }

.location-active-caption { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 23px; width: min(820px, calc(100% - 12vw)); margin: -1px 0 0 clamp(5vw, 8vw, 112px); padding: 23px 0 0; border-top: 1px solid var(--location-line); }
.location-caption-index { margin: 3px 0 0; color: rgba(227, 201, 143, .84); font-size: 10px; letter-spacing: .18em; }
.location-caption-kicker { margin: 0 0 7px; color: rgba(174, 202, 182, .88); font-size: 9px; letter-spacing: .2em; }
.location-active-caption h3 { margin: 0; color: #f4f1e8; font-family: var(--location-serif); font-size: clamp(25px, 2.3vw, 35px); font-weight: 500; letter-spacing: .08em; }
.location-active-caption div > p:last-child { max-width: 540px; margin: 8px 0 0; color: rgba(231, 235, 223, .68); font-size: 13px; font-weight: 300; line-height: 1.75; }
.location-mobile-rail { display: none; }
.location-notes { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 26px; color: rgba(220, 226, 213, .61); font-size: 10px; letter-spacing: .04em; line-height: 1.75; }
.location-notes > p { display: flex; align-items: center; gap: 12px; margin: 0; }
.location-reference { color: rgba(226, 200, 142, .72); font-size: 8px; letter-spacing: .14em; }
.location-reference .reference-mark { border-color: var(--location-gold); }
.location-reveal { opacity: 0; transform: translateY(22px); transition: opacity 680ms cubic-bezier(.16, 1, .3, 1) var(--location-delay, 0ms), transform 680ms cubic-bezier(.16, 1, .3, 1) var(--location-delay, 0ms); }
.location-section.is-revealed .location-reveal { opacity: 1; transform: translateY(0); }

.location-reader { position: fixed; z-index: 94; inset: 0; display: grid; place-items: center; padding: 5.5vw; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 300ms ease, visibility 300ms ease; }
.location-reader.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.location-reader-backdrop { position: absolute; inset: 0; border: 0; background: rgba(5, 14, 11, .87); backdrop-filter: blur(14px); }
.location-reader-panel { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr); width: min(1320px, 100%); max-height: 89svh; overflow: hidden; border: 1px solid rgba(218, 191, 128, .63); background: #e9e9dc; box-shadow: 0 32px 100px rgba(0, 0, 0, .45); opacity: .95; transform: translateY(18px) scale(.984); transition: transform 430ms cubic-bezier(.16, 1, .3, 1), opacity 300ms ease; }
.location-reader.is-open .location-reader-panel { opacity: 1; transform: translateY(0) scale(1); }
.location-reader-canvas { position: relative; min-height: 0; height: min(76svh, 820px); overflow: hidden; background: linear-gradient(135deg, #b8c1b4, #dae0d6); cursor: grab; touch-action: none; user-select: none; }
.location-reader-canvas.is-panning { cursor: grabbing; }
.location-reader-canvas img { position: absolute; top: 50%; left: 50%; display: block; max-width: calc(100% - 30px); max-height: calc(100% - 30px); object-fit: contain; transform: translate3d(-50%, -50%, 0) scale(1); transform-origin: center; will-change: transform; }
.location-reader-controls { position: absolute; z-index: 3; right: 16px; bottom: 16px; display: grid; gap: 7px; }
.location-reader-controls button { display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 1px solid rgba(242, 224, 177, .84); border-radius: 50%; background: rgba(17, 35, 27, .81); color: #f4d78d; font-size: 20px; line-height: 1; box-shadow: 0 6px 16px rgba(0,0,0,.2); backdrop-filter: blur(8px); }
.location-reader-controls button:last-child { font-size: 14px; }
.location-reader-content { display: flex; flex-direction: column; justify-content: center; min-height: 0; padding: clamp(34px, 4vw, 68px) clamp(28px, 3.7vw, 58px); border-left: 1px solid rgba(113, 105, 76, .27); background: linear-gradient(155deg, rgba(136, 168, 145, .17), transparent 36%), repeating-radial-gradient(ellipse at 100% 10%, transparent 0 17px, rgba(165, 130, 74, .08) 18px 19px, transparent 20px 36px); color: #3f4338; }
.location-reader-kicker { margin: 0 0 16px; color: rgba(75, 109, 91, .87); font-size: 9px; font-weight: 600; letter-spacing: .2em; }
.location-reader-content h2 { margin: 0; color: #343b31; font-family: var(--location-serif); font-size: clamp(31px, 3.1vw, 52px); font-weight: 500; letter-spacing: .08em; line-height: 1.22; }
.location-reader-description { margin: 22px 0 0; color: rgba(59, 67, 56, .76); font-size: 14px; font-weight: 300; letter-spacing: .045em; line-height: 1.9; }
.location-reader-hint { margin: 26px 0 0; color: rgba(59, 83, 67, .75); font-size: 10px; line-height: 1.7; }
.location-reader-reference { display: flex; align-items: center; gap: 10px; margin: 29px 0 0; padding-top: 16px; border-top: 1px solid rgba(95, 91, 68, .27); color: rgba(119, 94, 52, .78); font-size: 8px; letter-spacing: .13em; line-height: 1.65; }
.location-reader-reference .reference-mark { border-color: var(--location-gold); }
.location-reader-close { position: absolute; z-index: 4; top: 13px; right: 14px; display: inline-flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid rgba(172, 139, 79, .7); background: rgba(245, 244, 233, .89); color: #46503f; font-size: 10px; letter-spacing: .12em; transition: color 180ms ease, background 180ms ease; }
.location-reader-close:hover { background: rgba(147, 178, 155, .28); color: #254638; }
.location-reader-close span:last-child { font-size: 20px; font-weight: 300; line-height: .7; }
body.location-reader-open { overflow: hidden; }

@keyframes location-scan { 0%, 100% { top: 16%; opacity: .05; } 48% { top: 82%; opacity: .74; } }
@keyframes location-pulse { 0%, 100% { transform: scale(.82); opacity: .72; } 52% { transform: scale(1.32); opacity: 1; } }

@media (max-width: 800px) {
  .location-section { min-height: auto; padding: 114px 0 70px; }
  .location-inner { width: min(100% - 40px, 620px); }
  .location-eyebrow { margin-bottom: 16px; font-size: 9px; letter-spacing: .18em; }
  .location-title { font-size: clamp(38px, 12vw, 57px); }
  .location-intro { margin-top: 20px; font-size: 13px; line-height: 1.82; }
  .location-atlas { margin-top: 31px; }
  .location-atlas-topline { margin-bottom: 10px; font-size: 8px; }
  .location-atlas-grid { display: block; margin-inline: -20px; border-right: 0; border-left: 0; }
  .location-map-shell { min-height: min(82vw, 510px); }
  .location-map-shell::before { inset: 13px; }
  .location-map-open { right: 18px; bottom: 17px; width: 43px; height: 43px; }
  .location-map-scale { bottom: 19px; left: 19px; font-size: 7px; }
  .location-map-scale i { width: 58px; }
  .location-layer-panel { display: none; }
  .location-active-caption { grid-template-columns: 52px minmax(0, 1fr); gap: 13px; width: 100%; margin: 0; padding-top: 19px; }
  .location-active-caption h3 { font-size: 24px; }
  .location-active-caption div > p:last-child { margin-top: 7px; font-size: 12px; }
  .location-mobile-rail { display: flex; width: calc(100% + 40px); margin: 27px 0 0 -20px; overflow-x: auto; border-top: 1px solid var(--location-line); border-bottom: 1px solid var(--location-line); scrollbar-width: none; }
  .location-mobile-rail::-webkit-scrollbar { display: none; }
  .location-layer.mobile { flex: 0 0 124px; min-height: 76px; grid-template-columns: 25px 1fr; padding: 14px 12px; border-right: 1px solid rgba(229, 213, 172, .19); border-bottom: 0; }
  .location-layer.mobile .location-layer-dot { display: none; }
  .location-layer.mobile:hover, .location-layer.mobile.is-active { padding-left: 12px; box-shadow: inset 0 3px 0 #efce7d; }
  .location-layer-name { font-size: 14px; }
  .location-notes { align-items: flex-start; margin-top: 19px; font-size: 9px; }
  .location-notes > p { align-items: flex-start; gap: 9px; }
  .location-reference { font-size: 8px; }
  .location-reader { padding: 20px; }
  .location-reader-panel { display: block; max-height: 90svh; overflow-y: auto; }
  .location-reader-canvas { height: min(53svh, 510px); }
  .location-reader-content { padding: 27px 22px 25px; border-top: 1px solid rgba(95, 91, 68, .27); border-left: 0; }
  .location-reader-kicker { margin-bottom: 10px; }
  .location-reader-content h2 { font-size: 30px; }
  .location-reader-description { margin-top: 12px; font-size: 12px; line-height: 1.78; }
  .location-reader-hint { margin-top: 17px; font-size: 9px; }
  .location-reader-reference { margin-top: 21px; padding-top: 12px; }
  .location-reader-close { top: 9px; right: 9px; }
  .location-reader-controls { right: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .location-reveal, .location-title-line > span { opacity: 1; transform: none; transition: none; }
  .location-map-image, .location-reader, .location-reader-panel { transition: none; }
  .location-scan, .location-site-pin::before { animation: none; }
}
