/* ============================================================
   心动合合岛 · 情侣版多层堆叠消除
   独立游戏样式，仅作用于本页
   ============================================================ */
:root {
  color-scheme: light;
  --pri: #d9566f;
  --pri-deep: #c94a64;
  --pri-soft: rgba(217, 86, 111, .08);
  --pl: #f3b9c5;
  --tx: #2f2a2e;
  --tl: #8a8088;
  --bg: #faf7f4;
  --card: #ffffff;
  --soft: #f4efeb;
  --line: rgba(47, 42, 46, .08);
  --line2: rgba(47, 42, 46, .05);
  --shadow: 0 4px 18px rgba(47, 42, 46, .06);
  --shadow-lg: 0 16px 40px rgba(47, 42, 46, .12);
  --ok: #4f9d7a;
  --gold: #c99a3a;
  --r: 20px;
  --rs: 16px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --pri: #ee7f95;
  --pri-deep: #f093a5;
  --pri-soft: rgba(238, 127, 149, .14);
  --pl: #b5736c;
  --tx: #f1ecea;
  --tl: #a39a9f;
  --bg: #1d1a1c;
  --card: #272326;
  --soft: #302b2f;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .05);
  --shadow: 0 4px 18px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  --ok: #74c0a0;
  --gold: #dcb35a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 36% at 50% -6%, rgba(255, 199, 216, .38), transparent 72%),
    radial-gradient(40% 24% at 100% 22%, rgba(255, 230, 214, .22), transparent 70%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(70% 36% at 50% -6%, rgba(238, 127, 149, .12), transparent 72%),
    radial-gradient(40% 24% at 100% 22%, rgba(201, 154, 58, .06), transparent 70%);
}
body::after {
  content: "";
  position: fixed;
  inset: -24%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 22% 28%, rgba(255, 199, 216, .22), transparent 70%),
    radial-gradient(34% 30% at 78% 66%, rgba(210, 235, 215, .2), transparent 72%),
    radial-gradient(30% 26% at 64% 18%, rgba(255, 226, 178, .18), transparent 70%);
  background-size: 140% 140%;
  animation: ambientDrift 22s ease-in-out infinite alternate;
}
[data-theme="dark"] body::after {
  background:
    radial-gradient(38% 34% at 22% 28%, rgba(238, 127, 149, .08), transparent 70%),
    radial-gradient(34% 30% at 78% 66%, rgba(116, 192, 160, .05), transparent 72%),
    radial-gradient(30% 26% at 64% 18%, rgba(201, 154, 58, .06), transparent 70%);
  background-size: 140% 140%;
}
.bg-deco .bg-petal {
  position: absolute;
  top: -10%;
  color: var(--pri);
  opacity: 0;
  line-height: 1;
  pointer-events: none;
  animation: petalFall var(--dur, 15s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
body.locked { overflow: hidden; }
button, a { font-family: inherit; }
button { color: inherit; }
svg { display: block; }
a { color: inherit; }

/* 背景漂浮的小装饰 */
.bg-deco { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-deco span {
  position: absolute;
  color: var(--pri);
  opacity: .1;
  font-size: 16px;
  animation: bgFloat var(--dur, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes bgFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .06; }
  50% { transform: translateY(-18px) rotate(12deg); opacity: .16; }
}

/* 布局 */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 14px calc(26px + env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: center; gap: 8px; padding: 2px 0 12px; }
.icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--tx);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--pri); border-color: var(--pl); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; }
.top-actions { display: flex; gap: 6px; }
.brand { flex: 1; min-width: 0; text-align: center; }
.brand-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: var(--tl);
  margin-bottom: 2px;
  white-space: nowrap;
}
.brand h1 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.25;
  color: var(--tx);
  white-space: nowrap;
}
.couple {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  color: var(--pri);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.couple .x { color: var(--pl); margin: 0 3px; font-weight: 400; }
/* 头部双人头像 + 虚线旋转环（与首页 / 爱情树页同款） */
.couple { display: flex; align-items: center; justify-content: center; gap: 5px; }
.couple #nameA, .couple #nameB { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.couple-av { position: relative; width: 26px; height: 26px; flex: none; }
.couple-av img {
  position: absolute; inset: 3px; width: 20px; height: 20px; z-index: 1;
  border-radius: 50%; object-fit: cover; background: var(--pri-soft);
}
.couple-av b {
  position: absolute; inset: 3px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--pri-soft); color: var(--pri);
  font-size: 11px; font-weight: 800;
}
.couple-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px dashed var(--pl); opacity: .8; pointer-events: none;
}
.couple-ring.a { animation: coupleRingSpin 16s linear infinite; }
.couple-ring.b { animation: coupleRingSpin 20s linear infinite reverse; }
@keyframes coupleRingSpin { to { transform: rotate(360deg); } }

