/* ================= 棋盘 ================= */
.board-frame {
  position: relative;
  padding: clamp(9px, 1.4vw, 14px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: linear-gradient(145deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .44));
  box-shadow:
    0 30px 60px -34px rgba(107, 38, 83, .52),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(173, 92, 134, .12);
  backdrop-filter: blur(18px);
}

.board-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 25px;
  border: 1px dashed rgba(143, 77, 116, .12);
  pointer-events: none;
}

.board {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .78), transparent 50%),
    linear-gradient(145deg, rgba(255, 245, 231, .88), rgba(252, 229, 241, .72) 55%, rgba(221, 246, 234, .78));
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, .9),
    inset 0 -8px 22px rgba(129, 63, 103, .12),
    inset 0 0 0 1px rgba(162, 94, 132, .12);
  touch-action: none;
  user-select: none;
  isolation: isolate;
}

.board-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  pointer-events: none;
}

.cell {
  position: relative;
  border-radius: 22%;
  margin: 3%;
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .42);
}

.cell.alt { background: rgba(255, 255, 255, .38); }

.tile-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.effects {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}

.board-gloss {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .5),
    inset 0 18px 30px -24px rgba(255, 255, 255, 1);
}

/* ================= 水果棋子 ================= */
.tile {
  position: absolute;
  left: 0;
  top: 0;
  width: 12.5%;
  height: 12.5%;
  padding: 4.2%;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate3d(calc(var(--c, 0) * 100%), calc(var(--r, 0) * 100%), 0);
  transition: transform .19s cubic-bezier(.2, .82, .32, 1);
  will-change: transform;
  z-index: 1;
  touch-action: none;
}

.tile.dropping {
  transition-duration: .58s;
  transition-timing-function: cubic-bezier(.2, .9, .25, 1.06);
}

.tile svg { pointer-events: none; }

.gem {
  --tint-a: #fff;
  --tint-b: #f4dfe8;
  --glow: rgba(255, 120, 150, .22);
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 29%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, .94), rgba(255, 255, 255, 0) 44%),
    radial-gradient(circle at 50% 58%, var(--tint-a), var(--tint-b) 88%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .74),
    inset 0 -7px 10px rgba(113, 56, 91, .12),
    inset 0 5px 7px rgba(255, 255, 255, .55),
    0 5px 9px -5px rgba(103, 44, 79, .5),
    0 0 18px -5px var(--glow);
  transition: transform .18s cubic-bezier(.2, .8, .3, 1), box-shadow .18s ease, filter .18s ease;
  transform: translateZ(0);
}

.gem::before {
  content: "";
  position: absolute;
  left: 17%;
  top: 11%;
  width: 30%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .58);
  filter: blur(1px);
  transform: rotate(-24deg);
  pointer-events: none;
}

.fruit-svg {
  width: 83%;
  height: 83%;
  display: block;
  filter: drop-shadow(0 3px 3px rgba(95, 39, 74, .17));
  transition: transform .2s ease;
}

