/* ============================================================
 * 大山里的音乐课 · 设计系统（晨雾山谷 · 水彩治愈）
 * 依据 docs/DESIGN.md 精工实现 · 2026-08-12
 *   - 无纯黑无纯白 · 饱和度 ≤70%
 *   - 大圆角(24/16-20/pill) · 触控 ≥44px · 发光=可点
 *   - 动效全 transform/opacity · prefers-reduced-motion 降级
 * ============================================================ */

:root {
  /* —— 晨光自然系 —— */
  --forest:      #3e7d5e;
  --forest-deep: #2d6349;
  --forest-ink:  #1f4a37;
  --gold:        #e8b04b;
  --gold-soft:   #f3c878;
  --gold-pale:   #f7e3b5;
  --mist:        #bfe3ff;
  --sky-top:     #dceffb;
  --sky-low:     #e8f3d8;
  --cream:       #fff8ec;
  --cream-deep:  #f3e8d1;
  --berry:       #d97a8e;
  --berry-soft:  #f2c6ce;
  --stream:      #6fb7e8;
  --stream-deep: #4f9bd4;
  --mud:         #c98a5e;
  --mud-deep:    #a96f45;
  --ink:         #37423b;
  --gray:        #6d7a70;
  --shadow:      0 10px 28px rgba(56, 94, 74, .14);
  --shadow-sm:   0 4px 14px rgba(56, 94, 74, .12);

  /* —— 圆角 —— */
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --r-pill: 999px;

  /* —— 字体 —— */
  --font: "Baloo 2", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;

  /* —— 动效 —— */
  --t-fast: .15s;
  --t-med:  .3s;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ════════════ 基础 ════════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  line-height: 1.7;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top), var(--mist) 55%, var(--sky-low));
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

img, svg { display: block; }

.hidden { display: none !important; }

/* 可访问性：键盘焦点 */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ════════════ 视图容器 ════════════ */
.view {
  display: none;
  min-height: 100dvh;
  width: 100%;
}
.view.active { display: block; animation: viewIn .45s var(--ease) both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════ 顶栏 ════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(14px, 4vw, 28px);
  background: linear-gradient(180deg, rgba(220, 239, 251, .96), rgba(220, 239, 251, .78));
  backdrop-filter: blur(6px);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--forest-deep);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--r-pill);
  background: rgba(255, 248, 236, .85);
  color: var(--forest-deep);
  font-size: 22px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast);
}
.icon-btn:hover { box-shadow: 0 0 0 3px rgba(232, 176, 75, .55), var(--shadow-sm); }
.icon-btn:active { transform: translateY(3px); }

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--cream);
  color: var(--forest-deep);
  font-weight: 700;
  font-size: 17px;
  box-shadow: var(--shadow-sm);
}
.points-icon { color: var(--gold); font-size: 20px; }

