:root {
  --bg: #0a0c10;
  --bg2: #12161f;
  --panel: rgba(18, 22, 31, 0.88);
  --scarlet: #c8102e;
  --scarlet-hot: #e11d48;
  --gold: #d4a017;
  --gold-bright: #f5c518;
  --cream: #f4efe6;
  --muted: #a8b0c0;
  --foam: #fff8e7;
  --beer: #f59e0b;
  --border: rgba(212, 160, 23, 0.35);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  --radius: 18px;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-head: "Oswald", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(900px 500px at 15% -5%, rgba(200, 16, 46, 0.28), transparent 55%),
    radial-gradient(800px 480px at 90% 5%, rgba(212, 160, 23, 0.18), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(245, 158, 11, 0.08), transparent 55%),
    linear-gradient(180deg, #0e1218 0%, var(--bg) 45%, #07090d 100%);
  overflow-x: hidden;
}

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 50% 30%, rgba(200, 16, 46, 0.12), transparent 45%);
}

#floaties {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.floaty {
  position: absolute;
  font-size: clamp(1.2rem, 3vw, 2rem);
  opacity: 0.22;
  animation: drift linear infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

@keyframes drift {
  0% { transform: translateY(110vh) rotate(0deg); }
  100% { transform: translateY(-20vh) rotate(360deg); }
}

.top-bar,
main,
footer,
.test-panel {
  position: relative;
  z-index: 2;
}

.top-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  padding: 1.1rem 1rem 0;
}

.badge {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, 0.18);
  background: rgba(10, 12, 16, 0.55);
  color: var(--muted);
}

.badge.scarlet {
  color: #fecdd3;
  border-color: rgba(200, 16, 46, 0.55);
  background: rgba(200, 16, 46, 0.18);
}

.badge.gold {
  color: #fde68a;
  border-color: rgba(212, 160, 23, 0.55);
  background: rgba(212, 160, 23, 0.16);
}

.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-head);
  letter-spacing: 0.28em;
  font-size: 0.85rem;
  color: var(--gold-bright);
}

h1 {
  margin: 0;
  line-height: 0.95;
}

h1 .name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 6.5rem);
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff 0%, #fde68a 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(212, 160, 23, 0.25);
}

h1 .mission {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 3.2vw, 1.55rem);
  letter-spacing: 0.14em;
  color: var(--scarlet-hot);
}

.subhead {
  margin: 1.1rem auto 0;
  max-width: 36rem;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--muted);
}

.subhead strong {
  color: var(--cream);
}

.countdown-card {
  margin: 2rem auto 0;
  padding: 1.35rem 1.25rem 1.2rem;
  max-width: 520px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(200, 16, 46, 0.12), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.countdown-card.urgent {
  border-color: rgba(200, 16, 46, 0.7);
  box-shadow: 0 0 0 1px rgba(200, 16, 46, 0.35), 0 0 48px rgba(200, 16, 46, 0.25);
  animation: pulse-card 1s ease-in-out infinite;
}

@keyframes pulse-card {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.countdown-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--beer);
  box-shadow: 0 0 10px var(--beer);
  animation: blink 1.4s ease-in-out infinite;
}

.dot.live {
  background: #4ade80;
  box-shadow: 0 0 12px #4ade80;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.unit {
  min-width: 4.5rem;
}

.num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 4.4rem);
  line-height: 1;
  color: var(--foam);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.lbl {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.sep {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--scarlet);
  padding-bottom: 1rem;
}

.target-time {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.status {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-bright);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(180deg, var(--scarlet-hot), var(--scarlet));
  color: white;
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.35);
}

.btn.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(244, 239, 230, 0.28);
}

.btn.small {
  font-size: 0.82rem;
  padding: 0.5rem 0.95rem;
}

.facts,
.quotes {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0.5rem;
}

.facts h2,
.quotes h2 {
  margin: 0 0 1rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.06em;
  color: var(--gold-bright);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.fact {
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 239, 230, 0.1);
  background: rgba(18, 22, 31, 0.7);
}

.fact-icon {
  font-size: 1.6rem;
}

.fact h3 {
  margin: 0.5rem 0 0.35rem;
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.fact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.98rem;
}

.quotes {
  text-align: center;
  padding-bottom: 2rem;
}

#quote-box {
  margin: 0 auto 1rem;
  max-width: 40rem;
  padding: 1.25rem 1.4rem;
  border-left: 4px solid var(--scarlet);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(200, 16, 46, 0.1);
  font-size: 1.15rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--cream);
}

footer {
  text-align: center;
  padding: 1.5rem 1rem 5.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ========== Grand celebration overlay ========== */
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(200, 16, 46, 0.45), transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(245, 158, 11, 0.2), transparent 45%),
    rgba(3, 4, 8, 0.92);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.celebrate[hidden] {
  display: none;
}

