:root {
  --ink-950: #050b16;
  --ink-900: #0c1930;
  --ink-800: #142a4d;
  --ink-700: #1c3a66;
  --silver: #eef2f8;
  --mist: #92a2bd;
  --cyan: #48d7ff;
  --gold: #d9b568;
  --danger: #ff6b6b;
  --ok: #5ee6a8;
  --font-display: 'Marcellus', 'Iowan Old Style', georgia, serif;
  --font-tech: 'Orbitron', 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
html { scroll-behavior: smooth; font-size: 115%; } /* site-wide +15%: every rem scales with it */
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(72,215,255,0.10), transparent 60%),
    repeating-linear-gradient(100deg, var(--ink-950) 0 140px, var(--ink-900) 140px 280px);
  background-attachment: fixed;
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.eyebrow {
  font-family: var(--font-tech);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.divider { display: flex; align-items: center; gap: 14px; margin: 28px 0; }
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-700), transparent);
}
.divider .gem {
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(217,181,104,0.7);
  flex-shrink: 0;
}

/* ===== reduced motion: comprehensive kill-switch ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .ambient { display: none !important; }
}

/* ===== scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* ===== ambient background particles ===== */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient span {
  position: absolute; bottom: -12px; width: 3px; height: 3px; border-radius: 50%;
  background: var(--cyan); opacity: 0; box-shadow: 0 0 6px rgba(72,215,255,0.9);
  animation: drift linear infinite;
}
@keyframes drift {
  0% { transform: translate(0,0); opacity: 0; }
  8% { opacity: 0.55; }
  92% { opacity: 0.35; }
  100% { transform: translate(var(--dx, 20px), -108vh); opacity: 0; }
}

/* ===== level-select side nav ===== */
.level-nav { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 15px; }
.level-nav button {
  width: 10px; height: 10px; border-radius: 50%; padding: 0; cursor: pointer;
  background: transparent; border: 1.5px solid var(--ink-700); position: relative;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.level-nav button:hover { transform: scale(1.3); border-color: var(--cyan); }
.level-nav button::after {
  content: attr(data-label); position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-tech); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mist); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  background: var(--ink-900); padding: 4px 10px; border-radius: 6px; border: 1px solid var(--ink-700);
}
.level-nav button:hover::after, .level-nav button:focus-visible::after { opacity: 1; }
.level-nav button.active { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(72,215,255,0.75); }
@media (max-width: 900px) { .level-nav { display: none; } }

