/* ── Persistent site label ─────────────────────────────────── */

#site-label {
  width: var(--col-width);
  height: 100vh;
  border-right: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

#site-label:hover .site-label-text {
  color: var(--text);
}

.site-label-text,
.column-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  max-height: 260px;
  text-overflow: ellipsis;
}

.site-label-text {
  color: var(--text-muted);
  user-select: none;
}

.column-label {
  color: var(--text);
}

/* ── Column strip ──────────────────────────────────────────── */

#columns {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  height: 100vh;
}

.column {
  width: var(--col-width);
  height: 100%;
  border-right: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s;
}

.column-new {
  animation: col-appear 0.18s ease;
}

@keyframes col-appear {
  from { width: 0; opacity: 0; }
  to   { width: var(--col-width); opacity: 1; }
}

.column:hover {
  background: rgba(0, 0, 0, 0.06);
}

.column.active {
  background: rgba(0, 0, 0, 0.04);
}

/* ── Content window ────────────────────────────────────────── */

#content-window {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  position: relative;
}

#content-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 40px 80px;
}

/* ── Content: non-leaf (intro + child list) ────────────────── */

.intro-text {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 36px;
}

.child-links {
  list-style: none;
  margin-top: 8px;
}

.child-links li {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
  padding: 3px 8px;
  margin: 0 -8px;
  cursor: pointer;
}

.child-links li:hover {
  color: var(--text-muted);
  font-style: italic;
}

.child-links li.highlighted {
  background: var(--text);
  color: var(--bg);
  font-style: italic;
}

/* ── Content: leaf (title + paragraphs) ────────────────────── */

.content-title {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 14px;
}

.para {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 22px;
}

.para strong, .intro-text strong { font-weight: 600; }
.para em, .intro-text em { font-style: italic; }

/* ── List items ────────────────────────────────────────────── */

.list-group {
  margin-bottom: 22px;
}

.list-item {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 4px;
  padding-left: 1.4em;
  text-indent: -1.4em;
}

.list-item strong { font-weight: 600; }
.list-item em { font-style: italic; }
.list-item u { text-decoration: underline; }

.para u, .intro-text u { text-decoration: underline; }

/* ── Flat section H3 subheading ────────────────────────────── */

.flat-section-h3 {
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--divider);
}

/* ── Rooms accordion H4 title ──────────────────────────────── */

.rooms-h4-title {
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 18px;
  margin-bottom: 8px;
}

/* ── Room hero image (H2 Room by Room Breakdown) ───────────── */

.room-hero-img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
}

/* ── Location caption (venue name + address below hero) ─────── */

.location-caption {
  margin-bottom: 28px;
}

.location-caption-line {
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 1px;
}

.location-caption-line strong { font-weight: 600; }

/* ── Tables in content area ─────────────────────────────────── */

#content-inner table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 24px;
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  line-height: 1.45;
}

#content-inner th,
#content-inner td {
  padding: 8px 14px;
  border: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

#content-inner th {
  font-weight: 600;
  background: rgba(0, 0, 0, 0.04);
}

#content-inner tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

.scenario-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  line-height: 1.45;
}

.scenario-content th,
.scenario-content td {
  padding: 8px 14px;
  border: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.scenario-content th {
  font-weight: 600;
  background: rgba(0, 0, 0, 0.04);
}

.scenario-content tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

/* ── Image stack (H4 sequential) ──────────────────────────── */

.image-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.stack-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--divider);
  cursor: pointer;
}

/* ── Image grid ────────────────────────────────────────────── */

.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 32px;
}

.thumbnail {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--divider);
  cursor: pointer;
  background: #B8B5A0;
}

/* ── References thumbnail grid ─────────────────────────────── */

.ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.ref-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #B8B5A0;
  border: 1px solid var(--divider);
}

.ref-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ref-thumb-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-align: center;
  line-height: 1.35;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.6);
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.15s;
}

.ref-thumb:hover .ref-thumb-label {
  background: rgba(0, 0, 0, 0.35);
}

/* ── Image overlay ─────────────────────────────────────────── */

#image-overlay {
  display: none;
  position: fixed;
  top: 32px;
  left: 32px;
  right: 32px;
  bottom: 32px;
  background: var(--overlay-bg);
  border: 1px solid var(--divider);
  z-index: 100;
  flex-direction: column;
}

#image-overlay.visible {
  display: flex;
}

#overlay-close {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  cursor: pointer;
  color: var(--text);
  align-self: flex-start;
  line-height: 1;
}

#overlay-image-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

#overlay-img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  padding: 0 24px 24px;
  display: block;
  background: var(--overlay-bg);
}

.overlay-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  background: transparent;
  border: none;
  font-size: 42px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 16px;
  opacity: 0.35;
  line-height: 1;
  z-index: 1;
}

.overlay-nav:hover {
  opacity: 0.9;
}

.overlay-nav.hidden {
  visibility: hidden;
  pointer-events: none;
}

