/* 浦漫少儿数学 — 设计系统
   风格锚点：米黄纸感 + 圆角卡片 + 沙漠仙人掌场景
   色板：奶油底 / 墨色字 / 糖果黄主强调
*/

:root {
  --bg: #fff6e0;
  --bg-soft: #fff9ec;
  --bg-deep: #f5e6c0;
  --ink: #2b2118;
  --ink-soft: #6b5a48;
  --ink-faint: #a89880;
  --card: #fffdf7;
  --card-border: rgba(120, 90, 40, 0.08);
  --accent: #ffd43b;
  --accent-deep: #f5b400;
  --orange: #ff9f43;
  --teal: #3ddc97;
  --sky: #5b9cff;
  --pink: #ff6b9d;
  --purple: #a78bfa;
  --danger: #ff6b6b;
  --shadow: 0 10px 30px rgba(120, 80, 20, 0.10);
  --shadow-soft: 0 4px 16px rgba(120, 80, 20, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --tab-h: 72px;
  --top-h: 60px;
  --max-w: 1200px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background:
    radial-gradient(1200px 500px at 10% -10%, #fff9ec 0%, transparent 55%),
    radial-gradient(900px 420px at 90% 10%, #ffe9b8 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}
button, input { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible, input:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.app {
  min-height: 100vh;
  position: relative;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 48px);
}
/* 全屏背景层（3D卡通，本机qwen出图） */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 246, 224, 0.34), rgba(255, 246, 224, 0.52));
}
.bg-layer.bg-home { background-image: url(../assets/bg-home.webp); }
.bg-layer.bg-free { background-image: url(../assets/bg-free.webp); }
.bg-layer.bg-me { background-image: url(../assets/bg-me.webp); }
.bg-layer.bg-play { background-image: url(../assets/bg-play.webp); }
/* 答题页吉祥物（大屏显示，随呼吸浮动） */
.play-mascot {
  position: fixed;
  right: 14px;
  bottom: 10px;
  width: clamp(96px, 11vw, 150px);
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(90, 60, 10, 0.18));
  animation: mascot-bob 3.2s ease-in-out infinite;
}
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (max-width: 900px) {
  .play-mascot { display: none; }
}
/* 竖屏（手机/平板竖版）：贴左侧展示装饰更饱满 */
@media (orientation: portrait) {
  .bg-layer {
    background-size: auto 100%;
    background-position: left top;
  }
}

/* ========== 顶部条 ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  max-width: var(--max-w);
  margin: 0 auto;
  background: linear-gradient(to bottom, rgba(255,246,224,0.96), rgba(255,246,224,0.72), transparent);
  backdrop-filter: blur(8px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.brand-text {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
  font-size: 15px;
  border: 1.5px solid var(--card-border);
}
.coin-pill.small { padding: 6px 10px; font-size: 13px; }
.coin { font-size: 16px; line-height: 1; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 18px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--card-border);
}

/* ========== 布局 ========== */
.main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px 18px 28px;
  position: relative;
  z-index: 2;
}
.page { animation: fadeIn 0.28s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ========== 首页 Hero ========== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 8px;
  align-items: center;
  padding: 28px 24px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, #fff3c4 0%, #ffe08a 48%, #ffd43b 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  min-height: 240px;
}
.hero-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #7a5a10;
  letter-spacing: 0.04em;
}
.hero-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  font-weight: 900;
}
.hero-sub {
  margin: 0 0 20px;
  color: #5c4410;
  font-size: 15px;
  line-height: 1.55;
  max-width: 34ch;
}
.hero-art {
  position: relative;
  min-height: 200px;
  border-radius: 22px;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(120, 80, 20, 0.18);
}
.hero-orb {
  position: absolute;
  inset: 10% 12%;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  box-shadow: inset 0 -10px 30px rgba(255,255,255,0.35);
}
.hero-num {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  background: var(--card);
}
.hero-num.n1 { top: 12%; left: 8%; background: #fff; color: var(--pink); transform: rotate(-8deg); }
.hero-num.n2 { top: 28%; right: 10%; background: #fff; color: var(--sky); transform: rotate(7deg); }
.hero-num.n3 { bottom: 12%; left: 28%; background: var(--ink); color: var(--accent); transform: rotate(-3deg); width: 78px; height: 78px; font-size: 32px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #ffe270, #ffd43b);
  color: var(--ink);
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 8px 0 #e8b800, var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  border: 2px solid rgba(255,255,255,0.35);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #e8b800, var(--shadow-soft);
}
.btn-primary.btn-block { width: 100%; margin-top: 18px; }
.btn-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 0 #e8b800;
}

/* ========== 区块 ========== */
.section { margin-top: 32px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}
.section-head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}
.page-title-row { margin: 8px 0 18px; }
.page-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 900;
}
.page-desc {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

/* 学习路径条 */
.path-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.path-card {
  --card-img: none;
  text-align: left;
  padding: 16px;
  border-radius: var(--radius);
  background-color: var(--card);
  background-image: var(--card-img);
  background-size: cover;
  background-position: center;
  border: 1.5px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.path-card[data-cat="sense"] { --card-img: url(../assets/path-sense.webp); }
.path-card[data-cat="basic"] { --card-img: url(../assets/path-basic.webp); }
.path-card[data-cat="adv"] { --card-img: url(../assets/path-adv.webp); }
.path-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43, 33, 24, 0.82) 0%, rgba(43, 33, 24, 0.46) 48%, rgba(43, 33, 24, 0) 78%);
  pointer-events: none;
}
.path-card > * {
  position: relative;
  z-index: 1;
}
.path-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  opacity: 0.85;
}
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.path-card h3 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.path-card p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.path-card .path-bar {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  background: #f0e6d0;
  overflow: hidden;
}
.path-card .path-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}/* 推荐 */
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* 模块卡片 */
.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.module-card {
  position: relative;
  text-align: left;
  padding: 0;
  border-radius: var(--radius);
  background: var(--card);
  border: 1.5px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  display: block;
}
.module-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.module-thumb {
  position: absolute;
  inset: 0;
  height: auto;
  border-radius: 0;
  display: grid;
  place-items: center;
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 900;
  overflow: hidden;
}
.module-thumb.has-img {
  background: #fff8e8;
}
.module-thumb.has-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.module-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56%;
  background: linear-gradient(to top, rgba(43, 33, 24, 0.74), rgba(43, 33, 24, 0));
  pointer-events: none;
}
.module-card h3 {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 38px;
  margin: 0;
  z-index: 1;
  padding: 0;
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 900;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.module-card .status {
  position: absolute;
  left: 12px;
  bottom: 10px;
  margin: 0;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f3ead6;
  color: var(--ink-soft);
}
.module-card .status.done {
  background: #d9f7e7;
  color: #158a56;
}
.module-card .status.doing {
  background: #fff1c9;
  color: #a56b00;
}
.module-card .status.new {
  background: #eee8ff;
  color: #5b45c9;
}

/* 分类 tabs */
.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--card);
  border: 1.5px solid var(--card-border);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-soft);
}
.cat-chip.active {
  background: var(--ink);
  color: var(--accent);
  border-color: var(--ink);
}

