:root {
  --hero-red: #e31b23;
  --hero-blue: #0057b8;
  --night-navy: #07162e;
  --electric-blue: #00a3ff;
  --hero-yellow: #ffd33d;
  --white: #ffffff;
  --ink: #05070d;
  --mist: #f7fbff;
  --cloud: #eaf2ff;
  --line: rgba(5, 7, 13, 0.13);
  --shadow: 0 22px 70px rgba(7, 22, 46, 0.18);
  --radius: 8px;
  --focus: 0 0 0 4px rgba(0, 163, 255, 0.28);
  color-scheme: light;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(227, 27, 35, 0.08), transparent 28%),
    linear-gradient(225deg, rgba(0, 87, 184, 0.12), transparent 32%),
    var(--mist);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

body[data-theme="light"] {
  --hero-red: #d51c25;
  --hero-blue: #0759ad;
  --night-navy: #10284f;
  --electric-blue: #0077d9;
  --mist: #ffffff;
  --cloud: #f0f5ff;
  --line: rgba(7, 22, 46, 0.14);
  background: #ffffff;
  color: #07162e;
}

body[data-theme="night"] {
  --mist: #07162e;
  --cloud: #0d2346;
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --ink: #f8fbff;
  color-scheme: dark;
  background:
    linear-gradient(145deg, rgba(227, 27, 35, 0.18), transparent 34%),
    linear-gradient(225deg, rgba(0, 163, 255, 0.18), transparent 36%),
    #07162e;
  color: #f8fbff;
}

body[data-theme="night"] .mission-panel,
body[data-theme="night"] .protocol-section,
body[data-theme="night"] .protocol-card,
body[data-theme="night"] .rsvp-form,
body[data-theme="night"] .mission-pass,
body[data-theme="night"] .game-shell,
body[data-theme="night"] .briefing-section,
body[data-theme="night"] .details-section,
body[data-theme="night"] .countdown-section,
body[data-theme="night"] .mission-note,
body[data-theme="night"] .admin-panel,
body[data-theme="night"] .gallery-card,
body[data-theme="night"] .gate-panel {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  border-color: rgba(255, 255, 255, 0.18);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(255, 211, 61, 0.28), transparent 38%),
    linear-gradient(135deg, var(--hero-red), var(--hero-blue));
  color: var(--white);
  transition:
    opacity 280ms ease,
    visibility 280ms ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.loader-badge strong {
  font-size: 2.9rem;
  line-height: 1;
  text-shadow: 3px 3px 0 var(--hero-blue);
}

.loader-web,
.loader-web::before,
.loader-web::after {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
}

.loader-web::before,
.loader-web::after {
  content: "";
  inset: -8px;
}

.loader-web::after {
  transform: rotate(45deg);
  border-radius: 4px;
}

.loader-badge {
  animation: badgePulse 1800ms ease-in-out infinite;
}

.loader-web {
  animation: webSpin 3200ms linear infinite;
}

.preloader p {
  margin: 0;
  font-weight: 800;
  text-align: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(14px, env(safe-area-inset-left)) 10px max(14px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

body[data-theme="night"] .topbar {
  background: rgba(7, 22, 46, 0.82);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--hero-red);
  color: var(--white);
  font-weight: 950;
  text-shadow: 2px 2px 0 var(--hero-blue);
  box-shadow: inset 0 0 0 3px var(--white), 0 8px 24px rgba(227, 27, 35, 0.22);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
  white-space: nowrap;
}

.brand-lockup strong {
  font-weight: 950;
}

.brand-lockup small {
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-size: 0.78rem;
  font-weight: 750;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-short {
  display: none;
}

.settings-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.settings-toggle {
  display: none;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--night-navy);
  color: var(--white);
  padding: 0 12px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(7, 22, 46, 0.12);
}

.settings-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-language-row {
  gap: 7px;
}

.settings-label {
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.segmented {
  display: inline-flex;
  min-height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 24px rgba(7, 22, 46, 0.08);
}

body[data-theme="night"] .segmented {
  background: rgba(255, 255, 255, 0.08);
}

.segmented button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

.segmented button[aria-pressed="true"] {
  background: var(--hero-blue);
  color: var(--white);
}

.theme-segment button[aria-pressed="true"] {
  background: var(--hero-red);
}

.sound-toggle {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 0 12px;
  font-weight: 850;
  box-shadow: 0 8px 24px rgba(7, 22, 46, 0.08);
}

body[data-theme="night"] .sound-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
}

.section-band,
.section-wrap {
  position: relative;
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.78fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  min-height: calc(100svh - 68px);
  padding: clamp(36px, 7vw, 72px) 0 86px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 24px -18px 58px;
  z-index: -2;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(234, 242, 255, 0.74)),
    linear-gradient(45deg, rgba(227, 27, 35, 0.14), rgba(0, 87, 184, 0.12));
  box-shadow: var(--shadow);
}

