:root {
  --bg-top: #06172f;
  --bg-mid: #0d2d56;
  --bg-bottom: #081628;
  --panel: rgba(10, 20, 35, 0.74);
  --panel-border: rgba(145, 220, 255, 0.22);
  --text-main: #f6fbff;
  --text-soft: #c9d9ee;
  --danger: #ff5f6d;
  --safe: #44d2a8;
  --accent: #ffc75f;
  --enemy-a: #ff7e5f;
  --enemy-b: #ff3d6e;
  --elite-a: #ffe27f;
  --elite-b: #ff8d3a;
  --btn-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --coin: #ffd95a;
  --fever-a: #ffda73;
  --fever-b: #ff6658;
  --skill-a: #a9f2ff;
  --skill-b: #66d4ff;
  --share-a: #6cf1d6;
  --share-b: #4ab7ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 22% 18%, rgba(106, 173, 255, 0.3), transparent 28%),
    radial-gradient(circle at 82% 80%, rgba(255, 133, 96, 0.3), transparent 32%),
    linear-gradient(165deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
}

.app {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-top: calc(10px + env(safe-area-inset-top));
  padding-right: 12px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  touch-action: manipulation;
}

.app.is-fever .arena {
  border-color: rgba(255, 210, 111, 0.54);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 30px rgba(255, 154, 78, 0.26);
  animation: fever-arena 680ms ease-in-out infinite alternate;
}

.app.is-fever .background-glow {
  background: radial-gradient(circle, rgba(255, 188, 103, 0.42), rgba(255, 188, 103, 0));
}

.background-glow {
  position: absolute;
  inset: 6% 10% auto;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(122, 204, 255, 0.3), rgba(122, 204, 255, 0));
  filter: blur(10px);
  pointer-events: none;
}

.hud {
  z-index: 2;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(6px);
  padding: 10px;
  box-shadow: 0 12px 32px rgba(2, 11, 22, 0.35);
}

.hud__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hud__row--stats {
  margin-top: 8px;
}

.hud__row--hint {
  margin-top: 8px;
}

.hud__row--fever {
  margin-top: 8px;
  align-items: stretch;
}

.hud__row--mission {
  margin-top: 8px;
}

.hp {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.hp__label {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.hp__bar {
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(175, 218, 255, 0.35);
  background: rgba(6, 10, 26, 0.8);
  overflow: hidden;
}

.hp__fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), #ffb46a 55%, var(--safe) 100%);
  transition: width 180ms ease, filter 180ms ease;
}

.hp__value {
  min-width: 36px;
  text-align: right;
  font-weight: 800;
}

.meter {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(167, 226, 255, 0.28);
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(8, 18, 36, 0.66);
}

.meter__label {
  color: #fbe7aa;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.meter__bar {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 219, 148, 0.45);
  background: rgba(12, 19, 34, 0.9);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fever-a), var(--fever-b));
  transition: width 180ms ease;
}

.meter__fill.is-active {
  animation: fever-fill 480ms ease-in-out infinite alternate;
}

.meter__value {
  min-width: 52px;
  text-align: right;
  color: #ffe5aa;
  font-size: 0.74rem;
  font-weight: 800;
}

.mission-text {
  margin: 0;
  width: 100%;
  border: 1px solid rgba(157, 226, 255, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #d4efff;
  background: rgba(8, 21, 38, 0.63);
}

.status-text {
  margin: 0;
  width: 100%;
  border: 1px solid rgba(157, 226, 255, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #d7ecff;
  background: rgba(7, 19, 34, 0.58);
}

.stat {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(150, 217, 255, 0.2);
  border-radius: 12px;
  background: rgba(7, 16, 30, 0.64);
  padding: 7px 6px;
  text-align: center;
}

.stat span {
  display: block;
  font-size: 0.67rem;
  color: var(--text-soft);
  letter-spacing: 0.03em;
}

.stat strong {
  display: block;
  margin-top: 3px;
  font-size: 0.95rem;
}

.play {
  position: relative;
  flex: 1;
  min-height: 0;
}

.arena {
  position: relative;
  height: 100%;
  min-height: 360px;
  border: 1px solid rgba(146, 224, 255, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 24%, rgba(115, 225, 255, 0.14), transparent 36%),
    radial-gradient(circle at 70% 80%, rgba(255, 143, 89, 0.13), transparent 38%),
    linear-gradient(160deg, rgba(4, 19, 34, 0.9), rgba(4, 12, 24, 0.95));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 12px 32px rgba(1, 7, 17, 0.4);
}

.arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.25;
  pointer-events: none;
}

.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.enemy {
  position: absolute;
  width: var(--size, 62px);
  height: var(--size, 62px);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  isolation: isolate;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 34%),
    linear-gradient(145deg, var(--enemy-a), var(--enemy-b));
  box-shadow: 0 9px 0 rgba(86, 20, 41, 0.4), 0 14px 20px rgba(0, 0, 0, 0.34);
  transform: scale(0.85);
  animation: pop-in 170ms ease-out forwards, enemy-pulse 1.4s ease-in-out infinite 170ms;
  will-change: transform;
}

