/* ============================================================
   Majoratu' lu' Ștefănescu — mobile-first UI
   Inspired by Untitled UI spacing / type / controls
   ============================================================ */

:root {
  /* Brand */
  --bg: #050b14;
  --bg-elevated: #0b1726;
  --aqua: #3de0ff;
  --electric: #5b8cff;
  --neon: #7dffc8;
  --white: #f5faff;
  --muted: rgba(245, 250, 255, 0.64);
  --muted-2: rgba(245, 250, 255, 0.45);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(61, 224, 255, 0.2);
  --danger: #ff6b8a;
  --ok: #7dffc8;
  --ring: rgba(61, 224, 255, 0.28);

  /* Untitled-like spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --page-x: max(1rem, env(safe-area-inset-left));
  --page-x-r: max(1rem, env(safe-area-inset-right));
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);

  --font-display: "Syne", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;

  --container: 36rem; /* ~576px */
  --touch: 3rem; /* 48px */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
canvas {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: var(--aqua);
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Background ---------- */
#water-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 45% at 50% 110%, rgba(61, 224, 255, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 35% at 15% 15%, rgba(91, 140, 255, 0.1), transparent 50%),
    linear-gradient(180deg, #050b14 0%, #071525 50%, #0a1c30 100%);
}

#water-bg canvas {
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.22;
  pointer-events: none;
}

.glow-orb.a {
  width: 220px;
  height: 220px;
  background: var(--aqua);
  top: 8%;
  left: -15%;
}

.glow-orb.b {
  width: 180px;
  height: 180px;
  background: var(--electric);
  bottom: 18%;
  right: -12%;
}

@media (min-width: 768px) {
  .glow-orb {
    opacity: 0.32;
    filter: blur(60px);
    animation: floatOrb 14s ease-in-out infinite;
    pointer-events: auto;
  }
  .glow-orb.b {
    animation-delay: -5s;
  }
  #water-bg canvas {
    opacity: 0.55;
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(16px, -24px);
  }
}

/* ---------- Layout ---------- */
#app {
  position: relative;
  z-index: 1;
  width: 100%;
}

#main-content {
  display: none;
  width: 100%;
}

body.unlocked #main-content {
  display: block;
}

.section {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-12) var(--page-x) var(--space-12) var(--page-x-r);
}

.section.full {
  max-width: none;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 0;
}

.eyebrow {
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aqua);
  font-weight: 650;
  margin-bottom: var(--space-3);
}

h1,
h2,
.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  max-width: 100%;
}

h1 {
  font-size: clamp(1.6rem, 1.1rem + 2.8vw, 2.75rem);
}

h2 {
  font-size: clamp(1.35rem, 1rem + 2vw, 2rem);
}

.lede {
  color: var(--muted);
  font-size: clamp(0.95rem, 3.6vw, 1.0625rem);
  line-height: 1.6;
  margin-top: var(--space-3);
  text-wrap: pretty;
}

.muted {
  color: var(--muted);
}

/* ---------- Surfaces ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

.card {
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  width: 100%;
}

.card-big {
  padding: var(--space-6) var(--space-5);
  text-align: center;
}

.mega {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.4rem + 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: var(--space-2) 0;
  overflow-wrap: normal;
  word-break: normal;
}

.mega.ok {
  color: var(--ok);
}
.mega.no {
  color: var(--danger);
}

/* ---------- Buttons (Untitled-like) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--touch);
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  white-space: normal;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--aqua), var(--electric));
  color: #041018;
  box-shadow: 0 8px 24px rgba(61, 224, 255, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.btn-danger {
  background: rgba(255, 107, 138, 0.12);
  border: 1px solid rgba(255, 107, 138, 0.35);
  color: #ffb3c3;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-5);
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (min-width: 480px) {
  .btn-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Age gate ---------- */
#age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--space-4) + var(--safe-t)) var(--page-x)
    calc(var(--space-4) + var(--safe-b)) var(--page-x-r);
  background: rgba(5, 11, 20, 0.94);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #age-gate {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
}

#age-gate.hidden {
  display: none;
}

#age-gate .panel {
  width: min(100%, 26rem);
  margin: auto;
  padding: var(--space-6) var(--space-5);
  text-align: center;
  overflow: hidden;
}

