/* 小龙街机 · 横屏街机收集玩法 */
* { box-sizing: border-box; }

:root {
  --orange: #FF8A3D;
  --orange-deep: #F0641C;
  --orange-light: #FFD08A;
  --gold: #FFD75E;
  --ink: #0B0618;
  --panel: rgba(13, 8, 34, 0.84);
  --stroke: rgba(255, 176, 87, 0.62);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #07040F;
  color: #FFF4E4;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

body { position: fixed; inset: 0; }

button { font-family: inherit; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #07040F;
  touch-action: none;
  cursor: default;
}

/* ---------- 画面：这一轮生成的街机实机图铺满 ---------- */
.bg-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.06);
  transform-origin: center 42%;
  pointer-events: none;
  will-change: transform;
}

.shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(4, 2, 14, 0) 48%, rgba(4, 2, 14, 0.30) 100%),
    linear-gradient(180deg, rgba(4, 2, 14, 0.42) 0%, rgba(4, 2, 14, 0) 17%, rgba(4, 2, 14, 0) 78%, rgba(4, 2, 14, 0.42) 100%);
}

/* ---------- 顶部 HUD ---------- */
.hud {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: calc(14px + var(--safe-left));
  right: calc(14px + var(--safe-right));
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

.scoreboard {
  position: relative;
  min-width: 196px;
  padding: 7px 18px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 17, 64, 0.92) 0%, rgba(9, 6, 26, 0.82) 100%);
  border: 1.5px solid var(--stroke);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(255, 138, 61, 0.16),
    inset 0 1px 0 rgba(255, 226, 178, 0.22),
    inset 0 0 16px rgba(255, 138, 61, 0.07);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  pointer-events: none;
}

.score-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  line-height: 1;
}

.score-label {
  font-size: clamp(8px, 1.7vh, 10px);
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--orange-light);
  opacity: 0.92;
}

.score-value {
  display: inline-block;
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(22px, 4.2vh, 32px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #FFE9BD;
  text-shadow:
    0 0 12px rgba(255, 138, 61, 0.85),
    0 2px 0 rgba(112, 37, 0, 0.9),
    0 3px 8px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
}

.score-value.bump { animation: scoreBump 0.26s ease-out; }

.score-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.lives {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.lives .mp-icon {
  width: clamp(12px, 2vh, 16px);
  height: clamp(12px, 2vh, 16px);
  color: #FF5C78;
  filter: drop-shadow(0 0 4px rgba(255, 74, 116, 0.85));
  transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

.lives .mp-icon.lost {
  opacity: 0.22;
  filter: grayscale(1);
  transform: scale(0.82);
}

.best {
  font-size: clamp(8px, 1.5vh, 10px);
  font-weight: 700;
  letter-spacing: 0.13em;
  color: rgba(255, 244, 228, 0.58);
  white-space: nowrap;
}

.best b {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 1.15em;
  color: var(--orange-light);
  letter-spacing: 0.04em;
}

.combo {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translate(-50%, -5px);
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 190, 82, 0.22), rgba(255, 122, 46, 0.14));
  border: 1px solid rgba(255, 199, 106, 0.52);
  box-shadow: 0 0 16px rgba(255, 160, 66, 0.28);
  font-size: clamp(9px, 1.7vh, 11px);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--gold);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  text-shadow: 0 0 8px rgba(255, 190, 70, 0.7);
}

.combo.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.icon-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(40px, 6.4vh, 50px);
  height: clamp(40px, 6.4vh, 50px);
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 176, 87, 0.56);
  background: linear-gradient(180deg, rgba(26, 17, 64, 0.9), rgba(10, 6, 28, 0.86));
  color: #FFC979;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 226, 178, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease;
  z-index: 22;
}

.icon-btn .mp-icon {
  width: clamp(20px, 3.4vh, 26px);
  height: clamp(20px, 3.4vh, 26px);
  filter: drop-shadow(0 0 5px rgba(255, 160, 70, 0.5));
}

.icon-btn:active {
  transform: scale(0.92);
  background: linear-gradient(180deg, rgba(255, 138, 61, 0.34), rgba(120, 48, 8, 0.5));
}

