/* THE VAULT — simple, premium, editorial. Hyro x Creatine $50k.
   Deep warm near-black canvas, generous negative space, one red accent.
   The "vault" reads through restraint: a single hairline seam, a tactile
   4-digit entry, and one confident unlock moment. No 3D safe, no chrome,
   no gimmick motion. Apple/luxury landing language. */

:root {
  --red: #fb0d1b;
  --red-soft: #ff2b38;
  --ink: #0a0807;            /* near-black, warm */
  --ink-2: #110d0c;
  --paper: #f6f1ea;          /* warm off-white */
  --paper-dim: rgba(246, 241, 234, 0.62);
  --paper-faint: rgba(246, 241, 234, 0.34);
  --line: rgba(246, 241, 234, 0.12);
  --line-strong: rgba(246, 241, 234, 0.24);
  --serif: "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { min-height: 100dvh; }

/* warm radial vignette — subtle, expensive, not busy */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(80, 22, 18, 0.42), transparent 55%),
    radial-gradient(140% 120% at 50% 120%, rgba(20, 12, 10, 0.9), var(--ink) 70%);
  pointer-events: none;
  z-index: 0;
}

.vault-root {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vh, 72px) 24px;
  text-align: center;
}

/* ---------------------------------------------------------------- */
/* Type                                                              */
/* ---------------------------------------------------------------- */
.kicker {
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--paper-faint);
  font-weight: 600;
  margin-bottom: 22px;
}

.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--paper);
}
.headline .amt { color: var(--red); font-style: italic; }

.sub {
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
  color: var(--paper-dim);
  max-width: 30ch;
  margin: 0 auto 40px;
  font-weight: 400;
}

/* ---------------------------------------------------------------- */
/* The seam — the one ornament. A thin vertical line of light that   */
/* "splits" on the win moment. Reads as a vault door joint.          */
/* ---------------------------------------------------------------- */
.seam {
  position: relative;
  width: 1px;
  height: clamp(48px, 9vh, 90px);
  margin: 0 auto 38px;
  background: linear-gradient(var(--line-strong), transparent);
}
.seam::after {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(251, 13, 27, 0.7);
}

/* ---------------------------------------------------------------- */
/* Countdown — clean, airy, mono-ish numerals                        */
/* ---------------------------------------------------------------- */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  margin: 6px auto 42px;
}
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.cd-num {
  font-family: var(--serif);
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.cd-lbl {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.cd-sep {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 52px);
  color: var(--line-strong);
  line-height: 1;
  align-self: flex-start;
}

/* ---------------------------------------------------------------- */
/* Buttons / CTA                                                     */
/* ---------------------------------------------------------------- */
.cta, .unlock-btn, .again-btn {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  transition: transform 0.18s cubic-bezier(.16,1,.3,1), background 0.18s, opacity 0.18s;
}
.cta {
  display: inline-block;
  text-decoration: none;
  background: var(--red);
  color: #fff;
  padding: 15px 34px;
  box-shadow: 0 10px 30px -12px rgba(251, 13, 27, 0.7);
}
.cta:hover, .unlock-btn:hover:not(:disabled) { transform: translateY(-1px); background: var(--red-soft); }
.cta:active, .unlock-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }

.fine {
  margin: 22px auto 0;
  font-size: 12px;
  color: var(--paper-faint);
  max-width: 34ch;
  line-height: 1.5;
}

.tc-link {
  display: inline-block;
  margin-top: 30px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-faint);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.tc-link:hover { color: var(--paper-dim); }

/* ---------------------------------------------------------------- */
/* Email gate                                                        */
/* ---------------------------------------------------------------- */
.panel { width: 100%; max-width: 460px; }

.entry h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 20px;
  color: var(--paper);
}
.entry input,
.email-field {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  text-align: center;
  padding: 14px 6px;
  outline: none;
  transition: border-color 0.2s;
}
.entry input::placeholder { color: var(--paper-faint); }
.entry input:focus { border-color: var(--red); }
.entry .unlock-btn { margin-top: 26px; }