#age-gate h1:not(.minor-title) {
  font-size: clamp(1.6rem, 1.2rem + 2.5vw, 2.25rem);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

#age-gate .minor-title {
  font-size: clamp(1.15rem, 1rem + 1.5vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow-wrap: normal;
  word-break: normal;
  max-width: 100%;
  margin-bottom: var(--space-3);
}

#age-gate .lede {
  font-size: 0.95rem;
}

#age-gate .minor-msg {
  display: none;
}

#age-gate.is-minor .ask {
  display: none;
}

#age-gate.is-minor .minor-msg {
  display: block;
}

#age-gate .btn-row.two {
  grid-template-columns: 1fr;
}

@media (min-width: 420px) {
  #age-gate .btn-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Sound / banner ---------- */
#sound-toggle {
  position: fixed;
  top: calc(0.65rem + var(--safe-t));
  right: max(0.65rem, env(safe-area-inset-right));
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 1.05rem;
  display: none;
  place-items: center;
}

body.unlocked #sound-toggle {
  display: grid;
}

#returning-banner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: var(--space-3) var(--space-4);
  text-align: center;
  background: rgba(61, 224, 255, 0.12);
  border-bottom: 1px solid var(--glass-border);
}

#returning-banner.show {
  display: block;
}

#returning-banner strong {
  display: block;
  letter-spacing: 0.05em;
  font-size: 0.8125rem;
}

#returning-banner span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Hero ---------- */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: calc(var(--space-10) + var(--safe-t)) var(--page-x)
    calc(var(--space-10) + var(--safe-b)) var(--page-x-r);
}

.breaking {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #041018;
  background: var(--aqua);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  margin-bottom: var(--space-4);
  opacity: 0;
  transform: translateY(10px);
}

.intro-line {
  color: var(--muted);
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
  opacity: 0;
  transform: translateY(10px);
  margin-bottom: var(--space-5);
}

.hero-title {
  opacity: 0;
  transform: translateY(14px);
  cursor: pointer;
  user-select: none;
  max-width: 100%;
}

.hero-title .line1,
.hero-title .line2 {
  display: block;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.hero-title .line1 {
  font-size: clamp(1.45rem, 1rem + 4.2vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hero-title .line2 {
  font-size: clamp(1.15rem, 0.9rem + 2.4vw, 1.75rem);
  color: var(--aqua);
  margin-top: 0.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.hero-meta {
  margin-top: var(--space-5);
  opacity: 0;
  transform: translateY(12px);
}

.hero-meta .date {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.95rem, 3.8vw, 1.125rem);
  letter-spacing: 0.08em;
}

.hero-meta .loc {
  color: var(--muted);
  margin-top: var(--space-1);
  font-size: 0.95rem;
}

.hero-quote {
  margin-top: var(--space-5);
  font-style: italic;
  color: var(--muted);
  font-size: clamp(0.9rem, 3.4vw, 1rem);
  opacity: 0;
  padding-inline: var(--space-2);
}

#countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin: var(--space-6) auto 0;
  width: 100%;
  max-width: 22rem;
  opacity: 0;
  padding: var(--space-1);
}

#countdown .unit {
  padding: var(--space-3) var(--space-1);
  text-align: center;
  min-width: 0;
}

#countdown .num {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  font-weight: 800;
  color: var(--aqua);
  display: block;
  line-height: 1.1;
}

#countdown .lab {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-cta {
  margin-top: var(--space-8);
  opacity: 0;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
}

body.hero-ready .breaking,
body.hero-ready .intro-line,
body.hero-ready .hero-title,
body.hero-ready .hero-meta,
body.hero-ready .hero-quote,
body.hero-ready #countdown,
body.hero-ready .hero-cta {
  animation: revealUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.hero-ready .breaking {
  animation-delay: 0.05s;
}
body.hero-ready .intro-line {
  animation-delay: 0.45s;
}
body.hero-ready .hero-title {
  animation-delay: 0.85s;
}
body.hero-ready .hero-meta {
  animation-delay: 1.2s;
}
body.hero-ready .hero-quote {
  animation-delay: 1.45s;
}
body.hero-ready #countdown {
  animation-delay: 1.65s;
}
body.hero-ready .hero-cta {
  animation-delay: 1.85s;
}

