:root {
  --bg: #0a050d;
  --bg-soft: #130a18;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #fff7ed;
  --muted: rgba(255, 247, 237, 0.74);
  --gold: #f9bd48;
  --orange: #ff7a18;
  --pink: #ff3db8;
  --red: #ff334e;
  --cyan: #23d3ff;
  --green: #25f8a6;
  --border: rgba(255, 255, 255, 0.16);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 61, 184, 0.14), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(35, 211, 255, 0.14), transparent 32rem),
    radial-gradient(circle at 40% 80%, rgba(249, 189, 72, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 70%);
  z-index: -1;
}

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

button, select { font: inherit; }

button, a, select, summary { touch-action: manipulation; }

a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: #14090b;
  padding: .75rem 1rem;
  border-radius: 999px;
  z-index: 1000;
}

.skip-link:focus { top: 1rem; }

.site-shell { min-height: 100vh; }

.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), var(--max));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 5, 13, 0.66);
  backdrop-filter: blur(22px);
  box-shadow: 0 14px 50px rgba(0,0,0,.28);
  z-index: 50;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 900;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #1a0a0c;
  background: linear-gradient(135deg, var(--gold), var(--orange), var(--pink));
  box-shadow: 0 0 30px rgba(255, 122, 24, .32);
}

.nav-links {
  display: flex;
  gap: .15rem;
  color: var(--muted);
  font-size: .92rem;
}

.nav-links a {
  padding: .62rem .85rem;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255,255,255,.09);
  color: var(--text);
}

.section {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
  padding: 86px 0;
}

.hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0 0 42px 42px;
  background-image: url("assets/hero.jpg");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,5,13,.92), rgba(10,5,13,.44) 52%, rgba(10,5,13,.78)),
    linear-gradient(0deg, rgba(10,5,13,1), transparent 28%, rgba(10,5,13,.26));
}

.hero__content {
  width: min(calc(100% - 32px), var(--max));
  padding-top: 8rem;
}

.eyebrow {
  margin: 0 0 .9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 900;
}

.hero h1 {
  margin: 0;
  max-width: 900px;
  text-transform: uppercase;
  font-size: clamp(4.4rem, 13vw, 12rem);
  line-height: .78;
  letter-spacing: -.09em;
  text-shadow: 0 12px 70px rgba(0,0,0,.6);
}

.hero__tagline {
  margin: 1.2rem 0 0;
  max-width: 780px;
  font-size: clamp(1.6rem, 4.5vw, 4.5rem);
  line-height: .95;
  font-weight: 950;
  letter-spacing: -.06em;
}

.hero__copy {
  margin: 1.2rem 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: 2rem;
}

.hero__actions--center { justify-content: center; }

.btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .95rem 1.2rem;
  min-height: 48px;
  cursor: pointer;
  font-weight: 900;
  color: var(--text);
  background: rgba(255,255,255,.08);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
}

.btn--primary {
  color: #1a090b;
  background: linear-gradient(135deg, var(--gold), var(--orange), var(--pink));
  border: 0;
  box-shadow: 0 18px 54px rgba(255, 75, 48, .28);
}

.btn--primary:hover,
.btn--primary:focus-visible { box-shadow: 0 20px 68px rgba(255, 75, 48, .42); }

.btn--danger {
  color: #fff;
  background: linear-gradient(135deg, #d8152d, #ff6a00);
  border: 0;
  box-shadow: 0 18px 54px rgba(255, 51, 78, .24);
}

.btn--ghost { background: rgba(255,255,255,.08); }

.btn--full { width: 100%; }

.hero__status-card {
  position: absolute;
  right: max(16px, calc((100% - var(--max)) / 2));
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: .6rem;
  width: min(420px, calc(100% - 32px));
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 5, 13, .64);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  color: var(--muted);
}

.live-dot {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(37, 248, 166, .7);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 14px rgba(37, 248, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 248, 166, 0); }
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 32px;
}

.stat-card,
.info-card,
.ticket-panel,
.alert-panel,
.incident-form,
.timeline,
details,
.final-cta,
.safe-page__card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.055));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.stat-card {
  padding: 1.45rem;
}

.stat-card__number {
  display: block;
  font-size: clamp(2rem, 6vw, 4.8rem);
  line-height: .9;
  font-weight: 950;
  letter-spacing: -.08em;
}

