/* 猜水果 —— 移动端优先的卡通猜谜游戏 */
:root {
  --orange: #FF8A3D;
  --orange-deep: #E7671B;
  --orange-dark: #C95612;
  --cream: #FFF8EC;
  --card: #FFFDF8;
  --ink: #33241B;
  --ink-2: #6F5A49;
  --ink-3: #A28C78;
  --line: #F0DCC4;
  --mint: #43B894;
  --red: #FF5D6C;
  --yellow: #FFC53D;
  --shadow-card: 0 12px 26px rgba(184, 117, 55, 0.14);
}

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

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background: #FFF2DE;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  overflow-x: hidden;
  touch-action: manipulation;
}

button, input { font-family: inherit; }
button { -webkit-user-select: none; user-select: none; }

[hidden] { display: none !important; }

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 6%, rgba(120, 214, 190, 0.42), transparent 34%),
    radial-gradient(circle at 92% 20%, rgba(255, 196, 120, 0.52), transparent 32%),
    radial-gradient(circle at 78% 94%, rgba(126, 211, 170, 0.34), transparent 38%),
    linear-gradient(180deg, #FFF7EA 0%, #FFEFD9 58%, #FFE3C4 100%);
}

.bg-blobs span {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(1px);
}
.bg-blobs .b1 {
  width: 150px; height: 150px; top: 12%; left: -76px;
  background: rgba(255, 255, 255, 0.46);
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.bg-blobs .b2 {
  width: 96px; height: 96px; top: 48%; right: -52px;
  background: rgba(255, 197, 61, 0.22);
}
.bg-blobs .b3 {
  width: 220px; height: 220px; bottom: -130px; left: 18%;
  background: rgba(255, 255, 255, 0.3);
}

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(8px + env(safe-area-inset-top)) 16px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- 顶部信息 ---------- */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
}

.player {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 2px 8px 2px 2px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.player:active { transform: scale(0.97); }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 2px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #FFE4B8, #FFC987);
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 10px rgba(174, 108, 40, 0.22);
}
.avatar .fruit-svg { width: 100%; height: 100%; }

.player-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.15;
  min-width: 0;
}
.player-meta strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-meta small {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
}
.player-meta small .mp-icon { width: 11px; height: 11px; }

.hud-right { display: flex; align-items: center; gap: 8px; }

.score-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 74px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #FFF8E8;
  border: 1px solid #F5DFC0;
  box-shadow: 0 3px 0 #EFD7B6;
  color: #B95910;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.score-pill .mp-icon { width: 19px; height: 19px; color: #F5A623; }
.score-pill.bump { animation: bump 0.35s ease; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #FFFDF8;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  box-shadow: 0 3px 0 #EED9BE;
  cursor: pointer;
  flex: 0 0 auto;
}
.icon-btn .mp-icon { width: 20px; height: 20px; }
.icon-btn:active { transform: translateY(2px); box-shadow: none; }
.icon-btn.ghost { box-shadow: none; border-color: transparent; background: #FFF0DC; width: 36px; height: 36px; }

/* ---------- 进度 ---------- */
.round-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 2px;
  flex: 0 0 auto;
}
.round-label, .best-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.best-label b { color: var(--orange-deep); }

.progress {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #F3E0C8;
  box-shadow: inset 0 1px 2px rgba(150, 98, 48, 0.15);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 10%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFB24D, #FF7A2F);
  box-shadow: 0 0 8px rgba(255, 138, 61, 0.55);
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* ---------- 主游戏区 ---------- */
.game {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 224px;
  max-height: 440px;
  border-radius: 28px;
  border: 1px solid #F1DCBF;
  background: radial-gradient(circle at 50% 46%, #FFFDF4 0%, #FFF5DD 56%, #FFE9C4 100%);
  box-shadow: var(--shadow-card), inset 0 1px 0 #FFFFFF;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(206, 156, 98, 0.24) 1px, transparent 1.6px);
  background-size: 17px 17px;
  opacity: 0.55;
  pointer-events: none;
}
.stage::after {
  content: "";
  position: absolute;
  width: 76%;
  aspect-ratio: 1;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 226, 152, 0.7), rgba(255, 236, 190, 0) 68%);
  pointer-events: none;
}