.gem.type-0 { --tint-a: #ffe9ef; --tint-b: #ffb6c8; --glow: rgba(255, 78, 115, .3); }
.gem.type-1 { --tint-a: #fff0d6; --tint-b: #ffc87b; --glow: rgba(255, 150, 30, .3); }
.gem.type-2 { --tint-a: #fffbd8; --tint-b: #ffe878; --glow: rgba(247, 204, 22, .32); }
.gem.type-3 { --tint-a: #effbdc; --tint-b: #c5ec8b; --glow: rgba(117, 186, 50, .28); }
.gem.type-4 { --tint-a: #e6f2ff; --tint-b: #a6d0ff; --glow: rgba(62, 132, 255, .28); }
.gem.type-5 { --tint-a: #f3e8ff; --tint-b: #d0a6ff; --glow: rgba(150, 75, 235, .28); }

@media (hover: hover) and (pointer: fine) {
  .tile:hover .gem {
    transform: translateY(-2px) scale(1.045);
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, .9),
      inset 0 -7px 10px rgba(113, 56, 91, .1),
      inset 0 5px 7px rgba(255, 255, 255, .65),
      0 10px 14px -8px rgba(103, 44, 79, .55),
      0 0 24px -3px var(--glow);
  }
}

.tile.selected { z-index: 7; }
.tile.selected .gem {
  transform: scale(1.07);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, .95),
    0 0 0 7px rgba(255, 93, 125, .52),
    0 0 28px 2px rgba(255, 120, 150, .55);
  animation: selectedPulse 1s ease-in-out infinite;
}

.tile.hinted { z-index: 6; }
.tile.hinted .gem { animation: hintPulse .6s ease-in-out 5; }

.tile.clearing { z-index: 8; pointer-events: none; }
.tile.clearing .gem { animation: gemPop .3s cubic-bezier(.3, .6, .4, 1) forwards; }

.tile.upgraded .gem { animation: gemUpgrade .55s cubic-bezier(.2, .9, .3, 1.25); }

.tile.shaking .gem { animation: tileShake .32s ease; }

/* ================= 特殊水果 ================= */
.gem.special-row::after,
.gem.special-col::after {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 24%;
  background: repeating-linear-gradient(0deg, transparent 0 17%, rgba(255, 255, 255, .95) 17% 25%, transparent 25% 42%);
  mix-blend-mode: soft-light;
  animation: stripeGlow 1.3s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

.gem.special-col::after { transform: rotate(90deg); }

.gem.special-row .fruit-svg,
.gem.special-col .fruit-svg { position: relative; z-index: 1; }

.gem.special-row,
.gem.special-col {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .92),
    inset 0 -7px 10px rgba(113, 56, 91, .1),
    0 0 16px 1px rgba(255, 255, 255, .8),
    0 0 24px 2px var(--glow);
}

.gem.special-rainbow {
  background:
    radial-gradient(circle at 33% 25%, rgba(255, 255, 255, .95), transparent 42%),
    conic-gradient(from 20deg, #ffd85e, #ff7a9c, #c08cff, #6cc7ff, #7be4ae, #ffe36e, #ffd85e);
  color: #fff;
  animation: rainbowHue 4.5s linear infinite;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .88),
    inset 0 -8px 12px rgba(78, 36, 111, .18),
    0 0 22px 3px rgba(255, 222, 127, .8),
    0 0 30px 4px rgba(255, 120, 200, .42);
  overflow: hidden;
}

.gem.special-rainbow::before {
  width: 46%;
  height: 28%;
  left: 18%;
  top: 8%;
  background: rgba(255, 255, 255, .68);
}

.gem.special-rainbow .fruit-svg {
  width: 78%;
  height: 78%;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(92, 41, 80, .4));
  z-index: 2;
  animation: starTwinkle 2.3s ease-in-out infinite;
}

/* ================= 棋盘动效 ================= */
.particle {
  position: absolute;
  width: var(--size, 7px);
  height: var(--size, 7px);
  margin-left: calc(var(--size, 7px) / -2);
  margin-top: calc(var(--size, 7px) / -2);
  border-radius: 50%;
  background: var(--pc, #fff);
  box-shadow: 0 0 7px var(--pc, #fff);
  animation: particleFly .7s cubic-bezier(.16, .68, .33, 1) forwards;
  pointer-events: none;
}

.particle.spark {
  border-radius: 2px;
  rotate: 45deg;
  animation-duration: .85s;
}

.fx-beam {
  position: absolute;
  z-index: 1;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .98) 18%, rgba(255, 233, 170, .98) 50%, rgba(255, 255, 255, .98) 82%, transparent);
  filter: blur(.5px);
  animation: beamFlash .48s cubic-bezier(.2, .7, .2, 1) forwards;
  pointer-events: none;
}

.fx-beam.horizontal {
  left: -4%;
  right: -4%;
  top: calc(var(--row) * 12.5% + 5.4%);
  height: 1.7%;
  box-shadow: 0 0 12px 3px rgba(255, 245, 197, .7);
}

.fx-beam.vertical {
  top: -4%;
  bottom: -4%;
  left: calc(var(--col) * 12.5% + 5.4%);
  width: 1.7%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .98) 18%, rgba(255, 233, 170, .98) 50%, rgba(255, 255, 255, .98) 82%, transparent);
  box-shadow: 0 0 12px 3px rgba(255, 245, 197, .7);
}

.fx-flash {
  position: absolute;
  left: calc(var(--col) * 12.5% + 6.25%);
  top: calc(var(--row) * 12.5% + 6.25%);
  width: 12.5%;
  height: 12.5%;
  margin-left: -6.25%;
  margin-top: -6.25%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .98), rgba(255, 225, 130, .6) 35%, transparent 70%);
  animation: flashBurst .5s ease-out forwards;
  pointer-events: none;
}