.unlock-btn {
  background: var(--red);
  color: #fff;
  padding: 14px 38px;
  box-shadow: 0 10px 30px -12px rgba(251, 13, 27, 0.7);
}
.unlock-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.unlock-btn.big { padding: 16px 52px; font-size: 14px; margin-top: 8px; }

/* ---------------------------------------------------------------- */
/* The lock — premium tactile 4-digit entry                          */
/* ---------------------------------------------------------------- */
.lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 460px;
}

.attempts-left {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 26px;
}
.attempts-left.none { color: var(--red); }

.digits {
  display: flex;
  gap: clamp(10px, 3vw, 18px);
  justify-content: center;
  margin-bottom: 30px;
}
.digit {
  width: clamp(58px, 17vw, 76px);
  height: clamp(76px, 22vw, 98px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 46px);
  color: var(--paper);
  background: rgba(246, 241, 234, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.digit.filled { background: rgba(246, 241, 234, 0.06); }
.digit.active {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(251, 13, 27, 0.35), 0 10px 30px -16px rgba(251, 13, 27, 0.8);
}
.digit.active::after {
  content: "";
  position: absolute;
  bottom: 14px;
  width: 1.5px; height: 22px;
  background: var(--red);
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* Keypad */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 2.6vw, 14px);
  width: 100%;
  max-width: 300px;
  margin: 0 auto 28px;
}
.key {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(22px, 6vw, 28px);
  color: var(--paper);
  background: rgba(246, 241, 234, 0.04);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.12s, border-color 0.15s;
}
.key:hover { background: rgba(246, 241, 234, 0.09); border-color: var(--line-strong); }
.key:active { transform: scale(0.94); background: rgba(251, 13, 27, 0.18); border-color: var(--red); }
.key.fn {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  background: transparent;
  border-color: transparent;
}
.key.fn:hover { color: var(--paper-dim); background: rgba(246,241,234,0.04); }
.key.fn:active { transform: scale(0.94); }
.key[aria-disabled="true"] { opacity: 0.3; pointer-events: none; }

.dial-hint {
  font-size: 11px;
  color: var(--paper-faint);
  letter-spacing: 0.04em;
  margin-bottom: 26px;
}

/* ---------------------------------------------------------------- */
/* Unlocking + result                                                */
/* ---------------------------------------------------------------- */
.unlocking-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 18px 0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.45; } 50% { opacity: 1; } }

