:root {
  --gold: #e8c45a;
  --gold-dim: #b8923a;
  --cream: #f4e9d0;
  --text: #f4e9d0;
  --bg: #14100a;
  --bg2: #1f1810;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 50% -20%, var(--bg2), var(--bg) 70%);
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Velvet rope (18+ gate) — fails closed: lounge is hidden until consent ---- */
#velvet-rope {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at 50% -20%, var(--bg2), var(--bg) 70%);
}
#velvet-rope[hidden] { display: none; }
.rope-card {
  max-width: 30rem;
  text-align: center;
  border: 1px double var(--gold-dim);
  border-radius: 4px;
  padding: 2.5rem 2rem;
}
.rope-card h1 { font-size: 2rem; margin: 0.4rem 0; }
.rope-card .rope-emblem { font-size: 3rem; margin: 0; }
.rope-actions { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1.8rem; }
#gate-leave { color: var(--gold-dim); font-style: italic; }

/* ---- Ego badge ---- */
#ego-badge {
  position: fixed;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 50;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  background: rgba(20, 16, 10, 0.85);
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  font-variant: small-caps;
}
#ego-badge .ego-title { color: var(--cream); font-style: italic; }

.bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bubble {
  position: absolute;
  bottom: -3rem;
  border: 1px solid rgba(232, 196, 90, 0.35);
  border-radius: 50%;
  animation: rise linear infinite;
}
@keyframes rise {
  to { transform: translateY(-110vh); }
}

main { position: relative; z-index: 1; max-width: 46rem; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
h1 {
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin: 1rem 0 0.2rem;
  text-shadow: 0 0 24px rgba(232, 196, 90, 0.35);
}
.tagline { text-align: center; font-style: italic; color: var(--gold-dim); margin-bottom: 3rem; }
h2 {
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 0.3rem;
  margin-top: 3.5rem;
  font-variant: small-caps;
  letter-spacing: 0.1em;
}
h2.boxed { border: none; margin-top: 0; }
.clink { text-align: center; font-size: 3rem; margin: 0; }
.menu-item { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin: 1.1rem 0; }
.menu-item .name { font-weight: bold; color: var(--cream); white-space: nowrap; }
.menu-item .dots { flex: 1; border-bottom: 1px dotted var(--gold-dim); transform: translateY(-0.3em); }
.menu-item .desc { font-style: italic; color: #cdbb96; text-align: right; max-width: 60%; }
.setlist li { margin: 0.6rem 0; }
.setlist .note { color: var(--gold-dim); font-style: italic; }
.log-entry { margin: 1.6rem 0; padding-left: 1rem; border-left: 2px solid var(--gold-dim); }
.log-entry time { color: var(--gold); font-variant: small-caps; letter-spacing: 0.06em; }
.toast-box {
  text-align: center;
  margin: 2.5rem 0;
  padding: 2rem 1.5rem;
  border: 1px double var(--gold-dim);
  border-radius: 4px;
}
#toast { font-size: 1.3rem; font-style: italic; min-height: 4.5rem; }
button {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  font: inherit;
  padding: 0.6rem 1.6rem;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.08em;
}
button:hover { background: rgba(232, 196, 90, 0.12); }
button:focus-visible, a:focus-visible {
  background: rgba(232, 196, 90, 0.12);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
footer { text-align: center; margin-top: 4rem; color: var(--gold-dim); font-size: 0.9rem; font-style: italic; }
/* ---- The Cheese Room (lounge wing) ---- */
#cheese-room footer a { color: var(--gold); }
.wing-link { margin-top: 1.6rem; }
.wing-link a { color: var(--gold); }
.note-line { font-style: italic; color: var(--gold-dim); }
.embed-grid { display: flex; flex-direction: column; gap: 2.5rem; margin-top: 1.5rem; }
.embed-card h3 { color: var(--cream); font-variant: small-caps; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.embed-frame { aspect-ratio: 16 / 9; border: 1px solid var(--gold-dim); border-radius: 4px; overflow: hidden; }
.embed-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed-note { font-style: italic; color: #cdbb96; margin-top: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
  .bubble { animation: none; display: none; }
}

/* Print is a styled artifact, same contract as the apex — not a white ink-saver. */
@media print {
  body {
    background: var(--bg);
    color: var(--text);
    print-color-adjust: exact;
  }
  /* Gate state is preserved in print: an unconsented page prints the rope, not the lounge. */
  #ego-badge, .bubbles { display: none; }
}

/* ---- The Gentleman's Ledger ---- */
.standing-card { text-align: center; margin: 2rem 0; padding: 1.8rem 1.5rem; border: 1px double var(--gold-dim); border-radius: 4px; }
#standing { font-size: 1.5rem; color: var(--gold); font-variant: small-caps; letter-spacing: 0.06em; }
table.ledger { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
table.ledger th, table.ledger td { padding: 0.5rem 0.8rem; border-bottom: 1px dotted var(--gold-dim); text-align: left; }
table.ledger th { color: var(--gold); font-variant: small-caps; letter-spacing: 0.08em; }
table.ledger tr.current-title td { color: var(--gold); font-weight: bold; }
