@import url("cult.css");

body.rite {
  background: #050000;
  padding-bottom: 56px;
}

.rite-stage {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  position: relative;
  z-index: 2;
}

.rite-stage h1 {
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: 0.4em;
  color: var(--blood-hot);
  text-shadow: var(--glow);
}

.rite-stage .lead {
  margin: 16px 0 36px;
  color: #9a7068;
  letter-spacing: 0.18em;
  line-height: 1.8;
}

.grid2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.photo {
  width: 100%;
  display: block;
  filter: contrast(1.2) saturate(0.8);
  box-shadow: 0 0 40px rgba(80, 0, 0, 0.5);
}

.panel {
  border: 1px solid #4a1010;
  padding: 18px 16px;
  background: rgba(20, 0, 0, 0.5);
}

.panel h2 {
  font-size: 14px;
  letter-spacing: 0.35em;
  color: var(--blood-hot);
  margin-bottom: 10px;
}

.panel p, .panel li {
  font-size: 13px;
  line-height: 1.85;
  color: #b89890;
  letter-spacing: 0.08em;
}

.panel ol { padding-left: 1.2em; margin: 8px 0 14px; }

.audio-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.audio-controls button, .choice {
  border: 1px solid #5a1010;
  background: #1a0404;
  color: var(--paper);
  padding: 8px 12px;
  font: inherit;
  letter-spacing: 0.16em;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.audio-controls button:hover, .choice:hover {
  background: #3a0808;
}

.wave {
  width: 100%;
  height: 8px;
  background: #2a0808;
  margin-top: 8px;
  overflow: hidden;
}

.wave span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blood-hot);
  animation: load 8s linear infinite;
}

@keyframes load {
  0% { width: 0; }
  100% { width: 100%; }
}

.coords {
  font-family: ui-monospace, monospace;
  color: var(--cyan);
  letter-spacing: 0.12em;
  margin-top: 10px;
}

.choices {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.choice.good { border-color: #2a5050; color: #c8e8e8; }
.choice.bad { border-color: #7a1010; }

.stereo-box {
  margin-top: 28px;
}

.stereo-box img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border: 1px solid #2a0a0a;
}

.note {
  margin-top: 8px;
  font-size: 11px;
  color: #5a3030;
  letter-spacing: 0.2em;
}

.branches {
  margin-top: 48px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.32em;
}

.branches a {
  color: #6a3030;
  text-decoration: none;
}

.branches a:hover { color: #d8b0a8; }

.theme-calamity { background: #070a07; }
.theme-calamity .rite-stage h1 {
  color: #a7b56a;
  text-shadow: 0 0 18px rgba(90, 110, 30, 0.45);
}
.theme-calamity .panel { border-color: #3a4a20; background: rgba(8, 12, 4, 0.55); }
.theme-calamity .panel h2 { color: #c8d080; }
.theme-calamity .choice.bad { border-color: #5a6020; }
.theme-calamity .coords { color: #c8d080; }

.theme-curse { background: #07040c; }
.theme-curse .rite-stage h1 {
  color: #c070e0;
  text-shadow: 0 0 18px rgba(120, 40, 160, 0.5);
}
.theme-curse .panel { border-color: #4a2060; background: rgba(12, 4, 18, 0.55); }
.theme-curse .panel h2 { color: #d090f0; }
.theme-curse .choice.bad { border-color: #6a2080; }
.theme-curse .coords { color: #d8a0f0; }

.trees {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.tree {
  border: 1px solid #3a4a20;
  background: #101408;
  color: #8a9a60;
  width: 52px;
  height: 64px;
  font-size: 28px;
  letter-spacing: 0;
  cursor: pointer;
  font-family: inherit;
}

.tree.dead {
  color: #2a2010;
  border-color: #5a1010;
  text-decoration: line-through;
}

.ledger {
  list-style: none;
  margin: 12px 0 18px;
  padding: 0;
}

.ledger li {
  padding: 6px 0;
  border-bottom: 1px solid #2a1030;
  cursor: pointer;
  letter-spacing: 0.28em;
  color: #c8a0d0;
}

.ledger li.struck {
  text-decoration: line-through;
  color: #4a2040;
}

.ledger li.holy {
  color: #f0e8ff;
  text-shadow: 0 0 10px rgba(200, 140, 255, 0.6);
}

.gate {
  margin-top: 16px;
}

.gate input {
  width: 100%;
  background: #070101;
  border: 1px solid #4a1010;
  color: var(--paper);
  padding: 10px 12px;
  font: inherit;
  letter-spacing: 0.2em;
  outline: none;
}

.theme-calamity .gate input { border-color: #3a4a20; }
.theme-curse .gate input { border-color: #4a2060; }

.drop {
  position: fixed;
  top: -12%;
  width: 1px;
  height: 18px;
  background: linear-gradient(transparent, #6a7050);
  animation: fall linear infinite;
  pointer-events: none;
  z-index: 3;
  opacity: 0.55;
}

@keyframes fall {
  to { transform: translateY(120vh); }
}

.locked-hint {
  color: #6a4040;
  font-size: 12px;
  letter-spacing: 0.16em;
  margin-top: 8px;
  min-height: 1.4em;
}

.hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 18px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  font-size: 11px;
  letter-spacing: 0.28em;
}

.hud a, .hud span {
  color: #5a3030;
  text-decoration: none;
}

.hud .on { color: #d4b090; }
.hud-final { color: #ff6a60 !important; }
.hud-home { color: #8a4040; }
.hud-count { margin-left: auto; }

.path-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.path-card {
  border: 1px solid #4a1010;
  padding: 22px 18px 18px;
  min-height: 220px;
  background: rgba(16, 0, 0, 0.55);
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
}

.path-card.locked {
  opacity: 0.38;
  pointer-events: none;
}

.path-card h2 {
  font-size: 20px;
  letter-spacing: 0.4em;
  color: var(--blood-hot);
  margin-bottom: 12px;
}

.path-card p {
  font-size: 13px;
  line-height: 1.8;
  color: #9a7068;
  letter-spacing: 0.1em;
}

.path-card .st {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #6a3030;
}

.path-card.done { border-color: #8a6040; }
.path-card.done .st { color: #d4b090; }

.final-door {
  margin-top: 28px;
  border: 1px dashed #5a1010;
  padding: 22px;
  text-align: center;
  letter-spacing: 0.4em;
  color: #5a2020;
}

.final-door.open {
  border-style: solid;
  color: var(--blood-hot);
  box-shadow: var(--glow);
}

.final-door a { color: inherit; text-decoration: none; }

.sockets {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 28px 0;
}

.socket {
  width: 92px;
  height: 110px;
  border: 1px solid #4a1010;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.2em;
  font-size: 13px;
  color: #5a2020;
  background: #100404;
}

.socket.filled {
  color: #e8c8b0;
  border-color: #a04030;
  box-shadow: var(--glow);
}

.coins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.coin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #8a6a20;
  background: #2a1a08;
  color: #d4b060;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}

.coin.on {
  background: #8a6020;
  color: #fff4d0;
}

.theme-finale { background: #050000; }

@media (max-width: 800px) {
  .grid2 { grid-template-columns: 1fr; }
  .path-board { grid-template-columns: 1fr; }
}
