:root {
  --paper: #f6f2e9;
  --paper-deep: #e9e1d0;
  --ink: #17211d;
  --muted: #68736c;
  --line: rgba(23, 33, 29, 0.14);
  --sage: #7d957c;
  --moss: #425a43;
  --river: #7296a6;
  --brick: #ad5f45;
  --ochre: #c79848;
  --white: #fffdf7;
  --shadow: 0 18px 55px rgba(35, 41, 35, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(114, 150, 166, 0.18), transparent 32%),
    linear-gradient(135deg, #f8f5ee 0%, #ece5d9 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(460px, 1fr) minmax(280px, 340px);
  gap: 16px;
  min-height: 100vh;
  padding: 16px;
}

.place-rail,
.detail-panel,
.map-section {
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.place-rail {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 32px);
  border-radius: 8px;
  overflow: hidden;
}

.brand-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 22px 18px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--brick);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.brand-block {
  align-items: center;
}

.brand-block h1 {
  font-size: clamp(1.45rem, 1.8vw, 1.85rem);
  line-height: 1.08;
}

.brand-block .focus-toggle {
  flex: 0 0 auto;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.8vw, 2.55rem);
  line-height: 1;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(23, 33, 29, 0.2);
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
}

.focus-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.focus-btn {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.focus-btn.active {
  color: var(--white);
  background: var(--moss);
}

.home-switcher,
.filter-row,
.view-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-switcher {
  padding: 0 20px 16px;
}

.chip,
.filter,
.tool {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  padding: 0 13px;
}

.chip.active,
.filter.active,
.tool.active {
  color: var(--white);
  border-color: transparent;
  background: var(--moss);
}

.search-box {
  display: grid;
  gap: 8px;
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  padding: 0 13px;
  color: var(--ink);
  background: var(--white);
}

.search-box input:focus {
  border-color: rgba(66, 90, 67, 0.58);
  box-shadow: 0 0 0 4px rgba(125, 149, 124, 0.2);
}

.mini-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.mini-stats div {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  background: rgba(246, 242, 233, 0.86);
}

.mini-stats strong {
  font-size: 1.35rem;
}

.mini-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.filter-row {
  padding: 16px 20px;
}

.place-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 14px 18px;
  overflow: auto;
}

.place-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px;
  color: inherit;
  text-align: left;
  background: rgba(255, 253, 247, 0.74);
}

.place-card:hover,
.place-card.active {
  border-color: rgba(66, 90, 67, 0.24);
  background: var(--white);
}

.thumb {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent),
    var(--sage);
  font-weight: 850;
  overflow: hidden;
}

.thumb.heritage {
  background-color: var(--brick);
}

.thumb.nature {
  background-color: var(--moss);
}

.thumb.walk {
  background-color: var(--river);
}

.card-copy {
  min-width: 0;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-weight: 850;
}

.card-title span:first-child {
  overflow-wrap: anywhere;
}

.status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ochre);
}

.status-dot.planned {
  background: var(--river);
}

.status-dot.visited {
  background: var(--moss);
}

.card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.map-section {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: calc(100vh - 32px);
  border-radius: 8px;
  overflow: hidden;
}

.map-canvas {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #eef0e7;
}

.map-canvas::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 253, 247, 0.4), rgba(255, 253, 247, 0.26)),
    radial-gradient(circle at 28% 28%, rgba(114, 150, 166, 0.18), transparent 30%),
    repeating-linear-gradient(
      -8deg,
      transparent 0 18px,
      rgba(23, 33, 29, 0.025) 18px 19px
    );
  mix-blend-mode: screen;
}

.actual-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-fallback {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 12px 28px rgba(23, 33, 29, 0.12);
}

.map-fallback.visible {
  display: block;
}

.leaflet-container {
  color: var(--ink);
  font-family: inherit;
  background: #eef0e7;
}

.leaflet-tile-pane {
  transition: filter 0.35s ease, opacity 0.35s ease;
}

/* Map surface styles, toggled by a class on .map-canvas */
.mapstyle-parchment .leaflet-tile-pane {
  filter: sepia(0.55) saturate(0.72) brightness(1.08) contrast(0.9) hue-rotate(-12deg);
  opacity: 0.9;
}

.mapstyle-soft .leaflet-tile-pane {
  filter: saturate(0.82) brightness(1.06) contrast(0.95);
  opacity: 0.92;
}

.mapstyle-grey .leaflet-tile-pane {
  filter: grayscale(1) brightness(1.03) contrast(0.92);
  opacity: 0.92;
}

.map-style-toggle {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.16);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
  font-weight: 800;
}

.map-style-toggle:hover {
  background: var(--white);
}

.map-style-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(23, 33, 29, 0.2);
  border-radius: 50%;
  background: var(--ochre);
}

.mapstyle-parchment .map-style-swatch {
  background: #c9a36a;
}