.enemy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
  opacity: 0;
  transform: scale(0.55);
  pointer-events: none;
  z-index: 0;
}

.enemy--elite {
  outline: 2px solid rgba(255, 227, 124, 0.76);
  outline-offset: 1px;
  filter: saturate(1.18) brightness(1.06);
}

.enemy--elite::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px dashed rgba(255, 233, 149, 0.5);
  pointer-events: none;
  animation: elite-ring 1.25s linear infinite;
  z-index: 1;
}

.enemy--slime {
  border-radius: 44% 56% 52% 48%;
  background:
    radial-gradient(circle at 38% 26%, rgba(255, 255, 255, 0.4), transparent 40%),
    linear-gradient(145deg, #72ffc4, #1cb78f);
  box-shadow: 0 9px 0 rgba(18, 86, 67, 0.44), 0 14px 20px rgba(0, 0, 0, 0.3);
}

.enemy--fang {
  clip-path: polygon(50% 3%, 85% 20%, 97% 52%, 82% 84%, 50% 98%, 18% 84%, 3% 52%, 15% 20%);
  border-radius: 16px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.35), transparent 38%),
    linear-gradient(155deg, #ff7f6a, #ff3559);
  box-shadow: 0 9px 0 rgba(132, 32, 48, 0.44), 0 15px 22px rgba(0, 0, 0, 0.34);
}

.enemy--bot {
  border-radius: 24% 24% 30% 30%;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.36), transparent 32%),
    linear-gradient(145deg, #74d7ff, #3c83ff);
  box-shadow: 0 9px 0 rgba(29, 57, 121, 0.45), 0 14px 20px rgba(0, 0, 0, 0.34);
}

.enemy--ghost {
  border-radius: 50% 50% 34% 34%;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.48), transparent 40%),
    linear-gradient(165deg, #b9fbff, #53c8ff);
  box-shadow: 0 9px 0 rgba(34, 87, 118, 0.42), 0 14px 20px rgba(0, 0, 0, 0.32);
}

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

.enemy__face {
  position: relative;
  z-index: 2;
  font-size: clamp(1rem, calc(var(--size, 62px) * 0.33), 1.5rem);
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.enemy__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 3;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(4, 17, 31, 0.82);
  color: #e9f8ff;
  font-size: 0.62rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.enemy__core {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(14, 26, 48, 0.72);
  font-size: 0.78rem;
}

.enemy__elite-mark {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 0.9rem;
  color: #fff2a8;
  text-shadow: 0 0 8px rgba(255, 199, 97, 0.85);
  pointer-events: none;
}

.enemy.is-hit {
  filter: brightness(1.35) saturate(1.32);
}

.enemy.is-hit::after {
  opacity: 0.95;
  animation: hit-flare 120ms ease-out;
}

.enemy.is-hit .enemy__face {
  animation: face-jolt 130ms ease-out;
}

.enemy.is-defeated {
  animation: enemy-splat 260ms ease-out forwards;
}

.enemy.is-escape {
  animation: enemy-fade 300ms ease forwards;
}

.lucky-chest {
  position: absolute;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffefaa, #ffb24f);
  color: #3b1a00;
  box-shadow: 0 8px 0 rgba(145, 74, 10, 0.4), 0 10px 22px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-weight: 900;
  cursor: pointer;
  animation: chest-pop 220ms ease-out forwards, chest-pulse 1.1s ease-in-out infinite 220ms;
}

.lucky-chest::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  opacity: 0.75;
}

.lucky-chest__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.lucky-chest__label {
  font-size: 0.58rem;
  letter-spacing: 0.03em;
}