.float-score {
  position: absolute;
  z-index: 12;
  left: calc(var(--col, 3) * 12.5% + 6.25%);
  top: calc(var(--row, 3) * 12.5% + 6.25%);
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(15px, 2.4vw, 23px);
  color: #fff;
  letter-spacing: -.5px;
  text-shadow: 0 2px 0 #ef5677, 0 4px 10px rgba(194, 51, 88, .45);
  animation: floatScore 1s cubic-bezier(.2, .7, .3, 1) forwards;
  pointer-events: none;
  white-space: nowrap;
}

.combo-banner {
  position: absolute;
  z-index: 20;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%) scale(.7) rotate(-4deg);
  padding: 7px 20px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: clamp(18px, 3.4vw, 30px);
  letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(135deg, #ffb23f, #ff5c7e 65%, #f4448e);
  box-shadow: 0 12px 28px -10px rgba(231, 57, 101, .75), inset 0 0 0 2px rgba(255, 255, 255, .5);
  text-shadow: 0 2px 0 rgba(173, 38, 76, .35);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.combo-banner.show { animation: comboPop 1s cubic-bezier(.2, .8, .3, 1) forwards; }

.board.invalid { animation: boardShake .32s ease; }
.board.shuffling .gem { animation: shuffleFlip .42s ease-in-out; }

/* ================= 底部按钮 ================= */
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 12px;
}