.celebrate.is-live {
  animation: stadium-pulse 2.8s ease-in-out infinite;
}

@keyframes stadium-pulse {
  0%, 100% { background-color: rgba(3, 4, 8, 0.92); }
  50% { background-color: rgba(18, 6, 10, 0.94); }
}

#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.burst {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 248, 220, 0.9), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.celebrate.burst-on .burst {
  animation: boom 1.1s ease-out forwards;
}

@keyframes boom {
  0% { opacity: 1; width: 20px; height: 20px; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.8); }
  100% {
    opacity: 0;
    width: min(120vw, 900px);
    height: min(120vw, 900px);
    box-shadow: 0 0 120px 40px rgba(200, 16, 46, 0.35);
  }
}

.spotlight {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  background:
    conic-gradient(from 0deg at 50% 50%,
      transparent 0deg,
      rgba(245, 197, 24, 0.07) 20deg,
      transparent 40deg,
      rgba(200, 16, 46, 0.08) 60deg,
      transparent 80deg,
      rgba(245, 197, 24, 0.07) 100deg,
      transparent 140deg);
  animation: spin-light 18s linear infinite;
  opacity: 0.7;
}

@keyframes spin-light {
  to { transform: rotate(360deg); }
}

.celebrate-main {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(640px, 100%);
  margin-bottom: 7.5rem;
  max-height: calc(100vh - 8.5rem);
  overflow: auto;
}

.celebrate-pint {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  height: 200px;
  margin: 0 0 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  pointer-events: none;
  transition:
    opacity 0.45s ease,
    transform 0.45s cubic-bezier(0.2, 1.1, 0.4, 1),
    visibility 0.45s;
}

.celebrate-pint.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.celebrate-stage {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: min(38vh, 340px);
  display: grid;
  place-items: center;
}

.stage {
  grid-area: 1 / 1;
  width: 100%;
  padding: 2rem 1.4rem 1.6rem;
  text-align: center;
  border-radius: 28px;
  border: 1px solid rgba(212, 160, 23, 0.45);
  background:
    radial-gradient(circle at 50% -10%, rgba(200, 16, 46, 0.4), transparent 55%),
    linear-gradient(180deg, #1c1016 0%, #0c1018 55%, #080a10 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(200, 16, 46, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.92) translateY(18px);
  pointer-events: none;
  transition:
    opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.2, 1.1, 0.4, 1),
    visibility 0.55s;
}

.stage.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.stage-kicker {
  margin: 0 0 0.6rem;
  font-family: var(--font-head);
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--beer);
  text-transform: uppercase;
}

.stage-kicker.gold { color: var(--gold-bright); }
.stage-kicker.scarlet { color: #fda4af; }

.stage-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff 10%, #fde68a 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(245, 197, 24, 0.25);
}

.fanfare-title span {
  display: block;
}

.fanfare-title span:last-child {
  color: transparent;
  background: linear-gradient(180deg, #fecdd3, var(--scarlet-hot));
  -webkit-background-clip: text;
  background-clip: text;
  animation: flash-word 0.9s ease-in-out infinite alternate;
}

@keyframes flash-word {
  from { filter: brightness(1); }
  to { filter: brightness(1.35); }
}

.stage-sub {
  margin: 1rem auto 0;
  max-width: 28rem;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.45;
}

.pour-title {
  margin-top: 0.6rem;
  font-size: clamp(2.6rem, 11vw, 4.4rem);
  background: linear-gradient(180deg, #fff8e7, #fbbf24 40%, #b45309);
  -webkit-background-clip: text;
  background-clip: text;
}

.pour-sub {
  font-size: 1.2rem;
  color: var(--foam);
  font-weight: 600;
}

/* Giant frosty pint */
.pint-wrap {
  position: relative;
  width: 140px;
  height: 200px;
  margin: 0.4rem auto 0.2rem;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

.frost-ring {
  position: absolute;
  inset: -18px;
  border-radius: 50% 50% 42% 42%;
  background: radial-gradient(circle, rgba(186, 230, 253, 0.35), transparent 65%);
  animation: frost-pulse 1.6s ease-in-out infinite;
  opacity: 0;
}

.celebrate-pint.is-visible .frost-ring,
.celebrate-pint.is-poured .frost-ring {
  opacity: 1;
}

@keyframes frost-pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.45; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.pint {
  position: relative;
  width: 100%;
  height: 100%;
}

.pint-glass {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 92px;
  height: 150px;
  border-radius: 8px 8px 22px 22px;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-top-width: 2px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.18));
  overflow: hidden;
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.15),
    0 0 24px rgba(125, 211, 252, 0.25);
}