.result { margin-top: 8px; }
.result h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.result .r-miss { color: var(--paper); }
.result .r-dup, .result .r-err { color: var(--red); }
.result p { color: var(--paper-dim); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.again-btn {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 12px 30px;
}
.again-btn:hover { border-color: var(--red); color: #fff; transform: translateY(-1px); }

.view-wall {
  display: inline-block;
  margin-top: 26px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.view-wall:hover { color: var(--paper-dim); }

/* ---------------------------------------------------------------- */
/* Wall — minimal, eliminated codes                                  */
/* ---------------------------------------------------------------- */
.wall {
  margin: 30px auto 0;
  width: 100%;
  max-width: 460px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.wall-head {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wall-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.wall-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  max-height: 168px;
  overflow-y: auto;
}
.wall-code {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--paper-faint);
  position: relative;
  font-variant-numeric: tabular-nums;
}
.wall-code::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; top: 52%;
  height: 1px;
  background: var(--red);
  opacity: 0.55;
}

/* ---------------------------------------------------------------- */
/* Win takeover — restrained, editorial, one big number              */
/* ---------------------------------------------------------------- */
/* ================================================================== */
/* WIN REVEAL (rebuilt clean). One elegant unlock moment.              */
/* Layers: gold bloom (the vault opening) -> staggered typographic      */
/* reveal -> physics confetti (canvas-confetti, separate layer).        */
/* ================================================================== */
.winv {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  overflow: hidden;
  background: #0b0806;
  animation: winv-fadein 0.5s ease both;
}
@keyframes winv-fadein { from { opacity: 0; } to { opacity: 1; } }

/* the vault opening: a warm gold light that blooms out from the centre */
.winv-bloom {
  position: absolute;
  left: 50%; top: 46%;
  width: 140vmax; height: 140vmax;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 236, 190, 0.42) 0%,
    rgba(251, 13, 27, 0.20) 24%,
    rgba(120, 20, 16, 0.28) 42%,
    transparent 62%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.winv.s1 .winv-bloom {
  animation: winv-bloom 2.4s cubic-bezier(.2,.7,.25,1) forwards;
}
@keyframes winv-bloom {
  0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  22%  { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
}

/* slow-rotating volumetric rays behind the number */
.winv-rays {
  position: absolute;
  left: 50%; top: 46%;
  width: 150vmax; height: 150vmax;
  transform: translate(-50%, -50%) rotate(0deg);
  background: repeating-conic-gradient(from 0deg,
    rgba(255, 226, 165, 0.06) 0deg 6deg,
    transparent 6deg 14deg);
  opacity: 0;
  pointer-events: none;
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%);
          mask: radial-gradient(circle, #000 0%, transparent 62%);
}
.winv.s2 .winv-rays { animation: winv-rays 26s linear infinite, winv-rays-in 1.2s ease forwards; }
@keyframes winv-rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes winv-rays-in { to { opacity: 1; } }

/* the content column, revealed once the bloom is underway */
.winv-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  width: 100%;
  opacity: 0;
  transform: translateY(14px);
}
.winv.s2 .winv-inner { animation: winv-rise 0.9s cubic-bezier(.16,1,.3,1) 0.05s forwards; }
@keyframes winv-rise { to { opacity: 1; transform: none; } }

/* staggered children entrance */
.winv-congrats, .winv-kicker, .winv-cash, .winv-aud, .winv-meta {
  opacity: 0;
  transform: translateY(12px);
}
.winv.s2 .winv-congrats { animation: winv-child 0.7s cubic-bezier(.16,1,.3,1) 0.10s forwards; }
.winv.s2 .winv-kicker   { animation: winv-child 0.7s cubic-bezier(.16,1,.3,1) 0.22s forwards; }
.winv.s2 .winv-cash     { animation: winv-cash 0.9s cubic-bezier(.16,1,.3,1) 0.34s forwards; }
.winv.s2 .winv-aud      { animation: winv-child 0.7s cubic-bezier(.16,1,.3,1) 0.5s forwards; }
.winv.s2 .winv-meta     { animation: winv-child 0.7s cubic-bezier(.16,1,.3,1) 0.62s forwards; }
@keyframes winv-child { to { opacity: 1; transform: none; } }
@keyframes winv-cash {
  0%   { opacity: 0; transform: translateY(12px) scale(0.94); filter: blur(6px); }
  100% { opacity: 1; transform: none; filter: none; }
}

.winv-congrats {
  font-family: var(--serif);
  font-size: clamp(34px, 8vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #ffd979;
  text-shadow: 0 0 42px rgba(255, 200, 90, 0.4);
}
.winv-kicker {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--paper);
}
.winv-cash {
  margin-top: 34px;
  font-family: var(--serif);
  font-size: clamp(66px, 20vw, 176px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 70px rgba(255, 214, 130, 0.42), 0 3px 40px rgba(0,0,0,0.5);
}
.winv-aud {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.winv-meta {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.winv-code {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}
.winv-code b { color: var(--red); font-weight: 700; letter-spacing: 0.12em; }
.winv-winner {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--paper);
}

/* next-steps panel rises in at stage 4 */
.winv-next {
  margin-top: 36px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
  border-top: 1px solid var(--line);
  padding-top: 28px;
  pointer-events: none;
}
.winv.s4 .winv-next { opacity: 1; transform: none; pointer-events: auto; }
.rv-next-title {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 18px;
}
.rv-steps {
  list-style: none;
  padding: 0;
  margin: 0 auto 26px;
  max-width: 420px;
  text-align: left;
}
.rv-steps li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  color: var(--paper-dim);
  line-height: 1.5;
  padding: 9px 0;
}
.rv-n {
  flex: none;
  font-family: var(--serif);
  color: var(--red);
  font-size: 15px;
  width: 18px;
}

/* ---------------------------------------------------------------- */
/* Turnstile — visually hidden background widget                     */
/* ---------------------------------------------------------------- */
.ts-wrap {
  position: fixed;
  bottom: 0; left: 0;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.ts-wrap.needs {
  width: auto; height: auto;
  overflow: visible;
  opacity: 1;
  pointer-events: auto;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
}
.ts-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--paper-dim);
  text-align: center;
}

/* hide Turnstile's own injected badge/iframe when not needed */
.ts-wrap:not(.needs) iframe { visibility: hidden; }

/* ---------------------------------------------------------------- */
/* Reduced motion                                                    */
/* ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .unlocking-label, .digit.active::after { animation: none; }
  .winv, .winv-bloom, .winv-rays, .winv-inner,
  .winv-congrats, .winv-kicker, .winv-cash, .winv-aud, .winv-meta, .winv-next {
    animation: none !important; transition: none !important; opacity: 1; transform: none;
  }
  .winv-bloom { opacity: 0.7; }
}

@media (max-width: 420px) {
  .digit { border-radius: 11px; }
}

/* ---------------------------------------------------------------- */
/* Entries-progress activation meter (pre-activation)                */
/* ---------------------------------------------------------------- */
.entries { width: min(440px, 86vw); margin: 26px auto 30px; text-align: center; }
.entries-count {
  font-family: var(--serif);
  font-size: clamp(38px, 9vw, 60px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.entries-count .entries-slash { color: var(--paper-faint); font-size: 0.5em; letter-spacing: 0; }
.entries-lbl {
  margin-top: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--paper-dim);
}
.entries-bar {
  margin: 20px auto 0;
  height: 6px;
  border-radius: 99px;
  background: rgba(246, 241, 234, 0.10);
  overflow: hidden;
}
.entries-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red), var(--red-soft));
  transition: width 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 0 14px rgba(251, 13, 27, 0.5);
}
.entries-pct { margin-top: 10px; font-size: 12px; letter-spacing: 0.06em; color: var(--paper-faint); }

