/* Reset + app shell layout + intro + mobile view switching.
   Structural only — component looks live in sidebar/player/map css. */
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sans); background: var(--paper); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

/* ── INTRO ──────────────────────────────────────────────────────────────── */
#intro {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 24px; padding-top: calc(40px + var(--banner-h)); background: var(--paper);
}
#intro .eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 3px;
  color: var(--amber); margin-bottom: 4px;
}
#intro h1 {
  font-family: var(--belle); font-size: 38px; font-weight: 500;
  color: var(--ink); margin: 0 0 2rem;
}
#intro .narrative {
  font-family: var(--serif); font-size: 15px; line-height: 1.7;
  color: var(--muted); max-width: 520px; text-align: left; margin-bottom: 2rem;
}
#intro .enter-btn {
  font-family: var(--belle); font-style: italic; font-size: 17px; color: var(--ink);
  background: none; border: none; cursor: pointer; transition: opacity 0.15s;
}
#intro .enter-btn:hover { opacity: 0.7; }
#intro .enter-btn .chevron { font-size: 13px; opacity: 0.2; }
.intro-footer {
  margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 16px; font-size: 11px; opacity: 0.4; color: var(--muted);
}
.intro-footer a { color: var(--muted); text-decoration: none; }
.intro-footer a:hover { color: var(--ink); }
.intro-footer p { width: 100%; text-align: center; margin: 0; }

/* ── APP SPLIT LAYOUT ───────────────────────────────────────────────────── */
#app {
  display: flex; height: calc(100vh - var(--banner-h)); width: 100vw;
  visibility: hidden; position: absolute; top: var(--banner-h); left: 0;
}
#app.active { visibility: visible; position: fixed; }

#sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  height: calc(100vh - var(--banner-h)); overflow-y: auto;
  border-right: 1px solid var(--faint);
  padding: var(--s6) var(--sidebar-pad);
  background: var(--paper);
}
#sidebar .eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 3px; color: var(--muted);
  text-decoration: none; display: block;
}
#sidebar .eyebrow:hover { opacity: 0.7; }
#sidebar h2 {
  font-family: var(--belle); font-size: 24px; font-weight: 500; margin: 2px 0 var(--s4);
}

#map-wrap { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

.sidebar-footer {
  margin-top: var(--s8); padding: var(--s5) 0; text-align: center;
  font-size: 11px; opacity: 0.4; color: var(--muted);
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s4);
}
.sidebar-footer a { color: var(--muted); text-decoration: none; }
.sidebar-footer a:hover { color: var(--ink); }
.sidebar-footer p { width: 100%; text-align: center; margin: 0; }

/* drill-in list hidden until a list is open; home hidden while a list is open */
#pl-view { display: none; }
#app.list-open #home-view { display: none; }
#app.list-open #pl-view { display: block; }

/* ── MOBILE BOTTOM TOOLBAR (Now Playing · Chapters|Map) ───────────────────── */
/* one compact glass dock floating above the bottom edge. Left: now-playing, takes
   the slack. Right: the Chapters|Map toggle, segmented within the bar. Dark glass
   over the map, light over the list. Settings is a separate floating FAB over the
   map (.map-settings-float in map.css), not part of this bar. */
.bottom-bar {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 25; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 16px;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
#app.mobile-list .bottom-bar {
  background: rgba(250, 248, 245, 0.82); border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

/* now playing — takes the slack, truncates */
.bb-now { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.bb-now:not(.active) { visibility: hidden; }
.bb-play { background: none; border: none; padding: 2px 4px; cursor: pointer; color: var(--bright); display: flex; align-items: center; flex-shrink: 0; }
.bb-play.is-play svg { margin-left: 2px; }
.bb-title { min-width: 0; cursor: pointer; font-family: var(--serif); font-size: 12px; font-weight: 600; color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
#app.mobile-list .bb-play, #app.mobile-list .bb-title { color: var(--ink); text-shadow: none; }

/* right: chapters/map — segmented within the bar (no separate pill) */
.view-toggle { flex-shrink: 0; display: inline-flex; gap: 2px; }
.view-toggle button {
  padding: 8px 13px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.55); background: none; border: none; cursor: pointer;
  transition: color 0.15s, background 0.15s; text-shadow: var(--glass-text-shadow);
}
.view-toggle button.active { color: var(--bright); background: rgba(255, 255, 255, 0.16); }
#app.mobile-list .view-toggle button { color: var(--muted); text-shadow: none; }
#app.mobile-list .view-toggle button.active { color: var(--ink); background: rgba(0, 0, 0, 0.07); }

@media (max-width: 768px) {
  #app.active { flex-direction: column; position: relative; }
  #sidebar {
    width: 100%; min-width: unset; height: 100dvh; border-right: none;
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
    position: absolute; inset: 0; z-index: 5; -webkit-overflow-scrolling: touch;
  }
  #map-wrap { width: 100%; height: 100dvh; position: absolute; inset: 0; z-index: 1; }
  #app.mobile-map #sidebar { display: none; }
  #app.mobile-list #map-wrap { display: none; }
  .bottom-bar { display: flex; }                          /* the single bottom toolbar (both views) */
  .desktop-only { display: none !important; }
  #player-bar { display: none !important; }
  #sidebar h2 { margin-bottom: 12px; }
}

@keyframes blink { from { opacity: 0.2; } to { opacity: 0.8; } }


/* ── the voices (cast filmstrip) ─────────────────────────────────────────── */
#voices-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin: -6px 0 var(--s4); padding: 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); transition: color 0.2s;
}
#voices-btn:hover { color: var(--amber); }

