:root {
  --bg: #120e0b;
  --paper: #2a2118;
  --ink: #f6efe4;
  --muted: #c4b29a;
  --accent: #f4b942;
  --glass: rgba(255, 248, 235, 0.12);
  --scene: #c4843a;
  --pour: #f4b942;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scene-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(100vw 72vh at 50% -12%, #4a2e16 0%, transparent 58%),
    linear-gradient(180deg, #2a1c12 0%, #16100c 38%, #0c0908 100%);
}

.scene-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80vw 60vh at 50% 8%, var(--scene) 0%, transparent 62%),
    radial-gradient(46vw 34vh at 88% 22%, var(--pour) 0%, transparent 70%);
  opacity: 0.28;
}

.scene-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 42%, var(--pour), transparent 48%);
  opacity: 0.16;
  transition: opacity 0.35s ease, background 0.4s ease;
}

.scene-glow.pulse {
  opacity: 0.7;
  animation: glowKick 0.55s ease;
}

.scene-caustic {
  position: absolute;
  inset: 42% 0 0;
  background:
    radial-gradient(18% 10% at 22% 30%, rgba(255, 220, 160, 0.14), transparent 70%),
    radial-gradient(16% 9% at 58% 44%, rgba(255, 200, 120, 0.1), transparent 70%),
    radial-gradient(20% 11% at 80% 22%, rgba(255, 236, 200, 0.09), transparent 72%);
  opacity: 0.45;
}

.scene-motes {
  position: absolute;
  inset: 0;
}

.mote {
  position: absolute;
  bottom: -8%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 232, 190, 0.55);
  animation: moteRise linear infinite;
}

.scene-shelf {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -2%;
  height: 28vh;
  background:
    linear-gradient(180deg, transparent 0%, rgba(18, 12, 8, 0.15) 18%, #2a1c12 42%, #140e0a 100%);
  box-shadow: inset 0 18px 40px rgba(255, 190, 110, 0.06);
}

.scene-shelf::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 22%;
  height: 14px;
  border-radius: 40%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), transparent 70%);
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, transparent 42%, rgba(6, 4, 3, 0.55) 100%);
}

body.skin-night .scene-tint {
  opacity: 0.36;
}

body.skin-gold .scene-glow {
  opacity: 0.34;
}

body.skin-mint .scene-tint {
  opacity: 0.32;
}

body.skin-ocean .scene-tint {
  opacity: 0.34;
}

body.skin-void .scene-tint {
  opacity: 0.22;
}

body.skin-lava .scene-glow {
  opacity: 0.3;
}

body.tension .scene-glow {
  opacity: 0.42;
}

body.ember .scene-glow {
  opacity: 0.28;
}

body.ember .chip.fire {
  box-shadow: 0 0 16px rgba(255, 120, 50, 0.45);
}

body.dim .scene-wash {
  opacity: 0.72;
}

body.celebrate .scene-glow {
  opacity: 0.85;
}

.wrap {
  width: min(540px, 100%);
  min-height: 100dvh;
  padding: 8px 10px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

body.play-fit {
  overflow: hidden;
  height: 100dvh;
}

body.play-fit .wrap {
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.hud {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 8px;
}

.hud-stats {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
}

.tower-back {
  display: none;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.tower-back svg {
  width: 22px;
  height: 22px;
}

.tower-back:active {
  transform: scale(0.92);
}

.burger {
  display: none;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
}

body.home-open .burger {
  display: flex;
}

.burger span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.fly {
  position: absolute;
  top: 48px;
  left: 10px;
  z-index: 8;
  min-width: 168px;
  background: #2f261c;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: flyIn 0.18s ease;
}

.fly[hidden] {
  display: none;
}

.fly button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.fly button:active {
  background: var(--glass);
}

@keyframes flyIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.chip {
  flex: 1 1 0;
  background: var(--paper);
  border-radius: 10px;
  padding: 6px 4px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  border: 0;
  color: inherit;
  font-family: inherit;
}

.chip.catch {
  animation: starOn 0.28s ease;
  box-shadow: 0 0 14px rgba(255, 210, 74, 0.55);
}

.chip.coin-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: visible;
  min-width: 52px;
}

.coin {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  vertical-align: -4px;
  object-fit: contain;
}

.chip .coin {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  animation: coinShine 2.2s ease-in-out infinite;
}

body.quiet .chip .coin {
  animation: none;
}

@keyframes coinShine {
  0%,
  100% {
    filter: brightness(1);
    transform: rotate(-8deg) scale(1);
  }
  50% {
    filter: brightness(1.18);
    transform: rotate(8deg) scale(1.08);
  }
}

.act .coin,
.lock-tag .coin,
.skin-card small .coin {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  margin-right: 4px;
}

.act.with-coin,
.lock-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

button.chip {
  cursor: pointer;
}

button.chip.league {
  color: var(--accent);
}

.chip.star-bomb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 6px;
  line-height: 1.1;
  color: #ff7a4a;
}

.chip.star-bomb small {
  font-size: 10px;
  color: #ffe08a;
  font-weight: 800;
}

.chip.fire {
  color: #ff8a4a;
}

.chip.fire em {
  display: inline;
  margin-left: 2px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  color: #ffe08a;
}

.chip.fire em[hidden] {
  display: none;
}

.chip.fire.hot2 {
  box-shadow: 0 0 12px rgba(255, 120, 50, 0.65);
  animation: packGlow 1.2s ease-in-out infinite;
}

.chip.fire.burned {
  animation: shake 0.4s ease;
  color: #8a6a58;
}

.skin-btn {
  display: none;
}

.jar.hint-from,
.jar.hint-to {
  box-shadow:
    inset 0 0 0 2px #fff3b0,
    0 0 22px rgba(244, 185, 66, 0.65);
}

.jar.skin-night {
  background:
    linear-gradient(180deg, rgba(180, 210, 255, 0.2), transparent 30%),
    rgba(20, 28, 48, 0.45);
  box-shadow:
    inset 0 0 0 2px rgba(140, 180, 255, 0.45),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.skin-gold {
  box-shadow:
    inset 0 0 0 2px #f4d06a,
    0 10px 18px rgba(180, 120, 20, 0.35);
}

.jar.skin-mint {
  background:
    linear-gradient(180deg, rgba(180, 255, 220, 0.2), transparent 30%),
    rgba(30, 50, 42, 0.4);
  box-shadow:
    inset 0 0 0 2px rgba(110, 220, 170, 0.5),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.skin-rose {
  background:
    linear-gradient(180deg, rgba(255, 200, 220, 0.22), transparent 30%),
    rgba(52, 28, 36, 0.42);
  box-shadow:
    inset 0 0 0 2px rgba(255, 150, 180, 0.5),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.skin-sand {
  background:
    linear-gradient(180deg, rgba(255, 220, 170, 0.28), transparent 32%),
    rgba(62, 44, 24, 0.45);
  box-shadow:
    inset 0 0 0 2px rgba(232, 186, 120, 0.55),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.skin-ice {
  background:
    linear-gradient(180deg, rgba(200, 245, 255, 0.3), transparent 32%),
    rgba(28, 48, 62, 0.48);
  box-shadow:
    inset 0 0 0 2px rgba(140, 220, 255, 0.55),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.skin-smoke {
  background:
    linear-gradient(180deg, rgba(220, 220, 230, 0.2), transparent 30%),
    rgba(40, 42, 48, 0.5);
  box-shadow:
    inset 0 0 0 2px rgba(170, 176, 190, 0.45),
    0 10px 18px rgba(0, 0, 0, 0.3);
}

.jar.skin-foam {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 34%),
    rgba(48, 56, 62, 0.4);
  box-shadow:
    inset 0 0 0 2px rgba(230, 240, 255, 0.55),
    0 10px 18px rgba(0, 0, 0, 0.25);
}

.jar.skin-ribbed {
  background:
    repeating-linear-gradient(180deg, rgba(255, 236, 200, 0.18) 0 6px, transparent 6px 12px),
    rgba(42, 32, 22, 0.5);
  box-shadow:
    inset 0 0 0 2px rgba(232, 186, 120, 0.6),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.skin-vase {
  border-radius: 18px 18px 36px 36px;
  background:
    linear-gradient(180deg, rgba(255, 220, 180, 0.22), transparent 40%),
    rgba(62, 36, 28, 0.5);
  box-shadow:
    inset 0 0 0 2px rgba(210, 140, 90, 0.55),
    0 12px 20px rgba(0, 0, 0, 0.3);
}

.jar.skin-mug {
  border-radius: 10px 22px 22px 14px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 200, 140, 0.5),
    8px 8px 0 -6px rgba(255, 200, 140, 0.45),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.skin-wide,
body.stage2 .jar {
  width: 70px;
  height: 198px;
  border-radius: 14px 14px 32px 32px;
}

.jar.skin-honey {
  background:
    linear-gradient(180deg, rgba(255, 200, 90, 0.28), transparent 30%),
    rgba(72, 42, 12, 0.48);
  box-shadow:
    inset 0 0 0 2px #e8a030,
    0 10px 18px rgba(160, 90, 10, 0.35);
}

.jar.skin-ocean {
  background:
    linear-gradient(180deg, rgba(80, 200, 255, 0.28), transparent 30%),
    rgba(12, 36, 64, 0.55);
  box-shadow:
    inset 0 0 0 2px rgba(70, 180, 255, 0.6),
    0 10px 18px rgba(0, 20, 50, 0.4);
}

.jar.skin-ember {
  background:
    linear-gradient(180deg, rgba(255, 120, 60, 0.22), transparent 30%),
    rgba(36, 18, 12, 0.55);
  box-shadow:
    inset 0 0 0 2px rgba(255, 110, 50, 0.55),
    0 10px 18px rgba(80, 20, 0, 0.4);
}

.jar.skin-lava {
  background:
    linear-gradient(180deg, rgba(255, 80, 40, 0.35), rgba(40, 10, 8, 0.2) 40%, rgba(20, 8, 6, 0.55));
  box-shadow:
    inset 0 0 0 2px #ff6a3a,
    0 0 16px rgba(255, 80, 30, 0.35);
}

.jar.skin-neon {
  background:
    linear-gradient(180deg, rgba(0, 255, 180, 0.22), transparent 28%),
    rgba(10, 18, 28, 0.6);
  box-shadow:
    inset 0 0 0 2px #3cffc8,
    0 0 14px rgba(60, 255, 200, 0.35);
}

.jar.skin-crystal {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(180, 220, 255, 0.12) 40%, rgba(40, 50, 80, 0.45));
  box-shadow:
    inset 0 0 0 2px rgba(210, 240, 255, 0.7),
    0 10px 18px rgba(80, 120, 180, 0.3);
}

.jar.skin-ink {
  background:
    linear-gradient(180deg, rgba(80, 60, 40, 0.2), transparent 24%),
    rgba(8, 8, 10, 0.72);
  box-shadow:
    inset 0 0 0 2px #d4a24a,
    0 10px 18px rgba(0, 0, 0, 0.45);
}

.jar.skin-aurora {
  background:
    linear-gradient(180deg, rgba(120, 255, 180, 0.28), rgba(180, 120, 255, 0.18) 50%, rgba(20, 24, 48, 0.5));
  box-shadow:
    inset 0 0 0 2px #9bffe0,
    0 0 16px rgba(140, 120, 255, 0.3);
}

.jar.skin-royal {
  background:
    linear-gradient(180deg, rgba(255, 220, 140, 0.28), transparent 28%),
    rgba(36, 18, 64, 0.6);
  box-shadow:
    inset 0 0 0 2px #f4d06a,
    0 0 16px rgba(160, 90, 255, 0.28);
}

.jar.skin-void {
  background:
    linear-gradient(180deg, rgba(80, 40, 120, 0.2), transparent 24%),
    rgba(6, 4, 12, 0.8);
  box-shadow:
    inset 0 0 0 2px #6a4cff,
    0 10px 18px rgba(0, 0, 0, 0.5);
}

.jar.skin-myth {
  background:
    linear-gradient(180deg, rgba(255, 210, 90, 0.32), rgba(180, 80, 255, 0.16) 45%, rgba(28, 12, 40, 0.55));
  box-shadow:
    inset 0 0 0 2px #ffe08a,
    0 0 18px rgba(255, 180, 60, 0.4);
}

#skins-overlay {
  z-index: 82;
}

.skins-card {
  width: min(420px, 100%);
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 48vh;
  overflow: auto;
  margin: 0 0 14px;
}

.skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: auto !important;
  border: 0;
  padding: 8px 4px 6px;
  border-radius: 12px;
  background: #2a2118;
  color: inherit;
  cursor: pointer;
  font: inherit;
  animation: jarIn 0.28s both;
}

.skin-card b {
  font-size: 11px;
  line-height: 1.1;
}

.skin-card small {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.skin-card.premium small {
  color: var(--accent);
}

.skin-card.locked {
  opacity: 0.55;
}

.skin-card.on {
  box-shadow: inset 0 0 0 1px var(--accent);
  transform: translateY(-2px);
}

.skin-mini.jar {
  width: 28px;
  height: 52px;
  padding: 5px 4px 4px;
  gap: 2px;
  animation: none;
  pointer-events: none;
}

.skin-mini .layer {
  height: 10px;
  border-radius: 3px;
}

.loot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
}

.loot b {
  display: block;
  background: #2a2118;
  border-radius: 12px;
  padding: 10px;
  animation: jarIn 0.35s both;
}

.chest {
  font-size: 48px;
  line-height: 1;
  animation: wonPop 0.6s ease;
}

.chest-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 196, 64, 0.85));
}

