/* ============================================================
   爱护牙齿 · 竖屏护牙小游戏
   ============================================================ */
:root {
  --orange: #FF8A3D;
  --orange-deep: #EF6A18;
  --orange-soft: #FFB05C;
  --blue: #2FA5F2;
  --blue-deep: #1579D2;
  --green: #3FC97E;
  --green-deep: #1DA462;
  --pink: #FF7188;
  --ink: #26384A;
  --ink-soft: #5F7488;
  --cream: #FFF9F2;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #102a3c;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 3px solid rgba(255, 184, 92, .9);
  outline-offset: 3px;
}

img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #BFE8FF;
  box-shadow: 0 0 70px rgba(0, 0, 0, .35);
  isolation: isolate;
}

.view {
  position: absolute;
  inset: 0;
}

/* ---------- 通用圆形按钮 ---------- */
.round-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #277CB8;
  background: rgba(255, 255, 255, .9);
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow: 0 7px 16px rgba(25, 95, 145, .2), inset 0 1px 0 #fff;
  transition: transform .14s ease, background .14s ease;
}

.round-btn .mp-icon { width: 22px; height: 22px; }
.round-btn:active { transform: scale(.9); background: #fff; }

/* ============================================================
   首页
   ============================================================ */
.home { background: #BFE8FF; }

.app-bg {
  position: absolute;
  inset: -36px;
  width: calc(100% + 72px);
  height: calc(100% + 72px);
  object-fit: cover;
  filter: blur(15px) saturate(1.16) brightness(1.03);
  transform: scale(1.03);
  opacity: .92;
}

.bg-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(85% 55% at 50% 30%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(116, 204, 255, .12) 0%, rgba(226, 247, 255, .36) 38%, rgba(255, 249, 241, .86) 70%, #FFFAF4 100%);
}

.home-deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  display: block;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .8);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .9), rgba(255, 255, 255, .12) 42%, rgba(120, 205, 255, .18) 100%);
  box-shadow: inset 0 0 12px rgba(255, 255, 255, .55), 0 6px 16px rgba(46, 143, 209, .14);
  animation: bubbleDrift 7s ease-in-out infinite;
}

.b1 { width: 46px; height: 46px; left: 5%; top: 17%; animation-delay: -.4s; }
.b2 { width: 22px; height: 22px; right: 9%; top: 12%; animation-delay: -2.1s; }
.b3 { width: 34px; height: 34px; right: 6%; top: 40%; animation-delay: -3.2s; }
.b4 { width: 18px; height: 18px; left: 12%; top: 47%; animation-delay: -1.3s; }
.b5 { width: 60px; height: 60px; left: -18px; top: 68%; animation-delay: -4s; opacity: .7; }
.b6 { width: 26px; height: 26px; right: 12%; top: 73%; animation-delay: -2.6s; opacity: .75; }

.home-scroll {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: calc(9px + var(--safe-top)) 16px calc(13px + var(--safe-bottom));
  scrollbar-width: none;
}
.home-scroll::-webkit-scrollbar { display: none; }

.home-hud {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 13px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  border: 1.5px solid rgba(255, 255, 255, .96);
  box-shadow: 0 7px 18px rgba(31, 104, 158, .18), inset 0 1px 0 #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.avatar {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: #CDEBFF;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(28, 108, 160, .22);
}

.avatar .crop {
  display: block;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player-name {
  font-size: 11.5px;
  font-weight: 800;
  color: #24567A;
  letter-spacing: .02em;
  white-space: nowrap;
}

.player-lv {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #7C8FA0;
  font-size: 9.5px;
  line-height: 1;
}

.player-lv b { color: #E28A22; font-size: 10px; }

.star-icon {
  width: 12px;
  height: 12px;
  color: #FFC23E;
  filter: drop-shadow(0 1px 1px rgba(202, 129, 0, .35));
}

.lv-track {
  display: block;
  width: 52px;
  height: 5px;
  margin-left: 1px;
  border-radius: 99px;
  background: #DDEBEF;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(24, 83, 112, .18);
}

.lv-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFD36E, #FF9E2C);
  transition: width .5s ease;
}

/* 英雄区 */
.hero {
  position: relative;
  flex: 0 0 180px;
  height: 180px;
  margin-top: 2px;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 290px;
  height: 150px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .85), rgba(183, 231, 255, .42) 48%, rgba(183, 231, 255, 0) 72%);
  filter: blur(2px);
}