.lucky-chest.is-opened {
  animation: chest-open 280ms ease-out forwards;
}

.lucky-chest.is-expired {
  animation: chest-expire 200ms ease-out forwards;
}

.spark {
  position: absolute;
  width: var(--spark-size, 8px);
  height: var(--spark-size, 8px);
  border-radius: 50%;
  background: rgba(255, 241, 168, 0.95);
  box-shadow: 0 0 0 10px rgba(255, 241, 168, 0.08);
  animation: spark-burst 520ms ease-out forwards;
}

.hit-flash {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--flash-size, 42px);
  height: var(--flash-size, 42px);
  border-radius: 50%;
  border: 2px solid var(--flash-color, #fff4b8);
  transform: translate(-50%, -50%) scale(0.65);
  opacity: 0;
  animation: flash-ring 250ms ease-out forwards;
}

.burst-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 233, 168, 0.86);
  box-shadow: 0 0 0 2px rgba(255, 215, 110, 0.25);
  transform: translate(-50%, -50%) scale(calc(0.5 * var(--ring-scale, 1)));
  opacity: 0;
  animation: burst-ring 300ms ease-out forwards;
}

.coin {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--coin);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  animation: coin-fly 680ms ease-out forwards;
  animation-delay: var(--delay, 0s);
}

.float-score {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #ffe89a;
  font-size: 0.92rem;
  font-weight: 800;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  animation: float-up 740ms ease-out forwards;
}

.float-score--coin {
  color: #ffe17c;
  font-size: 0.88rem;
}

.float-score--kill {
  color: #fff3aa;
  font-size: 0.98rem;
}

.float-score--combo {
  color: #9ef4ff;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.float-score--skill {
  color: #a8fff1;
  font-size: 0.9rem;
}

.float-score--chest {
  color: #fff0ab;
  font-size: 0.86rem;
}

.float-score--mission {
  color: #b7ffe7;
  font-size: 0.9rem;
}

.stat strong.is-pop {
  animation: score-pop 250ms ease-out;
}

.panel {
  position: absolute;
  inset: calc(10px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
  z-index: 8;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(5, 17, 32, 0.92), rgba(7, 20, 39, 0.94));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.panel--result {
  border-color: rgba(137, 238, 188, 0.35);
  background: linear-gradient(180deg, rgba(6, 23, 37, 0.94), rgba(8, 30, 40, 0.95));
  overflow-y: auto;
}

.panel--result .eyebrow {
  color: #a3f2cc;
  letter-spacing: 0.08em;
  text-transform: none;
}

.panel--centered {
  text-align: left;
}

.panel h1,
.panel h2 {
  margin: 0;
  line-height: 1;
  letter-spacing: 0.02em;
}

.panel h1 {
  font-size: clamp(2rem, 6vw, 2.7rem);
}

.panel h2 {
  font-size: clamp(1.8rem, 5vw, 2.3rem);
}

.eyebrow {
  margin: 0;
  color: var(--text-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
}

.panel-copy {
  margin: 2px 0 0;
  color: var(--text-soft);
  line-height: 1.4;
}

.rules {
  margin: 0;
  padding-left: 18px;
  color: #d9ebff;
  display: grid;
  gap: 6px;
  font-size: 0.96rem;
  line-height: 1.4;
}

.results {
  display: grid;
  gap: 8px;
}

.result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(160, 225, 255, 0.21);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 23, 34, 0.78);
}

.result span {
  color: var(--text-soft);
}

.result strong {
  font-size: 1.1rem;
}