body.motion-on.hero-ready .breaking,
body.motion-on.hero-ready .intro-line,
body.motion-on.hero-ready .hero-title,
body.motion-on.hero-ready .hero-meta,
body.motion-on.hero-ready .hero-quote,
body.motion-on.hero-ready #countdown,
body.motion-on.hero-ready .hero-cta {
  animation: none;
}

@media (pointer: coarse) {
  body.motion-on.hero-ready .breaking,
  body.motion-on.hero-ready .intro-line,
  body.motion-on.hero-ready .hero-title,
  body.motion-on.hero-ready .hero-meta,
  body.motion-on.hero-ready .hero-quote,
  body.motion-on.hero-ready #countdown,
  body.motion-on.hero-ready .hero-cta {
    opacity: 1 !important;
    transform: none !important;
  }
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Weather ---------- */
.weather-grid {
  display: grid;
  gap: var(--space-3);
}

.weather-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  width: 100%;
  text-align: left;
  opacity: 1;
}

.weather-card.in {
  animation: revealUp 0.5s ease forwards;
}

.weather-card .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.weather-card .info {
  flex: 1;
  min-width: 0;
}

.weather-card .pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--aqua);
  line-height: 1.2;
}

.weather-card .label {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: break-word;
}

.weather-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin-top: var(--space-2);
  overflow: hidden;
}

.weather-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--aqua), var(--neon));
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.food-zero .note {
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--aqua);
  font-weight: 600;
}

/* ---------- Budget ---------- */
.budget {
  margin-top: var(--space-6);
  padding: var(--space-5);
  width: 100%;
}

.budget-row {
  margin-bottom: var(--space-4);
}

.budget-row:last-of-type {
  margin-bottom: var(--space-2);
}

.budget-label {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.8125rem;
  margin-bottom: var(--space-2);
}

.bar-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-fill.food {
  background: var(--danger);
}
.bar-fill.drink {
  background: linear-gradient(90deg, var(--aqua), var(--neon));
}

.budget-ok {
  text-align: center;
  margin-top: var(--space-3);
  color: var(--ok);
  font-weight: 600;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.35s;
}

.budget-ok.show {
  opacity: 1;
}

/* ---------- Pool ---------- */
#pool {
  overflow: hidden;
}

.pool-splash {
  position: absolute;
  inset: auto 0 0;
  height: 100px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(transparent, rgba(61, 224, 255, 0.12));
  transition: opacity 0.5s;
}

#pool.splashed .pool-splash {
  opacity: 1;
}

#pool-no-btn-wrap {
  position: relative;
  height: 6.5rem;
  margin-top: var(--space-6);
  width: 100%;
  overflow: hidden;
}

#pool-no-btn {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1rem);
  min-height: var(--touch);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 2;
  transition: left 0.22s ease, top 0.22s ease, transform 0.22s ease;
}

/* ---------- RSVP choice ---------- */
#rsvp-choice {
  text-align: center;
}

.rsvp-arena {
  position: relative;
  min-height: 15rem;
  margin-top: var(--space-6);
  overflow: hidden;
  width: 100%;
  touch-action: manipulation;
}

#btn-yes {
  position: relative;
  z-index: 1;
  width: 100%;
}

#btn-no {
  position: absolute;
  left: 50%;
  top: 4.5rem;
  transform: translateX(-50%);
  width: min(100%, 17rem);
  max-width: calc(100% - 1rem);
  z-index: 2;
  transition: left 0.18s ease, top 0.18s ease, transform 0.18s ease, font-size 0.2s,
    min-height 0.2s, padding 0.2s;
}

#btn-no.tiny {
  min-height: 2.25rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  width: auto;
  min-width: 4.5rem;
}

#no-status {
  margin-top: var(--space-4);
  min-height: 1.4em;
  color: var(--aqua);
  font-weight: 600;
  font-size: 0.9375rem;
  padding-inline: var(--space-2);
}

#rsvp-confirmed-teaser {
  display: none;
  text-align: center;
  padding: var(--space-8) var(--space-2);
}