.stat-card__label {
  display: block;
  margin-top: .7rem;
  color: var(--muted);
  font-weight: 800;
}

.section-heading {
  max-width: 740px;
  margin-bottom: 2rem;
}

.section-heading h2,
.info-card h2,
.final-cta h2 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: .92;
  letter-spacing: -.07em;
}

.section-heading p:not(.eyebrow),
.final-cta p {
  color: var(--muted);
  font-size: 1.08rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
  gap: 1.25rem;
  align-items: stretch;
}

.split-layout--reverse { grid-template-columns: minmax(340px, .9fr) minmax(0, 1fr); }

.image-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.image-card::after,
.party-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(10,5,13,.62), transparent 52%);
}

.image-card__stamp {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  padding: .65rem .9rem;
  border: 2px solid rgba(249, 189, 72, .9);
  border-radius: 12px;
  color: var(--gold);
  font-weight: 950;
  letter-spacing: .08em;
  transform: rotate(-4deg);
  background: rgba(10,5,13,.58);
}

.image-card__stamp--red {
  color: #fff;
  border-color: rgba(255,51,78,.95);
  background: rgba(255,51,78,.2);
}

.ticket-panel {
  padding: 1rem;
}

.ticket {
  position: relative;
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  text-align: left;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(255,255,255,.055);
  margin-bottom: .75rem;
  cursor: pointer;
}
.ticket:not(.sold-out):hover,
.ticket:not(.sold-out):focus-visible {
  transform: translateY(-1px);
  border-color: rgba(249, 189, 72, .42);
  background: rgba(249, 189, 72, .06);
}

.ticket h3 { margin: 0; font-size: 1.02rem; }
.ticket p { margin: .25rem 0 0; color: var(--muted); }
.ticket > span {
  flex: 0 0 auto;
  font-size: .76rem;
  font-weight: 950;
  color: #14090b;
  background: var(--gold);
  padding: .38rem .55rem;
  border-radius: 999px;
}
.ticket.selected { border-color: rgba(249, 189, 72, .75); background: rgba(249, 189, 72, .10); box-shadow: 0 0 0 2px rgba(249, 189, 72, .12) inset; }
.ticket.selected::after {
  content: "✓";
  position: absolute;
  right: -8px;
  top: -8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #16080a;
  background: var(--gold);
  font-weight: 950;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.ticket.sold-out { opacity: .64; cursor: not-allowed; }
.ticket.sold-out > span { background: var(--red); color: #fff; }
.ticket-choice {
  margin: .3rem 0 .9rem;
  padding: .85rem 1rem;
  border: 1px dashed rgba(249, 189, 72, .34);
  border-radius: 16px;
  color: var(--gold);
  background: rgba(249, 189, 72, .07);
  font-weight: 850;
}

.archive-section { width: min(calc(100% - 32px), 1320px); }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.party-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.party-card img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform .45s ease;
}

.party-card:hover img { transform: scale(1.05); }

.party-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.25rem;
}

.party-card h3 {
  margin: 0 0 .9rem;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: .95;
  letter-spacing: -.05em;
}
.party-card p { margin: .35rem 0; color: var(--muted); }
.party-card strong { color: var(--text); }

.alert-panel { padding: 1.3rem; }
.alert-badge {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: .5rem .7rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 950;
  letter-spacing: .12em;
}
.alert-panel h3 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: .9;
  letter-spacing: -.07em;
}
.alert-panel p { color: var(--muted); font-size: 1.06rem; }
.meter {
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--green), var(--gold), var(--orange), var(--red));
  overflow: hidden;
  margin: 1.3rem 0;
}
.meter span {
  display: block;
  width: 86%;
  height: 100%;
  border-right: 5px solid #fff;
  animation: dangerWiggle 1.6s infinite;
}
@keyframes dangerWiggle {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(5%); }
}
.alert-levels { display: grid; gap: .65rem; }
.alert-levels div {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.05);
}
.alert-levels .active {
  border-color: rgba(255,51,78,.68);
  background: rgba(255,51,78,.12);
}
.alert-levels strong { color: var(--gold); }
.alert-levels span { color: var(--muted); }