/* ════════════ 按钮 ════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: var(--r-pill);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast);
  user-select: none;
}
.btn:hover { box-shadow: 0 0 0 3px rgba(232, 176, 75, .55), var(--shadow-sm); }
.btn:active { transform: translateY(3px); }

.btn-primary {
  background: var(--forest);
  color: #fdfaf0;
  box-shadow: 0 6px 0 var(--forest-deep), var(--shadow-sm);
}
.btn-primary:active { box-shadow: 0 2px 0 var(--forest-deep); }

.btn-gold {
  background: var(--gold);
  color: #4a3610;
  box-shadow: 0 6px 0 #c98e2f, var(--shadow-sm);
}
.btn-gold:active { box-shadow: 0 2px 0 #c98e2f; }

.btn-ghost {
  background: rgba(255, 248, 236, .9);
  color: var(--forest-deep);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { box-shadow: 0 0 0 3px rgba(232, 176, 75, .4), var(--shadow-sm); }

.btn-berry {
  background: var(--berry);
  color: #fff6f2;
  box-shadow: 0 6px 0 #b95f74, var(--shadow-sm);
}
.btn-berry:active { box-shadow: 0 2px 0 #b95f74; }

.btn-lg { min-height: 58px; padding: 12px 30px; font-size: 19px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ════════════ Splash ════════════ */
.splash {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.splash-sky {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url(../assets/hero.webp) center 32% / cover no-repeat;
  overflow: hidden;
  animation: heroDrift 18s ease-in-out infinite alternate; /* 缓慢呼吸缩放动效 */
}
@keyframes heroDrift { from { transform: scale(1); } to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .splash-sky { animation: none; } }
/* hero 全景接管后隐藏程序化太阳/云/山（水彩画自带这些元素） */
.splash-sky .sun, .splash-sky .cloud, .splash-sky .splash-range { display: none; }
.splash-sky::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 36%;
  background: linear-gradient(180deg, rgba(253, 243, 215, 0), rgba(253, 243, 215, .94));
}
.sun {
  position: absolute;
  top: 9%;
  right: 14%;
  width: clamp(64px, 12vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fdf0c2, #f3ce7e 62%, #eab95f);
  box-shadow: 0 0 60px 18px rgba(243, 200, 120, .55);
  animation: sunRise 2.6s var(--ease) both;
}
@keyframes sunRise {
  from { transform: translateY(60px) scale(.9); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.cloud {
  position: absolute;
  background: rgba(255, 255, 255, .85);
  border-radius: var(--r-pill);
  filter: blur(1px);
}
.cloud-1 { width: 150px; height: 34px; top: 18%; left: 8%; animation: drift 26s linear infinite; }
.cloud-2 { width: 110px; height: 26px; top: 30%; left: 58%; animation: drift 34s linear infinite; }
.cloud-3 { width: 90px; height: 22px; top: 12%; left: 42%; animation: drift 40s linear infinite; }
@keyframes drift {
  from { transform: translateX(-20vw); }
  to   { transform: translateX(110vw); }
}
.splash-range { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; }
.mountain.back  { fill: #a9cfc0; opacity: .9; }
.mountain.mid   { fill: #7fae9c; opacity: .95; }
.mountain.front { fill: #5e9279; }

.splash-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 24px 20px 42px;
  text-align: center;
}
#splash-xs { width: clamp(130px, 30vw, 190px); }
.splash-title {
  font-size: clamp(30px, 8vw, 46px);
  font-weight: 800;
  color: var(--forest-deep);
  letter-spacing: .04em;
  text-shadow: 0 2px 0 rgba(255, 248, 236, .8);
}
.splash-tag { color: var(--gray); font-size: 16px; margin-bottom: 14px; }
.splash-go { margin-top: 6px; font-size: 20px; min-width: 220px; }
.splash-skip {
  margin-top: 10px;
  color: var(--gray);
  font-size: 14px;
  padding: 8px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  cursor: pointer;
}
.splash-skip:hover { color: var(--forest-deep); }

/* ════════════ 晓声（角色 + 气泡） ════════════ */
.xs-holder { position: relative; }

/* ===== 晓声 PNG 素材模式（3D 竖版手办：完整显示不裁切） ===== */
.xs-png-wrap { position: relative; width: 100%; max-width: 190px; height: 168px; margin: 0 auto;
  display: flex; align-items: flex-end; justify-content: center; }
.xs-png { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center bottom;
  display: block; border-radius: 0; box-shadow: none; }
.xs-png-halo { position: absolute; top: -18px; left: -18px; right: -18px; bottom: -18px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(243, 226, 164, .5) 0%, rgba(243, 226, 164, 0) 70%);
  opacity: .5; transition: opacity .6s var(--ease); }
.xs-png-mark { position: absolute; top: 6%; right: 4%; font-size: 1.5rem; color: #e8b04b; opacity: 0;
  transition: opacity .8s var(--ease); text-shadow: 0 0 10px rgba(232, 176, 75, .7); }
/* F-07：3D 手办姿态由 data-pose 换图实现，不用 transform 扭曲（与 breathe 抢 transform） */
.xs-png-wrap.breathe .xs-png { animation: xsBreathe 3.4s ease-in-out infinite; }
@keyframes xsBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
/* 成长形态：切换动画 + 各形态专属发光（6 阶：种子→小芽→开花→星光→初鹿→鹿） */
.xs-png-wrap.form-in .xs-png { animation: xsFormIn .65s var(--ease); }
/* 进化仪式：旧形态缩小淡出 + 金色光爆（通关成长动画） */
.xs-png-wrap.xs-evolve-out .xs-png { animation: xsEvolveOut .36s var(--ease) both; }
@keyframes xsEvolveOut { from { transform: scale(1); opacity: 1; } to { transform: scale(.4) rotate(-10deg); opacity: 0; } }
.xs-evolve-flash { position: absolute; inset: -34%; border-radius: 50%; pointer-events: none; z-index: 4;
  background: radial-gradient(circle, rgba(255,248,224,.98) 0%, rgba(243,206,126,.75) 42%, rgba(243,206,126,0) 72%);
  animation: xsFlash .68s var(--ease) both; }
@keyframes xsFlash { 0% { transform: scale(.25); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .xs-evolve-flash, .xs-png-wrap.xs-evolve-out .xs-png { animation: none; } }
@keyframes xsFormIn {
  0% { transform: scale(.55) rotate(-6deg); opacity: 0; }
  55% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.xs-png-wrap[data-form="sprout"] .xs-png { filter: drop-shadow(0 0 8px rgba(143, 208, 163, .5)); }
.xs-png-wrap[data-form="bloom"] .xs-png { filter: drop-shadow(0 0 12px rgba(255, 200, 130, .6)); }
.xs-png-wrap[data-form="spark"] .xs-png { filter: drop-shadow(0 0 16px rgba(232, 176, 75, .7)); }
.xs-png-wrap[data-form="fawn"] .xs-png { filter: drop-shadow(0 0 18px rgba(232, 176, 75, .78)); }
.xs-png-wrap[data-form="deer"] .xs-png { filter: drop-shadow(0 0 22px rgba(232, 176, 75, .9)); }
.xs-png-wrap[data-form="deer"] .xs-png-halo { opacity: .95; }
/* 蜕变小鹿：金色进化粒子（fawn→deer 星光爆发） */
.xs-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3cf, #e8b04b 55%, transparent);
  box-shadow: 0 0 10px rgba(232, 176, 75, .8);
  pointer-events: none;
  z-index: 3;
  animation: xsBurst 1.1s ease-out forwards;
  animation-delay: var(--bd);
}
@keyframes xsBurst {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--bx)), calc(-50% + var(--by))) scale(.15); opacity: 0; }
}
/* 地图晓声脚下：成长形态小标签 */
.xs-form-tag {
  display: inline-block;
  margin: 6px auto 0;
  padding: 2px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #6b4a12;
  background: linear-gradient(170deg, #fffdf4, #f7ecd6);
  border: 1.5px solid rgba(154, 87, 24, .3);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(56, 94, 74, .12);
  letter-spacing: .04em;
}
.xs-form-tag::before { content: "✦ "; color: var(--gold); }

/* ===== 山谷背景（水彩 valley.png，地图） ===== */
#view-map {
  background:
    linear-gradient(180deg, rgba(220,239,251,.25), rgba(232,243,216,.45)),
    url(../assets/valley.webp) center / cover no-repeat;
}
#view-map .map-shell { position: relative; z-index: 2; }

.xs { width: 100%; height: auto; overflow: visible; }
.xs .xs-halo { opacity: .55; transition: opacity .6s var(--ease); }
.xs .xs-mark { opacity: 0; transform-origin: 110px 128px; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.xs .xs-mark.spin-soft { animation: markSpin 9s linear infinite; }
@keyframes markSpin { to { transform: rotate(360deg); } }

/* 表情：默认 calm（圆眼 + 微笑） */
.xs .xs-arc, .xs .xs-mouth-open, .xs .xs-mouth-o, .xs .xs-mouth-flat, .xs .xs-dots { opacity: 0; }
.xs .xs-brow { opacity: 0; }
.xs[data-exp="happy"] .xs-eye { opacity: 0; }
.xs[data-exp="happy"] .xs-arc { opacity: 1; }
.xs[data-exp="happy"] .xs-mouth-smile { opacity: 0; }
.xs[data-exp="happy"] .xs-mouth-open { opacity: 1; }
.xs[data-exp="happy"] .xs-brow { opacity: 0; }

.xs[data-exp="thinking"] .xs-mouth-smile { opacity: 0; }
.xs[data-exp="thinking"] .xs-mouth-flat { opacity: 1; }
.xs[data-exp="thinking"] .xs-dots { opacity: 1; }
.xs[data-exp="thinking"] .xs-brow-l { opacity: 1; transform: rotate(-8deg); transform-origin: 86px 104px; }
.xs[data-exp="thinking"] .xs-brow-r { opacity: 1; transform: rotate(6deg); transform-origin: 134px 102px; }

.xs[data-exp="surprised"] .xs-eye { transform: scale(1.25); transform-origin: center; }
.xs[data-exp="surprised"] .xs-mouth-smile { opacity: 0; }
.xs[data-exp="surprised"] .xs-mouth-o { opacity: 1; }
.xs[data-exp="surprised"] .xs-brow { opacity: 1; transform: translateY(-3px); }

.xs[data-exp="encourage"] .xs-eye { opacity: 0; }
.xs[data-exp="encourage"] .xs-arc { opacity: 1; }
.xs[data-exp="encourage"] .xs-mouth-smile { opacity: 0; }
.xs[data-exp="encourage"] .xs-mouth-open { opacity: 1; }

.xs[data-exp="calm"] .xs-brow { opacity: 0; }

/* 呼吸 + 漂浮（晓声常驻时） */
.xs-holder.xs-breathe .xs { animation: xsBreathe 3.4s ease-in-out infinite; }
@keyframes xsBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.022); }
}
.xs-holder.xs-float .xs { animation: xsFloat 4.2s ease-in-out infinite; }
@keyframes xsFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* 对话气泡 */
.xs-bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  min-width: 150px;
  max-width: 300px;
  background: var(--cream);
  color: var(--ink);
  padding: 12px 16px 14px;
  border-radius: 20px 20px 20px 6px;
  box-shadow: var(--shadow);
  font-size: 15.5px;
  line-height: 1.7;
  align-items: center;
  gap: 2px;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
  z-index: 5;
}
.xs-bubble.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.xs-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 26px;
  border: 8px solid transparent;
  border-top-color: var(--cream);
  border-bottom: 0;
}
.xs-caret {
  width: 2px;
  height: 1.05em;
  background: var(--forest);
  animation: caretBlink .9s steps(1) infinite;
  flex: none;
}
/* 打完一句话后隐藏光标，避免一直闪烁 */
.xs-bubble.done .xs-caret { opacity: 0; animation: none; }
@keyframes caretBlink { 50% { opacity: 0; } }

