/* The tour has one index, adjacent to the photograph rather than below the details. */
.explore-page #stage:not(.map-view) {
  grid-template-columns: minmax(0, 28fr) minmax(0, 72fr);
  gap: 28px;
  align-items: start;
}
.explore-page #stage:not(.map-view) > .photo-column { grid-column: 2; grid-row: 1; }
.explore-page #stage:not(.map-view) > .room-panel { grid-column: 2; grid-row: 2; border-left: 0; border-top: 1px solid var(--v5-gold); padding: 28px; }
.explore-page #stage > .route-section {
  min-width: 0;
  margin: 0;
  padding: 20px 16px 16px;
  background: #30251C;
  color: #F3E8D4;
  border: 1px solid #B99B63;
}
.explore-page #stage:not(.map-view) > .route-section { grid-column: 1; grid-row: 1; position: sticky; top: 24px; }
.explore-page .route-heading .eyebrow { color: #D2BA8E; font-size: 10px; margin-bottom: 6px; }
.explore-page .route-heading h2 { color: #F3E8D4; font-size: 25px; margin-bottom: 16px; line-height: 1.5; }
.explore-page #route-toggle { display: none; cursor: pointer; }
.explore-page #route-list {
  grid-template-columns: minmax(0, 1fr);
  max-height: max(200px, calc(100svh - 240px));
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  border: 0;
  scroll-margin-top: 24px;
}
.explore-page #route-list li { border: 0; border-top: 1px solid #B99B6366; }
.explore-page #route-list button {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 1px 10px;
  min-height: 58px;
  padding: 10px 9px;
  border: 0;
  background: transparent;
  color: #F3E8D4;
  line-height: 1.5;
}
.explore-page #route-list .route-room { font-size: 15px; overflow-wrap: anywhere; }
.explore-page #route-list .route-number { color: #D2BA8E; }
.explore-page #route-list .route-state { font-size: 10px; opacity: 1; color: #D8CBB5; }
.explore-page #route-list button:hover { background: #604737; }
.explore-page #route-list button[aria-current="location"] { background: #813B2C; border-left: 3px solid #D2BA8E; padding-left: 6px; }
.explore-page #route-list button[aria-current="location"] span { color: #FFF5E3; }
.explore-page #route-list button:focus-visible { outline: 2px solid #F3E8D4; outline-offset: -3px; }
.explore-page .route-hint { color: #D8CBB5; font-size: 11px; line-height: 1.7; margin: 15px 0 0; }
.explore-page #stage:not(.map-view) .photo-frame { height: clamp(260px, calc(100svh - 280px), 590px); }
.explore-page #stage:not(.map-view) #main-photo { max-height: 100%; }
.explore-page #photo-frame { scroll-margin-top: 24px; }
.explore-page #stage.map-view > .photo-column { grid-column: 1; grid-row: 1; }
.explore-page #stage.map-view > .room-panel { grid-column: 2; grid-row: 1; }
.explore-page #stage.map-view > .route-section { grid-column: 1 / -1; grid-row: 2; }
.explore-page #stage.map-view #route-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 260px; }
@media (max-width: 800px) {
  .explore-page #stage:not(.map-view) { display: flex; gap: 16px; }
  .explore-page #stage:not(.map-view) > .photo-column { order: 1; width: 100%; }
  .explore-page #stage:not(.map-view) > .route-section { order: 2; position: static; width: 100%; }
  .explore-page #stage:not(.map-view) > .room-panel { order: 3; padding: 20px 0 0; }
  .explore-page #stage > .route-section { padding: 0; }
  .explore-page .route-heading, .explore-page .route-hint { display: none; }
  .explore-page #route-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 12px 16px;
    min-height: 64px;
    list-style: none;
    border-bottom: 1px solid #B99B6366;
    line-height: 1.6;
  }
  .explore-page #route-toggle::-webkit-details-marker { display: none; }
  .explore-page #route-toggle > span { grid-column: 1; font-size: 12px; color: #D2BA8E; }
  .explore-page #route-current { grid-column: 1; font-family: var(--serif); font-size: 16px; font-weight: 400; overflow-wrap: anywhere; }
  .explore-page #route-toggle::after { content: '+'; grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 24px; }
  .explore-page #route-index[open] > #route-toggle::after { content: '−'; }
  .explore-page #route-list, .explore-page #stage.map-view #route-list { grid-template-columns: minmax(0, 1fr); max-height: min(340px, 55svh); }
  .explore-page #route-list button { padding-inline: 16px; }
  .explore-page #route-list button[aria-current="location"] { padding-left: 13px; }
  .explore-page #stage:not(.map-view) .photo-frame { height: clamp(220px, 42svh, 420px); }
  .explore-page #stage.map-view > .room-panel { order: 1; }
  .explore-page #stage.map-view > .photo-column { order: 2; }
  .explore-page #stage.map-view > .route-section { order: 3; width: 100%; }
}

/* v4: the compact index opens a photo modal on tap instead of leaving the image below the fold. */
.room-dialog img { width: 100%; max-height: 62svh; object-fit: contain; background: #ddd8cb; }
.room-dialog #room-dialog-caption { color: var(--muted); font-size: 11px; margin: 14px 0 0; }
.room-dialog { border-radius: 6px; box-shadow: 0 18px 50px #00000026; }
.room-dialog[open] { animation: room-dialog-in .22s ease both; }
@keyframes room-dialog-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.explore-page #route-list button { transition: background-color .15s ease; }
.explore-page #route-list button:active { background: #4a3a2c; }