.control-btn {
  min-height: 49px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #7f4e71;
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 10px 20px -16px rgba(102, 39, 78, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.control-btn svg { width: 18px; height: 18px; color: #b25d88; transition: transform .25s ease; }
.control-btn b {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  color: #fff;
  background: linear-gradient(135deg, #ffae43, #ff647f);
  box-shadow: 0 3px 6px -3px rgba(237, 79, 104, .6);
}

.control-btn:hover {
  transform: translateY(-2px);
  color: var(--coral-deep);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 22px -16px rgba(102, 39, 78, .6), inset 0 1px 0 rgba(255, 255, 255, .95);
}
.control-btn:hover svg { transform: rotate(-8deg) scale(1.08); }
.control-btn:active { transform: translateY(0) scale(.98); }
.control-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ================= 弹窗 ================= */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(69, 32, 60, .34);
  backdrop-filter: blur(9px) saturate(.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s ease;
}

.overlay.visible { opacity: 1; visibility: visible; }

.overlay-card {
  width: min(430px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px 30px 27px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .88);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 240, 204, .8), transparent 50%),
    linear-gradient(160deg, rgba(255, 255, 255, .97), rgba(255, 243, 247, .95));
  box-shadow: 0 34px 80px -30px rgba(60, 18, 49, .6), inset 0 1px 0 #fff;
  text-align: center;
  transform: translateY(20px) scale(.95);
  transition: transform .4s cubic-bezier(.2, .9, .3, 1.1);
  scrollbar-width: thin;
}

.overlay.visible .overlay-card { transform: translateY(0) scale(1); }

.overlay-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.1;
  letter-spacing: .5px;
  color: #53254a;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .8);
}

.overlay-card p {
  margin: 10px auto 0;
  max-width: 300px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px 13px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 2.4px;
  color: #a65078;
  background: rgba(255, 226, 234, .75);
  border: 1px solid rgba(255, 255, 255, .9);
}

.eyebrow::before,
.eyebrow::after { content: "✦"; color: #ffb228; font-size: 10px; }

.hero-fruits {
  position: relative;
  height: 118px;
  margin: 8px auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-fruit {
  width: 91px;
  height: 91px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: radial-gradient(circle at 32% 22%, #fff, #ffe8ef 65%, #ffcedd);
  box-shadow: 0 16px 30px -18px rgba(130, 40, 82, .55), inset 0 0 0 2px rgba(255, 255, 255, .8);
  animation: heroBounce 2.8s ease-in-out infinite;
}

.hero-fruit:nth-child(1) { transform: rotate(-10deg) translateX(16px); z-index: 1; animation-delay: -.4s; }
.hero-fruit:nth-child(2) {
  width: 108px;
  height: 108px;
  z-index: 2;
  background: radial-gradient(circle at 32% 22%, #fff, #fff5d4 65%, #ffe18b);
  animation-delay: -1.4s;
}
.hero-fruit:nth-child(3) { transform: rotate(10deg) translateX(-16px); z-index: 1; background: radial-gradient(circle at 32% 22%, #fff, #eee5ff 65%, #d9c1ff); animation-delay: -2.2s; }
.hero-fruit svg { width: 80%; height: 80%; filter: drop-shadow(0 5px 6px rgba(94, 33, 71, .18)); }

.primary-btn,
.ghost-btn,
.text-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .5px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-btn {
  margin-top: 20px;
  min-height: 54px;
  border: 0;
  color: #fff;
  font-size: 16px;
  background: linear-gradient(135deg, #ffb43f 0%, #ff7d56 35%, #ff527e 75%, #f33a78 100%);
  background-size: 160% 160%;
  box-shadow: 0 16px 28px -13px rgba(239, 67, 111, .8), inset 0 1px 0 rgba(255, 255, 255, .5);
  text-shadow: 0 1px 0 rgba(156, 38, 73, .3);
  animation: primaryGlow 4s ease-in-out infinite;
}

.primary-btn:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 20px 32px -13px rgba(239, 67, 111, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.primary-btn:active { transform: translateY(0) scale(.98); }

.ghost-btn {
  margin-top: 9px;
  min-height: 46px;
  border: 1px solid rgba(163, 101, 138, .2);
  color: #8d5578;
  font-size: 13px;
  background: rgba(255, 255, 255, .65);
}

.ghost-btn:hover { background: #fff; transform: translateY(-1px); }

.mini-tips {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px dashed rgba(137, 76, 114, .17);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 13px;
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-faint);
}

.intro-note {
  margin-top: 11px !important;
  font-size: 10px !important;
  letter-spacing: .5px;
  color: #b489a3 !important;
}

.result-stars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 7px;
  margin: 10px 0 15px;
  min-height: 54px;
}

.result-stars .star {
  width: 45px;
  height: 45px;
  color: #e6d2de;
  filter: drop-shadow(0 3px 3px rgba(118, 62, 95, .1));
}

.result-stars .star.lit {
  color: #ffc43d;
  filter: drop-shadow(0 5px 8px rgba(246, 166, 20, .4));
  animation: starPop .55s cubic-bezier(.2, .9, .3, 1.5) both;
}

.result-stars .star:nth-child(2) { width: 55px; height: 55px; }
.result-stars .star:nth-child(1) { animation-delay: .12s; }
.result-stars .star:nth-child(2) { animation-delay: .26s; }
.result-stars .star:nth-child(3) { animation-delay: .4s; }

.result-score {
  padding: 13px 16px;
  border-radius: 17px;
  background: rgba(255, 237, 216, .72);
  border: 1px solid rgba(255, 255, 255, .8);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-faint);
}

.result-score strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 31px;
  color: #f04d72;
  line-height: 1;
}

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

.result-grid div {
  padding: 10px 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .8);
}

.result-grid span { display: block; font-size: 9px; font-weight: 800; color: var(--ink-faint); }
.result-grid b { display: block; margin-top: 3px; font-family: var(--font-display); font-size: 17px; color: #6e3a60; }

/* ================= 提示条 ================= */
.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 40px);
  padding: 11px 20px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .75);
  background: rgba(76, 37, 66, .88);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
  box-shadow: 0 14px 28px -16px rgba(52, 17, 42, .65);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  pointer-events: none;
}

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

/* ================= 关键帧 ================= */
@keyframes selectedPulse {
  0%, 100% { transform: scale(1.06); }
  50% { transform: scale(1.1); }
}

@keyframes hintPulse {
  0%, 100% { transform: scale(1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8), 0 0 0 0 rgba(255, 214, 78, .6); }
  50% { transform: scale(1.09); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .95), 0 0 0 7px rgba(255, 214, 78, .22), 0 0 24px 2px rgba(255, 208, 58, .8); }
}

@keyframes gemPop {
  0% { transform: scale(1); filter: brightness(1); opacity: 1; }
  42% { transform: scale(1.2) rotate(5deg); filter: brightness(1.55); opacity: 1; }
  100% { transform: scale(.05) rotate(18deg); filter: brightness(1.8); opacity: 0; }
}

@keyframes gemUpgrade {
  0% { transform: scale(.45) rotate(-25deg); filter: brightness(1.8); }
  60% { transform: scale(1.16) rotate(6deg); filter: brightness(1.3); }
  100% { transform: scale(1) rotate(0); filter: brightness(1); }
}

@keyframes tileShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-4deg); }
  55% { transform: translateX(4px) rotate(4deg); }
  78% { transform: translateX(-2px); }
}