/* ---------------------------------------------------------------- */
/* Full entry-confirm form (T&Cs clause 8.3)                         */
/* ---------------------------------------------------------------- */
.form-note {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--paper-dim);
  text-align: center;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.ff {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(246, 241, 234, 0.03);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.ff::placeholder { color: var(--paper-faint); }
.ff:focus { border-color: var(--red); background: rgba(246, 241, 234, 0.05); }
.ff-wide { grid-column: 1 / -1; }
select.ff { appearance: none; -webkit-appearance: none; cursor: pointer; }
select.ff option { color: #111; }

.gate-msg {
  margin: 12px 0 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 13, 27, 0.4);
  background: rgba(251, 13, 27, 0.08);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.accept {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--paper-dim);
  text-align: left;
  cursor: pointer;
}
.accept input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--red); flex: none; }
.accept a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 420px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ================================================================== */
/* UNLOCK SEQUENCE — the cinematic moment. Full-stage takeover.        */
/* ================================================================== */
.unlockseq {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: radial-gradient(circle at 50% 42%, rgba(20,14,12,0.86), rgba(6,5,4,0.97) 70%);
  backdrop-filter: blur(3px);
  animation: useq-in 0.4s ease both;
}
@keyframes useq-in { from { opacity: 0; } to { opacity: 1; } }