body[data-theme="night"] .hero::before {
  background:
    linear-gradient(135deg, rgba(15, 34, 68, 0.95), rgba(13, 35, 70, 0.72)),
    linear-gradient(45deg, rgba(227, 27, 35, 0.16), rgba(0, 163, 255, 0.14));
}

.hero-web {
  position: absolute;
  inset: 44px 0 70px;
  z-index: -1;
  opacity: 0.42;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(0, 87, 184, 0.34) 49%, transparent 50%),
    linear-gradient(150deg, transparent 48%, rgba(227, 27, 35, 0.3) 49%, transparent 50%),
    radial-gradient(circle at 72% 32%, transparent 0 42px, rgba(0, 87, 184, 0.22) 43px 44px, transparent 45px);
  background-size: 170px 170px, 210px 210px, 180px 180px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.mission-city-layer {
  position: absolute;
  inset: 32px -16px 54px;
  z-index: -1;
  overflow: hidden;
  border-radius: var(--radius);
  pointer-events: none;
  perspective: 900px;
}

.mission-city-layer::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background:
    linear-gradient(to top, rgba(7, 22, 46, 0.22), transparent),
    repeating-linear-gradient(90deg, rgba(7, 22, 46, 0.18) 0 30px, transparent 30px 54px);
  clip-path: polygon(0 88%, 7% 58%, 12% 78%, 18% 38%, 26% 66%, 34% 48%, 42% 80%, 51% 36%, 59% 68%, 68% 44%, 78% 72%, 86% 50%, 100% 82%, 100% 100%, 0 100%);
  transform: translateZ(-80px) scale(1.08);
}

.float-star {
  position: absolute;
  width: 24px;
  aspect-ratio: 1;
  background: var(--hero-yellow);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 69%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 14px rgba(255, 211, 61, 0.58));
  opacity: 0.82;
  animation: floatStar 6200ms ease-in-out infinite;
}

.star-a {
  left: 56%;
  top: 16%;
}

.star-b {
  left: 78%;
  top: 50%;
  width: 18px;
  animation-delay: -1900ms;
}

.star-c {
  left: 14%;
  top: 68%;
  width: 16px;
  animation-delay: -3600ms;
}

.web-line {
  position: absolute;
  height: 2px;
  width: min(58vw, 620px);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88), transparent);
  box-shadow: 0 0 24px rgba(0, 163, 255, 0.28);
  transform-origin: left center;
  opacity: 0.62;
  animation: webTrace 4200ms ease-in-out infinite;
}

.web-line::before {
  content: "";
  position: absolute;
  inset: -5px 0;
  background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.48) 18px 19px);
}

.web-a {
  left: 6%;
  top: 28%;
  rotate: 18deg;
}

.web-b {
  right: -8%;
  bottom: 28%;
  rotate: -24deg;
  animation-delay: -2200ms;
}

.skyline {
  position: absolute;
  left: -18px;
  right: -18px;
  bottom: 58px;
  z-index: -1;
  height: 110px;
  opacity: 0.18;
  background:
    linear-gradient(to top, currentColor 0 34px, transparent 34px),
    linear-gradient(to top, currentColor 0 56px, transparent 56px),
    linear-gradient(to top, currentColor 0 78px, transparent 78px),
    linear-gradient(to top, currentColor 0 46px, transparent 46px),
    linear-gradient(to top, currentColor 0 92px, transparent 92px);
  background-position: 0 100%, 84px 100%, 170px 100%, 268px 100%, 350px 100%;
  background-size: 68px 100%, 72px 100%, 84px 100%, 60px 100%, 94px 100%;
  background-repeat: repeat-x;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--hero-red);
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

body[data-theme="night"] .eyebrow {
  color: var(--hero-yellow);
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.92;
  color: var(--hero-red);
  text-shadow:
    2px 2px 0 var(--white),
    5px 5px 0 var(--hero-blue),
    0 16px 34px rgba(7, 22, 46, 0.16);
}

body[data-theme="night"] h1 {
  text-shadow:
    2px 2px 0 #07162e,
    5px 5px 0 var(--electric-blue),
    0 18px 36px rgba(0, 0, 0, 0.32);
}

.hero-lede {
  max-width: 640px;
  margin: 20px 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 750;
}

.hero-actions,
.map-actions,
.form-actions,
.pass-actions,
.game-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  text-decoration: none;
  font-weight: 950;
  text-align: center;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--hero-red);
  color: var(--white);
  box-shadow: 0 14px 32px rgba(227, 27, 35, 0.28);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.76);
  color: var(--hero-blue);
  border-color: var(--line);
}

