/* Event page — event detail, tiers, attendees, and related performance rules. Keep this file linked in source order. */

/* ────────────────────────────────────────────────────────────────
   EVENT PAGE — redesigned
   ──────────────────────────────────────────────────────────────── */

.event-page {
  position: relative;
  z-index: 1;
  padding: 88px 0 88px;
}

body:has(.event-page) .nav-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  padding-top: 12px;
}

body:has(.event-page) .nav-bar {
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 32px rgba(var(--accent-rgb), 0.10);
}

body:has(.event-page) .logo-img {
  height: 34px;
}

/* Hero */

.event-hero-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 14px 20px 4px;
}

.event-hero-v2-flyer {
  position: relative;
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
}

.event-hero-v2-text {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
}

.event-hero-v2-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-2) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

body.light-mode .event-hero-v2-title {
  background: linear-gradient(180deg, #0c1a27 0%, var(--accent) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.event-hero-v2-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.event-hero-v2-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.event-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-on);
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0;
  box-shadow: 0 14px 40px rgba(var(--accent-rgb), 0.32);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.event-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(var(--accent-rgb), 0.46);
}

.event-cta-primary-lg {
  height: 58px;
  padding: 0 34px;
  font-size: 1.05rem;
}

.event-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  font-size: 0.94rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.event-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

body.light-mode .event-cta-secondary {
  background: rgba(18, 41, 62, 0.05);
}

.event-countdown-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.event-countdown-chip-icon {
  color: var(--accent);
  font-size: 0.95rem;
}

.event-countdown-chip.is-ended {
  color: var(--muted-2);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.025);
}

/* Quick facts */

.event-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: min(920px, calc(100% - 32px));
  margin: 22px auto 0;
}

.event-fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 14px;
  border-radius: 18px;
  background: rgba(14, 18, 26, 0.65);
  border: 1px solid var(--border);
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.event-fact:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

body.light-mode .event-fact {
  background: rgba(255, 255, 255, 0.7);
}

.event-fact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--accent);
  margin-bottom: 4px;
}

.event-fact-icon svg {
  width: 18px;
  height: 18px;
}

.event-fact-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
}

.event-fact-value {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0;
}

.event-fact-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0;
}

/* Blurb */

.event-blurb {
  width: min(720px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 22px 24px;
  border-radius: 18px;
  border-left: 3px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.04);
  text-align: center;
}

.event-blurb p {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.6;
  text-wrap: balance;
}

body.light-mode .event-blurb {
  background: rgba(var(--accent-rgb), 0.06);
}

/* Section heads */

.event-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.event-section-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.event-section-head-sm h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.event-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
  color: var(--accent);
  font-weight: 800;
}

.event-section-icon svg {
  width: 16px;
  height: 16px;
}

/* Tiers */

.event-tiers {
  width: min(920px, calc(100% - 32px));
  margin: 36px auto 0;
}

.event-ticket-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 0%, rgba(var(--accent-rgb), 0.14), transparent 52%),
    rgba(14, 18, 26, 0.72);
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
}

body.light-mode .event-ticket-panel {
  background:
    radial-gradient(circle at 78% 0%, rgba(var(--accent-rgb), 0.14), transparent 52%),
    rgba(255, 255, 255, 0.78);
}

.event-ticket-copy {
  min-width: 0;
}

.event-ticket-copy .event-section-head {
  margin-bottom: 10px;
}

.event-ticket-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 28ch;
}

.event-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  justify-content: stretch;
  width: 100%;
}

.event-tier {
  position: relative;
  width: 100%;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 22px;
  border-radius: 18px;
  background: rgba(14, 18, 26, 0.7);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.event-tier:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

body.light-mode .event-tier {
  background: rgba(255, 255, 255, 0.78);
}

.event-tier.is-featured {
  border-color: rgba(var(--accent-rgb), 0.45);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.12), transparent 70%),
    rgba(14, 18, 26, 0.85);
  box-shadow: 0 16px 40px rgba(var(--accent-rgb), 0.18);
}