/* 萤火粒子 */
.firefly-layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 3; }
.firefly {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8d8 0%, #f3ce7e 55%, rgba(243, 206, 126, 0) 75%);
  opacity: 0;
  animation: fireflyFloat var(--ff-dur, 6s) ease-in-out var(--ff-delay, 0s) infinite;
}
@keyframes fireflyFloat {
  0%   { opacity: 0; transform: translate(0, 0) scale(.7); }
  20%  { opacity: .85; }
  50%  { opacity: .4; transform: translate(var(--ff-drift, 12px), -26px) scale(1); }
  75%  { opacity: .85; }
  100% { opacity: 0; transform: translate(calc(var(--ff-drift, 12px) * -0.6), 14px) scale(.7); }
}

/* ════════════ 山谷地图 ════════════ */
.map-wrap {
  padding: 8px clamp(10px, 3vw, 24px) 32px;
  display: flex;
  justify-content: center;
}
.map-scene {
  position: relative;
  width: 92vw;
  width: min(92vw, 560px);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  /* 水彩山谷作为地图场景主背景（替代旧 SVG 天空） */
  background:
    linear-gradient(rgba(220, 239, 251, .06), rgba(232, 243, 216, .08)),
    url(../assets/valley.webp) center / cover;
}
/* 高度撑开：padding-top hack（5:8 → 160%）。
   任何浏览器/WebView 都支持；不依赖 aspect-ratio（它在 flex 容器里计算不可靠）。 */