body[data-theme="night"] .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-yellow {
  background: var(--hero-yellow);
  color: #241900;
  box-shadow: 0 14px 32px rgba(255, 211, 61, 0.28);
}

.text-link,
.text-button {
  border: 0;
  background: transparent;
  color: var(--hero-blue);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

body[data-theme="night"] .text-link,
body[data-theme="night"] .text-button {
  color: var(--hero-yellow);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 0;
  max-width: 700px;
}

.quick-facts div {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="night"] .quick-facts div {
  background: rgba(255, 255, 255, 0.08);
}

.quick-facts dt {
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 7px 0 0;
  font-size: 1.05rem;
  font-weight: 950;
}

.hero-art {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.mission-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: min(72vw, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--white);
  background:
    conic-gradient(from 20deg, var(--hero-red), #ff4b4f, var(--hero-blue), var(--electric-blue), var(--hero-red));
  box-shadow:
    inset 0 0 0 12px rgba(255, 255, 255, 0.9),
    inset 0 0 0 18px rgba(7, 22, 46, 0.18),
    0 28px 80px rgba(7, 22, 46, 0.25);
  overflow: hidden;
  animation: badgeDrift 5400ms ease-in-out infinite;
}

.mission-badge::before,
.mission-badge::after {
  content: "";
  position: absolute;
  inset: 30px;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
}

.mission-badge::after {
  inset: 68px 22px;
  border-radius: 6px;
  transform: rotate(38deg);
}

.badge-ring {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, transparent 0 42%, rgba(255, 255, 255, 0.22) 43% 44%, transparent 45%),
    repeating-radial-gradient(circle, transparent 0 16px, rgba(255, 255, 255, 0.16) 17px 18px);
}

.mission-badge strong {
  position: relative;
  z-index: 1;
  font-size: clamp(6.4rem, 24vw, 10.4rem);
  line-height: 0.8;
  text-shadow: 6px 6px 0 rgba(7, 22, 46, 0.45);
}

.badge-kicker,
.badge-name {
  position: relative;
  z-index: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.badge-kicker {
  align-self: end;
  margin-top: 50px;
  font-size: 0.83rem;
}

.badge-name {
  align-self: start;
  color: var(--hero-yellow);
  text-shadow: 2px 2px 0 rgba(7, 22, 46, 0.35);
}

.mini-countdown {
  display: grid;
  gap: 3px;
  min-width: min(100%, 340px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  box-shadow: 0 14px 40px rgba(7, 22, 46, 0.12);
}

body[data-theme="night"] .mini-countdown {
  background: rgba(255, 255, 255, 0.08);
}

.mini-countdown span {
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mini-countdown strong {
  color: var(--hero-blue);
  font-size: 1.2rem;
}

body[data-theme="night"] .mini-countdown strong {
  color: var(--hero-yellow);
}

.section-wrap {
  padding: 56px 0;
}

.mission-strip {
  padding-top: 0;
}

.mission-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.mission-note p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 850;
}

.spark {
  flex: 0 0 28px;
  width: 28px;
  aspect-ratio: 1;
  background: var(--hero-yellow);
  clip-path: polygon(50% 0, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0 50%, 39% 36%);
  filter: drop-shadow(0 8px 18px rgba(255, 211, 61, 0.32));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading h2,
.briefing-layout h2,
.game-copy h2 {
  margin: 0;
  color: var(--night-navy);
  font-size: clamp(2rem, 5.3vw, 3.2rem);
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0, 163, 255, 0.14);
}

body[data-theme="night"] .section-heading h2,
body[data-theme="night"] .briefing-layout h2,
body[data-theme="night"] .game-copy h2 {
  color: #ffffff;
}

.section-heading p:not(.eyebrow) {
  font-size: 1.08rem;
}

.countdown-section,
.details-section,
.protocol-section,
.briefing-section,
.rsvp-section,
.game-shell,
.admin-panel,
.gate-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.countdown-section,
.details-section,
.protocol-section,
.briefing-section,
.rsvp-section {
  padding: clamp(24px, 5vw, 44px);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.counter {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 14px 8px;
  border: 2px solid color-mix(in srgb, var(--hero-blue) 32%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(0, 163, 255, 0.1), transparent),
    rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.counter:hover {
  transform: translateY(-3px);
  border-color: var(--hero-yellow);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 18px 36px rgba(7, 22, 46, 0.12);
}

body[data-theme="night"] .counter {
  background: rgba(255, 255, 255, 0.08);
}

.counter strong {
  color: var(--hero-red);
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0, 87, 184, 0.16);
}

.counter span {
  color: color-mix(in srgb, currentColor 70%, transparent);
  font-weight: 950;
  text-transform: uppercase;
}

.status-line {
  margin: 18px 0 0;
  font-weight: 900;
  color: var(--hero-blue);
}

body[data-theme="night"] .status-line {
  color: var(--hero-yellow);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mission-panel {
  min-height: 172px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

@media (hover: hover) and (min-width: 901px) {
  .mission-panel:hover,
  .protocol-card:hover,
  .rsvp-form:hover,
  .mission-pass:hover,
  .briefing-card:hover {
    transform: perspective(900px) rotateX(1.2deg) rotateY(-1.6deg) translateY(-2px);
    border-color: color-mix(in srgb, var(--electric-blue) 46%, var(--line));
    box-shadow: 0 28px 78px rgba(7, 22, 46, 0.18);
  }
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: var(--hero-blue);
  color: var(--white);
  font-weight: 950;
}

.mission-panel h3 {
  margin: 14px 0 5px;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.mission-panel p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 950;
}

.map-actions {
  margin-top: 20px;
}

.map-frame {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cloud);
}

.map-frame iframe {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
}

.helper-copy {
  margin: 18px 0 0;
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-weight: 750;
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.protocol-card {
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.protocol-card .panel-icon {
  width: 58px;
  padding-inline: 6px;
  font-size: 0.66rem;
}

.protocol-card h3 {
  margin: 14px 0 7px;
  color: var(--night-navy);
  font-size: 1rem;
  line-height: 1.1;
}

body[data-theme="night"] .protocol-card h3 {
  color: #ffffff;
}

.protocol-card p {
  margin: 0;
  color: color-mix(in srgb, currentColor 74%, transparent);
  font-size: 0.96rem;
  font-weight: 760;
}

.briefing-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.briefing-layout p:not(.eyebrow) {
  font-size: 1.06rem;
  font-weight: 700;
}

.briefing-card {
  min-height: 310px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(227, 27, 35, 0.92), rgba(0, 87, 184, 0.92)),
    var(--night-navy);
}

#briefingCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 310px;
}

.briefing-card video {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
}

.briefing-fallback {
  position: relative;
  display: grid;
  place-items: center;
  width: 220px;
  aspect-ratio: 1;
  color: var(--white);
}

.briefing-fallback span {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  background:
    linear-gradient(35deg, transparent 48%, rgba(255, 255, 255, 0.38) 49%, transparent 50%),
    linear-gradient(145deg, transparent 48%, rgba(255, 255, 255, 0.32) 49%, transparent 50%);
  background-size: 52px 52px;
}

.briefing-fallback strong {
  position: relative;
  z-index: 1;
  font-size: 7rem;
  line-height: 0.78;
  text-shadow: 5px 5px 0 rgba(7, 22, 46, 0.4);
}

.briefing-fallback em {
  position: absolute;
  bottom: 28px;
  z-index: 1;
  color: var(--hero-yellow);
  font-style: normal;
  font-weight: 950;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.choice-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  text-align: left;
  box-shadow: 0 10px 30px rgba(7, 22, 46, 0.08);
}

body[data-theme="night"] .choice-card {
  background: rgba(255, 255, 255, 0.08);
}

.choice-card:hover,
.choice-card.is-selected {
  border-color: var(--hero-blue);
  transform: translateY(-2px);
}

.choice-card.yes:hover,
.choice-card.yes.is-selected {
  border-color: var(--hero-red);
}

.choice-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--hero-blue);
  color: var(--white);
  font-weight: 950;
  font-size: 1.5rem;
}

.choice-card.yes span {
  background: var(--hero-red);
}

.choice-card strong {
  font-size: 1.2rem;
}

.choice-card small {
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-size: 0.95rem;
  font-weight: 760;
}

.rsvp-form,
.mission-pass {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.form-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.form-title-row h3,
.mission-pass h3 {
  margin: 0;
  color: var(--night-navy);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.05;
}

body[data-theme="night"] .form-title-row h3,
body[data-theme="night"] .mission-pass h3 {
  color: #ffffff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-wide {
  grid-column: 1 / -1;
}

label,
.consent-row {
  font-size: 1rem;
  font-weight: 880;
}

input,
textarea {
  width: 100%;
  border: 2px solid color-mix(in srgb, var(--line) 80%, #bdc9d9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: #07162e;
  padding: 13px 14px;
  min-height: 48px;
}

body[data-theme="night"] input,
body[data-theme="night"] textarea {
  background: rgba(255, 255, 255, 0.92);
  color: #07162e;
}

textarea {
  resize: vertical;
}

.field-error {
  min-height: 1.1em;
  color: #b00020;
  font-size: 0.92rem;
  font-weight: 820;
}

body[data-theme="night"] .field-error {
  color: #ffb7c4;
}

.field-hint,
.privacy-note {
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 0.92rem;
  font-weight: 720;
}

.allergy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.allergy-chips button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  color: var(--hero-blue);
  padding: 0 12px;
  font-weight: 900;
}

body[data-theme="night"] .allergy-chips button {
  background: rgba(255, 255, 255, 0.1);
  color: var(--hero-yellow);
}

.consent-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 18px;
}

.consent-row input {
  min-height: 24px;
  height: 24px;
  padding: 0;
}

.consent-error {
  display: block;
  margin-top: 6px;
}

.form-actions {
  margin-top: 20px;
}

.privacy-note {
  margin: 18px 0 0;
}

.form-status {
  margin-top: 12px;
  font-weight: 850;
}

.mission-pass {
  position: relative;
  overflow: hidden;
}

.mission-pass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(34deg, transparent 47%, rgba(0, 163, 255, 0.12) 48%, transparent 49%),
    linear-gradient(146deg, transparent 47%, rgba(227, 27, 35, 0.12) 48%, transparent 49%);
  background-size: 64px 64px;
}

.mission-pass > * {
  position: relative;
  z-index: 1;
}

.pass-stamp {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--hero-red);
  color: var(--white);
  font-weight: 950;
  text-transform: uppercase;
}

.mission-pass dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.mission-pass dl div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="night"] .mission-pass dl div {
  background: rgba(255, 255, 255, 0.08);
}

