
.free-show {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
  touch-action: manipulation;
}

.free-show.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms ease;
}

.free-show-panel {
  position: absolute;
  left: var(--free-grid-x, 50%);
  top: clamp(calc(var(--safe-top) + 116px), var(--free-grid-y, 50%), calc(100% - var(--safe-bottom) - 116px));
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: min(calc(100% - 24px), calc(var(--free-grid-w, 360px) - 8px), 360px);
  padding: 16px 16px 12px;
  border-radius: var(--radius);
  background:
    radial-gradient(90% 60% at 50% 0%, var(--storm-banner-glow), transparent 72%),
    linear-gradient(180deg, var(--storm-banner-top), var(--storm-banner-bottom));
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 22px var(--storm-cyan-surface-8), 0 8px 22px rgba(0, 0, 0, 0.65);
  text-align: center;
}

.free-show.end .free-show-panel {
  background:
    radial-gradient(90% 60% at 50% 0%, var(--storm-banner-end-glow), transparent 72%),
    linear-gradient(180deg, var(--storm-banner-top), var(--storm-banner-bottom));
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 22px var(--storm-gold-surface-11), 0 8px 22px rgba(0, 0, 0, 0.65);
}

.free-show.show .free-show-title {
  animation: winner-in 380ms cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.free-show-gods {
  order: -1;
  display: flex;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--storm-cyan-surface-14));
}

.free-show-gods img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.free-show-title {
  order: -2;
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 7.5vw, 2.05rem);
  line-height: 1.15;
  white-space: nowrap;
  background-image: var(--gold-bevel);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 var(--gold-deep)) drop-shadow(0 3px 2px rgba(0, 0, 0, 0.7));
}

.free-show-main {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(2.1rem, 12vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: 0.03em;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #000, 0 0 12px var(--storm-cyan-surface-8);
}

.free-show.end .free-show-main {
  font-size: clamp(1.8rem, 10vw, 2.6rem);
  text-shadow: 0 2px 0 #000, 0 0 12px var(--storm-gold-surface-11);
}

.free-show-sub {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  text-shadow: 0 1px 0 #000;
}

.free-show-tap {
  margin-top: 4px;
  width: min(100%, 220px);
  min-height: 56px;
  padding: 10px 18px;
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--jade), var(--storm-play-deep));
  box-shadow: 0 0 0 1px var(--gold-deep), 0 4px 0 var(--storm-play-lip), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--text);
  text-shadow: 0 1px 0 #000;
  cursor: pointer;
  touch-action: manipulation;
}

.free-show-tap:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 1px 0 var(--storm-play-lip);
}

.free-show-tap:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 5px;
}


.storm-depth {
  position: absolute;
  inset: calc(-1 * var(--parallax-reach));
}

.storm-depth > i:not(.fx-amb) {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
}

.storm-depth > i:not(.fx-amb) + i:not(.fx-amb) { display: none; }
.storm-depth.far > i:not(.fx-amb) { background-image: url("../art/ui/storm-scene.webp"); }
.storm-depth.mid > i:not(.fx-amb) { background-image: url("../art/ui/storm-mid.webp"); }
.storm-depth.frame > i:not(.fx-amb) { background-image: url("../art/ui/storm-frame.webp"); }