/* ========== 我的 ========== */
.me-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7d6, #ffe9a8);
  box-shadow: var(--shadow-soft);
}
.me-avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: var(--shadow-soft);
}
.me-name {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}
.me-sub {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.stat-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1.5px solid var(--card-border);
  text-align: center;
}
.stat-card .num {
  font-size: 26px;
  font-weight: 900;
}
.stat-card .label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}
.recent-list, .settings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.recent-item, .setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1.5px solid var(--card-border);
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
}
.setting-row input[type="checkbox"] {
  width: 48px;
  height: 28px;
  accent-color: var(--teal);
}
.setting-row.danger { color: var(--danger); }
.chev { color: var(--ink-faint); font-size: 20px; }

/* 首页 · 继续学习 */
.page-home > .section:first-child {
  margin-top: 10px;
}
.continue-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(rgba(255, 252, 244, 0.55), rgba(255, 252, 244, 0.55)), url(../assets/card-continue.webp) center / cover;
  border: 2.5px solid var(--accent-deep);
  box-shadow: 0 5px 0 #e8c84a;
}
.continue-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 240px;
  min-width: 0;
}
.continue-thumb {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: #fffdf7;
  border: 2px solid #f0d67a;
  overflow: hidden;
  flex: 0 0 auto;
}
.continue-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.continue-text {
  min-width: 0;
  flex: 1;
}
.continue-text h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}
.continue-text p {
  margin: 4px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
/* 首页 · 推荐玩法「更多」 */
.more-btn {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid var(--accent-deep);
  box-shadow: 0 3px 0 var(--accent-deep);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.more-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--accent-deep);
}

/* 首页 · 学习历程 */
.history-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(rgba(240, 246, 255, 0.52), rgba(240, 246, 255, 0.52)), url(../assets/card-history.webp) center / cover;
  border: 2.5px solid var(--sky);
  box-shadow: 0 5px 0 #bcd7ff;
  text-align: left;
  cursor: pointer;
}
.history-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: #fff;
  border-radius: 16px;
  border: 2px solid #cfe1ff;
}
.history-card .stat-grid {
  flex: 1 1 260px;
  margin-top: 0;
}
.history-card .stat-card {
  background: #fffdf7;
  padding: 12px;
}
.history-card .stat-card .num {
  font-size: 22px;
}
.history-go {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--sky);
  color: #fff;
  border: 2px solid #3d7fd4;
  box-shadow: 0 3px 0 #3d7fd4;
  font-size: 14px;
  font-weight: 800;
}
.empty-tip {
  padding: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius-sm);
}

/* ========== 弹层 ========== */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(43, 33, 24, 0.45);
  display: grid;
  place-items: end center;
  padding: 18px;
  backdrop-filter: blur(4px);
}
.modal-card {
  width: min(520px, 100%);
  background: var(--card);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(40, 25, 0, 0.25);
  position: relative;
  animation: slideUp 0.28s ease;
  max-height: min(88vh, 760px);
  overflow: auto;
}
@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f4ecd8;
  font-size: 22px;
  line-height: 1;
}
.modal-hero {
  height: 140px;
  border-radius: 22px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 900;
  overflow: hidden;
}
.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
}
.modal-desc {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 15px;
}
.level-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 8px;
}
.level-chip {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--card-border);
  background: var(--bg-soft);
  font-weight: 800;
  font-size: 14px;
}
.level-chip.active {
  border-color: var(--accent-deep);
  background: #fff6d0;
  box-shadow: 0 0 0 3px rgba(255, 212, 59, 0.35);
}
.level-chip .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  background: var(--teal);
}
.level-chip .dot.locked { background: var(--ink-faint); }