.mission-pass dt {
  color: color-mix(in srgb, currentColor 70%, transparent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.mission-pass dd {
  margin: 4px 0 0;
  font-weight: 950;
}

.game-shell {
  padding: 0;
}

.game-shell summary {
  min-height: 56px;
  padding: 18px 20px;
  color: var(--hero-blue);
  font-size: 1.08rem;
  font-weight: 950;
  cursor: pointer;
}

body[data-theme="night"] .game-shell summary {
  color: var(--hero-yellow);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 20px;
  padding: 0 20px 20px;
  align-items: center;
}

.game-copy p:not(.eyebrow),
.game-status {
  font-weight: 760;
}

.game-unlock-note {
  margin: 14px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(0, 87, 184, 0.22);
  border-radius: var(--radius);
  background: rgba(0, 163, 255, 0.1);
  color: var(--hero-blue);
  font-weight: 900;
}

.game-unlock-note.is-unlocked {
  border-color: rgba(255, 211, 61, 0.42);
  background: rgba(255, 211, 61, 0.2);
  color: #5c4100;
}

body[data-theme="night"] .game-unlock-note {
  color: #ffffff;
}

.canvas-wrap {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--hero-blue) 30%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(0, 163, 255, 0.18), transparent),
    var(--night-navy);
}