.hero-art {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 306px;
  height: 172px;
  transform: translateX(-50%);
  background-repeat: no-repeat;
  filter: drop-shadow(0 14px 15px rgba(24, 103, 160, .2));
  -webkit-mask-image: radial-gradient(ellipse 56% 54% at 52% 50%, #000 48%, rgba(0, 0, 0, .72) 62%, transparent 78%);
  mask-image: radial-gradient(ellipse 56% 54% at 52% 50%, #000 48%, rgba(0, 0, 0, .72) 62%, transparent 78%);
  animation: heroFloat 4.6s ease-in-out infinite;
}

.speech {
  position: absolute;
  right: 1px;
  top: 5px;
  z-index: 3;
  padding: 8px 11px;
  max-width: 118px;
  border-radius: 15px 15px 15px 5px;
  background: rgba(255, 255, 255, .95);
  border: 1.5px solid #fff;
  color: #34708F;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .01em;
  box-shadow: 0 8px 18px rgba(31, 112, 165, .18);
  animation: speechFloat 3.8s ease-in-out infinite;
}

.speech::after {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 7px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 2px;
}

.spark {
  position: absolute;
  color: #FFD15C;
  filter: drop-shadow(0 2px 3px rgba(221, 139, 0, .28));
  animation: twinkle 2.6s ease-in-out infinite;
}

.spark.s1 { width: 26px; height: 26px; left: 28px; top: 22px; }
.spark.s2 { width: 16px; height: 16px; right: 60px; top: 112px; animation-delay: -1.3s; color: #fff; }
.spark.s3 { width: 14px; height: 14px; left: 78px; top: 112px; animation-delay: -.7s; color: #FFC23E; }

/* 卡片 */
.cards {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 5px;
  border-radius: 25px;
  background: #fff;
  border: 1.5px solid rgba(255, 255, 255, .98);
  box-shadow: 0 13px 26px rgba(23, 102, 156, .19), inset 0 1px 0 #fff;
  overflow: hidden;
  transition: transform .16s cubic-bezier(.2, .9, .3, 1.2), box-shadow .16s ease;
}

.mode-card:active {
  transform: scale(.968);
  box-shadow: 0 7px 14px rgba(23, 102, 156, .18);
}

.mode-card.care { background: linear-gradient(180deg, #F1FAFF, #DDF2FF); }
.mode-card.prevent { background: linear-gradient(180deg, #F4FFF9, #DDF8EA); }
.mode-card.treat { background: linear-gradient(180deg, #FFF9F0, #FFEBD3); }

.card-glow {
  position: absolute;
  right: -25px;
  top: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(84, 190, 255, .5), rgba(84, 190, 255, 0) 70%);
  pointer-events: none;
}

.card-art {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background-color: #CBE9FB;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 38%, rgba(28, 80, 110, .12) 100%);
}

.featured .card-art { height: 174px; }

.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-row .mode-card { border-radius: 23px; padding: 5px; }
.card-row .card-art { height: 142px; border-radius: 18px; }

.card-pill {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  margin-top: 5px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .34), inset 0 -3px 0 rgba(0, 0, 0, .15), 0 5px 10px rgba(20, 80, 120, .17);
}

.featured .card-pill { min-height: 49px; padding-left: 15px; }
.card-row .card-pill { min-height: 49px; padding: 6px 8px 6px 11px; }

.care .card-pill { background: linear-gradient(180deg, #59C6FF 0%, #1B8BE6 100%); }
.prevent .card-pill { background: linear-gradient(180deg, #61DFA1 0%, #1EAB67 100%); }
.treat .card-pill { background: linear-gradient(180deg, #FFB35E 0%, #F27619 100%); }

.pill-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  line-height: 1.15;
}

.pill-copy b {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .04em;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}

.card-row .pill-copy b { font-size: 14.5px; letter-spacing: .01em; }
.pill-copy small {
  font-size: 9px;
  font-weight: 600;
  opacity: .88;
  white-space: nowrap;
}
.card-row .pill-copy small { font-size: 8px; }

.card-pill .mp-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .16));
}
.card-row .card-pill .mp-icon { width: 18px; height: 18px; }

/* 底部 */
.home-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 13px;
}

.best-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow: 0 6px 15px rgba(28, 105, 158, .15);
  font-size: 10.5px;
  font-weight: 700;
  color: #5C7D92;
}

.best-pill .mp-icon { width: 17px; height: 17px; color: #F5A623; }
.best-pill b { color: var(--orange-deep); font-size: 13px; }

.foot-hint {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #7C93A4;
}

.foot-hint .mp-icon { width: 14px; height: 14px; color: #93AABB; }

/* ============================================================
   游戏页
   ============================================================ */
.play { background: #54142A; }

.play-bg {
  position: absolute;
  inset: -30px;
  width: calc(100% + 60px);
  height: calc(100% + 60px);
  object-fit: cover;
  filter: blur(13px) saturate(1.25) brightness(.82);
  transform: scale(1.04);
}

.play-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(95% 60% at 50% 34%, rgba(255, 190, 178, .24) 0%, rgba(120, 25, 48, .3) 50%, rgba(55, 8, 24, .82) 100%),
    linear-gradient(180deg, rgba(58, 8, 25, .52) 0%, rgba(104, 18, 40, .2) 45%, rgba(54, 6, 22, .82) 100%);
}

.play-hud {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: calc(9px + var(--safe-top)) 14px 0;
}

.round-btn.light {
  width: 41px;
  height: 41px;
  background: rgba(255, 255, 255, .93);
  color: #9D3B52;
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 7px 16px rgba(44, 0, 15, .26);
}

.progress-wrap {
  flex: 1;
  min-width: 0;
  padding: 7px 11px 8px;
  border-radius: 14px;
  background: rgba(72, 16, 33, .28);
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, .92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.progress-top b { font-size: 10.5px; color: #FFE7B9; }

.progress-track {
  display: block;
  height: 7px;
  margin-top: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .24);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .2);
}

.progress-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #80ECB1, #27C776);
  box-shadow: 0 0 10px rgba(77, 230, 150, .55);
  transition: width .22s ease;
}

.play.mode-treat .progress-track i { background: linear-gradient(90deg, #FFD36E, #FF9B2F); box-shadow: 0 0 10px rgba(255, 178, 70, .55); }
.play.mode-prevent .progress-track i { background: linear-gradient(90deg, #9CE8FF, #45B9FF); box-shadow: 0 0 10px rgba(90, 200, 255, .55); }

.play-stats {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px 0;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .93);
  color: #793246;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .05em;
  box-shadow: 0 6px 13px rgba(40, 0, 14, .24), inset 0 1px 0 #fff;
  font-variant-numeric: tabular-nums;
}

.stat-chip .mp-icon { width: 16px; height: 16px; color: #FFB13B; }
.stat-chip:last-child .mp-icon { color: #4FA7DE; }
.stat-chip.warn { color: #D9303F; background: #FFF4F2; }
.stat-chip.warn .mp-icon { color: #D9303F; }
.stat-chip.warn b { animation: timerPulse .8s ease-in-out infinite; }

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

.mode-tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .94);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.stage {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(111px + var(--safe-top));
  bottom: calc(64px + var(--safe-bottom));
  overflow: hidden;
  z-index: 3;
}

.play.mode-care .stage,
.play.mode-treat .stage { touch-action: none; }

.stage-glow {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 105%;
  height: 58%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(255, 232, 214, .28) 0%, rgba(255, 140, 120, .1) 45%, rgba(255, 120, 100, 0) 72%);
  pointer-events: none;
}

.hearts {
  position: absolute;
  pointer-events: none;
  left: 13px;
  top: 8px;
  z-index: 7;
  display: none;
  gap: 3px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(70, 12, 30, .35);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.play.mode-prevent .hearts { display: flex; }

.hearts .mp-icon {
  width: 20px;
  height: 20px;
  color: #FF5E76;
  filter: drop-shadow(0 2px 3px rgba(80, 0, 18, .35));
  transition: color .2s, transform .2s;
}

.hearts .mp-icon.lost {
  color: rgba(255, 255, 255, .24);
  transform: scale(.82);
}

/* 牙齿泡泡 */
.tooth-wrap {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 300px;
  height: 200px;
  transform: translate(-50%, -50%);
  z-index: 3;
  transition: top .35s ease, width .35s ease, height .35s ease;
}

/* 场景气泡 */
.stage-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.stage-bubbles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 42%, rgba(255, 255, 255, .03) 68%, rgba(255, 255, 255, .12) 100%);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, .25), 0 4px 10px rgba(60, 0, 18, .12);
  animation: bubbleDrift 6.5s ease-in-out infinite;
  opacity: .65;
}

.sb1 { width: 34px; height: 34px; left: 9%; top: 12%; animation-delay: -.6s; }
.sb2 { width: 15px; height: 15px; right: 14%; top: 16%; animation-delay: -2.2s; opacity: .5; }
.sb3 { width: 48px; height: 48px; right: 5%; top: 46%; animation-delay: -3.4s; opacity: .42; }
.sb4 { width: 20px; height: 20px; left: 7%; top: 58%; animation-delay: -1.4s; opacity: .5; }
.sb5 { width: 66px; height: 66px; left: -22px; top: 76%; animation-delay: -4.2s; opacity: .3; }
.sb6 { width: 13px; height: 13px; left: 38%; top: 23%; animation-delay: -2.8s; opacity: .55; }

.tooth-aura {
  position: absolute;
  inset: -18px -12px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 248, 242, .62), rgba(255, 224, 205, .26) 50%, rgba(255, 210, 190, 0) 72%);
  filter: blur(4px);
}

.tooth-art {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 48% 48% 44% 44% / 52% 52% 46% 46%;
  overflow: hidden;
  background-color: #CDEBFF;
  background-repeat: no-repeat;
  border: 4px solid rgba(255, 255, 255, .92);
  box-shadow: 0 18px 30px rgba(73, 8, 30, .38), inset 0 0 24px rgba(255, 255, 255, .5);
}

.tooth-art::after {
  content: "";
  position: absolute;
  left: 8%;
  top: 5%;
  width: 56%;
  height: 34%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  transform: rotate(-12deg);
  pointer-events: none;
}

.play.mode-prevent .tooth-wrap {
  top: auto;
  bottom: 6px;
  width: 240px;
  height: 162px;
}

.shield-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  width: 292px;
  height: 228px;
  margin: -114px 0 0 -146px;
  border-radius: 50%;
  pointer-events: none;
}

.play.mode-prevent .shield-ring { display: block; }

.shield-ring.r1 {
  border: 2px solid rgba(138, 225, 255, .55);
  box-shadow: 0 0 24px rgba(96, 205, 255, .35), inset 0 0 24px rgba(96, 205, 255, .22);
  animation: shieldPulse 2.4s ease-in-out infinite;
}

.shield-ring.r2 {
  width: 326px;
  height: 254px;
  margin: -127px 0 0 -163px;
  border: 1.5px dashed rgba(163, 236, 255, .4);
  animation: spin 16s linear infinite;
}

.play.mode-prevent .tooth-aura {
  background: radial-gradient(ellipse at center, rgba(122, 224, 255, .5), rgba(84, 188, 255, .18) 52%, rgba(84, 188, 255, 0) 75%);
}

/* 动态层 */
.dyn-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* 牙菌斑 */
.plaque {
  position: absolute;
  width: 31px;
  height: 25px;
  margin: 0;
  border-radius: 58% 42% 52% 48% / 44% 62% 38% 56%;
  background:
    radial-gradient(circle at 33% 28%, #F4E08C 0%, #DEC35B 32%, #B99A3E 63%, #8C6E22 100%);
  box-shadow: inset -2px -2px 3px rgba(92, 65, 4, .48), inset 2px 1px 2px rgba(255, 250, 210, .32), 0 2px 3px rgba(74, 43, 0, .28);
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  filter: saturate(.82);
  animation: plaqueWobble 2.4s ease-in-out infinite;
  transition: opacity .18s ease, transform .18s ease;
}

.plaque::after {
  content: "";
  position: absolute;
  left: 56%;
  top: 26%;
  width: 6px;
  height: 5px;
  border-radius: 50%;
  background: rgba(96, 66, 6, .52);
}

.plaque::before {
  content: "";
  position: absolute;
  left: 22%;
  top: 58%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(118, 84, 10, .42);
}

.plaque:active { transform: translate(-50%, -50%) scale(1.12); }
.plaque.clean {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.65);
  pointer-events: none;
}

/* 糖菌 */
.germ {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-repeat: no-repeat;
  border: 3px solid rgba(255, 255, 255, .92);
  box-shadow: 0 7px 13px rgba(48, 0, 18, .35), inset 0 0 12px rgba(255, 255, 255, .18);
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  will-change: transform;
  animation: germFloat 1.8s ease-in-out infinite;
}

.germ::after {
  content: "";
  position: absolute;
  left: 14%;
  top: 10%;
  width: 30%;
  height: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  filter: blur(1px);
}

.germ.pop {
  animation: germPop .24s ease-out forwards;
  pointer-events: none;
}

/* 蛀洞 */
.cavity {
  position: absolute;
  width: 52px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 48% 52% 46% 54%;
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  filter: drop-shadow(0 2px 3px rgba(80, 40, 8, .22));
}

.cavity .core {
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: radial-gradient(circle at 42% 35%, #170B04 0%, #351B0B 40%, #5C3416 63%, #8C6125 73%, #BE9447 77%, rgba(190, 148, 71, 0) 80%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .58), inset 0 1px 2px rgba(255, 222, 165, .22), 0 1px 3px rgba(92, 42, 0, .22);
  transition: background .25s ease, box-shadow .25s ease, transform .2s ease;
  animation: cavityThrob 2.8s ease-in-out infinite;
}

.cavity .tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  color: #22A867;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .2s, transform .2s;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2));
  z-index: 3;
}

.cavity .ring {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(#FFD05C calc(var(--p, 0) * 1%), rgba(255, 255, 255, .3) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}

.cavity.holding .ring { opacity: 1; }

.cavity.cleaned .core {
  background: radial-gradient(circle at 44% 38%, #1A2937 0%, #314B62 55%, #4D6C85 78%, rgba(77, 108, 133, 0) 81%);
  box-shadow: inset 0 5px 9px rgba(0, 0, 0, .62), inset 0 -1px 2px rgba(255, 255, 255, .15);
  animation: none;
}

.cavity.filled .core {
  background: radial-gradient(circle at 36% 30%, #FFFFFF 0%, #F5FAFB 48%, #D6E9EE 76%, rgba(214, 233, 238, .2) 81%);
  box-shadow: inset 0 -2px 4px rgba(120, 160, 180, .32), 0 0 12px rgba(255, 255, 255, .72);
  animation: none;
}

.cavity.filled .tick { opacity: 1; transform: scale(1); }

/* 刷沫 */
.foam {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.foam-glow {
  position: absolute;
  width: 104px;
  height: 104px;
  margin: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .55) 30%, rgba(190, 235, 255, .2) 56%, rgba(190, 235, 255, 0) 72%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .14s ease;
  filter: blur(1px);
}

.foam-glow.on { opacity: 1; }

.particle {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 7px rgba(255, 255, 255, .9);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 8;
}

.float-score {
  position: absolute;
  z-index: 9;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .02em;
  text-shadow: 0 2px 0 #D7671E, 0 0 9px rgba(255, 180, 80, .8);
  pointer-events: none;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.hint {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(255, 247, 241, .95);
  border: 1px solid rgba(255, 255, 255, .9);
  color: #7A3B34;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 18px rgba(44, 0, 16, .25);
}

.hint .mp-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #F5A623;
}

.miss-flash {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: radial-gradient(circle at 50% 72%, rgba(255, 76, 92, .58) 0%, rgba(255, 76, 92, .16) 42%, rgba(255, 76, 92, 0) 68%);
  animation: missFlash .46s ease-out forwards;
}

@keyframes missFlash {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   弹层
   ============================================================ */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(31, 8, 16, .62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn .18s ease;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 336px;
  padding: 27px 20px calc(17px + var(--safe-bottom));
  border-radius: 30px;
  background: linear-gradient(180deg, #FFFDFA 0%, #FFF4E7 100%);
  border: 1.5px solid #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .38), inset 0 1px 0 #fff;
  text-align: center;
  animation: sheetIn .3s cubic-bezier(.18, .89, .32, 1.18);
}

.sheet-badge {
  width: 66px;
  height: 66px;
  margin: -60px auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, #FFC15E, #FF8A3D 55%, #F26B1D);
  border: 4px solid #FFF9F2;
  box-shadow: 0 12px 22px rgba(224, 108, 24, .38), inset 0 2px 2px rgba(255, 255, 255, .5);
}

.sheet-badge .mp-icon { width: 32px; height: 32px; filter: drop-shadow(0 1px 2px rgba(150, 60, 0, .35)); }

.sheet h2 {
  margin: 0;
  color: #3A241C;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .02em;
}

.ov-sub {
  margin: 5px 0 0;
  color: #9A8072;
  font-size: 12px;
  font-weight: 600;
}

.result-box {
  margin: 15px 0 0;
  padding: 13px 14px 12px;
  border-radius: 19px;
  background: #fff;
  border: 1.5px solid #FFE4C9;
  box-shadow: inset 0 2px 8px rgba(255, 202, 150, .16);
}

.result-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
}

.result-score span { color: #A68B7B; font-size: 11.5px; font-weight: 700; }

.result-score b {
  color: #F0741C;
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 #FFE1C4;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #F3DEC9;
  color: #9A8272;
  font-size: 10.5px;
  font-weight: 700;
}

.result-meta b { color: #E2842A; font-size: 12px; }

#ovStars { display: inline-flex; gap: 1px; color: #FFC23E; }
#ovStars .mp-icon { width: 15px; height: 15px; }
#ovStars .mp-icon.off { color: #ECDFD2; }

.tip-line {
  display: flex;
  gap: 7px;
  margin: 13px 0 0;
  padding: 9px 11px;
  border-radius: 14px;
  background: #FFF8EC;
  border: 1px dashed #FFD6A9;
  color: #8C6544;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
}

.tip-line .mp-icon { flex: 0 0 auto; width: 16px; height: 16px; color: #F5A623; margin-top: 1px; }

.sheet-actions { margin-top: 15px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  transition: transform .14s ease, box-shadow .14s ease;
}

.btn .mp-icon { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }

.btn.primary {
  color: #fff;
  background: linear-gradient(180deg, #FFB25D 0%, #FF8A3D 48%, #F1731E 100%);
  box-shadow: 0 10px 20px rgba(225, 108, 26, .34), inset 0 2px 0 rgba(255, 255, 255, .38), inset 0 -3px 0 rgba(0, 0, 0, .13);
  text-shadow: 0 1px 1px rgba(150, 60, 0, .25);
}

.btn.ghost {
  color: #8A6A58;
  background: #FFFDFB;
  border: 1.5px solid #F0DCC9;
  box-shadow: 0 5px 12px rgba(170, 123, 86, .12), inset 0 1px 0 #fff;
}

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

.btn-row .btn { min-height: 46px; font-size: 13px; }

/* 彩纸 */
.confetti {
  position: absolute;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 13px;
  border-radius: 3px;
  opacity: .95;
  animation: confettiFall linear forwards;
}

/* ============================================================
   动画
   ============================================================ */
@keyframes heroFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-7px); }
}

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

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

@keyframes twinkle {
  0%, 100% { opacity: .55; transform: scale(.82) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.12) rotate(14deg); }
}

@keyframes plaqueWobble {
  0%, 100% { transform: translate(-50%, -50%) rotate(-4deg) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(4deg) scale(1.06); }
}

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

@keyframes germFloat {
  0%, 100% { margin-left: -2px; }
  50% { margin-left: 2px; }
}

@keyframes germPop {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}

@keyframes shieldPulse {
  0%, 100% { transform: scale(.97); opacity: .65; }
  50% { transform: scale(1.03); opacity: 1; }
}

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

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes sheetIn {
  from { opacity: 0; transform: translateY(22px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confettiFall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .65; }
}

@keyframes scorePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.score-pop { animation: scorePop .28s ease; }

.shake { animation: shake .32s ease; }
@keyframes shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0); }
  20% { transform: translate(calc(-50% - 7px), -50%) rotate(-2deg); }
  45% { transform: translate(calc(-50% + 7px), -50%) rotate(2deg); }
  70% { transform: translate(calc(-50% - 4px), -50%) rotate(-1deg); }
}
}

/* 小屏适配 */
@media (max-height: 740px) {
  .hero { flex-basis: 156px; height: 156px; }
  .hero-art { width: 268px; height: 150px; }
  .featured .card-art { height: 150px; }
  .card-row .card-art { height: 122px; }
  .home-foot { padding-top: 9px; }
}

@media (max-width: 350px) {
  .pill-copy b { font-size: 15.5px; }
  .card-row .pill-copy b { font-size: 13px; }
  .card-row .pill-copy small { display: none; }
  .speech { font-size: 11px; max-width: 104px; }
  .player-name { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
