:root {
  --amber: #FF8A3D;
  --amber-light: #FFC46B;
  --amber-deep: #F26F1D;
  --night: #070A18;
  --text: #F7F2E8;
  --muted: #A7B0CE;
  --calm: #7CE8C8;
  --danger: #FF6464;
  --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 {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #04060f;
}

body {
  display: flex;
  justify-content: center;
  align-items: stretch;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  background:
    radial-gradient(circle at 50% 20%, #121a36 0%, #070a17 46%, #03050c 100%);
  -webkit-user-select: none;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:focus-visible {
  outline: 2px solid var(--amber-light);
  outline-offset: 3px;
}

.mp-icon {
  flex: none;
}

.app {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--night);
  isolation: isolate;
}

/* 让竖屏游戏在平板 / 桌面上保持手机比例居中 */
@media (min-aspect-ratio: 3/5) {
  .app {
    width: min(100vw, 48dvh, 480px);
    box-shadow: 0 0 0 1px rgba(190, 205, 255, 0.10), 0 30px 100px rgba(0, 0, 0, 0.82);
  }
}

.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  background:
    radial-gradient(circle at 72% 34%, rgba(62, 90, 160, 0.30) 0%, transparent 44%),
    linear-gradient(180deg, #0a0f24 0%, #050714 100%);
}

.scene {
  position: absolute;
  top: -13.5%;
  left: 0;
  display: block;
  width: 100%;
  height: 113.5%;
  object-fit: cover;
  object-position: 86% 50%;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  will-change: opacity;
}

.stage.scene-ready .scene {
  opacity: 1;
}

.scene-grade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(3, 6, 18, 0.76) 0%,
      rgba(3, 6, 18, 0.64) 5%,
      rgba(3, 6, 18, 0.46) 9%,
      rgba(3, 6, 18, 0.24) 14%,
      rgba(3, 6, 18, 0.08) 20%,
      rgba(3, 6, 18, 0.01) 28%,
      rgba(3, 6, 18, 0.02) 54%,
      rgba(3, 6, 18, 0.10) 61%,
      rgba(3, 6, 18, 0.24) 69%,
      rgba(3, 6, 18, 0.44) 77%,
      rgba(3, 6, 18, 0.64) 85%,
      rgba(3, 6, 18, 0.82) 92%,
      rgba(3, 6, 18, 0.92) 100%),
    linear-gradient(90deg, rgba(3, 6, 18, 0.88) 0%, rgba(3, 6, 18, 0.52) 6%, rgba(3, 6, 18, 0.12) 12%, transparent 20%),
    linear-gradient(270deg, rgba(3, 6, 18, 0.46) 0%, rgba(3, 6, 18, 0.12) 6%, transparent 12%),
    linear-gradient(105deg, rgba(7, 13, 34, 0.36) 0%, transparent 44%, rgba(255, 112, 35, 0.04) 100%),
    radial-gradient(circle 260px at 100% 0%, rgba(3, 6, 18, 1) 0%, rgba(3, 6, 18, 0.88) 38%, rgba(3, 6, 18, 0) 100%),
    radial-gradient(circle 250px at 100% 82%, rgba(3, 6, 18, 1) 0%, rgba(3, 6, 18, 0.78) 42%, rgba(3, 6, 18, 0) 100%);
  transition: background 0.5s ease;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 43%, transparent 40%, rgba(2, 4, 12, 0.22) 74%, rgba(1, 3, 9, 0.58) 100%);
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 34%, rgba(255, 44, 44, 0.30) 100%);
  transition: opacity 0.4s ease;
}

.stage.phase-alert::after {
  opacity: 0.45;
}

.stage.phase-gaze::after {
  opacity: 0.82;
  animation: dangerBreath 1.4s ease-in-out infinite;
}

.stage.phase-caught::after {
  opacity: 1;
}

/* 怪物双眼的光晕，位置由 JS 按图片坐标计算 */
.eye-glow {
  position: absolute;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.20;
  filter: blur(1px);
  transition: opacity 0.35s ease, background 0.35s ease;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(205, 228, 255, 0.66) 27%, rgba(130, 175, 255, 0) 70%);
}