/* 主题 / 音效图标切换 */
.theme-sun, .sound-off { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-sound="off"] .sound-on { display: none; }
[data-sound="off"] .sound-off { display: block; }

/* 通用卡片 */
.panel {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* 状态卡 */
.status { padding: 12px 14px 11px; margin-bottom: 10px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.level-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pri);
  box-shadow: 0 0 0 3px rgba(217, 86, 111, .12);
  animation: livePulse 2.4s ease-in-out infinite;
}
.level-pill .sub { color: var(--tl); font-weight: 500; }
.status-stats { display: flex; gap: 16px; }
.status-stats div { text-align: right; }
.status-stats b {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--tx);
}
.status-stats span { font-size: 9px; letter-spacing: .5px; color: var(--tl); }
.progress { height: 6px; border-radius: 999px; background: var(--soft); margin-top: 10px; overflow: hidden; }
.progress i {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pl), var(--pri), #f7c7d2, var(--pri));
  background-size: 220% 100%;
  transition: width .35s ease;
  animation: progressShimmer 3s linear infinite;
}
.progress i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .55) 50%, transparent 68%);
  transform: translateX(-120%);
  animation: progressGlint 3s ease-in-out infinite;
}
.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font-size: 10px;
  color: var(--tl);
}
.progress-label b { color: var(--pri); font-weight: 700; }
.progress-label .pct { display: inline-block; font-variant-numeric: tabular-nums; }

/* 牌堆 */
.board-card { padding: 9px 9px 10px; margin-bottom: 10px; }
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 5px 7px;
}
.board-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--tl);
}
.board-title::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pri);
}
.board-hint { font-size: 9px; color: var(--tl); opacity: .82; white-space: nowrap; }
.board-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 430 / 400;
  border-radius: 14px;
  overflow: hidden;
  border: 1px dashed rgba(217, 86, 111, .16);
  background:
    radial-gradient(78% 76% at 50% 36%, rgba(255, 255, 255, .92), transparent 72%),
    linear-gradient(155deg, rgba(255, 241, 244, .7), rgba(244, 239, 235, .55));
}
[data-theme="dark"] .board-wrap {
  border-color: rgba(238, 127, 149, .18);
  background:
    radial-gradient(78% 76% at 50% 36%, rgba(255, 255, 255, .035), transparent 72%),
    linear-gradient(155deg, rgba(238, 127, 149, .05), rgba(48, 43, 47, .45));
}
.board-wrap::before {
  content: "♡";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 150px;
  line-height: 1;
  color: rgba(217, 86, 111, .045);
  pointer-events: none;
}
[data-theme="dark"] .board-wrap::before { color: rgba(238, 127, 149, .06); }
.board-wrap::after {
  content: "";
  position: absolute;
  inset: -30% -60%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 38%, rgba(255, 255, 255, .48) 50%, transparent 62%);
  transform: translateX(-70%) rotate(4deg);
  animation: boardSheen 8s ease-in-out infinite;
}
[data-theme="dark"] .board-wrap::after {
  background: linear-gradient(108deg, transparent 38%, rgba(238, 127, 149, .08) 50%, transparent 62%);
}
.board { position: absolute; inset: 0; z-index: 1; }
.board-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--tl);
  pointer-events: none;
}
.board-empty.show { display: flex; }
.board-empty span { font-family: Georgia, serif; font-size: 34px; color: var(--pri); opacity: .35; }
.board-empty b { font-size: 11px; font-weight: 600; letter-spacing: 1px; }

/* 牌面 */
.tile {
  position: absolute;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transform-origin: center;
  transition: transform .15s ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.tile:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; }
