:root {
  --ink: #07040c;
  --panel: rgba(14, 8, 20, 0.82);
  --panel-2: rgba(28, 14, 34, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --bone: #f3ede2;
  --dim: #b9aec4;
  --blood: #ff1f3d;
  --blood-deep: #8f0016;
  --pumpkin: #ff7a1a;
  --violet: #9a4dff;
  --toxic: #5dff3a;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--bone); overflow: hidden; overscroll-behavior: none; }
body { font: 15px/1.45 "Space Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--pumpkin); }
[hidden] { display: none !important; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, #e9e4ff 0%, #8e86b8 40%, #120a1e 100%); z-index: 5; }

/* ---------- buttons ---------- */
.btn-blood {
  position: relative; border: 0; border-radius: 999px; padding: 14px 28px; font-weight: 700; letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ff3550, var(--blood-deep)); color: #fff; text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(255, 80, 100, 0.5), 0 8px 30px rgba(255, 20, 60, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.btn-blood:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 80, 100, 0.8), 0 10px 40px rgba(255, 20, 60, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-blood:disabled { opacity: 0.55; cursor: progress; transform: none; }
.btn-ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 999px; padding: 12px 20px; font-weight: 600; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.35); }
.link { background: none; border: 0; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.icon { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); display: grid; place-items: center; font-size: 18px; }

/* ---------- gate ---------- */
/* flex + margin:auto centres short content but still scrolls from the top when the rules or the form run long */
#gate { position: fixed; inset: 0; z-index: 20; display: flex; overflow-y: auto; -webkit-overflow-scrolling: touch; text-align: center; padding: calc(28px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  background: radial-gradient(ellipse at 50% 120%, rgba(160, 0, 30, 0.55), transparent 60%), radial-gradient(ellipse at 50% 45%, rgba(7, 4, 12, 0.35), rgba(7, 4, 12, 0.82) 70%);
  transition: opacity 1.2s ease, visibility 1.2s; }
#gate.gone { opacity: 0; visibility: hidden; pointer-events: none; }
#gate.vip { background: radial-gradient(ellipse at 50% 115%, rgba(255, 0, 30, 0.8), transparent 65%), radial-gradient(ellipse at 50% 45%, rgba(40, 0, 8, 0.4), rgba(14, 0, 4, 0.88) 70%); }
#gate.vip .invite { color: var(--blood); }
#gate.vip .sub::after { content: ' \00b7  after dark'; color: var(--blood); }
.gate-inner { max-width: 640px; width: 100%; margin: auto; position: relative; z-index: 1; }
.steps { display: flex; justify-content: center; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.steps button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: var(--dim); font-size: 14px; }
.steps button i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.08); }
.steps button.on { color: #fff; border-color: rgba(255, 31, 61, 0.7); background: rgba(255, 31, 61, 0.14); }
.steps button.on i { background: var(--blood); }
.steps button.done { color: var(--bone); }
.steps button.done i { background: rgba(93, 255, 58, 0.25); color: var(--toxic); }
.steps button.done i::after { content: '✓'; } .steps button.done i { font-size: 0; } .steps button.done i::after { font-size: 12px; }
.gstep { display: grid; justify-items: center; gap: 12px; }
.gq { font-size: 18px; margin: 0; max-width: 34em; }
.row.center { justify-content: center; }
.fix { text-align: left; max-width: 520px; padding: 14px 16px; border: 1px solid rgba(255, 176, 32, 0.5); border-radius: var(--r); background: rgba(255, 176, 32, 0.06); }
.fix p { margin: 0 0 8px; } .fix ul { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; color: var(--bone); }
.fix .row { justify-content: flex-start; }
.rules-box { text-align: left; width: 100%; max-height: min(48vh, 520px); overflow-y: auto; padding: 4px 16px 14px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(10, 5, 14, 0.78); backdrop-filter: blur(6px); }
.rules-box h3 { margin-top: 18px; }
.gate-form { width: 100%; max-width: 460px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(10, 5, 14, 0.82); backdrop-filter: blur(6px); }
#gate .load { margin-top: 22px; }
.gate-code { max-width: 360px; margin: 6px auto 0; }
#gate .link, #gate .btn-ghost { min-height: 44px; }
.sos { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255, 31, 61, 0.55); background: rgba(255, 31, 61, 0.1); margin: 0 0 14px; }
.need { padding: 14px; border: 1px dashed rgba(255, 122, 26, 0.6); border-radius: var(--r); margin: 16px 0; display: grid; gap: 10px; justify-items: start; }
.need p { margin: 0; }
.ok-line { color: var(--toxic); margin: 0; font-size: 14px; }
.nudge { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 0; padding: 12px 14px; border: 1px solid rgba(255, 122, 26, 0.55); border-radius: var(--r); background: rgba(255, 122, 26, 0.08); }
.nudge a.partiful.btn-ghost { text-decoration: none; color: var(--bone); min-height: 44px; display: inline-flex; align-items: center; padding: 10px 18px; margin: 0; }
#rsvpForm .nudge { justify-content: flex-start; }
.fine.tight { margin: -4px 0 10px; }
/* the whole row is the button, so a tap anywhere in it plays the scene */
.grid-list.scenes li:has(button) { padding: 0; }
.grid-list.scenes button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; color: inherit; min-height: 44px; }
/* inline text links get a 44 px tall hit area without changing the line spacing */
.page a[href], .page a[data-page] { padding: 12px 2px; margin: -12px -2px; }
.grid-list.scenes li:has(button):hover { border-color: rgba(255, 122, 26, 0.7); }
.grid-list.scenes button::after { content: ' ▸'; color: var(--pumpkin); }
.invite { font-family: "Permanent Marker", cursive; color: var(--pumpkin); font-size: 20px; margin: 0 0 4px; transform: rotate(-2deg); }
.neon-title { font-family: "Neonderthaw", cursive; font-weight: 400; font-size: clamp(64px, 15vw, 150px); line-height: 0.95; margin: 0.08em 0 0.12em; color: #fff4f5;
  text-shadow: 0 0 6px #fff, 0 0 18px var(--blood), 0 0 40px var(--blood), 0 0 80px var(--blood), 0 0 120px rgba(255, 31, 61, 0.6); animation: flicker 6s infinite; }
@keyframes flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: 0.55; } }
.sub { font-family: "Creepster", cursive; letter-spacing: 0.12em; font-size: clamp(18px, 4vw, 26px); margin: 0; color: var(--pumpkin); }
.when { font-size: 18px; margin: 10px 0 26px; color: var(--dim); }
#enter { font-size: 18px; padding: 18px 44px; min-width: 240px; }
#enter.ready { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(255, 80, 100, 0.5), 0 8px 30px rgba(255, 20, 60, 0.45); } 50% { box-shadow: 0 0 0 1px rgba(255, 80, 100, 0.9), 0 8px 60px rgba(255, 20, 60, 0.9); } }
.load { width: 220px; height: 3px; margin: 18px auto 10px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
.load i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blood), var(--pumpkin)); transition: width 0.3s; }
.hint { color: var(--dim); font-size: 13px; margin: 6px 0; }
.drips { position: absolute; inset: 0 0 auto 0; height: 70px; pointer-events: none;
  background: radial-gradient(14px 38px at 8% 0, var(--blood-deep) 98%, transparent), radial-gradient(10px 26px at 22% 0, var(--blood-deep) 98%, transparent), radial-gradient(16px 52px at 41% 0, var(--blood-deep) 98%, transparent), radial-gradient(9px 22px at 58% 0, var(--blood-deep) 98%, transparent), radial-gradient(13px 44px at 76% 0, var(--blood-deep) 98%, transparent), radial-gradient(11px 30px at 93% 0, var(--blood-deep) 98%, transparent), linear-gradient(var(--blood-deep), var(--blood-deep)) top / 100% 10px no-repeat; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { pointer-events: auto; }
.top { position: absolute; top: calc(10px + var(--safe-t)); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px 8px; backdrop-filter: blur(10px); max-width: 60vw; }
.neon-sm { display: block; font-family: "Neonderthaw", cursive; font-size: 34px; line-height: 1; color: #fff4f5; text-shadow: 0 0 6px var(--blood), 0 0 18px var(--blood); }
.brand small { color: var(--dim); font-size: 12px; }
.top-r { display: flex; gap: 8px; align-items: center; }
.pill { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 13px; font-variant-numeric: tabular-nums; backdrop-filter: blur(10px); white-space: nowrap; }
.dock { position: absolute; left: 0; right: 0; bottom: calc(12px + var(--safe-b)); display: flex; gap: 10px; align-items: center; padding: 0 12px; pointer-events: none; }
.dock > * { pointer-events: auto; }
.chips { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(10px); border-radius: 999px; padding: 10px 14px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: border-color 0.2s, background 0.2s; }
.chips button:hover { border-color: rgba(255, 122, 26, 0.7); background: var(--panel-2); }
.chips button.locked { color: var(--dim); }
.chips button.on { border-color: var(--pumpkin); background: rgba(255, 122, 26, 0.2); color: #fff; }
.chips button.unlocked { border-color: var(--blood); box-shadow: 0 0 18px rgba(255, 31, 61, 0.45); }
.dock .cta { flex: none; }

#hotspots { position: absolute; inset: 0; pointer-events: none; }
.hs { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; transition: opacity 0.3s; }
.hs b { background: var(--panel); border: 1px solid rgba(255, 122, 26, 0.6); border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; backdrop-filter: blur(8px); }
.hs i { width: 10px; height: 10px; border-radius: 50%; background: var(--pumpkin); box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.25), 0 0 16px var(--pumpkin); animation: ping 2s infinite; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.25), 0 0 16px var(--pumpkin); } 50% { box-shadow: 0 0 0 9px rgba(255, 122, 26, 0), 0 0 22px var(--pumpkin); } }
.hs.hide { opacity: 0; pointer-events: none; }