#rsvp-confirmed-teaser.show {
  display: block;
}

.confetti-emoji {
  font-size: 2.5rem;
  margin-bottom: var(--space-2);
}

/* ---------- Form (Untitled input style) ---------- */
#rsvp-form-wrap {
  display: none;
}

#rsvp-form-wrap.show {
  display: block;
}

.field {
  margin-bottom: var(--space-5);
  width: 100%;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-2);
  font-size: 1rem;
}

.field .hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.field input[type="text"],
.field select,
.custom-select .trigger {
  width: 100%;
  min-height: var(--touch);
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  font-size: 16px; /* iOS no-zoom */
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

.field input:focus,
.field select:focus,
.custom-select .trigger:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px var(--ring);
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select .trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  text-align: left;
}

.custom-select .trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select .menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  padding: var(--space-2);
  max-height: min(50vh, 16rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

.custom-select.open .menu {
  display: block;
}

.custom-select .opt {
  width: 100%;
  text-align: left;
  padding: 0.8rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--muted);
  min-height: var(--touch);
}

.custom-select .opt:hover,
.custom-select .opt:focus {
  background: rgba(61, 224, 255, 0.1);
}

.custom-select .opt.active {
  color: var(--white);
  background: rgba(61, 224, 255, 0.16);
}

.custom-select .opt.locked {
  opacity: 0.45;
}

.verdict {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(61, 224, 255, 0.1);
  border: 1px solid rgba(61, 224, 255, 0.2);
  color: var(--aqua);
  font-weight: 600;
  font-size: 0.9375rem;
  display: none;
}

.verdict.show {
  display: block;
  animation: revealUp 0.3s ease forwards;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  min-height: var(--touch);
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
  font-size: 0.875rem;
}

.chip.selected {
  background: rgba(61, 224, 255, 0.18);
  border-color: var(--aqua);
  color: var(--aqua);
}

.form-status {
  margin-top: var(--space-3);
  text-align: center;
  min-height: 1.4em;
  font-weight: 600;
  font-size: 0.9375rem;
}

.form-status.error {
  color: var(--danger);
}
.form-status.ok {
  color: var(--ok);
}

.guest-joke {
  display: none;
  margin-top: var(--space-2);
  color: var(--aqua);
  font-weight: 600;
  font-size: 0.875rem;
}

.guest-joke.show {
  display: block;
}

/* ---------- Certificate ---------- */
#after-rsvp {
  display: none;
  text-align: center;
}

#after-rsvp.show {
  display: block;
}

#certificate {
  margin: var(--space-6) auto 0;
  width: 100%;
  max-width: 26rem;
  padding: var(--space-6) var(--space-5);
  text-align: center;
  background:
    linear-gradient(160deg, rgba(61, 224, 255, 0.1), rgba(91, 140, 255, 0.05)),
    rgba(10, 22, 40, 0.92);
  border: 1px solid rgba(61, 224, 255, 0.35);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

#certificate::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(61, 224, 255, 0.18);
  border-radius: 14px;
  pointer-events: none;
}

#certificate .cert-eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  color: var(--aqua);
  font-weight: 700;
}

#certificate .cert-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  margin: var(--space-2) 0 var(--space-4);
}

#certificate .cert-name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 1.2vw, 1.35rem);
  color: var(--aqua);
  margin: var(--space-3) 0;
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

#certificate .cert-id {
  display: inline-block;
  margin-top: var(--space-4);
  padding: 0.35rem 0.7rem;
  border: 1px dashed var(--aqua);
  border-radius: 6px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

#certificate .cert-meta {
  margin-top: var(--space-4);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.55;
}

#certificate .cert-stamp {
  margin-top: var(--space-4);
  font-size: 0.75rem;
  color: var(--neon);
  font-weight: 600;
}

.keep-going {
  margin-top: var(--space-8);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  border-color: rgba(61, 224, 255, 0.35);
}

.keep-going-gif-wrap {
  width: min(100%, 16rem);
  margin: 0 auto var(--space-5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #000;
  aspect-ratio: 1;
}

.keep-going-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.keep-going-eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: var(--aqua);
  margin-bottom: var(--space-2);
}