.share-card {
  border: 1px solid rgba(150, 234, 255, 0.28);
  border-radius: 16px;
  padding: 12px;
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 197, 108, 0.24), transparent 28%),
    linear-gradient(145deg, rgba(12, 37, 55, 0.92), rgba(10, 24, 42, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.share-card__rank {
  margin: 0;
  font-size: 0.74rem;
  color: #b6ffd9;
  letter-spacing: 0.05em;
}

.share-card__title {
  margin: 5px 0 0;
  font-size: 1.24rem;
  line-height: 1.2;
}

.share-card__slogan {
  margin: 6px 0 0;
  color: #d4ecff;
  font-size: 0.86rem;
  line-height: 1.35;
}

.share-card__stats {
  margin-top: 9px;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.share-card__stats div {
  border: 1px solid rgba(154, 222, 255, 0.26);
  border-radius: 10px;
  padding: 6px;
  background: rgba(7, 19, 34, 0.56);
}

.share-card__stats span {
  display: block;
  font-size: 0.64rem;
  color: #b8d9f6;
}

.share-card__stats strong {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
}

.share-card__challenge {
  margin: 8px 0 0;
  color: #ffe3aa;
  font-size: 0.8rem;
  line-height: 1.35;
}

.share-preview {
  margin: 0;
  border: 1px dashed rgba(151, 214, 255, 0.3);
  border-radius: 12px;
  padding: 9px 10px;
  color: #d8ebff;
  font-size: 0.73rem;
  line-height: 1.35;
  background: rgba(7, 19, 34, 0.55);
  white-space: pre-line;
}

.actions {
  display: grid;
  gap: 8px;
}

.btn {
  border: 0;
  border-radius: 14px;
  min-height: 46px;
  font-size: 0.96rem;
  font-weight: 800;
  color: #051126;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 130ms ease, filter 130ms ease, opacity 130ms ease;
  box-shadow: var(--btn-shadow);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.4);
  opacity: 0.58;
}

.btn--primary {
  background: linear-gradient(135deg, #75f4cf, #46d2f1);
}

.btn--accent {
  background: linear-gradient(135deg, #ffde8a, #ffb55e);
}

.btn--ghost {
  background: linear-gradient(135deg, #8dd7ff, #6ca8ff);
}

.btn--skill {
  min-height: auto;
  min-width: 118px;
  padding: 8px 10px;
  font-size: 0.8rem;
  border: 1px solid rgba(141, 233, 255, 0.35);
  background: linear-gradient(135deg, var(--skill-a), var(--skill-b));
}

.btn--share {
  background: linear-gradient(135deg, var(--share-a), var(--share-b));
  color: #04233d;
}

.btn--text {
  background: rgba(141, 196, 255, 0.16);
  color: var(--text-main);
  box-shadow: none;
  border: 1px solid rgba(141, 196, 255, 0.36);
}

.panel-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #c6dcf7;
}

.panel-note code {
  color: #fff2aa;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 12;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(147, 221, 255, 0.5);
  background: rgba(7, 20, 38, 0.92);
  color: #f3f9ff;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.shake {
  animation: screen-shake 280ms linear;
}

.hidden {
  display: none !important;
}

@keyframes pop-in {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes enemy-splat {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.46);
    filter: blur(2px);
  }
}

@keyframes enemy-fade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.6) translateY(18px);
  }
}

@keyframes spark-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1.4);
  }
}

@keyframes float-up {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -132%);
  }
}

@keyframes face-jolt {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18) rotate(-8deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes hit-flare {
  0% {
    opacity: 0;
    transform: scale(0.65);
  }
  40% {
    opacity: 0.95;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes flash-ring {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

@keyframes burst-ring {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(calc(0.5 * var(--ring-scale, 1)));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(calc(1.5 * var(--ring-scale, 1)));
  }
}

@keyframes coin-fly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -36px))) scale(1) rotate(var(--rot, 0deg));
  }
}

@keyframes score-pop {
  0% {
    transform: scale(1);
    color: inherit;
  }
  40% {
    transform: scale(1.22);
    color: #fff2a8;
    text-shadow: 0 0 10px rgba(255, 222, 125, 0.6);
  }
  100% {
    transform: scale(1);
    color: inherit;
    text-shadow: none;
  }
}

@keyframes elite-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.95) rotate(0deg);
  }
  100% {
    opacity: 0.5;
    transform: scale(1.06) rotate(360deg);
  }
}

@keyframes screen-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-3px);
  }
  40% {
    transform: translateX(3px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
}

@keyframes fever-fill {
  0% {
    filter: saturate(1) brightness(1);
  }
  100% {
    filter: saturate(1.35) brightness(1.12);
  }
}

@keyframes fever-arena {
  0% {
    filter: saturate(1) brightness(1);
  }
  100% {
    filter: saturate(1.2) brightness(1.08);
  }
}

@keyframes chest-pop {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes chest-open {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.35) rotate(8deg);
  }
}

@keyframes chest-expire {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.82) translateY(12px);
  }
}

@media (min-width: 560px) {
  .app {
    padding-top: 16px;
    padding-bottom: 18px;
    gap: 12px;
  }

  .panel {
    inset: 16px;
    padding: 24px;
  }

  .btn {
    min-height: 50px;
  }
}