.stage.bad { animation: shake 0.4s ease; }
.stage.good { animation: goodFlash 0.55s ease; }

.stage-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #F2DEC3;
  color: #9A6A35;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.timer {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #FFFDF7;
  border: 1px solid #F4DFC4;
  box-shadow: 0 4px 10px rgba(154, 94, 37, 0.14);
}
.timer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.timer-track { fill: none; stroke: #F1DFC9; stroke-width: 4; }
.timer-fill {
  fill: none;
  stroke: var(--orange);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.12s linear, stroke 0.2s ease;
}
.timer span {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 800;
  color: #8A5A2B;
  font-variant-numeric: tabular-nums;
}
.timer.low .timer-fill { stroke: var(--red); }
.timer.low span { color: var(--red); animation: pulse 0.8s ease infinite; }

.fruit-wrap {
  position: relative;
  z-index: 2;
  width: min(76%, 260px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 4s ease-in-out infinite;
  transition: filter 0.3s ease;
  will-change: transform;
}
.fruit-wrap .fruit-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 12px 12px rgba(140, 80, 30, 0.16));
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.fruit-wrap.silhouette .fruit-svg {
  filter: brightness(0) saturate(100%) drop-shadow(0 12px 10px rgba(80, 45, 20, 0.16));
  opacity: 0.84;
}
.fruit-wrap.pop { animation: pop 0.5s cubic-bezier(0.2, 1.35, 0.4, 1); }

.stage-footer {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 24px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #9B7A55;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-footer .mp-icon { width: 14px; height: 14px; color: #E8A63C; flex: 0 0 auto; }

.feedback {
  position: absolute;
  left: 50%;
  bottom: 50px;
  z-index: 6;
  transform: translate(-50%, 8px) scale(0.92);
  padding: 8px 16px;
  border-radius: 999px;
  background: #2F9E74;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(47, 158, 116, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100% - 28px);
  text-align: center;
}
.feedback.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.feedback.bad { background: #E45555; box-shadow: 0 8px 18px rgba(228, 85, 85, 0.3); }

/* ---------- 线索 ---------- */
.clue-card {
  flex: 0 0 auto;
  padding: 10px 14px 8px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 4px 0 #F1E1CA, 0 10px 22px rgba(174, 108, 40, 0.1);
}
.clue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}
.clue-label { display: flex; align-items: center; gap: 4px; color: #B06A24; }
.clue-label .mp-icon { width: 13px; height: 13px; }

#clueList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#clueList li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #5D4939;
  animation: slideIn 0.25s ease both;
}
.clue-dot {
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--orange);
}

.hint-line {
  width: 100%;
  min-height: 32px;
  margin-top: 6px;
  padding: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-top: 1px dashed #F0DFC8;
  background: transparent;
  color: #B06A24;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.hint-line .mp-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.hint-line em {
  font-style: normal;
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: #FFF0D8;
  color: #D0791F;
  font-size: 11px;
  font-weight: 800;
}
.hint-line:active { opacity: 0.7; }
.hint-line:disabled { color: #B7A795; cursor: default; opacity: 1; }
.hint-line:disabled em { display: none; }
.hint-line:disabled .mp-icon { color: #C9B29A; }

/* ---------- 生命与连对 ---------- */
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 2px;
}
.hearts { display: flex; align-items: center; gap: 3px; }
.hearts .mp-icon {
  width: 20px;
  height: 20px;
  color: var(--red);
  filter: drop-shadow(0 2px 2px rgba(255, 93, 108, 0.25));
  transition: color 0.2s ease, transform 0.2s ease;
}
.hearts .mp-icon.lost { color: #EBDCCB; filter: none; transform: scale(0.9); }
.hearts .mp-icon.lost-now { animation: heartLost 0.45s ease; }

.combo {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #FFF0D8;
  border: 1px solid #FFD9A6;
  color: #D86A16;
  font-size: 11px;
  font-weight: 800;
}
.combo .mp-icon { width: 13px; height: 13px; color: #FF7A2F; }

/* ---------- 选项 ---------- */
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  flex: 0 0 auto;
}
.answer {
  position: relative;
  min-height: 54px;
  padding: 0 10px 0 11px;
  border-radius: 16px;
  border: 1.5px solid #F0DCC4;
  background: linear-gradient(180deg, #FFFDF8, #FFF8EC);
  box-shadow: 0 4px 0 #ECD8BE, 0 8px 16px rgba(174, 108, 40, 0.08);
  color: #4A3829;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.answer .key {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #FFF0DA;
  color: #C08A4F;
  font-size: 11px;
  font-weight: 800;
}
.answer:active { transform: translateY(3px); box-shadow: 0 1px 0 #ECD8BE; }
.answer:disabled { cursor: default; }
.answer.correct {
  background: linear-gradient(180deg, #E8FAF0, #D5F5E4);
  border-color: #6BC79B;
  box-shadow: 0 4px 0 #B7E3C9;
  color: #1E7A52;
}
.answer.correct .key { background: #BEEBD3; color: #1E7A52; }
.answer.wrong {
  background: linear-gradient(180deg, #FFEDEE, #FFE0E3);
  border-color: #FF9BA3;
  box-shadow: 0 4px 0 #F3C4C8;
  color: #C53B48;
  animation: shake 0.35s ease;
}
.answer.wrong .key { background: #FFD3D7; color: #C53B48; }
.answer.dim { opacity: 0.48; }
.answer.reveal-anim { animation: pop 0.35s ease; }

.foot-tip {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #A99077;
  flex: 0 0 auto;
}
.foot-tip .mp-icon { width: 12px; height: 12px; }

/* ---------- 结算 ---------- */
.result {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: calc(26px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background: rgba(49, 30, 17, 0.55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.result-card {
  position: relative;
  width: 100%;
  max-width: 356px;
  margin: auto;
  padding: 26px 20px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, #FFFDF6, #FFF4E2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25), inset 0 0 0 1px #FFFFFF;
  text-align: center;
  animation: cardIn 0.42s cubic-bezier(0.2, 1.15, 0.4, 1) both;
}
.medal {
  width: 66px;
  height: 66px;
  margin: -55px auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 4px solid #FFF6E4;
  background: linear-gradient(145deg, #FFD66B, #FFA53C);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(230, 140, 40, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.medal .mp-icon { width: 30px; height: 30px; }

.result-kicker {
  margin: 2px 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #A98A6A;
}
.result-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #7A4219;
}
.result-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 4px 0 2px;
  color: var(--orange-deep);
  font-weight: 900;
}
.result-score span { font-size: 48px; line-height: 1.1; letter-spacing: -0.03em; }
.result-score small { font-size: 14px; }

.record {
  display: inline-block;
  margin: 4px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: #FFE9C8;
  color: #BF6A16;
  font-size: 11px;
  font-weight: 800;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0 18px;
}
.stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 4px;
  border-radius: 14px;
  background: #FFF8EA;
  border: 1px solid #F4E3CB;
}
.stats b { font-size: 16px; color: #503A28; font-variant-numeric: tabular-nums; }
.stats small { font-size: 10px; font-weight: 700; color: #A28B75; }

.btn-primary {
  width: 100%;
  min-height: 52px;
  margin-bottom: 10px;
  border: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #FFA155, #FF7A2F);
  box-shadow: 0 5px 0 #D8631F, 0 10px 18px rgba(255, 122, 47, 0.28);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.btn-primary .mp-icon { width: 19px; height: 19px; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #D8631F; }

.btn-ghost {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1.5px solid #EBD7BD;
  background: #FFFDF8;
  color: #7A5B3E;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.btn-ghost .mp-icon { width: 16px; height: 16px; }
.btn-ghost:active { background: #FFF5E5; }

.share-note { margin: 10px 0 0; font-size: 10px; color: #AC937B; }

.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti span {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 14px;
  border-radius: 3px;
  animation: fall linear forwards;
}

/* ---------- 资料弹层 ---------- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(49, 30, 17, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.sheet {
  width: 100%;
  max-width: 480px;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #FFF9EF;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  animation: sheetUp 0.3s ease both;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 18px; font-weight: 900; color: #503A28; }
.sheet-sub { margin: 4px 0 14px; font-size: 11px; color: #A58C73; }

.field-label {
  display: block;
  margin: 12px 0 7px;
  font-size: 12px;
  font-weight: 800;
  color: #7B5A3B;
}
.field {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1.5px solid #EDD9BE;
  background: #FFFFFF;
  color: #3A2A1D;
  font-size: 15px;
  outline: none;
}
.field:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.16); }

.avatar-grid {
  display: flex;
  gap: 9px;
  padding: 2px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.avatar-grid::-webkit-scrollbar { display: none; }
.avatar-opt {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: #FFF1DB;
  cursor: pointer;
}
.avatar-opt .fruit-svg { width: 100%; height: 100%; }
.avatar-opt.selected {
  border-color: var(--orange);
  background: #FFE6C9;
  box-shadow: 0 3px 8px rgba(255, 138, 61, 0.25);
}

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom));
  z-index: 80;
  transform: translate(-50%, 10px);
  max-width: 88vw;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(47, 34, 22, 0.92);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 动画 ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes pop {
  0% { transform: scale(0.94); }
  55% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
@keyframes goodFlash {
  0% { box-shadow: var(--shadow-card), inset 0 0 0 0 rgba(67, 184, 148, 0); }
  35% { box-shadow: 0 12px 26px rgba(184, 117, 55, 0.14), inset 0 0 0 5px rgba(67, 184, 148, 0.38); }
  100% { box-shadow: var(--shadow-card), inset 0 0 0 0 rgba(67, 184, 148, 0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes heartLost {
  0% { transform: scale(1.25) rotate(-8deg); }
  60% { transform: scale(0.82) rotate(6deg); }
  100% { transform: scale(0.9); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(115vh) rotate(540deg); opacity: 0.9; }
}

@media (max-height: 720px) {
  .app { gap: 8px; }
  .stage { min-height: 204px; border-radius: 24px; }
  .fruit-wrap { width: min(58%, 196px); }
  .clue-card { padding: 8px 12px 6px; border-radius: 18px; }
  #clueList li { font-size: 12.5px; }
  .answer { min-height: 50px; border-radius: 14px; font-size: 15px; }
  .foot-tip { display: none; }
}

@media (max-height: 640px) {
  .stage { min-height: 172px; padding: 10px; }
  .fruit-wrap { width: min(48%, 148px); }
  .clue-card { padding: 6px 12px 4px; }
  #clueList li { font-size: 12px; line-height: 1.35; }
  .hint-line { min-height: 28px; padding-top: 4px; }
  .meta-row { min-height: 22px; }
  .answers { gap: 7px; }
  .answer { min-height: 46px; font-size: 14px; }
}

@media (max-width: 374px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .player-meta strong { max-width: 84px; font-size: 14px; }
  .score-pill { min-width: 64px; padding: 7px 10px; font-size: 15px; }
  .icon-btn { width: 36px; height: 36px; }
  .answer { font-size: 15px; }
}

@media (min-width: 520px) {
  .app { padding-left: 20px; padding-right: 20px; }
}

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