/* ========== 答题页 ========== */
.page-play {
  min-height: calc(100vh - var(--tab-h) - var(--top-h) - 40px);
  display: flex;
  flex-direction: column;
}
.play-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.play-close {
  background: var(--accent);
  border: none;
  font-weight: 900;
}
.progress-track {
  flex: 1;
  display: flex;
  gap: 6px;
}
.progress-track .seg {
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: #e8dcc4;
}
.progress-track .seg.done {
  background: linear-gradient(180deg, #ffe270, #ffd43b);
}
.progress-track .seg.now {
  background: linear-gradient(180deg, #fff3b0, #ffd43b);
  box-shadow: 0 0 0 3px rgba(255, 212, 59, 0.35);
}

.prompt-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px auto 22px;
  max-width: 680px;
}
.speak-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sky);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 0 #3d7fd4;
  flex: 0 0 auto;
}
.prompt-text {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 900;
  padding: 12px 22px;
  background: var(--card);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  border: 1.5px solid var(--card-border);
  text-align: center;
}

.play-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
}

/* 通用舞台块 */
.stage-card {
  background: linear-gradient(180deg, #fffdf7, #fff9ec);
  border-radius: 26px;
  border: 2px solid var(--card-border);
  box-shadow: var(--shadow);
  padding: 26px 22px;
}
.stage-label {
  text-align: center;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 14px;
  font-size: 17px;
}

/* 选项按钮 */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid.cols-1 { grid-template-columns: 1fr; }
.choice-btn {
  min-height: 72px;
  border-radius: 18px;
  background: #f7f3ea;
  border: 2px solid #e7dcc8;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 5px 0 #ddd0b8;
  transition: transform 0.1s ease;
}
.choice-btn:hover { transform: translateY(-2px); }
.choice-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #ddd0b8;
}
.choice-btn.correct {
  background: #d9f7e7;
  border-color: var(--teal);
  box-shadow: 0 5px 0 #9fe0c0;
}
.choice-btn.wrong {
  background: #ffe2e2;
  border-color: var(--danger);
  box-shadow: 0 5px 0 #f0b0b0;
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* 物体计数 */
.object-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.object-item {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf7, #f7efe0);
  display: grid;
  place-items: center;
  font-size: 38px;
  border: 1.5px solid var(--card-border);
  box-shadow: 0 3px 0 #e8dcc4;
}
.object-item .piece { width: 48px; height: 48px; }
.chip-item {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(180deg, #fffdf7, #f7efe0);
  border: 2px solid var(--card-border);
  box-shadow: 0 3px 0 #e8dcc4;
  cursor: grab;
  user-select: none;
}
.chip-item .piece { width: 44px; height: 44px; }

/* 十格框 / 位值 */
.ten-frame {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.ten-cell {
  aspect-ratio: 1;
  border-radius: 12px;
  background: #f4efe4;
  border: 2px dashed #d8cbb2;
}
.ten-cell.filled {
  background: var(--accent);
  border-style: solid;
  border-color: var(--accent-deep);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.06);
}
.ten-cell.filled.blue { background: var(--sky); border-color: #3d7fd4; }
.ten-cell.filled.pink { background: var(--pink); border-color: #e04e7e; }
.ten-cell.filled.teal { background: var(--teal); border-color: #2bb87a; }

/* 凑十法 · 十格框行（粉+蓝）与剩余 */
.tf-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 6px;
}
.tf-row .ten-frame {
  flex: 0 1 300px;
  max-width: 300px;
}
.tf-rest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 800;
  color: var(--ink);
}
.tf-rest-chips {
  display: flex;
  gap: 6px;
}
.tf-rest-chips i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #d6e7ff;
  border: 2.5px dashed var(--sky);
}

/* 凑十法 · 填方框：目标数量格子（实心=已有，虚线=还差） */
.missing-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: min(560px, 100%);
  margin: 18px auto 0;
}
.missing-track .mcell {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f4efe4;
  border: 2px dashed #d8cbb2;
  box-sizing: border-box;
}
.missing-track .mcell.on {
  background: var(--pink);
  border: 2px solid #e04e7e;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08);
}

/* 凑十法树 */
.make-ten-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}
.make-ten-eq {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 900;
  letter-spacing: 0.02em;
}
.make-ten-eq .box {
  display: inline-grid;
  place-items: center;
  min-width: 1.2em;
  padding: 4px 12px;
  margin-left: 6px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--ink);
  border: 3px solid var(--accent-deep);
}
.make-ten-eq .box.empty {
  background: var(--card);
  border: 3px dashed #cfc0a4;
}
.make-ten-eq .num-main { color: var(--ink); }
.make-ten-eq .num-hot { color: var(--orange); }
.make-ten-tree {
  position: relative;
  width: min(340px, 100%);
  height: 132px;
  margin: 8px auto 40px;
  transform: scale(1.25);
  transform-origin: top center;
}
.tree-line {
  position: absolute;
  background: #c9b795;
  height: 3px;
  border-radius: 2px;
  transform-origin: left center;
}
.tree-node {
  position: absolute;
  min-width: 52px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
  background: var(--card);
  border: 2.5px solid #d8cbb2;
}
.tree-node.target {
  border-style: dashed;
  background: #fff;
}
.tree-node.filled {
  border-style: solid;
}
.tree-plus {
  position: absolute;
  font-weight: 900;
  color: var(--ink-soft);
  font-size: 22px;
}
.make-ten-hint {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: clamp(17px, 2.4vw, 20px);
  font-weight: 800;
  line-height: 1.5;
  color: var(--ink);
  background: #fff3c4;
  border: 2px dashed #f0c040;
  border-radius: 14px;
  padding: 10px 16px;
  text-align: center;
}

/* 数轴 */
.number-line {
  position: relative;
  height: 106px;
  margin: 10px 0 4px;
}
.number-line .rail {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 36px;
  height: 6px;
  background: #d8cbb2;
  border-radius: 999px;
}
.number-line .tick {
  position: absolute;
  top: 18px;
  width: 2px;
  height: 42px;
  background: #c9b795;
  transform: translateX(-50%);
}
.number-line .tick span {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 700;
}
.number-line .marker {
  position: absolute;
  top: 4px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pink);
  border: 3px solid #fff;
  box-shadow: var(--shadow-soft);
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