.icon-btn:focus-visible,
.btn:focus-visible,
.touch-zone:focus-visible {
  outline: 2px solid #FFE1A6;
  outline-offset: 2px;
}

/* ---------- 掉落物 ---------- */
.field {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.item {
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("images/gen/gptimg_1795392608_look.png");
  background-repeat: no-repeat;
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(255, 196, 120, 0.14), 0 0 14px rgba(255, 120, 40, 0.22);
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.55));
  will-change: transform;
  backface-visibility: hidden;
}

/* 卡带裁切：坐标均取自同一张街机画面，不另画素材 */
.it-ship {
  background-size: 930.909% auto;
  background-position: 64.916% 54.804%;
}

.it-tank {
  background-size: 948.148% auto;
  background-position: 80.058% 54.804%;
}

.it-tetris {
  background-size: 984.615% auto;
  background-position: 94.638% 54.804%;
}

.it-fighter {
  background-size: 465.455% auto;
  background-position: 42.703% 50.076%;
}

.it-crown {
  background-size: 1219.048% auto;
  background-position: 43.404% 26.695%;
  border-radius: 0;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 10px rgba(255, 214, 94, 0.9));
}

.pop-score {
  position: absolute;
  z-index: 15;
  transform: translate(-50%, -50%);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(14px, 2.8vh, 20px);
  font-weight: 800;
  color: #FFE2A2;
  text-shadow: 0 0 10px rgba(255, 138, 61, 0.9), 0 2px 0 rgba(80, 22, 0, 0.9);
  pointer-events: none;
  animation: popRise 0.72s ease-out forwards;
  white-space: nowrap;
}

.pop-score.gold { color: #FFE96B; font-size: clamp(17px, 3.3vh, 24px); }

/* ---------- 接卡盘 ---------- */
.catcher {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 12;
  width: clamp(104px, 15vw, 150px);
  height: clamp(40px, 5.6vw, 50px);
  border-radius: 12px 12px 16px 16px;
  border: 2px solid #FFB257;
  background:
    linear-gradient(180deg, rgba(74, 42, 122, 0.96) 0%, rgba(31, 16, 72, 0.98) 48%, rgba(13, 7, 32, 0.99) 100%);
  box-shadow:
    0 0 18px rgba(255, 138, 61, 0.66),
    0 0 42px rgba(255, 110, 40, 0.26),
    0 7px 16px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 228, 180, 0.7),
    inset 0 -10px 18px rgba(255, 138, 61, 0.22);
  will-change: transform;
  pointer-events: none;
}

.catcher-beam {
  position: absolute;
  left: 8%;
  right: 8%;
  top: -7px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 213, 138, 0) 0%, #FFD58A 22%, #FFF2CF 50%, #FFD58A 78%, rgba(255, 213, 138, 0) 100%);
  box-shadow: 0 0 10px #FF9A4A, 0 0 22px rgba(255, 138, 61, 0.7);
  animation: beamPulse 1.7s ease-in-out infinite;
}

.catcher-slot {
  position: absolute;
  inset: 6px;
  border-radius: 8px 8px 11px 11px;
  border: 1px solid rgba(255, 180, 87, 0.34);
  background:
    repeating-linear-gradient(90deg, rgba(255, 160, 80, 0.16) 0 2px, rgba(255, 160, 80, 0) 2px 12px),
    linear-gradient(180deg, rgba(255, 160, 80, 0.20), rgba(255, 160, 80, 0.02));
  display: grid;
  place-items: center;
  color: #FFD28A;
  overflow: hidden;
}

.catcher-slot .mp-icon {
  width: clamp(20px, 3.6vh, 27px);
  height: clamp(20px, 3.6vh, 27px);
  opacity: 0.92;
  filter: drop-shadow(0 0 7px rgba(255, 160, 80, 0.9));
}

.catcher.grab .catcher-slot {
  animation: slotFlash 0.22s ease-out;
}

/* ---------- 左右操作 ---------- */
.touch-zone {
  position: absolute;
  top: 57%;
  transform: translateY(-50%);
  z-index: 25;
  width: clamp(44px, 7vh, 54px);
  height: clamp(44px, 7vh, 54px);
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 15px;
  border: 1px solid rgba(255, 180, 87, 0.28);
  background: linear-gradient(180deg, rgba(16, 10, 40, 0.36), rgba(8, 5, 22, 0.5));
  color: rgba(255, 221, 160, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255, 230, 185, 0.12);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.12s ease, color 0.12s ease;
  touch-action: none;
}