.stage.mode-home .eye-glow {
  opacity: 0.30;
  animation: eyeBreathe 4.4s ease-in-out infinite;
}

.stage.phase-alert .eye-glow {
  opacity: 0.68;
}

.stage.phase-gaze .eye-glow {
  opacity: 1;
  animation: eyePulse 0.7s ease-in-out infinite alternate;
}

.stage.phase-caught .eye-glow {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 245, 240, 1) 0%, rgba(255, 100, 80, 0.92) 30%, rgba(255, 20, 20, 0) 72%);
  animation: eyePulse 0.35s ease-in-out infinite alternate;
}

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

.dust i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 170, 0.95) 0%, rgba(255, 174, 90, 0) 72%);
  filter: blur(0.4px);
  animation: dustDrift linear infinite;
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 44;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255, 224, 210, 0.88) 0%, rgba(255, 72, 54, 0.55) 38%, rgba(80, 0, 0, 0.2) 100%);
}

.flash.hit {
  animation: flashHit 0.46s ease-out;
}

/* ================= 首页 ================= */

.home {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 18px) 22px calc(var(--safe-bottom) + 20px);
  transition: opacity 0.35s ease, transform 0.45s ease, filter 0.35s ease;
}

.stage.mode-play .home,
.stage.mode-over .home {
  opacity: 0;
  transform: scale(1.045);
  filter: blur(3px);
  pointer-events: none;
}

.home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.brand {
  min-width: 0;
  margin-top: clamp(28px, 6vh, 60px);
  padding-top: 2px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 163, 91, 0.30);
  background: rgba(19, 16, 30, 0.42);
  color: #FFC98A;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.kicker .mp-icon {
  width: 13px;
  height: 13px;
  color: #FFC46B;
}

.title {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 11px 0 0;
  color: #FFF9EE;
  font-size: clamp(31px, 9.4vw, 43px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(18, 12, 22, 0.75),
    0 3px 0 rgba(18, 12, 22, 0.32),
    0 10px 30px rgba(0, 0, 0, 0.66);
}

.title-num {
  font-size: 1.18em;
  line-height: 0.9;
  background: linear-gradient(180deg, #FFD99A 0%, #FFA544 45%, #FF7A24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 138, 61, 0.52));
}

.tagline {
  margin: 9px 0 0;
  color: #BBC5E2;
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(181, 198, 250, 0.22);
  background: rgba(8, 12, 28, 0.45);
  color: #F2EFE7;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.icon-btn:active {
  transform: scale(0.91);
  background: rgba(255, 138, 61, 0.22);
  border-color: rgba(255, 166, 97, 0.55);
}

.home-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 2px;
}

.best-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #AAB5D3;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.best-line .mp-icon {
  width: 13px;
  height: 13px;
  color: #FFC46B;
}

.best-line b {
  color: #FFD490;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.start-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(322px, 84vw);
  height: 62px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFC06E 0%, #FF9A45 28%, #FF7A24 100%);
  color: #331605;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.07em;
  box-shadow:
    0 4px 0 rgba(134, 50, 5, 0.62),
    0 8px 0 rgba(91, 30, 2, 0.34),
    0 16px 38px rgba(255, 108, 26, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.52),
    inset 0 -3px 0 rgba(150, 58, 5, 0.22);
  text-shadow: 0 1px 0 rgba(255, 238, 200, 0.42);
  transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.start-btn::before {
  content: "";
  position: absolute;
  inset: -11px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, rgba(255, 151, 64, 0.38) 0%, rgba(255, 130, 40, 0.10) 48%, transparent 74%);
  filter: blur(7px);
  animation: haloBreath 3.4s ease-in-out infinite;
}

.start-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1px solid rgba(255, 198, 136, 0.34);
  pointer-events: none;
}

.start-btn .mp-icon {
  width: 27px;
  height: 27px;
  color: #3A1905;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.30));
}