#webGame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  touch-action: none;
}

.canvas-fallback {
  display: none;
  margin: 0;
  padding: 20px;
  color: var(--white);
}

.score-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr) minmax(240px, 0.8fr);
  gap: 18px;
  align-items: start;
  margin: 0 20px 20px;
  padding: 18px;
  border-top: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 211, 61, 0.16), transparent 38%),
    rgba(255, 255, 255, 0.72);
}

body[data-theme="night"] .score-panel {
  background: rgba(255, 255, 255, 0.08);
}

.score-panel h3 {
  margin: 0;
  color: var(--hero-red);
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 0.9;
}

.score-panel p {
  margin: 8px 0 0;
  font-weight: 800;
}

.score-form {
  display: grid;
  gap: 12px;
}

.score-form .btn {
  width: 100%;
}

.leaderboard {
  min-width: 0;
}

.leaderboard h3 {
  margin: 0 0 10px;
  color: var(--night-navy);
  font-size: 1.15rem;
  line-height: 1.1;
}

body[data-theme="night"] .leaderboard h3 {
  color: #ffffff;
}

.leaderboard ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  font-weight: 900;
}

body[data-theme="night"] .leaderboard li {
  background: rgba(255, 255, 255, 0.08);
}

.leaderboard li span {
  color: var(--hero-red);
}

.turnstile-slot {
  margin-top: 14px;
  min-height: 65px;
}

.assistant-widget {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 130;
  display: grid;
  justify-items: end;
  gap: 10px;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    visibility 160ms ease;
}

.assistant-widget.assistant--hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

.game-active .assistant-widget,
.rsvp-focused .assistant-widget,
.keyboard-open:not(.assistant-open) .assistant-widget,
.assistant-widget.assistant--minimized {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
}

.game-active .assistant-toggle,
.rsvp-focused .assistant-toggle {
  pointer-events: none;
}

.assistant-toggle,
.assistant-panel {
  pointer-events: auto;
}

.assistant-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius);
  padding: 8px 14px 8px 8px;
  background:
    linear-gradient(135deg, var(--hero-red), var(--hero-blue));
  color: var(--white);
  box-shadow: 0 18px 42px rgba(7, 22, 46, 0.28);
  font-weight: 950;
}

