.home-page #notificationsOpen {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 40px;
  padding: 5px;
  background: var(--theme-field, #0c172d);
}
#notificationsBadge {
  --section-ink: var(--theme-ink-on-gold);
  position: absolute;
  inset: -5px -5px auto auto;
  border-radius: 20px;
  min-width: 18px;
  padding: 2px 4px;
  background: #e5b66b;
  font: bold 11px system-ui;
}
#notificationsPanel {
  width: min(92vw, 430px);
  padding: 20px;
  border: 1px solid var(--theme-border, #876639);
  border-radius: 18px;
  background: var(--theme-panel, #10192f);
}
#notificationsPanel::backdrop { background: #03070bd0; }
#notificationsPanel form { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#notificationsPanel h2 { margin: 0; }
#notificationsPanel button { background: var(--theme-field, #17223c); border-color: var(--theme-border, #876639); }
#notificationsList { display: grid; gap: 8px; margin-block-start: 16px; }
#notificationsList a { padding: 10px; border: 1px solid var(--theme-border, #876639); border-radius: 10px; }

#grandPrize {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 12px;
  margin: 0;
  border: 0;
  background: radial-gradient(ellipse at 50% 24%, var(--theme-glow, #1d2942), var(--theme-bg, #080d18) 76%);
  text-align: center;
  overflow: auto;
  isolation: isolate;
}
#grandPrize[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: clamp(5px, 2dvh, 20px);
}
#grandPrize::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background:
    radial-gradient(ellipse at 18px 34px, #efbb62 0 1px, transparent 2px),
    radial-gradient(ellipse at 91px 82px, #f2c778 0 1px, transparent 2px),
    radial-gradient(ellipse at 47px 111px, #c38d40 0 1px, transparent 2px);
  background-size: 151px 181px, 197px 239px, 173px 211px;
  animation: prize-rain 9s linear infinite;
}
#grandPrize .prize-brand {
  position: absolute;
  inset: 14px auto auto 18px;
  width: clamp(40px, 7vw, 80px);
  height: auto;
}
#grandPrize .prize-coin {
  width: clamp(70px, 21dvh, 196px);
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 0 20px #dca84450);
  animation: prize-spin 5s ease-in-out infinite;
}
#grandPrize .prize-card {
  width: min(100%, 606px);
  padding: clamp(10px, 2dvh, 24px);
  box-sizing: border-box;
  display: grid;
  justify-items: center;
  gap: clamp(4px, 1.05dvh, 10px);
  border: 1px solid var(--theme-border, #876639);
  border-radius: 24px;
  background: var(--theme-panel, #0b1322);
}
#grandPrize :is(h1,p) { margin: 0; }
#grandPrize h1 { font-size: clamp(18px, 4.3dvh, 38px); }
#grandPrize .prize-amount { font-size: clamp(34px, 11dvh, 102px); line-height: 1; }
#grandPrize .prize-checks { display: flex; gap: clamp(3px, 1vw, 9px); margin-block-start: 6px; }
#grandPrize .prize-checks span {
  display: grid;
  place-items: center;
  height: clamp(18px, 3.2dvh, 28px);
  aspect-ratio: 1;
  border: 1px solid var(--theme-border, #876639);
  border-radius: 6px;
}
#grandPrize .prize-action {
  display: block;
  width: min(100%, 355px);
  box-sizing: border-box;
  border-radius: 12px;
  padding: 9px 12px;
  background: #e5b66b;
  text-decoration: none;
  font-weight: bold;
}
@keyframes prize-rain {
  to { background-position: 0 181px, 0 239px, 0 211px; }
}
@keyframes prize-spin {
  0%, 35% { transform: rotateY(0); }
  70%, 100% { transform: rotateY(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  #grandPrize::before, #grandPrize .prize-coin { animation: none; }
}

#arenaGameplay.arena-prize-suspense {
  animation: prize-suspense 1.8s ease-in forwards;
}
@keyframes prize-suspense {
  0%, 32% { opacity: 1; }
  86%, 100% { opacity: 0; }
}
#grandPrize[open] { animation: prize-reveal .65s ease-out both; }
@keyframes prize-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
#grandPrize .prize-amount {
  color: transparent !important;
  background-image: linear-gradient(110deg, #ae7022 12%, #f8d67d 38%, #fff5cb 49%, #ffd475 56%, #ae7022 82%);
  background-size: 240% 100%;
  background-clip: text;
  filter: drop-shadow(0 0 10px #dca34455);
  animation: prize-amount-entry .95s cubic-bezier(.2,.85,.35,1) both,
             prize-amount-shine 4s 1s ease-in-out infinite;
}
#grandPrize .prize-codes {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 4vw, 36px);
  width: 100%;
  padding-top: 8px;
  margin: 3px 0 0;
  border-top: 1px solid var(--theme-border, #876639);
  font-size: clamp(12px, 2dvh, 16px);
  animation: prize-reveal .5s 1.1s both;
}
#grandPrize .prize-codes dd { margin: 2px 0 0; font: bold .95em ui-monospace, monospace; }
@keyframes prize-amount-entry {
  from { transform: scale(.7) translateY(8px); opacity: 0; }
  58% { transform: scale(1.12); opacity: 1; }
  to { transform: scale(1); }
}
@keyframes prize-amount-shine {
  from { background-position: 100% 0; }
  65%, to { background-position: 0 0; }
}
.prize-fireworks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.prize-firework {
  position: absolute;
  top: var(--burst-y, 23%);
  left: var(--burst-x, 17%);
  --spark-color: #f4be59;
  --spark-distance: clamp(38px, 9vmin, 120px);
}
.prize-firework:nth-child(2) { --burst-x: 85%; --burst-y: 21%; --burst-delay: .45s; --spark-color: #ffdca2; }
.prize-firework:nth-child(3) { --burst-x: 8%; --burst-y: 65%; --burst-delay: .9s; }
.prize-firework:nth-child(4) { --burst-x: 92%; --burst-y: 62%; --burst-delay: 1.5s; --spark-color: #f8a66c; }
.prize-firework:nth-child(5) { --burst-x: 22%; --burst-y: 83%; --burst-delay: 2.2s; --spark-color: #ffdca2; }
.prize-firework:nth-child(6) { --burst-x: 80%; --burst-y: 84%; --burst-delay: 2.65s; }
.prize-firework i {
  position: absolute;
  width: 3px;
  height: 11px;
  border-radius: 50%;
  background: var(--spark-color);
  box-shadow: 0 0 8px var(--spark-color), 0 -14px 0 -1px var(--spark-color);
  opacity: 0;
  animation: prize-burst 4.2s var(--burst-delay, .08s) ease-out infinite both;
}
.prize-firework i:nth-child(1) { --spark-angle: 0deg; }
.prize-firework i:nth-child(2) { --spark-angle: 30deg; }
.prize-firework i:nth-child(3) { --spark-angle: 60deg; }
.prize-firework i:nth-child(4) { --spark-angle: 90deg; }
.prize-firework i:nth-child(5) { --spark-angle: 120deg; }
.prize-firework i:nth-child(6) { --spark-angle: 150deg; }
.prize-firework i:nth-child(7) { --spark-angle: 180deg; }
.prize-firework i:nth-child(8) { --spark-angle: 210deg; }
.prize-firework i:nth-child(9) { --spark-angle: 240deg; }
.prize-firework i:nth-child(10) { --spark-angle: 270deg; }
.prize-firework i:nth-child(11) { --spark-angle: 300deg; }
.prize-firework i:nth-child(12) { --spark-angle: 330deg; }
@keyframes prize-burst {
  0% { transform: rotate(var(--spark-angle)) translateY(-3px) scale(.5); opacity: 0; }
  8% { opacity: .95; }
  37%, 100% {
    transform: rotate(var(--spark-angle)) translateY(calc(-1 * var(--spark-distance))) scale(.5);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #arenaGameplay.arena-prize-suspense, #grandPrize[open],
  #grandPrize .prize-amount, #grandPrize .prize-codes { animation: none; }
  .prize-fireworks { display: none; }
}

#grandPrizeSound {
  position: absolute;
  inset: 12px 12px auto auto;
  z-index: 1;
  max-width: 8.5rem;
  padding: 5px 9px;
  border: 1px solid var(--theme-border, #876639);
  border-radius: 9px;
  background: var(--theme-panel, #0b1322);
  font: inherit;
  font-size: .72rem;
  cursor: pointer;
}