button.event-tier {
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

@media (max-width: 720px) {
  .event-ticket-panel {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .event-ticket-note {
    max-width: none;
  }

  .event-tier-grid {
    grid-template-columns: 1fr;
  }
}

body.light-mode .event-tier.is-featured {
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.16), transparent 70%),
    rgba(255, 255, 255, 0.85);
}

.event-tier.is-soldout {
  opacity: 0.55;
}

.event-tier.is-soldout .event-tier-price {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 99, 99, 0.55);
}

.event-tier-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-on);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35);
}

.event-tier-badge-soldout {
  background: rgba(255, 99, 99, 0.18);
  color: #ffb4b4;
  box-shadow: none;
  border: 1px solid rgba(255, 99, 99, 0.30);
}

.event-tier-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.event-tier-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.event-tier.is-featured .event-tier-price {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.event-tier-cap {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

.event-tier-cta {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
}

.event-tier-cta:hover {
  transform: translateX(2px);
}

/* Know before */

.event-know {
  width: min(720px, calc(100% - 32px));
  margin: 38px auto 0;
}

.event-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: step;
}

.event-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(14, 18, 26, 0.65);
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.event-steps li:hover {
  border-color: var(--border-strong);
}

body.light-mode .event-steps li {
  background: rgba(255, 255, 255, 0.7);
}

.event-step-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-2-rgb), 0.10));
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
}

.event-step-text {
  flex: 1;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
  padding-top: 4px;
}

/* Final row: rules + address */

.event-final {
  width: min(920px, calc(100% - 32px));
  margin: 38px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1.15fr);
  gap: 16px;
  align-items: stretch;
}

.event-final:not(:has(.event-address)),
.event-final:not(:has(.event-rules)) {
  grid-template-columns: 1fr;
}

.event-final:not(:has(.event-address)) {
  width: min(720px, calc(100% - 32px));
}

@media (max-width: 600px) {
  .event-final {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.event-rules,
.event-address {
  padding: 18px;
  border-radius: 18px;
  background: rgba(14, 18, 26, 0.65);
  border: 1px solid var(--border);
}

body.light-mode .event-rules,
body.light-mode .event-address {
  background: rgba(255, 255, 255, 0.74);
}

.event-rule-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-rule-pill {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

body.light-mode .event-rule-pill {
  background: rgba(255, 255, 255, 0.7);
}

.event-address-line {
  margin: 0 0 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.event-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
  gap: 16px;
  align-items: stretch;
}

.event-address-copy {
  min-width: 0;
}

.event-address-venue {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event-address-link {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.event-address-link:hover {
  text-decoration: underline;
}

.event-map-preview {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  padding: 16px;
  border-radius: 16px;
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-2-rgb), 0.08)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 12px),
    rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
}

.event-map-preview:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 34px rgba(var(--accent-rgb), 0.16);
}

.event-map-pin {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.30);
}

.event-map-pin svg {
  width: 19px;
  height: 19px;
}

.event-map-preview span:not(.event-map-pin) {
  font-weight: 800;
  line-height: 1.2;
}

.event-map-preview small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .event-address {
    grid-template-columns: 1fr;
  }

  .event-map-preview {
    min-height: 112px;
  }
}

/* Final CTA */

.event-finalcta {
  width: min(720px, calc(100% - 32px));
  margin: 44px auto 0;
}

.event-finalcta-inner {
  position: relative;
  padding: 38px 26px;
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.18), transparent 65%),
    linear-gradient(180deg, rgba(14, 18, 26, 0.90), rgba(11, 13, 21, 0.90));
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  overflow: hidden;
}

body.light-mode .event-finalcta-inner {
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.18), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(244, 249, 255, 0.85));
}

.event-finalcta-inner h2 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0;
}

.event-finalcta-inner p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.96rem;
}

/* Warning / footer */