.assistant-toggle span {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--hero-yellow);
  color: #241900;
  text-shadow: 1px 1px 0 #ffffff;
}

.assistant-toggle[aria-expanded="true"] {
  box-shadow:
    0 18px 42px rgba(7, 22, 46, 0.24),
    0 0 0 4px rgba(255, 211, 61, 0.24);
}

.assistant-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(392px, calc(100vw - 28px));
  max-height: min(680px, calc(100svh - 108px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(234, 242, 255, 0.94)),
    var(--white);
  color: #07162e;
  box-shadow: 0 26px 80px rgba(7, 22, 46, 0.28);
  animation: assistantIn 180ms ease both;
}

body[data-theme="night"] .assistant-panel {
  background:
    linear-gradient(150deg, rgba(9, 24, 50, 0.96), rgba(13, 46, 97, 0.94)),
    #07162e;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.assistant-panel header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(227, 27, 35, 0.1), transparent),
    linear-gradient(270deg, rgba(0, 163, 255, 0.12), transparent);
}

.assistant-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hero-red), var(--hero-blue));
  color: var(--white);
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(7, 22, 46, 0.18);
}

.assistant-panel h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.12;
}

.assistant-panel header .eyebrow {
  margin-bottom: 3px;
  font-size: 0.68rem;
}

.assistant-subtitle {
  margin: 3px 0 0;
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 0.82rem;
  font-weight: 760;
}

.assistant-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: currentColor;
  font-size: 1.25rem;
  font-weight: 900;
}

body[data-theme="night"] .assistant-close {
  background: rgba(255, 255, 255, 0.1);
}

.assistant-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 180px;
  overflow-y: auto;
  padding: 14px 14px 16px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.assistant-message {
  width: fit-content;
  max-width: min(100%, 315px);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 24px rgba(7, 22, 46, 0.08);
  animation: assistantBubbleIn 160ms ease both;
}

body[data-theme="night"] .assistant-message {
  background: rgba(255, 255, 255, 0.09);
}

.assistant-message.user {
  justify-self: end;
  background: var(--hero-blue);
  color: var(--white);
  border-color: transparent;
  border-radius: 16px 16px 6px 16px;
}

.assistant-message p {
  margin: 0;
  font-weight: 750;
}

.assistant-message.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 58px;
  min-height: 38px;
}

.assistant-message.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.42;
  animation: typingDot 900ms ease-in-out infinite;
}

.assistant-message.typing span:nth-child(2) {
  animation-delay: 120ms;
}

.assistant-message.typing span:nth-child(3) {
  animation-delay: 240ms;
}

.assistant-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.assistant-links a,
.assistant-links button,
.assistant-suggestions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--hero-blue);
  padding: 7px 11px;
  font-weight: 900;
  text-decoration: none;
}

body[data-theme="night"] .assistant-links a,
body[data-theme="night"] .assistant-links button,
body[data-theme="night"] .assistant-suggestions button {
  background: rgba(255, 255, 255, 0.1);
  color: var(--hero-yellow);
}

.assistant-suggestions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 0 14px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-padding-inline: 14px;
  scrollbar-width: thin;
}

.assistant-suggestions button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
}

body[data-theme="night"] .assistant-form {
  background: rgba(255, 255, 255, 0.06);
}

.assistant-form input {
  min-width: 0;
  min-height: 44px;
  border-radius: 999px;
  padding-inline: 15px;
}

.assistant-send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hero-red), var(--hero-blue));
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(227, 27, 35, 0.24);
}