.start-btn:active {
  transform: translateY(4px) scale(0.994);
  filter: brightness(0.97);
  box-shadow:
    0 0 0 rgba(134, 50, 5, 0.62),
    0 3px 0 rgba(91, 30, 2, 0.34),
    0 8px 20px rgba(255, 108, 26, 0.30),
    inset 0 2px 0 rgba(255, 255, 255, 0.36),
    inset 0 -2px 0 rgba(150, 58, 5, 0.20);
}

.home-hint {
  margin: 0;
  color: #8F9AB9;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

/* ================= HUD ================= */

.hud {
  position: absolute;
  inset: 0;
  z-index: 20;
  padding: calc(var(--safe-top) + 13px) 16px 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.stage.mode-play .hud {
  opacity: 1;
  transform: none;
}

.hud-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
}

.hud-btn {
  pointer-events: auto;
  width: 40px;
  height: 40px;
}

.hearts {
  display: flex;
  align-items: center;
  gap: 2px;
}

.heart {
  width: 14px;
  height: 14px;
  color: #FF6B6B;
  filter: drop-shadow(0 0 5px rgba(255, 80, 80, 0.50));
  transition: color 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.heart.lost {
  color: rgba(209, 218, 244, 0.22);
  filter: none;
  transform: scale(0.88);
}

.heart.hit {
  animation: heartBreak 0.42s ease-out;
}

.score-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 230px;
  max-width: calc(100vw - 88px);
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 96, 0.27);
  background: rgba(7, 11, 26, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  pointer-events: none;
}

.score-divider {
  flex: none;
  width: 1px;
  height: 17px;
  background: rgba(203, 216, 250, 0.18);
}

.score-main {
  display: flex;
  align-items: center;
  gap: 5px;
}

.score-label {
  color: #C7B79C;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.score-chip .mp-icon {
  width: 17px;
  height: 17px;
  color: #FFC46B;
  filter: drop-shadow(0 0 6px rgba(255, 190, 90, 0.65));
}

.score-chip b {
  color: #FFF3DD;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.score-chip.bump {
  animation: scoreBump 0.3s ease-out;
}

.status-wrap {
  position: absolute;
  top: calc(var(--safe-top) + 68px);
  left: 50%;
  width: min(310px, 84vw);
  transform: translateX(-50%);
  text-align: center;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(124, 232, 200, 0.30);
  background: rgba(6, 13, 24, 0.62);
  color: #B7F6E6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.status .mp-icon {
  width: 15px;
  height: 15px;
}

.phase-bar {
  width: 108px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 99px;
  background: rgba(215, 226, 255, 0.14);
  overflow: hidden;
}

.phase-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--calm);
  transform: scaleX(1);
  transform-origin: left center;
  transition: background 0.25s ease;
  box-shadow: 0 0 8px rgba(124, 232, 200, 0.55);
}

.stage.phase-alert .status {
  color: #FFD9A0;
  border-color: rgba(255, 186, 103, 0.42);
  background: rgba(28, 18, 15, 0.66);
}

.stage.phase-alert .phase-bar i {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 138, 61, 0.60);
}

.stage.phase-gaze .status {
  color: #FFD1CB;
  border-color: rgba(255, 99, 90, 0.60);
  background: rgba(35, 10, 16, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 90, 80, 0.16), 0 0 22px rgba(255, 55, 55, 0.28);
  animation: statusDanger 0.95s ease-in-out infinite;
}

.stage.phase-gaze .phase-bar i {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 80, 80, 0.72);
}

.stage.phase-caught .status {
  color: #FFE0DA;
  border-color: rgba(255, 90, 80, 0.82);
  background: rgba(45, 8, 14, 0.82);
}

.stage.phase-caught .phase-bar i {
  background: var(--danger);
}

/* ================= 底部藏身处 ================= */

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 6px 16px calc(var(--safe-bottom) + 12px);
  background: linear-gradient(180deg, rgba(4, 7, 18, 0) 0%, rgba(4, 7, 18, 0.76) 19%, rgba(4, 7, 18, 0.96) 64%);
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.32s ease;
}

