:root {
  --ink: #120f1c;
  --gold: #e7b86a;
  --gold-dim: #a8834a;
  --paper: #f3e6cc;
  --vermilion: #c8402a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow: hidden;
}

#stage, #stage canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#threshold {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at 50% 60%, rgba(18, 15, 28, 0.35), rgba(18, 15, 28, 0.9) 70%);
  transition: opacity 1.6s ease;
  z-index: 2;
}

#threshold.gone { opacity: 0; pointer-events: none; }
#threshold[hidden] { display: none; }

.frame {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 40px 28px 32px;
  border: 1px solid rgba(231, 184, 106, 0.45);
  outline: 1px solid rgba(231, 184, 106, 0.18);
  outline-offset: 6px;
  background: rgba(18, 15, 28, 0.55);
  backdrop-filter: blur(3px);
}

.kicker {
  margin: 0 0 18px;
  font-family: "Cormorant SC", serif;
  letter-spacing: 0.32em;
  font-size: 0.85rem;
  color: var(--gold-dim);
}

h1 {
  margin: 0;
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  letter-spacing: 0.22em;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  color: var(--gold);
}

.subtitle {
  margin: 6px 0 0;
  font-family: "Cormorant SC", serif;
  letter-spacing: 0.4em;
  font-size: 0.95rem;
  color: var(--gold-dim);
}

.rule {
  height: 1px;
  margin: 22px auto;
  width: 60%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.invite {
  margin: 0 0 26px;
  font-size: 1.2rem;
  line-height: 1.5;
}

.doors {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.door {
  font: inherit;
  font-family: "Cormorant SC", serif;
  letter-spacing: 0.18em;
  font-size: 1.05rem;
  padding: 12px 26px;
  min-width: 170px;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold-dim);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.door:hover, .door:focus-visible {
  background: rgba(231, 184, 106, 0.12);
  outline: none;
}

.door.primary {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: var(--paper);
}

.door.primary:hover, .door.primary:focus-visible { background: #d94f37; }

.hint {
  margin: 22px 0 0;
  font-size: 0.98rem;
  color: rgba(243, 230, 204, 0.7);
}

#flat-help {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 16px;
  font-family: "Cormorant SC", serif;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: rgba(243, 230, 204, 0.75);
  background: rgba(18, 15, 28, 0.45);
  border: 1px solid rgba(231, 184, 106, 0.2);
  white-space: nowrap;
  transition: opacity 2s ease;
  z-index: 1;
  pointer-events: none;
}

#flat-help.faded { opacity: 0; }

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  text-align: center;
}

@media (max-width: 480px) {
  .door { min-width: 0; width: 100%; }
  #flat-help { font-size: 0.75rem; letter-spacing: 0.08em; }
}