.map-scene::before {
  content: "";
  display: block;
  padding-top: 160%;
}
/* 旧 SVG 只保留寻宝小路，其余视觉元素隐藏（水彩画接管场景）
   注意：SVG 本身就带 class="map-bg"（<svg class="map-bg">），选择器必须是 svg.map-bg */
/* 背景旧寻宝小路隐藏（节点连线层已接管流程动线） */
svg.map-bg #trail,
svg.map-bg #trail-core { display: none; }
svg.map-bg > *:not(#trail):not(#trail-core) { display: none; }
.map-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.map-scene .map-bg .map-clouds { animation: cloudPuff 12s ease-in-out infinite alternate; }
@keyframes cloudPuff {
  from { transform: translateX(-6px); }
  to   { transform: translateX(6px); }
}

.map-xs {
  position: absolute;
  z-index: 6;
  width: 21%;
  left: 72%;   /* 右下角默认位，不挡中央/顶部关卡节点 */
  bottom: 12%;
}
.map-xs .xs { filter: drop-shadow(0 10px 16px rgba(31, 74, 55, .25)); }

/* 地点节点 */
#view-map .locs { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 8; }
.loc-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 92px;
}
.loc-dot {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #7bb98f, #4b8a68 70%);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 3px rgba(232, 176, 75, .28), var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  color: var(--cream);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.loc-node:hover .loc-dot,
.loc-node:focus-visible .loc-dot { box-shadow: 0 0 0 5px rgba(232, 176, 75, .6), var(--shadow-sm); }
.loc-node:active .loc-dot { transform: scale(.94); }
.loc-node.completed .loc-dot {
  background: radial-gradient(circle at 34% 30%, #f6d693, var(--gold) 70%);
  color: #6b4a12;
  box-shadow: 0 0 0 3px rgba(255, 248, 236, .9), 0 0 22px 6px rgba(232, 176, 75, .55);
}
.loc-label {
  background: rgba(255, 248, 236, .94);
  color: var(--forest-deep);
  font-weight: 700;
  font-size: 14px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  pointer-events: none;
}
.loc-sub {
  background: rgba(45, 99, 73, .82);
  color: #fdfaf0;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease);
  pointer-events: none;
}
.loc-node:hover .loc-sub,
.loc-node:focus-visible .loc-sub { opacity: 1; transform: translateY(0); }

.map-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3%;
  display: flex;
  justify-content: center;
  z-index: 9;
  padding: 0 10px;
  pointer-events: none;
}
.map-concert-btn {
  pointer-events: auto;
  min-height: 46px;
  font-size: 15px;
  box-shadow: 0 5px 0 #c98e2f, var(--shadow-sm);
}

/* —— 地点总览面板 —— */
.loc-panel {
  width: min(520px, 100%);
  max-height: 88dvh;
  overflow: auto;
  background: var(--cream);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: viewIn .35s var(--ease) both;
}
.loc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.loc-panel-title { font-size: 22px; font-weight: 800; color: var(--forest-deep); }
.loc-panel-sub { color: var(--gray); font-size: 14px; }
.loc-levels { display: flex; flex-direction: column; gap: 12px; }
.loc-level {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 10px 16px;
  border-radius: 20px;
  background: #fffdf4;
  border: 2px solid rgba(45, 99, 73, .12);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), border-color var(--t-fast);
}
.loc-level:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 176, 75, .35); }
.loc-level:active { transform: translateY(3px); }
.loc-level.done { background: linear-gradient(135deg, #fdf6e2, var(--gold-pale)); border-color: var(--gold); }
.loc-level-ico {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--forest);
  color: #fdfaf0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}
.loc-level.done .loc-level-ico { background: var(--gold); color: #6b4a12; }
.loc-level-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.loc-level-txt b { font-size: 17px; color: var(--forest-deep); }
.loc-level-txt small { font-size: 12.5px; color: var(--gray); }
.loc-level-theory {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--stream-deep);
  background: rgba(111, 183, 232, .16);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.loc-level-go {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(45, 99, 73, .1);
  color: var(--forest-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

/* —— 记谱空态 —— */
.staff-empty { text-align: center; color: var(--gray); padding: 30px 10px; }

/* ════════════ 关卡舞台 ════════════ */
.stage {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 4px 14px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* 山谷远景淡叠：与主界面水彩统一 */
  background:
    linear-gradient(rgba(220, 239, 251, .30), rgba(232, 243, 216, .50)),
    url(../assets/valley.webp) center / cover no-repeat;
}
.stage-xs { width: min(170px, 40vw); }
.stage-xs-holder .xs { filter: drop-shadow(0 8px 12px rgba(31, 74, 55, .22)); }
/* 舞台气泡显示在晓声下方（避免溢出屏顶） */
.stage-xs-holder .xs-bubble {
  top: calc(100% + 8px);
  bottom: auto;
  transform: translateX(-50%) translateY(-8px);
  border-radius: 20px 20px 6px 20px;
}
.stage-xs-holder .xs-bubble.show { transform: translateX(-50%) translateY(0); }
.stage-xs-holder .xs-bubble::after {
  top: auto;
  bottom: 100%;
  border-top: 0;
  border-bottom: 8px solid var(--cream);
  left: 26px;
}
#cz-result:empty { display: none; }
.stage-body {
  width: 100%;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stage-panel {
  position: relative;
  width: 100%;
  border-radius: 26px 20px 28px 22px; /* 手绘感不规则圆角 */
  background:
    linear-gradient(rgba(255, 250, 240, .82), rgba(255, 250, 240, .86)),
    url(../assets/scroll.webp) center / cover;
  box-shadow: 0 12px 26px rgba(56, 94, 74, .16), var(--shadow-sm);
  padding: clamp(14px, 4vw, 24px);
  border: 2px solid rgba(154, 87, 24, .18); /* 手绘本页描边 */
}
/* 内层手绘虚线框：像本子上画的一页 */
.stage-panel::before {
  content: "";
  position: absolute;
  top: 9px; left: 9px; right: 9px; bottom: 9px;
  border: 2px dashed rgba(154, 87, 24, .13);
  border-radius: 20px 14px 22px 16px;
  pointer-events: none;
}
.stage-panel > * { position: relative; z-index: 1; }
.stage-panel.stage-scene {
  background:
    linear-gradient(rgba(255, 250, 240, .72), rgba(255, 250, 240, .78)),
    url(../assets/level_pitch.webp) center / cover,
    url(../assets/scroll.webp) center / cover;
}
.stage-intro {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--forest-deep);
  margin-bottom: 12px;
}
.stage-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fffdf4;
  border: 2px solid rgba(45, 99, 73, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--gray);
  box-shadow: 0 2px 0 rgba(45, 99, 73, .15);
  transition: all var(--t-fast) var(--ease);
}
.step-dot.done { background: var(--forest); border-color: var(--forest); color: #fdfaf0; box-shadow: none; }
.step-dot.current { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 176, 75, .4); color: var(--forest-deep); }

/* —— 听辨按钮（高/低 · 一样/不一样） —— */
.listen-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.answer-btn {
  min-width: 150px;
  min-height: 76px;
  padding: 12px 24px;
  border-radius: 30px 22px 26px 20px / 24px 30px 20px 26px; /* 手绘水彩按钮 */
  font-size: 20px;
  font-weight: 800;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink);
  background: linear-gradient(175deg, #fffdf4, #fbf3e0);
  border: 2.5px solid rgba(45, 99, 73, .75);
  box-shadow: 0 5px 0 rgba(45, 99, 73, .6), 0 10px 18px rgba(56, 94, 74, .14);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.answer-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(45, 99, 73, .6); }
.answer-btn .answer-sub { font-size: 13px; font-weight: 700; opacity: .92; }
.answer-btn.up { border-color: rgba(79, 155, 212, .9); color: #17435f; box-shadow: 0 5px 0 rgba(79, 155, 212, .55), 0 10px 18px rgba(56, 94, 74, .14); }
.answer-btn.up:active { box-shadow: 0 1px 0 rgba(79, 155, 212, .55); }
.answer-btn.down { border-color: rgba(45, 99, 73, .9); }
.answer-btn.berry { border-color: rgba(217, 122, 142, .9); color: #7c3a4c; box-shadow: 0 5px 0 rgba(217, 122, 142, .55), 0 10px 18px rgba(56, 94, 74, .14); }
.answer-btn.berry:active { box-shadow: 0 1px 0 rgba(217, 122, 142, .55); }

/* 视觉辅助：两个音的小鸟 */
.note-visual {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 20px;
  min-height: 150px;
  margin: 8px 0;
}
.note-visual .nv-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 120px;
}
.nv-bird { width: 44px; height: 44px; transition: transform .5s var(--ease); }
.nv-bird .bird-body { fill: var(--berry-soft); stroke: var(--berry); stroke-width: 2.5; }
.nv-bird .bird-beak { fill: var(--gold); }
.nv-bird .bird-eye { fill: var(--ink); }
.nv-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--forest-deep);
  background: #fffdf4;
  border: 1.5px solid rgba(45, 99, 73, .22);
  padding: 4px 14px;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 6px rgba(56, 94, 74, .10);
}
.nv-label.playing { background: var(--gold-pale); }

/* —— 大鼓 —— */
.drum-pad {
  position: relative;
  width: min(240px, 62vw);
  aspect-ratio: 1.35;
  margin: 10px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #e9a86f, var(--mud) 62%, var(--mud-deep));
  box-shadow: 0 12px 0 var(--mud-deep), var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast) var(--ease);
}
.drum-pad::before {
  content: "";
  position: absolute;
  top: 8%; left: 8%; right: 8%; bottom: 8%;
  border-radius: 50%;
  background: rgba(255, 248, 236, .28);
}
.drum-pad.beat {
  transform: scale(1.06);
  box-shadow: 0 12px 0 var(--mud-deep), 0 0 34px 10px rgba(232, 176, 75, .7);
}
.drum-label {
  position: relative;
  color: #fff3e2;
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 2px 0 rgba(120, 74, 40, .5);
}
.drum-beats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.drum-beats .beat-slot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px dashed rgba(45, 99, 73, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: transparent;
}
.drum-beats .beat-slot.hit {
  border-style: solid;
  border-color: var(--gold);
  background: var(--gold-pale);
  color: #6b4a12;
  box-shadow: 0 0 12px 3px rgba(232, 176, 75, .45);
}

/* —— 认识音符 · 山果 —— */
.note-fireflies {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 2px 0 12px;
  min-height: 44px;
}
.note-fireflies img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(232, 176, 75, .4);
  animation: fireflyFloat 2.6s var(--ease) infinite;
}
.note-fireflies img:nth-child(2) { animation-delay: .5s; width: 32px; height: 32px; }
.note-fireflies img:nth-child(3) { animation-delay: 1s; width: 36px; height: 36px; }
@keyframes fireflyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.fruit-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.fruit {
  width: 78px;
  height: 88px;
  border-radius: 24px 20px 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(170deg, #fffdf4, #f7ecd6);
  box-shadow: 0 5px 0 rgba(154, 87, 24, .16), var(--shadow-sm);
  border: 2px solid rgba(154, 87, 24, .22);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast);
}
.fruit:hover { box-shadow: 0 0 0 3px rgba(232, 176, 75, .5), 0 5px 0 rgba(154, 87, 24, .16); }
.fruit:active { transform: translateY(4px); }
.fruit .fruit-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: #fdfaf0;
  background: var(--forest);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08);
}
.fruit .fruit-sol { font-size: 14px; font-weight: 700; color: var(--gray); }
.fruit.correct { background: var(--gold-pale); border-color: var(--gold); animation: fruitPop .5s var(--ease); }
.fruit.wrong { animation: fruitShake .4s var(--ease); }
@keyframes fruitPop { 0% { transform: scale(1); } 45% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes fruitShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

/* —— 网格作曲 —— */
.compose-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.chip {
  min-height: 44px;
  padding: 6px 16px;
  border-radius: 18px 14px 20px 12px;
  background: #fffdf4;
  color: var(--forest-deep);
  font-weight: 700;
  font-size: 14.5px;
  border: 2px solid rgba(45, 99, 73, .3);
  box-shadow: 0 3px 0 rgba(45, 99, 73, .16);
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { box-shadow: 0 0 0 3px rgba(232, 176, 75, .4), 0 3px 0 rgba(45, 99, 73, .16); }
.chip.on { background: var(--forest); border-color: var(--forest-deep); color: #fdfaf0; box-shadow: 0 3px 0 var(--forest-deep); }

.grid {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 22px 18px 24px 16px;
  background:
    linear-gradient(rgba(255, 250, 240, .88), rgba(248, 240, 220, .9)),
    url(../assets/scroll.webp) center / cover;
  box-shadow: var(--shadow);
  border: 2px solid rgba(154, 87, 24, .16);
  overflow-x: auto;
}
.grid-inner { min-width: 520px; } /* 保证手机端每格 ≥44px 触控目标 */
.grid-row { display: grid; grid-template-columns: 42px repeat(8, 1fr); gap: 5px; align-items: center; }
.grid-note {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--forest-deep);
  font-size: 15px;
}
.grid-cell {
  aspect-ratio: 1.15;
  min-height: 44px;
  border-radius: 14px;
  background: rgba(232, 176, 75, .10);
  border: 2px solid rgba(45, 99, 73, .16);
  transition: background var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.grid-cell:hover { box-shadow: 0 0 0 3px rgba(232, 176, 75, .45); }
.grid-cell.on {
  background: radial-gradient(circle at 35% 30%, #8fd0a3, var(--forest) 80%);
  border-color: var(--forest-deep);
  box-shadow: 0 4px 10px rgba(45, 99, 73, .35), inset 0 -3px 0 rgba(0, 0, 0, .1);
}
/* 每格记住自己的音色→颜色：绿=小鸟 / 金=风铃 / 蓝=溪水 / 红=木琴（换音色不影响已填格） */
.grid-cell.on[data-inst="bell"] {
  background: radial-gradient(circle at 35% 30%, #f6dc9a, #e8b04b 80%);
  border-color: #c98a2e;
  box-shadow: 0 4px 10px rgba(154, 87, 24, .35), inset 0 -3px 0 rgba(0, 0, 0, .1);
}
.grid-cell.on[data-inst="water"] {
  background: radial-gradient(circle at 35% 30%, #9fd2f0, #4f9bd4 80%);
  border-color: #2f6f9f;
  box-shadow: 0 4px 10px rgba(31, 99, 133, .35), inset 0 -3px 0 rgba(0, 0, 0, .1);
}
.grid-cell.on[data-inst="piano"] {
  background: radial-gradient(circle at 35% 30%, #eeb2c0, #d97a8e 80%);
  border-color: #a84f68;
  box-shadow: 0 4px 10px rgba(151, 64, 87, .35), inset 0 -3px 0 rgba(0, 0, 0, .1);
}
.grid-cell.playing {
  animation: cellPulse .35s var(--ease);
}
@keyframes cellPulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 176, 75, .8); }
  100% { box-shadow: 0 0 0 12px rgba(232, 176, 75, 0); }
}

.compose-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

/* 音乐人格卡 */
.personality-card {
  width: 100%;
  max-width: 520px;
  margin: 12px auto 0;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #fff8ec, #fdeed3);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  animation: viewIn .5s var(--ease) both;
}
.personality-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(154, 87, 24, .18);
}
.personality-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.personality-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--forest-deep);
}
.personality-desc { color: var(--ink); margin: 6px 0 10px; }
.personality-vision {
  display: inline-block;
  background: var(--forest);
  color: #fdfaf0;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 15px;
}

/* 音乐会（作品墙） */
.concert {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 10px 16px 40px;
}
.concert-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
  font-size: 17px;
  line-height: 2;
}
.work-card {
  background: var(--cream);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}