/* 描红 */
.trace-wrap {
  position: relative;
  width: min(430px, 86vw);
  aspect-ratio: 1;
  margin: 0 auto;
  background: #f8f3e8;
  border-radius: 24px;
  border: 2px solid var(--card-border);
  touch-action: none;
  overflow: hidden;
}
.trace-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}
.trace-ghost {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 230px;
  font-weight: 900;
  color: rgba(120, 90, 40, 0.10);
  pointer-events: none;
  user-select: none;
}

/* 分类拖拽区 */
.sort-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sort-bin {
  min-height: 164px;
  border-radius: 18px;
  border: 2.5px dashed #9fc7ff;
  background: #eef5ff;
  padding: 16px;
  text-align: center;
}
.sort-bin h4 {
  margin: 0 0 12px;
  font-size: 17px;
  color: var(--sky);
  font-weight: 900;
}
.sort-bin.drop-active {
  background: #dff0ff;
  border-color: var(--sky);
}
.sort-bin .bin-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chip-item.selected {
  outline: 3px solid var(--sky);
  transform: scale(1.05);
}

/* 应用题 / 真假 */
.word-card {
  padding: 22px;
  border-radius: 18px;
  background: #fff8f0;
  border: 3px solid var(--orange);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
}
.eq-big {
  text-align: center;
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 900;
  color: var(--orange);
  letter-spacing: 0.03em;
}
.eq-visual {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.eq-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 8px;
  max-width: min(380px, 100%);
  padding: 12px 14px;
  background: #fffaf0;
  border: 2px solid #e7dcc8;
  border-radius: 16px;
  box-shadow: 0 3px 0 #eadfce;
  font-size: 22px;
  line-height: 1.2;
}
.eq-group i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.eq-group .piece { width: 34px; height: 34px; }
.eq-group.faded {
  opacity: 0.45;
}
.eq-op {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: var(--ink-soft);
}

/* 答题页棋子贴纸（本机生成）
 * 基础 1em 随文缩放；下方各容器统一放大为固定 px 网格（棋子容器统一放大） */
.piece {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  flex-shrink: 0;
}
.dotball {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.dotball.db-blue {
  background: var(--sky);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 2px 0 #3d7fd4;
}
.dotball.db-orange {
  background: var(--orange);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 2px 0 #e07f1e;
}

/* 反馈 */
.play-feedback {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(43, 33, 24, 0.35);
  display: grid;
  place-items: center;
  padding: 18px;
  backdrop-filter: blur(3px);
}
.feedback-inner {
  background: var(--card);
  border-radius: 28px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(40, 25, 0, 0.25);
  animation: pop 0.28s ease;
  width: min(360px, 100%);
}
@keyframes pop {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.feedback-emoji { font-size: 64px; line-height: 1; min-height: 88px; display: grid; place-items: center; }
.feedback-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.feedback-text {
  margin: 12px 0 22px;
  font-size: 24px;
  font-weight: 900;
}

/* ========== 底部导航 ========== */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 253, 247, 0.94);
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(90, 60, 10, 0.16);
  border: 1.5px solid var(--card-border);
  backdrop-filter: blur(10px);
}
.tab-item {
  min-width: 140px;
  padding: 12px 32px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-soft);
}
.tab-item.active {
  background: var(--ink);
  color: var(--accent);
}

/* ========== 沙漠装饰 ========== */
.desert-scene {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.desert-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.92;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 20%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 20%, transparent 100%);
}
.dune {
  position: absolute;
  left: -10%;
  right: -10%;
  border-radius: 50% 50% 0 0;
}
.dune-back {
  bottom: 40px;
  height: 90px;
  background: #f6e3a8;
  opacity: 0.7;
}
.dune-mid {
  bottom: 20px;
  height: 80px;
  background: #efd28a;
}
.dune-front {
  bottom: 0;
  height: 70px;
  background: #e8c56c;
}
.cactus {
  position: absolute;
  bottom: 48px;
  width: 18px;
  height: 42px;
  background: #3ecf8e;
  border-radius: 10px 10px 6px 6px;
}
.cactus::before, .cactus::after {
  content: "";
  position: absolute;
  background: #3ecf8e;
  border-radius: 10px;
}
.cactus::before {
  width: 10px;
  height: 22px;
  left: -10px;
  top: 12px;
}
.cactus::after {
  width: 10px;
  height: 18px;
  right: -10px;
  top: 8px;
}
.cactus.c1 { left: 18%; height: 48px; }
.cactus.c2 { left: 48%; height: 36px; bottom: 56px; opacity: 0.9; }
.cactus.c3 { right: 16%; height: 52px; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .module-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .path-strip { grid-template-columns: repeat(2, 1fr); }
  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .hero-art { display: none; }
  .recommend-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-text { font-size: 16px; }
  .modal-mask { align-items: end; }
}
@media (max-width: 420px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .choice-grid, .choice-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .choice-btn { min-height: 64px; font-size: 24px; }
  .tab-item { min-width: 104px; padding: 12px 20px; font-size: 15px; }
  .path-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-title { font-size: 26px; }
}
@media (min-width: 1100px) {
  .app { padding-bottom: calc(var(--tab-h) + 40px); }
  .desert-scene { height: 170px; }
}

/* 横屏 / 桌面加宽 */
@media (min-width: 960px) {
  .module-grid { grid-template-columns: repeat(4, 1fr); }
  .play-stage { max-width: 1040px; }
}