.tile-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(47, 42, 46, .1);
  background: linear-gradient(155deg, #fff, #fffaf8);
  box-shadow: 0 3px 0 #e6d5cc, 0 6px 10px rgba(47, 42, 46, .16), inset 0 1px 0 rgba(255, 255, 255, .85);
  transition: box-shadow .18s ease, filter .2s ease;
}
.tile-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--tbg, #fde9ee), transparent 72%);
  opacity: .92;
}
.tile-inner::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 7%;
  height: 20%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  filter: blur(2px);
}
.tile-icon {
  position: relative;
  z-index: 1;
  width: 54%;
  height: 54%;
  color: var(--tc, var(--pri));
}
.tile-badge {
  position: absolute;
  right: 7%;
  bottom: 6%;
  z-index: 1;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tc, var(--pri));
  opacity: .28;
}
.tile.blocked { cursor: default; }
.tile.blocked .tile-inner { filter: saturate(.5) brightness(.9); }
.tile.blocked::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 8px;
  background: rgba(47, 42, 46, .28);
}
[data-theme="dark"] .tile.blocked::after { background: rgba(0, 0, 0, .46); }
[data-theme="dark"] .tile-inner {
  background: linear-gradient(155deg, #342e32, #2a2528);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: 0 3px 0 #1c181a, 0 6px 12px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .06);
}
[data-theme="dark"] .tile-inner::before { opacity: .18; }
[data-theme="dark"] .tile-inner::after { background: rgba(255, 255, 255, .09); }
.tile.free:hover {
  transform: perspective(620px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px) scale(1.02);
  z-index: 999 !important;
}
.tile.free:hover .tile-inner {
  box-shadow: 0 12px 26px rgba(47, 42, 46, .2), 0 0 0 1px rgba(217, 86, 111, .1), inset 0 1px 0 rgba(255, 255, 255, .85);
}
.tile.free:hover .tile-icon { animation: iconWiggle .55s ease; }
.tile.free:active { transform: scale(.96); }
.board.dealing .tile {
  animation: dealIn .52s cubic-bezier(.18, .9, .32, 1.18) backwards;
  animation-delay: calc(var(--deal, 0) * 17ms);
}
.board.shuffling .tile { animation: tileFlip .5s ease both; animation-delay: calc(var(--deal, 0) * 10ms); }
.tile.rescued .tile-inner {
  box-shadow: 0 0 0 2px rgba(201, 154, 58, .35), 0 8px 18px rgba(201, 154, 58, .18);
}
.tile.taken { animation: tileTaken .2s ease forwards; pointer-events: none; }
.tile.shake { animation: tileShake .36s ease; }
.tile.hint { z-index: 998 !important; }
.tile.hint .tile-inner {
  box-shadow: 0 0 0 3px rgba(217, 86, 111, .38), 0 10px 22px rgba(217, 86, 111, .22);
  animation: hintPulse 1.1s ease-in-out infinite;
}
@keyframes tileTaken {
  to { transform: scale(.5) translateY(-6px); opacity: 0; filter: blur(2px); }
}
@keyframes tileShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@keyframes hintPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

/* 收集盒 */
.tray-card { padding: 11px 12px 12px; margin-bottom: 10px; }
.tray-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tray-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--tl);
}
.tray-title svg { width: 13px; height: 13px; color: var(--pri); }
.tray-count { font-size: 10px; color: var(--tl); font-variant-numeric: tabular-nums; }
.tray-count b { font-size: 13px; color: var(--pri); }
.tray { display: grid; grid-template-columns: repeat(var(--slots, 7), 1fr); gap: 5px; }
.slot {
  position: relative;
  aspect-ratio: 1 / 1.12;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 9px;
  border: 1px dashed rgba(217, 86, 111, .22);
  background: rgba(255, 255, 255, .42);
}
[data-theme="dark"] .slot {
  border-color: rgba(238, 127, 149, .22);
  background: rgba(255, 255, 255, .03);
}
.slot.filled {
  border-style: solid;
  border-color: transparent;
  background: linear-gradient(155deg, #fff, #fff8f5);
  box-shadow: 0 2px 7px rgba(47, 42, 46, .1);
}
[data-theme="dark"] .slot.filled { background: linear-gradient(155deg, #342e32, #2a2528); }
.mini-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(155deg, var(--tbg, #fde9ee), #fff);
  overflow: hidden;
}
[data-theme="dark"] .mini-tile { background: linear-gradient(155deg, #3a3236, #2a2528); }
.mini-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--tbg, #fde9ee), transparent 76%);
  opacity: .8;
}
[data-theme="dark"] .mini-tile::before { opacity: .16; }
.mini-tile svg {
  position: relative;
  z-index: 1;
  width: 56%;
  height: 56%;
  color: var(--tc, var(--pri));
}
.slot.pop .mini-tile { animation: popIn .3s cubic-bezier(.2, 1.6, .4, 1); }
.slot.match .mini-tile { animation: matchOut .38s ease forwards; }
.slot.hint .mini-tile { box-shadow: 0 0 0 2px var(--pri); }
@keyframes popIn {
  0% { transform: scale(.45); opacity: .3; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes matchOut {
  0% { transform: scale(1); opacity: 1; }
  38% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(.18) translateY(-10px); opacity: 0; }
}
.tray-note {
  min-height: 15px;
  margin-top: 7px;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--tl);
}
.tray-note b { color: var(--pri); font-weight: 700; }

/* 道具 */
.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 10px; }
.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 3px 8px;
  border: 1px solid var(--line2);
  border-radius: 13px;
  background: var(--card);
  color: var(--tx);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, opacity .2s ease, border-color .15s ease;
}
.tool:hover { border-color: var(--pl); }
.tool:active { transform: scale(.96); }
.tool[disabled] { opacity: .42; cursor: default; }
.tool[disabled]:hover { border-color: var(--line2); }
.tool-hug {
  border-color: rgba(201, 154, 58, .28);
  background: linear-gradient(155deg, #fffdf8, #fff7ee);
}
[data-theme="dark"] .tool-hug { background: linear-gradient(155deg, #332c25, #2b2521); }
.tool-hug .tool-ico { background: rgba(201, 154, 58, .14); color: var(--gold); }
.tool-hug .tool-count { background: rgba(201, 154, 58, .14); color: var(--gold); }
.tool-hug:hover { border-color: var(--gold); }
.tool-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--pri-soft);
  color: var(--pri);
}
.tool-ico svg { width: 16px; height: 16px; }
.tool-label { font-size: 9.5px; font-weight: 600; letter-spacing: .2px; color: var(--tl); white-space: nowrap; }
.tool-count {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 15px;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 8px;
  font-weight: 800;
  font-style: normal;
  line-height: 1.4;
  text-align: center;
}
/* 快捷表情 */
.react-card { padding: 10px 11px 11px; margin-bottom: 10px; }
.react-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.react-title { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--tl); }
.react-hint { font-size: 9px; color: var(--tl); opacity: .72; }
.reactions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.reaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px 5px;
  border: 1px solid var(--line2);
  border-radius: 11px;
  background: var(--soft);
  color: var(--tx);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, opacity .2s ease;
}
.reaction:hover { border-color: var(--pl); }
.reaction:active { transform: scale(.94); }
.reaction[disabled] { opacity: .38; cursor: default; }
.reaction[disabled]:hover { border-color: var(--line2); }
.reaction-ico { font-size: 15px; line-height: 1.2; }
.reaction-label { font-size: 8.5px; color: var(--tl); white-space: nowrap; }
.reaction.cooling { animation: reactionCool .3s ease; }
@keyframes reactionCool {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
}
.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  font-size: 10px;
  color: var(--tl);
}
.game-foot .sweet { font-style: italic; letter-spacing: .2px; }
.restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--tl);
  font-size: 10px;
  cursor: pointer;
  transition: color .15s ease;
}
.restart-btn:hover { color: var(--pri); }
.restart-btn svg { width: 12px; height: 12px; }