.stage.mode-play .dock {
  opacity: 1;
  transform: none;
}

.dock-hint {
  margin: 0 0 8px;
  color: #8792B4;
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  transition: color 0.2s ease;
}

.stage.phase-gaze .dock-hint {
  color: #FF9E95;
}

.stage.phase-caught .dock-hint {
  color: #FF8278;
}

.spots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  pointer-events: auto;
}

.spot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 78px;
  padding: 8px 4px 13px;
  border-radius: 17px;
  border: 1px solid rgba(153, 173, 236, 0.19);
  background:
    linear-gradient(180deg, rgba(31, 40, 76, 0.86) 0%, rgba(13, 18, 38, 0.92) 100%);
  color: #D7DEF4;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  touch-action: manipulation;
}

.spot:active {
  transform: scale(0.965);
}

.spot-icon {
  width: 23px;
  height: 23px;
  color: #AEB9E4;
  transition: color 0.18s ease, filter 0.18s ease;
}

.spot-name {
  color: #DCE2F6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  transition: color 0.18s ease;
}

.spot-you {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%) translateY(2px);
  color: #FFB25F;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.spot.active {
  border-color: rgba(255, 138, 61, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 147, 68, 0.27) 0%, rgba(47, 29, 28, 0.92) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 138, 61, 0.26),
    0 9px 26px rgba(255, 108, 40, 0.24),
    inset 0 1px 0 rgba(255, 225, 190, 0.24);
}

.spot.active .spot-icon,
.spot.active .spot-name {
  color: #FFD0A0;
}

.spot.active .spot-icon {
  filter: drop-shadow(0 0 8px rgba(255, 160, 80, 0.55));
}

.spot.active .spot-you {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.spot .watch-ico {
  position: absolute;
  top: 6px;
  left: 8px;
  width: 19px;
  height: 19px;
  color: #FF8F84;
  opacity: 0;
  transform: translateY(-3px) scale(0.6);
  filter: drop-shadow(0 0 8px rgba(255, 70, 60, 0.85));
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 1.4, 0.4, 1);
  animation: none;
}