.chest-pic.big {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  animation: chestCall 1.1s ease-in-out infinite;
}

@keyframes chestCall {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 10px rgba(255, 196, 64, 0.7));
  }
  50% {
    transform: translateY(-6px) scale(1.08);
    filter: drop-shadow(0 0 22px rgba(255, 220, 90, 1));
  }
}

.mission {
  background: var(--paper);
  border-radius: 14px;
  padding: 8px 10px 8px;
  margin-bottom: 8px;
}

.chapter,
.goal {
  display: none;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track {
  position: relative;
  flex: 1;
  height: 12px;
  background: #1a1410;
  border-radius: 99px;
  overflow: hidden;
}

.track i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f4b942, #ff7a45);
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.2, 1.2, 0.3, 1);
}

.track-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
  z-index: 1;
}

.track-ticks span {
  flex: 1;
  border-right: 1px solid rgba(246, 239, 228, 0.22);
}

.track-ticks span:last-child {
  border-right: 0;
}

.track-chest {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  animation: chestGlow 1.4s ease-in-out infinite;
}

.track-chest.hot {
  animation-duration: 0.7s;
  box-shadow: 0 0 18px rgba(244, 185, 66, 0.85);
}

@keyframes chestGlow {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.12);
    filter: brightness(1.35);
  }
}

body.quiet .prize-call,
body.quiet .prize-emo,
body.quiet .prize-mute,
body.quiet .prize-coin,
body.quiet .prize-chest,
body.quiet .prize-slide.swap,
body.quiet .tower-chest.prize-pop,
body.quiet .tower-top .tower-chest {
  animation: none;
}
body.quiet .tower-name,
body.quiet .tower-call,
body.quiet .tower-clock-hot,
body.quiet .home-stream,
body.quiet .home-jar.j1,
body.quiet .home-jar.j2,
body.quiet .home-jar.j3,
body.quiet .home-gear svg,
body.quiet .coin-heap .coin,
body.quiet .track-chest,
body.quiet .chest-pic.big,
body.quiet .tower-chest,
body.quiet .tower-lock,
body.quiet .lock-gate-ico,
body.quiet .lock-gate-title,
body.quiet .lock-gate-miss {
  animation: none;
}

.track-label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}

.hunt {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #ffb07a;
  animation: huntIn 0.35s ease;
}

.hunt:empty {
  display: none;
}

.hinder {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ff8a6a;
}

.hinder:empty {
  display: none;
}

#intro-overlay {
  z-index: 95;
}

#pass-overlay {
  z-index: 90;
}

#shop-overlay {
  z-index: 59;
}

#tower-overlay {
  z-index: 65;
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

#tower-overlay.show {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90vw 50vh at 50% 0%, #5a2a10 0%, transparent 55%),
    #120e0b;
  padding: calc(58px + env(safe-area-inset-top, 0px)) 0 max(8px, env(safe-area-inset-bottom, 0px));
  height: 100dvh;
  box-sizing: border-box;
}

body.tower-open {
  overflow: hidden;
}

body.tower-open .wrap {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, 100%);
  min-height: 0;
  height: auto;
  z-index: 75;
  visibility: visible;
  pointer-events: none;
  padding-bottom: 0;
}

body.tower-open .hud,
body.tower-open .fly {
  pointer-events: auto;
  z-index: 76;
}

body.map-open .tower-back,
body.tower-open .tower-back,
body:not(.home-open):not(.map-open):not(.tower-open):not(.screen) .tower-back {
  display: flex;
}

body.tower-open .burger,
body.map-open .burger {
  display: none;
}

body.tower-open .mission,
body.tower-open .play-row,
body.tower-open .bar,
body.tower-open .skin-btn,
body.tower-open .more,
body.tower-open .fx,
body.tower-open .level {
  display: none;
}

#tower-overlay .tower-stage {
  flex: 1;
  width: min(540px, 100%);
  min-height: 0;
  height: 100%;
  margin: 0 auto;
  padding: 4px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.tower-jackpot {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 18px;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(255, 210, 74, 0.14), transparent 55%),
    #24180f;
  box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.28);
}

.tower-heroes {
  flex: 0 0 auto;
  padding: 6px 6px 0;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(180deg, rgba(42, 32, 22, 0.9), rgba(18, 14, 10, 0.4));
  box-shadow: inset 0 0 0 1px rgba(255, 236, 200, 0.1);
}

.tower-board {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #1a1410;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 200, 0.1);
  overflow: hidden;
}

.tower-prize {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 0 4px;
}

.tower-prize .tower-chest,
.tower-prize .chest-pic.big {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  margin: 0;
}

.prize-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tower-prize .prize-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4a06a;
}

.prize-reel {
  width: 100%;
  height: 46px;
  overflow: hidden;
}

.prize-slide {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 46px;
  padding: 0;
}

.prize-slide.swap {
  animation: prizeSwap 0.48s cubic-bezier(0.2, 1.45, 0.3, 1);
}

.prize-ico {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
}

.prize-emo,
.prize-mute {
  font-size: 28px;
  line-height: 1;
  animation: packIco 1.2s ease-in-out infinite;
}

.prize-mute {
  font-size: 20px;
  font-weight: 900;
  color: #e85d4c;
  text-decoration: line-through;
  text-decoration-thickness: 3px;
}

.prize-coin,
.prize-chest {
  width: 34px;
  height: 34px;
  animation: packIco 1.2s ease-in-out infinite;
}

.prize-copy {
  min-width: 0;
  text-align: left;
}

.tower-prize .prize-call {
  display: block;
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #fff6c4;
}

.prize-copy small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #ffe08a;
  line-height: 1.25;
}