/* ===== envelope gate ===== */
.gate {
  position: fixed; inset: 0;
  z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, rgba(72,215,255,0.12), transparent 60%),
    repeating-linear-gradient(100deg, var(--ink-950) 0 140px, var(--ink-900) 140px 280px);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.gate[data-open="true"] { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-envelope {
  width: min(280px, 70vw);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: none; border: none; padding: 0;
}
.gate-envelope svg { width: 100%; height: auto; overflow: visible; display: block; }
/* 2D-only on purpose: a 3D rotateX+perspective flip on an SVG <g> renders
   inconsistently (warped/distorted) on several Android browser engines --
   this lift-and-fade reads as the flap opening without touching 3D transforms. */
.gate-flap { transform-origin: 50% 0%; transform-box: fill-box; transition: transform 0.6s cubic-bezier(.4,0,.2,1), opacity 0.5s ease; }
.gate[data-anim="opening"] .gate-flap { transform: translateY(-34px) scaleY(0.35); opacity: 0; }
.gate-seal { transform-origin: center; transform-box: fill-box; transition: transform 0.4s ease, opacity 0.4s ease; }
.gate[data-anim="opening"] .gate-seal { transform: scale(0.4); opacity: 0; }
.gate-card { transition: transform 0.6s ease 0.15s, opacity 0.6s ease 0.15s; opacity: 0; transform: translateY(8px); transform-box: fill-box; }
.gate[data-anim="opening"] .gate-card { opacity: 1; transform: translateY(-6px); }
.gate-hint {
  font-family: var(--font-tech);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  text-align: center;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ===== layout ===== */
main#site { display: block; position: relative; z-index: 1; }
.site { max-width: 830px; margin: 0 auto; padding: 0 24px 100px; }
section { padding: 88px 0; border-bottom: 1px solid rgba(148,166,197,0.12); }
section:last-of-type { border-bottom: none; }
.section-inner { display: flex; flex-direction: column; gap: 20px; }
.center { text-align: center; align-items: center; }

/* ===== hero ===== */
.hero { padding-top: 56px; text-align: center; }
.hero .name-serif {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.08;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  background: linear-gradient(180deg, #ffffff 0%, var(--silver) 45%, #aeb9cc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-transform: uppercase;
}
.hero .level-tech {
  font-family: var(--font-tech);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(1.5rem, 6vw, 2.4rem);
  color: var(--silver);
  margin-top: 18px;
}
.level-tech-visual { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.level-tech-word { display: inline-block; }
/* letters always show their real character -- only opacity/blur/position
   animate, so this can never render as garbled/wrong-looking text */
.lt-char {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(6px);
  transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s ease;
}
.lt-char.is-in { opacity: 1; filter: blur(0); transform: translateY(0); }
.hero .level-tech .lock-icon { color: var(--gold); width: 0.85em; height: 0.85em; flex-shrink: 0; }
.hero .tagline { color: var(--mist); max-width: 44ch; margin: 22px auto 0; font-size: 1.05rem; }
.scroll-cue { margin-top: 30px; color: var(--mist); animation: bob 1.9s ease-in-out infinite; }
.scroll-cue svg { width: 22px; height: 22px; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: 0.45; } 50% { transform: translateY(9px); opacity: 1; } }

/* ===== countdown ===== */
.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.countdown-tile {
  background: linear-gradient(180deg, var(--ink-900), var(--ink-950));
  border: 1px solid var(--ink-700);
  border-radius: 10px;
  padding: 18px 6px;
  text-align: center;
}
.countdown-num {
  font-family: var(--font-tech);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(72,215,255,0.5);
  display: inline-block;
}
.countdown-num.tick { animation: tick-pulse 0.35s ease; }
@keyframes tick-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.1); text-shadow: 0 0 26px rgba(72,215,255,0.9); } 100% { transform: scale(1); } }
.countdown-label {
  margin-top: 6px;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}
.countdown-date { text-align: center; font-family: var(--font-tech); letter-spacing: 0.06em; color: var(--silver); font-size: 1.02rem; }
.countdown-note { text-align: center; color: var(--mist); font-size: 0.85rem; font-style: italic; }

/* ===== panel (bio / message / itinerary / location) ===== */
.panel {
  background: linear-gradient(180deg, rgba(20,42,77,0.55), rgba(12,25,48,0.55));
  border: 1px solid var(--ink-700);
  border-radius: 14px;
  padding: 28px;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.panel:hover { border-color: var(--cyan); box-shadow: 0 16px 44px rgba(72,215,255,0.14); }
.panel::before, .panel::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 2px solid var(--gold); opacity: 0.75; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.tilt-panel { transform-style: preserve-3d; transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease; will-change: transform; }

.h2 {
  font-family: var(--font-tech);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--silver);
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 18px; }
.stat { border-left: 2px solid var(--cyan); padding-left: 12px; transition: transform 0.25s ease, border-left-color 0.25s ease; }
.stat:hover { transform: translateY(-4px); border-left-color: var(--gold); }
.stat:hover .stat-v { color: var(--cyan); }
.stat-k { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist); }
.stat-v { font-family: var(--font-tech); font-size: 1.02rem; color: var(--silver); margin-top: 4px; transition: color 0.25s ease; }
.stat-v.pending { color: var(--mist); font-style: italic; font-weight: 400; border-bottom: 1px dashed var(--ink-700); padding-bottom: 2px; }
.placeholder-tag {
  display: inline-block; margin-top: 16px; font-size: 0.7rem; color: var(--gold);
  border: 1px dashed var(--gold); border-radius: 999px; padding: 3px 10px; letter-spacing: 0.03em;
}

/* An "editor-note" is instructions/example copy for whoever is filling in the
   real content -- it must read as a to-do for the editor, never as finished
   prose a guest could mistake for the family's actual words. */
