/* === EAST CONFUSION SHARED STYLES === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #14110e;
  color: #2b2118;
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* Scene Container keeps image & hotspots locked in sync at any screen size */
.scene-wrapper {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.85);
}

.scene-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* === INTERACTIVE HOTSPOTS === */
.hotspot {
  position: absolute;
  display: block;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  transition: box-shadow 0.35s ease, background-color 0.35s ease, border-color 0.35s ease;
  text-decoration: none;
  z-index: 10;
}

/* Soft, understated warm lantern glow on hover or when "Show Pins" is active */
.hotspot:hover,
.hotspot:focus-visible,
.show-pins .hotspot {
  background-color: rgba(255, 226, 150, 0.12);
  border-color: rgba(255, 223, 140, 0.45);
  box-shadow: 0 0 18px rgba(255, 210, 115, 0.38), inset 0 0 12px rgba(255, 220, 140, 0.2);
  outline: none;
}

/* Floating Vintage Sign Tooltip */
.hotspot-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #231911;
  color: #f6ebd4;
  border: 1px solid #b58d4c;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

/* Keep top-edge tooltips inside viewport */
.hotspot.label-bottom .hotspot-label {
  bottom: auto;
  top: calc(100% + 8px);
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label,
.show-pins .hotspot .hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === MATCHED VINTAGE EXIT SIGN === */
.vintage-exit-sign {
  position: absolute;
  top: 3.5%;
  left: 2.5%;
  z-index: 15;
  background: linear-gradient(180deg, #f3e5c8 0%, #dfc99f 100%);
  color: #1f1710;
  border: 3px solid #2b2016;
  outline: 2px solid #c8a464;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: clamp(0.8rem, 1.3vw, 1.05rem);
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vintage-exit-sign:hover {
  transform: scale(1.04);
  box-shadow: 0 0 20px rgba(255, 215, 130, 0.55);
}

/* === FLOATING HELPER BAR (For iPad/Mobile Touch Users) === */
.town-controls {
  position: fixed;
  bottom: 14px;
  right: 14px;
  z-index: 50;
  display: flex;
  gap: 8px;
}

.town-btn {
  background: rgba(31, 23, 16, 0.9);
  color: #f4e6c8;
  border: 1px solid #b58d4c;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: Georgia, serif;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: background 0.2s ease;
}

.town-btn:hover {
  background: #3a2b1d;
}

/* === PARCHMENT / NEWSPAPER POPUP MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 9, 6, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop.active {
  display: flex;
}

.parchment-modal {
  background: #f5ebd6;
  background-image: radial-gradient(circle at top left, #fbf4e4, #ebd9b7);
  color: #261c14;
  border: 3px solid #4a3520;
  outline: 1px solid #b58d4c;
  outline-offset: -8px;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px 28px 26px;
  border-radius: 6px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

.modal-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7a5228;
  margin-bottom: 6px;
  font-weight: bold;
}

.modal-title {
  font-size: 1.65rem;
  line-height: 1.2;
  border-bottom: 2px solid #4a3520;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.modal-body {
  font-size: 1.02rem;
  line-height: 1.6;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #2b2016;
  color: #f5ebd6;
  border: 1px solid #b58d4c;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  background: #5c3d22;
}

/* === CLARION ARCHIVE DRAWER & NEWSPAPER VIEWER === */
.archive-year-group {
  margin-bottom: 18px;
}

.archive-year-heading {
  font-size: 1.15rem;
  color: #5c3d22;
  border-bottom: 1px solid #b58d4c;
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.archive-item {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255, 250, 240, 0.75);
  border: 1px solid #c8a464;
  border-radius: 5px;
  padding: 10px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  font-family: Georgia, serif;
  transition: background 0.2s ease, transform 0.15s ease;
}

.archive-item:hover {
  background: #fffdf7;
  transform: translateX(3px);
}

.archive-item-date {
  display: block;
  font-size: 0.78rem;
  color: #7a5228;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.archive-item-title {
  display: block;
  font-size: 1.05rem;
  font-weight: bold;
  color: #261c14;
  margin-top: 2px;
}

.archive-back-btn {
  display: inline-block;
  background: #2b2016;
  color: #f5ebd6;
  border: 1px solid #b58d4c;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: Georgia, serif;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 14px;
}

.archive-back-btn:hover {
  background: #4a3520;
}

.newspaper-scan {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #4a3520;
  border-radius: 4px;
  margin: 12px 0;
  cursor: zoom-in;
}

.newspaper-scan.zoomed {
  cursor: zoom-out;
  transform: scale(1.45);
  transform-origin: top center;
  position: relative;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
  .hotspot-label {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
}
