/* =========================================================
   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: 48px;
  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: 48px;
  z-index: 3;
  transform: translateX(-50%);
  pointer-events: none;
  font-size: 48px;
  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: 30px 36px 26px;
  background-color: #efe3b5;
  background-image: url('../img/poemwall.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.reader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0,0,0,.14);
}
.reader.is-open {
  display: flex;
  flex-direction: column;
}
.reader-head,
.book,
.current-title,
.nav {
  position: relative;
  z-index: 2;
}
.reader-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}
.reader-title {
  font-size: 34px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(255,255,255,.35);
  color: #2f2418;
}
.reader-count {
  font-size: 26px;
  letter-spacing: 2px;
  opacity: .9;
  color: #2f2418;
}
.close,
.nav button {
  border: 1px solid rgba(118, 83, 26, .42);
  padding: 10px 22px;
  background: rgba(255, 248, 217, .32);
  color: #2f2418;
  font: inherit;
  font-size: 30px;
  letter-spacing: 4px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  transition: opacity .25s ease, transform .25s ease, background .25s ease;
}
.close:hover,
.nav button:hover {
  background: rgba(255, 248, 217, .55);
  transform: scale(1.035);
}
.close:disabled,
.nav button:disabled {
  opacity: .3;
  cursor: default;
  transform: none;
}
.book {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
}
.page {
  display: block;
  max-width: min(86vw, 980px);
  max-height: calc(100vh - 214px);
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,.52));
}
.current-title {
  min-height: 28px;
  margin-top: 8px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 3px;
  opacity: .9;
  color: #3d2d18;
}
.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: 12px;
}
.progress {
  min-width: 150px;
  text-align: center;
  font-size: 30px;
  letter-spacing: 3px;
  opacity: .94;
  color: #3d2d18;
}

@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; }
  .reader-title { font-size: 24px; }
  .reader-count { font-size: 20px; }
  .close,
  .nav button { font-size: 22px; padding: 8px 14px; }
  .page { max-width: 96vw; max-height: calc(100vh - 174px); }
  .current-title { font-size: 20px; }
  .progress { font-size: 22px; min-width: 110px; }
  .nav { gap: 14px; }
}