.editor-note {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 18px; padding: 16px; border-radius: 10px;
  border: 1px dashed var(--gold);
  background: rgba(217,181,104,0.06);
}
.editor-note-icon { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.editor-note-label {
  font-family: var(--font-tech); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.editor-note-body { color: var(--mist); font-style: italic; line-height: 1.6; }

.message-body { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.7; color: var(--silver); }
.message-sign { margin-top: 16px; color: var(--gold); font-family: var(--font-tech); font-size: 0.82rem; letter-spacing: 0.06em; }

.keepsake { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.keepsake-frame {
  width: min(100%, 300px);
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ink-700);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.keepsake-frame:hover { transform: translateY(-6px) scale(1.015); box-shadow: 0 28px 70px rgba(72,215,255,0.18); }
.keepsake-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.keepsake-cap { color: var(--mist); font-size: 0.9rem; text-align: center; max-width: 40ch; }

.add-to-calendar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.cal-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-tech); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; text-decoration: none; color: var(--silver);
  border: 1px solid var(--ink-700); border-radius: 999px; padding: 10px 16px;
  background: transparent; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cal-btn:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.cal-icon { width: 16px; height: 16px; flex-shrink: 0; }
.cal-note { color: var(--mist); font-size: 0.8rem; font-style: italic; text-align: center; }

.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 80px 20px 1fr; column-gap: 14px; padding: 14px 0; border-radius: 10px; transition: transform 0.25s ease; }
.tl-item:hover { transform: translateX(8px); }
.tl-time { font-family: var(--font-tech); color: var(--cyan); font-size: 0.82rem; text-align: right; padding-top: 2px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(217,181,104,0.6); flex-shrink: 0; margin-top: 4px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.tl-item:hover .tl-dot { transform: scale(1.6); box-shadow: 0 0 16px rgba(217,181,104,1); }
.tl-line { flex: 1; width: 1px; background: var(--ink-700); margin-top: 4px; }
.tl-item:last-child .tl-line { display: none; }
.tl-title { font-weight: 700; color: var(--silver); }
.tl-desc { color: var(--mist); font-size: 0.9rem; margin-top: 2px; }

.location-row { display: flex; gap: 16px; align-items: flex-start; }
.pin-badge {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(72,215,255,0.1); border: 1px solid var(--cyan);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--cyan);
}
.pin-badge svg { width: 22px; height: 22px; }
.location-name { font-family: var(--font-tech); font-size: 1.1rem; color: var(--silver); }
.location-addr { color: var(--mist); margin-top: 6px; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-tile {
  aspect-ratio: 1; border-radius: 10px;
  border: 1px dashed var(--ink-700);
  background: linear-gradient(160deg, rgba(20,42,77,0.5), rgba(5,11,22,0.5));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--mist); font-size: 0.66rem; text-align: center; padding: 8px;
  text-transform: uppercase; letter-spacing: 0.03em;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.gallery-tile:hover { transform: translateY(-6px) scale(1.04); border-color: var(--cyan); border-style: solid; }
.gallery-tile svg { width: 26px; height: 26px; opacity: 0.75; transition: transform 0.3s ease, color 0.3s ease; }
.gallery-tile:hover svg { transform: scale(1.15); color: var(--cyan); }

/* ===== form ===== */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mist); }
.field input[type="text"], .field input[type="password"], .field textarea {
  background: var(--ink-950); border: 1px solid var(--ink-700); border-radius: 8px;
  padding: 12px 14px; color: var(--silver); font-size: 1rem; width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(72,215,255,0.15); }
.field textarea { resize: vertical; min-height: 72px; font-family: var(--font-body); }

.pill-toggle { position: relative; display: flex; gap: 10px; }
.pill-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pill-toggle label {
  flex: 1; text-align: center; padding: 12px; border-radius: 999px;
  border: 1px solid var(--ink-700); cursor: pointer; font-weight: 700;
  text-transform: none; letter-spacing: 0; color: var(--mist);
  transition: all 0.15s ease;
}
.pill-toggle label:hover { border-color: var(--cyan); color: var(--silver); }
.pill-toggle input:checked + label { border-color: var(--cyan); color: var(--ink-950); background: var(--cyan); box-shadow: 0 0 20px rgba(72,215,255,0.4); }
.pill-toggle input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-tech); font-weight: 700; letter-spacing: 0.05em;
  border-radius: 999px; padding: 14px 26px; cursor: pointer; border: 1px solid transparent;
  font-size: 0.88rem; text-transform: uppercase; background: transparent;
}
.btn-primary { position: relative; overflow: hidden; background: var(--cyan); color: var(--ink-950); box-shadow: 0 0 26px rgba(72,215,255,0.4); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-130%); transition: transform 0.6s ease; pointer-events: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(72,215,255,0.5); }
.btn-primary:hover::before { transform: translateX(130%); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost { background: transparent; border-color: var(--ink-700); color: var(--silver); transition: border-color 0.2s ease, color 0.2s ease; }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); padding: 7px 14px; font-size: 0.72rem; }
.btn-danger:hover { background: rgba(255,107,107,0.1); }