@keyframes stripeGlow {
  0%, 100% { opacity: .55; }
  50% { opacity: .95; }
}

@keyframes rainbowHue {
  0% { filter: hue-rotate(0deg) saturate(1.1); }
  50% { filter: hue-rotate(35deg) saturate(1.3); }
  100% { filter: hue-rotate(0deg) saturate(1.1); }
}

@keyframes starTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(8deg); }
}

@keyframes particleFly {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  70% { opacity: .9; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.2) rotate(var(--rot)); opacity: 0; }
}

@keyframes beamFlash {
  0% { transform: scaleY(.2); opacity: 0; }
  18% { opacity: 1; }
  55% { transform: scaleY(1); opacity: .95; }
  100% { transform: scaleY(1.2); opacity: 0; }
}

@keyframes flashBurst {
  0% { transform: scale(.3); opacity: 0; }
  30% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(2.1); opacity: 0; }
}

@keyframes floatScore {
  0% { transform: translate(-50%, -30%) scale(.7); opacity: 0; }
  22% { transform: translate(-50%, -70%) scale(1.12); opacity: 1; }
  100% { transform: translate(-50%, -175%) scale(1); opacity: 0; }
}

@keyframes comboPop {
  0% { transform: translate(-50%, -50%) scale(.6) rotate(-5deg); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(1.08) rotate(-2deg); opacity: 1; }
  70% { transform: translate(-50%, -58%) scale(1) rotate(-2deg); opacity: 1; }
  100% { transform: translate(-50%, -85%) scale(.92) rotate(1deg); opacity: 0; }
}

@keyframes boardShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-.25deg); }
  40% { transform: translateX(5px) rotate(.25deg); }
  65% { transform: translateX(-3px); }
  82% { transform: translateX(2px); }
}

@keyframes shuffleFlip {
  0%, 100% { transform: rotateY(0deg) scale(1); }
  48% { transform: rotateY(80deg) scale(.82); }
}

@keyframes heroBounce {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@keyframes primaryGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes starPop {
  0% { transform: scale(.2) rotate(-25deg); opacity: 0; }
  65% { transform: scale(1.22) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ================= 棋盘响应式 ================= */
@media (max-width: 620px) {
  .board-frame { padding: 8px; border-radius: 24px; }
  .board { border-radius: 18px; }
  .board-frame::before { inset: 5px; border-radius: 20px; }

  .controls { margin-top: 9px; gap: 7px; }
  .control-btn { min-height: 45px; border-radius: 14px; font-size: 11px; gap: 5px; padding: 7px 8px; }
  .control-btn svg { width: 16px; height: 16px; }
  .control-btn b { min-width: 17px; height: 17px; font-size: 8px; }

  .overlay { padding: 14px; }
  .overlay-card { padding: 25px 22px 23px; border-radius: 25px; }
  .hero-fruits { height: 102px; }
  .hero-fruit { width: 76px; height: 76px; border-radius: 23px; }
  .hero-fruit:nth-child(2) { width: 92px; height: 92px; }
  .primary-btn { min-height: 50px; font-size: 15px; }
  .mini-tips { gap: 6px 10px; font-size: 9px; }
  .result-stars .star { width: 39px; height: 39px; }
  .result-stars .star:nth-child(2) { width: 48px; height: 48px; }
}

@media (max-width: 390px) {
  .control-btn span { display: none; }
  .control-btn { min-height: 43px; }
  .control-btn b { margin-left: 1px; }
  .overlay-card { padding: 22px 18px 20px; }
  .hero-fruits { height: 92px; }
  .hero-fruit { width: 68px; height: 68px; }
  .hero-fruit:nth-child(2) { width: 84px; height: 84px; }
}