/* 弹层 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(47, 42, 46, .42);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.overlay.show { opacity: 1; visibility: visible; }
.modal {
  position: relative;
  width: 100%;
  max-width: 410px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 22px 20px 20px;
  border: 1px solid var(--line2);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
  transform: translateY(14px) scale(.98);
  transition: transform .3s cubic-bezier(.2, 1, .3, 1);
}
.overlay.show .modal { transform: none; }
.modal::-webkit-scrollbar { display: none; }
.modal { scrollbar-width: none; }
.start-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 86px;
  margin: -2px 0 8px;
}
.sa-tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(217, 86, 111, .14);
  background: linear-gradient(155deg, #fff, #fff8f5);
  box-shadow: 0 7px 16px rgba(47, 42, 46, .13);
  color: var(--pri);
  animation: saBob 5s ease-in-out infinite;
  animation-delay: var(--bob-delay, 0s);
}
[data-theme="dark"] .sa-tile {
  background: linear-gradient(155deg, #342e32, #2a2528);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: 0 7px 16px rgba(0, 0, 0, .38);
}
.sa-tile svg { width: 22px; height: 22px; }
.sa-tile:nth-child(1) { left: calc(50% - 64px); top: 18px; --rot: -13deg; --bob-delay: 0s; color: #c99a3a; }
.sa-tile:nth-child(2) { left: calc(50% - 26px); top: 10px; --rot: -4deg; --bob-delay: .45s; z-index: 3; }
.sa-tile:nth-child(3) { left: calc(50% + 14px); top: 20px; --rot: 11deg; --bob-delay: .9s; color: #6f6a8c; }
.sa-heart {
  position: absolute;
  left: 50%;
  top: 2px;
  transform: translateX(28px) rotate(12deg);
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--pri);
  opacity: .55;
  z-index: 5;
  animation: heartBeat 2.6s ease-in-out infinite;
}
.start-kicker {
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: var(--pri);
}
.start-title {
  margin-top: 4px;
  text-align: center;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.25;
}
.start-sub {
  margin-top: 6px;
  text-align: center;
  font-size: 12px;
  line-height: 1.75;
  color: var(--tl);
}
.rules { margin: 14px 0 2px; padding: 2px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.rule-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; }
.rule-row + .rule-row { border-top: 1px dashed var(--line2); }
.rule-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 10px;
  font-weight: 800;
}
.rule-text { font-size: 11px; line-height: 1.6; color: var(--tl); }
.rule-text b { color: var(--tx); font-weight: 700; }
.level-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 12px 0 4px; }
.level-opt {
  padding: 8px 3px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.level-opt:hover { border-color: var(--pl); }
.level-opt.on {
  border-color: var(--pri);
  background: var(--pri-soft);
  box-shadow: 0 0 0 2px rgba(217, 86, 111, .07);
}
.level-opt b { display: block; font-size: 12px; font-weight: 800; color: var(--tx); }
.level-opt.on b { color: var(--pri); }
.level-opt span { display: block; margin-top: 1px; font-size: 8.5px; color: var(--tl); }
.level-opt em {
  display: block;
  margin-top: 2px;
  font-size: 8px;
  font-style: normal;
  color: var(--tl);
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.level-opt.on em { color: var(--pri); opacity: .9; }
.start-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 13px 16px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--pri);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(217, 86, 111, .28);
  transition: transform .15s ease, filter .15s ease;
}
.start-btn::after {
  content: "";
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: -40%;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-18deg);
  animation: btnShine 3.4s ease-in-out infinite;
}
.start-btn > * { position: relative; z-index: 1; }
.start-btn:hover { filter: brightness(1.03); }
.start-btn:active { transform: scale(.98); }
.start-btn svg { width: 15px; height: 15px; color: #fff; }
.start-resume {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(217, 86, 111, .18);
  border-radius: 14px;
  background: var(--pri-soft);
  text-align: left;
  cursor: pointer;
}
.start-resume:hover { border-color: var(--pl); }
.start-resume-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pri);
  color: #fff;
  font-size: 9px;
}
.start-resume-body { flex: 1; min-width: 0; }
.start-resume-body b { display: block; font-size: 11px; font-weight: 700; color: var(--tx); }
.start-resume-body em { display: block; margin-top: 1px; font-size: 9px; font-style: normal; color: var(--tl); }
.start-resume-arrow { color: var(--pri); font-size: 15px; }
.start-tools { display: flex; gap: 8px; margin-top: 9px; }
/* ---------- 双人联机卡片 ---------- */
.net-card {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(217, 86, 111, .3);
  border-radius: 14px;
  background: var(--soft);
  text-align: left;
}
.net-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.net-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--tl);
}
.net-title svg { width: 14px; height: 14px; color: var(--pri); }
.net-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 9px; font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.net-badge.on { background: #e3f6e9; color: #2f9e57; }
.net-body { margin-top: 8px; display: grid; gap: 7px; }
.net-btn {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--tl);
  font-size: 10px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, opacity .15s ease;
}
.net-btn:hover { border-color: var(--pl); color: var(--pri); }
.net-btn:disabled { opacity: .45; cursor: default; }
.net-btn.primary {
  width: 100%;
  border-color: rgba(217, 86, 111, .35);
  background: var(--pri-soft);
  color: var(--pri);
}
.net-join { display: flex; gap: 7px; }
.net-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--tl);
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
}
.net-input:focus { outline: none; border-color: var(--pri); }
.net-room { font-size: 10px; color: var(--tl); opacity: .9; display: flex; align-items: center; gap: 6px; }
.net-room b { color: var(--pri); letter-spacing: 1.5px; }
.net-leave {
  border: none; background: none;
  color: var(--tl); font-size: 9px; text-decoration: underline;
  cursor: pointer; opacity: .75;
}
.net-leave:hover { color: var(--pri); }
.net-status { min-height: 12px; font-size: 9px; color: var(--tl); opacity: .85; }
.net-status.err { color: #d2603a; opacity: 1; }
.net-note { margin-top: 6px; font-size: 8.5px; color: var(--tl); opacity: .7; line-height: 1.5; }
[data-theme="dark"] .net-badge.on { background: rgba(47, 158, 87, .18); color: #6fd094; }

.start-share, .start-island {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--tl);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.start-share:hover, .start-island:hover { color: var(--pri); border-color: var(--pl); }
.start-island.cloud-on::after { content: ' ☁'; color: var(--pri); }
.cloud-pill {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 9px; font-weight: 700;
  vertical-align: 1px;
  white-space: nowrap;
}
.cloud-pill[hidden] { display: none; }
.start-version { margin-top: 5px; text-align: center; font-size: 8px; letter-spacing: .2px; color: var(--tl); opacity: .68; }
.start-foot {
  margin-top: 9px;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: .2px;
  color: var(--tl);
  opacity: .85;
}
.start-back {
  display: block;
  margin-top: 6px;
  text-align: center;
  font-size: 10px;
  color: var(--tl);
  text-decoration: none;
}
.start-back:hover { color: var(--pri); }

/* 结算 */
.result-emoji { text-align: center; font-size: 42px; line-height: 1; animation: resultBounce .85s cubic-bezier(.2, .9, .3, 1.3) both; }
.result-title { margin-top: 7px; text-align: center; font-size: 21px; font-weight: 800; letter-spacing: .8px; }
.result-sub { margin-top: 6px; text-align: center; font-size: 11.5px; line-height: 1.75; color: var(--tl); }
.result-rewards {
  margin: 14px 0 4px;
  padding: 10px 10px 9px;
  border: 1px solid rgba(201, 154, 58, .16);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(253, 242, 229, .7), rgba(253, 233, 238, .5));
}
[data-theme="dark"] .result-rewards { background: linear-gradient(155deg, rgba(201, 154, 58, .1), rgba(238, 127, 149, .07)); border-color: rgba(201, 154, 58, .22); }
.result-rewards-head { text-align: center; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; color: var(--gold); }
.result-reward-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 7px; }
.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(47, 42, 46, .05);
  font-size: 9px;
  color: var(--tl);
  animation: rewardPop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.result-reward-list .reward-chip:nth-child(2) { animation-delay: .09s; }