.feedback { position: relative; border-radius: 10px; padding: 13px 16px; font-size: 0.9rem; display: none; align-items: center; gap: 10px; overflow: visible; }
.feedback[data-show="true"] { display: flex; }
.feedback[data-kind="ok"] { background: rgba(94,230,168,0.1); border: 1px solid var(--ok); color: var(--ok); }
.feedback[data-kind="error"] { background: rgba(255,107,107,0.1); border: 1px solid var(--danger); color: var(--danger); }
.feedback[data-kind="pending"] { background: rgba(148,166,197,0.1); border: 1px solid var(--ink-700); color: var(--mist); }
.feedback .badge-pop { width: 0; opacity: 0; flex-shrink: 0; }
.feedback[data-kind="ok"] .badge-pop { width: 22px; height: 22px; opacity: 1; color: var(--ok); animation: pop-badge 0.5s cubic-bezier(.3,1.6,.4,1); }
@keyframes pop-badge { 0% { transform: scale(0) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.15) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }

/* ===== celebration burst (fires once on a successful RSVP) ===== */
.burst { position: absolute; left: 24px; top: 50%; width: 0; height: 0; pointer-events: none; }
.burst-particle {
  position: absolute; left: 0; top: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); opacity: 0;
  animation: burst-fly 0.9s ease-out forwards;
  animation-delay: var(--delay, 0ms);
}
.burst-particle.gold { background: var(--gold); }
.burst-particle.ok { background: var(--ok); }
@keyframes burst-fly {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1); opacity: 0; }
}

footer { padding: 56px 0 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-note { color: var(--mist); font-size: 0.85rem; }
.footer-links { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-link { background: none; border: none; color: var(--mist); font-size: 0.8rem; text-decoration: underline; cursor: pointer; letter-spacing: 0.02em; padding: 4px; }
.footer-link:hover { color: var(--cyan); }

/* ===== modal ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2,6,14,0.75); backdrop-filter: blur(2px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { max-width: 360px; width: 100%; }
.modal-box .panel { padding: 26px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn { flex: 1; }

/* ===== dashboard ===== */
.dashboard { position: fixed; inset: 0; z-index: 55; overflow-y: auto; background: var(--ink-950); }
.dashboard-inner { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; display: flex; flex-direction: column; gap: 26px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat-tile { background: var(--ink-900); border: 1px solid var(--ink-700); border-radius: 12px; padding: 18px; text-align: center; transition: border-color 0.25s ease, transform 0.25s ease; }
.stat-tile:hover { border-color: var(--cyan); transform: translateY(-3px); }
.stat-tile .num { font-family: var(--font-tech); font-size: 2rem; color: var(--ok); font-variant-numeric: tabular-nums; }
.stat-tile.declined .num { color: var(--danger); }
.stat-tile.total .num { color: var(--gold); }
.stat-tile .lbl { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); margin-top: 4px; }

.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; border: 1px solid var(--ink-700); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; font-size: 0.86rem; border-bottom: 1px solid rgba(148,166,197,0.12); }
th { font-family: var(--font-tech); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist); background: var(--ink-900); }
tbody tr { transition: background 0.2s ease; }
tbody tr:hover { background: rgba(72,215,255,0.06); }
tbody tr:last-child td { border-bottom: none; }
.rsvp-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.rsvp-pill.yes { background: rgba(94,230,168,0.15); color: var(--ok); }
.rsvp-pill.no { background: rgba(255,107,107,0.15); color: var(--danger); }
.empty-state { text-align: center; color: var(--mist); padding: 40px 16px; font-size: 0.9rem; }