/* ========== �龳�淨���� ========== */
.scene-card {
  background: var(--card);
  border-radius: 26px;
  border: 2px solid var(--card-border);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  text-align: center;
}
.scene-hint {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: clamp(17px, 2.4vw, 20px);
  font-weight: 800;
  line-height: 1.5;
  color: var(--ink);
  background: #fff3c4;
  border: 2px dashed #f0c040;
  border-radius: 14px;
  padding: 10px 16px;
}
.scene-hint b { color: var(--ink); font-size: 1.15em; }

/* 喂食场景（小青蛙） */
.feed-scene {
  background: linear-gradient(180deg, #fff8ec, #fff1d6);
}
.feed-monster {
  display: flex;
  justify-content: center;
}
.feed-frog {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(90, 120, 30, 0.22));
  animation: mascot-bob 3s ease-in-out infinite;
}
.feed-plates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.feed-plate {
  min-height: 88px;
  border-radius: 20px;
  background: #fffdf7;
  border: 3px solid #e7dcc8;
  box-shadow: 0 5px 0 #e0d2b8;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.feed-plate-row {
  font-size: 26px;
  line-height: 1.25;
  word-break: break-all;
  min-height: 36px;
}
.feed-plate em {
  font-style: normal;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-soft);
}
.feed-plate.correct {
  background: #d9f7e7;
  border-color: var(--teal);
  box-shadow: 0 5px 0 #9fe0c0;
}
.feed-plate.wrong {
  background: #ffe2e2;
  border-color: var(--danger);
  animation: shake 0.35s ease;
}