.incident-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.1rem;
}
.incident-form label {
  display: grid;
  gap: .5rem;
  color: var(--muted);
  font-weight: 850;
}
.incident-form select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 .9rem;
  color: var(--text);
  background: rgba(10,5,13,.72);
}
.incident-form .btn,
.incident-result { grid-column: 1 / -1; }
.incident-result {
  min-height: 1.4rem;
  margin: 0;
  color: var(--gold);
  font-weight: 900;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.info-card { padding: 1.4rem; }
.check-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: .7rem;
}
.check-list li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--muted);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 950;
}

.timeline {
  display: grid;
  overflow: hidden;
}
.timeline div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.timeline div:last-child { border-bottom: 0; }
.timeline time {
  color: var(--gold);
  font-weight: 950;
}
.timeline span { color: var(--muted); }

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
details { padding: 1rem 1.1rem; }
summary {
  cursor: pointer;
  font-weight: 950;
  font-size: 1.08rem;
}
details p { color: var(--muted); margin-bottom: 0; }

.final-cta {
  text-align: center;
  padding: clamp(2rem, 6vw, 5rem);
}
.final-cta p { max-width: 660px; margin: 1rem auto 0; }

.site-footer {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  text-align: center;
  font-size: .92rem;
}

.checkout-modal {
  width: min(560px, calc(100% - 32px));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.25rem;
  color: var(--text);
  background: rgba(16, 7, 20, .96);
  box-shadow: var(--shadow);
}
.checkout-modal::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.checkout-modal h2 {
  margin: 0 2rem 1rem 0;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.modal-close {
  position: absolute;
  right: .8rem;
  top: .8rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
}
.checkout-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  margin: 1rem 0;
}
.checkout-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.checkout-row:last-child { border-bottom: 0; }
.checkout-row span { color: var(--muted); }
.checkout-status {
  min-height: 90px;
  display: grid;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}
.checkout-status p { margin: 0; color: var(--muted); }
.checkout-status .sold { color: var(--red); font-size: 2rem; font-weight: 950; letter-spacing: -.05em; }
.modal-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.marty-follower {
  position: fixed;
  left: 0;
  top: 0;
  width: 78px;
  height: 78px;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-120px, -120px, 0);
  opacity: 0;
  filter: drop-shadow(0 16px 20px rgba(0,0,0,.45));
  transition: opacity .25s ease, scale .2s ease;
}
.marty-follower img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 65%;
  animation: martyFloat 2.4s ease-in-out infinite;
}
.marty-follower.visible { opacity: 1; }
.marty-follower.excited { scale: 1.22; }
.marty-follower.excited img { animation: martyPanic .35s ease-in-out infinite; }
@keyframes martyFloat {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-7px) rotate(5deg); }
}
@keyframes martyPanic {
  0%,100% { transform: translateY(0) rotate(-13deg); }
  50% { transform: translateY(-8px) rotate(13deg); }
}
.marty-pop {
  position: fixed;
  width: 46px;
  height: 46px;
  pointer-events: none;
  z-index: 9998;
  background: url("assets/marty-face.png") center / contain no-repeat;
  animation: popMarty .65s ease-out forwards;
}
@keyframes popMarty {
  from { opacity: .95; transform: translate(-50%, -50%) scale(.7) rotate(0deg); }
  to { opacity: 0; transform: translate(-50%, -120%) scale(1.35) rotate(22deg); }
}