.passcode-settings { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 14px; }
.passcode-settings .field { flex: 1; min-width: 180px; }

@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .tl-item { grid-template-columns: 62px 16px 1fr; }
  section { padding: 60px 0; }
  .countdown-grid { gap: 8px; }
  .countdown-tile { padding: 14px 4px; }
}

/* gallery: staggered two-column editorial layout */
.gallery-eyebrow { text-align: center; }
.gallery-grid.gallery-editorial { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; width: 100%; }
.gallery-col { flex: 1 1 0; width: 50%; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery-col-offset { margin-top: 44px; }
.gallery-photo {
  position: relative; margin: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--ink-700); background: var(--ink-900);
  box-shadow: 0 14px 38px rgba(0,0,0,0.4);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.gallery-photo { width: 100%; }
.gallery-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.gallery-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px;
  background: linear-gradient(to top, rgba(5,11,22,0.85), rgba(5,11,22,0));
  color: var(--silver); font-family: var(--font-tech); font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.gallery-photo:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 20px 48px rgba(72,215,255,0.16); }
.gp-portrait { aspect-ratio: 3 / 4; }
.gp-friends  { aspect-ratio: 1 / 1; }
.gp-friends img { object-position: 40% 42%; }
.gp-family   { aspect-ratio: 4 / 5; }
.gp-family img { object-position: 50% 30%; }
.gp-trio     { aspect-ratio: 3 / 2; }
.gp-trio img { object-position: 50% 54%; }

/* gamer chaser light: a bright comet of light circling each photo's frame */
@property --chase { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.gallery-photo::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: inherit; padding: 3px;
  background: conic-gradient(from var(--chase),
    rgba(72,215,255,0) 0deg, rgba(72,215,255,0) 215deg,
    #48d7ff 285deg, #ffffff 330deg, #d9b568 345deg, rgba(217,181,104,0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 6px rgba(72,215,255,0.9));
  animation: chase-spin 3.2s linear infinite;
}
.gp-family::before { animation-delay: -0.8s; }
.gp-friends::before { animation-delay: -1.6s; }
.gp-trio::before { animation-delay: -2.4s; }
@keyframes chase-spin { to { --chase: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .gallery-photo::before { animation: none; --chase: 250deg; }
}

/* gamified venue map */
.game-map-frame { position: relative; margin-top: 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--ink-700); box-shadow: 0 0 0 1px rgba(72,215,255,0.12), 0 14px 40px rgba(0,0,0,0.45); }
.game-map { height: 280px; width: 100%; background: var(--ink-950); }
.game-map .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) saturate(1.3) brightness(0.9) contrast(0.95); }
.game-map-frame::after { content: ''; position: absolute; inset: 0; z-index: 500; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(72,215,255,0.05) 0 1px, transparent 1px 4px); mix-blend-mode: screen; }
.gm-hud { position: absolute; z-index: 600; font-family: var(--font-tech); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--cyan);
  background: rgba(5,11,22,0.78); padding: 4px 8px; border: 1px solid rgba(72,215,255,0.35); border-radius: 4px; pointer-events: none; }