.touch-zone.left { left: calc(10px + var(--safe-left)); }
.touch-zone.right { right: calc(10px + var(--safe-right)); }

.touch-zone .mp-icon {
  width: clamp(24px, 4.2vh, 30px);
  height: clamp(24px, 4.2vh, 30px);
  filter: drop-shadow(0 0 5px rgba(255, 160, 70, 0.35));
}

.touch-zone.pressed,
.touch-zone:active {
  transform: translateY(-50%) scale(0.92);
  background: linear-gradient(180deg, rgba(255, 138, 61, 0.4), rgba(120, 48, 8, 0.5));
  color: #FFE8BC;
}

/* ---------- 提示 / 倒计时 ---------- */
.hint {
  position: absolute;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 24;
  max-width: 86vw;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(8, 5, 22, 0.62);
  border: 1px solid rgba(255, 180, 87, 0.24);
  color: rgba(255, 238, 208, 0.82);
  font-size: clamp(10px, 1.8vh, 12px);
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hint.hide {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.start-prompt {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 6px 18px 6px 7px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 197, 112, 0.88);
  background: linear-gradient(180deg, rgba(45, 26, 92, 0.94) 0%, rgba(13, 8, 32, 0.95) 100%);
  color: #FFE3B4;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.48),
    0 0 26px rgba(255, 138, 61, 0.36),
    inset 0 1px 0 rgba(255, 232, 190, 0.3);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  cursor: pointer;
  touch-action: manipulation;
  animation: startPulse 2s ease-in-out infinite;
}

.start-prompt:active {
  transform: translate(-50%, -50%) scale(0.95);
  filter: brightness(1.08);
}

.start-coin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #3B1302;
  background: radial-gradient(circle at 35% 28%, #FFE1A2 0%, #FFAF55 40%, #F47824 100%);
  box-shadow:
    0 0 14px rgba(255, 160, 70, 0.65),
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -2px 3px rgba(130, 42, 0, 0.25);
}

.start-coin .mp-icon {
  width: 20px;
  height: 20px;
}

.start-label {
  font-size: clamp(12px, 2.1vh, 15px);
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 150, 60, 0.4);
}

@keyframes startPulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48), 0 0 18px rgba(255, 138, 61, 0.28), inset 0 1px 0 rgba(255, 232, 190, 0.3); }
  50% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48), 0 0 34px rgba(255, 138, 61, 0.55), inset 0 1px 0 rgba(255, 232, 190, 0.3); }
}

.countdown {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(255, 138, 61, 0.16) 0%, rgba(255, 138, 61, 0) 44%);
  transition: opacity 0.28s ease;
}

.countdown.hide { opacity: 0; }