.safe-page {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 1rem;
  background: #f4f5f7;
  color: #18202a;
  z-index: 10000;
}
body.safe-mode .safe-page { display: grid; }
body.safe-mode .site-shell,
body.safe-mode .marty-follower { display: none; }
.safe-page__card {
  width: min(760px, 100%);
  padding: clamp(1.5rem, 5vw, 3rem);
  background: #fff;
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 30px 90px rgba(0,0,0,.16);
}
.safe-page .eyebrow { color: #315a8b; }
.safe-page h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.5rem);
  letter-spacing: -.06em;
  line-height: .95;
}
.safe-page p { color: #52606d; }
.safe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin: 1.5rem 0;
}
.safe-grid span {
  padding: 1rem;
  border-radius: 14px;
  background: #eef2f6;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }

@media (max-width: 900px) {
  .site-header { top: 10px; width: min(calc(100% - 20px), var(--max)); }
  .nav-links { display: none; }
  .hero { min-height: 92svh; border-radius: 0 0 30px 30px; }
  .hero__content { padding-top: 5rem; }
  .hero__status-card { position: static; width: min(calc(100% - 32px), var(--max)); margin: -90px auto 0; transform: none; border-radius: 20px; }
  .intro-strip,
  .split-layout,
  .split-layout--reverse,
  .archive-grid,
  .cards-grid,
  .faq-grid,
  .incident-form { grid-template-columns: 1fr; }
  .image-card, .party-card { min-height: 360px; }
  .section { padding: 64px 0; }
  .archive-section { width: min(calc(100% - 32px), var(--max)); }
}

@media (max-width: 560px) {
  .hero h1 { font-size: clamp(4.2rem, 24vw, 6.5rem); }
  .hero__tagline { font-size: 2rem; }
  .btn { width: 100%; justify-content: center; display: inline-flex; align-items: center; }
  .hero__actions { width: 100%; }
  .stat-card { padding: 1.1rem; }
  .timeline div { grid-template-columns: 1fr; gap: .2rem; }
  .alert-levels div { grid-template-columns: 1fr; gap: .25rem; }
  .checkout-row { flex-direction: column; gap: .25rem; }
  .modal-actions .btn { width: 100%; }
  .safe-grid { grid-template-columns: 1fr; }
}

@media (pointer: coarse) {
  .marty-follower { display: none !important; }
  .marty-pop { width: 64px; height: 64px; animation-duration: .95s; }
}

@media (prefers-reduced-motion: reduce) {
  .marty-follower, .marty-pop { display: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Version 3 Easter eggs */
.party-card {
  cursor: zoom-in;
}
.party-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.footer-link {
  display: inline-flex;
  margin-top: .85rem;
  border: 0;
  border-bottom: 1px dashed rgba(255, 247, 237, .55);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
}
.footer-link:hover,
.footer-link:focus-visible { color: var(--text); }

.gallery-modal,
.terms-modal {
  width: min(1100px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 0;
  color: var(--text);
  background: rgba(16, 7, 20, .97);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.gallery-modal::backdrop,
.terms-modal::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(12px); }

.gallery-modal img {
  width: 100%;
  max-height: 72svh;
  object-fit: contain;
  background: #070308;
}
.gallery-caption {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
}
.gallery-caption h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: .92;
  letter-spacing: -.06em;
}
.gallery-caption p:not(.eyebrow) {
  margin: .5rem 0 0;
  color: var(--muted);
}
.gallery-close,
.terms-close { z-index: 4; }

.terms-modal {
  width: min(760px, calc(100% - 28px));
  padding: 1.25rem;
}
.terms-modal h2 {
  margin: 0 2rem 1rem 0;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.terms-list {
  display: grid;
  gap: .7rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}
.terms-list li {
  position: relative;
  padding: .85rem .95rem .85rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
}
.terms-list li::before {
  content: "⚠";
  position: absolute;
  left: .9rem;
  color: var(--gold);
  font-weight: 950;
}

.marty-pop--captioned {
  width: 58px;
  height: 58px;
  z-index: 10002;
  animation-duration: 1.15s;
}
.marty-caption {
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  max-width: 230px;
  padding: .42rem .62rem;
  border: 1px solid rgba(249, 189, 72, .54);
  border-radius: 999px;
  color: #18080c;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 12px 28px rgba(0,0,0,.32);
  font-size: .78rem;
  font-weight: 950;
  line-height: 1;
}

.marty-mode-banner {
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 28px));
  z-index: 10001;
  display: grid;
  gap: .25rem;
  padding: 1rem 1.1rem;
  border: 2px solid rgba(249, 189, 72, .9);
  border-radius: 20px;
  text-align: center;
  color: #170709;
  background: linear-gradient(135deg, var(--gold), var(--orange), var(--pink));
  box-shadow: 0 22px 70px rgba(255, 51, 78, .38);
  animation: martyBanner .28s ease-out both;
}
.marty-mode-banner strong {
  font-size: 1.1rem;
  letter-spacing: .08em;
}
.marty-mode-banner span { font-weight: 850; }
@keyframes martyBanner {
  from { opacity: 0; transform: translate(-50%, -20px) scale(.94); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.marty-rain {
  position: fixed;
  top: -90px;
  width: 54px;
  height: 54px;
  z-index: 10000;
  pointer-events: none;
  background: url("assets/marty-face.png") center / contain no-repeat;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,.38));
  animation-name: martyRain;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes martyRain {
  to { transform: translate3d(0, calc(100svh + 160px), 0) rotate(calc(var(--spin) * 540deg)); opacity: .15; }
}

body.marty-mode .site-shell {
  animation: martySiteWobble .34s ease-in-out infinite;
}
body.marty-mode .alert-badge,
body.marty-mode .brand-mark {
  animation: martyGlow .28s ease-in-out infinite alternate;
}
@keyframes martySiteWobble {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  75% { transform: translateX(1px); }
}
@keyframes martyGlow {
  from { filter: saturate(1); box-shadow: 0 0 18px rgba(249,189,72,.4); }
  to { filter: saturate(1.6); box-shadow: 0 0 46px rgba(255,61,184,.75); }
}

@media (max-width: 560px) {
  .gallery-modal,
  .terms-modal { width: calc(100% - 18px); border-radius: 22px; }
  .gallery-modal img { max-height: 68svh; }
  .gallery-caption { padding: .9rem; }
  .marty-caption { max-width: 180px; font-size: .72rem; }
  .marty-mode-banner { top: 12px; }
}

/* Version 4 final Easter eggs */
.stacked-actions {
  display: grid;
  gap: .75rem;
}

.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.tiny-hint {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.alert-badge {
  cursor: pointer;
  user-select: none;
}
.alert-badge:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.footer-disclaimer {
  margin-top: .6rem;
  color: rgba(255, 247, 237, .62);
  font-size: .88rem;
}

.emergency-loader {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: none;
  place-items: center;
  padding: 1rem;
  background: radial-gradient(circle at 50% 10%, rgba(255, 61, 184, .28), transparent 42%), rgba(8, 2, 10, .92);
  color: var(--text);
  backdrop-filter: blur(10px);
}
body.emergency-loading .emergency-loader { display: grid; }
.emergency-loader__card {
  width: min(600px, 100%);
  padding: clamp(1.25rem, 5vw, 2.3rem);
  border: 1px solid rgba(249, 189, 72, .42);
  border-radius: 28px;
  background: rgba(255,255,255,.075);
  box-shadow: var(--shadow);
  text-align: center;
}
.emergency-loader__card h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.emergency-loader__card p:last-child {
  margin: 1rem 0 0;
  color: var(--gold);
  font-weight: 950;
}

.safe-table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.5rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
}
.safe-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.safe-table th,
.safe-table td {
  padding: .75rem .8rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.safe-table th {
  color: #263645;
  background: #eef2f6;
}
.safe-table tr:last-child td { border-bottom: 0; }
.safe-table td:last-child { font-weight: 900; }

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10002;
  display: grid;
  gap: .75rem;
  width: min(360px, calc(100% - 36px));
  pointer-events: none;
}
.toast {
  transform: translateY(14px) scale(.98);
  opacity: 0;
  padding: .95rem 1rem;
  border: 1px solid rgba(249, 189, 72, .42);
  border-radius: 18px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(28, 10, 35, .95), rgba(65, 15, 42, .95));
  box-shadow: 0 16px 50px rgba(0,0,0,.38);
  font-weight: 850;
  line-height: 1.35;
  transition: opacity .28s ease, transform .28s ease;
}
.toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-frame {
  position: relative;
  display: grid;
  place-items: center;
  background: #070308;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  color: var(--text);
  background: rgba(0,0,0,.36);
  cursor: pointer;
  font-size: 2.4rem;
  line-height: 1;
  z-index: 3;
}
.gallery-nav:hover,
.gallery-nav:focus-visible {
  background: rgba(249, 189, 72, .25);
  outline: none;
}
.gallery-prev { left: .7rem; }
.gallery-next { right: .7rem; }

.action-modal .action-body {
  display: grid;
  gap: .75rem;
  margin: 1rem 0 1.25rem;
}
.action-modal .action-body p {
  margin: 0;
  padding: .85rem .95rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
}
.action-modal .action-body strong { color: var(--text); }

body.siren-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 51, 78, .22), transparent 34%, rgba(249, 189, 72, .18));
  animation: sirenFlash .18s ease-in-out infinite alternate;
}
@keyframes sirenFlash {
  from { opacity: .15; filter: hue-rotate(0deg); }
  to { opacity: .82; filter: hue-rotate(55deg); }
}