.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;
}

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  padding: 10px max(14px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.sticky-cta .btn {
  width: 100%;
}

body[data-theme="night"] .sticky-cta {
  background: rgba(7, 22, 46, 0.88);
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 120;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 92px;
  color: color-mix(in srgb, currentColor 70%, transparent);
  font-weight: 760;
}

.site-footer nav {
  display: flex;
  gap: 14px;
}

.noscript {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 1000;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff4c7;
  color: #271900;
  font-weight: 800;
}

/* Admin and gallery */
.subpage {
  min-height: 100svh;
}

.subpage-hero {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 52px 0 22px;
}

.subpage-hero h1 {
  max-width: 840px;
  font-size: clamp(2.7rem, 8vw, 5.1rem);
}

.admin-panel,
.gate-panel,
.gallery-grid-wrap {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto 54px;
  padding: clamp(20px, 5vw, 34px);
}

.admin-login,
.gate-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.admin-login .field,
.gate-form .field {
  min-width: min(100%, 320px);
  flex: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.summary-tile,
.gallery-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  padding: 16px;
}

body[data-theme="night"] .summary-tile,
body[data-theme="night"] .gallery-card {
  background: rgba(255, 255, 255, 0.08);
}

.summary-tile strong {
  display: block;
  color: var(--hero-red);
  font-size: 2rem;
  line-height: 1;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(0, 87, 184, 0.08);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.admin-panel h2,
.admin-section h3 {
  margin-top: 0;
  color: var(--night-navy);
}

body[data-theme="night"] .admin-panel h2,
body[data-theme="night"] .admin-section h3 {
  color: #ffffff;
}

.summary-grid.admin-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-tile {
  position: relative;
  overflow: hidden;
}

.summary-tile::after {
  content: "";
  position: absolute;
  inset: auto -18px -26px auto;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(0, 163, 255, 0.12);
}

.summary-tile.warning strong {
  color: #b00020;
}

.admin-actions,
.row-actions,
.notification-list,
.admin-section-header {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-section-header {
  justify-content: space-between;
  margin: 24px 0 12px;
}

.admin-section-header h3 {
  margin: 0;
}

.admin-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.admin-section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.admin-toolbar .field {
  min-width: min(100%, 320px);
}

.admin-toolbar .btn,
.row-actions .btn,
.danger-button {
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.92rem;
}

.danger-button {
  border: 1px solid rgba(176, 0, 32, 0.28);
  border-radius: var(--radius);
  background: rgba(176, 0, 32, 0.08);
  color: #92001b;
  font-weight: 900;
}

body[data-theme="night"] .danger-button {
  color: #ffb7c4;
  background: rgba(255, 183, 196, 0.1);
}

.status-pill,
.notification-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: var(--radius);
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.status-pill {
  background: rgba(0, 87, 184, 0.1);
  color: var(--hero-blue);
}

.status-pill.contacted {
  background: rgba(0, 120, 66, 0.12);
  color: #007842;
}

.status-pill.test {
  background: rgba(255, 211, 61, 0.24);
  color: #5c4100;
}

.notification-chip.sent {
  background: rgba(0, 120, 66, 0.13);
  color: #007842;
}

.notification-chip.skipped {
  background: rgba(7, 22, 46, 0.08);
  color: color-mix(in srgb, currentColor 72%, transparent);
}

.notification-chip.failed {
  background: rgba(176, 0, 32, 0.12);
  color: #b00020;
}

body[data-theme="night"] .notification-chip.failed {
  color: #ffb7c4;
}

.note-highlight,
.message-highlight {
  display: block;
  min-width: 180px;
  border-radius: var(--radius);
  padding: 9px 10px;
  font-weight: 800;
}

.note-highlight {
  background: rgba(255, 211, 61, 0.18);
  border: 1px solid rgba(255, 211, 61, 0.38);
}

.message-highlight {
  background: rgba(0, 163, 255, 0.11);
  border: 1px solid rgba(0, 163, 255, 0.24);
}

.empty-state {
  margin: 0;
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-weight: 800;
}

.leaderboard-table {
  min-width: 560px;
}

.leaderboard-table td:first-child {
  font-weight: 950;
}

.gallery-grid-wrap {
  padding: clamp(20px, 5vw, 34px);
}

.album-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.album-tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 0 12px;
  font-weight: 850;
}

.album-tabs button[aria-pressed="true"] {
  background: var(--hero-blue);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-card {
  display: grid;
  gap: 12px;
}

.media-thumb {
  display: grid;
  place-items: center;
  min-height: 156px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(227, 27, 35, 0.16), rgba(0, 163, 255, 0.16)),
    var(--cloud);
  color: var(--hero-blue);
  font-weight: 950;
}

.media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 156px;
  object-fit: cover;
  border-radius: var(--radius);
}

.gallery-note {
  margin-top: 18px;
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-weight: 760;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.045);
  }
}

@keyframes webSpin {
  to {
    rotate: 1turn;
  }
}

@keyframes badgeDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }

  50% {
    transform: translate3d(0, -8px, 0) rotate(1deg);
  }
}

@keyframes floatStar {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(14px, -18px, 34px) rotate(16deg);
  }
}

@keyframes webTrace {
  0%,
  100% {
    transform: translateX(-18px) scaleX(0.88);
    opacity: 0.32;
  }

  45% {
    transform: translateX(20px) scaleX(1);
    opacity: 0.78;
  }
}