.cd-text {
  font-size: clamp(46px, 13vh, 96px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  color: #FFE7B4;
  text-shadow:
    0 0 18px rgba(255, 138, 61, 0.9),
    0 0 48px rgba(255, 110, 40, 0.55),
    0 5px 0 #8A2E00,
    0 8px 18px rgba(0, 0, 0, 0.6);
  animation: cdPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}

.cd-text.go {
  color: #FFE96B;
  font-size: clamp(58px, 16vh, 120px);
  text-shadow:
    0 0 20px rgba(255, 220, 90, 0.95),
    0 0 60px rgba(255, 160, 40, 0.7),
    0 5px 0 #8A2E00,
    0 8px 20px rgba(0, 0, 0, 0.6);
}

.cd-sub {
  font-size: clamp(11px, 2vh, 14px);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255, 231, 187, 0.72);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* ---------- 弹层 ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: calc(14px + var(--safe-top)) calc(18px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(18px + var(--safe-left));
  background: rgba(5, 3, 15, 0.62);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.panel {
  position: relative;
  width: min(360px, 86vw);
  max-height: 100%;
  overflow: auto;
  padding: clamp(18px, 3.4vh, 26px) clamp(16px, 3vw, 24px) clamp(16px, 2.8vh, 22px);
  border-radius: 20px;
  border: 1.5px solid rgba(255, 176, 77, 0.72);
  background: linear-gradient(180deg, rgba(28, 18, 66, 0.98) 0%, rgba(10, 6, 28, 0.99) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.62),
    0 0 44px rgba(255, 138, 61, 0.17),
    inset 0 1px 0 rgba(255, 226, 178, 0.18);
  text-align: center;
  animation: panelIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 2px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, #FFC36B 30%, #FFF0CC 50%, #FFC36B 70%, transparent);
  box-shadow: 0 0 14px rgba(255, 170, 80, 0.8);
  pointer-events: none;
}

.panel-kicker {
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: #FFB257;
  text-indent: 0.35em;
  opacity: 0.95;
}

.panel h2 {
  margin: 0;
  font-size: clamp(20px, 3.5vh, 26px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #FFE9C8;
  text-shadow: 0 0 16px rgba(255, 138, 61, 0.4), 0 2px 0 rgba(70, 20, 0, 0.7);
}

.panel-desc {
  margin: 6px 0 14px;
  font-size: clamp(11px, 1.9vh, 13px);
  color: rgba(255, 244, 228, 0.5);
}

.panel-score {
  margin: 14px 0 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 244, 228, 0.55);
}

.panel-score b {
  margin-left: 4px;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 1.6em;
  letter-spacing: 0.03em;
  color: var(--orange-light);
  text-shadow: 0 0 10px rgba(255, 138, 61, 0.55);
  vertical-align: -1px;
}

.final-score {
  margin: 4px 0 2px;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(40px, 8vh, 60px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #FFCF87;
  text-shadow: 0 0 24px rgba(255, 138, 61, 0.8), 0 4px 0 rgba(90, 26, 0, 0.65);
  font-variant-numeric: tabular-nums;
}

.new-best {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(255, 200, 70, 0.8);
  animation: blink 1s steps(2, end) infinite;
}

.panel .panel-score:last-of-type { margin-top: 10px; }

.btn {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  font-size: clamp(14px, 2.3vh, 16px);
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.12s ease;
  touch-action: manipulation;
}

.btn:active { transform: scale(0.97); filter: brightness(0.94); }

.btn.primary {
  color: #351203;
  background: linear-gradient(180deg, #FFC06D 0%, #FFA24E 42%, #FF7A2E 100%);
  box-shadow:
    0 8px 22px rgba(255, 122, 46, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -2px 0 rgba(150, 50, 0, 0.2);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn.ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #FFD7A3;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 180, 87, 0.3);
  font-size: clamp(12px, 2vh, 14px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.btn.ghost .mp-icon {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 4px rgba(255, 160, 70, 0.5));
}

.panel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}

.panel-tip {
  margin: 11px 0 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 244, 228, 0.34);
}

/* ---------- 特效 ---------- */
.flash {
  position: absolute;
  inset: 0;
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 60, 80, 0) 34%, rgba(255, 40, 62, 0.5) 100%);
  transition: opacity 0.16s ease;
}

.flash.on { opacity: 1; }

.stage.shake .hud,
.stage.shake .field {
  animation: shake 0.3s linear;
}

@keyframes scoreBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.14); color: #FFF3C9; }
  100% { transform: scale(1); }
}

@keyframes popRise {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.7); }
  22% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(1); }
}

@keyframes beamPulse {
  0%, 100% { opacity: 0.65; transform: scaleX(0.92); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes slotFlash {
  0% { background-color: rgba(255, 220, 140, 0.5); }
  100% { background-color: transparent; }
}

@keyframes cdPop {
  0% { opacity: 0; transform: scale(1.5); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes panelIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-7px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@media (max-height: 430px) {
  .scoreboard { padding: 5px 14px 6px; min-width: 174px; }
  .panel { border-radius: 16px; }
  .panel-desc { margin: 3px 0 10px; }
  .panel-score { margin: 10px 0 14px; }
  .panel-tip { display: none; }
  .hint { bottom: calc(5px + var(--safe-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .catcher-beam,
  .new-best,
  .start-prompt,
  .cd-text { animation: none; }
  * { scroll-behavior: auto; }
}