.work-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.work-title { font-weight: 800; color: var(--forest-deep); font-size: 18px; }
.work-badge {
  font-size: 13px;
  font-weight: 700;
  color: #6b4a12;
  background: var(--gold-pale);
  padding: 4px 12px;
  border-radius: var(--r-pill);
}
.work-staff { border-radius: var(--r-md); overflow: hidden; background: #fffdf4; }
.work-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* ════════════ 五线谱出口 ════════════ */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: rgba(31, 74, 55, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .3s var(--ease) both;
}
.overlay[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.staff-panel {
  width: min(640px, 100%);
  max-height: 92dvh;
  overflow: auto;
  border-radius: var(--r-lg);
  background:
    linear-gradient(rgba(255, 250, 240, .86), rgba(255, 250, 240, .86)),
    url(../assets/scroll.webp) center / cover;
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
  animation: viewIn .35s var(--ease) both;
}
.staff-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.staff-panel-title { font-size: 22px; font-weight: 800; color: var(--forest-deep); }
.staff-xs { width: 120px; margin: 0 auto 6px; }
.staff-canvas {
  background: #fffdf4;
  border-radius: var(--r-md);
  padding: 6px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
}
.staff-canvas svg { max-width: 100%; height: auto; }
.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}
.staff-note {
  margin-top: 12px;
  text-align: center;
  color: var(--gray);
  font-size: 13.5px;
}

/* ════════════ 通关庆祝 ════════════ */
.celebrate {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--sky-top), var(--mist) 60%, var(--sky-low));
  overflow: hidden;
}
.celebrate-xs { width: clamp(120px, 26vw, 170px); }
.celebrate-title { font-size: clamp(26px, 6vw, 36px); font-weight: 800; color: var(--forest-deep); }
.celebrate-line { color: var(--ink); font-size: 17px; max-width: 480px; }
.celebrate-points {
  margin: 8px 0;
  font-size: 22px;
  font-weight: 800;
  color: #6b4a12;
  background: var(--gold-pale);
  padding: 8px 22px;
  border-radius: var(--r-pill);
}
/* 通关主题曲（全部点亮后响起） */
.celebrate-song {
  max-width: 520px;
  background:
    linear-gradient(rgba(255, 250, 240, .9), rgba(255, 250, 240, .9)),
    url(../assets/scroll.webp) center / cover;
  border: 2px solid rgba(154, 87, 24, .18);
  border-radius: 20px 16px 22px 14px;
  padding: 12px 18px;
  box-shadow: var(--shadow-sm);
  animation: viewIn .5s var(--ease) both;
}
.celebrate-song-name { font-size: 18px; font-weight: 800; color: var(--forest-deep); }
.celebrate-song-lyrics { margin-top: 4px; color: var(--ink); font-size: 15px; line-height: 1.9; }
.confetti { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.confetti i {
  position: absolute;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  opacity: 0;
  animation: confettiFall 3s ease-in infinite;
}
@keyframes confettiFall {
  0%   { transform: translateY(-40px) rotate(0); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateY(105dvh) rotate(720deg); opacity: .6; }
}

/* ════════════ 积分飘字 ════════════ */
.points-toast {
  position: fixed;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  z-index: 80;
  background: var(--gold);
  color: #4a3610;
  font-weight: 800;
  font-size: 20px;
  padding: 10px 24px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
}
.points-toast.show {
  animation: toastFly 1.4s var(--ease) both;
}
@keyframes toastFly {
  0%   { opacity: 0; transform: translate(-50%, 12px) scale(.85); }
  18%  { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  70%  { opacity: 1; transform: translate(-50%, -22px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -46px) scale(.9); }
}

/* ════════════ 动效降级 & 响应式 ════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 640px) {
  .answer-btn { min-width: 132px; min-height: 70px; font-size: 18px; }
  .fruit { width: 64px; height: 78px; }
  .grid-row { grid-template-columns: 36px repeat(8, 1fr); gap: 5px; }
  .grid { padding: 8px; gap: 6px; }
  .grid-cell { border-radius: 9px; }
  .grid-inner { min-width: 500px; }
  .topbar-title { font-size: 16px; }
  .loc-node { width: 76px; }
  .loc-dot { width: 54px; height: 54px; font-size: 23px; }
  .loc-label { font-size: 12.5px; padding: 4px 10px; }
  .map-xs { width: 26%; }
}