.beer-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 118px; /* ~78% of 150px glass — pixel height so the pour always animates */
  background:
    linear-gradient(180deg, #fbbf24 0%, #d97706 35%, #92400e 100%);
  transform: scaleY(0);
  transform-origin: bottom center;
  box-shadow: inset 0 8px 16px rgba(255, 255, 255, 0.25);
}

.celebrate-pint.is-poured .beer-liquid {
  animation: beer-pour 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes beer-pour {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.bubbles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 55% 40%, rgba(255, 255, 255, 0.45) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 75% 80%, rgba(255, 255, 255, 0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px);
  animation: bubble-rise 2.2s linear infinite;
  opacity: 0;
}

.celebrate-pint.is-poured .bubbles {
  opacity: 1;
  transition: opacity 0.4s ease 0.6s;
}

@keyframes bubble-rise {
  from { background-position: 0 20px, 0 10px, 0 30px, 0 0; }
  to { background-position: 0 -40px, 0 -50px, 0 -30px, 0 -60px; }
}

.foam {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0;
  height: 28px;
  border-radius: 40% 40% 30% 30%;
  background: linear-gradient(180deg, #fffef8, #f5e6c8);
  opacity: 0;
  transform: scaleX(0.6) translateY(0);
  transform-origin: center bottom;
}

.celebrate-pint.is-poured .foam {
  animation: foam-rise 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes foam-rise {
  0% {
    opacity: 0;
    transform: scaleX(0.6) translateY(0);
  }
  55% {
    opacity: 0.85;
    transform: scaleX(0.95) translateY(-70px);
  }
  100% {
    opacity: 1;
    transform: scaleX(1) translateY(-102px);
  }
}

.pint-base {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 70px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  filter: blur(2px);
}

.condensation {
  position: absolute;
  width: 6px;
  height: 10px;
  border-radius: 40%;
  background: rgba(186, 230, 253, 0.65);
  opacity: 0;
}

.celebrate-pint.is-poured .condensation {
  animation: drip 2.4s ease-in infinite;
}

.condensation.c1 { left: 18%; top: 48%; animation-delay: 0.2s; }
.condensation.c2 { right: 22%; top: 56%; animation-delay: 0.9s; }
.condensation.c3 { left: 28%; top: 62%; animation-delay: 1.5s; }

@keyframes drip {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(28px); }
}

.celebrate-name {
  margin: 0.75rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.celebrate-name strong {
  color: var(--gold-bright);
  font-size: 1.25rem;
}

.beer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.15rem 0;
  font-size: 3rem;
}

.mug {
  display: inline-block;
  animation: toast 0.7s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 16px rgba(245, 158, 11, 0.35));
}

.mug:nth-child(3) {
  animation-delay: 0.15s;
}

.clink {
  color: var(--gold-bright);
  font-size: 1.6rem;
  animation: spark 0.7s ease-in-out infinite alternate;
}

@keyframes toast {
  from { transform: translateY(0) rotate(-10deg) scale(1); }
  to { transform: translateY(-12px) rotate(10deg) scale(1.08); }
}

@keyframes spark {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.25); }
}

.celebrate-copy {
  margin: 0 auto 1.35rem;
  max-width: 28rem;
  color: var(--cream);
  line-height: 1.55;
  font-size: 1.05rem;
}

.celebrate-copy em {
  color: var(--gold-bright);
  font-style: normal;
  font-weight: 700;
}

.finale-actions {
  display: flex;
  justify-content: center;
}

.btn.big {
  font-size: 1.05rem;
  padding: 0.95rem 1.6rem;
  box-shadow:
    0 10px 28px rgba(200, 16, 46, 0.45),
    0 0 40px rgba(245, 158, 11, 0.2);
}

.hooray-banner {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: 0.06em;
}

.hooray-banner span {
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.25);
  color: #fecdd3;
  animation: hooray-pulse 1.2s ease-in-out infinite;
}

.hooray-banner span:nth-child(2) { animation-delay: 0.15s; }
.hooray-banner span:nth-child(3) {
  background: rgba(245, 158, 11, 0.3);
  color: #fde68a;
  animation-delay: 0.3s;
}

@keyframes hooray-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ---- Looping Hip Hip Hooray cheer strip ---- */
.cheer-loop {
  position: absolute;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  pointer-events: none;
  width: min(420px, calc(100% - 1.5rem));
  padding: 0.65rem 1rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(8, 10, 16, 0.82);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 40px rgba(245, 158, 11, 0.12);
  backdrop-filter: blur(8px);
}

.cheer-drink {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}