.useq-stage {
  position: relative;
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  display: grid;
  place-items: center;
}

/* The vault door */
.vault-door {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6));
}
.vd-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
}
.vd-ring-1 { inset: 0;   border-color: rgba(246,241,234,0.20); }
.vd-ring-2 { inset: 12%; border-color: rgba(246,241,234,0.14); border-width: 3px; }
.vd-ring-3 { inset: 26%; border-color: rgba(246,241,234,0.22); }

/* notches around the outer ring, like a real safe dial */
.vd-ring-1::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg,
      transparent 0deg 8deg,
      rgba(246,241,234,0.18) 8deg 9deg);
  -webkit-mask: radial-gradient(circle, transparent 47%, #000 47.5%, #000 50%, transparent 50.5%);
          mask: radial-gradient(circle, transparent 47%, #000 47.5%, #000 50%, transparent 50.5%);
}

/* rings idle-rotate; during tension they spin harder */
.vd-ring-1 { animation: vd-spin 26s linear infinite; }
.vd-ring-2 { animation: vd-spin-r 20s linear infinite; }
.vd-ring-3 { animation: vd-spin 14s linear infinite; }
.tension .vd-ring-1 { animation-duration: 2.2s; }
.tension .vd-ring-2 { animation-duration: 1.5s; }
.tension .vd-ring-3 { animation-duration: 1s; }
@keyframes vd-spin   { to { transform: rotate(360deg); } }
@keyframes vd-spin-r { to { transform: rotate(-360deg); } }

/* centre hub with the entered code */
.vd-hub {
  position: relative;
  z-index: 3;
  width: 42%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #2a201d, #0c0908 70%);
  border: 2px solid rgba(246,241,234,0.18);
  display: grid;
  place-items: center;
  box-shadow: inset 0 4px 18px rgba(0,0,0,0.7), 0 0 24px rgba(0,0,0,0.5);
}
.vd-code { display: flex; gap: 6px; }
.vd-d {
  font-family: var(--serif);
  font-size: clamp(22px, 6vw, 34px);
  color: var(--paper);
  opacity: 0.9;
  animation: vd-flick 0.5s ease both;
}
@keyframes vd-flick {
  0% { opacity: 0; transform: translateY(6px); filter: blur(4px); }
  100% { opacity: 0.9; transform: none; filter: none; }
}
.tension .vd-d { animation: vd-tick 0.28s steps(1) infinite; }
@keyframes vd-tick { 50% { opacity: 0.55; } }

/* the door seam (vertical) — closed until win */
.vd-seam {
  position: absolute; top: 6%; bottom: 6%; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(var(--ink), rgba(246,241,234,0.10), var(--ink));
  opacity: 0; z-index: 4;
}

/* the light behind the door (blooms on win) */
.vd-light {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,120,0.0), rgba(255,215,120,0) 60%);
  z-index: 1; pointer-events: none;
}