.result-reward-list .reward-chip:nth-child(3) { animation-delay: .18s; }
.result-reward-list .reward-chip:nth-child(4) { animation-delay: .27s; }
.reward-chip i { font-style: normal; font-size: 12px; line-height: 1; }
.reward-chip b { font-size: 11px; font-weight: 800; color: var(--tx); font-variant-numeric: tabular-nums; }
.reward-chip em { font-style: normal; }
.reward-note { margin-top: 7px; text-align: center; font-size: 8.5px; line-height: 1.5; color: var(--tl); opacity: .9; }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 11px 0 10px; }
.result-stat { padding: 8px 2px; border-radius: 11px; background: var(--soft); text-align: center; animation: statRise .55s ease both; }
.result-stat:nth-child(2) { animation-delay: .06s; }
.result-stat:nth-child(3) { animation-delay: .12s; }
.result-stat:nth-child(4) { animation-delay: .18s; }
.result-stat b { display: block; font-size: 13px; line-height: 1.25; color: var(--pri); font-variant-numeric: tabular-nums; }
.result-stat span { display: block; margin-top: 2px; font-size: 8px; color: var(--tl); }
.result-quote {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--tl);
  font-size: 9.5px;
  line-height: 1.6;
  text-align: center;
}
.result-actions { display: flex; gap: 8px; }
.result-actions button {
  flex: 1;
  padding: 11px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--tx);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.result-actions button:active { transform: scale(.97); }