.prize-slide.tone-mute .prize-ico { box-shadow: inset 0 0 0 1px #8ec8e8; }
.prize-slide.tone-bomb .prize-ico { box-shadow: inset 0 0 0 1px #e85d4c; }
.prize-slide.tone-hint .prize-ico { box-shadow: inset 0 0 0 1px #f4b942; }
.prize-slide.tone-gold .prize-ico { box-shadow: inset 0 0 0 1px #ffd24a; background: rgba(244, 185, 66, 0.15); }
.prize-slide.tone-fire .prize-ico { box-shadow: inset 0 0 0 1px #ff9a1a; }
.prize-slide.tone-royal .prize-ico { box-shadow: inset 0 0 0 1px #c084fc; }
.prize-slide.tone-mix .prize-ico { box-shadow: inset 0 0 0 1px #3ecf8e; }

.tower-chest.prize-pop {
  animation: prizeChestPop 0.45s cubic-bezier(0.2, 1.6, 0.3, 1);
}

@keyframes prizeSwap {
  from {
    transform: translateY(16px) scale(0.92);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes prizeChestPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12) rotate(-4deg); }
  100% { transform: none; }
}

.tower-prize #tower-clock {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffe27a;
  text-shadow: 0 0 16px rgba(255, 210, 74, 0.75);
  animation: chestPrizeGlow 1.1s ease-in-out infinite;
}

.tower-podium {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  min-height: 0;
  padding: 2px 2px 0;
}

.podium-slot {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0;
  background: none;
  animation: podiumIn 0.5s cubic-bezier(0.2, 1.5, 0.3, 1) both;
}

.podium-slot.p1 {
  order: 2;
  z-index: 2;
  transform: translateY(-6px) scale(1.06);
  animation-delay: 80ms;
}

.podium-slot.p2 {
  order: 1;
}

.podium-slot.p3 {
  order: 3;
  animation-delay: 140ms;
}

.podium-slot.you .podium-face {
  box-shadow:
    0 0 0 3px #f4b942,
    0 0 14px rgba(244, 185, 66, 0.55);
}

.podium-slot.pick {
  cursor: pointer;
}

.podium-slot.mark .podium-face {
  box-shadow:
    0 0 0 3px #e85d4c,
    0 0 12px rgba(232, 93, 76, 0.45);
}

.podium-medal {
  width: 28px;
  height: 28px;
  margin-bottom: 0;
  animation: podiumFloat 2s ease-in-out infinite;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
}

.podium-slot.p1 .podium-medal {
  width: 38px;
  height: 38px;
  animation: podiumCrown 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 210, 74, 0.7));
}

.podium-pic {
  width: 100%;
  height: 100%;
  display: block;
}

.podium-face {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #1a1410;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.podium-slot.p1 .podium-face {
  width: 44px;
  height: 44px;
  font-size: 20px;
  box-shadow:
    0 0 0 3px #ffd24a,
    0 0 16px rgba(255, 210, 74, 0.55);
  animation: podiumFacePulse 1.6s ease-in-out infinite;
}

.podium-slot.p2 .podium-face {
  box-shadow: 0 0 0 3px #c8c8d4;
}

.podium-slot.p3 .podium-face {
  box-shadow: 0 0 0 3px #d4894a;
}

.podium-slot b {
  max-width: 100%;
  margin-top: 4px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-slot small {
  color: #ffe08a;
  font-weight: 800;
}

.podium-stand {
  position: relative;
  width: 100%;
  margin-top: 4px;
  border-radius: 12px 12px 4px 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.podium-stand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  animation: podiumShine 2.4s linear infinite;
  pointer-events: none;
}

.podium-slot.p1 .podium-stand {
  height: 42px;
  background: linear-gradient(180deg, #ffe27a, #c48418 55%, #7a4e08);
  box-shadow: 0 0 18px rgba(255, 210, 74, 0.4);
}

.podium-slot.p2 .podium-stand {
  height: 32px;
  background: linear-gradient(180deg, #ececf4, #9a9aa8 55%, #5a5a66);
}

.podium-slot.p3 .podium-stand {
  height: 26px;
  background: linear-gradient(180deg, #f0b06a, #b86a32 55%, #6a3414);
}

.podium-slot em {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  color: #1a1410;
}

.podium-slot.p1 em { font-size: 24px; }

.podium-spark {
  display: none;
}

.podium-slot.p1 .podium-spark,
.podium-slot.p1 .podium-spark::before,
.podium-slot.p1 .podium-spark::after {
  display: block;
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff6c4;
  clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0 50%, 39% 35%);
  pointer-events: none;
}

.podium-slot.p1 .podium-spark {
  top: 6px;
  left: 8%;
  animation: podiumSpark 1.4s ease-in-out infinite;
}

.podium-slot.p1 .podium-spark::before {
  content: "";
  top: 28px;
  left: 64px;
  animation: podiumSpark 1.8s ease-in-out infinite 0.3s;
}

.podium-slot.p1 .podium-spark::after {
  content: "";
  top: -4px;
  left: 70px;
  width: 6px;
  height: 6px;
  animation: podiumSpark 1.2s ease-in-out infinite 0.6s;
}

.podium-slot .hits {
  margin-top: 2px;
}

.podium-slot .hit {
  width: 22px;
  height: 22px;
}

@keyframes podiumIn {
  from {
    transform: translateY(18px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.podium-slot.p1 {
  animation-name: podiumInGold;
}

@keyframes podiumInGold {
  from {
    transform: translateY(22px) scale(0.86);
    opacity: 0;
  }
  to {
    transform: translateY(-6px) scale(1.06);
    opacity: 1;
  }
}

@keyframes podiumFloat {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes podiumCrown {
  0%,
  100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-6px) rotate(6deg); }
}

@keyframes podiumFacePulse {
  0%,
  100% { box-shadow: 0 0 0 3px #ffd24a, 0 0 12px rgba(255, 210, 74, 0.4); }
  50% { box-shadow: 0 0 0 3px #fff6c4, 0 0 22px rgba(255, 210, 74, 0.8); }
}

@keyframes podiumShine {
  from { transform: translateX(-80%); }
  to { transform: translateX(80%); }
}

@keyframes podiumSpark {
  0%,
  100% { transform: scale(0.4) rotate(0deg); opacity: 0.35; }
  50% { transform: scale(1.15) rotate(20deg); opacity: 1; }
}

#tower-overlay .tower-score {
  flex: 0 0 auto;
  margin: 0;
  padding: 7px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #ffe08a;
  background: rgba(42, 28, 14, 0.7);
  box-shadow: 0 1px 0 rgba(255, 210, 74, 0.12);
}

#tower-overlay #tower-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 6px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

#tower-overlay #tower-list .league-row {
  padding: 6px 8px;
}

.tower-bar {
  flex: 0 0 auto;
  padding-top: 2px;
}

.tower-bar #tower-play {
  width: 100%;
  height: 42px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.quiet .tower-prize #tower-clock,
body.quiet .podium-slot,
body.quiet .podium-medal,
body.quiet .podium-slot.p1 .podium-face,
body.quiet .podium-stand::after,
body.quiet .podium-spark,
body.quiet .podium-spark::before,
body.quiet .podium-spark::after {
  animation: none;
}

.pass-card {
  text-align: center;
}

.pass-coin {
  display: flex;
  justify-content: center;
  margin: 0 0 8px;
}

.pass-coin .coin {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  animation: coinShine 1.6s ease-in-out infinite;
}

.pass-have {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 12px;
  font-weight: 800;
  color: var(--accent);
}

.lock-gate {
  width: min(340px, 100%);
  padding: 28px 22px 20px;
  text-align: center;
  overflow: hidden;
}

.lock-gate-ico {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: #120e0b;
  box-shadow: 0 0 0 3px #f4b942, 0 0 24px rgba(244, 185, 66, 0.4);
  animation: lockGatePop 0.55s cubic-bezier(0.2, 1.4, 0.3, 1) both, lockBeat 1.5s ease-in-out 0.55s infinite;
}

.lock-gate-title {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fff0a8, #ffd24a, #fff6c4, #ffd24a);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: prizeCall 2.4s linear infinite;
}

.lock-gate-call {
  margin: 0 0 18px;
  color: #ffe08a;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.35;
  animation: lockGateFade 0.5s ease 0.12s both;
}

.lock-gate-wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #2a2118;
  box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.35);
  animation: lockGateFade 0.5s ease 0.2s both;
}

.lock-gate-wallet span {
  font-weight: 800;
  color: var(--muted);
}

.lock-gate-wallet b,
.lock-gate-wallet #pass-have {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  color: #ffd24a;
}

.lock-gate-need {
  margin: 0 0 8px;
  font-weight: 800;
  color: #fff6c4;
  animation: lockGateFade 0.5s ease 0.28s both;
}

.lock-gate-miss {
  margin: 0 0 18px;
  font-weight: 800;
  font-size: 16px;
  color: #ff8a6a;
  animation: lockMiss 1.2s ease-in-out infinite;
}

.lock-gate-miss.ok {
  color: #3ecf8e;
  animation: lockGateFade 0.4s ease both;
}

.lock-gate-actions {
  gap: 8px;
}

.lock-gate-back {
  width: 100%;
}

@keyframes lockGatePop {
  0% { transform: scale(0.4) rotate(-12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes lockGateFade {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: none; }
}

@keyframes lockMiss {
  0%,
  100% { transform: scale(1); text-shadow: 0 0 0 transparent; }
  50% { transform: scale(1.04); text-shadow: 0 0 12px rgba(255, 120, 90, 0.55); }
}

.intro-card {
  width: min(360px, 100%);
  padding: 28px 22px 20px;
  text-align: center;
}

.intro-ico {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: #2a2118;
  box-shadow: 0 0 0 2px rgba(244, 185, 66, 0.45), 0 0 22px rgba(244, 185, 66, 0.25);
}

.intro-ico.pop {
  animation: lockGatePop 0.5s cubic-bezier(0.2, 1.4, 0.3, 1);
}

.intro-title {
  margin: 0 0 10px;
  font-size: 26px;
  background: linear-gradient(90deg, #fff0a8, #ffd24a, #fff6c4);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: prizeCall 2.2s linear infinite;
}

.intro-text {
  margin: 0 0 18px;
  color: #ffe08a;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.4;
}

.intro-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0 0 16px;
}

.intro-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a4a38;
}

.intro-dots i.on {
  background: #ffd24a;
  box-shadow: 0 0 10px rgba(255, 210, 74, 0.7);
}

.intro-next {
  width: 100%;
}

body.quiet .intro-title,
body.quiet .intro-ico.pop {
  animation: none;
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}

.shop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #2a2118;
  border-radius: 12px;
  padding: 10px;
}

.shop-row b {
  display: block;
}

.shop-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.shop-row span.with-coin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.shop-row .act {
  flex: 0 0 auto;
  width: auto;
  min-width: 76px;
}

.face {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #1a120c;
  flex: 0 0 auto;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.league-row .face {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.duel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #1a1410;
  animation: jarIn 0.32s cubic-bezier(0.2, 1.3, 0.3, 1);
}

.duel[hidden] {
  display: none;
}

.duel-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  font-size: 12px;
  font-weight: 800;
}

.duel-side.them {
  color: #ffd27a;
}

.duel-side small {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.duel-side .face {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.duel-side.them .face {
  animation: bob 1.1s ease-in-out infinite;
}

.duel-mid {
  text-align: center;
  color: var(--accent);
}

.duel-mid b {
  display: block;
  letter-spacing: 0.08em;
}

.duel-mid small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
}

.play-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.play-row .board {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.tower-sq {
  flex: 0 0 52px;
  width: 52px;
  align-self: center;
  border: 0;
  border-radius: 16px;
  padding: 10px 4px 8px;
  background: #2a2118;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: towerBlink 1.35s ease-in-out infinite;
}

.tower-sq-ico {
  font-size: 18px;
  line-height: 1;
}

.tower-sq small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tower-sq:active {
  transform: scale(0.94);
}

@keyframes towerBlink {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.22);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px var(--accent),
      0 0 18px rgba(244, 185, 66, 0.45);
    filter: brightness(1.12);
  }
}

body.quiet .tower-sq {
  animation: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-content: start;
  overflow: auto;
  margin: 0 0 14px;
}

.map-cell {
  border: 0;
  border-radius: 12px;
  aspect-ratio: 1;
  width: 100%;
  min-height: 0;
  background: #2a2118;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  animation: jarIn 0.28s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
}

.map-cell small {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}

.map-cell.now {
  color: #ffe08a;
  box-shadow:
    inset 0 0 0 2px #ffd24a,
    0 0 18px rgba(255, 210, 74, 0.55);
  animation: mapNow 1.2s ease-in-out infinite;
}

@keyframes mapNow {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 2px #ffd24a,
      0 0 12px rgba(255, 210, 74, 0.35);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px #fff0a8,
      0 0 26px rgba(255, 230, 120, 0.85);
    filter: brightness(1.12);
  }
}

body.quiet .map-cell.now {
  animation: none;
}

.map-cell.done {
  box-shadow: inset 0 0 0 1px #3ecf8e;
}

.map-cell.lock {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.tower-score {
  margin: 0 0 10px !important;
  font-weight: 800;
  color: var(--accent) !important;
}

.win-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 4px;
}

.win-stars span {
  width: 38px;
  height: 38px;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 36px;
  line-height: 1;
  color: #4a3c30;
  transform: scale(0.86);
  opacity: 0.28;
}

.win-stars span.on {
  background: none;
  box-shadow: none;
  color: #ffd24a;
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 0 10px rgba(255, 210, 74, 0.75));
  animation: starOn 0.35s cubic-bezier(0.2, 1.6, 0.3, 1);
}

.fly-star {
  position: fixed;
  z-index: 130;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 34px;
  color: #ffd24a;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 210, 74, 0.8));
  transition: left 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.55s ease, opacity 0.55s ease;
}

.win-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.confetti-bit {
  position: absolute;
  top: 42%;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: confettiBurst 1.15s ease-out forwards;
}

@keyframes confettiBurst {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--spin));
    opacity: 0;
  }
}