/* status line */
.useq-status { text-align: center; min-height: 30px; }
.useq-line {
  font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper-dim);
}
.useq-line.pulse { animation: useq-pulse 1.1s ease-in-out infinite; }
@keyframes useq-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.useq-line.big { font-size: clamp(18px, 4.5vw, 26px); font-family: var(--serif); letter-spacing: 0.02em; text-transform: none; }
.useq-line.win  { color: #ffd979; text-shadow: 0 0 24px rgba(255,200,90,0.5); animation: useq-rise 0.6s ease both; }
.useq-line.fail { color: var(--red-soft); animation: useq-rise 0.6s ease both; }
@keyframes useq-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dots i { animation: useq-dot 1.2s infinite; opacity: 0; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes useq-dot { 0%,80%,100% { opacity: 0; } 40% { opacity: 1; } }

/* ---- WIN: door cracks, light floods ---- */
.unlockseq.won .vd-seam { opacity: 1; animation: seam-crack 1.2s ease forwards; }
@keyframes seam-crack {
  0% { opacity: 0; width: 2px; box-shadow: 0 0 0 rgba(255,210,120,0); }
  30% { opacity: 1; width: 3px; }
  100% { width: 46%; opacity: 1;
    background: radial-gradient(ellipse at center, rgba(255,235,180,0.95), rgba(255,190,90,0.4) 60%, transparent);
    box-shadow: 0 0 80px 30px rgba(255,200,110,0.6); }
}
.unlockseq.won .vd-light {
  animation: light-bloom 1.3s ease forwards;
}
@keyframes light-bloom {
  0% { background: radial-gradient(circle, rgba(255,215,120,0) 0%, transparent 60%); }
  100% { background: radial-gradient(circle, rgba(255,215,120,0.55) 0%, rgba(255,180,70,0.15) 45%, transparent 70%);
         box-shadow: 0 0 120px 40px rgba(255,200,110,0.35); }
}
.unlockseq.won .vd-ring-1,
.unlockseq.won .vd-ring-2,
.unlockseq.won .vd-ring-3 { animation: vd-open-spin 1.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes vd-open-spin { to { transform: rotate(140deg) scale(1.06); opacity: 0.85; } }
.unlockseq.won .vd-hub { animation: hub-glow 1.2s ease forwards; }
@keyframes hub-glow { to { box-shadow: 0 0 60px 10px rgba(255,200,110,0.7); border-color: rgba(255,215,140,0.8); } }
.unlockseq.won { animation: useq-in 0.4s ease both, win-flash 1.4s ease 0.6s; }
@keyframes win-flash { 0%,100% { background-color: transparent; } 20% { background-color: rgba(255,210,120,0.10); } }

/* ---- MISS: red shudder, door holds ---- */
.unlockseq.miss .useq-stage { animation: door-shudder 0.6s cubic-bezier(.36,.07,.19,.97); }
@keyframes door-shudder {
  10%,90% { transform: translateX(-2px); }
  20%,80% { transform: translateX(4px); }
  30%,50%,70% { transform: translateX(-8px); }
  40%,60% { transform: translateX(8px); }
}
.unlockseq.miss .vd-ring-1,
.unlockseq.miss .vd-ring-2,
.unlockseq.miss .vd-ring-3 { animation: vd-reject 0.5s ease forwards; border-color: rgba(255,43,56,0.5) !important; }
@keyframes vd-reject { 0% { transform: rotate(0); } 60% { transform: rotate(-14deg); } 100% { transform: rotate(-8deg); } }
.unlockseq.miss .vd-hub { animation: hub-reject 0.5s ease; }
@keyframes hub-reject { 0%,100% { box-shadow: inset 0 4px 18px rgba(0,0,0,0.7); } 40% { box-shadow: inset 0 4px 18px rgba(0,0,0,0.7), 0 0 40px 6px rgba(255,43,56,0.6); border-color: var(--red-soft); } }
.unlockseq.miss { animation: useq-in 0.4s ease both, miss-flash 0.5s ease; }
@keyframes miss-flash { 0%,100% { background-color: transparent; } 30% { background-color: rgba(255,43,56,0.08); } }

@media (prefers-reduced-motion: reduce) {
  .vd-ring, .vd-d, .unlockseq, .useq-stage { animation: none !important; }
  .unlockseq.won .vd-seam { width: 40%; opacity: 1; }
}

/* ---- Per-order attempts + your own previous guesses ---- */
.attempts-order {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-top: -14px;
  margin-bottom: 20px;
}
.your-guesses {
  width: min(420px, 86vw);
  margin: 18px auto 26px;
  text-align: center;
}
.yg-title {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: 12px;
}
.yg-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.yg-code {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--paper-dim);
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(246, 241, 234, 0.03);
  text-decoration: line-through;
  text-decoration-color: rgba(251, 13, 27, 0.6);
}
/* winv rebuild stg 1782967547 */