.result-actions button.primary {
  border-color: transparent;
  background: var(--pri);
  color: #fff;
  box-shadow: 0 6px 16px rgba(217, 86, 111, .25);
}
.result-link {
  display: block;
  margin-top: 11px;
  text-align: center;
  font-size: 10px;
  color: var(--tl);
  text-decoration: none;
}
.result-link:hover { color: var(--pri); }
.result-links { display: flex; justify-content: center; gap: 14px; margin-top: 10px; }
.result-links a { font-size: 10px; color: var(--tl); text-decoration: none; }
.result-links a:hover { color: var(--pri); }
.result-links a.growth { color: var(--pri); font-weight: 600; }

/* 暂停 / 休息 */
.pause-emoji { text-align: center; font-size: 40px; line-height: 1; animation: pauseBreathe 3s ease-in-out infinite; }
.pause-title { margin-top: 7px; text-align: center; font-size: 20px; font-weight: 800; letter-spacing: .6px; }
.pause-sub { margin-top: 6px; text-align: center; font-size: 11.5px; line-height: 1.75; color: var(--tl); }
.pause-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 14px 0 12px; }
.pause-stat { padding: 8px 3px; border-radius: 11px; background: var(--soft); text-align: center; }
.pause-stat b { display: block; font-size: 13px; color: var(--pri); font-variant-numeric: tabular-nums; }
.pause-stat span { display: block; margin-top: 2px; font-size: 8px; color: var(--tl); }
.pause-actions { display: flex; flex-direction: column; gap: 8px; }
.pause-actions button {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--tx);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.pause-actions button:active { transform: scale(.98); }
.pause-actions button.primary {
  border-color: transparent;
  background: var(--pri);
  color: #fff;
  box-shadow: 0 6px 16px rgba(217, 86, 111, .25);
}
.pause-actions button.gold {
  border-color: transparent;
  background: linear-gradient(135deg, #d8aa4c, #c99a3a);
  color: #fff;
  box-shadow: 0 6px 16px rgba(201, 154, 58, .25);
}
.pause-actions button.ghost { border-color: transparent; background: transparent; color: var(--tl); font-weight: 600; }
.pause-actions button.ghost:hover { color: var(--pri); }
.pause-note { margin-top: 9px; text-align: center; font-size: 8.5px; line-height: 1.6; color: var(--tl); opacity: .85; }

/* 快捷表情气泡 */
.reaction-bubble {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 180;
  max-width: 82vw;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  color: var(--tx);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px) scale(.94);
  transition: opacity .22s ease, transform .22s ease;
}
.reaction-bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
[data-theme="dark"] .reaction-bubble { background: #322c30; }

/* 提示与特效 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 200;
  max-width: 86vw;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(47, 42, 46, .9);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .25s ease, transform .25s ease;
}
[data-theme="dark"] .toast { background: rgba(241, 236, 234, .92); color: #2f2a2e; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.fx { position: fixed; inset: 0; z-index: 150; overflow: hidden; pointer-events: none; }
.fx-heart {
  position: absolute;
  font-size: 16px;
  line-height: 1;
  animation: heartFloat .95s ease-out forwards;
  filter: drop-shadow(0 2px 4px rgba(217, 86, 111, .3));
}
@keyframes heartFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.45); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift, 0px)), calc(-50% - 74px)) scale(1.25) rotate(var(--rot, 0deg)); }
}
.fx-confetti {
  position: absolute;
  top: -24px;
  font-size: 16px;
  animation: confettiFall var(--dur, 3s) linear forwards;
  opacity: .92;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  8% { opacity: .95; }
  100% { transform: translateY(112vh) rotate(360deg); opacity: 0; }
}

/* ===== 动态增强 ===== */
.fx-ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--rc, var(--pri));
  opacity: .8;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: rippleOut .6s cubic-bezier(.2, .8, .3, 1) forwards;
}
.fx-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sc, var(--pri));
  box-shadow: 0 0 6px var(--sc, var(--pri));
  opacity: .95;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: sparkFly .68s cubic-bezier(.16, .84, .3, 1) forwards;
}
.fx-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(44% 44% at var(--fx-x, 50%) var(--fx-y, 50%), rgba(255, 219, 228, .55), transparent 70%);
  animation: flashOut .55s ease-out forwards;
}
[data-theme="dark"] .fx-flash {
  background: radial-gradient(44% 44% at var(--fx-x, 50%) var(--fx-y, 50%), rgba(238, 127, 149, .2), transparent 70%);
}
.fx-combo {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: comboPop 1.05s cubic-bezier(.2, .9, .3, 1.2) forwards;
  text-align: center;
}
.fx-combo b {
  font-size: 25px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 1px;
  color: var(--pri);
  text-shadow: 0 1px 0 #fff, 0 8px 20px rgba(217, 86, 111, .3);
}
.fx-combo span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 3px 10px rgba(47, 42, 46, .1);
  color: var(--tl);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