/* ��� */
.rocket-scene {
  background: linear-gradient(180deg, #f3f0ff, #fff8ec);
}
.rocket-body {
  font-size: 64px;
  line-height: 1;
  animation: rocket-bob 1.6s ease-in-out infinite;
}
@keyframes rocket-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.fuel-tank {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 16px auto 8px;
  max-width: min(460px, 100%);
  padding: 10px;
  background: #e8e2f6;
  border-radius: 14px;
  border: 3px solid #cfc6e8;
}
.fuel-cell {
  width: 22px;
  height: 44px;
  border-radius: 6px;
  background: #d5cce8;
}
.fuel-cell.on {
  background: linear-gradient(180deg, #ffe270, #ffb020);
  box-shadow: 0 2px 0 #e8a000;
}
.fuel-label {
  font-weight: 800;
  color: var(--ink);
  font-size: 16px;
}

/* ���� */
.bridge-scene {
  background: linear-gradient(180deg, #eaf7ff, #fff8ec);
}
.bridge-mascot {
  font-size: 48px;
  margin-bottom: 8px;
}
.bridge-planks {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.plank {
  min-width: 56px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0c078, #e0a85a);
  color: #5a3a10;
  font-weight: 900;
  font-size: 26px;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 0 #c78d3e;
  border: 3px solid #c78d3e;
}
.plank.hole {
  background: #fffdf7;
  color: var(--ink-faint);
  border-style: dashed;
  border-color: #b9a88a;
  box-shadow: 0 5px 0 #e0d6c4;
}

/* ҩˮ */
.potion-scene {
  background: linear-gradient(180deg, #f7f0ff, #fff8ec);
}
.potion-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.potion {
  width: 78px;
  height: 110px;
  border-radius: 16px 16px 28px 28px;
  background: rgba(255,255,255,0.7);
  border: 3px solid #cfc6e8;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.potion .potion-liquid {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  background: linear-gradient(180deg, #9ad4ff, #5b9cff);
  opacity: 0.7;
}
.potion.right .potion-liquid {
  background: linear-gradient(180deg, #ffb3d0, #ff6b9d);
}
.potion.result .potion-liquid.mix {
  background: linear-gradient(180deg, #c39bff, #ffd43b);
  opacity: 0.75;
}
.potion-bubbles {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 56px;
}
.potion-bubbles i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 2px solid rgba(255,255,255,0.95);
  box-shadow: 0 0 0 1px rgba(91,156,255,0.35);
}
.potion em, .potion strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-style: normal;
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  background: rgba(255,255,255,0.85);
  border-radius: 10px;
  padding: 2px 8px;
}
.potion-plus {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink-soft);
}

/* С�� */
.market-scene {
  background: linear-gradient(180deg, #fff3e0, #fff8ec);
}
.market-stall {
  border: 3px dashed #f0c078;
  border-radius: 22px;
  padding: 16px;
  background: #fffdf7;
}
.market-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 52px;
}
.market-item .piece { width: 64px; height: 64px; }
.market-item span {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-soft);
}
.market-price {
  width: min(470px, 100%);
  margin: 8px auto 0;
  text-align: left;
  font-weight: 900;
  font-size: 22px;
  color: #c75b00;
}
.market-price + .market-row {
  margin-top: 8px;
}
.market-have {
  margin-top: 12px;
}
.market-have p {
  width: min(470px, 100%);
  margin: 0 auto 8px;
  text-align: left;
  font-weight: 800;
  font-size: 19px;
  color: var(--ink-soft);
}
.market-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  width: min(470px, 100%);
  margin: 0 auto;
}
.market-row i {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe066, #ffc93c 60%, #f5a623);
  border: 2px solid #e8981a;
  box-shadow: 0 2px 0 #e0a030;
}

/* 气球飞走了 */
.balloon-scene {
  background: linear-gradient(180deg, #e8f4ff, #fff8ec);
}
.balloon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: center;
  align-items: center;
  padding: 18px 4px 8px;
  font-size: 40px;
  line-height: 1;
}
.balloon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.balloon .piece { width: 50px; height: 54px; }
.balloon.away {
  opacity: 0.4;
  transform: translateY(-12px);
}

/* 看图算：飞走的一堆 */
.pile.leaving .pile-items {
  opacity: 0.45;
  transform: translateY(-6px);
}

/* ���� */
.web-scene {
  background: linear-gradient(180deg, #eef2f8, #fff8ec);
}
.web {
  position: relative;
  width: min(280px, 100%);
  height: 180px;
  margin: 0 auto;
}
.web-center {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  background: #fff;
  border: 4px solid var(--sky);
}
.web-side {
  position: absolute;
  top: 120px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  background: #fff3c4;
  border: 4px solid var(--accent-deep);
}
.web-side.a { left: 30px; }
.web-side.b { right: 30px; }
.web-threads {
  position: absolute;
  left: 50%;
  top: 54px;
  width: 160px;
  height: 80px;
  transform: translateX(-50%);
  border-left: 3px solid #b9c0cc;
  border-right: 3px solid #b9c0cc;
  border-bottom: 3px solid #b9c0cc;
  border-radius: 0 0 80px 80px;
  pointer-events: none;
}

/* �Ǳ� */
.castle-scene {
  background: linear-gradient(180deg, #fff0f5, #fff8ec);
}
.castle-towers {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: flex-end;
  min-height: 90px;
}
.tower {
  width: 44px;
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
}
.tower b {
  display: block;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ff8fb5, #ff6b9d);
  box-shadow: 0 2px 0 #e04e7e;
}
.castle-rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
  min-height: 36px;
}
.castle-rooms .room {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff3c4;
  border: 2px solid var(--accent-deep);
  display: grid;
  place-items: center;
  font-size: 18px;
}
.castle-rooms .room.empty {
  background: #f0e6d0;
  border-color: #d8cbb2;
  color: var(--ink-faint);
}
.castle-label {
  margin-top: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Ѱ�� */
.treasure-scene {
  background: linear-gradient(180deg, #fff8d6, #fff8ec);
}
.treasure-path {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.treasure-path .gem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  background: #fffdf7;
  border: 2.5px solid #e7dcc8;
  box-shadow: 0 3px 0 #e0d2b8;
}
.treasure-path .gem.start {
  background: #e8f1ff;
  border-color: var(--sky);
}
.treasure-path .gem.hole {
  background: #fff3c4;
  border-color: var(--accent-deep);
  border-style: dashed;
  animation: pulse-hole 1.2s ease infinite;
}
@keyframes pulse-hole {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.treasure-hint-art {
  margin-top: 14px;
  font-size: 28px;
  letter-spacing: 6px;
}

/* ===== ���龳��ʽ�����ö��棩 ===== */
.feed-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 360px;
  margin: 14px auto 0;
  padding: 16px;
  background: #fffdf7;
  border: 3px dashed #e0c48a;
  border-radius: 22px;
  min-height: 72px;
}
.feed-tray-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
}
.feed-tray-item .piece { width: 44px; height: 44px; }

.pile {
  min-width: 120px;
  max-width: 240px;
  padding: 12px 10px;
  border-radius: 18px;
  background: #fffdf7;
  border: 3px solid #e7dcc8;
}
.pile.result {
  border-style: dashed;
  border-color: var(--teal);
  background: #f3fff9;
}
.pile-title {
  font-weight: 900;
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.pile-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px 6px;
  min-height: 48px;
  font-size: 28px;
}
.pile-items .piece { width: 42px; height: 42px; }
.potion-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.split-scene { background: linear-gradient(180deg, #f7fbff, #fff8ec); }
/* 分成树卡片（数的分成） */
.bond {
  position: relative;
  width: 100%;
  margin: 0 auto;
}
.bond-top {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.bond-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.bond-node {
  box-sizing: border-box;
  width: 40%;
  min-height: 132px;
  border-radius: 22px;
  border: 4px solid var(--sky);
  background: #fff;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bond-node b {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
}
.bond-node .bond-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 2px 4px;
}
.bond-dots i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 2.8vw, 24px);
  line-height: 1.3;
}
.bond-dots .piece { width: 28px; height: 28px; }
.bond-node.part {
  background: #fff9e6;
  border-color: var(--accent-deep);
}
.bond-node.hole {
  background: #fff;
  border-style: dashed;
  border-color: var(--ink-faint);
}
.bond-node.hole b,
.bond-node.hole .bond-dots {
  color: var(--ink-faint);
}
.bond-svg {
  display: block;
  width: 100%;
  height: clamp(56px, 9vw, 92px);
  margin: 6px 0;
}
.bond-svg line {
  stroke: #9fb6d4;
  stroke-width: 6;
  stroke-linecap: round;
}

.stick-scene { background: linear-gradient(180deg, #fff6ec, #fff8ec); }
.sticks-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.sticks-bundles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.bundle {
  position: relative;
  width: 48px;
  height: 72px;
  border-radius: 8px;
  background: #fff3c4;
  border: 3px solid var(--accent-deep);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  padding: 4px;
}
.bundle i {
  display: block;
  width: 3px;
  height: 48px;
  background: #e8a000;
  border-radius: 2px;
}
.bundle-tye {
  position: absolute;
  left: -2px; right: -2px;
  top: 28px;
  height: 10px;
  background: #ff6b9d;
  border-radius: 3px;
}
.sticks-ones {
  display: flex;
  gap: 6px;
  min-height: 64px;
  align-items: center;
  justify-content: center;
}
.sticks-ones .single {
  display: block;
  width: 8px;
  height: 56px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0c078, #e0a85a);
  border: 2px solid #c78d3e;
}
.sticks-ones .none {
  color: var(--ink-faint);
  font-weight: 700;
}

.balance-scene { background: linear-gradient(180deg, #fff0f5, #fff8ec); }
.balance {
  position: relative;
  width: min(320px, 100%);
  height: 150px;
  margin: 8px auto;
}
.balance-beam {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 36px;
  height: 10px;
  background: linear-gradient(180deg, #ffd43b, #f5b400);
  border-radius: 6px;
}
.balance-base {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 90px;
  height: 18px;
  transform: translateX(-50%);
  background: #c9b795;
  border-radius: 8px 8px 0 0;
}
.balance-base::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -40px;
  width: 8px;
  height: 40px;
  transform: translateX(-50%);
  background: #c9b795;
}
.balance-pan {
  position: absolute;
  top: 52px;
  min-width: 72px;
  padding: 10px;
  background: #fffdf7;
  border: 3px solid var(--accent-deep);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 5px 0 #e0d2b8;
}
.balance-pan.left-pan { left: 8%; }
.balance-pan.right-pan { right: 8%; }
.pan-value {
  font-weight: 900;
  font-size: 20px;
}
.hole-chip {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 3px dashed var(--sky);
  color: var(--ink-faint);
}

.hop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}
.hop-chip {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  background: #d9f7e7;
  border: 2px solid var(--teal);
  font-weight: 900;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.hop-arrow { color: var(--ink-faint); font-weight: 900; }

.number-line.sparse .tick span.dot-only {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9b795;
  position: relative;
  top: 40px;
}
.number-line.sparse .tick span.sand {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 6px;
  background: #f0d48a;
  border: 3px solid #e0b84a;
  border-radius: 8px;
  color: #7a5a10;
  font-weight: 900;
  top: 44px;
}
.number-line .tick span.start-lab {
  color: var(--teal);
  font-weight: 900;
}
.frog-line { position: relative; height: 36px; }
.frog {
  position: absolute;
  top: 0;
  font-size: 28px;
}
.rocket-balls {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.rocket-balls i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe270, #ffb020);
  border: 2px solid #e8a000;
}

.rocket-balls i.used {
  opacity: 0.35;
  filter: grayscale(0.35);
}
.fuel-cell.fill {
  background: linear-gradient(180deg, #b8f5d8, #3ddc97);
  box-shadow: 0 2px 0 #2bb87a;
}

/* ��ʮ���ף�10 + ʣ�� ��������� */
.ten-then-rest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}
.ten-then-part {
  min-width: 72px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #e8f1ff;
  border: 3px solid var(--sky);
  text-align: center;
}
.ten-then-part b {
  font-size: 28px;
  font-weight: 900;
}
.ten-then-part.rest {
  background: #fff3c4;
  border-color: var(--accent-deep);
}
.ten-then-plus {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink-soft);
}
.rest-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 6px;
}
.rest-dots i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffb020;
  border: 2px solid #e8a000;
}

/* ��Ŀ���������ĸ��ӣ�8+?=16 ʱ������ 16 �� */
.target-cells {
  max-width: 420px;
  margin: 12px auto 0;
}
.target-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}
.tcell {
  width: 22px;
  height: 36px;
  border-radius: 6px;
}
.tcell.on {
  background: linear-gradient(180deg, #ffe270, #ffb020);
  box-shadow: 0 2px 0 #e8a000;
}
.tcell.empty {
  background: transparent;
  border: 2.5px dashed #c9b795;
}
.target-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 800;
}
.lg-on { color: #c78c00; }
.lg-empty { color: var(--ink-soft); }

/* �α�ʽ��ʮ������������� */
.mt-book { max-width: 420px; margin: 0 auto; }
.mt-eq-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.mt-num {
  font-size: 36px;
  font-weight: 900;
  color: var(--ink);
}
.mt-split { font-weight: 800; color: var(--ink-soft); font-size: 14px; }
.mt-part {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  background: #e8f1ff;
  border: 3px solid var(--sky);
}
.mt-part.hot {
  background: #fff3c4;
  border-color: var(--accent-deep);
}
.mt-plus { font-size: 24px; font-weight: 900; }
.mt-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.mt-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffdf7;
  border: 2px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 14px;
}
.mt-step-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  background: #f3ead6;
  padding: 4px 8px;
  border-radius: 999px;
}
.mt-step-eq { font-size: 20px; font-weight: 800; }
.mt-step-eq b { color: var(--sky); }
.mt-step-eq .mt-q {
  color: var(--ink-faint);
  background: #fff3c4;
  border: 2px dashed var(--accent-deep);
  border-radius: 8px;
  padding: 0 8px;
}
.mt-frame-arrow {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 8px;
}
.mt-rest-chips {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
}
.mt-rest-chips i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffb020;
  border: 2px solid #e8a000;
}

/* �ȴ�С�����ҶԱ� */
.compare-side-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 36px 20px;
}
.side-box {
  min-width: 170px;
  padding: 26px 32px;
  border-radius: 22px;
  text-align: center;
  background: #f7f3ea;
  border: 3px solid #e7dcc8;
  box-shadow: 0 5px 0 #ddd0b8;
}
.side-box.left { background: #e8f1ff; border-color: var(--sky); box-shadow: 0 5px 0 #9fc7ff; }
.side-box.right { background: #fff3c4; border-color: var(--accent-deep); box-shadow: 0 5px 0 #f0c84a; }
.side-tag {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.side-num {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 900;
  line-height: 1;
}
.vs-mark {
  font-weight: 900;
  color: var(--ink-soft);
  font-size: 24px;
}
/* ����ѡ�����������ֺ���һ�� */
.choice-grid.cols-3 .choice-btn {
  font-size: 24px;
  min-height: 72px;
}

/* �����Ŷӣ��ײ����Ž������Ŀ�� */
.sort-result {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed #e0d2b8;
}
.sort-result-label {
  margin: 0 0 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-soft);
}
.sort-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.sort-slot {
  min-width: 84px;
  height: 96px;
  border-radius: 18px;
  background: #f4efe4;
  border: 3px dashed #d8cbb2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.sort-slot em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-faint);
}
.sort-slot-num {
  font-size: 36px;
  font-weight: 900;
  color: var(--ink-faint);
  line-height: 1;
}
.sort-slot.filled {
  background: linear-gradient(180deg, #d9f7e7, #b8efd4);
  border: 3px solid var(--teal);
  box-shadow: 0 5px 0 #9fe0c0;
  animation: sort-pop 0.25s ease;
}
.sort-slot.filled .sort-slot-num {
  color: #0d7a4e;
}
.sort-slot.filled em {
  color: #0d7a4e;
}
@keyframes sort-pop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.sort-arrow {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink-faint);
}

/* ��ѡ�е����֣����ٵ�ȡ�� */
.choice-btn.picked {
  position: relative;
}
.choice-btn.picked::after {
  content: "��һ�¿�ȡ��";
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 4px;
}
.choice-btn.wrong {
  animation: shake 0.35s ease;
}

/* ��ʶʮλ��λ����Ŀ��ʾ�� */
.place-hint-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 14px 12px;
  background: linear-gradient(180deg, #fff9e8, #fff3c4);
  border: 3px solid var(--accent-deep);
  border-radius: 18px;
  box-shadow: 0 5px 0 #e8c84a;
}
.place-hint-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 104px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fffdf7;
}
.place-hint-item.tens { border: 3px solid var(--pink); }
.place-hint-item.ones { border: 3px solid var(--sky); }
.place-hint-item.total {
  border: 3px solid var(--teal);
  background: #e8faf2;
  min-width: 120px;
}
.place-hint-tag {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
}
.place-hint-item.tens .place-hint-tag { background: #ffe0ec; color: #c2185b; }
.place-hint-item.ones .place-hint-tag { background: #e0efff; color: #1565c0; }
.place-hint-item.total .place-hint-tag { background: #d4f5e5; color: #0d7a4e; }
.place-hint-item b {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
  text-align: center;
}
.place-hint-plus, .place-hint-eq {
  align-self: center;
  font-size: 26px;
  font-weight: 900;
  color: var(--ink-soft);
}

.trace-demo-tip {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.95);
  border: 2px solid #93c5fd;
  border-radius: 999px;
  padding: 6px 14px;
  pointer-events: none;
  z-index: 3;
}
.trace-wrap { position: relative; }


/* ========== 账号体系（登录/注册/订单 · 照搬爽文规则） ========== */
.auth-slot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.nav-link.ghost {
  border-color: rgba(120, 90, 40, 0.18);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.nav-link.primary {
  background: linear-gradient(180deg, #ffe270, #ffd43b);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 0 #e8b800;
}
.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  background: #d1fae5;
  color: #047857;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
}
.auth-badge.warn {
  background: #ffedd5;
  color: #c2410c;
  border-color: #fed7aa;
}
.auth-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.auth-menu[hidden] { display: none !important; }
.auth-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  font-family: inherit;
}
.auth-menu button:hover { background: var(--bg-soft); }

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(43, 33, 24, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-overlay[hidden] { display: none !important; }
.auth-modal {
  width: min(420px, 100%);
  background: var(--card);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 24px 60px rgba(43, 33, 24, 0.3);
}
.auth-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 900;
}
.close-x {
  border: none;
  background: var(--bg-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: inherit;
}
.close-x:hover { background: var(--bg-deep); }
.auth-tabs {
  display: flex;
  background: var(--bg-soft);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}
.auth-tabs button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
.auth-tabs button.active {
  background: var(--ink);
  color: var(--accent);
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.auth-field input {
  border: 1.5px solid rgba(120, 90, 40, 0.18);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}
.auth-field input:focus { border-color: var(--accent-deep); background: #fff; }
.auth-actions { display: flex; gap: 8px; margin-top: 4px; }
.auth-actions .btn, .auth-actions .btn-primary { flex: 1; width: 100%; min-height: 46px; font-size: 15px; }
.auth-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.55;
}
.auth-user { font-size: 13px; color: var(--ink-soft); margin: 0 0 10px; }
.auth-user strong { color: var(--ink); }
.auth-empty { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; }
.auth-modal .nav-link.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink-soft); text-decoration: underline; }

/* 提示条 */
.pm-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + 24px);
  transform: translateX(-50%) translateY(12px);
  max-width: min(86vw, 420px);
  background: rgba(43, 33, 24, 0.94);
  color: #fff8e7;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 200;
  text-align: center;
}
.pm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ========== 页脚 ========== */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding: 22px 18px calc(var(--tab-h) + var(--safe-b));
  text-align: center;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.site-footer .footer-line { font-weight: 700; }
.site-footer .footer-note { font-size: 12px; color: var(--ink-faint); }
.site-footer a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover { color: var(--ink); }

/* 答题页贴纸：小屏缩一档，防溢出 */
@media (max-width: 520px) {
  .pile-items .piece { width: 32px; height: 32px; }
  .eq-group .piece { width: 28px; height: 28px; }
  .object-item { width: 60px; height: 60px; }
  .object-item .piece { width: 40px; height: 40px; }
  .chip-item { width: 58px; height: 58px; }
  .chip-item .piece { width: 38px; height: 38px; }
  .balloon .piece { width: 38px; height: 42px; }
  .feed-tray-item .piece { width: 36px; height: 36px; }
  .bond-dots .piece { width: 22px; height: 22px; }
  .pile { min-width: 96px; max-width: 46%; }
}