.gm-hud-tl { top: 10px; left: 10px; }
.gm-hud-br { bottom: 10px; left: 10px; color: var(--gold); border-color: rgba(217,181,104,0.4); }
.gm-corner { position: absolute; z-index: 600; width: 16px; height: 16px; pointer-events: none; border: 2px solid var(--cyan); }
.gm-c1 { top: 6px; left: 6px; border-right: 0; border-bottom: 0; } .gm-c2 { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.gm-c3 { bottom: 6px; left: 6px; border-right: 0; border-top: 0; } .gm-c4 { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.gm-pin-wrap { background: none; border: 0; }
.gm-pin { position: relative; width: 64px; height: 64px; }
.gm-pin svg { position: absolute; left: 20px; top: 8px; width: 24px; height: 32px; filter: drop-shadow(0 0 8px rgba(72,215,255,0.95)); animation: gm-bob 1.6s ease-in-out infinite; }
.gm-ring { position: absolute; left: 12px; top: 28px; width: 40px; height: 40px; border: 2px solid var(--cyan); border-radius: 50%; transform: scale(0.2) scaleY(0.5); opacity: 0; animation: gm-ping 2.2s ease-out infinite; }
.gm-ring-2 { animation-delay: 1.1s; border-color: var(--gold); }
@keyframes gm-ping { 0% { transform: scale(0.2) scaleY(0.5); opacity: 0.9; } 100% { transform: scale(1.5) scaleY(0.5); opacity: 0; } }
@keyframes gm-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.gm-open { display: inline-block; margin-top: 14px; font-family: var(--font-tech); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cyan); text-decoration: none; padding: 10px 14px; border: 1px solid var(--cyan); border-radius: 8px; transition: background 0.2s ease, transform 0.2s ease; }
.gm-open:hover { background: rgba(72,215,255,0.12); transform: translateY(-2px); }
.game-map .leaflet-control-attribution { background: rgba(5,11,22,0.7); color: var(--mist); font-size: 9px; }
.game-map .leaflet-control-attribution a { color: var(--mist); }
@media (prefers-reduced-motion: reduce) { .gm-pin svg, .gm-ring { animation: none; } .gm-ring { opacity: 0.6; transform: scaleY(0.5); } }

/* "dato curioso" quest card */
.quest { margin-top: 22px; padding: 18px; border-radius: 12px; border: 1px solid var(--ink-700);
  background: linear-gradient(160deg, rgba(20,42,77,0.55), rgba(5,11,22,0.55)); position: relative; overflow: hidden; }
.quest::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, var(--cyan), var(--gold)); }
.quest-tag { display: inline-block; font-family: var(--font-tech); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(217,181,104,0.45); border-radius: 4px; padding: 3px 8px; }
.quest-title { font-family: var(--font-tech); font-size: 1.05rem; color: var(--silver); margin: 10px 0 0; line-height: 1.35; }
.quest-lead { color: var(--mist); line-height: 1.65; margin: 10px 0 0; }
.quest-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quest-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(148,166,197,0.16); background: rgba(5,11,22,0.45); transition: transform 0.25s ease, border-color 0.25s ease; }
.quest-item:hover { transform: translateX(4px); border-color: var(--cyan); }
.quest-ico { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--cyan);
  background: rgba(72,215,255,0.1); border: 1px solid rgba(72,215,255,0.3); }
.quest-ico svg { width: 22px; height: 22px; }
.quest-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.quest-txt strong { font-family: var(--font-tech); font-size: 0.82rem; font-weight: 600; color: var(--silver); line-height: 1.3; }
.quest-txt small { color: var(--mist); font-size: 0.78rem; line-height: 1.4; }
.quest-state { flex: 0 0 auto; font-family: var(--font-tech); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan);
  border: 1px solid rgba(72,215,255,0.4); border-radius: 999px; padding: 3px 8px; }
.quest-state-gold { color: var(--gold); border-color: rgba(217,181,104,0.5); }
.quest-boss { border-color: rgba(217,181,104,0.4); background: linear-gradient(90deg, rgba(217,181,104,0.1), rgba(5,11,22,0.45)); }
.quest-boss .quest-ico { color: var(--gold); background: rgba(217,181,104,0.12); border-color: rgba(217,181,104,0.45); }
.quest-xp { margin-top: 16px; height: 8px; border-radius: 999px; background: rgba(148,166,197,0.15); overflow: hidden; }
.quest-xp-bar { display: block; height: 100%; width: 62%; border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #fff, var(--gold)); background-size: 200% 100%; animation: quest-shine 3s linear infinite; }
@keyframes quest-shine { to { background-position: -200% 0; } }
.quest-foot { margin-top: 10px; font-family: var(--font-tech); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); }
@media (prefers-reduced-motion: reduce) { .quest-xp-bar { animation: none; } }
@media (max-width: 420px) { .quest-state { display: none; } }

/* +15% pass: fixed-px pieces follow the rem scale so nothing looks left behind */
.keepsake-frame { width: min(100%, 345px); }
.game-map { height: 322px; }
.pin-badge { width: 53px; height: 53px; }
.pin-badge svg { width: 25px; height: 25px; }
.quest-ico { width: 44px; height: 44px; }
.quest-ico svg { width: 25px; height: 25px; }
.cal-icon { width: 18px; height: 18px; }
.gp-friends img, .gp-family img, .gp-trio img { will-change: auto; }