@media (max-width: 700px) {
  .alert-actions { display: grid; }
  .gallery-nav { width: 42px; height: 54px; font-size: 2rem; }
  .gallery-prev { left: .35rem; }
  .gallery-next { right: .35rem; }
  .toast-region { right: 12px; bottom: 12px; width: calc(100% - 24px); }
}

/* Version 4 final Easter eggs */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9998;
  display: grid;
  gap: .7rem;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}
.toast {
  display: grid;
  gap: .18rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(249, 189, 72, .35);
  border-radius: 18px;
  color: var(--text);
  background: rgba(17, 7, 22, .9);
  box-shadow: 0 20px 60px rgba(0,0,0,.34);
  backdrop-filter: blur(18px);
  animation: toastIn .26s ease-out both;
}
.toast strong { color: var(--gold); font-weight: 950; }
.toast span { color: var(--muted); font-size: .94rem; }
.toast.leaving { animation: toastOut .32s ease-in both; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(12px) scale(.98); }
}

.emergency-loading {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 1rem;
  z-index: 10003;
  color: var(--text);
  background: rgba(4, 2, 7, .86);
  backdrop-filter: blur(18px);
}
body.emergency-active .emergency-loading { display: grid; }
.emergency-loading__card {
  width: min(520px, 100%);
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 28px;
  text-align: center;
  background: rgba(255,255,255,.09);
  box-shadow: var(--shadow);
}
.emergency-loading__card h2 {
  margin: .2rem 0 .45rem;
  font-size: clamp(2rem, 7vw, 3.7rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.emergency-loading__card p:not(.eyebrow) { color: var(--muted); font-weight: 850; }
.spinner {
  display: inline-block;
  width: 54px;
  height: 54px;
  margin-bottom: .65rem;
  border: 5px solid rgba(255,255,255,.22);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.safe-table {
  margin: 1.2rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  font-size: .95rem;
}
.safe-table div {
  display: grid;
  grid-template-columns: .8fr 1.2fr 1.2fr;
  gap: .5rem;
  padding: .72rem .85rem;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.safe-table div:first-child { background: #e8edf3; }
.safe-table div:last-child { border-bottom: 0; }
.safe-table span { color: #52606d; font-weight: 750; }

.alert-trigger {
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}
.alert-trigger:hover,
.alert-trigger:focus-visible {
  transform: translateY(-1px) scale(1.03);
  filter: saturate(1.3);
}
.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 0 0 .85rem;
}
.alert-actions .btn { padding: .78rem 1rem; }
.micro-copy {
  margin: 0 0 1rem !important;
  color: rgba(255, 247, 237, .56) !important;
  font-size: .9rem !important;
}

.tools-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.tool-card {
  display: grid;
  gap: .55rem;
  min-height: 210px;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04)),
    rgba(12, 6, 16, .66);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(249, 189, 72, .55);
  background: linear-gradient(145deg, rgba(249,189,72,.18), rgba(255,61,184,.08));
}
.tool-card span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #170709;
  background: var(--gold);
  font-weight: 950;
}
.tool-card strong {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1;
  letter-spacing: -.04em;
}
.tool-card em {
  color: var(--muted);
  font-style: normal;
}

.utility-modal {
  width: min(620px, calc(100% - 32px));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.25rem;
  color: var(--text);
  background: rgba(16, 7, 20, .96);
  box-shadow: var(--shadow);
}
.utility-modal::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.utility-modal h2 {
  margin: 0 2rem 1rem 0;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.utility-status {
  min-height: 58px;
  display: grid;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 18px;
  color: var(--gold);
  background: rgba(255,255,255,.07);
  font-weight: 900;
}
.utility-output {
  display: grid;
  gap: .45rem;
  color: var(--muted);
}
.utility-output h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: .95;
  letter-spacing: -.05em;
}
.utility-output p { margin: 0; }

.gallery-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 4;
  width: 50px;
  height: 58px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(10, 5, 13, .62);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 2.5rem;
  line-height: 1;
}
.gallery-prev { left: .75rem; }
.gallery-next { right: .75rem; }
.gallery-nav:hover,
.gallery-nav:focus-visible { background: rgba(249,189,72,.28); }

.siren-flash {
  position: fixed;
  inset: 0;
  z-index: 10004;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,51,78,.32) 0 12%, rgba(35,211,255,.25) 12% 24%);
  mix-blend-mode: screen;
  animation: sirenFlash .18s steps(2, end) infinite;
}
@keyframes sirenFlash {
  50% { opacity: .15; transform: translateX(2px); }
}
body.siren-mode .site-shell { animation: martySiteWobble .16s ease-in-out infinite; }