#overlay-prev { left: 0; }
#overlay-next { right: 0; }

/* ── Overlay caption ───────────────────────────────────────── */

#overlay-caption {
  text-align: center;
  padding: 6px 24px 14px;
  flex-shrink: 0;
}

.overlay-caption-link {
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}

.overlay-caption-link:hover {
  color: var(--text);
}

/* ── Nav hint ──────────────────────────────────────────────── */

.nav-hint {
  position: fixed;
  bottom: 22px;
  right: 28px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 20;
}

.nav-hint .key {
  text-align: right;
  opacity: 0.75;
}

/* ── Image overlay backdrop dim ────────────────────────────── */

#content-window.overlay-active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 9;
  pointer-events: none;
}

/* ── Table of Contents tree ────────────────────────────────── */

.toc {
  padding-top: 24px;
}

.toc-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
}

.toc-row:hover .toc-label {
  color: var(--text-muted);
}

.toc-toggle {
  width: 14px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  text-align: center;
  line-height: 1.8;
}

.toc-row-parent {
  cursor: pointer;
}

.toc-row.highlighted {
  background: var(--text);
}

.toc-row.highlighted .toc-label,
.toc-row.highlighted .toc-toggle {
  color: var(--bg);
  font-style: italic;
}

.toc-label {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
}

.toc-inline-text {
  padding-top: 6px;
  padding-bottom: 10px;
}

/* ── Scenario accordion ────────────────────────────────────── */

.scenario-accordion {
  padding-top: 8px;
}

.scenario-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  cursor: pointer;
}

.scenario-row:hover .scenario-label {
  color: var(--text-muted);
  font-style: italic;
}

.scenario-toggle {
  width: 14px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
  text-align: center;
  line-height: 1.8;
}

.scenario-label {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text);
}

.scenario-row.highlighted {
  background: var(--text);
}

.scenario-row.highlighted .scenario-label,
.scenario-row.highlighted .scenario-toggle {
  color: var(--bg);
  font-style: italic;
}

.scenario-content {
  padding-left: 20px;
  padding-top: 4px;
  padding-bottom: 12px;
}

/* ── Gallery mode ──────────────────────────────────────────── */

#content-inner.gallery-mode {
  max-width: none;
  padding: 32px 48px 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.gallery-img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 20px 0 28px;
  flex-shrink: 0;
}

.gallery-btn {
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--text);
  cursor: pointer;
  opacity: 0.35;
  padding: 4px 10px;
  line-height: 1;
}

.gallery-btn:hover {
  opacity: 0.9;
}

.gallery-btn.hidden {
  visibility: hidden;
  pointer-events: none;
}

.gallery-counter {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  min-width: 48px;
  text-align: center;
}

/* ── Embed (iframe) mode ───────────────────────────────────── */

#content-inner.iframe-mode {
  max-width: none;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.embed-frame {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
}

/* ── Random image thumbnails ───────────────────────────────── */

#random-thumbs {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 150px;
  pointer-events: none;
  z-index: 15;
}

.random-thumb {
  position: absolute;
  right: 10px;
  height: auto;
  display: block;
  border: 1px solid var(--divider);
  pointer-events: auto;
  cursor: pointer;
}

/* ── Text box (H6 sections) ─────────────────────────────────── */

.text-box {
  border: 1px solid var(--divider);
  padding: 14px 18px;
  margin-bottom: 22px;
}

.text-box-title {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 6px;
}

.text-box-para {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 10px;
}

.text-box-para:last-child {
  margin-bottom: 0;
}

.text-box-para strong { font-weight: 600; }
.text-box-para em { font-style: italic; }

.text-box .list-group {
  margin-bottom: 6px;
}

.text-box .list-item {
  line-height: 1.45;
  margin-bottom: 6px;
}

/* ── Iframe embedded in accordion section ──────────────────── */

.accordion-iframe {
  margin-bottom: 24px;
}

.accordion-iframe iframe {
  width: 100%;
  border: none;
  display: block;
}

/* ── Player bio cards ──────────────────────────────────────── */

.bio-section-content {
  padding-top: 12px;
  padding-bottom: 8px;
}

.bio-card {
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.bio-headshot {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  background: #B8B5A0;
  border: 1px solid var(--divider);
  overflow: hidden;
}

.bio-headshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.bio-text {
  flex: 1;
  min-width: 0;
}

.bio-header {
  font-family: 'EB Garamond', serif;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 6px;
}

.bio-header strong { font-weight: 600; }
.bio-header em { font-style: italic; }

.bio-body {
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}

/* ── Empty state ───────────────────────────────────────────── */

.root-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 10px;
}

.root-subtitle {
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 40px;
}

.root-list {
  list-style: none;
  padding-top: 36px;
}

.root-list li {
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  line-height: 1.6;
  color: var(--text);
  padding: 4px 0;
  cursor: pointer;
}

.root-list li:hover {
  color: var(--text-muted);
}