.keep-going-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: var(--space-2);
}

.keep-going-copy {
  margin: 0 auto var(--space-5);
  max-width: 20rem;
}

#cert-save-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--safe-b));
}

#cert-save-modal.show {
  display: flex;
}

.cert-save-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.cert-save-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-height: 88dvh;
  overflow: auto;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  text-align: center;
}

.cert-save-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  margin-bottom: var(--space-2);
}

.cert-save-hint {
  color: var(--aqua);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

#cert-save-img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  margin-bottom: var(--space-4);
  background: #0a1628;
  -webkit-touch-callout: default;
}

/* ---------- Location ---------- */
.map-blur {
  margin: var(--space-5) 0;
  height: 7rem;
  border-radius: var(--radius-xl);
  background:
    repeating-linear-gradient(
      45deg,
      rgba(61, 224, 255, 0.05),
      rgba(61, 224, 255, 0.05) 10px,
      transparent 10px,
      transparent 20px
    ),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  filter: blur(1px) saturate(0.7);
  transform: rotate(-1.5deg);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

.safety {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-left: 3px solid var(--ok);
  background: rgba(125, 255, 200, 0.06);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  text-align: left;
}

.safety strong {
  display: block;
  color: var(--ok);
  margin-bottom: var(--space-2);
  font-size: 1rem;
}

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.check-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  text-align: left;
  width: 100%;
  min-height: var(--touch);
}

.check-item span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
}

.check-item .box {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.check-item.done .box {
  background: rgba(125, 255, 200, 0.2);
  border-color: var(--ok);
  color: var(--ok);
}

.check-item.bad.done .box {
  background: rgba(255, 107, 138, 0.2);
  border-color: var(--danger);
  color: var(--danger);
}

/* ---------- Final ---------- */
#final {
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(61, 224, 255, 0.08), transparent 60%);
}

#final .stack > * + * {
  margin-top: var(--space-3);
}

#final .tiny {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  color: var(--muted);
}

#final .punch {
  margin-top: var(--space-6);
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: clamp(0.95rem, 3.8vw, 1.05rem);
}

#final .punch span {
  display: block;
}

.food-plot-twist {
  margin: var(--space-8) 0 var(--space-2);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  border-color: rgba(125, 255, 200, 0.35);
  background:
    linear-gradient(160deg, rgba(125, 255, 200, 0.1), rgba(61, 224, 255, 0.06)),
    rgba(10, 22, 40, 0.85);
}

.food-twist-eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--neon);
  margin-bottom: var(--space-2);
}

.food-twist-title {
  font-size: clamp(1.35rem, 1.1rem + 2.5vw, 2rem);
  color: var(--ok);
  margin: var(--space-1) 0;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.food-twist-big {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 2vw, 1.65rem);
  font-weight: 800;
  margin: var(--space-2) 0 var(--space-3);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.food-twist-copy {
  margin-top: var(--space-1);
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
}

.food-twist-copy strong {
  color: var(--white);
}

.food-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 1.5rem;
  margin-bottom: var(--space-3);
}

.food-icons-lg {
  margin: var(--space-4) 0 0;
  font-size: clamp(2rem, 10vw, 2.75rem);
}

/* ---------- Toast ---------- */
#toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-4) + var(--safe-b));
  transform: translateX(-50%);
  z-index: 2000;
  width: min(92vw, 22rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(12, 26, 44, 0.94);
  border: 1px solid var(--glass-border);
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  overflow-wrap: anywhere;
}

.toast.out {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Desktop polish ---------- */
@media (min-width: 768px) {
  :root {
    --page-x: 1.5rem;
    --page-x-r: 1.5rem;
  }

  .section {
    padding-block: var(--space-16);
  }

  .btn-row.two {
    grid-template-columns: 1fr 1fr;
  }

  h1 {
    font-size: clamp(2rem, 1.4rem + 1.5vw, 2.75rem);
  }

  h2 {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .glow-orb {
    animation: none;
  }

  .breaking,
  .intro-line,
  .hero-title,
  .hero-meta,
  .hero-quote,
  #countdown,
  .hero-cta,
  .weather-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