.spot .shard {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 21px;
  height: 21px;
  color: #FFE29A;
  opacity: 0;
  transform: translateY(5px) scale(0.55);
  filter: drop-shadow(0 0 9px rgba(255, 198, 92, 0.95));
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.spot.has-shard {
  border-color: rgba(255, 192, 99, 0.52);
  box-shadow:
    0 0 0 1px rgba(255, 180, 80, 0.12),
    0 8px 22px rgba(0, 0, 0, 0.28),
    inset 0 0 22px rgba(255, 170, 70, 0.07);
}

.spot.has-shard .shard {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: shardFloat 1.5s ease-in-out infinite;
}

.spot.active.has-shard {
  border-color: rgba(255, 186, 100, 0.92);
}

.spot.watched {
  border-color: rgba(255, 95, 84, 0.82);
  background:
    linear-gradient(180deg, rgba(92, 24, 32, 0.90) 0%, rgba(31, 12, 22, 0.94) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 91, 80, 0.18),
    0 9px 26px rgba(155, 22, 30, 0.32),
    inset 0 1px 0 rgba(255, 200, 190, 0.13);
}

.spot.watched .spot-icon,
.spot.watched .spot-name {
  color: #FFB0A7;
}

.spot.watched .spot-icon {
  filter: drop-shadow(0 0 8px rgba(255, 96, 80, 0.55));
}

.spot.watched .watch-ico {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: watchPulse 0.95s ease-in-out infinite alternate;
}

.spot.watched .spot-you {
  color: #FF8F84;
}

.stage.phase-alert .spot.watched,
.stage.phase-gaze .spot.watched {
  border-color: rgba(255, 92, 80, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 91, 80, 0.30),
    0 0 22px rgba(255, 48, 40, 0.30),
    inset 0 0 20px rgba(255, 70, 55, 0.08);
}

.spot.collect {
  animation: spotCollect 0.36s ease-out;
}

.spot.reject {
  animation: spotReject 0.34s ease-out;
  border-color: rgba(255, 92, 84, 0.8);
}

.float-score {
  position: absolute;
  left: 50%;
  top: 9px;
  z-index: 3;
  transform: translateX(-50%);
  color: #FFE0A3;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(255, 190, 80, 0.7);
  pointer-events: none;
  animation: floatScore 0.72s ease-out forwards;
}

.stage.phase-gaze .spot {
  border-color: rgba(255, 100, 92, 0.26);
}

.stage.phase-caught .spot {
  border-color: rgba(255, 84, 76, 0.55);
}

/* ================= Toast ================= */

.toast {
  position: absolute;
  top: calc(var(--safe-top) + 126px);
  left: 50%;
  z-index: 35;
  width: max-content;
  max-width: min(320px, 84vw);
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 180, 96, 0.25);
  background: rgba(7, 11, 26, 0.84);
  color: #F2E8D8;
  font-size: 11.5px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

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

/* ================= 弹层 ================= */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 4, 12, 0.60);
  backdrop-filter: blur(9px) saturate(0.9);
  -webkit-backdrop-filter: blur(9px) saturate(0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.overlay[hidden] {
  display: none;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  width: min(340px, 92vw);
  max-height: min(86dvh, 620px);
  overflow-y: auto;
  padding: 24px 20px 16px;
  border-radius: 24px;
  border: 1px solid rgba(173, 190, 245, 0.19);
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 138, 61, 0.12) 0%, transparent 42%),
    linear-gradient(180deg, rgba(27, 33, 62, 0.97) 0%, rgba(10, 14, 31, 0.99) 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  scrollbar-width: none;
}

.panel::-webkit-scrollbar {
  display: none;
}

.overlay.show .panel {
  transform: none;
}

.panel-kicker {
  color: #C7A27A;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.panel-kicker.danger {
  color: #FF8E84;
}

.panel h2 {
  margin: 7px 0 0;
  color: #FFF8ED;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.panel-sub {
  margin: 8px 0 0;
  color: #9EA9C8;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.over-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 94, 84, 0.45);
  background: radial-gradient(circle, rgba(255, 70, 60, 0.30) 0%, rgba(255, 50, 40, 0.04) 72%);
  box-shadow: 0 0 30px rgba(255, 54, 44, 0.28), inset 0 0 18px rgba(255, 70, 60, 0.18);
}

.over-mark .mp-icon {
  width: 28px;
  height: 28px;
  color: #FF9B91;
  filter: drop-shadow(0 0 9px rgba(255, 80, 70, 0.7));
}

.over-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 18px 0 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid rgba(175, 192, 245, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.stat span {
  color: #8F9AB8;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.stat b {
  color: #FFD18A;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.btn-primary {
  display: grid;
  place-items: center;
  width: 100%;
  height: 50px;
  margin-top: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFC06E 0%, #FF9A45 32%, #FF7A24 100%);
  color: #331605;
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow:
    0 4px 0 rgba(134, 50, 5, 0.55),
    0 10px 26px rgba(255, 108, 26, 0.30),
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-primary:active {
  transform: translateY(3px);
  filter: brightness(0.97);
}

.btn-ghost {
  display: grid;
  place-items: center;
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid rgba(176, 193, 245, 0.2);
  background: rgba(255, 255, 255, 0.045);
  color: #E5EAF8;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: transform 0.12s ease, background 0.18s ease;
}

.btn-ghost:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.08);
}

.btn-text {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 11px 6px 8px;
  color: #8D98B9;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.btn-text:active {
  color: #FFD0A0;
}

.sound-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(176, 193, 245, 0.10);
  color: #8C97B6;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.sound-row .mp-icon {
  width: 15px;
  height: 15px;
}

.sound-row:active {
  color: #FFD0A0;
}