.win-cash {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 6px;
  font-size: 34px;
  font-weight: 800;
  color: #ffd24a;
}

.win-cash .coin {
  width: 32px;
  height: 32px;
}

.win-fire-pop {
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: 140;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 42px;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transition: left 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.55s ease, opacity 0.35s ease;
}

.win-fire-pop em {
  font-size: 28px;
  font-style: normal;
  font-weight: 800;
  color: #ffe08a;
  text-shadow: 0 0 12px rgba(255, 210, 74, 0.6);
}

.fly-coin {
  position: fixed;
  z-index: 130;
  width: 24px;
  height: 24px;
  pointer-events: none;
  transition: left 0.55s cubic-bezier(0.25, 0.8, 0.2, 1), top 0.55s cubic-bezier(0.45, 0.1, 0.2, 1), transform 0.55s ease, opacity 0.55s ease;
}

.overlay#overlay {
  overflow: hidden;
}

#overlay .card {
  position: relative;
  z-index: 3;
}

#overlay .win-fx {
  z-index: 4;
}

.reward {
  color: var(--accent) !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.top {
  display: none;
}

h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.04em;
}

.level {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.board {
  --jar-w: 62px;
  --jar-h: 176px;
  --jar-gap-x: 16px;
  --jar-gap-y: 14px;
  --layer-h: 34px;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: var(--jar-gap-y) var(--jar-gap-x);
  padding: 4px 0 8px;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.board::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 4px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.38), transparent 72%);
  pointer-events: none;
}

.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

.jar {
  width: var(--jar-w);
  height: var(--jar-h);
  border: 0;
  padding: 10px 8px 8px;
  border-radius: 12px 12px 28px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 28%),
    var(--glass);
  box-shadow:
    inset 0 0 0 2px rgba(255, 236, 200, 0.28),
    0 10px 18px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  cursor: pointer;
  transform-origin: 50% 92%;
  transition:
    transform 0.22s cubic-bezier(0.2, 1.4, 0.3, 1),
    box-shadow 0.22s ease;
  animation: jarIn 0.38s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}

.jar.settled {
  animation: none;
}

.jar.selected {
  transform: translateY(-18px) scale(1.05);
  box-shadow:
    inset 0 0 0 2px var(--accent),
    0 18px 26px rgba(0, 0, 0, 0.4);
}

.jar.settled.selected {
  animation: bob 0.9s ease-in-out infinite;
}

.jar.pour-left {
  transform: translateY(-8px) rotate(-20deg);
}

.jar.pour-right {
  transform: translateY(-8px) rotate(20deg);
}

.jar.shake,
.tower-cell.shake,
.hit.shake,
.league-row.shake {
  animation: shake 0.38s ease;
}

.jar.won {
  animation: wonPop 0.55s cubic-bezier(0.2, 1.5, 0.3, 1) both;
}

