.theater-map-page { max-width: 1140px; }
.theater-map-page [hidden] { display: none !important; }
.theater-map-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-block: clamp(35px, 5vw, 60px) 22px;
}
.theater-map-title h1,
.theater-map-title p { margin: 0; }
.theater-map-total { color: #d9c7a5; font-size: .9rem; }
.theater-map-load {
  max-width: 46ch;
  padding: 12px 0 16px;
  color: #e8d8bb;
}
.theater-map-load p { margin: 0; }
.theater-map-load:not(.is-error)::after {
  display: block;
  height: 2px;
  margin-top: 13px;
  background: linear-gradient(90deg, #7c5d36, #efd198, #7c5d36);
  background-size: 200% 100%;
  animation: map-loading 1.15s ease-in-out 2 alternate;
  content: "";
}
@keyframes map-loading {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}
.theater-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
  gap: clamp(16px, 3vw, 30px);
  align-items: start;
}
.theater-atlas.is-regional .theater-map-surface { aspect-ratio: 6 / 5; }
.theater-atlas {
  overflow: hidden;
  border: 1px solid #62523a;
  border-radius: 15px;
  background: #17130e;
}
.theater-atlas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 0 20px;
  border-bottom: 1px solid #403627;
  background: linear-gradient(90deg, #17130ef8, #17130ec2 51%, #17130e95),
    url("/assets/still-capital.jpg") 62% 39% / cover;
}
.theater-atlas.is-regional .theater-atlas-header { background: #17130e; }
.theater-atlas-header h2 { margin: 0; color: #f2e3ca; font-size: 1rem; }
.theater-map-coordinate {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 3px 0 0;
  color: #c7b392;
  font-size: .73rem;
  line-height: 1.35;
}
#map-coordinate-value {
  color: #efd39b;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.theater-atlas-header button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #d8c39c;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.theater-map-pointer-theater {
  color: #c3eadc;
  font-weight: 650;
  white-space: nowrap;
}
.theater-atlas-wordmark {
  position: absolute;
  right: clamp(12px, 3%, 26px);
  bottom: clamp(35px, 10%, 72px);
  color: #cfa567;
  opacity: .61;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.22rem, 3.2vw, 2.25rem);
  letter-spacing: .13em;
  line-height: 1;
  pointer-events: none;
}
.theater-atlas.is-regional .theater-atlas-wordmark { display: none; }
.theater-map-surface {
  position: relative;
  isolation: isolate;
  aspect-ratio: 10 / 11;
  overflow: hidden;
  background-color: #100e0d;
  background-image:
    radial-gradient(ellipse at 52% 68%, #9b602b32, transparent 71%),
    linear-gradient(#cfaa7510 1px, transparent 1px),
    linear-gradient(90deg, #cfaa7510 1px, transparent 1px);
  background-size: auto, 11.11% 10%, 11.11% 10%;
}
.theater-atlas:not(.is-regional) .theater-map-surface {
  background-image:
    linear-gradient(180deg, #100e0d59, #100e0da8 46%, #100e0de8),
    url("/assets/still-capital.jpg");
  background-position: center, 54% 44%;
  background-size: cover;
}
.theater-atlas:not(.is-regional) #map-outline > path { fill: #302619bd; }
.theater-atlas:not(.is-regional) #map-outline > .theater-land-neighbor { fill: #18130f96; }
.theater-map-surface::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  box-shadow: inset 0 0 clamp(34px, 8vw, 100px) #0a0806b8;
  content: "";
  pointer-events: none;
}
#map-layout:not([hidden]) .theater-map-surface::before, #map-scan {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, transparent 41%, #f1bf6415 50%, transparent 57%);
  pointer-events: none;
}
#map-layout:not([hidden]) .theater-map-surface::before {
  animation: map-first-sweep .68s ease-out both;
  content: "";
}
#map-scan { opacity: 0; }
@keyframes map-first-sweep {
  from { transform: translateY(-45%); opacity: 0; }
  37% { opacity: .85; }
  to { transform: translateY(42%); opacity: 0; }
}
.theater-map-surface svg, .theater-map-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
#map-outline { filter: drop-shadow(0 0 9px #c48a3f32); }
#map-outline path { fill: #302619; stroke: #c7a064; stroke-width: 1.15; vector-effect: non-scaling-stroke; }
#map-outline .theater-land-neighbor { fill: #1d1812; stroke: #554533; }
#map-outline .map-district { fill: #473622; fill-opacity: .28; stroke: #967446; stroke-width: .7; }
#map-outline .map-district:nth-child(even) { fill: #221b14; }
#map-outline .map-river {
  fill: none;
  stroke: #688781;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#map-outline .map-details[hidden] { display: none; }
#map-lines { z-index: 2; pointer-events: none; }
.theater-map-pins, .theater-map-north { z-index: 3; }
#map-lines path { fill: none; stroke: #c5a06b; stroke-width: 1; opacity: .65; transition: stroke .17s ease, opacity .17s ease; }
#map-lines path.is-region { stroke: #efd398; opacity: .64; stroke-dasharray: 3 3; }
#map-lines path.is-city { stroke: #c9b79b; opacity: .54; }
#map-lines path.is-highlighted { stroke: #ffe3a5; opacity: 1; }
#map-lines path.is-selected {
  stroke: #a9d9cd;
  opacity: 1;
  stroke-width: 1.5;
  stroke-dasharray: 1;
  animation: map-line-select .3s ease-out;
}
@keyframes map-line-select { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.theater-map-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ddc48e;
  opacity: .62;
  pointer-events: none;
  transition: background-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.theater-map-dot.is-labeled {
  width: 8px;
  height: 8px;
  opacity: 1;
  box-shadow: 0 0 0 2px #e9c4844d, 0 0 9px #d7a85b65;
}
.theater-map-dot.is-highlighted { background: #ffe3a5; box-shadow: 0 0 0 3px #ffe3a566, 0 0 11px #ffe3a583; }
.theater-map-dot.is-selected {
  background: #a9d9cd;
  box-shadow: 0 0 0 3px #a9d9cd55;
  animation: map-pin-select .29s ease-out;
}
@keyframes map-pin-select {
  from { box-shadow: 0 0 0 0 #a9d9cdcc; }
  to { box-shadow: 0 0 0 3px #a9d9cd55; }
}
.theater-map-callout {
  position: absolute;
  display: grid;
  align-content: center;
  max-width: 38%;
  min-height: 26px;
  padding: 1px 7px;
  border: 1px solid #665437;
  border-radius: 6px;
  background: #1b1711;
  color: #f2dab0;
  font: 650 clamp(.69rem, 1.2vw, .8rem)/1.1 system-ui, sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.theater-map-city {
  position: absolute;
  padding: 2px 5px;
  border: 1px solid #89755a;
  border-radius: 5px;
  background: #181612;
  color: #f4e4c7;
  font: 650 clamp(.77rem, 1.5vw, .91rem)/1.2 system-ui, sans-serif;
  white-space: nowrap;
  text-shadow: 0 0 6px #100e0d, 0 1px 2px #100e0d;
  pointer-events: none;
}
.theater-map-callout small { color: #bdad91; font-size: .68rem; }
.theater-map-callout.is-national {
  min-height: 21px;
  padding: 1px 6px;
  border-color: #806744;
  background: #231b12;
  font-size: .7rem;
}
.theater-map-callout:hover,
.theater-map-callout[aria-pressed="true"] { border-color: #90baa9; color: #b7e3d6; }
.theater-map-callout:focus-visible { z-index: 2; }
.theater-map-callout, .theater-map-region-pin, .theater-map-options button {
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.theater-map-region-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 4px 8px;
  border: 1px solid #b3945f;
  border-radius: 9px;
  background: #3e2d18;
  color: #ffe4ad;
  font: 750 clamp(.7rem, 1.3vw, .88rem)/1 system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.theater-map-region-pin span {
  min-width: 1.8em;
  padding: 4px;
  border-radius: 999px;
  background: #dfbb7a;
  color: #20160c;
  text-align: center;
  font-size: .7rem;
}
.theater-map-region-pin:hover { background: #58401f; }
.theater-map-north, .theater-map-river-label {
  position: absolute;
  pointer-events: none;
  color: #b8a681;
  font: 600 .7rem/1.2 system-ui, sans-serif;
}
.theater-map-north { right: 12px; top: 12px; }
.theater-map-river-label { color: #b1c8be; text-shadow: 0 1px 2px #111; }
.theater-map-credit {
  padding: 12px 16px;
  border-top: 1px solid #403627;
  background: linear-gradient(105deg, #16130e 32%, #211910);
  color: #b5aa91;
  font-size: .72rem;
  text-align: right;
}
.theater-map-credit p { margin: 0; }
.theater-map-caption {
  color: #d6c5a6;
  font-size: .79rem;
  letter-spacing: .015em;
}
.theater-map-caption::before {
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-inline-end: 8px;
  background: linear-gradient(90deg, transparent, #e3bd80);
  vertical-align: middle;
  content: "";
}
.theater-map-caption strong { color: #f4d9a6; margin-inline-start: 3px; }
#map-boundary-credit { margin-top: 4px; }
.theater-map-credit a { color: inherit; text-underline-offset: 2px; }
.theater-map-panel {
  border: 1px solid #514331;
  border-radius: 15px;
  background: #1a1610;
  padding: clamp(18px, 3vw, 26px);
}
.theater-map-controls h2 {
  margin: 0 0 8px;
  color: #efdfc2;
  font-size: .9rem;
}
.theater-map-options + h2 { margin-top: 16px; }
.theater-map-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.theater-map-region-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theater-map-options button {
  min-height: 44px;
  padding: 6px;
  border: 1px solid #665437;
  border-radius: 7px;
  background: #262016;
  color: #f4e5ca;
  font: 600 .79rem/1.25 system-ui, sans-serif;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.theater-map-options button:hover { border-color: #a88e61; }
.theater-map-options button[aria-pressed="true"] {
  border-color: #ddc38e;
  background: #ddc38e;
  color: #21190e;
}
@media (min-width: 920px) {
  .theater-map-theater-options.is-national { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.theater-map-detail {
  padding-top: 18px;
  margin-top: 22px;
  border-top: 1px solid #4a3d2a;
}
.theater-map-detail h2 { margin: 0 0 6px; color: #f7e8cf; font-size: 1.15rem; }
.theater-map-detail p { margin: 0; color: #c7b89d; font-size: .88rem; }
.theater-map-showings {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #4a3d2a;
}
.theater-map-showings h3 {
  margin: 0 0 8px;
  color: #f7e8cf;
  font-size: .9rem;
}
.theater-map-showings dl { margin: 0; }
.theater-map-showing-day {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 0;
}
.theater-map-showing-day + .theater-map-showing-day { border-top: 1px solid #3d3223; }
.theater-map-showing-day dt {
  margin-top: 5px;
  color: #d6c4a4;
  font-size: .82rem;
}
.theater-map-showing-day dt time {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.theater-map-showing-day dt span {
  color: #f0d5a4;
  font-family: system-ui, sans-serif;
}
.theater-map-showing-day dd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.theater-map-showing {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #30271a;
  color: #efcf8d;
  font: 700 .83rem/1.4 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.theater-map-showing small { color: #d5c09d; font-weight: 500; }
.theater-map-showing[data-started], .theater-map-showing[data-started] small { color: #000; }
.theater-map-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.theater-map-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #6d5940;
  color: #e9d8b9;
  font-size: .85rem;
  text-decoration: none;
}
.theater-map-links a:first-child { background: #ddc38e; border-color: #ddc38e; color: #20180c; font-weight: 700; }
.theater-map-page :focus-visible { outline: 2px solid #e8ce95; outline-offset: 3px; }
@media (max-width: 720px) {
  .theater-map-layout { grid-template-columns: minmax(0, 1fr); }
  .theater-atlas.is-regional .theater-map-surface { aspect-ratio: 1; }
}
@media (max-width: 455px) {
  .theater-atlas-header { padding-inline: 12px; gap: 8px; }
  .theater-map-surface { aspect-ratio: 10 / 16; }
  .theater-atlas.is-regional .theater-map-surface { aspect-ratio: 10 / 13; }
  .theater-map-region-pin { min-height: 38px; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .theater-map-page *, .theater-map-page *::before, .theater-map-page *::after {
    animation: none !important;
    transition: none !important;
  }
  #map-layout:not([hidden]) .theater-map-surface::before { content: none; }
}

/* Keep the selected theater beside the map before the theater grid. */
.theater-map-detail {
  margin: 0 0 20px;
  padding: 0 0 18px;
  border-top: 0;
  border-bottom: 1px solid #4a3d2a;
  scroll-margin-top: 18px;
}
.theater-map-detail #map-address { color: #b19a7c; }
.theater-map-detail .theater-map-next-showing {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  margin-top: 12px;
  padding: 9px 12px;
  border-left: 2px solid #d9bd89;
  background: #272013;
  color: #f0d7a7;
  font-variant-numeric: tabular-nums;
}
.theater-map-next-showing strong { color: #f5e9d4; }
.theater-atlas:not(.is-regional) .theater-map-surface {
  background-image:
    linear-gradient(180deg, #100e0da8, #100e0d75 42%, #100e0de8),
    url("/assets/still-capital.jpg");
}
.theater-atlas:not(.is-regional) #map-outline {
  animation: map-outline-reveal .55s ease-out both;
}
@keyframes map-outline-reveal {
  from { opacity: .28; }
  to { opacity: 1; }
}
@media (max-width: 720px) {
  .theater-map-layout { gap: 10px; }
}

.theater-map-directory {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.theater-map-directory .theater-directory-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  color: #eaca91;
  font-size: .82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.theater-directory-link span { margin-inline-start: 3px; }
.theater-map-links #map-naver {
  min-width: 44px;
  justify-content: center;
}
#map-theater-title { scroll-margin-top: 22px; }
.theater-map-panel {
  background: linear-gradient(160deg, #211b12, #17130f 42%);
}
.theater-map-showing { min-width: 79px; justify-content: space-between; }
@media (max-width: 720px) {
  .theater-map-title { margin-block: 24px 12px; }
}