.mapstyle-soft .map-style-swatch {
  background: linear-gradient(135deg, #8fae7e, #7296a6);
}

.mapstyle-grey .map-style-swatch {
  background: #9a9a96;
}

.leaflet-control-attribution {
  color: var(--muted);
  background: rgba(255, 253, 247, 0.82);
}

.landmark-marker {
  position: relative;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
}

.landmark-kings,
.landmark-ely {
  width: 160px;
  height: 126px;
}

.landmark-marker::after {
  position: absolute;
  inset: 13px 10px 10px;
  z-index: -1;
  border: 2px dashed rgba(23, 33, 29, 0.22);
  border-radius: 50%;
  content: "";
  opacity: 0;
  transform: rotate(-10deg);
}

.landmark-marker.active {
  width: 138px;
  height: 138px;
}

.landmark-kings.active,
.landmark-ely.active {
  width: 186px;
  height: 146px;
}

.landmark-marker.active::after {
  opacity: 1;
}

.landmark-marker .place-model {
  filter:
    drop-shadow(0 16px 16px rgba(23, 33, 29, 0.24))
    drop-shadow(0 2px 0 rgba(255, 253, 247, 0.86));
}

.place-model {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.place-asset {
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.place-model-thumb {
  width: 40px;
  height: 40px;
}

.place-asset-thumb {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 4px 5px rgba(23, 33, 29, 0.2));
}

.place-model-marker {
  width: 102px;
  height: 102px;
}

.place-asset-marker {
  width: 104px;
  height: 104px;
  filter:
    drop-shadow(0 18px 18px rgba(23, 33, 29, 0.26))
    drop-shadow(0 2px 0 rgba(255, 253, 247, 0.88));
}

.place-asset-kings.place-asset-marker,
.place-asset-ely.place-asset-marker {
  width: 154px;
  height: 112px;
}

.place-model-marker-active {
  width: 124px;
  height: 124px;
}

.place-asset-marker-active {
  width: 126px;
  height: 126px;
  filter:
    drop-shadow(0 20px 22px rgba(23, 33, 29, 0.3))
    drop-shadow(0 2px 0 rgba(255, 253, 247, 0.9));
}

.place-asset-kings.place-asset-marker-active,
.place-asset-ely.place-asset-marker-active {
  width: 178px;
  height: 132px;
}

.place-model-detail {
  position: relative;
  z-index: 3;
  width: min(390px, 118%);
  height: auto;
  margin: 0 -34px -78px;
  filter:
    drop-shadow(0 34px 34px rgba(23, 33, 29, 0.34))
    drop-shadow(0 2px 0 rgba(255, 253, 247, 0.72));
}

.place-asset-detail {
  position: relative;
  z-index: 3;
  width: min(430px, 128%);
  height: auto;
  margin: 0 -42px -86px;
  filter:
    drop-shadow(0 38px 38px rgba(23, 33, 29, 0.38))
    drop-shadow(0 2px 0 rgba(255, 253, 247, 0.78));
}

.place-asset-kings.place-asset-detail,
.place-asset-ely.place-asset-detail {
  width: min(455px, 124%);
  margin: 0 -32px -60px;
}

.detail-place-kings .place-asset-detail {
  transform: translateY(10px) rotate(-1.4deg);
  transform-origin: 50% 78%;
}

.detail-place-ely .place-asset-detail {
  width: min(430px, 118%);
  margin-bottom: -54px;
  transform: translateY(4px) rotate(1deg);
  transform-origin: 50% 78%;
}

.model-shadow {
  fill: rgba(23, 33, 29, 0.18);
}

.model-base path,
.model-lawn,
.model-meadow {
  fill: #81966f;
}

.model-wall.warm {
  fill: #c59067;
}

.model-wall.pale {
  fill: #d7c6a8;
}

.model-wall.stone {
  fill: #c7c0b0;
}

.model-side.stone-dark {
  fill: #9d968a;
}

.model-roof.dark {
  fill: #7f4b37;
}

.model-roof.edge,
.model-accent,
.model-detail,
.model-reed,
.model-river,
.model-spire {
  fill: none;
  stroke: #5d4b3d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.model-roof.slate,
.model-tower-top {
  fill: #6d7880;
}

.model-mountain {
  fill: #78906f;
}

.model-stone {
  fill: #a69d8e;
}

.model-water,
.model-river {
  fill: #7fb0bf;
}

.model-river {
  fill: none;
  stroke: #edf8fa;
  stroke-width: 5;
}

.model-boat,
.model-punt {
  fill: #9b6943;
}

.model-reed,
.model-reed-head {
  fill: none;
  stroke: #566946;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.model-reed-head {
  fill: #c7a65b;
  stroke-width: 2;
}

.model-tree {
  fill: #4f6b4d;
}

.model-tree.round {
  fill: #5f7b58;
}

.model-path {
  fill: #c4ad7a;
}

.model-window {
  fill: #586d76;
}

.model-window.tall {
  fill: #6c8790;
}

.model-tower {
  fill: #bfb6a8;
}

.marker-label {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff0a8;
  box-shadow: 0 10px 20px rgba(23, 33, 29, 0.12);
  font-family: "Marker Felt", "Comic Sans MS", "Bradley Hand", cursive;
  font-size: 1rem;
  font-weight: 800;
  transform: rotate(-1deg);
}

.marker-label::before {
  display: none;
}

.detail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - 32px);
  border-radius: 8px;
  overflow: visible;
  isolation: isolate;
}

.photo-strip {
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(280px, 36vh, 330px);
  overflow: visible;
  border-radius: 8px 8px 0 0;
  animation: stage-rise 0.55s ease both;
  background:
    radial-gradient(110% 54% at 50% 108%, rgba(23, 33, 29, 0.32), transparent 64%),
    radial-gradient(68% 56% at 50% 42%, rgba(255, 253, 247, 0.28), transparent 66%),
    radial-gradient(78% 58% at 72% 12%, rgba(255, 255, 255, 0.42), transparent 56%),
    linear-gradient(162deg, var(--brick), var(--river));
}

.photo-strip.nature {
  background:
    radial-gradient(115% 70% at 50% 122%, rgba(23, 33, 29, 0.24), transparent 62%),
    radial-gradient(78% 58% at 72% 12%, rgba(246, 242, 233, 0.4), transparent 56%),
    linear-gradient(162deg, #3f5a44, #9bad8d 58%, #7296a6);
}

.photo-strip.walk {
  background:
    radial-gradient(115% 70% at 50% 122%, rgba(23, 33, 29, 0.24), transparent 62%),
    radial-gradient(78% 58% at 72% 12%, rgba(255, 255, 255, 0.36), transparent 56%),
    linear-gradient(162deg, #58798a, #d0b16f);
}

/* Faint topographic contour rings give the plate a cartographic texture. */
.photo-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-radial-gradient(
    circle at 28% 116%,
    transparent 0 24px,
    rgba(255, 253, 247, 0.06) 24px 25px
  );
  pointer-events: none;
}

.detail-model-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: clamp(280px, 36vh, 330px);
  padding-bottom: 66px;
  place-items: end center;
  overflow: visible;
  animation: model-rise 0.8s cubic-bezier(0.16, 0.78, 0.22, 1) both 0.12s;
  background:
    radial-gradient(74% 24% at 50% 92%, rgba(23, 33, 29, 0.34), transparent 72%),
    radial-gradient(circle at 50% 54%, rgba(255, 253, 247, 0.32), transparent 39%);
}

.detail-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 0;
  overflow-y: auto;
  padding: 36px 26px 30px;
}