/* ================= 动效 ================= */

@keyframes watchPulse {
  0% { opacity: 0.55; transform: translateY(0) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1.1); }
}

@keyframes eyeBreathe {
  0%, 100% { opacity: 0.20; }
  50% { opacity: 0.42; }
}

@keyframes eyePulse {
  0% { opacity: 0.62; filter: blur(1px); }
  100% { opacity: 1; filter: blur(1.8px); }
}

@keyframes dustDrift {
  0% { transform: translate3d(0, 0, 0) scale(0.8); opacity: 0; }
  18% { opacity: 0.55; }
  82% { opacity: 0.35; }
  100% { transform: translate3d(-16px, -54px, 0) scale(1.15); opacity: 0; }
}

@keyframes haloBreath {
  0%, 100% { opacity: 0.55; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes shardFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.08); }
}

@keyframes scoreBump {
  0% { transform: scale(1); }
  45% { transform: scale(1.10); }
  100% { transform: scale(1); }
}

@keyframes heartBreak {
  0% { transform: scale(1.25); }
  55% { transform: scale(0.72) rotate(-10deg); }
  100% { transform: scale(0.88); }
}

@keyframes statusDanger {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 90, 80, 0.16), 0 0 18px rgba(255, 55, 55, 0.20); }
  50% { box-shadow: 0 0 0 1px rgba(255, 90, 80, 0.30), 0 0 28px rgba(255, 55, 55, 0.40); }
}

@keyframes dangerBreath {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 0.94; }
}

@keyframes flashHit {
  0% { opacity: 0; }
  16% { opacity: 0.92; }
  100% { opacity: 0; }
}

@keyframes floatScore {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.8); }
  22% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(1); }
}

@keyframes spotCollect {
  0% { transform: scale(1); }
  38% { transform: scale(1.055); }
  100% { transform: scale(1); }
}

@keyframes spotReject {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@keyframes stageShake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); }
  36% { transform: translateX(6px); }
  54% { transform: translateX(-4px); }
  72% { transform: translateX(3px); }
}

.stage.shake {
  animation: stageShake 0.36s ease-out;
}

.stage.paused .eye-glow,
.stage.paused .dust i,
.stage.paused .status,
.stage.paused .start-btn::before,
.stage.paused .spot.has-shard .shard {
  animation-play-state: paused;
}

/* ================= 小屏适配 ================= */

@media (max-height: 720px) {
  .home {
    padding-top: calc(var(--safe-top) + 13px);
    padding-bottom: calc(var(--safe-bottom) + 13px);
  }

  .title {
    margin-top: 9px;
    font-size: clamp(28px, 8.6vw, 38px);
  }

  .tagline {
    margin-top: 6px;
    font-size: 11.5px;
  }

  .kicker {
    padding: 5px 9px;
    font-size: 9px;
  }

  .home-bottom {
    gap: 9px;
  }

  .start-btn {
    height: 56px;
    font-size: 17.5px;
  }

  .start-btn .mp-icon {
    width: 24px;
    height: 24px;
  }

  .spot {
    height: 70px;
  }

  .status-wrap {
    top: calc(var(--safe-top) + 62px);
  }

  .panel {
    padding: 20px 18px 12px;
  }

  .panel h2 {
    font-size: 25px;
  }

  .btn-primary {
    height: 46px;
    margin-top: 13px;
  }
}

@media (max-width: 350px) {
  .home {
    padding-left: 16px;
    padding-right: 16px;
  }

  .kicker {
    letter-spacing: 0.12em;
  }

  .home-hint {
    font-size: 10px;
  }

  .spot {
    border-radius: 15px;
  }

  .spot-name {
    font-size: 11px;
  }

  .status {
    font-size: 11px;
    padding: 6px 11px;
  }

  .status-wrap {
    width: 88vw;
  }

  .heart {
    width: 13px;
    height: 13px;
  }

  .score-chip {
    width: 218px;
    padding: 0 9px;
  }

  .score-chip b {
    font-size: 16px;
  }
}

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