.event-warning {
  width: min(720px, calc(100% - 32px));
  margin: 22px auto 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.event-foot {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* Sticky CTA bar (appears on scroll past hero) */

.event-sticky-cta {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  /* Resting state: parked below the viewport with a soft shrink so the
     reveal feels physical rather than a simple opacity flip. */
  transform: translate(-50%, calc(100% + 40px)) scale(0.96);
  transform-origin: 50% 100%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  background: rgba(15, 19, 28, 0.94);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    transform 0.55s cubic-bezier(0.16, 0.84, 0.24, 1),
    opacity 0.45s cubic-bezier(0.16, 0.84, 0.24, 1);
  opacity: 0;
  pointer-events: none;
  max-width: min(620px, calc(100% - 24px));
  will-change: transform, opacity;
}

.event-sticky-cta.is-visible {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.event-sticky-cta.is-blocked {
  transform: translate(-50%, calc(100% + 40px)) scale(0.96);
  opacity: 0;
  pointer-events: none;
}

.event-sticky-cta.is-ended {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .event-sticky-cta {
    transition: opacity 0.2s ease;
    transform: translate(-50%, 0);
  }
  .event-sticky-cta:not(.is-visible) {
    opacity: 0;
  }
}

body.light-mode .event-sticky-cta {
  background: rgba(255, 255, 255, 0.92);
}

.event-sticky-cta-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.event-sticky-cta-meta strong {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.event-sticky-cta-meta span {
  font-size: 0.75rem;
  color: var(--muted-2);
}

.event-sticky-cta .event-cta-primary {
  height: 40px;
  padding: 0 16px;
  font-size: 0.86rem;
  white-space: nowrap;
}

@media (min-width: 721px) {
  .event-finalcta,
  .event-sticky-cta {
    display: none;
  }
}

@media (max-width: 540px) {
  .event-facts {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .event-fact {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 14px;
    gap: 14px;
  }

  .event-fact-icon {
    margin-bottom: 0;
  }

  .event-fact-label {
    flex: 0 0 56px;
  }

  .event-fact-value {
    flex: 1;
  }

  .event-sticky-cta-meta strong {
    max-width: 132px;
  }

  .event-sticky-cta {
    width: calc(100% - 28px);
    justify-content: space-between;
  }

  .event-cta-primary-lg {
    height: 52px;
    padding: 0 26px;
    font-size: 0.98rem;
  }
}

/* === Public-site polish (audit pass) ============================== */

/* Mobile hero — let the flyer breathe on small screens. */
@media (max-width: 600px) {
  body:has(.event-page) .nav-container {
    padding: 8px 10px 0;
  }

  body:has(.event-page) .event-page {
    padding-top: 80px;
  }

  body:has(.event-page) .nav-bar {
    min-height: 54px;
    padding: 6px;
  }

  body:has(.event-page) .logo-img {
    height: 29px;
  }

  .event-hero-v2 {
    padding: 10px 8px 4px;
    gap: 24px;
  }

  .event-hero-v2-flyer {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
  }

  .event-hero-v2-text {
    padding: 0 8px;
    gap: 12px;
  }

  .event-hero-v2-cta {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 2px;
  }

  .event-hero-v2-cta .event-cta-primary {
    width: 100%;
    justify-content: center;
  }

  .event-hero-v2-cta .event-cta-share {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .event-hero-v2 {
    padding: 6px 4px 2px;
    gap: 22px;
  }
}

/* Share button — sits next to "Get Tickets" in the hero. */
.event-cta-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.event-cta-share svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.event-cta-share:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.event-cta-share.is-flashed {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

body.light-mode .event-cta-share {
  background: rgba(18, 41, 62, 0.04);
}

/* Teaser countdown numbers — pulse the unit that just changed. */
@keyframes teaserNumPulse {
  0%   { transform: scale(1);    text-shadow: 0 0 28px rgba(var(--accent-rgb), 0.30); }
  35%  { transform: scale(1.07); text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.85); }
  100% { transform: scale(1);    text-shadow: 0 0 28px rgba(var(--accent-rgb), 0.30); }
}

.teaser-num.is-pulsing {
  animation: teaserNumPulse 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* Typewriter mute button — floats bottom-right of the page. */
.typewriter-mute {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 19, 28, 0.85);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.typewriter-mute:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.typewriter-mute svg {
  width: 18px;
  height: 18px;
}

.typewriter-mute .typewriter-mute-icon-on  { display: inline-block; }
.typewriter-mute .typewriter-mute-icon-off { display: none; }

.typewriter-mute.is-muted {
  color: var(--muted-2);
}

.typewriter-mute.is-muted .typewriter-mute-icon-on  { display: none; }
.typewriter-mute.is-muted .typewriter-mute-icon-off { display: inline-block; }

body.light-mode .typewriter-mute {
  background: rgba(255, 255, 255, 0.85);
}

/* === Attendees + comments (public) ================================ */

.event-attendees {
  /* Match the reading-width container used by .event-know / .event-final
     so the section doesn't bleed to the viewport edge on desktop. */
  width: min(720px, calc(100% - 32px));
  margin: 38px auto 0;
}

.event-attendees .event-section-head {
  margin-bottom: 14px;
}

/* Avatar primitive — used in attendee row, comments, and admin views. */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(var(--accent-rgb), 0.10);
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
  /* Halved shadow blur — 17 of these on the attendee grid added up to a
     real paint cost during scroll. */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-initials {
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-2-rgb), 0.06));
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.light-mode .avatar {
  border-color: rgba(18, 41, 62, 0.14);
}

/* Wraps avatar + IG badge so the badge can sit on top-left. */
.attendee-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.ig-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Canonical Instagram brand gradient. */
  background: radial-gradient(
    circle at 30% 110%,
    #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%
  );
  color: #fff;
  border: 2px solid var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.ig-badge svg {
  width: 12px;
  height: 12px;
}

/* Attendees grid — 5×2 on mobile, 8×2 on desktop. The "View all" button
   reveals the remaining rows by toggling .is-expanded on the section. */
.event-attendees-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px 10px;
  padding: 6px 0 12px;
}

@media (min-width: 600px) {
  .event-attendees-row {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 18px 10px;
  }
}

.attendee-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
  transition: transform 0.18s ease;
}

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

/* Avatar fills its grid cell up to 64px, stays a circle. */
.attendee-pill .avatar {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  transition: border-color 0.18s ease;
}

@media (min-width: 600px) {
  .attendee-avatar-wrap {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  .attendee-pill .avatar {
    max-width: none;
  }
}

.attendee-pill:hover .avatar {
  border-color: var(--accent);
}

.attendee-pill-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Collapsed: hide pills past the visible cap.
   Mobile cap = 10 (5×2). Desktop cap = 16 (8×2). */
.event-attendees:not(.is-expanded) .attendee-pill:nth-child(n+11) { display: none; }

@media (min-width: 600px) {
  /* Restore pills 11-16 on desktop, then hide 17+. */
  .event-attendees:not(.is-expanded) .attendee-pill:nth-child(n+11) { display: inline-flex; }
  .event-attendees:not(.is-expanded) .attendee-pill:nth-child(n+17) { display: none; }
}

.event-attendees-more {
  display: flex;
  justify-content: center;
  margin: 4px 0 18px;
}

/* When count fits on desktop (≤16), the View all only matters on mobile. */
@media (min-width: 600px) {
  .event-attendees-more.is-mobile-only { display: none; }
}

/* Once expanded, hide the button entirely (the JS also removes it on click,
   but this guards against pre-expanded states like deep links later). */
.event-attendees.is-expanded .event-attendees-more { display: none; }

.event-attendees-viewall {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.event-attendees-viewall:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body.light-mode .event-attendees-viewall {
  background: rgba(18, 41, 62, 0.04);
}


/* === Performance hints =========================================== */

/* Defer painting of long sections that start below the fold so first
   paint and scroll cost are bounded. Skipping .event-attendees on
   purpose — it has many images, and bulk-painting them all when the
   section enters viewport causes a worse jank spike than the savings
   are worth. */
.event-know,
.event-final,
.event-finalcta,
.event-foot {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

/* Honor reduced-motion aggressively — kill every infinite animation,
   not just the ones we wrap in JS. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.05s !important;
    scroll-behavior: auto !important;
  }
  .flyer-shimmer,
  .teaser-glow,
  .bg-glow {
    animation: none !important;
  }
  .typewriter-mute {
    display: none;
  }
}

