/* =========================================================
   COMMON SHARED READER PRESENTATION
   =========================================================

   Six Wigwams interior reader
   Structure:
   - .stage shows the selected wigwam background.
   - .hotspot opens the tablet reader.
   - .reader displays tablets assigned in js/data.js.
*/
:root {
  --bg: #050403;
  --panel: #090604;
  --text: #ead7a4;
  --border: rgba(234, 215, 164, .45);
  --soft-border: rgba(234, 215, 164, .12);
  --shadow: rgba(0, 0, 0, .65);
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--panel);
  color: var(--text);
  font-family: pompiere, indieflower, arial, sans-serif;
}
body.interior { overflow: hidden; background: var(--bg); }
a { color: inherit; }

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: #080604;
}
.backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  filter: saturate(.94) contrast(1.02) brightness(.88);
  transform: scale(1.012);
}
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 54%, rgba(0,0,0,0) 0%, rgba(0,0,0,.08) 40%, rgba(0,0,0,.58) 100%);
}

.topbar {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  text-shadow: 0 2px 12px #000;
}
.home {
  text-align: right;
  font-size: 22px;
  letter-spacing: 2px;
  text-decoration: none;
  opacity: .78;
}
.home:hover { opacity: 1; }
.title { text-align: left; }
.title h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
}
.title p {
  margin: 4px 0 0;
  max-width: 560px;
  font-size: 20px;
  letter-spacing: 2px;
  opacity: .75;
}
.title p:empty { display: none; }

.hotspot {
  position: absolute;
  left: 34%;
  right: 34%;
  top: 54%;
  bottom: 13%;
  z-index: 2;
  display: block;
  border-radius: 42%;
  text-decoration: none;
  cursor: pointer;
  outline: none;
}
.hotspot:focus-visible { box-shadow: 0 0 0 2px rgba(234,215,164,.65); }
.hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  pointer-events: none;
  font-size: 18px;
  letter-spacing: 3px;
  opacity: 0;
  text-shadow: 0 2px 10px #000;
  transition: opacity .25s ease;
}
.stage:hover .hint { opacity: .58; }

.reader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  padding: 28px;
  background: radial-gradient(circle at 50% 40%, #1b130d 0%, var(--panel) 70%);
}
.reader.is-open {
  display: flex;
  flex-direction: column;
}
.reader-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}
.reader-title {
  font-size: 26px;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.reader-count {
  font-size: 20px;
  opacity: .72;
}
.close,
.nav button {
  border: 1px solid var(--border);
  padding: 8px 16px;
  background: rgba(0,0,0,.28);
  color: var(--text);
  font: inherit;
  letter-spacing: 2px;
  cursor: pointer;
}
.close:hover,
.nav button:hover { background: rgba(234,215,164,.12); }
.close:disabled,
.nav button:disabled {
  opacity: .3;
  cursor: default;
}
.book {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--soft-border);
  background: linear-gradient(90deg, rgba(255,241,198,.08), rgba(0,0,0,.06) 49.7%, rgba(255,241,198,.1) 50.3%, rgba(0,0,0,.05));
  box-shadow: inset 0 0 80px rgba(0,0,0,.45);
}
.page {
  display: block;
  max-width: min(86vw, 980px);
  max-height: calc(100vh - 190px);
  object-fit: contain;
  filter: drop-shadow(0 14px 28px var(--shadow));
}
.current-title {
  min-height: 24px;
  margin-top: 10px;
  text-align: center;
  font-size: 20px;
  letter-spacing: 2px;
  opacity: .82;
}
.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-top: 12px;
}
.progress {
  min-width: 120px;
  text-align: center;
  font-size: 20px;
  letter-spacing: 2px;
  opacity: .8;
}

@media (max-width: 800px) {
  .title h1 { font-size: 28px; }
  .title p { font-size: 16px; }
  .hotspot { left: 24%; right: 24%; top: 50%; bottom: 12%; }
  .reader { padding: 14px; }
  .page { max-width: 96vw; max-height: calc(100vh - 164px); }
}