.layer {
  height: var(--layer-h);
  border-radius: 8px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.layer.pour-out {
  animation: pourOut 0.16s ease-in forwards;
}

.layer.pour-in {
  animation: pourIn 0.28s cubic-bezier(0.2, 1.5, 0.3, 1);
}

.blob {
  position: fixed;
  width: 20px;
  height: 28px;
  margin-left: -10px;
  margin-top: -8px;
  border-radius: 40% 40% 48% 48%;
  pointer-events: none;
  z-index: 40;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
  animation: blobFly 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

.splash {
  position: fixed;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 41;
  opacity: 0.75;
  animation: splash 0.28s ease-out forwards;
}

.bar {
  display: flex;
  gap: 8px;
}

button.act {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

button.act:active {
  transform: scale(0.97);
}

button.act:disabled {
  opacity: 0.45;
}

.more {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

#boot {
  z-index: 80;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

#boot.show,
.overlay.screen.show {
  background:
    radial-gradient(90vw 70vh at 50% 8%, #4a2a12 0%, transparent 58%),
    #120e0b;
}

body.screen .wrap {
  visibility: hidden;
  pointer-events: none;
}

body.map-open .wrap,
body.home-open .wrap {
  z-index: 60;
  visibility: visible;
  pointer-events: none;
}

body.map-open .hud,
body.map-open .fly,
body.home-open .hud,
body.home-open .fly {
  pointer-events: auto;
  z-index: 70;
}

body.map-open .fly,
body.home-open .fly {
  z-index: 75;
}

body.map-open .mission,
body.map-open .play-row,
body.map-open .bar,
body.map-open .skin-btn,
body.map-open .more,
body.map-open .fx,
body.map-open .level,
body.home-open .mission,
body.home-open .play-row,
body.home-open .bar,
body.home-open .skin-btn,
body.home-open .more,
body.home-open .fx,
body.home-open .level {
  visibility: hidden;
  pointer-events: none;
}

body.home-open #boot {
  z-index: 40;
  padding: calc(52px + env(safe-area-inset-top, 0px)) 0 max(8px, env(safe-area-inset-bottom, 0px));
  justify-content: flex-start;
  align-items: stretch;
  overflow: hidden;
}

body.home-open .home-title {
  padding-left: 48px;
  padding-right: 48px;
}

body.map-open .map-lead {
  padding-right: 52px;
}

body.map-open #map-overlay {
  padding-right: 56px;
}

.pack-ad {
  display: none;
  position: fixed;
  top: calc(58px + env(safe-area-inset-top, 0px));
  right: 8px;
  z-index: 72;
  width: 44px;
  padding: 6px 3px 5px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #6a3a10, #2a1608);
  color: #fff6c4;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 10px rgba(255, 180, 50, 0.35);
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  overflow: hidden;
  animation: packPeek 0.45s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

body.home-open .pack-ad:not(.tower-ad),
body.map-open .pack-ad:not(.tower-ad),
body.tower-open .pack-ad:not(.tower-ad) {
  display: flex;
}

body.tower-open .pack-ad {
  z-index: 77;
}

body.screen .pack-ad,
body:has(#pack-overlay.show) .pack-ad {
  display: none;
}

.pack-ad-shine {
  position: absolute;
  inset: -20%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 240, 180, 0.35) 50%, transparent 65%);
  animation: packShine 2.4s linear infinite;
  pointer-events: none;
}

.pack-ad-ico {
  font-size: 20px;
  line-height: 1;
  animation: packIco 1.1s ease-in-out infinite;
}

.pack-ad em {
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  color: #ffd24a;
  letter-spacing: -0.02em;
}

.pack-ad.flip {
  animation: packFlip 0.42s cubic-bezier(0.2, 1.3, 0.3, 1);
}

.pack-ad:active {
  transform: scale(0.94);
}

.tower-ad {
  display: none;
  top: calc(112px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, #2a6a62, #102824);
  color: #e8fff8;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), 0 0 10px rgba(80, 220, 190, 0.35);
}

.tower-ad em {
  color: #7ef0d8;
}

body.map-open .tower-ad {
  display: flex;
}

body.screen .tower-ad,
body:has(#pack-overlay.show) .tower-ad,
body:has(#pass-overlay.show) .tower-ad {
  display: none;
}

.tower-ad.locked {
  filter: grayscale(0.35);
  opacity: 0.88;
}

#pack-overlay {
  z-index: 74;
  padding: calc(58px + env(safe-area-inset-top, 0px)) 12px 16px;
  align-items: stretch;
  justify-content: flex-start;
}

#pack-overlay.show {
  background:
    radial-gradient(90vw 50vh at 50% 0%, #4a2a12 0%, transparent 55%),
    #120e0b;
}

.pack-shop {
  width: min(440px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 0 0 auto;
}

.pack-shop #pack-close {
  align-self: stretch;
  margin-top: 2px;
}

.pack-banner {
  flex: 0 0 auto;
  margin: 0 8px 4px;
  padding: 8px 12px;
  border-radius: 99px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff6c4;
  background: linear-gradient(90deg, #5a2a0c, #a85a14 50%, #5a2a0c);
  box-shadow: 0 0 16px rgba(244, 185, 66, 0.28);
  animation: titleShine 2.4s ease-in-out infinite;
}

.pack-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.pack-offer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
  border-radius: 22px;
  padding: 18px 14px 0;
  color: inherit;
  text-align: center;
  cursor: pointer;
  font: inherit;
  overflow: hidden;
  animation: packCardIn 0.42s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}

.pack-offer.tone-start {
  background:
    radial-gradient(80% 70% at 80% 0%, rgba(62, 207, 142, 0.18), transparent 55%),
    linear-gradient(180deg, #24382c, #162018);
  box-shadow: inset 0 0 0 1px #3ecf8e;
}

.pack-offer.tone-mid {
  background:
    radial-gradient(80% 70% at 80% 0%, rgba(160, 110, 255, 0.22), transparent 55%),
    linear-gradient(180deg, #3a2458, #1c1430);
  box-shadow: inset 0 0 0 1px #c084fc;
}

.pack-offer.tone-fat,
.pack-offer.fat {
  background:
    radial-gradient(80% 70% at 80% 0%, rgba(255, 210, 74, 0.28), transparent 55%),
    linear-gradient(180deg, #6a4a10, #2a1808);
  box-shadow:
    inset 0 0 0 1px #ffd24a,
    0 0 22px rgba(255, 210, 74, 0.35);
}

.pack-bonus {
  position: absolute;
  top: 10px;
  right: -2px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #1a1410;
  background: #ffd24a;
  border-radius: 10px 0 0 10px;
  padding: 4px 10px 4px 12px;
  animation: packGlow 1s ease-in-out infinite;
}

.pack-loot {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  min-height: 78px;
  margin: 4px 8px 2px;
}

.pack-bit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  animation: packBitPop 0.45s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

.pack-offer .pack-bit:nth-child(2) { animation-delay: 80ms; }
.pack-offer .pack-bit:nth-child(3) { animation-delay: 160ms; }

.pack-bit .coin,
.pack-ico {
  width: 42px;
  height: 42px;
  font-size: 34px;
  line-height: 42px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
  animation: packIco 1.3s ease-in-out infinite;
}

.pack-bit em {
  font-style: normal;
  font-size: 18px;
  font-weight: 900;
  color: #fff6c4;
  letter-spacing: -0.03em;
}

.pack-bit small {
  font-size: 10px;
  font-weight: 800;
  color: #ffe08a;
  opacity: 0.8;
}

.pack-bit.fire em {
  color: #ff9a1a;
}

.pack-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px -14px 0;
  padding: 10px 14px;
  background: linear-gradient(180deg, #ffe27a, #f4b942);
  color: #1a1410;
}

.pack-bar b {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pack-bar strong {
  font-size: 20px;
  font-weight: 900;
  color: #1a1410;
}

.pack-offer:active {
  transform: scale(0.98);
}

.pack-offer:active .pack-bar {
  filter: brightness(1.08);
}

@keyframes packCardIn {
  from {
    transform: translateY(16px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes packBitPop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes packPeek {
  from { transform: translateY(-10px) scale(0.8); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes packShine {
  from { transform: translateX(-80%); }
  to { transform: translateX(80%); }
}

@keyframes packIco {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.08); }
}

@keyframes packFlip {
  0% { transform: scale(0.86); opacity: 0.5; }
  100% { transform: none; opacity: 1; }
}

@keyframes packGlow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 8px rgba(255, 210, 74, 0.8)); }
}

body.quiet .pack-ad,
body.quiet .pack-ad-shine,
body.quiet .pack-ad-ico,
body.quiet .chip.fire.hot2,
body.quiet .pack-offer i,
body.quiet .pack-bonus,
body.quiet .pack-bit,
body.quiet .pack-bit .coin,
body.quiet .pack-ico,
body.quiet .pack-banner {
  animation: none;
}

#map-overlay {
  z-index: 40;
  padding: 58px 12px 20px;
  align-items: stretch;
  justify-content: flex-start;
}

#map-overlay.show {
  background:
    radial-gradient(90vw 70vh at 50% 8%, #4a2a12 0%, transparent 58%),
    #120e0b;
}

.map-panel {
  width: min(540px, 100%);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  text-align: center;
}

.map-lead {
  margin: 4px 8px 14px;
  color: #ffe08a;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.35;
}

#map-overlay .map-grid {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  align-content: start;
}

button.act.map-start {
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 40px;
  margin: 10px 0 0;
  padding: 0 16px;
  font-size: 15px;
  line-height: 1;
}

.home-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  flex: 0 1 120px;
  height: 120px;
  min-height: 56px;
  max-height: 140px;
  margin: 0 0 4px;
}

.home-pour,
.home-stream {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

.home-stream {
  box-shadow: 0 0 12px currentColor;
  animation: homeStream 9s linear infinite;
}

@keyframes homeStream {
  0%,
  10% {
    left: 28%;
    top: 42%;
    opacity: 0;
    background: #f4b942;
    color: #f4b942;
  }
  12% { opacity: 1; }
  20% { left: 40%; top: 14%; }
  24% { left: 50%; top: 42%; opacity: 0; }
  34%,
  38% {
    left: 50%;
    top: 42%;
    opacity: 0;
    background: #5b8def;
    color: #5b8def;
  }
  40% { opacity: 1; }
  48% { left: 62%; top: 14%; }
  52% { left: 70%; top: 42%; opacity: 0; }
  62%,
  66% {
    left: 70%;
    top: 42%;
    opacity: 0;
    background: #e85d4c;
    color: #e85d4c;
  }
  68% { opacity: 1; }
  76% { left: 48%; top: 12%; }
  80% { left: 28%; top: 42%; opacity: 0; }
  100% { opacity: 0; }
}

.home-jar {
  transform-origin: 50% 100%;
}

.home-jar.j1 {
  animation: tipLeft 9s ease-in-out infinite;
}

.home-jar.j2 {
  animation: tipLeft 9s ease-in-out infinite;
  animation-delay: 0s;
}

.home-jar.j3 {
  animation: tipRight 9s ease-in-out infinite;
}

@keyframes tipLeft {
  0%,
  10% { transform: none; }
  12%,
  22% { transform: rotate(-16deg); }
  26%,
  100% { transform: none; }
}

.home-jar.j2 {
  animation-name: tipLeft2;
}

@keyframes tipLeft2 {
  0%,
  38% { transform: none; }
  40%,
  50% { transform: rotate(-16deg); }
  54%,
  100% { transform: none; }
}

@keyframes tipRight {
  0%,
  66% { transform: none; }
  68%,
  78% { transform: rotate(16deg); }
  82%,
  100% { transform: none; }
}

.home-jar {
  width: 44px;
  height: 112px;
  border-radius: 12px 12px 16px 16px;
  background: rgba(255, 248, 235, 0.1);
  box-shadow:
    inset 0 0 0 2px rgba(255, 236, 210, 0.35),
    0 14px 22px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  transform-origin: 50% 100%;
}

.home-jar.j1 {
  animation: tipLeft 9s ease-in-out infinite;
}

.home-jar.j2 {
  height: 128px;
  animation: tipLeft2 9s ease-in-out infinite;
}

.home-jar.j3 {
  animation: tipRight 9s ease-in-out infinite;
}

.home-jar i {
  display: block;
  height: 24px;
}

.home-jar.j1 i:nth-child(1) { background: #e85d4c; }
.home-jar.j1 i:nth-child(2) { background: #e85d4c; }
.home-jar.j1 i:nth-child(3) { background: #f4b942; }
.home-jar.j1 i:nth-child(4) { background: #5b8def; }
.home-jar.j2 i:nth-child(1) { background: #3ecf8e; }
.home-jar.j2 i:nth-child(2) { background: #5b8def; }
.home-jar.j2 i:nth-child(3) { background: #f4b942; }
.home-jar.j3 i:nth-child(1) { background: #c084fc; }
.home-jar.j3 i:nth-child(2) { background: #c084fc; }
.home-jar.j3 i:nth-child(3) { background: #f4b942; }
.home-jar.j3 i:nth-child(4) { background: #e85d4c; }

.home-screen {
  width: min(440px, 100%);
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  margin: 0 auto;
  padding: 2px 16px 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
  box-sizing: border-box;
  animation: homeIn 0.45s ease;
}

.home-screen h1,
.home-title {
  margin: 0;
  flex: 0 0 auto;
  font-size: clamp(32px, 7vh, 46px);
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #fff6c4 0%, #ffd24a 45%, #f4b942 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #7a4e08);
  animation: titleShine 2.4s ease-in-out infinite;
}

@keyframes titleShine {
  0%,
  100% { filter: drop-shadow(0 2px 0 #7a4e08) drop-shadow(0 0 6px rgba(255, 210, 74, 0.35)); }
  50% { filter: drop-shadow(0 2px 0 #7a4e08) drop-shadow(0 0 16px rgba(255, 230, 120, 0.85)); }
}

.home-tag {
  flex: 0 0 auto;
  margin: 4px 0 10px;
  color: var(--muted);
  font-weight: 700;
}

.home-tile {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 22px;
  padding: 20px 18px 16px;
  margin: 0 0 12px;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  animation: jarIn 0.4s both;
}

.home-tile.play {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #2a2118;
  box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.45);
  animation: playCall 2s ease-in-out infinite;
}

@keyframes playCall {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(244, 185, 66, 0.4),
      0 0 10px rgba(244, 185, 66, 0.12);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px #ffd24a,
      0 0 22px rgba(244, 185, 66, 0.5);
  }
}

body.quiet .home-tile.play {
  animation: none;
}

.home-tile.tower {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  flex: 1 1 auto;
  padding: 12px 14px 0;
  min-height: 0;
  max-height: 200px;
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 80% 10%, rgba(62, 207, 142, 0.2) 0%, transparent 50%),
    linear-gradient(180deg, #163a48 0%, #0b1c28 100%);
  box-shadow:
    inset 0 0 0 1px #3ecf8e,
    0 0 22px rgba(62, 207, 142, 0.2);
  animation: towerCall 2.2s ease-in-out infinite;
}

.home-tile.tower.poor {
  background: linear-gradient(180deg, #2c3236 0%, #1a1d20 100%);
  box-shadow: inset 0 0 0 1px #5c656a;
  animation: none;
  filter: grayscale(0.4);
}

.home-tile.tower.poor .tower-name,
.home-tile.tower.poor .tower-call,
.home-tile.tower.poor .tower-clock-hot,
.home-tile.tower.poor .coin-heap-pic,
.home-tile.tower.poor .chest-pic {
  animation: none;
  filter: grayscale(0.55) brightness(0.78);
}

.tower-face {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
  flex: 1 1 auto;
}

.tower-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.home-tile.tower:active {
  transform: scale(0.98);
}

@keyframes towerCall {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px #3ecf8e,
      0 0 16px rgba(62, 207, 142, 0.16);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px #7ef0b8,
      0 0 28px rgba(62, 207, 142, 0.38);
  }
}

body.quiet .home-tile.tower {
  animation: none;
}

.home-tower-stage {
  position: relative;
  flex: 0 0 78px;
  width: 78px;
  height: 86px;
}

.home-tower-prize {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.home-tile.tower .tower-chest {
  display: block;
  width: 42px;
  height: 42px;
  line-height: 1;
  animation: chestGlow 1.3s ease-in-out infinite;
}

.home-tower-prize em {
  margin-top: 2px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  color: #ffe08a;
  white-space: nowrap;
}

.tower-shaft {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 68px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
}

.tower-shaft i {
  display: block;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(180deg, #c4843a, #6a3a14);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 160, 0.25);
}

.tower-lock-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.home-tile.tower:not(.locked) .tower-lock-layer {
  display: none;
}

.tower-lock {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: #120e0b;
  box-shadow: 0 0 0 3px #f4b942, 0 0 18px rgba(244, 185, 66, 0.45);
  font-size: 27px;
  line-height: 1;
  animation: lockBeat 1.4s ease-in-out infinite;
}

@keyframes lockBeat {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.tower-copy {
  flex: 1 1 56%;
  min-width: 0;
  text-align: left;
}

.home-tile.tower .tower-name {
  display: block;
  font-size: clamp(44px, 15vw, 64px);
  line-height: 0.8;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #e8fff4, #3ecf8e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #063028);
  animation: titleShine 1.8s ease-in-out infinite;
}

.tower-call {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #ffe08a;
  animation: callPulse 1.6s ease-in-out infinite;
}

.tower-clock-hot {
  animation: callPulse 1.2s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(255, 210, 74, 0.8);
}

@keyframes callPulse {
  0%,
  100% { opacity: 0.78; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.coin-heap-pic {
  display: block;
  flex: 0 0 auto;
  width: calc(100% + 28px);
  height: 52px;
  margin: auto -14px 0;
  object-fit: cover;
  object-position: bottom;
}

.tower-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(90deg, #3a2212, #2a1810);
  box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.45);
}

.tower-top .tower-chest {
  width: 48px;
  height: 48px;
}

.tower-top b,
.prize-call {
  display: block;
  font-size: 18px;
  background: linear-gradient(90deg, #fff6c4, #ffd24a, #ff9a1a, #fff6c4);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: prizeCall 1.4s linear infinite;
}

.tower-top .tower-chest {
  animation: chestGlow 1.1s ease-in-out infinite;
}

@keyframes prizeCall {
  0% { background-position: 0 50%; }
  100% { background-position: 220% 50%; }
}

#tower-overlay #tower-list {
  max-height: none;
}

.tower-top small {
  display: block;
  margin-top: 2px;
  color: #ffe08a;
  font-weight: 800;
}

.home-tile:active {
  transform: scale(0.98);
}

.home-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.home-tile b {
  display: block;
  font-size: 22px;
}

.home-tile.play b {
  font-size: 22px;
  margin: 0;
}

.play-level {
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  color: #ffd24a;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.home-tile small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.home-row {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-top: 0;
}

.home-mini {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 14px 10px;
  background: #2a2118;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.home-mini:active {
  transform: scale(0.97);
}

.home-mini.premium {
  text-align: left;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, #4a2e10 0%, #2a1810 55%, #3a2212 100%);
  box-shadow:
    inset 0 0 0 1px #f4b942,
    0 0 16px rgba(244, 185, 66, 0.2);
}

.home-mini.premium b {
  display: block;
  font-size: 22px;
  color: #ffe08a;
}

.home-mini.premium small {
  display: block;
  margin-top: 3px;
  color: #f4b942;
  font-size: 11px;
}

.home-gear {
  flex: 0 0 58px;
  width: 58px;
  border: 0;
  border-radius: 16px;
  background: #2a2118;
  color: #f4b942;
  box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-gear svg {
  width: 28px;
  height: 28px;
  animation: gearSpin 8s linear infinite;
}

@keyframes gearSpin {
  to { transform: rotate(360deg); }
}

.home-gear:active {
  transform: scale(0.96);
}

@media (max-height: 720px) {
  .home-art {
    gap: 12px;
  }

  .home-jar {
    width: 34px;
    height: 78px;
  }

  .home-jar.j2 {
    height: 90px;
  }

  .home-jar i {
    height: 16px;
  }

  .home-mini.premium {
    padding: 10px 12px;
  }

  .home-mini.premium b {
    font-size: 18px;
  }

  .home-gear {
    flex-basis: 52px;
    width: 52px;
  }
}

@keyframes homeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#settings-overlay {
  z-index: 81;
}

.boot-logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 8px;
  display: block;
  animation: wonPop 0.6s cubic-bezier(0.2, 1.4, 0.3, 1);
}

.boot-card h2 {
  margin: 0;
}

.menu-stat {
  margin: 8px 0 4px !important;
  font-weight: 700;
  color: var(--accent) !important;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-card {
  text-align: center;
}

.set-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  text-align: left;
  background: #2a2118;
  color: inherit;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}

.set-row.danger em {
  color: #f27a64;
}

.set-row.danger:active {
  transform: scale(0.98);
}

.set-row b {
  display: block;
}

.set-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.set-row em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
  flex: 0 0 auto;
}

.set-row.off em {
  color: var(--muted);
}

.set-row.flip {
  animation: jarIn 0.28s cubic-bezier(0.2, 1.3, 0.3, 1);
}

.set-row.set-lang {
  cursor: default;
}

.lang-picks {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.lang-picks button {
  min-width: 42px;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: #1a1410;
  color: var(--muted);
  cursor: pointer;
}

.lang-picks button.on {
  background: var(--accent);
  color: #1a1410;
  transform: scale(1.06);
  box-shadow: 0 0 14px rgba(244, 185, 66, 0.45);
}

body.quiet .scene-motes,
body.quiet .scene-caustic {
  display: none;
}

body.quiet .duel-side.them .face,
body.quiet .tower-cell.now .face {
  animation: none;
}

#chest-overlay,
#jackpot-overlay {
  z-index: 60;
  overflow: hidden;
}

#chest-overlay.show,
#jackpot-overlay.show {
  background: linear-gradient(180deg, rgba(10, 8, 6, 0.18) 0 58px, rgba(10, 8, 6, 0.7) 92px);
  align-items: flex-start;
  padding-top: 70px;
}

body.chest-open .hud {
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 0px));
  left: 50%;
  width: min(540px, calc(100% - 20px));
  transform: translateX(-50%);
  z-index: 85;
  margin: 0;
  pointer-events: none;
}

#chest-overlay .card {
  position: relative;
  z-index: 3;
}

.chest-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

.chest-card {
  border: 2px solid rgba(255, 210, 74, 0.55);
  box-shadow: 0 0 36px rgba(255, 196, 64, 0.28);
}

.jackpot-card .jackpot-ico {
  display: flex;
  justify-content: center;
  margin: 4px 0 8px;
  font-size: 42px;
  line-height: 1;
}

.jackpot-card .jackpot-ico .prize-coin,
.jackpot-card .jackpot-ico .prize-chest {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.jackpot-card .jackpot-prize strong {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
}

.chest-prize {
  margin: 4px 0 14px;
  animation: chestPrizeIn 0.5s cubic-bezier(0.2, 1.5, 0.3, 1);
}

.chest-prize strong {
  display: block;
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #ffe27a;
  text-shadow: 0 0 18px rgba(255, 210, 74, 0.85), 0 4px 0 #9a6a10;
  animation: chestPrizeGlow 1.1s ease-in-out infinite;
}

.chest-prize span {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff6c4;
}

.chest-bulbs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.chest-bulb {
  font-size: 22px;
  line-height: 1;
  animation: chestBulbPop 0.4s cubic-bezier(0.2, 1.6, 0.3, 1) both;
}

.chest-bit-coin {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.chest-bulb:nth-child(2) { animation-delay: 0.04s; }
.chest-bulb:nth-child(3) { animation-delay: 0.08s; }
.chest-bulb:nth-child(4) { animation-delay: 0.12s; }
.chest-bulb:nth-child(5) { animation-delay: 0.16s; }
.chest-bulb:nth-child(6) { animation-delay: 0.2s; }
.chest-bulb:nth-child(7) { animation-delay: 0.24s; }
.chest-bulb:nth-child(8) { animation-delay: 0.28s; }
.chest-bulb:nth-child(9) { animation-delay: 0.32s; }
.chest-bulb:nth-child(10) { animation-delay: 0.36s; }

@keyframes chestPrizeIn {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes chestPrizeGlow {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.25);
    transform: scale(1.06);
  }
}

@keyframes chestBulbPop {
  from {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

button.act.chest-claim {
  height: 56px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffe27a, #f4b942);
  color: #1a1410;
  box-shadow: 0 0 0 0 rgba(244, 185, 66, 0.75);
  animation: chestClaimPulse 1s ease-in-out infinite;
}

@keyframes chestClaimPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(244, 185, 66, 0.55);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 28px 6px rgba(255, 210, 74, 0.55);
  }
}

.fly-hint {
  position: fixed;
  z-index: 130;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 28px;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 226, 122, 0.9));
  transition: left 0.52s cubic-bezier(0.2, 0.75, 0.2, 1), top 0.52s cubic-bezier(0.45, 0.05, 0.2, 1), transform 0.52s ease, opacity 0.52s ease;
}

body.quiet .chest-prize strong,
body.quiet button.act.chest-claim,
body.quiet .chest-bulb {
  animation: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease, background 0.28s ease;
  z-index: 50;
}

.overlay.show {
  opacity: 1;
  background: rgba(10, 8, 6, 0.62);
  pointer-events: auto;
}

.card {
  width: min(360px, 100%);
  background: #3a2d20;
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  transform: translateY(18px) scale(0.9);
  transition: transform 0.34s cubic-bezier(0.2, 1.3, 0.3, 1);
}

.overlay.show .card {
  transform: none;
}

.card p {
  margin: 8px 0 18px;
  color: var(--muted);
}

.card button {
  width: 100%;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-actions .act {
  width: 100%;
}

button.act.primary {
  background: var(--accent);
  color: #1a1410;
}

button.act.primary.lock-ready {
  animation: buyGlow 1.3s ease-in-out infinite;
}

button.act.primary.dim {
  background: #3d372f;
  color: #8e857a;
  box-shadow: none;
  animation: none;
  filter: grayscale(0.35);
}

@keyframes buyGlow {
  0%,
  100% { box-shadow: 0 0 8px rgba(244, 185, 66, 0.28); }
  50% { box-shadow: 0 0 22px 4px rgba(244, 185, 66, 0.6); }
}

body.quiet .home-tile.play,
body.quiet button.act.primary.lock-ready {
  animation: none;
}

button.act.ghost {
  background: transparent;
  color: var(--muted);
}

.fail-risk {
  color: #ff8a4a !important;
  font-weight: 700;
  min-height: 1.2em;
}

#fail-overlay {
  z-index: 55;
}

#lock-overlay {
  z-index: 56;
}

#league-overlay {
  z-index: 58;
}

.league-card {
  text-align: left;
}

.league-lead {
  margin: 6px 0 12px !important;
  font-size: 13px;
}

.league-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 14px;
  max-height: 42vh;
  overflow: auto;
}

.league-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #2a2118;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 700;
  animation: jarIn 0.28s both;
}

.league-row.you {
  background: #4a3824;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.league-row.pick {
  cursor: pointer;
}

.league-row.mark {
  box-shadow: inset 0 0 0 1px #e85d4c;
}

.tower-gap {
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 2px 0;
}

.league-row .place {
  width: 28px;
  color: var(--accent);
}

.league-row .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-row .score {
  color: var(--muted);
  flex: 0 0 auto;
}

.hold-badge {
  flex: 0 0 auto;
  width: 20px;
  height: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mini-flask {
  position: relative;
  width: 16px;
  height: 26px;
  border-radius: 4px 4px 7px 7px;
  background: rgba(255, 248, 235, 0.12);
  box-shadow: inset 0 0 0 1.5px rgba(255, 236, 210, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
}

.mini-flask i {
  display: block;
  height: 7px;
}

.mini-flask i:first-child { background: #e85d4c; }
.mini-flask i:last-child { background: #5b8def; }

.hold-badge.dead .mini-flask {
  filter: grayscale(1) brightness(0.55);
}

.hold-badge.dead .mini-flask::after,
.hold-badge.dead .mini-flask::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 2px;
  height: 16px;
  background: #e85d4c;
  border-radius: 2px;
}

.hold-badge.dead .mini-flask::before { transform: translateX(-50%) rotate(38deg); }
.hold-badge.dead .mini-flask::after { transform: translateX(-50%) rotate(-38deg); }

.mini-flask.crack::after {
  content: "";
  position: absolute;
  inset: 4px 5px auto 3px;
  height: 14px;
  border-left: 1.5px solid #ffe08a;
  border-bottom: 1.5px solid #ffe08a;
  transform: rotate(18deg);
  opacity: 0.9;
}

.podium-slot .hold-badge {
  margin-top: 4px;
}

.league-row.hit-punch,
.podium-slot.hit-punch {
  animation: hitPunch 0.55s ease;
}

.league-row.hit-boom,
.podium-slot.hit-boom {
  animation: hitBoom 0.7s ease;
}

.chip.star-bomb.throw {
  transform: scale(0.86);
  opacity: 0.45;
}

.tower-hit-fx {
  position: fixed;
  inset: 0;
  z-index: 88;
  pointer-events: none;
}

.hit-scene {
  position: absolute;
  transform: translate(-50%, -50%);
}

.hit-mini-jar {
  width: 58px;
  height: 92px;
  border-radius: 12px 12px 20px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 28%),
    rgba(255, 248, 235, 0.12);
  box-shadow:
    inset 0 0 0 2px rgba(255, 236, 200, 0.4),
    0 14px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  animation: hitJarIn 0.32s cubic-bezier(0.2, 1.5, 0.3, 1) both;
}

.hit-mini-jar i {
  display: block;
  height: 20px;
}

.hit-mini-jar .c1 { background: #e85d4c; }
.hit-mini-jar .c2 { background: #f4b942; }
.hit-mini-jar .c3 { background: #5b8def; }

.hit-frost,
.hit-lock,
.hit-cross,
.hit-crack,
.hit-flash {
  position: absolute;
  pointer-events: none;
}

.hit-frost {
  inset: 0;
  opacity: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      rgba(180, 220, 240, 0.12) 0 6px,
      rgba(20, 24, 32, 0.28) 6px 12px
    );
}

.hit-lock {
  left: 50%;
  top: 34%;
  width: 22px;
  height: 16px;
  margin-left: -11px;
  border: 2px solid #f4d06a;
  border-radius: 3px;
  background: rgba(40, 30, 16, 0.7);
  opacity: 0;
  transform: scale(0.3);
}

.hit-lock::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -12px;
  width: 10px;
  height: 12px;
  border: 2px solid #f4d06a;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.hit-cross {
  inset: 0;
  opacity: 0;
}

.hit-cross::before,
.hit-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 14%;
  width: 5px;
  height: 72%;
  margin-left: -2.5px;
  background: #e85d4c;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(232, 93, 76, 0.7);
}

.hit-cross::before { transform: rotate(38deg); }
.hit-cross::after { transform: rotate(-38deg); }

.hit-scene.slam .hit-mini-jar {
  filter: grayscale(0.85) brightness(0.62);
  animation: hitJarDead 0.35s ease both;
}

.hit-scene.slam .hit-frost {
  opacity: 1;
}

.hit-scene.slam .hit-lock {
  opacity: 1;
  animation: hitLockSlam 0.28s cubic-bezier(0.2, 1.6, 0.3, 1) both;
}

.hit-scene.slam .hit-cross {
  opacity: 1;
  animation: hitCrossSlam 0.32s cubic-bezier(0.2, 1.5, 0.3, 1) both;
}

.hit-bomb-fly {
  position: absolute;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  animation: bombFly 0.42s cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.hit-bomb-fly .hit-draw {
  width: 100%;
  height: 100%;
}

.hit-flash {
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 24px 10px rgba(255, 180, 60, 0.7);
  animation: hitFlash 0.45s ease-out both;
}

.hit-mini-jar.crack-now {
  animation: hitJarCrack 0.55s ease both;
}

.hit-crack {
  inset: 10px 12px 16px 10px;
  border-left: 2px solid #fff3b0;
  border-bottom: 2px solid #fff3b0;
  transform: rotate(22deg);
  opacity: 0;
}

.hit-mini-jar.crack-now .hit-crack {
  animation: hitCrackIn 0.35s ease 0.12s both;
}

@keyframes hitJarIn {
  from { transform: scale(0.4) translateY(16px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes hitJarDead {
  0% { transform: scale(1); }
  40% { transform: scale(0.92) rotate(-4deg); }
  100% { transform: scale(1); }
}

@keyframes hitLockSlam {
  from { transform: scale(2.2) translateY(-18px); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes hitCrossSlam {
  from { transform: scale(1.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes bombFly {
  0% { transform: translate(-50%, -50%) scale(0.7) rotate(0); }
  70% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.28) rotate(32deg); }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(8deg); }
}

@keyframes hitFlash {
  from { transform: scale(0.4); opacity: 1; }
  to { transform: scale(7); opacity: 0; }
}

@keyframes hitJarCrack {
  0% { transform: scale(0.7); }
  35% { transform: scale(1.08) rotate(-8deg); }
  55% { transform: scale(0.96) rotate(6deg); }
  100% { transform: scale(1) rotate(-2deg); filter: saturate(0.7) brightness(0.85); }
}

@keyframes hitCrackIn {
  from { opacity: 0; transform: rotate(22deg) scale(0.6); }
  to { opacity: 1; transform: rotate(22deg) scale(1); }
}

@keyframes hitPunch {
  0%, 100% { transform: none; }
  25% { transform: translateX(-4px) scale(0.98); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes hitBoom {
  0%, 100% { transform: none; }
  20% { transform: scale(1.04) rotate(-1deg); }
  40% { transform: scale(0.97) rotate(1deg); }
  60% { transform: scale(1.03); }
}

body.quiet .hit-scene,
body.quiet .hit-bomb-fly,
body.quiet .league-row.hit-punch,
body.quiet .podium-slot.hit-punch,
body.quiet .league-row.hit-boom,
body.quiet .podium-slot.hit-boom {
  animation: none;
}

.league-row.frozen .score,
.podium-slot.frozen small {
  color: #8ec8e8;
}

.league-row.slowed .score,
.podium-slot.slowed small {
  color: #e09a5a;
}

.league-row.rise,
.podium-slot.rise {
  animation: towerRise 0.45s ease;
}

.league-row .score.rise,
.podium-slot small.rise {
  color: #ffe08a;
  animation: scorePop 0.45s ease;
}

@keyframes towerRise {
  0% { transform: translateY(4px); }
  60% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@keyframes scorePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

body.quiet .league-row.rise,
body.quiet .podium-slot.rise,
body.quiet .league-row .score.rise,
body.quiet .podium-slot small.rise {
  animation: none;
}

.hits {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.hit {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  padding: 3px;
  background: #1a1410;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hit .hit-draw {
  width: 100%;
  height: 100%;
  display: block;
}

.hit.dim {
  opacity: 0.38;
}

.hit:active {
  transform: scale(0.9);
}

.hit.tip-hot {
  box-shadow: 0 0 0 2px #ffd24a, 0 0 16px rgba(255, 210, 74, 0.7);
}

.tower-tip {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 82;
}

.tower-tip.show {
  display: block;
}

.tower-tip-catch {
  position: absolute;
  inset: 0;
}

.tower-tip-spot {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 2px #ffd24a, 0 0 0 9999px rgba(8, 6, 4, 0.62);
  pointer-events: none;
  animation: tipPulse 0.9s ease-in-out infinite;
}

.tower-tip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.tower-tip-arrow.up {
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 16px solid #ffd24a;
  animation: tipArrowUp 0.7s ease-in-out infinite;
}

.tower-tip-arrow.down {
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 16px solid #ffd24a;
  animation: tipArrowDown 0.7s ease-in-out infinite;
}

.tower-tip-card {
  position: absolute;
  width: min(320px, calc(100% - 24px));
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: #2a2118;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 2px #ffd24a;
  text-align: center;
}

.tower-tip-card p {
  margin: 0 0 10px;
  color: #ffe08a;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.35;
}

.tower-tip-card .act {
  width: 100%;
}

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

@keyframes tipArrowUp {
  0%,
  100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -7px); }
}

@keyframes tipArrowDown {
  0%,
  100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

body.quiet .tower-tip-spot,
body.quiet .tower-tip-arrow {
  animation: none;
}

.pass-toast {
  position: fixed;
  left: 50%;
  top: 18%;
  z-index: 70;
  transform: translate(-50%, -12px);
  background: #f4b942;
  color: #1a1410;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.pass-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.jar.hook-pulse {
  animation: hookPulse 1.1s ease-in-out infinite;
}

.jar.almost {
  box-shadow:
    inset 0 0 0 2px #ffd27a,
    0 0 18px rgba(244, 185, 66, 0.45);
}

.jar.sealed {
  box-shadow:
    inset 0 0 0 2px #f4b942,
    0 0 16px rgba(244, 185, 66, 0.35);
}

.jar.full-pop {
  animation: wonPop 0.5s cubic-bezier(0.2, 1.5, 0.3, 1);
}

.jar.arrive {
  animation: jarIn 0.42s cubic-bezier(0.2, 1.3, 0.3, 1) both;
}

.jar.locked {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(80, 70, 55, 0.55), rgba(20, 16, 12, 0.5)),
    var(--glass);
  box-shadow:
    inset 0 0 0 2px rgba(200, 170, 120, 0.35),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.jar.locked.settled {
  animation: none;
}

.jar.locked.frozen-hit {
  box-shadow:
    inset 0 0 0 2px #8ec8e8,
    0 0 18px rgba(120, 200, 240, 0.45);
}

.jar.locked.frozen-hit .lock-frost {
  background:
    repeating-linear-gradient(
      -18deg,
      rgba(180, 220, 255, 0.22) 0 6px,
      rgba(20, 40, 56, 0.35) 6px 12px
    );
}

.jar.locked.broken-hit {
  box-shadow:
    inset 0 0 0 2px #e85d4c,
    0 0 18px rgba(232, 93, 76, 0.4);
}

.jar.wound-paint {
  position: relative;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 2px #f4b942,
    0 0 16px rgba(244, 185, 66, 0.5);
}

.paint-drip {
  position: absolute;
  left: 18%;
  right: 22%;
  top: 10%;
  height: 46%;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 18%, #f4b942 0 18%, transparent 19%),
    radial-gradient(circle at 70% 28%, #e85d4c 0 14%, transparent 15%),
    radial-gradient(circle at 48% 62%, #7ec8e8 0 16%, transparent 17%);
  opacity: 0.92;
}

.jar.locked.broken-hit::after {
  content: "";
  position: absolute;
  inset: 18px 16px 28px 12px;
  border-left: 2px solid #ffe08a;
  border-bottom: 2px solid #ffe08a;
  transform: rotate(18deg);
  pointer-events: none;
}

.lock-frost {
  position: absolute;
  inset: 8px 7px 10px;
  border-radius: 8px 8px 20px 20px;
  background:
    repeating-linear-gradient(
      -18deg,
      rgba(255, 236, 200, 0.08) 0 6px,
      rgba(40, 32, 24, 0.2) 6px 12px
    );
  pointer-events: none;
}

.lock-mark {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 18px;
  height: 13px;
  margin-left: -9px;
  border: 2px solid #f4d06a;
  border-radius: 3px;
  background: rgba(40, 30, 16, 0.55);
  pointer-events: none;
}

.lock-mark::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -11px;
  width: 8px;
  height: 10px;
  border: 2px solid #f4d06a;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.lock-tag {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  color: #f4b942;
  pointer-events: none;
}

.jar.unlocked {
  box-shadow:
    inset 0 0 0 2px #f4b942,
    0 0 22px rgba(244, 185, 66, 0.5);
}

@keyframes lockPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.board.stuck {
  animation: stuckShake 0.42s ease;
}

.spark {
  position: fixed;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 42;
  animation: sparkFly 0.45s ease-out forwards;
}

.ring {
  position: fixed;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 41;
  animation: ringOut 0.5s ease-out forwards;
}

@keyframes hookPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.04);
  }
}

@keyframes stuckShake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-5px);
  }
  60% {
    transform: translateX(5px);
  }
}

@keyframes sparkFly {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 0.9;
  }
  to {
    transform: translate(var(--dx), var(--dy)) scale(0.2);
    opacity: 0;
  }
}

@keyframes ringOut {
  from {
    transform: scale(0.4);
    opacity: 0.8;
  }
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes jarIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.86);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(-18px) scale(1.05);
  }
  50% {
    transform: translateY(-22px) scale(1.06);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-7px);
  }
  75% {
    transform: translateX(7px);
  }
}

@keyframes pourOut {
  to {
    height: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(-10px) scaleX(0.7);
  }
}

@keyframes pourIn {
  from {
    height: 0;
    opacity: 0.4;
    transform: scaleX(0.7) translateY(8px);
  }
  to {
    height: 34px;
    opacity: 1;
    transform: none;
  }
}

@keyframes blobFly {
  0% {
    left: var(--x1);
    top: var(--y1);
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    left: var(--x2);
    top: var(--y2);
    transform: scale(0.55) rotate(18deg);
    opacity: 0.15;
  }
}

@keyframes splash {
  from {
    transform: scale(0.4);
    opacity: 0.8;
  }
  to {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes starOn {
  from {
    transform: scale(0.4) rotate(-20deg);
  }
  to {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes wonPop {
  0% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-14px) scale(1.08);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes washBreath {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes glowKick {
  0% {
    transform: scale(0.92);
    opacity: 0.35;
  }
  45% {
    transform: scale(1.06);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 0.28;
  }
}

@keyframes caustic {
  from {
    background-position: 0 0, 20px 10px, 40px 0;
  }
  to {
    background-position: 80px 30px, -40px 40px, 120px 20px;
  }
}

@keyframes moteRise {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  12% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-110vh) scale(1);
    opacity: 0;
  }
}

.loot-fly {
  position: fixed;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border-radius: 0;
  pointer-events: none;
  z-index: 45;
  background: url("coin.svg") center / contain no-repeat;
  box-shadow: none;
  animation: lootFly 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes lootFly {
  to {
    left: var(--tx);
    top: var(--ty);
    transform: scale(0.35);
    opacity: 0.2;
  }
}

@keyframes huntIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