@keyframes assistantIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes assistantBubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingDot {
  0%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  50% {
    opacity: 0.86;
    transform: translateY(-3px);
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }

  .hero,
  .briefing-layout,
  .game-layout,
  .score-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-art {
    order: -1;
  }

  .mission-badge {
    width: min(62vw, 270px);
  }

  .quick-facts,
  .details-grid,
  .protocol-grid,
  .summary-grid,
  .summary-grid.admin-summary,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid,
  .form-grid,
  .mission-pass dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .topbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .top-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }

  .brand-lockup {
    gap: 7px;
  }

  .brand-mark {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 0.96rem;
  }

  .brand-lockup small {
    display: none;
  }

  .brand-lockup strong {
    font-size: 0.98rem;
  }

  .language-segment {
    min-height: 40px;
    padding: 2px;
  }

  .language-segment button {
    min-height: 34px;
    padding-inline: 8px;
    font-size: 0.84rem;
  }

  .lang-full {
    display: none;
  }

  .lang-short {
    display: inline;
  }

  .settings-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding-inline: 10px;
    font-size: 0.84rem;
  }

  .settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 70;
    display: none;
    width: min(302px, calc(100vw - 20px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(7, 22, 46, 0.22);
  }

  body[data-theme="night"] .settings-panel {
    background: rgba(7, 22, 46, 0.96);
  }

  .settings-wrap.is-open .settings-panel {
    display: grid;
    gap: 10px;
  }

  .settings-row {
    display: grid;
    gap: 6px;
  }

  .settings-label {
    font-size: 0.74rem;
  }

  .sound-toggle {
    width: 100%;
  }

  .theme-segment {
    width: 100%;
  }

  .theme-segment button {
    flex: 1;
  }

  .segmented,
  .sound-toggle {
    max-width: 100%;
  }

  .hero {
    gap: 18px;
    padding-top: 16px;
    padding-bottom: 30px;
  }

  .hero::before {
    inset: 14px -8px 38px;
  }

  .skyline {
    left: 0;
    right: 0;
  }

  .hero-art {
    display: none;
  }

  .hero-copy .eyebrow {
    margin-bottom: 7px;
    font-size: 0.75rem;
    line-height: 1.18;
  }

  h1 {
    font-size: clamp(2.55rem, 13.2vw, 3.5rem);
    line-height: 0.96;
  }

  .hero-lede {
    max-width: 310px;
    margin-top: 11px;
    font-size: 1.02rem;
  }

  .hero-actions {
    margin-top: 16px;
    gap: 8px;
  }

  .hero-actions .btn-ghost {
    display: none;
  }

  .quick-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .quick-facts div {
    min-height: 78px;
    padding: 10px 8px;
  }

  .quick-facts dt {
    font-size: 0.66rem;
  }

  .quick-facts dd {
    margin-top: 4px;
    font-size: 0.88rem;
    line-height: 1.18;
  }

  .section-band,
  .section-wrap,
  .site-footer,
  .subpage-hero,
  .admin-panel,
  .gate-panel,
  .gallery-grid-wrap {
    width: min(100% - 20px, 1120px);
  }

  .countdown-section,
  .details-section,
  .protocol-section,
  .briefing-section,
  .rsvp-section {
    padding: 20px;
  }

  .mission-note,
  .site-footer {
    display: grid;
  }

  .mission-note {
    justify-items: start;
  }

  .protocol-card {
    min-height: 0;
  }

  .hero-actions .btn,
  .map-actions .btn,
  .form-actions .btn,
  .pass-actions .btn {
    width: 100%;
  }

  .choice-card {
    min-height: 128px;
  }

  .counter {
    min-height: 104px;
  }

  .briefing-card {
    min-height: 240px;
  }

  .score-panel {
    margin-inline: 12px;
  }

  .assistant-widget {
    left: auto;
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(env(safe-area-inset-bottom) + 88px);
    justify-items: end;
  }

  .assistant-toggle {
    position: relative;
    justify-content: center;
    width: 56px;
    min-height: 56px;
    padding: 8px;
    border-radius: 50%;
  }

  .assistant-toggle strong {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .assistant-toggle span {
    width: 40px;
  }

  .assistant-widget.assistant--open {
    left: 0;
    right: 0;
    bottom: 0;
    justify-items: stretch;
  }

  .assistant-widget.assistant--open .assistant-toggle {
    display: none;
  }

  .assistant-panel {
    position: fixed;
    left: 0;
    right: auto;
    bottom: 0;
    width: 100dvw;
    max-width: 100dvw;
    max-height: min(76dvh, 640px);
    border-radius: 22px 22px 0 0;
    border-right: 0;
    border-left: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .assistant-form {
    grid-template-columns: minmax(0, 1fr) 44px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .game-layout {
    padding: 0 4px 12px;
  }

  .assistant-messages {
    max-height: none;
    min-height: 0;
  }

  .assistant-suggestions {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .site-footer {
    padding-bottom: 104px;
  }

  .sticky-cta {
    display: block;
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .sticky-cta .btn {
    min-height: 50px;
    background: linear-gradient(135deg, var(--hero-red), #b9131a);
    box-shadow: 0 14px 34px rgba(227, 27, 35, 0.32);
  }
}

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

  .btn:hover,
  .choice-card:hover,
  .counter:hover,
  .mission-panel:hover,
  .rsvp-form:hover,
  .mission-pass:hover,
  .briefing-card:hover {
    transform: none;
  }
}