#voices-strip {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  transform: translateY(105%); transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: rgba(10, 12, 17, 0.92); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(244, 234, 216, 0.14);
  padding: 18px 18px 16px;
}
#voices-strip.open { transform: translateY(0); }
#voices-strip .vs-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; color: rgba(244, 234, 216, 0.5);
  font-size: 22px; cursor: pointer; line-height: 1;
}
#voices-strip .vs-close:hover { color: #f4ead8; }
#voices-strip .vs-cards {
  display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 8px;
}
#voices-strip .vs-cards::-webkit-scrollbar { display: none; }
.vs-card { flex: 0 0 128px; text-align: center; }
.vs-card img {
  width: 128px; height: 160px; object-fit: cover; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(232, 168, 62, 0.16), 0 2px 10px rgba(0, 0, 0, 0.5);
}
.vs-card .vs-name {
  margin-top: 8px; font-family: var(--serif); font-size: 15px; font-weight: 500;
  color: #f4ead8;
}
.vs-card .vs-int {
  margin-top: 2px; font-family: var(--serif); font-style: italic;
  font-size: 10.5px; color: rgba(244, 234, 216, 0.6); line-height: 1.35;
}
.vs-card .vs-also {
  margin-top: 5px; font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(244, 234, 216, 0.38); line-height: 1.5;
}

.vs-card .vs-cameo {
  width: 128px; height: 160px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-size: 44px;
  color: rgba(244, 234, 216, 0.3);
  background: radial-gradient(ellipse at 50% 38%, #5c4731 0%, #241b11 70%, #150f08 100%);
  box-shadow: 0 0 0 1px rgba(232, 168, 62, 0.16), 0 2px 10px rgba(0, 0, 0, 0.5);
}

.vs-card.vs-go { cursor: pointer; }
.vs-card.vs-go:hover img, .vs-card.vs-go:hover .vs-cameo { box-shadow: 0 0 0 1px rgba(232, 168, 62, 0.5), 0 2px 12px rgba(0, 0, 0, 0.55); }
.vs-card .vs-count {
  margin-top: 5px; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--amber);
}

/* ── narrator mini-headshots ─────────────────────────────────────────────── */
.voice-mini {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  overflow: hidden; position: relative;
  vertical-align: -4px; margin-left: 8px; cursor: pointer;
  box-shadow: 0 0 0 1px var(--faint);
  transition: box-shadow 0.2s, transform 0.2s;
}
.voice-mini img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.voice-mini:hover { box-shadow: 0 0 0 1.5px var(--amber); transform: scale(1.15); }
.row.active .voice-mini { box-shadow: 0 0 0 1px rgba(244, 234, 216, 0.3); }
.popup-voice {
  position: absolute; top: 10px; right: 10px;
  width: 22px; height: 22px; margin-left: 0;
}

#voice-lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 8, 12, 0.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
#voice-lightbox .vl-card {
  background: rgba(14, 16, 22, 0.97); border: 1px solid rgba(244, 234, 216, 0.16);
  border-radius: 8px; padding: 18px 18px 16px; text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6); max-width: 300px;
}
#voice-lightbox img {
  width: 256px; height: 320px; object-fit: cover; border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(232, 168, 62, 0.2);
}
#voice-lightbox .vl-name { margin-top: 12px; font-family: var(--serif); font-size: 20px; font-weight: 500; color: #f4ead8; }
#voice-lightbox .vl-int { margin-top: 3px; font-family: var(--serif); font-style: italic; font-size: 12px; color: rgba(244, 234, 216, 0.6); }
#voice-lightbox .vl-go {
  margin-top: 12px; font-family: var(--sans); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--amber); background: none;
  border: 1px solid rgba(232, 168, 62, 0.4); border-radius: 100px;
  padding: 8px 18px; cursor: pointer;
}
#voice-lightbox .vl-go:hover { border-color: var(--amber); color: #ffd98a; }
