/* Shared public pages. The castle night stays behind every page. */
:root {
  --ink: #2a2340;
  --faint: #8d82a4;
  --line: rgba(90, 70, 120, 0.18);
  --peri: #6d5cae;
  --gold: #e8d090;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  background: #030208 center top / cover no-repeat fixed;
  background-image: url("../forge/assets/vibes/vibe-castle-night.jpg");
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 28%, transparent 12%, rgba(4, 2, 12, 0.28) 58%, rgba(2, 1, 8, 0.62) 100%),
    linear-gradient(180deg, rgba(8, 4, 18, 0.35), transparent 22%, rgba(4, 2, 12, 0.45) 100%);
}

body > * { position: relative; z-index: 1; }

#glitter {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  color: #f4ecff;
  font-family: Cinzel, serif;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, rgba(5, 3, 12, 0.88), rgba(5, 3, 12, 0.35));
}

.bar a { color: #f4ecff; text-decoration: none; }
.bar a[aria-current="page"] { color: var(--gold); }
.bar nav { display: flex; gap: 1.1rem; align-items: center; font-size: 0.78rem; }
.bar .stay { color: #f4ecff; cursor: default; }

.status {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 1.2rem 0.4rem;
  color: #d9cff0;
  font-size: 1.05rem;
}

.sheet {
  position: relative;
  min-height: 70vh;
  padding: 2.4rem 3.1rem 3.2rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(231, 222, 243, 0.7);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(252, 249, 255, 0.5), rgba(246, 240, 252, 0.58)),
    url("parchment-page.jpg") top center / 100% auto repeat-y;
  opacity: 0.78;
}

.sheet h1, .sheet h2 {
  margin: 0.15rem 0 0.35rem;
  font-family: Cinzel, serif;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.sheet h1 { font-size: 1.7rem; }

.choices { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 1rem; }

.choices button, .sheet .tools button {
  border: 1px solid #d5cbe6;
  background: rgba(255, 252, 255, 0.55);
  color: var(--peri);
  font-family: Cinzel, serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.55rem;
  cursor: pointer;
}

.choices button.on { background: #3c3158; color: #f7f3fb; }

.sheet table { width: 100%; border-collapse: collapse; font-size: 1.2rem; }
.sheet th {
  padding: 0.35rem 0.4rem 0.5rem;
  font-family: Cinzel, serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  color: var(--peri);
}
.sheet td { padding: 0.38rem 0.4rem; border-top: 1px solid var(--line); vertical-align: baseline; }
.sheet td.rank { width: 2.2rem; color: var(--faint); }
.sheet td.amount { text-align: right; font-variant-numeric: tabular-nums; }

.page {
  width: min(860px, calc(100% - 2rem));
  margin: 0.4rem auto 3rem;
}

.hall {
  display: flex;
  justify-content: center;
  padding: 1.1rem 1rem 2.5rem;
}

.board {
  width: min(880px, 100%);
  padding: 1.25rem 1.35rem 1.5rem;
  color: #f4ecff;
  background: linear-gradient(180deg, rgba(12, 8, 22, 0.9), rgba(6, 4, 12, 0.94));
  border: 1px solid rgba(232, 208, 144, 0.55);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(155, 140, 255, 0.25);
}

.board h1 {
  margin: 0;
  font-family: Cinzel, serif;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #f7f3fb;
}

.board .status { max-width: none; padding: 0.35rem 0 0; }

.board .choices button {
  border: 1px solid rgba(184, 168, 255, 0.45);
  background: rgba(20, 14, 36, 0.8);
  color: #b8a8ff;
}

.board .choices button.on {
  color: #1a1430;
  background: var(--gold);
  border-color: var(--gold);
}

.board table { width: 100%; border-collapse: collapse; font-size: 1.2rem; }
.board th {
  padding: 0.4rem;
  font-family: Cinzel, serif;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  color: var(--gold);
}
.board td { padding: 0.45rem 0.4rem; border-top: 1px solid rgba(184, 168, 255, 0.22); }
.board td.rank { width: 3rem; color: var(--gold); }
.board td.amount { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .bar { flex-wrap: wrap; }
  .sheet { padding: 1.4rem 1.1rem 2rem; }
}