.footer-disclaimer {
  max-width: 760px;
  margin: .45rem auto 0 !important;
  color: rgba(255, 247, 237, .52) !important;
  font-size: .9rem;
}

@media (max-width: 900px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: auto; }
  .toast-container { left: 14px; right: 14px; bottom: 14px; width: auto; }
}

@media (max-width: 560px) {
  .alert-actions .btn { width: 100%; }
  .gallery-nav { width: 42px; height: 50px; font-size: 2rem; top: 42%; }
  .gallery-prev { left: .35rem; }
  .gallery-next { right: .35rem; }
  .safe-table { font-size: .8rem; }
  .safe-table div { grid-template-columns: .65fr 1fr 1fr; padding: .6rem; }
  .utility-modal { width: calc(100% - 18px); border-radius: 22px; }
}

/* Version 4 alignment styles */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10002;
  display: grid;
  gap: .75rem;
  width: min(360px, calc(100% - 36px));
  pointer-events: none;
}

body.is-emergency-loading .emergency-loading { display: grid; }
.emergency-loading {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: none;
  place-items: center;
  padding: 1rem;
  background: radial-gradient(circle at 50% 10%, rgba(255, 61, 184, .28), transparent 42%), rgba(8, 2, 10, .92);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.emergency-loading__card {
  width: min(600px, 100%);
  padding: clamp(1.25rem, 5vw, 2.3rem);
  border: 1px solid rgba(249, 189, 72, .42);
  border-radius: 28px;
  background: rgba(255,255,255,.075);
  box-shadow: var(--shadow);
  text-align: center;
}
.emergency-loading__card h2 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.emergency-loading__card p:last-child {
  margin: 1rem 0 0;
  color: var(--gold);
  font-weight: 950;
}
.spinner {
  width: 42px;
  height: 42px;
  display: inline-block;
  border: 4px solid rgba(255,255,255,.18);
  border-top-color: var(--gold);
  border-radius: 999px;
  animation: spin .75s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.safe-table {
  display: grid;
  margin: 1.2rem 0 1.5rem;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  overflow: hidden;
  font-size: .9rem;
}
.safe-table > div {
  display: grid;
  grid-template-columns: .7fr 1fr 1fr;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.safe-table > div:last-child { border-bottom: 0; }
.safe-table strong,
.safe-table span {
  padding: .7rem .75rem;
}
.safe-table > div:first-child { background: #eef2f6; }
.safe-table span:last-child { font-weight: 900; }

.tools-section { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.tool-card {
  text-align: left;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.035));
  box-shadow: 0 18px 55px rgba(0,0,0,.22);
  cursor: pointer;
}
.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(249, 189, 72, .48);
  outline: none;
}
.tool-card span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #18070c;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  font-weight: 950;
}
.tool-card strong {
  display: block;
  margin: 1rem 0 .45rem;
  font-size: 1.35rem;
  letter-spacing: -.04em;
}
.tool-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.alert-trigger {
  border: 0;
  cursor: pointer;
}
.micro-copy {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 850;
  margin: 1rem 0 .75rem;
}
.utility-modal {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.25rem;
  color: var(--text);
  background: rgba(16, 7, 20, .97);
  box-shadow: var(--shadow);
  overflow: auto;
}
.utility-modal::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(12px); }
.utility-modal h2 {
  margin: 0 2rem 1rem 0;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.utility-status,
.utility-output p {
  margin: .7rem 0;
  padding: .85rem .95rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
}
.utility-output strong { color: var(--text); }
.gallery-modal { position: relative; }

@media (max-width: 900px) {
  .tools-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .safe-table > div { grid-template-columns: 1fr; }
  .toast-container { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .utility-modal { width: calc(100% - 18px); border-radius: 22px; }
}