[data-theme="dark"] .fx-combo b { text-shadow: 0 1px 0 #2a2528, 0 8px 20px rgba(0, 0, 0, .4); }
[data-theme="dark"] .fx-combo span { background: rgba(50, 44, 48, .9); }
.tray-card.matching { animation: trayPulse .55s ease; }
.bump { animation: countBump .35s cubic-bezier(.2, 1.3, .4, 1); }
.bump-soft { animation: countBumpSoft .5s ease; }
.tile.hint .tile-inner { animation: hintPulse 1.1s ease-in-out infinite, hintGlow 1.1s ease-in-out infinite; }

@keyframes progressShimmer {
  0% { background-position: 0 0; }
  100% { background-position: 220% 0; }
}
@keyframes progressGlint {
  0%, 55% { transform: translateX(-120%); }
  85%, 100% { transform: translateX(120%); }
}
@keyframes boardSheen {
  0%, 52% { transform: translateX(-70%) rotate(4deg); }
  78%, 100% { transform: translateX(70%) rotate(4deg); }
}
@keyframes dealIn {
  0% { opacity: 0; transform: translateY(18px) scale(.8) rotate(-2deg); }
  65% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes tileFlip {
  0% { transform: rotateY(0deg) scale(1); }
  46% { transform: rotateY(88deg) scale(.94); }
  100% { transform: rotateY(0deg) scale(1); }
}
@keyframes iconWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(-8deg) scale(1.1); }
  65% { transform: rotate(6deg) scale(1.06); }
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(217, 86, 111, .12); }
  50% { box-shadow: 0 0 0 5px rgba(217, 86, 111, .05), 0 0 12px rgba(217, 86, 111, .28); }
}
@keyframes saBob {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-6px) rotate(calc(var(--rot, 0deg) + 2deg)); }
}
@keyframes heartBeat {
  0%, 100% { transform: translateX(28px) rotate(12deg) scale(1); opacity: .5; }
  18% { transform: translateX(28px) rotate(12deg) scale(1.22); opacity: .78; }
  36% { transform: translateX(28px) rotate(12deg) scale(.98); opacity: .55; }
  54% { transform: translateX(28px) rotate(12deg) scale(1.12); opacity: .68; }
}
@keyframes btnShine {
  0%, 55% { transform: translateX(-170%) skewX(-18deg); }
  78%, 100% { transform: translateX(520%) skewX(-18deg); }
}
@keyframes resultBounce {
  0% { opacity: 0; transform: scale(.3) rotate(-9deg); }
  55% { opacity: 1; transform: scale(1.14) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes rewardPop {
  0% { opacity: 0; transform: translateY(7px) scale(.78); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes statRise {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes pauseBreathe {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.06) rotate(2deg); }
}
@keyframes ambientDrift {
  0% { background-position: 0 0, 100% 100%, 50% 0; }
  100% { background-position: 100% 100%, 0 0, 60% 100%; }
}
@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0, -12vh, 0) rotate(0deg); }
  8% { opacity: .16; }
  88% { opacity: .1; }
  100% { opacity: 0; transform: translate3d(var(--sway, 40px), 112vh, 0) rotate(320deg); }
}
@keyframes rippleOut {
  0% { opacity: .85; transform: translate(-50%, -50%) scale(.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(4.6); }
}
@keyframes sparkFly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -22px))) scale(.15); }
}
@keyframes flashOut {
  0% { opacity: .9; }
  100% { opacity: 0; }
}
@keyframes comboPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(-5deg); }
  28% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(2deg); }
  62% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -86%) scale(.96); }
}
@keyframes trayPulse {
  0% { box-shadow: var(--shadow); }
  32% { box-shadow: 0 0 0 3px rgba(217, 86, 111, .12), 0 10px 28px rgba(217, 86, 111, .16); }
  100% { box-shadow: var(--shadow); }
}
@keyframes countBump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.28); color: var(--pri); }
}
@keyframes countBumpSoft {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.06); }
}
@keyframes hintGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(217, 86, 111, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(217, 86, 111, .35)); }
}

/* 小屏微调 */
@media (max-width: 360px) {
  .app { padding-left: 11px; padding-right: 11px; }
  .brand h1 { font-size: 17px; }
  .brand-eyebrow { letter-spacing: 1.8px; }
  .status-stats { gap: 11px; }
  .tools { gap: 5px; }
  .tool-label { font-size: 9px; }
  .board-hint { display: none; }
}
@media (min-width: 560px) {
  .app { padding-top: 22px; }
  .brand h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