.storm-depth.mid { --win-art: url("../art/ui/storm-mid.webp"); }
.storm-depth.frame { --win-art: url("../art/ui/storm-frame.webp"); }
.storm-depth:not(.far) { --win-mask: var(--win-art) center / cover no-repeat; }
.storm-props { --win-mask: linear-gradient(#0000, #0000); }

.storm-mist {
  --loop-tile: url("../art/scene-loops/storm-mist-tile.webp");
  --loop-tile-w: 256px;
  --loop-tile-h: 64px;
  --loop-period: 30s;
  --loop-mask: var(--win-mask);
  opacity: .6;
}

.storm-props {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4%;
}


@keyframes storm-god {
  from { transform: translateY(0) rotate(-6deg); }
  to { transform: translateY(-3px) rotate(6deg); }
}

@keyframes storm-event {
  from { transform: scale(1) rotate(-1deg); }
  to { transform: scale(1.02) rotate(1deg); }
}

@keyframes storm-lit {
  from { filter: brightness(1); }
  to { filter: brightness(1.35); }
}

@keyframes cloud-reveal {
  0% { transform: scale(0.3) rotate(-20deg); opacity: 0.3; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .storm-god,
  .storm-event,
  .storm-disc::before,
  .storm-plaque.lit,
  .cell.reveal {
    animation: none;
  }
}

@media (max-height: 700px) {
  .storm { gap: 1px; padding-top: 0; padding-bottom: 14px; }
  .storm-title { font-size: 1.5rem; }
  .storm-god { font-size: 1.5rem; }
  .storm-plaque { padding: 2px; }
  .storm-plaque-games { font-size: 1rem; }
  .storm-board { padding: 1px 12px; }
  .storm-status { font-size: 0.95rem; }
}

.storm-title {
  background-image: var(--gold-bevel);
  filter: drop-shadow(0 2px 0 var(--gold-deep)) drop-shadow(0 3px 2px rgba(0, 0, 0, 0.7));
}
.storm-plaque {
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  background: linear-gradient(var(--storm-blue-shadow-6), var(--storm-blue-shadow-7));
}
.storm-plaque.lit {
  border-color: var(--gold);
}
.storm-plaque-count, .storm-ladder-head, .storm-detail {
  color: var(--text);
  text-shadow: 0 1px 0 #000;
  letter-spacing: 0.04em;
}
.storm-detail { font-variant-numeric: tabular-nums; }
.storm-status, .storm-wilds { color: var(--text); text-shadow: 0 1px 0 #000; }
.storm-board { flex-wrap: wrap; gap: 1px 10px; border-radius: 4px; }
.storm.free .storm-detail { flex-basis: 100%; text-align: center; }
.storm-disc.thunder, .storm-disc.wind {
  box-shadow: 0 0 0 2px var(--gold-deep), inset 0 1px 2px rgba(255,255,255,.35);
}
.storm-disc::before { display: none; }
.storm-god.thunder, .storm-god.wind { filter: none; animation: none; }
.storm-god img { display: block; width: 1em; height: 1em; object-fit: contain; }
.storm-ladder-head img { width: 18px; height: 18px; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) {
  .free-show, .free-show.show, .storm-plaque { transition: none; }
  .free-show.show .free-show-title, .drum-line-glow, .float-text.free-pop { animation: none; }
}

.app.drums {
  --storm-line-1: #42e6ff;
  --storm-line-2: #ff4fd8;
  --storm-line-3: #ff3b4e;
  --storm-line-4: #2fd47a;
  --storm-line-5: #1f9a52;
  --storm-line-6: #ffd34d;
  --storm-line-7: #ff8a1f;
  --storm-line-8: #3b8bff;
  --storm-line-9: #a64dff;
  --storm-line-10: #2236c8;
  --storm-line-11: #c42a9c;
  --storm-line-12: #c0c0c0;
  --storm-line-13: #b8642a;
  --storm-line-14: #5ac8ff;
  --storm-line-15: #ffa98a;
  --storm-line-16: #e0607a;
  --storm-line-17: #7a3cff;
  --storm-line-18: #ff5fa8;
  --storm-line-19: #5ae0b0;
  --storm-line-20: #c8e040;
}

:root {
  --storm-eclipse-gold: rgba(255, 176, 60, 0.55);
  --storm-eclipse-indigo: rgba(26, 14, 96, 0.78);
  --storm-cloud-sting: rgba(176, 196, 255, 0.55);
}

.sting.cloud {
  background: radial-gradient(circle at 50% 50%, var(--storm-cloud-sting) 0, var(--storm-eclipse-indigo) 44%, transparent 76%);
}

:root {
  --storm-burst-ray: rgba(255, 244, 205, 0.95);
  --storm-burst-gold: rgba(255, 211, 77, 0.85);
  --storm-burst-core: rgba(255, 255, 255, 0.9);
}

.reel-fx > .storm-burst {
  position: absolute;
  left: -45%;
  right: -45%;
  top: calc(100% * (var(--reel-fx-row) - 0.5) / var(--reel-rows, 3));
  height: calc(200% / var(--reel-rows, 3));
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, var(--storm-burst-core) 0, var(--storm-burst-gold) 14%, transparent 34%),
    repeating-conic-gradient(from 0deg at 50% 50%, var(--storm-burst-ray) 0 6deg, transparent 6deg 24deg, var(--storm-burst-gold) 24deg 28deg, transparent 28deg 48deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0, #000 28%, transparent 66%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0, #000 28%, transparent 66%);
  animation: storm-burst var(--burst-ms, 640ms) cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes storm-burst {
  0% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.35) rotate(26deg); }
}

@media (prefers-reduced-motion: reduce) {
  .reel-fx > .storm-burst {
    display: none;
  }
}

.app.drums.storm-eclipse .storm-depth.frame::after,
.app.drums.storm-eclipse .grid::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: linear-gradient(180deg, var(--storm-eclipse-indigo), var(--storm-eclipse-gold) 55%, var(--storm-eclipse-indigo));
  opacity: 0.8;
  animation: eclipse-pulse 3.6s ease-in-out infinite alternate;
  animation-play-state: var(--idle-play, running);
}

.app.drums.storm-eclipse .storm-depth.frame::after {
  inset: 0;
}

.app.drums.storm-eclipse .grid::after {
  top: -18px;
  bottom: -4px;
  left: -23px;
  right: -23px;
  z-index: -1;
}

.app.drums.storm-eclipse .storm-disc::before {
  display: block;
  opacity: 0.8;
  animation: rays 14s linear infinite, eclipse-pulse 3s ease-in-out infinite alternate;
  animation-play-state: var(--idle-play, running);
}

.app.drums.storm-eclipse .storm-god.thunder {
  filter: drop-shadow(0 0 10px var(--storm-eclipse-gold));
  animation: eclipse-god 2.2s ease-in-out infinite alternate;
  animation-play-state: var(--idle-play, running);
}

.app.drums.storm-eclipse .storm-god.wind {
  filter: drop-shadow(0 0 10px var(--storm-cloud-sting));
  animation: eclipse-god 2.2s ease-in-out -1.1s infinite alternate;
  animation-play-state: var(--idle-play, running);
}

.storm-x5 {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  pointer-events: none;
  color: var(--gold-light);
  font-family: var(--symbol);
  font-size: clamp(3rem, 22vh, 6rem);
  line-height: 1;
  text-shadow: 0 0 6px var(--gold), 0 3px 0 #000, 0 0 22px var(--storm-eclipse-gold);
  opacity: 0;
  transform: translate(-50%, -50%) scale(2.4);
  animation: x5-stamp var(--x5-ms, 900ms) cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes eclipse-pulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

@keyframes eclipse-god {
  from { opacity: 0.8; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.08); }
}

@keyframes x5-stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4) rotate(-8deg); }
  22% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1.04) rotate(-4deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.12) rotate(-4deg); }
}

@media (prefers-reduced-motion: reduce) {
  .app.drums.storm-eclipse .storm-depth.frame::after,
  .app.drums.storm-eclipse .grid::after,
  .app.drums.storm-eclipse .storm-disc::before,
  .app.drums.storm-eclipse .storm-god.thunder,
  .app.drums.storm-eclipse .storm-god.wind,
  .storm-x5 {
    animation: none;
  }
}