.np { position: absolute; right: 12px; top: calc(66px + var(--safe-t)); width: 230px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; backdrop-filter: blur(12px); display: grid; gap: 6px; }
#ytWrap { width: 210px; height: 118px; border-radius: 8px; overflow: hidden; background: #000; }
#ytWrap iframe { width: 100%; height: 100%; display: block; }
.np-txt { display: grid; } .np-txt span { color: var(--dim); font-size: 12px; }
.np .link { text-align: left; padding: 2px 0; font-size: 13px; }

/* ---------- cut scenes ---------- */
#cine { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
#cine .bar { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height 0.6s cubic-bezier(.2, .8, .2, 1); }
#cine .bar.t { top: 0; } #cine .bar.b { bottom: 0; }
#cine.on .bar { height: 11vh; }
.cine-title { position: absolute; left: 0; right: 0; bottom: calc(11vh + 18px); text-align: center; opacity: 0; transform: translateY(12px); transition: opacity 0.5s, transform 0.5s; padding: 0 16px; }
#cine.on .cine-title { opacity: 1; transform: none; transition-delay: 0.35s; }
.cine-title h2 { font-family: "Creepster", cursive; font-weight: 400; font-size: clamp(40px, 9vw, 96px); margin: 0; letter-spacing: 0.06em; color: #fff; text-shadow: 0 0 20px rgba(255, 31, 61, 0.9), 0 4px 0 #3a0008; }
.cine-title p { margin: 4px 0 0; font-size: clamp(13px, 2.4vw, 17px); color: var(--bone); text-shadow: 0 2px 8px #000; }
#counter { position: absolute; top: 18vh; left: 0; right: 0; text-align: center; font-family: "Creepster", cursive; font-size: clamp(60px, 16vw, 160px); color: #fff; text-shadow: 0 0 30px var(--blood); opacity: 0; transition: opacity 0.2s; }
#counter.on { opacity: 1; }
#skip { position: absolute; right: 16px; bottom: calc(11vh + 14px); pointer-events: auto; opacity: 0; transition: opacity 0.4s; color: #fff; }
#cine.on #skip, #cine.intro #skip { opacity: 0.85; }
#cine.intro .bar { height: 7vh; }

/* ---------- menu ---------- */
#menu { position: fixed; inset: 0; z-index: 15; background: rgba(4, 2, 8, 0.45); backdrop-filter: blur(2px); }
.sheet { position: absolute; right: 0; top: 0; bottom: 0; width: min(460px, 100%); background: linear-gradient(180deg, rgba(20, 10, 28, 0.97), rgba(10, 5, 14, 0.98)); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: slidein 0.35s cubic-bezier(.2, .8, .2, 1); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: calc(12px + var(--safe-t)) 12px 10px; border-bottom: 1px solid var(--line); }
.tabs { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; background: none; border: 1px solid transparent; border-radius: 999px; padding: 8px 12px; color: var(--dim); font-weight: 500; white-space: nowrap; }
.tabs button.on { color: #fff; border-color: rgba(255, 31, 61, 0.6); background: rgba(255, 31, 61, 0.12); }
.close { flex: none; }
.pages { flex: 1; overflow-y: auto; padding: 18px 20px calc(30px + var(--safe-b)); }
.page { display: none; } .page.on { display: block; animation: fade 0.3s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.display { font-family: "Creepster", cursive; font-weight: 400; font-size: 42px; letter-spacing: 0.04em; margin: 4px 0 6px; color: #fff; text-shadow: 0 0 18px rgba(255, 31, 61, 0.6); }
.display.red { color: var(--blood); }
.lede { color: var(--dim); font-size: 16px; margin: 0 0 18px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--pumpkin); margin: 26px 0 10px; }
.facts { display: grid; gap: 10px; margin-bottom: 18px; }
.facts > div { display: grid; grid-template-columns: 84px 1fr; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.facts b { color: var(--pumpkin); font-weight: 600; font-size: 13px; grid-row: span 2; }
.row { display: flex; gap: 14px; flex-wrap: wrap; } .row.gap { gap: 10px; }
.grid-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.grid-list li { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.fine { color: var(--dim); font-size: 13px; margin-top: 18px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 500; }
label small { color: var(--dim); font-weight: 400; }
input { font: inherit; color: var(--bone); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; outline: none; }
input:focus { border-color: var(--pumpkin); box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18); }
.seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg legend { font-weight: 500; margin-bottom: 6px; }
.seg label { position: relative; display: block; text-align: center; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--blood); background: rgba(255, 31, 61, 0.15); }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--dim); }
.check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--blood); }
.form-msg { min-height: 1.4em; margin: 0; color: var(--toxic); }
.form-msg.err { color: var(--blood); }
.rules { padding-left: 20px; display: grid; gap: 10px; } .rules li::marker { color: var(--blood); font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid rgba(255, 31, 61, 0.4); }
.timeline li { display: grid; grid-template-columns: 60px 1fr; gap: 10px; padding: 10px 0 10px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--blood); box-shadow: 0 0 12px var(--blood); }
.timeline time { font-weight: 700; color: var(--pumpkin); font-variant-numeric: tabular-nums; }
.park { list-style: none; padding: 0; display: grid; gap: 10px; }
.park li { display: grid; gap: 4px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); }
.park li.good { border-color: rgba(93, 255, 58, 0.5); } .park li.good b { color: var(--toxic); }
.park li.limited { border-color: rgba(255, 176, 32, 0.5); } .park li.limited b { color: #ffb020; }
.notes { padding-left: 18px; color: var(--dim); display: grid; gap: 6px; margin-bottom: 18px; }
.guests { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.guests li { padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.guests li small { display: block; color: var(--dim); }
.code-form { grid-template-columns: 1fr auto; align-items: center; }
.code-form input { text-transform: uppercase; letter-spacing: 0.2em; }
.after { border: 1px solid rgba(255, 31, 61, 0.5); border-radius: var(--r); padding: 18px; background: radial-gradient(ellipse at top, rgba(255, 0, 30, 0.18), transparent 70%); box-shadow: 0 0 40px rgba(255, 0, 30, 0.2) inset; }
.after .kicker { font-family: "Permanent Marker", cursive; color: var(--blood); }
.after ul { padding-left: 18px; display: grid; gap: 6px; }

#toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; opacity: 0; transition: opacity 0.3s, transform 0.3s; z-index: 30; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

body.afterdark .neon-sm, body.afterdark .neon-title { text-shadow: 0 0 6px #fff, 0 0 18px #ff0018, 0 0 50px #ff0018; }

@media (max-width: 640px) {
  .brand { padding: 4px 10px 6px; }
  .neon-sm { font-size: 26px; }
  .brand small { font-size: 11px; }
  #countdown { display: none; }
  .dock { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .dock .cta { width: 100%; }
  .np { left: 12px; right: 12px; width: auto; top: calc(62px + var(--safe-t)); grid-template-columns: 120px 1fr; }
  #ytWrap { width: 120px; height: 68px; grid-row: span 3; }
  .sheet { width: 100%; border-left: 0; }
  .facts > div { grid-template-columns: 1fr; } .facts b { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) { .neon-title { animation: none; } #enter.ready { animation: none; } }