.cheer-mug {
  font-size: 2.6rem;
  display: inline-block;
  transform-origin: 70% 80%;
  filter: drop-shadow(0 6px 12px rgba(245, 158, 11, 0.4));
}

.cheer-loop.is-sip .cheer-mug {
  animation: drink-sip 0.7s ease-in-out;
}

.cheer-loop.is-hooray .cheer-mug {
  animation: drink-cheers 0.85s cubic-bezier(0.2, 1.2, 0.4, 1);
}

@keyframes drink-sip {
  0% { transform: rotate(0deg) translateY(0); }
  40% { transform: rotate(-48deg) translateY(-6px) scale(1.08); }
  70% { transform: rotate(-52deg) translateY(-4px); }
  100% { transform: rotate(0deg) translateY(0); }
}

@keyframes drink-cheers {
  0% { transform: rotate(0) scale(1) translateY(0); }
  35% { transform: rotate(-25deg) scale(1.2) translateY(-14px); }
  55% { transform: rotate(18deg) scale(1.25) translateY(-10px); }
  100% { transform: rotate(0) scale(1) translateY(0); }
}

.splash-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.splash-burst span {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 10px;
  height: 14px;
  margin-left: -5px;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(180deg, #fde68a, #d97706);
  opacity: 0;
  transform: translate(0, 0) scale(0.4);
}

.cheer-loop.is-splash .splash-burst span {
  animation: beer-splash 0.85s ease-out forwards;
}

.splash-burst span:nth-child(1) { --dx: -28px; --dy: -36px; animation-delay: 0s; }
.splash-burst span:nth-child(2) { --dx: 6px; --dy: -44px; animation-delay: 0.02s; background: #fff8e7; }
.splash-burst span:nth-child(3) { --dx: 32px; --dy: -34px; animation-delay: 0.04s; }
.splash-burst span:nth-child(4) { --dx: -40px; --dy: -12px; animation-delay: 0.05s; width: 8px; height: 10px; }
.splash-burst span:nth-child(5) { --dx: 42px; --dy: -10px; animation-delay: 0.06s; background: #fbbf24; }
.splash-burst span:nth-child(6) { --dx: -22px; --dy: 18px; animation-delay: 0.07s; }
.splash-burst span:nth-child(7) { --dx: 24px; --dy: 20px; animation-delay: 0.08s; background: #fff8e7; }
.splash-burst span:nth-child(8) { --dx: 0px; --dy: -52px; animation-delay: 0.03s; width: 12px; height: 16px; }
.splash-burst span:nth-child(9) { --dx: -48px; --dy: -28px; animation-delay: 0.09s; background: #fdba74; }
.splash-burst span:nth-child(10) { --dx: 50px; --dy: -26px; animation-delay: 0.1s; }
.splash-burst span:nth-child(11) { --dx: -14px; --dy: -58px; animation-delay: 0.04s; width: 7px; height: 9px; background: #fff; }
.splash-burst span:nth-child(12) { --dx: 16px; --dy: -56px; animation-delay: 0.05s; width: 7px; height: 9px; background: #fff; }

@keyframes beer-splash {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  70% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.15) rotate(120deg);
  }
}

.cheer-chant {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.2rem);
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
  min-height: 1.1em;
  transition: transform 0.15s ease, color 0.15s ease;
}

.cheer-chant.is-pop {
  transform: scale(1.18);
  color: #fff;
}

.cheer-chant.is-hooray-text {
  color: #fecdd3;
  text-shadow: 0 0 28px rgba(200, 16, 46, 0.55);
  transform: scale(1.28);
}

.cheer-caption {
  margin: 0;
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 560px) {
  .cheer-loop {
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    padding: 0.5rem 0.75rem 0.6rem;
  }

  .celebrate-main {
    margin-bottom: 8.5rem;
  }

  .celebrate-stage {
    min-height: min(32vh, 280px);
  }

  .celebrate-pint {
    height: 175px;
  }

  .pint-wrap {
    width: 120px;
    height: 175px;
  }
}

/* Test panel — remove with the HTML aside */
.test-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.65rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 2px dashed #f59e0b;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
}

.test-panel-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.test-panel strong {
  color: #fbbf24;
  font-family: var(--font-head);
  letter-spacing: 0.06em;
}

.test-hint {
  color: #94a3b8;
  font-size: 0.85rem;
}

.test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.test-panel button {
  appearance: none;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

.test-panel button:hover {
  background: rgba(251, 191, 36, 0.22);
}

@media (max-width: 560px) {
  .unit {
    min-width: 3.4rem;
  }

  .test-actions {
    margin-left: 0;
    width: 100%;
  }

  footer {
    padding-bottom: 7.5rem;
  }
}