.detail-head h3 {
  position: relative;
  margin: 0 0 14px;
  padding-bottom: 16px;
  font-family: Georgia, "Songti SC", "STSong", "Times New Roman", serif;
  font-size: clamp(2.05rem, 2.5vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.detail-location {
  margin: 0;
  color: var(--brick);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.custodian-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.custodian-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.custodian-badge.english-heritage {
  color: #7a213a;
  background: rgba(122, 33, 58, 0.07);
}

.custodian-badge.national-trust {
  color: #3a5a32;
  background: rgba(58, 90, 50, 0.08);
}

.detail-epigraph {
  position: relative;
  margin: -4px 0 2px;
  padding: 2px 0 0 18px;
}

.detail-epigraph::before {
  content: "\201C";
  position: absolute;
  top: -20px;
  left: -4px;
  color: rgba(173, 95, 69, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.6rem;
  line-height: 1;
}

.detail-epigraph blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Songti SC", "STSong", "Times New Roman", serif;
  font-size: clamp(1rem, 1.25vw, 1.28rem);
  font-style: italic;
  line-height: 1.22;
}

.detail-epigraph cite {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.detail-epigraph cite::before {
  content: "";
  width: 26px;
  height: 1px;
  flex: 0 0 auto;
  background: rgba(173, 95, 69, 0.52);
}

.detail-foot {
  display: grid;
  gap: 14px;
}

.visit-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.visit-toggle:hover {
  border-color: rgba(66, 90, 67, 0.5);
}

.visit-toggle .visit-check {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.66rem;
  line-height: 1;
}

.visit-toggle.is-visited {
  color: var(--white);
  border-color: transparent;
  background: var(--moss);
}

.visit-toggle.is-visited .visit-check {
  border-color: rgba(255, 253, 247, 0.55);
  color: var(--white);
}

.detail-rule {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-rule::before,
.detail-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 35%, var(--line) 65%, transparent);
}

.compass {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: var(--brick);
}

.detail-coord {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.detail-empty {
  grid-row: 1 / -1;
  grid-column: 1 / -1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px 30px;
  color: var(--muted);
  text-align: center;
}

.detail-empty-mark .compass {
  width: 34px;
  height: 34px;
  fill: rgba(173, 95, 69, 0.45);
}

.detail-empty .eyebrow {
  margin: 0;
}

.detail-empty p {
  margin: 0;
  max-width: 30ch;
  line-height: 1.55;
}

.detail-grid strong {
  font-size: 0.96rem;
}

/* Desktop: pin the 3-column shell to the viewport so the place list scrolls
   inside the rail instead of stretching the whole row and ballooning the map. */
@media (min-width: 1101px) {
  .app-shell {
    height: 100vh;
    grid-template-rows: minmax(0, 1fr);
  }

  .place-list {
    min-height: 0;
  }
}

/* Tablet: keep the rail + map row at viewport height (so the rail scrolls and
   the map keeps a sane height) while the detail panel flows below the fold. */
@media (min-width: 761px) and (max-width: 1100px) {
  .app-shell {
    grid-template-rows: minmax(0, calc(100vh - 32px)) auto;
  }

  .place-rail,
  .map-section {
    min-height: 0;
    max-height: calc(100vh - 32px);
  }

  .place-list {
    min-height: 0;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: minmax(270px, 330px) 1fr;
  }

  .detail-panel {
    grid-column: 1 / -1;
    min-height: auto;
    grid-template-columns: minmax(220px, 34%) 1fr;
    grid-template-rows: auto;
  }

  .photo-strip {
    min-height: 100%;
    border-radius: 8px 0 0 8px;
  }

  .detail-model-wrap {
    min-height: 300px;
  }

  .place-model-detail {
    width: min(330px, 132%);
    margin: 0 -34px -36px;
  }

  .place-asset-detail {
    width: min(360px, 140%);
    margin: 0 -44px -42px;
  }

  .place-asset-kings.place-asset-detail,
  .place-asset-ely.place-asset-detail {
    width: min(430px, 152%);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    padding: 10px;
  }

  .place-rail,
  .map-section,
  .detail-panel {
    min-height: auto;
  }

  .map-section {
    grid-template-rows: 68vh;
  }

  .map-canvas {
    min-height: 68vh;
  }

  .detail-panel {
    grid-template-columns: 1fr;
  }

  .photo-strip {
    min-height: 170px;
    border-radius: 8px 8px 0 0;
  }

  .detail-model-wrap {
    min-height: 210px;
  }

  .place-model-detail {
    width: min(300px, 112%);
    margin: 0 -18px -48px;
  }

  .place-asset-detail {
    width: min(330px, 118%);
    margin: 0 -22px -54px;
  }

  .place-asset-kings.place-asset-detail,
  .place-asset-ely.place-asset-detail {
    width: min(380px, 126%);
  }
}

/* ============================================================
   Detail panel: dramatic stage presentation
   ============================================================ */

/* Cinematic vignette framing the stage: above the glyph + contour rings,
   below the landmark, so the model stays bright and edge-lit. */
.photo-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(135% 108% at 50% 44%, transparent 48%, rgba(8, 12, 9, 0.5) 100%);
}

/* Oversized place glyph watermark behind the landmark, like a faint seal. */
.stage-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  transform: translate(-50%, -60%);
  font-family: Georgia, "Songti SC", "STSong", "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(8rem, 18vw, 13rem);
  line-height: 1;
  color: rgba(255, 250, 241, 0.14);
  text-shadow: 0 6px 44px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  animation: glyph-in 1s ease both 0.06s;
}

/* Floating status chip on the stage. */
.stage-status {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 11px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.92);
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(10, 14, 10, 0.32);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: tag-in 0.5s ease both 0.3s;
}

.stage-status .status-dot {
  width: 8px;
  height: 8px;
}

/* English / transliterated name as an italic serif overline. */
.detail-eyebrow {
  margin: 0 0 10px;
  font-family: Georgia, "Songti SC", "STSong", "Times New Roman", serif;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* Gold accent rule under the title. */
.detail-head h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ochre), var(--brick));
}

/* Staggered copy reveal beneath the stage. */
.detail-head {
  animation: copy-in 0.55s ease both 0.2s;
}

.detail-epigraph {
  animation: copy-in 0.55s ease both 0.28s;
}

.detail-foot {
  animation: copy-in 0.55s ease both 0.36s;
}

@keyframes stage-rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glyph-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
  to { opacity: 1; transform: translate(-50%, -60%) scale(1); }
}

@keyframes tag-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes model-rise {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

@keyframes copy-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-strip,
  .stage-glyph,
  .stage-status,
  .detail-model-wrap,
  .detail-head,
  .detail-epigraph,
  .detail-foot {
    animation: none;
  }
}
