.pastview-stage {
  position: relative;
  height: 620px;
  max-height: 78vh;
  min-height: 390px;
  background: #b7c4c4;
  border: 1px solid var(--cairn-edge);
  border-radius: 5px;
  overflow: hidden;
  margin: 27px 0 15px;
  isolation: isolate;
}
.pastview-stage:fullscreen {
  height: 100vh;
  max-height: none;
  border-radius: 0;
}
.pastview-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pastview-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  text-align: center;
  padding: 25px;
  background: #1a231d99;
  color: #fff;
}
.pastview-start h2 {
  font-size: 33px;
}
.pastview-start p {
  color: #f6f2e9;
  max-width: 400px;
}
.pastview-start small {
  color: #fff;
  font-size: 12px;
}
.pastview-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  z-index: 1;
  outline-offset: -4px;
}
.pastview-stage canvas:focus-visible {
  outline: 3px solid white;
}
#pv-progress {
  position: absolute;
  top: 18px;
  left: 18px;
  background: #f6f2e9ed;
  padding: 10px 15px;
  z-index: 4;
  border-radius: 4px;
  font-size: 13px;
  max-width: calc(100% - 36px);
}
.pastview-tools {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 7px;
  background: #f6f2e9ed;
  border-radius: 4px;
  z-index: 3;
}
.pastview-tools button,
.pastview-tools select {
  min-height: 42px;
  border: 1px solid #a49b89;
  background: #f6f2e9;
  color: #2b2b28;
  border-radius: 3px;
  padding: 5px 10px;
  font: 12px/1.4 sans-serif;
}
.pastview-tools button[aria-pressed="true"] {
  background: #344a3e;
  color: #fff;
}
.pastview-tools button:hover {
  filter: brightness(0.94);
}
.pv-details {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 45px;
  margin-top: 35px;
}
.pv-details h2 {
  font-size: 27px;
  margin-bottom: 18px;
}
.pv-details p {
  font-size: 14px;
  line-height: 1.8;
}
.pv-details details {
  padding: 13px 0;
  border-top: 1px solid var(--cairn-edge);
  font-size: 13px;
}
.pv-details summary {
  cursor: pointer;
  min-height: 44px;
}
.pv-details li {
  font-size: 13px;
  margin-bottom: 17px;
}
.pv-details li small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
}
.pv-details ul {
  padding-left: 18px;
}
.pv-references {
  margin: 35px 0;
}
.pv-references h2 {
  font-size: 27px;
  margin-bottom: 20px;
}
.pv-references > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.pv-story {
  margin: 35px 0;
}
.pv-geography {
  margin: 38px 0;
}
.pv-geography > h2 {
  font-size: 29px;
  margin-bottom: 15px;
}
.pv-geography > p {
  max-width: 900px;
  font-size: 14px;
  line-height: 1.8;
}
.pv-map-stage {
  height: 500px;
  background: #e9e5d9;
  border: 1px solid var(--cairn-edge);
  border-radius: 4px;
  isolation: isolate;
}
.pv-map-stage .leaflet-pane img {
  max-width: none !important;
}
.pv-map-legend,
.pv-map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin: 15px 0;
  font-size: 12px;
}
.pv-map-legend > span::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 10px;
  margin-right: 7px;
  border: 1px solid #776b60;
  background: #c3b8a8;
}
.pv-map-legend .pv-key-zone::before {
  background: #4fa66e;
  border-color: #2e724e;
}
.pv-map-legend .pv-key-wall::before {
  background: #bf6d27;
  border-color: #bf6d27;
  height: 4px;
  vertical-align: middle;
}
.pv-map-actions button {
  min-height: 44px;
  color: #263d32;
}
.pv-map-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}
.pv-map-actions a {
  color: #344a3e;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.pv-map-stage .leaflet-control {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pv-map-stage .leaflet-control-layers {
  font-size: 12px;
}
.pv-map-stage .pv-map-building-label {
  white-space: normal;
  max-width: 100px;
  text-align: center;
  font: 10px/1.2 sans-serif;
  background: #f8f4e6d9;
  border: 0;
  border-radius: 2px;
  box-shadow: none;
  padding: 2px 4px;
}
@media (max-width: 700px) {
  .pv-map-stage {
    height: 400px;
  }
}
.pv-story > h2 {
  font-size: 29px;
  margin-bottom: 15px;
}
.pv-story > p {
  max-width: 850px;
  font-size: 15px;
  line-height: 1.8;
}
.pv-story > small {
  color: var(--muted);
  font-size: 12px;
}
.pv-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.pv-story-grid article {
  padding: 23px;
  border: 1px solid var(--cairn-edge);
  border-radius: 4px;
  background: #e9e3d644;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pv-story-grid h3 {
  font-size: 21px;
  margin-bottom: 13px;
}
.pv-story-grid p {
  font-size: 13px;
  line-height: 1.8;
  flex: 1;
}
.pv-story-grid button {
  color: #263d32;
  margin-top: 12px;
  min-height: 44px;
}
.pv-story-grid button:disabled {
  opacity: 0.55;
  cursor: default;
}
.pv-story-grid button:focus-visible {
  outline: 3px solid #344a3e;
  outline-offset: 3px;
}
.pv-references figure {
  margin: 0;
}
.pv-references img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #e8e1d2;
  border: 1px solid var(--cairn-edge);
}
.pv-references figcaption {
  font-size: 12px;
  margin-top: 10px;
}
.pv-references figcaption strong {
  font-weight: 500;
}
.pv-references small {
  font-size: 10px;
  display: block;
  margin-top: 5px;
}
@media (max-width: 700px) {
  .pv-story-grid {
    grid-template-columns: 1fr;
  }
  .pv-references > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pv-references img {
    height: 180px;
  }
}
@media (max-width: 700px) {
  .pastview-stage {
    height: 510px;
    min-height: 400px;
    max-height: 75vh;
  }
  .pastview-tools {
    left: 8px;
    right: 8px;
    bottom: 8px;
    gap: 4px;
  }
  .pastview-tools button,
  .pastview-tools select {
    padding: 5px 8px;
    font-size: 11px;
  }
  .pv-details {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .pastview-start h2 {
    font-size: 28px;
  }
}

.pv-map-legend .pv-key-lake::before { background: #487b85; border-color: #487b85; }
.pv-demo-flag { font-size: 22px; line-height: 22px; color: #b3261e; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
