/* 发音打怪 · 学生游戏页 */
.back-link { color: #2f6fd6; font-size: 14px; font-weight: 600; text-decoration: none; background: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 999px; }
.who, .map, .battle { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.game-card { background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 8px 26px rgba(47,111,214,.15); text-align: center; }
.game-card h2 { color: #2f6fd6; margin-bottom: 6px; }
.game-card .sub { color: #8a94a6; font-size: 13px; margin-bottom: 16px; }
.who-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.who-btn { border: 2px solid #dbe7f5; background: #fff; color: #2f6fd6; font-size: 15px; font-weight: 700; border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.big-btn { border: none; border-radius: 999px; padding: 12px 0; font-weight: 800; cursor: pointer; color: #fff; }
.big-btn { background: linear-gradient(135deg,#3ecf8e,#1fa866); width: 100%; }
.big-btn.secondary { background: linear-gradient(135deg,#4a9eff,#2f6fd6); }
.big-btn.ghost { background: #eef2f7; color: #334155; }
.big-btn:disabled { opacity: .6; }

/* 地图 */
.map-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 14px; color: #2f6fd6; font-weight: 700; background: #fff; border-radius: 18px; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.map-head .mini { flex: none; }
.hud { display: inline-flex; gap: 6px; align-items: center; }
.chip { background: #f1f5f9; color: #334155; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.chip b { color: #b45309; }
.chip.atk b { color: #c2410c; }
.shop-btn { border-color: #f59e0b; color: #b45309; font-weight: 700; }
.mini { border: 1px solid #dbe7f5; background: #fff; color: #6b7280; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.mini:disabled { opacity: .45; cursor: default; }
.eval-line { font-size: 12px; color: #16a34a; font-weight: 700; text-align: center; padding: 2px 6px; }
.eval-line.mock { color: #d97706; }
.replay { margin-top: 10px; border-color: #bae6fd; color: #0369a1; font-weight: 700; }
.replay:not(:disabled):active { background: #e0f2fe; }
.board-card { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); margin-bottom: 10px; }
.board-card h3 { font-size: 15px; color: #2f6fd6; margin-bottom: 6px; }
.grp { margin: 6px 0; }
.grp .g-name { font-size: 13px; color: #6b7280; font-weight: 700; margin: 8px 0 4px; }
.lv-row { display: inline-flex; align-items: center; gap: 4px; border: 2px solid #e5eaf2; border-radius: 12px; padding: 8px 10px; margin: 3px; cursor: pointer; background: #fbfdff; min-width: 96px; justify-content: space-between; }
.lv-row.cleared { border-color: #f59e0b; background: #fff7e6; }
.lv-row .l-emoji { font-size: 24px; }
.lv-row .l-sym { font-weight: 800; color: #111827; }
.lv-row .l-ok { color: #f59e0b; }
.lv-row .l-muted { color: #cbd5e1; font-size: 11px; }

/* 打怪 */
.battle { padding: 8px 12px; }
.b-head { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 8px 6px 12px; flex-wrap: wrap; }
.bt-target b { font-size: 26px; color: #111827; margin: 0 2px; }
.bt-tries { margin-left: auto; color: #8a94a6; font-size: 13px; }
.m-atk-line { color: #c2410c; font-size: 13px; font-weight: 800; margin-top: 4px; }
.dmgfloat { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); font-size: 34px; font-weight: 900; color: #ef4444; opacity: 0; }
.dmgfloat.show { animation: dmgfly 1s forwards; }
.dmgfloat.miss { color: #94a3b8; font-size: 20px; }
@keyframes dmgfly { 0%{opacity:0; transform:translate(-50%,20px) scale(.5)} 20%{opacity:1} 100%{opacity:0; transform:translate(-50%,-60px) scale(1.4)} }
.coinfloat { position: absolute; top: 20%; left: 38%; transform: translateX(-50%); font-size: 24px; font-weight: 900; color: #b45309; opacity: 0; }
.coinfloat.show { animation: coinfly 1.2s forwards; }
@keyframes coinfly { 0%{opacity:0; transform:translate(-50%,10px) scale(.6)} 20%{opacity:1} 100%{opacity:0; transform:translate(-50%,-110px) scale(1.2)} }
.arena { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: linear-gradient(180deg,#dbeafe,#e0f2fe 60%,#cfe8cf); border-radius: 18px; padding: 10px; }
.monster { text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.m-emoji { font-size: 90px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)); transition: transform .15s; }
.monster.hit .m-emoji { animation: mshake .4s; }
@keyframes mshake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-10px)} 40%{transform:translateX(9px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(4px)} }
.m-name { color: #334155; font-weight: 700; }
.hpbar { width: 70%; max-width: 320px; height: 22px; background: #e5e7eb; border-radius: 999px; margin-top: 8px; overflow: hidden; position: relative; }
.hpfill { height: 100%; background: linear-gradient(90deg,#f87171,#ef4444); width: 100%; transition: width .5s ease; }
#hptext { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #7f1d1d; font-weight: 800; }
.shotzone { text-align: center; padding: 10px 0 6px; }
.fire { border: none; border-radius: 999px; background: linear-gradient(135deg,#4a9eff,#2f6fd6); color: #fff; font-size: 22px; font-weight: 800; padding: 16px 34px; cursor: pointer; box-shadow: 0 6px 18px rgba(47,111,214,.4); }
.fire.live { background: #ef4444; animation: micPulse 1.3s infinite; }
.fire:disabled { opacity: .55; }
.shot-hint { color: #475569; font-size: 13px; margin-top: 8px; }
.shot-hint.err { color: #b91c1c; }

/* 胜利层 */
.v-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.v-card { background: #fff; border-radius: 22px; padding: 24px; width: 100%; max-width: 340px; text-align: center; }
.v-star { font-size: 54px; }
.v-card h2 { color: #d97706; margin: 6px 0; }
.v-card p { color: #6b7280; font-size: 14px; margin-bottom: 14px; }
.v-card .big-btn { margin-bottom: 8px; }

/* 装备店 */
.shop { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 24px; display: flex; }
.shop-card { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 8px 26px rgba(47,111,214,.15); width: 100%; max-width: 480px; margin: auto; text-align: center; }
.shop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.shop-head h2 { color: #b45309; margin: 0; }
.shop-card .sub { color: #8a94a6; font-size: 13px; margin: 6px 0 12px; }
.shop-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.gear-row { display: flex; align-items: center; gap: 10px; border: 2px solid #e5eaf2; border-radius: 14px; padding: 10px 12px; text-align: left; }
.gear-row.equipped { border-color: #3ecf8e; background: #f0fdf6; }
.gear-row.locked { opacity: .7; background: #f8fafc; }
.gear-row .g-req { font-size: 11px; font-weight: 700; margin-left: 4px; }
.gear-row .g-req { color: #ef4444; }
.gear-row .g-req.ok { color: #10b981; }
.gear-row .g-emoji { font-size: 30px; flex: none; }
.gear-row .g-info { flex: 1; min-width: 0; }
.gear-row .g-name { font-weight: 800; color: #111827; font-size: 15px; }
.gear-row .g-meta { color: #64748b; font-size: 12px; }
.gear-row .g-atk { color: #c2410c; font-weight: 800; }
.gear-row .g-desc { color: #94a3b8; font-size: 11px; }
.g-btn { border: none; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px; cursor: pointer; flex: none; }
.g-btn.buy { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #fff; }
.g-btn.buy:disabled { background: #e2e8f0; color: #94a3b8; }
.g-btn.equip { background: linear-gradient(135deg,#3ecf8e,#1fa866); color: #fff; }
.g-btn.on { background: #eef2f7; color: #64748b; }
.g-btn.owned { background: #e0e7ff; color: #4338ca; }
.v-coins { color: #b45309; font-weight: 900; font-size: 16px; margin: -6px 0 12px; }

/* 修复：CSS display:flex 覆盖了 hidden 属性（导致界面互相叠加、胜利层永远显示挡在最上） */
.who[hidden], .map[hidden], .battle[hidden], .shop[hidden], .role[hidden],
.v-overlay[hidden], .v-card[hidden], .defeat[hidden], .math[hidden] { display: none !important; }

/* 玩家血条 */
.mehp { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 2px 0 0; }
.mehp-name { font-size: 13px; font-weight: 700; color: #166534; }
.hpbar.slim { width: 55%; max-width: 260px; height: 16px; margin: 0; }
.hpfill.me { background: linear-gradient(90deg, #34d399, #059669); }
#mehptext { font-size: 11px; }

/* 角色面板 */
.role-hero { text-align: center; margin-bottom: 10px; }
.role-avatar { font-size: 60px; }
.role-name { font-weight: 800; color: #111827; }
.role-lv { color: #2f6fd6; font-size: 13px; }
.expbar { width: 80%; max-width: 260px; height: 14px; background: #e5e7eb; border-radius: 999px; margin: 6px auto 0; overflow: hidden; position: relative; }
.expfill { height: 100%; background: linear-gradient(90deg, #4a9eff, #a78bfa); transition: width .4s; }
#exptext { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; font-weight: 800; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.stat { background: #f8fafc; border-radius: 12px; padding: 8px 4px; text-align: center; }
.stat .num { font-weight: 800; color: #111827; }
.stat .lbl { font-size: 12px; color: #8a94a6; }
.gear-slot-title { font-size: 13px; color: #6b7280; font-weight: 700; margin: 4px 0; }

/* 角色槽位条 */
.role-slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.role-slot { display: flex; align-items: center; gap: 8px; border: 1px solid #eef2f7; background: #fbfdff; border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; flex: 1 1 100%; }
.role-slots .role-slot { flex: 1 1 calc(50% - 6px); margin: 0; box-sizing: border-box; font-size: 13px; }
.role-slot .rs-emoji { font-size: 20px; }
.role-slot .rs-name { font-weight: 700; flex: 1; min-width: 0; }
.role-slot .rs-atk { color: #b45309; font-size: 12px; }
#role-upgrade { margin-bottom: 8px; }

/* 拼词砍怪 */
.word-arena .monster { gap: 6px; }
.word-box { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.w-letter {
  min-width: 40px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #111827;
  background: #fff; border: 2px solid #dbe7f5; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.w-letter.blank { border-style: dashed; color: #94a3b8; }
.w-letter.on { border-color: #3ecf8e; color: #15803d; animation: greet-pop .3s ease; }
.word-meaning { color: #475569; font-weight: 700; min-height: 20px; }
.word-opts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.w-opt {
  width: 52px; height: 52px; border: none; border-radius: 14px; font-size: 26px; font-weight: 900;
  color: #fff; background: linear-gradient(135deg,#4a9eff,#2f6fd6); cursor: pointer;
  box-shadow: 0 4px 10px rgba(47,111,214,.3);
}
.w-opt:active { transform: scale(.92); }

/* ============================================================
   数学：面积大冒险 · 乘法农场
   ============================================================ */
.math { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.math-head { padding: 6px 10px 6px 14px; }

/* 学科分组标题 */
.subject-head {
  font-size: 15px; font-weight: 800; color: #475569;
  background: linear-gradient(90deg, #f1f5f9 0%, transparent 100%);
  padding: 6px 12px; margin: 8px -14px 4px; border-radius: 10px;
  border-left: 4px solid #2f6fd6;
}

/* 四步骤进度条 */
.math-progress {
  display: flex; justify-content: space-between; gap: 4px;
  background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.mp-step {
  flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px;
  background: #f1f5f9; color: #94a3b8; font-size: 12px; font-weight: 700;
  transition: all .2s;
}
.mp-step .mp-ico { display: block; font-size: 22px; margin-bottom: 2px; }
.mp-step.active { background: #d4f1c5; color: #334155; }
.mp-step.now { background: linear-gradient(135deg,#4a9eff,#2f6fd6); color: #fff; transform: scale(1.05); box-shadow: 0 4px 12px rgba(47,111,214,.4); }

/* 步骤容器 */
.math-step { display: flex; flex-direction: column; gap: 10px; }
.math-hint {
  background: #fff; border-radius: 12px; padding: 10px 14px;
  font-size: 14px; color: #334155; line-height: 1.6;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.math-step-btns { display: flex; gap: 10px; padding: 4px 0; }
.math-step-btns .big-btn { flex: 1; }
.math-step-btns .mini { flex: none; }

/* 步骤 1：棋盘 SVG */
.math-board-wrap {
  background: #fff; border-radius: 14px; padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.math-board { width: 100%; height: auto; display: block; }
.cut-scissor rect { transition: transform .15s, fill .15s; }
.cut-scissor:hover rect { fill: #fef3c7; transform: scale(1.1); }

/* 步骤 2：填格子 */
.math-fill-wrap {
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.math-fill-grid {
  display: grid; gap: 10px;
}
.mf-cell {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 10px 8px;
  background: linear-gradient(135deg,#f0fdf4,#ecfeff);
  border: 2px solid #bae6fd; border-radius: 12px;
  transition: all .2s;
}
.mf-cell.wrong { border-color: #fca5a5; background: #fef2f2; animation: mfshake .3s; }
.mf-cell.correct { border-color: #86efac; background: #f0fdf4; }
@keyframes mfshake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)}
}
.mf-label { font-size: 13px; font-weight: 700; color: #475569; }
.mf-input {
  width: 100%; max-width: 120px; text-align: center;
  font-size: 20px; font-weight: 800; color: #1e40af;
  border: 2px solid #bae6fd; border-radius: 10px; padding: 6px 10px;
  background: #fff; outline: none;
}
.mf-input:focus { border-color: #2f6fd6; box-shadow: 0 0 0 3px rgba(47,111,214,.2); }
.mf-cell.correct .mf-input { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.mf-star { position: absolute; top: 4px; right: 6px; opacity: 0; font-size: 18px; }
.mf-cell.correct .mf-star { opacity: 1; animation: mfpop .4s; }
@keyframes mfpop { 0%{transform:scale(0)} 60%{transform:scale(1.3)} 100%{transform:scale(1)} }

/* 步骤 3：合并竖式 */
.math-merge-wrap {
  background: #fff; border-radius: 14px; padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.mm-rows { display: flex; flex-direction: column; gap: 10px; }
.mm-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: #f8fafc; border-radius: 12px; border: 2px solid #e2e8f0;
  transition: all .2s;
}
.mm-row.correct { border-color: #86efac; background: #f0fdf4; }
.mm-row.wrong { border-color: #fca5a5; background: #fef2f2; animation: mfshake .3s; }
.mm-row-lbl { font-size: 13px; font-weight: 700; color: #64748b; flex: 1; min-width: 0; }
.mm-input {
  width: 140px; text-align: center;
  font-size: 18px; font-weight: 800; color: #1e40af;
  border: 2px solid #bae6fd; border-radius: 10px; padding: 6px 10px;
  background: #fff; outline: none;
}
.mm-input:focus { border-color: #2f6fd6; }
.mm-star { font-size: 18px; opacity: 0; }
.mm-row.correct .mm-star { opacity: 1; animation: mfpop .4s; }
.mm-line {
  height: 3px; background: linear-gradient(90deg,#6b8e23,#f59e0b,#6b8e23);
  border-radius: 2px; margin: 14px 10px;
}
.mm-total {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  background: linear-gradient(135deg,#fef3c7,#fde68a);
  border-radius: 12px; border: 3px solid #f59e0b;
  transition: all .2s;
}
.mm-total.correct { border-color: #22c55e; background: #dcfce7; }
.mm-total.wrong { border-color: #fca5a5; background: #fef2f2; }
.mm-total-lbl { font-size: 15px; font-weight: 800; color: #92400e; flex: 1; }
.mm-input.total {
  width: 160px; font-size: 22px; color: #b45309;
  border-color: #f59e0b;
}

/* 步骤 4：农场通关 */
.math-farm {
  background: linear-gradient(180deg,#fef9c3 0%,#bbf7d0 40%,#86efac 100%);
  border-radius: 16px; padding: 20px; text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  position: relative; overflow: hidden; min-height: 220px;
  display: flex; flex-direction: column; gap: 10px;
}
.farm-sky { font-size: 32px; }
.farm-land {
  flex: 1; display: flex; align-items: flex-end; justify-content: center;
  position: relative; min-height: 100px;
}
.farm-sun { position: absolute; top: 8px; right: 16px; font-size: 36px; animation: spinslow 12s linear infinite; }
@keyframes spinslow { to { transform: rotate(360deg); } }
.farm-trees {
  font-size: 40px; letter-spacing: 8px;
  animation: treesway 2.5s ease-in-out infinite;
}
@keyframes treesway { 0%,100%{transform:rotate(-2deg)} 50%{transform:rotate(2deg)} }
.math-final { padding: 10px; }
.mf-problem { font-size: 18px; color: #64748b; font-weight: 700; }
.mf-answer { font-size: 48px; font-weight: 900; color: #15803d; text-shadow: 0 2px 8px rgba(21,128,61,.2); margin: 6px 0; animation: mfpop .6s; }
.mf-cheer { font-size: 14px; color: #65a30d; font-weight: 700; }
.mf-stars { font-size: 32px; margin-top: 6px; }

/* ============================================================
   除法俄罗斯方块
   ============================================================ */
.divide-hud {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 12px; background: #f8fafc; border-radius: 10px;
  font-size: 14px; font-weight: 700;
}
.divide-hud .dv-lives { font-size: 16px; }
.divide-hud .dv-score b { color: #ea580c; font-size: 16px; }
.divide-hud .dv-mode { color: #0ea5e9; }
.divide-stage {
  position: relative;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 14px;
  padding: 14px 10px 10px;
  min-height: 280px;
  overflow: hidden;
}
.dv-row {
  display: flex; align-items: center; gap: 4px;
  min-height: 36px; justify-content: center;
}
.dv-cell {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #1e293b;
}
.dv-quotient-row { position: relative; margin-bottom: 2px; justify-content: flex-start; padding-left: 78px; }
.dv-q-cell {
  color: #2563eb; font-size: 26px;
}
.dv-q-cell.placed { color: #15803d; }
.dv-divisor-row {
  font-weight: 800; font-size: 22px; color: #1e293b;
  align-items: stretch;
}
.dv-divisor {
  width: 52px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: #b91c1c;
}
.dv-bracket {
  width: 22px; height: 40px;
  border-left: 3px solid #64748b;
  border-top: 3px solid #64748b;
  border-top-left-radius: 14px 100%;
  align-self: flex-end;
}
.dv-dvd-wrap {
  display: flex; gap: 4px;
  border-top: 3px solid #64748b;
  padding-top: 0;
  margin-left: -4px;
}
.dv-dvd-cell { color: #1e293b; }
.dv-work {
  margin-top: 2px;
}
.dv-work-row { justify-content: flex-start; padding-left: 78px; }
.dv-work-cell { color: #1e293b; }
.dv-product .dv-work-cell { color: #7c3aed; }
.dv-remainder .dv-work-cell { color: #0891b2; }
.dv-remainder.final .dv-work-cell { color: #15803d; font-size: 26px; }
.dv-line {
  height: 3px; background: #94a3b8; border-radius: 2px;
}
/* 下落方块 */
.dv-falling {
  position: absolute;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(234,88,12,.4);
  transition: left .12s ease-out, top .08s linear;
  z-index: 10;
}
.dv-falling.landed-ok {
  background: linear-gradient(135deg, #34d399, #10b981);
  animation: dvpop .35s ease-out;
}
.dv-falling.landed-bad {
  background: linear-gradient(135deg, #f87171, #ef4444);
  animation: dvshake .5s;
}
@keyframes dvpop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); opacity: .3; }
}
@keyframes dvshake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.divide-controls {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.dv-ctrl {
  font-size: 20px; font-weight: 900; padding: 10px 18px;
  background: linear-gradient(135deg,#4a9eff,#2f6fd6); color: #fff;
  border-radius: 12px;
}
.dv-ctrl:active { transform: scale(.92); }
.divide-hint {
  background: #fffbeb; border-radius: 10px; padding: 8px 12px;
  font-size: 13px; font-weight: 700; color: #334155;
  min-height: 20px;
}
/* 通关卡片 */
.dv-clear-card {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; border-radius: 14px; z-index: 20;
  padding: 20px;
}
.dv-clear-title { font-size: 26px; font-weight: 900; color: #15803d; }
.dv-clear-result { font-size: 18px; font-weight: 800; color: #1e293b; }
.dv-clear-stars { font-size: 32px; }
.dv-clear-score { font-size: 14px; color: #ea580c; font-weight: 700; }
.dv-clear-card .big-btn { width: 100%; max-width: 240px; }

/* ============================================================
   排行榜
   ============================================================ */
.leaderboard {
  background: linear-gradient(135deg,#fff7ed,#fef9c3);
  border-radius: 12px; border: 2px solid #f59e0b;
  padding: 0; overflow: hidden; box-shadow: 0 2px 8px rgba(245,158,11,.15);
}
.lb-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; cursor: pointer; user-select: none;
  background: linear-gradient(90deg,#f59e0b,#fbbf24); color: #fff;
  font-weight: 800;
}
.lb-title { font-size: 15px; }
.lb-toggle { font-size: 12px; opacity: .8; }
.lb-body { padding: 8px 10px 10px; }
.lb-list { display: flex; flex-direction: column; gap: 4px; }
.lb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,.6);
  font-size: 13px; font-weight: 700;
}
.lb-row.mine {
  background: linear-gradient(90deg,#bbf7d0,#86efac);
  border: 2px solid #22c55e;
  box-shadow: 0 2px 6px rgba(34,197,94,.25);
}
.lb-row.seed { opacity: .75; }
.lb-rank {
  font-size: 16px; width: 32px; text-align: center;
  flex: none;
}
.lb-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #334155;
}
.lb-stat { color: #b45309; font-size: 12px; white-space: nowrap; }
.lb-stat b { color: #c2410c; }
.lb-mine {
  margin-top: 8px; padding: 6px 12px;
  background: #f1f5f9; border-radius: 8px;
  font-size: 12px; color: #64748b; text-align: center;
}

/* ⚔️ 试商砍怪 / 🧙 法师对决 */
.q-arena { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px; }
.q-card { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); text-align: center; }
.q-step, .q-stepline { font-size: 13px; color: #8a94a6; font-weight: 700; }
.q-text { font-size: 22px; font-weight: 800; color: #111827; margin: 6px 0; }
.q-tip { font-size: 13px; color: #6b7280; min-height: 18px; }
.q-opts { display: flex; justify-content: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.q-opt {
  min-width: 64px; padding: 12px 18px; font-size: 22px; font-weight: 900; color: #fff;
  border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #4a9eff, #2f6fd6);
  box-shadow: 0 4px 10px rgba(47,111,214,.3);
}
.q-opt:active { transform: scale(.94); }
.q-opt.good { background: linear-gradient(135deg, #3ecf8e, #1fa866); }
.q-opt.bad { background: linear-gradient(135deg, #f87171, #dc2626); }
.q-effect { margin-top: 8px; font-size: 14px; color: #b45309; font-weight: 700; min-height: 20px; }
.duel-board { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.duel-side { flex: 1; text-align: center; }
.duel-emoji { font-size: 44px; }
.duel-nm { font-size: 13px; font-weight: 700; color: #334155; }
.duel-vs { font-size: 22px; color: #f59e0b; font-weight: 900; }
#trial-view[hidden], #duel-view[hidden] { display: none !important; }

/* 🎵 诗词接龙 */
#poem-view[hidden] { display: none !important; }
#poem-up { letter-spacing: 3px; }
#poem-mic { margin: 6px auto; display: block; }
#poem-view .fire.live { background: linear-gradient(135deg, #f87171, #dc2626); }

/* ---------- 学科大地图（两级导航：学科 → 模块玩法） ---------- */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 6px 0; }
.subject-card {
  border: none; cursor: pointer; text-align: center;
  background: linear-gradient(160deg, #ffffff, #f1f7ff);
  border-radius: 18px; padding: 16px 12px;
  box-shadow: 0 6px 18px rgba(47,111,214,.14);
  transition: transform .12s;
}
.subject-card:active { transform: scale(.97); }
.subject-card .subj-icon { font-size: 44px; }
.subject-card .subj-name { font-size: 18px; font-weight: 900; color: #1e293b; margin: 4px 0; }
.subject-card .subj-boards { font-size: 12px; color: #64748b; min-height: 32px; line-height: 1.4; }
.subject-card .subj-prog { margin-top: 6px; font-size: 12px; font-weight: 800; color: #d97706; }
.subj-back-row { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #2f6fd6; }

/* 🐸 诗句吞噬进化 */
#eat-view[hidden] { display: none !important; }
#eat-view { position: relative; }
/* 美术素材精灵（assets/eat/*.png）；没素材时自动退回 emoji */
.eat-sprite { display: block; object-fit: contain; pointer-events: none; }
.eat-me .me-icon { display: flex; align-items: center; justify-content: center; }
.eat-creature.has-img { background: transparent; box-shadow: none; padding: 0; }
.eat-creature.has-img .ec-line { background: rgba(255,255,255,.88); border-radius: 999px; padding: 1px 8px; }
.eat-creature.predator.has-img { background: transparent; box-shadow: none; filter: drop-shadow(0 0 7px rgba(220,38,38,.9)); }
.eat-creature.glow.has-img { filter: drop-shadow(0 0 9px rgba(251,191,36,.95)); }
.eat-pool.dragon { background: radial-gradient(circle at 50% 35%, #fff7d6, #fde68a 60%, #fbbf24); }
.eat-hud { display: flex; justify-content: space-between; padding: 4px 14px; font-weight: 800; color: #334155; }
.eat-cur-card { margin: 0 12px 6px; }
.eat-pool {
  position: relative; flex: 1; min-height: 320px; margin: 6px 12px 12px;
  background: radial-gradient(circle at 50% 30%, #e0f2fe, #bfe3f7 70%, #a7d8f0);
  border-radius: 18px; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.eat-pool.shake { animation: mshake .35s; }
/* Canvas 2D 游戏层（角色/鱼/怪/粒子都画在这里） */
#eat-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; touch-action: none; }
.eat-curbar { z-index: 6; }
/* 视差背景：水泡随你游动反向滚动 */
.eat-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-bubble {
  position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.95), rgba(255,255,255,.35) 60%, rgba(186,230,253,.12));
  opacity: .55; will-change: transform;
}
.bg-bubble.big { opacity: .33; }
.eat-me {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); z-index: 3;
  transition: font-size .18s ease; pointer-events: none;
}
.eat-me .me-icon { font-size: 44px; line-height: 1; }
.eat-me .me-tag {
  margin-top: 1px; font-size: 11px; font-weight: 900; color: #b45309;
  background: #fef3c7; border: 1px solid #fbbf24; border-radius: 999px; padding: 0 6px;
}
.eat-me::before {
  content: ''; position: absolute; left: 50%; top: 46%; width: 74px; height: 74px;
  margin: -37px 0 0 -37px; border: 3px solid #fbbf24; border-radius: 50%;
  box-shadow: 0 0 14px rgba(251,191,36,.7); animation: mePulse 1.6s ease-in-out infinite;
}
@keyframes mePulse { 0%,100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.12); opacity: .55; } }
.eat-me.inv { animation: eatInv .5s ease-in-out infinite; }
@keyframes eatInv { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
/* 拖拽吞噬：会游动的诗句气泡 + 大鱼 */
.eat-creature {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(255,255,255,.9); border-radius: 16px; padding: 4px 9px;
  box-shadow: 0 3px 10px rgba(0,0,0,.12); z-index: 2; cursor: pointer;
}
.eat-creature .ec-icon { font-size: 22px; }
.eat-creature .ec-line { font-size: 13px; font-weight: 800; color: #1e293b; white-space: nowrap; }
.eat-creature.predator { background: rgba(254,226,226,.94); box-shadow: 0 0 0 2px #fca5a5, 0 4px 12px rgba(220,38,38,.25); padding: 6px 10px; }
.eat-creature.predator .ec-icon { font-size: 34px; }
.eat-creature .ec-tag {
  font-size: 10px; font-weight: 900; color: #b91c1c; background: #fee2e2;
  border-radius: 999px; padding: 0 6px; white-space: nowrap;
}
/* 横屏/全屏（点 🖥️ 横屏）：沉浸式——隐藏 App 外壳，整块游戏区铺满屏幕 */
body.eat-fs { overflow: hidden; }
body.eat-fs .top, body.eat-fs .foot { display: none !important; }
#eat-view.fs, #eat-view:fullscreen {
  position: fixed; inset: 0; z-index: 90; margin: 0; padding: 0;
  background: linear-gradient(180deg, #dff0fa, #bfe3f7);
  display: flex; flex-direction: column; overflow: hidden;
}
/* 全屏 = 净屏：水池铺满，操作/信息都变成悬浮在池面上的小元素 */
#eat-view.fs .eat-pool, #eat-view:fullscreen .eat-pool { flex: 1; min-height: 0; margin: 0; border-radius: 0; }
#eat-view.fs .b-head, #eat-view:fullscreen .b-head {
  position: absolute; top: 6px; left: 8px; right: 8px; z-index: 7;
  background: transparent; padding: 0; gap: 6px;
}
#eat-view.fs .b-head .bt-target, #eat-view.fs .b-head .chip,
#eat-view:fullscreen .b-head .bt-target, #eat-view:fullscreen .b-head .chip { display: none; }
#eat-view.fs .b-head .mini, #eat-view:fullscreen .b-head .mini {
  background: rgba(255,255,255,.85); border-color: rgba(255,255,255,.9); box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
#eat-view.fs .eat-hud, #eat-view:fullscreen .eat-hud {
  position: absolute; top: 8px; right: 10px; z-index: 7; padding: 3px 10px; font-size: 12px;
  background: rgba(255,255,255,.82); border-radius: 999px; gap: 8px;
}
#eat-view.fs .eat-bar, #eat-view:fullscreen .eat-bar {
  position: absolute; top: 46px; left: 12px; right: 12px; z-index: 7; margin: 0; height: 6px;
  background: rgba(255,255,255,.55);
}
#eat-view.fs .eat-curbar, #eat-view:fullscreen .eat-curbar { top: 60px; }
/* 全屏时：池内浮条常驻显示"上一句"，保证任何屏幕比例都看得见题目 */
#eat-view.fs .eat-cur-card, #eat-view:fullscreen .eat-cur-card { display: none; }
#eat-view.fs #eat-tip, #eat-view:fullscreen #eat-tip { display: none; }
#eat-view.fs .eat-curbar, #eat-view:fullscreen .eat-curbar { display: flex; }
.eat-curbar {
  display: none; position: absolute; top: 8px; left: 10px; right: 10px; z-index: 4;
  align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.88); box-shadow: 0 2px 10px rgba(0,0,0,.12);
  font-weight: 800; color: #1e293b; pointer-events: none; justify-content: center;
}
.eat-curbar .cb-tag { font-size: 11px; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 1px 8px; flex: none; }
.eat-curbar .cb-text { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#eat-view.fs .b-head, #eat-view:fullscreen .b-head { background: rgba(255,255,255,.82); }
@media (orientation: landscape) {
  .eat-cur-card { margin: 0 10px 4px; }
  .eat-pool { min-height: 200px; }
}
.eat-creature.glow { box-shadow: 0 0 0 3px #f59e0b, 0 0 18px #fbbf24; }
.eat-creature.eaten { animation: eatgone .4s forwards; }
.eat-creature.dead { background: #fee2e2; color: #b91c1c; animation: eatgone .35s forwards; }
@keyframes eatgone { to { transform: translate(-50%, -50%) scale(.15); opacity: 0; } }
.eat-bar { height: 10px; margin: 2px 14px 0; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.eat-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg,#38bdf8,#22c55e); transition: width .3s ease; }
.eat-over {
  position: absolute; inset: 0; background: rgba(255,255,255,.93); border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 5; padding: 20px;
}
.tadpole {
  position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: none; cursor: pointer; background: rgba(255,255,255,.85); border-radius: 14px;
  padding: 6px 10px; box-shadow: 0 3px 10px rgba(0,0,0,.12); z-index: 2;
  animation: swim 3s ease-in-out infinite;
}
.tadpole .tp-icon { font-size: 26px; }
.tadpole .tp-line { font-size: 13px; font-weight: 800; color: #1e293b; white-space: nowrap; }
.tadpole.glow { box-shadow: 0 0 0 3px #f59e0b, 0 0 18px #fbbf24; }
.tadpole.eaten { animation: eaten .4s forwards; }
.tadpole.dead { background: #fee2e2; color: #b91c1c; animation: eaten .35s forwards; }
@keyframes swim { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes eaten { to { transform: scale(.2); opacity: 0; } }
.eat-float {
  position: absolute; font-weight: 900; color: #b45309; pointer-events: none;
  animation: dmgfly 1.2s forwards; z-index: 4;
}
.eat-fail { text-align: center; padding: 60px 20px; font-size: 18px; font-weight: 800; color: #b91c1c; }


/* ============ 🔫 英语探索闯关 · 部落对战（板块 kind=raid） ============ */
.raid-stage {
  position: relative; flex: 1; min-height: 340px; margin: 6px 12px 12px;
  background: #1d3b2a; border-radius: 18px; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
#raid-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; touch-action: none; }
.raid-stick {
  position: absolute; width: 132px; height: 132px; margin: -66px 0 0 -66px; z-index: 5;
  border-radius: 50%; background: rgba(15,23,42,.28); border: 3px solid rgba(255,255,255,.45); pointer-events: none;
}
.raid-stick i {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(255,255,255,.75); display: block;
}
.raid-stick[hidden] { display: none !important; }
.raid-prompt {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 8;
  display: flex; align-items: center; gap: 10px; max-width: 94%;
  background: rgba(15,23,42,.82); color: #e2e8f0; border-radius: 14px; padding: 8px 12px;
  font-size: 13px; font-weight: 700;
}
.raid-prompt[hidden] { display: none !important; }
.raid-prompt #raid-prompt-text { flex: 1; }
.raid-read { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(15,23,42,.5); padding: 16px; }
.raid-read[hidden] { display: none !important; }
.rr-card { background: #fff; border-radius: 20px; padding: 18px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.rr-what { font-size: 12px; font-weight: 800; color: #64748b; letter-spacing: .06em; }
.rr-zh { font-size: 20px; font-weight: 900; color: #0f172a; margin: 6px 0; }
.rr-en { font-size: 15px; font-weight: 800; color: #0369a1; margin-bottom: 8px; word-break: break-word; }
.rr-state { font-size: 13px; color: #475569; min-height: 20px; margin-bottom: 10px; white-space: pre-line; }
.rr-acts { display: flex; flex-direction: column; gap: 8px; }
#raid-view.fs #raid-stage, #raid-view:fullscreen #raid-stage { flex: 1; min-height: 0; margin: 0; border-radius: 0; }
#raid-view.fs .eat-hud, #raid-view:fullscreen .eat-hud { color: #e2e8f0; }
#raid-view .shot-hint.flash { background: #fef3c7; color: #92400e; }

/* 🔫 探索闯关：整张大地图只有一个入口（不再把 20 个词铺成 20 个关卡） */
.raid-entry { padding: 10px 12px 12px; background: linear-gradient(180deg,#f0f9ff,#e0f2fe); border: 1px solid #bae6fd; border-radius: 14px; }
.raid-how { font-size: 13.5px; line-height: 1.85; color: #0f172a; }
.raid-meta { margin: 8px 0; font-size: 12.5px; color: #0369a1; }
.raid-meta .raid-ok { color: #16a34a; }
.raid-entry .raid-enter { width: 100%; margin-top: 2px; }
.raid-tip2 { margin-top: 8px; font-size: 12px; color: #64748b; }
.raid-empty { font-size: 13px; color: #b91c1c; padding: 8px 0; }

/* 全屏（进入探索闯关自动全屏）时把玩法铺满屏幕 */
html:fullscreen .app, html:-webkit-full-screen .app { max-width: none; }
html:fullscreen #raid-view, html:-webkit-full-screen #raid-view { min-height: 100vh; }
html:fullscreen #raid-stage { min-height: calc(100vh - 170px); margin: 0; border-radius: 0; }
html:fullscreen #raid-view .shot-hint { margin: 6px 12px; }

/* 探索闯关 · 朗读按钮的"录音中"状态（复刻发音打怪：点一下开始→变红→再点一下结束） */
#rr-mic.live {
  background: linear-gradient(180deg,#ef4444,#b91c1c) !important;
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.35), 0 6px 18px rgba(185,28,28,.35);
  animation: rr-mic-pulse 1.1s ease-in-out infinite;
}
@keyframes rr-mic-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* 探索闯关：主动攻击的「开枪」按钮 */
.raid-shoot-btn { background: linear-gradient(180deg,#f59e0b,#b45309) !important; color: #fff !important; font-weight: 800; }

/* 探索闯关：固定位置的操作区（左下方向摇杆 + 右下圆形开火键） */
.raid-stick {
  position: absolute; width: 148px; height: 148px; margin: -74px 0 0 -74px; z-index: 6;
  border-radius: 50%; background: rgba(15,23,42,.20); border: 3px dashed rgba(255,255,255,.35); pointer-events: none;
}
.raid-firepad {
  position: absolute; width: 116px; height: 116px; margin: -58px 0 0 -58px; z-index: 7;
  border-radius: 50%; border: 3px solid rgba(255,255,255,.5);
  background: radial-gradient(circle at 40% 35%, rgba(251,191,36,.95), rgba(180,83,9,.92));
  color: #fff; font-size: 34px; line-height: 1; cursor: pointer; touch-action: none;
}
.raid-firepad:active { transform: scale(.94); }
.raid-firepad[hidden] { display: none !important; }

/* 探索闯关：控制条放在地图外面，不遮挡地图 */
.raid-pad {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 18px 10px; position: relative;
}
.raid-pad .raid-stick {
  position: relative; width: 132px; height: 132px; margin: 0;
  border-radius: 50%; background: rgba(15,23,42,.10); border: 3px dashed #94a3b8; pointer-events: none; touch-action: none;
}
.raid-pad .raid-stick i {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; background: rgba(148,163,184,.75);
}
.raid-pad .raid-firepad {
  position: relative; width: 118px; height: 118px; margin: 0;
  border-radius: 50%; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(120,53,15,.35);
  background: radial-gradient(circle at 40% 35%, #fbbf24, #b45309); color: #fff; font-size: 36px;
}
.raid-pad .raid-firepad:active { transform: scale(.94); }
.raid-pad-mid { flex: 1; text-align: center; color: #64748b; font-size: 12px; line-height: 1.7; }
.raid-pad-hint { display: block; }
#raid-view:fullscreen .raid-pad, #raid-view.fs .raid-pad { padding: 4px 24px 8px; }
html:fullscreen #raid-stage { min-height: calc(100vh - 300px); }

/* 大地图浮层（M 键） */
.raid-bigmap { position: absolute; inset: 0; z-index: 30; background: rgba(2,6,23,.72); display: flex; align-items: center; justify-content: center; padding: 10px; }
.raid-bigmap[hidden] { display: none !important; }
.rbm-card { background: #0b1220; border: 1px solid #1e293b; border-radius: 16px; padding: 10px; max-width: 96%; max-height: 96%; overflow: auto; }
.rbm-head { display: flex; align-items: center; gap: 10px; color: #e2e8f0; font-size: 14px; margin-bottom: 6px; }
.rbm-head b { flex: 0 0 auto; }
.rbm-head span { flex: 1; color: #93c5fd; font-size: 12px; }
#rbm-canvas { display: block; width: 100%; max-width: 880px; height: auto; border-radius: 10px; background: #12301f; }
.rbm-legend { color: #cbd5e1; font-size: 12px; line-height: 1.7; margin-top: 6px; }
.rbm-tip { color: #fde68a; font-size: 12px; margin-top: 4px; }
#rbm-canvas { cursor: crosshair; }

/* 探索闯关：进入某个区域时的大字提示（蜀门那种"已进入 XX"） */
.raid-zone { position: absolute; left: 0; right: 0; top: 18%; z-index: 22; display: flex; justify-content: center; pointer-events: none; }
.raid-zone[hidden] { display: none !important; }
.raid-zone .rz-inner { background: rgba(2,6,23,.62); border: 1px solid rgba(253,224,71,.5); color: #fde68a;
  padding: 10px 22px; border-radius: 999px; font: 800 20px/1.2 system-ui, sans-serif; letter-spacing: 2px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45); animation: rzFade 2.6s ease forwards; }
.raid-zone .rz-inner small { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0; color: #cbd5e1; margin-top: 2px; }
@keyframes rzFade { 0% { opacity: 0; transform: translateY(-10px) scale(.96); } 12% { opacity: 1; transform: translateY(0) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; } }

/* 探索闯关：打开箱子后多件东西的选择框 */
.raid-pick { position: absolute; inset: 0; z-index: 25; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.raid-pick[hidden] { display: none !important; }
.rp-card { background: #fff; border-radius: 18px; padding: 16px; width: 100%; max-width: 420px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.rp-title { font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.rp-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

/* 探索闯关：竖屏提示（手机横屏才好玩） */
.raid-rotate { position: absolute; inset: 0; z-index: 35; background: rgba(2,6,23,.92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.raid-rotate[hidden] { display: none !important; }
.rr2-card { background: #fff; border-radius: 18px; padding: 18px 20px; max-width: 340px; text-align: center; }

/* 探索闯关：不支持网页全屏的设备用"铺满屏幕"模式（藏掉页头页脚，玩法铺满视口） */
body.raid-pseudo-fs { overflow: hidden; }
body.raid-pseudo-fs .top, body.raid-pseudo-fs .foot { display: none !important; }
body.raid-pseudo-fs .app { max-width: none; padding: 0; }
#raid-view.fs {
  position: fixed; inset: 0; z-index: 90; margin: 0; padding: 0;
  display: flex; flex-direction: column; background: #0b1220; min-height: 100vh; max-width: none;
}
#raid-view.fs #raid-stage { flex: 1; min-height: 0; margin: 0; border-radius: 0; }
#raid-view.fs .b-head, #raid-view.fs .eat-hud { color: #e2e8f0; }
#raid-view.fs .raid-pad { padding: 4px 20px 8px; }

/* 探索闯关：极简布局（地图尽量大，操作全在屏幕上） */
#raid-view { padding: 0 8px; }
#raid-view .b-head { padding: 4px 4px; gap: 6px; }
#raid-view .b-head .mini { padding: 4px 8px; font-size: 13px; }
#raid-view .raid-hud {
  position: absolute; left: 10px; right: 10px; top: 4px; z-index: 8;
  display: flex; gap: 10px; flex-wrap: wrap; padding: 2px 8px;
  background: rgba(2,6,23,.42); border-radius: 10px; color: #e2e8f0; font-size: 13px;
}
#raid-view .raid-stage { margin: 2px 0 2px; border-radius: 12px; }
#raid-view .shot-hint { margin: 2px 4px 6px; font-size: 12px; line-height: 1.5; padding: 4px 8px; background: rgba(2,6,23,.35); color: #cbd5e1; border-radius: 8px; }
/* 地图里的提示条：浮在地图上，几秒后自动消失 */
.raid-tip {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 7;
  max-width: 92%; padding: 5px 10px; border-radius: 10px;
  background: rgba(2,6,23,.55); color: #e2e8f0; font-size: 12px; text-align: center;
  transition: opacity .4s; pointer-events: none;
}
.raid-tip[hidden] { display: none !important; }
/* 手指按住时的方向参考圆点（不占地方，跟手指走） */

/* 探索闯关：地图内的消息浮层（不占地图外面的空间） */
.raid-toast {
  position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 9;
  max-width: 90%; padding: 6px 12px; border-radius: 12px;
  background: rgba(2,6,23,.78); color: #fde68a; font-size: 13px; font-weight: 700; text-align: center;
  pointer-events: none;
}
.raid-toast[hidden] { display: none !important; }

/* 探索闯关（手机优先）：顶部一行按钮也浮在地图上，地图拿到几乎全部高度 */
#raid-view { position: relative; padding: 0; }
#raid-view .b-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 4px 6px; margin: 0; gap: 4px;
  background: linear-gradient(180deg, rgba(2,6,23,.55), rgba(2,6,23,0));
}
#raid-view .b-head .mini { padding: 3px 7px; font-size: 12px; background: rgba(15,23,42,.6); color: #e2e8f0; border: 1px solid rgba(226,232,240,.25); }
#raid-view .b-head .chip { background: rgba(15,23,42,.6); color: #fde68a; }
#raid-view .raid-hud { top: 34px; }
#raid-view .raid-stage { margin: 0; border-radius: 0; flex: 1; min-height: 0; }
@media (min-width: 900px) and (min-height: 700px) {
  /* 电脑/平板：留一点边距更舒服 */
  #raid-view .raid-stage { margin: 4px 0; border-radius: 14px; }
}

#raid-view.math { display: flex; flex-direction: column; min-height: 70vh; }
#raid-view:fullscreen, #raid-view.fs { min-height: 100vh; }

/* 探索闯关：左下角浮层摇杆（浮在地图上，不占地方，像大地图那种浮层） */
.raid-joy {
  position: absolute; left: 18px; bottom: 18px; z-index: 8;
  width: 116px; height: 116px; border-radius: 50%;
  background: rgba(2,6,23,.28); border: 2px dashed rgba(226,232,240,.45);
  touch-action: none; user-select: none;
}
.raid-joy[hidden] { display: none !important; }
.raid-joy i {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; background: rgba(226,232,240,.75); box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: block; transition: transform .06s linear;
}
/* 加载浮层 */
.raid-loading { position: absolute; inset: 0; z-index: 20; background: rgba(2,6,23,.72); display: flex; align-items: center; justify-content: center; }
.raid-loading[hidden] { display: none !important; }
.rl-card { background: #fff; border-radius: 16px; padding: 16px 20px; min-width: 220px; text-align: center; }
.rl-bar { height: 8px; border-radius: 6px; background: #e2e8f0; margin: 10px 0 6px; overflow: hidden; }
.rl-bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg,#38bdf8,#16a34a); transition: width .2s; }
