/* ============================================================
   Steve 的英语冒险 · Minecraft 像素风样式表
   设计原则：全方块化（零圆角）、像素边框、MC 经典配色、按压感
   ============================================================ */

:root {
  /* ---- MC 经典色板 ---- */
  --mc-grass:      #7CBD4A;
  --mc-grass-lt:   #8FD35B;
  --mc-grass-dk:   #5A8F33;
  --mc-dirt:       #8B5A2B;
  --mc-dirt-dk:    #6B4420;
  --mc-stone:      #7F7F7F;
  --mc-stone-lt:   #9C9C9C;
  --mc-stone-dk:   #5A5A5A;
  --mc-cobble:     #6E6E6E;
  --mc-diamond:    #4AEDD9;
  --mc-diamond-dk: #2BB8A8;
  --mc-gold:       #FCEE4B;
  --mc-gold-dk:    #D4A017;
  --mc-redstone:   #D63A2F;
  --mc-redstone-dk:#A32B22;
  --mc-lapis:      #3B4A8C;
  --mc-lapis-lt:   #4A5CA8;
  --mc-emerald:    #17DD62;
  --mc-emerald-dk: #109C45;
  --mc-obsidian:   #1A1024;
  --mc-wood:       #9C6B3C;
  --mc-wood-dk:    #6E4A26;
  --mc-sand:       #E8D5A9;
  --mc-sand-dk:    #C9B183;

  /* ---- 界面语义色 ---- */
  --ui-bg:         #3A2E24;
  --ui-panel:      #C6C6C6;
  --ui-panel-lt:   #DBDBDB;
  --ui-panel-dk:   #8B8B8B;
  --ui-slot:       #8B8B8B;
  --ui-slot-dk:    #373737;
  --ui-text:       #3F3F3F;
  --ui-text-inv:   #FFFFFF;
  --ui-text-dim:   #6B6B6B;

  --px: 2px;   /* 像素边框厚度基准 */

  --font-px: "Press Start 2P", "Courier New", "Consolas", monospace;
  --font-ui: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ui-text);
  background: #6BA8D9;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 15px;
  image-rendering: pixelated;
}

/* ============ 像素背景装饰 ============ */
.bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.px-cloud {
  position: absolute;
  background: #FFFFFF;
  opacity: .82;
  box-shadow:
    16px 0 0 #FFFFFF, 32px 0 0 #FFFFFF,
    -16px 16px 0 #FFFFFF, 0 16px 0 #FFFFFF, 16px 16px 0 #FFFFFF, 32px 16px 0 #FFFFFF, 48px 16px 0 #FFFFFF;
}
.px-cloud-1 { width: 32px; height: 16px; top: 10%; left: -110px; animation: pxDrift 52s linear infinite; }
.px-cloud-2 { width: 16px; height: 16px; top: 30%; left: -90px;  animation: pxDrift 74s linear infinite 12s; opacity: .58; }
.px-cloud-3 { width: 48px; height: 16px; top: 62%; left: -140px; animation: pxDrift 92s linear infinite 26s; opacity: .48; }

@keyframes pxDrift { to { transform: translateX(calc(100vw + 220px)); } }

/* 底部草地 */
.px-grass-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px;
  background: var(--mc-grass);
  box-shadow: inset 0 6px 0 var(--mc-grass-lt), inset 0 -8px 0 var(--mc-dirt);
}
.px-grass-floor::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(90deg, rgba(0,0,0,.09) 2px, transparent 2px);
  background-size: 22px 100%;
}

/* ============ 顶部状态栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 10px 18px;
  background: var(--ui-panel);
  border-bottom: 4px solid var(--ui-panel-dk);
  box-shadow: inset 0 3px 0 var(--ui-panel-lt);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand-cube { width: 34px; height: 34px; flex-shrink: 0; animation: cubeBob 2.2s steps(2, end) infinite; }
.brand-cube svg { width: 100%; height: 100%; display: block; }
@keyframes cubeBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-family: var(--font-px); font-size: 14px; letter-spacing: 0;
  color: #2E4A1E; text-shadow: 2px 2px 0 rgba(255,255,255,.65);
  line-height: 1.35;
}
.brand-text small {
  font-size: 10.5px; color: var(--ui-text-dim); font-weight: 700;
  letter-spacing: .5px; white-space: nowrap;
}

.topbar-right { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

/* 当前关卡徽标 */
.stage-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--ui-slot);
  border: var(--px) solid var(--ui-slot-dk);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.28), inset -2px -2px 0 rgba(255,255,255,.22);
  padding: 6px 11px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 800;
  color: #2E6A2A; cursor: default; white-space: nowrap;
  transition: transform .12s steps(2, end);
}
.stage-chip.bump { transform: scale(1.15); }

.star-counter {
  display: flex; align-items: center; gap: 5px;
  background: var(--ui-slot);
  border: var(--px) solid var(--ui-slot-dk);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.28), inset -2px -2px 0 rgba(255,255,255,.22);
  padding: 6px 12px;
  font-family: var(--font-px); font-size: 12px;
  color: var(--mc-gold);
  text-shadow: 2px 2px 0 #5A4A00;
  transition: transform .12s steps(2, end);
}
.star-counter.bump { transform: scale(1.18); }
.star-icon { font-size: 13px; }
.star-unit { font-size: 8px; opacity: .8; }

.icon-btn {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  background: var(--ui-panel-lt); color: var(--ui-text);
  border: var(--px) solid var(--ui-panel-dk);
  box-shadow: inset 2px 2px 0 #FFFFFF, inset -2px -2px 0 rgba(0,0,0,.2), 0 3px 0 var(--ui-panel-dk);
  padding: 7px 12px; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: none;
}
.icon-btn:hover { background: #EFEFEF; }
.icon-btn:active {
  transform: translateY(3px);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.2), inset -2px -2px 0 #FFFFFF;
}
.ib-ico { font-size: 13px; }

/* ============ 能力导航条 ============ */
.ability-bar {
  position: sticky; top: 62px; z-index: 55;
  display: flex; align-items: center; gap: 16px;
  padding: 11px 18px;
  background: var(--mc-cobble);
  border-bottom: 4px solid #4A4A4A;
  box-shadow: inset 0 3px 0 var(--mc-stone-lt);
}

.ability-track { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }

.ability-btn {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  background: var(--ui-panel);
  color: var(--ui-text);
  border: var(--px) solid var(--ui-panel-dk);
  box-shadow: inset 2px 2px 0 #FFFFFF, inset -2px -2px 0 rgba(0,0,0,.18), 0 3px 0 #4A4A4A;
  padding: 8px 14px; cursor: pointer;
  transition: none;
  white-space: nowrap;
}
.ability-btn:hover { background: #E4E4E4; }
.ability-btn:active { transform: translateY(3px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.18); }
.ability-btn.active {
  background: var(--mc-grass);
  border-color: var(--mc-grass-dk);
  color: #FFFFFF;
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
  box-shadow: inset 2px 2px 0 var(--mc-grass-lt), inset -2px -2px 0 rgba(0,0,0,.2), 0 3px 0 var(--mc-grass-dk);
}
.ab-icon {
  width: 14px; height: 14px; flex-shrink: 0;
  background: currentColor; opacity: .85;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.3);
}
.ab-cn { font-size: 11px; opacity: .8; font-weight: 600; }

/* 能力进度条 */
.ability-progress { flex-shrink: 0; min-width: 168px; }
.ap-label {
  display: flex; justify-content: space-between;
  font-size: 11px; font-weight: 700; color: #E8E8E8;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
  margin-bottom: 5px;
}
.ap-bar {
  height: 14px;
  background: var(--ui-slot-dk);
  border: var(--px) solid #2A2A2A;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.45);
  overflow: hidden;
}
.ap-bar i {
  display: block; height: 100%; width: 0;
  background: var(--mc-emerald);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.28);
  transition: width .35s steps(6, end);
}

/* ============ 布局 ============ */
.layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 272px;
  gap: 16px;
  padding: 16px 18px 44px;
  max-width: 1560px; margin: 0 auto;
  align-items: start;
}

.side-col { display: flex; flex-direction: column; gap: 14px; }

/* ============ 面板（MC 容器风格） ============ */
.panel {
  background: var(--ui-panel);
  border: 3px solid var(--ui-panel-dk);
  box-shadow: inset 3px 3px 0 var(--ui-panel-lt), inset -3px -3px 0 rgba(0,0,0,.16), 0 4px 0 rgba(0,0,0,.18);
  padding: 13px;
}

.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800; color: #2E2E2E;
  margin-bottom: 11px;
  text-shadow: 1px 1px 0 rgba(255,255,255,.7);
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(0,0,0,.14);
}
.pt-cube {
  width: 12px; height: 12px; flex-shrink: 0;
  background: var(--mc-grass);
  box-shadow: inset -3px -3px 0 var(--mc-grass-dk), inset 3px 3px 0 var(--mc-grass-lt);
}

/* ============ 话题按钮 ============ */
.topic-grid { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; padding-right: 3px; }
.topic-grid::-webkit-scrollbar { width: 10px; }
.topic-grid::-webkit-scrollbar-track { background: var(--ui-slot-dk); }
.topic-grid::-webkit-scrollbar-thumb { background: var(--mc-stone); border: 2px solid var(--ui-slot-dk); }

.topic-btn {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
  text-align: left; width: 100%;
  padding: 9px 11px;
  background: var(--ui-panel-lt);
  border: var(--px) solid var(--ui-panel-dk);
  box-shadow: inset 2px 2px 0 #FFFFFF, inset -2px -2px 0 rgba(0,0,0,.14), 0 3px 0 var(--ui-panel-dk);
  color: var(--ui-text);
  cursor: pointer;
  transition: none;
}
.topic-btn:hover { background: #EFEFEF; }
.topic-btn:active { transform: translateY(3px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.14); }
.topic-btn .t-cube {
  width: 18px; height: 18px; flex-shrink: 0;
  background: var(--mc-diamond);
  box-shadow: inset -4px -4px 0 var(--mc-diamond-dk), inset 4px 4px 0 rgba(255,255,255,.45);
}
.topic-btn .t-label { display: flex; flex-direction: column; min-width: 0; }
.topic-btn .t-en { font-size: 13px; font-weight: 700; }
.topic-btn .t-cn { font-size: 11px; color: var(--ui-text-dim); font-weight: 600; }

.topic-btn.active {
  background: var(--mc-grass);
  border-color: var(--mc-grass-dk);
  color: #FFFFFF;
  text-shadow: 1px 1px 0 rgba(0,0,0,.3);
  box-shadow: inset 2px 2px 0 var(--mc-grass-lt), inset -2px -2px 0 rgba(0,0,0,.2), 0 3px 0 var(--mc-grass-dk);
}
.topic-btn.active .t-cn { color: rgba(255,255,255,.85); }
.topic-btn.active .t-cube { background: var(--mc-gold); box-shadow: inset -4px -4px 0 var(--mc-gold-dk), inset 4px 4px 0 rgba(255,255,255,.5); }

/* ============ 闯关地图 ============ */
.stage-map {
  display: flex; flex-direction: column; gap: 7px;
  max-height: 330px; overflow-y: auto; padding-right: 2px;
}

.stage-node {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  background: var(--ui-panel-lt);
  border: var(--px) solid var(--ui-panel-dk);
  box-shadow: inset 2px 2px 0 #FFFFFF, inset -2px -2px 0 rgba(0,0,0,.14), 0 3px 0 var(--ui-panel-dk);
  padding: 7px 9px; cursor: pointer;
  font-family: var(--font-ui);
  transition: none;
}
.stage-node:hover { background: #F0F6EA; }
.stage-node:active { transform: translateY(2px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.14); }

.st-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 18px;
  background: var(--ui-slot);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.25), inset -2px -2px 0 rgba(255,255,255,.2);
}

.st-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.st-name { font-size: 12.5px; font-weight: 800; color: var(--ui-text); line-height: 1.2; }
.st-meta { font-size: 9.5px; font-weight: 700; color: var(--ui-text-dim); }
.st-stars { font-size: 10.5px; letter-spacing: 1px; line-height: 1.2; }
.st-stars .got { color: var(--mc-gold-dk); }
.st-stars .need-n { color: #B9B9B9; }

.st-check {
  flex-shrink: 0; font-size: 13px; font-weight: 900;
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--mc-grass); color: #FFFFFF;
  box-shadow: inset -3px -3px 0 var(--mc-grass-dk), inset 3px 3px 0 rgba(255,255,255,.35);
}

/* 当前关卡：金色高亮 + 呼吸光 */
.stage-node.current {
  background: #FFF6D8;
  border-color: var(--mc-gold-dk);
  box-shadow: inset 2px 2px 0 #FFFFFF, 0 0 0 2px var(--mc-gold), 0 3px 0 var(--mc-gold-dk);
  animation: stageGlow 1.6s steps(2, end) infinite;
}
@keyframes stageGlow {
  0%, 100% { box-shadow: inset 2px 2px 0 #FFFFFF, 0 0 0 2px var(--mc-gold), 0 3px 0 var(--mc-gold-dk); }
  50%      { box-shadow: inset 2px 2px 0 #FFFFFF, 0 0 0 3px var(--mc-gold), 0 3px 0 var(--mc-gold-dk); }
}

/* 已通关 */
.stage-node.cleared .st-name { color: #3E6B33; }

/* 锁定：灰暗 + 不可点 */
.stage-node.locked {
  background: #E4E4E4;
  cursor: not-allowed;
  filter: grayscale(.75);
  opacity: .68;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.5), inset -2px -2px 0 rgba(0,0,0,.12);
}
.stage-node.locked:active { transform: none; }

.stage-tip {
  margin: 9px 0 0; font-size: 10.5px; font-weight: 700;
  color: var(--ui-text-dim); line-height: 1.5;
}

/* ============ 史蒂夫舞台 ============ */
.chat-col { display: flex; flex-direction: column; min-width: 0; }

.teacher-stage {
  background: linear-gradient(180deg, #8FD3F4 0%, #B8E4F7 55%, #D9F0FF 100%);
  background-image:
    linear-gradient(180deg, #8FD3F4 0%, #B8E4F7 55%, #D9F0FF 100%),
    linear-gradient(rgba(255,255,255,.14) 2px, transparent 2px);
  background-size: 100% 100%, 100% 20px;
  border: 3px solid var(--ui-panel-dk);
  box-shadow: inset 3px 3px 0 rgba(255,255,255,.5), inset -3px -3px 0 rgba(0,0,0,.12), 0 4px 0 rgba(0,0,0,.18);
  padding: 14px 18px 16px;
  position: relative;
  overflow: hidden;
}

.steve-wrap {
  position: relative;
  display: flex; align-items: center; gap: 22px;
  min-height: 152px;
}

/* 史蒂夫站在草地上 */
.steve {
  width: 104px; height: 156px; flex-shrink: 0;
  position: relative;
  transition: transform .2s steps(3, end);
  filter: drop-shadow(4px 5px 0 rgba(0,0,0,.18));
}
.steve::after {
  content: ''; position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  width: 104px; height: 10px;
  background: var(--mc-grass);
  box-shadow: inset 0 4px 0 var(--mc-grass-lt), inset 0 -4px 0 var(--mc-dirt);
}
.steve-svg { width: 100%; height: 100%; display: block; }

/* 待机：轻微呼吸 */
.steve.idle { animation: steveIdle 2.4s steps(3, end) infinite; }
@keyframes steveIdle {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* 说话：上下点头 */
.steve.talking { animation: steveTalk .42s steps(2, end) infinite; }
@keyframes steveTalk {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* 倾听：前倾 */
.steve.listening { animation: steveListen 1.4s steps(2, end) infinite; }
@keyframes steveListen {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50%      { transform: translateX(4px) rotate(2deg); }
}

/* 开心：跳一下 */
.steve.happy { animation: steveHappy .62s steps(4, end) 2; }
@keyframes steveHappy {
  0%, 100% { transform: translateY(0); }
  35%      { transform: translateY(-18px); }
  70%      { transform: translateY(-5px); }
}

/* 眼睛眨眼（用 CSS 压扁） */
#steveEyeL, #steveEyeR { transform-origin: center; animation: pxBlink 4.8s steps(1, end) infinite; }
@keyframes pxBlink {
  0%, 94%, 100% { transform: scaleY(1); }
  96%           { transform: scaleY(.1); }
}

/* 说话时嘴巴动 */
.steve.talking #steveMouth { animation: mouthMove .3s steps(2, end) infinite; }
@keyframes mouthMove {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50%      { transform: translateY(-1px) scaleY(.55); }
}
.steve.talking #steveTeeth { animation: teethMove .3s steps(2, end) infinite; }
@keyframes teethMove {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* 对话气泡：MC 对话框风格 */
.speech-bubble {
  position: relative; flex: 1; min-width: 0;
  background: #F5F5F5;
  border: 3px solid #3F3F3F;
  box-shadow: inset 3px 3px 0 #FFFFFF, inset -3px -3px 0 rgba(0,0,0,.13), 4px 5px 0 rgba(0,0,0,.16);
  padding: 14px 17px;
  font-size: 16px; font-weight: 600; line-height: 1.68;
  color: #2E2E2E;
  max-height: 148px; overflow-y: auto;
}
.speech-bubble::-webkit-scrollbar { width: 9px; }
.speech-bubble::-webkit-scrollbar-track { background: #D5D5D5; }
.speech-bubble::-webkit-scrollbar-thumb { background: var(--mc-stone); border: 2px solid #D5D5D5; }

.speech-bubble::before {
  content: ''; position: absolute; left: -13px; top: 42px;
  width: 9px; height: 9px;
  background: #F5F5F5;
  border-left: 3px solid #3F3F3F;
  border-bottom: 3px solid #3F3F3F;
  transform: rotate(45deg);
}

/* 声波（像素柱） */
.sound-waves {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  display: none; align-items: flex-end; gap: 4px; height: 32px;
}
.sound-waves.on { display: flex; }
.sound-waves i {
  width: 6px; background: var(--mc-emerald);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.4);
  animation: pxWave .62s steps(3, end) infinite;
}
.sound-waves i:nth-child(1) { height: 12px; animation-delay: 0s; }
.sound-waves i:nth-child(2) { height: 24px; animation-delay: .1s; }
.sound-waves i:nth-child(3) { height: 32px; animation-delay: .2s; }
.sound-waves i:nth-child(4) { height: 18px; animation-delay: .3s; }
@keyframes pxWave {
  0%, 100% { transform: scaleY(.35); }
  50%      { transform: scaleY(1); }
}

/* ============ 对话记录 ============ */
.chat-log {
  flex: 1; min-height: 230px; max-height: 44vh;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 11px;
  padding: 14px 12px 14px 3px;
  margin-top: 12px;
  background: rgba(0,0,0,.06);
  border: 3px solid rgba(0,0,0,.14);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.07);
}
.chat-log::-webkit-scrollbar { width: 11px; }
.chat-log::-webkit-scrollbar-track { background: var(--ui-slot-dk); }
.chat-log::-webkit-scrollbar-thumb { background: var(--mc-stone); border: 2px solid var(--ui-slot-dk); }
.chat-log::-webkit-scrollbar-thumb:hover { background: var(--mc-stone-lt); }

.msg { display: flex; gap: 9px; max-width: 88%; animation: pxMsgIn .16s steps(2, end); }
@keyframes pxMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
  border: 2px solid rgba(0,0,0,.3);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.3), 2px 2px 0 rgba(0,0,0,.15);
}
.msg.ai .msg-avatar { background: var(--mc-grass); color: #FFFFFF; }
.msg.user .msg-avatar { background: var(--mc-diamond); color: #0A4A42; }

.msg-bubble {
  padding: 11px 14px;
  font-size: 15px; line-height: 1.65;
  word-break: break-word;
  border: 3px solid #3F3F3F;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.9), 3px 3px 0 rgba(0,0,0,.14);
}
.msg.ai .msg-bubble { background: #F5F5F5; color: #2E2E2E; }
.msg.user .msg-bubble {
  background: #C9E8E5; color: #1A4A44; font-weight: 600;
}

.msg-bubble .en { font-weight: 700; color: #1F1F1F; font-size: 16px; }
.msg-bubble .cn {
  display: block; margin-top: 8px; padding-top: 8px;
  border-top: 2px dashed rgba(0,0,0,.18);
  font-size: 13.5px; color: #4A4A4A; font-weight: 600;
}
/* 生词提示 */
.msg-bubble .word-tip {
  display: inline-block;
  background: var(--mc-gold);
  color: #4A3A00;
  font-size: 12px; font-weight: 700;
  padding: 1px 6px; margin: 0 1px;
  border: 1px solid var(--mc-gold-dk);
  cursor: help;
}

.msg-actions { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.mini-btn {
  font-family: var(--font-ui); font-size: 11.5px; font-weight: 700;
  background: var(--ui-panel-lt); color: #3F3F3F;
  border: 2px solid var(--ui-panel-dk);
  box-shadow: inset 1px 1px 0 #FFFFFF, 0 2px 0 var(--ui-panel-dk);
  padding: 4px 10px; cursor: pointer;
  transition: none;
}
.mini-btn:hover { background: #EFEFEF; }
.mini-btn:active { transform: translateY(2px); box-shadow: inset 1px 1px 0 rgba(0,0,0,.15); }

/* 打字光标 */
.typing-cursor {
  display: inline-block; width: 8px; height: 17px;
  background: var(--mc-grass-dk);
  margin-left: 3px; vertical-align: -3px;
  animation: pxCaret .7s steps(1, end) infinite;
}
@keyframes pxCaret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* loading 方块 */
.dots-loading { display: inline-flex; gap: 5px; padding: 3px 1px; }
.dots-loading i {
  width: 9px; height: 9px;
  background: var(--mc-grass);
  box-shadow: inset -2px -2px 0 var(--mc-grass-dk);
  animation: pxDot .8s steps(2, end) infinite;
}
.dots-loading i:nth-child(2) { animation-delay: .15s; background: var(--mc-gold); box-shadow: inset -2px -2px 0 var(--mc-gold-dk); }
.dots-loading i:nth-child(3) { animation-delay: .3s; background: var(--mc-diamond); box-shadow: inset -2px -2px 0 var(--mc-diamond-dk); }
@keyframes pxDot {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50%      { transform: translateY(-6px); opacity: 1; }
}

/* ============ 工作区 ============ */
.workzone { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

/* ============ 输入区 ============ */
.composer {
  background: var(--ui-panel);
  border: 3px solid var(--ui-panel-dk);
  box-shadow: inset 3px 3px 0 var(--ui-panel-lt), inset -3px -3px 0 rgba(0,0,0,.16), 0 4px 0 rgba(0,0,0,.18);
  padding: 13px 15px 12px;
}

.mic-hint {
  font-size: 12.5px; color: var(--ui-text-dim); font-weight: 700;
  text-align: center; margin-bottom: 10px;
}

.composer-row { display: flex; gap: 10px; align-items: stretch; }

/* 麦克风按钮：MC 按钮风格 */
.btn-mic {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 15px; font-weight: 800;
  color: #FFFFFF;
  text-shadow: 2px 2px 0 rgba(0,0,0,.3);
  background: var(--mc-grass);
  border: 3px solid var(--mc-grass-dk);
  box-shadow: inset 3px 3px 0 var(--mc-grass-lt), inset -3px -3px 0 rgba(0,0,0,.2), 0 5px 0 var(--mc-grass-dk);
  padding: 0 22px;
  cursor: pointer;
  user-select: none;
  transition: none;
}
.btn-mic:hover { background: #8ACD55; }
.btn-mic:active, .btn-mic.holding {
  transform: translateY(5px);
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.2), inset -3px -3px 0 rgba(255,255,255,.15), 0 0 0 var(--mc-grass-dk);
  background: var(--mc-emerald-dk);
}
.btn-mic.holding { animation: micFlash .6s steps(2, end) infinite; }
@keyframes micFlash {
  0%, 100% { background: var(--mc-emerald-dk); }
  50%      { background: var(--mc-redstone); }
}
.mic-emoji { font-size: 15px; }

.text-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 7px;
  background: var(--ui-slot-dk);
  border: 3px solid #1F1F1F;
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.5);
  padding: 3px 4px 3px 13px;
}
.text-input-wrap:focus-within { border-color: var(--mc-diamond-dk); }
#textInput {
  flex: 1; border: none; background: transparent;
  font-family: var(--font-ui); font-size: 15px; color: #FFFFFF;
  outline: none; min-width: 0; padding: 9px 0;
  font-weight: 600;
}
#textInput::placeholder { color: #9A9A9A; font-size: 14px; font-weight: 500; }

.btn-send {
  flex-shrink: 0;
  width: 42px; height: 40px;
  background: var(--mc-diamond);
  border: 3px solid var(--mc-diamond-dk);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.55), 0 3px 0 var(--mc-diamond-dk);
  color: #0A4A42; font-size: 15px; cursor: pointer;
  transition: none;
}
.btn-send:hover { background: #6BF5E5; }
.btn-send:active { transform: translateY(3px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.2); }

.composer-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }

.chip {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  background: var(--ui-panel-lt); color: #3F3F3F;
  border: 2px solid var(--ui-panel-dk);
  box-shadow: inset 1px 1px 0 #FFFFFF, 0 3px 0 var(--ui-panel-dk);
  padding: 6px 13px; cursor: pointer;
  transition: none;
}
.chip:hover { background: #EFEFEF; }
.chip:active { transform: translateY(3px); box-shadow: inset 1px 1px 0 rgba(0,0,0,.15); }
.chip-warn { color: #8A2A22; }
.chip-warn:hover { background: #F5DEDA; }

/* ============ 任务面板（笔试/阅读/作文） ============ */
.task-panel {
  display: none;
  background: var(--ui-panel);
  border: 3px solid var(--ui-panel-dk);
  box-shadow: inset 3px 3px 0 var(--ui-panel-lt), inset -3px -3px 0 rgba(0,0,0,.16), 0 4px 0 rgba(0,0,0,.18);
  padding: 13px 15px 15px;
}
.task-panel.on { display: block; }

.task-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(0,0,0,.14);
}
.task-head h3 {
  font-size: 14px; font-weight: 800; color: #2E2E2E;
  display: flex; align-items: center; gap: 8px;
  text-shadow: 1px 1px 0 rgba(255,255,255,.7);
}
.th-cube {
  width: 12px; height: 12px; flex-shrink: 0;
  background: var(--mc-gold);
  box-shadow: inset -3px -3px 0 var(--mc-gold-dk), inset 3px 3px 0 rgba(255,255,255,.5);
}

.btn-task {
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 800;
  color: #FFFFFF; text-shadow: 1px 1px 0 rgba(0,0,0,.3);
  background: var(--mc-lapis);
  border: 2px solid #2A3568;
  box-shadow: inset 2px 2px 0 var(--mc-lapis-lt), 0 3px 0 #2A3568;
  padding: 7px 14px; cursor: pointer; flex-shrink: 0;
  transition: none;
}
.btn-task:hover { background: #4A5CA8; }
.btn-task:active { transform: translateY(3px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.2); }
.btn-task:disabled { opacity: .55; cursor: wait; transform: none; }

.task-body { max-height: 46vh; overflow-y: auto; }
.task-body::-webkit-scrollbar { width: 10px; }
.task-body::-webkit-scrollbar-track { background: var(--ui-slot-dk); }
.task-body::-webkit-scrollbar-thumb { background: var(--mc-stone); border: 2px solid var(--ui-slot-dk); }

.task-hint { font-size: 13px; color: var(--ui-text-dim); text-align: center; padding: 20px 8px; line-height: 1.7; font-weight: 600; }

/* ---- 填空题 ---- */
.quest-item {
  background: #F5F5F5;
  border: 3px solid #3F3F3F;
  box-shadow: inset 2px 2px 0 #FFFFFF, 3px 3px 0 rgba(0,0,0,.14);
  padding: 12px 13px;
  margin-bottom: 10px;
  animation: pxMsgIn .16s steps(2, end) backwards;
}
.quest-item:nth-child(2) { animation-delay: .06s; }
.quest-item:nth-child(3) { animation-delay: .12s; }

.quest-q { font-size: 14.5px; font-weight: 700; color: #2E2E2E; margin-bottom: 10px; line-height: 1.6; }
.quest-q .blank {
  display: inline-block; min-width: 58px;
  background: var(--mc-gold);
  color: #4A3A00; text-align: center;
  border-bottom: 3px solid var(--mc-gold-dk);
  font-weight: 800;
}
.quest-q .blank.filled-correct { background: var(--mc-emerald); color: #0A3D1F; border-color: var(--mc-emerald-dk); }
.quest-q .blank.filled-wrong { background: var(--mc-redstone); color: #FFFFFF; border-color: var(--mc-redstone-dk); }

.quest-options { display: flex; flex-wrap: wrap; gap: 7px; }

.quest-opt {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 700;
  padding: 7px 15px;
  background: var(--ui-panel-lt);
  border: 2px solid var(--ui-panel-dk);
  box-shadow: inset 2px 2px 0 #FFFFFF, 0 3px 0 var(--ui-panel-dk);
  color: #3F3F3F; cursor: pointer;
  transition: none;
}
.quest-opt:hover:not(:disabled) { background: #EFEFEF; }
.quest-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.15); }
.quest-opt:disabled { cursor: default; }
.quest-opt.correct {
  background: var(--mc-emerald); color: #FFFFFF; border-color: var(--mc-emerald-dk);
  text-shadow: 1px 1px 0 rgba(0,0,0,.3);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.35), 0 3px 0 var(--mc-emerald-dk);
}
.quest-opt.wrong {
  background: var(--mc-redstone); color: #FFFFFF; border-color: var(--mc-redstone-dk);
  text-shadow: 1px 1px 0 rgba(0,0,0,.3);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.28), 0 3px 0 var(--mc-redstone-dk);
}
.quest-opt:disabled:not(.wrong):not(.correct) { opacity: .45; }

.quest-trans { margin-top: 9px; font-size: 12.5px; color: #4A4A4A; font-weight: 600; display: none; }

/* ---- 阅读短文 ---- */
.reading-passage {
  background: #F5F5F5;
  border: 3px solid #3F3F3F;
  box-shadow: inset 2px 2px 0 #FFFFFF, 3px 3px 0 rgba(0,0,0,.14);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.reading-title {
  font-size: 15px; font-weight: 800; color: #1F1F1F;
  margin-bottom: 9px;
  display: flex; align-items: center; gap: 8px;
}
.reading-text { font-size: 14.5px; line-height: 1.85; color: #2E2E2E; font-weight: 600; }
.reading-text .word-tip {
  background: var(--mc-gold); color: #4A3A00;
  padding: 1px 5px; border: 1px solid var(--mc-gold-dk);
  font-size: 13px; cursor: help;
}

/* ---- 作文 ---- */
.writing-prompt {
  background: #FFF9E0;
  border: 3px solid var(--mc-gold-dk);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.8), 3px 3px 0 rgba(0,0,0,.14);
  padding: 13px 15px;
  margin-bottom: 12px;
}
.writing-prompt h4 {
  font-size: 14px; font-weight: 800; color: #6B5000;
  margin-bottom: 7px;
  display: flex; align-items: center; gap: 8px;
}
.writing-prompt p { font-size: 14px; color: #4A3A00; font-weight: 600; line-height: 1.7; }
.writing-prompt .wp-cn { font-size: 13px; color: #7A6220; margin-top: 6px; }

.writing-tips { margin-top: 10px; padding-top: 10px; border-top: 2px dashed rgba(140,110,0,.3); }
.writing-tips strong { font-size: 12.5px; color: #6B5000; display: block; margin-bottom: 5px; }
.writing-tips ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.writing-tips li { font-size: 12.5px; color: #5A4A10; font-weight: 600; padding-left: 14px; position: relative; }
.writing-tips li::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 6px; height: 6px; background: var(--mc-gold-dk);
}

.paper-area { margin-top: 4px; }
.paper-area textarea {
  width: 100%; min-height: 130px;
  font-family: var(--font-ui); font-size: 14.5px; line-height: 1.8;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 3px solid #3F3F3F;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.08);
  color: #2E2E2E; font-weight: 600; resize: vertical;
  outline: none;
  background-image: linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px);
  background-size: 100% 27px;
  background-position: 0 13px;
}
.paper-area textarea:focus { border-color: var(--mc-grass-dk); }
.paper-area textarea::placeholder { color: #B0B0B0; font-weight: 500; }

.paper-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 9px; flex-wrap: wrap;
}
.word-count { font-size: 12.5px; font-weight: 700; color: var(--ui-text-dim); }
.word-count.ok { color: var(--mc-emerald-dk); }

/* ============ 纠错/点评本 ============ */
.fix-list { display: flex; flex-direction: column; gap: 9px; max-height: 44vh; overflow-y: auto; padding-right: 3px; }
.fix-list::-webkit-scrollbar { width: 9px; }
.fix-list::-webkit-scrollbar-track { background: var(--ui-slot-dk); }
.fix-list::-webkit-scrollbar-thumb { background: var(--mc-stone); border: 2px solid var(--ui-slot-dk); }

.fix-empty { font-size: 12.5px; color: var(--ui-text-dim); text-align: center; padding: 18px 8px; line-height: 1.7; font-weight: 600; }

.fix-card {
  padding: 10px 12px;
  border: 3px solid;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.75), 2px 2px 0 rgba(0,0,0,.14);
  font-size: 13px;
  line-height: 1.62;
  animation: pxMsgIn .16s steps(2, end) backwards;
}
.fix-card.good { background: #DFF5E3; border-color: var(--mc-emerald-dk); }
.fix-card.warn { background: #FFF3D6; border-color: var(--mc-gold-dk); }
.fix-card.love { background: #F5E4F0; border-color: #A85C96; }

.fix-head { display: flex; align-items: center; gap: 6px; font-weight: 800; margin-bottom: 7px; font-size: 13px; }
.fix-line { margin-top: 5px; }
.fix-wrong { color: var(--mc-redstone-dk); text-decoration: line-through; font-weight: 700; }
.fix-right { color: var(--mc-emerald-dk); font-weight: 800; }
.fix-tip { color: #4A4A4A; font-size: 12px; margin-top: 6px; display: block; font-weight: 600; }

/* ============ 成就徽章（MC 物品格） ============ */
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.ach-count {
  font-family: var(--font-px); font-size: 10px;
  color: var(--mc-gold-dk);
  background: var(--ui-slot);
  border: 2px solid var(--ui-slot-dk);
  padding: 2px 6px;
  box-shadow: inset 1px 1px 0 rgba(0,0,0,.2);
}

.badge {
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 4px;
  background: var(--ui-slot);
  border: 2px solid var(--ui-slot-dk);
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.3), inset -2px -2px 0 rgba(255,255,255,.2);
  text-align: center;
  transition: none;
}
.badge .b-icon {
  font-size: 19px; line-height: 1;
  filter: grayscale(1) opacity(.45);
}
.badge .b-name { font-size: 8.5px; font-weight: 700; color: #A8A8A8; line-height: 1.2; }
.badge.unlocked {
  background: var(--ui-panel-lt);
  border-color: var(--mc-gold-dk);
  box-shadow: inset 2px 2px 0 #FFFFFF, 0 0 0 2px var(--mc-gold);
}
.badge.unlocked .b-icon {
  filter: none;
  animation: badgePop .4s steps(3, end);
}
.badge.unlocked .b-name { color: #4A3A00; }
@keyframes badgePop {
  0% { transform: scale(.7); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ============ 成就解锁庆祝浮层 ============ */
.ach-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10, 10, 20, .72);
  display: none; place-items: center;
  padding: 20px;
}
.ach-overlay.on { display: grid; }

.ach-card {
  position: relative;
  background: var(--ui-panel);
  border: 4px solid var(--mc-gold-dk);
  box-shadow: inset 4px 4px 0 var(--ui-panel-lt), inset -4px -4px 0 rgba(0,0,0,.18),
              0 0 0 4px var(--mc-gold), 10px 12px 0 rgba(0,0,0,.45);
  padding: 26px 34px 20px;
  text-align: center;
  min-width: 290px; max-width: 360px;
  animation: achPopIn .32s steps(4, end);
}
@keyframes achPopIn {
  0%   { transform: scale(.55) rotate(-3deg); opacity: 0; }
  70%  { transform: scale(1.08) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

.ach-ribbon {
  font-family: var(--font-px); font-size: 13px; letter-spacing: 1px;
  color: #5A4A00;
  background: var(--mc-gold);
  border: 2px solid var(--mc-gold-dk);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.5), inset -2px -2px 0 rgba(0,0,0,.18);
  padding: 5px 10px;
  display: inline-block;
  margin-bottom: 14px;
}

.ach-icon {
  font-size: 54px; line-height: 1;
  margin-bottom: 10px;
  animation: achFloat 1.4s steps(2, end) infinite;
}
@keyframes achFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.ach-name {
  font-family: var(--font-px); font-size: 17px;
  color: #2E4A1E; text-shadow: 2px 2px 0 rgba(255,255,255,.6);
  margin-bottom: 7px;
}

.ach-desc {
  font-size: 12.5px; font-weight: 700; color: var(--ui-text);
  line-height: 1.6; margin-bottom: 12px;
}

.ach-reward {
  display: inline-block;
  font-family: var(--font-ui); font-size: 12px; font-weight: 800;
  color: #1A4A44;
  background: #CFF5EA;
  border: 2px solid #6FC5B0;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.6);
  padding: 5px 12px;
  margin-bottom: 12px;
}

.ach-tap {
  font-size: 9.5px; font-weight: 700; color: var(--ui-text-dim);
  letter-spacing: .5px;
}

/* ============ 正在听 浮层 ============ */
.listening-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 10, 20, .7);
  display: none; place-items: center;
  padding: 20px;
}
.listening-overlay.on { display: grid; }

.listening-card {
  background: var(--ui-panel);
  border: 4px solid var(--ui-panel-dk);
  box-shadow: inset 4px 4px 0 var(--ui-panel-lt), inset -4px -4px 0 rgba(0,0,0,.18), 8px 10px 0 rgba(0,0,0,.4);
  padding: 32px 40px 26px;
  text-align: center;
  min-width: 300px;
  animation: pxMsgIn .18s steps(2, end);
}

.listening-cube {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: var(--mc-redstone);
  box-shadow: inset -12px -12px 0 var(--mc-redstone-dk), inset 12px 12px 0 rgba(255,255,255,.3);
  animation: listenPulse 1s steps(2, end) infinite;
}
@keyframes listenPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.14); }
}

.listening-label { font-size: 15px; font-weight: 800; color: #2E2E2E; margin-bottom: 13px; }
.listening-heard {
  font-size: 15px; font-weight: 700; color: #1A4A44;
  min-height: 40px; max-height: 100px; overflow-y: auto;
  background: var(--ui-slot-dk);
  border: 3px solid #1F1F1F;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.5);
  color: #FFFFFF;
  padding: 11px 15px; margin-bottom: 18px;
}
.listening-heard:empty::before { content: '开口说吧…'; color: #9A9A9A; font-weight: 600; }

.btn-stop {
  font-family: var(--font-ui); font-size: 15px; font-weight: 800;
  color: #FFFFFF; text-shadow: 2px 2px 0 rgba(0,0,0,.3);
  background: var(--mc-emerald);
  border: 3px solid var(--mc-emerald-dk);
  box-shadow: inset 3px 3px 0 rgba(255,255,255,.35), 0 5px 0 var(--mc-emerald-dk);
  padding: 12px 38px; cursor: pointer;
  transition: none;
}
.btn-stop:hover { background: #22EE72; }
.btn-stop:active { transform: translateY(5px); box-shadow: inset 3px 3px 0 rgba(0,0,0,.2); }

/* ============ 设置弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(10, 10, 20, .72);
  display: none; place-items: center; padding: 20px;
}
.modal-mask.on { display: grid; }

.modal-card {
  background: var(--ui-panel);
  border: 4px solid var(--ui-panel-dk);
  box-shadow: inset 4px 4px 0 var(--ui-panel-lt), inset -4px -4px 0 rgba(0,0,0,.18), 8px 10px 0 rgba(0,0,0,.4);
  padding: 22px 26px 22px;
  width: min(420px, 100%);
  max-height: 88vh; overflow-y: auto;
  animation: pxMsgIn .18s steps(2, end);
}
.modal-card h3 {
  font-size: 16px; margin-bottom: 18px; color: #2E2E2E; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  text-shadow: 1px 1px 0 rgba(255,255,255,.7);
  padding-bottom: 13px; border-bottom: 2px solid rgba(0,0,0,.14);
}

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > span { font-size: 13.5px; font-weight: 700; color: #2E2E2E; }
.field-inline { flex-direction: row; align-items: center; justify-content: space-between; }

.field select {
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  padding: 9px 12px;
  background: var(--ui-slot-dk);
  border: 3px solid #1F1F1F;
  box-shadow: inset 2px 2px 0 rgba(0,0,0,.5);
  color: #FFFFFF; outline: none; cursor: pointer;
}
.field input[type=range] { width: 100%; accent-color: var(--mc-grass-dk); }
.field em { font-style: normal; font-size: 12.5px; color: var(--ui-text-dim); font-weight: 700; }
.field input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--mc-grass-dk); cursor: pointer; }

.btn-primary {
  width: 100%; font-family: var(--font-ui); font-size: 15px; font-weight: 800;
  color: #FFFFFF; text-shadow: 2px 2px 0 rgba(0,0,0,.3);
  background: var(--mc-grass);
  border: 3px solid var(--mc-grass-dk);
  box-shadow: inset 3px 3px 0 var(--mc-grass-lt), 0 5px 0 var(--mc-grass-dk);
  padding: 12px; cursor: pointer;
  transition: none;
}
.btn-primary:hover { background: #8ACD55; }
.btn-primary:active { transform: translateY(5px); box-shadow: inset 3px 3px 0 rgba(0,0,0,.2); }

/* ============ 提示词浮层 ============ */
.hint-popup {
  position: fixed; z-index: 90;
  background: #F5F5F5;
  border: 3px solid #3F3F3F;
  box-shadow: inset 3px 3px 0 #FFFFFF, 6px 7px 0 rgba(0,0,0,.24);
  padding: 13px 16px;
  display: none;
  min-width: 260px; max-width: 330px;
}
.hint-popup.on { display: block; animation: pxMsgIn .16s steps(2, end); }
.hint-popup strong { display: block; font-size: 13px; color: #2E2E2E; margin-bottom: 9px; }
.hint-popup ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hint-popup li button {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  background: var(--ui-panel-lt);
  border: 2px solid var(--ui-panel-dk);
  box-shadow: inset 1px 1px 0 #FFFFFF, 0 2px 0 var(--ui-panel-dk);
  padding: 7px 11px; width: 100%; text-align: left; cursor: pointer;
  color: #3F3F3F;
  transition: none;
}
.hint-popup li button:hover { background: #FFFFFF; }
.hint-popup li button:active { transform: translateY(2px); box-shadow: inset 1px 1px 0 rgba(0,0,0,.15); }

/* ============ 奖励动画 ============ */
.reward-layer { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }

.flying-xp {
  position: absolute; width: 18px; height: 18px;
  background: var(--mc-emerald);
  box-shadow: inset -5px -5px 0 var(--mc-emerald-dk), inset 5px 5px 0 rgba(255,255,255,.5);
  animation: flyXp 1.05s steps(6, end) forwards;
}
@keyframes flyXp {
  0%   { opacity: 0; transform: translateY(16px) scale(.4); }
  20%  { opacity: 1; transform: translateY(-10px) scale(1.3); }
  100% { opacity: 0; transform: translateY(-120px) scale(.7); }
}

.px-confetti {
  position: absolute; width: 10px; height: 10px;
  animation: pxConfetti 1.4s steps(8, end) forwards;
}
@keyframes pxConfetti {
  0%   { opacity: 1; transform: translateY(-24px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(70vh) rotate(320deg); }
}

/* ============ 提示条 ============ */
.toast {
  position: fixed; top: 118px; left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: var(--ui-slot-dk);
  border: 3px solid var(--mc-grass-dk);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.14), 5px 6px 0 rgba(0,0,0,.3);
  color: #FFFFFF; font-size: 13.5px; font-weight: 700;
  padding: 11px 22px;
  opacity: 0; pointer-events: none; z-index: 300;
  transition: opacity .18s steps(3, end), transform .18s steps(3, end);
  max-width: 84vw; text-align: center;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  .layout { grid-template-columns: 218px minmax(0, 1fr); }
  .side-col:last-child { grid-column: 1 / -1; flex-direction: row; }
  .side-col:last-child .panel { flex: 1; }
  .badge-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; padding: 14px 12px 40px; gap: 13px; }
  .side-col:last-child { flex-direction: column; }
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 12px; }
  .steve { width: 78px; height: 117px; }
  .steve-wrap { gap: 14px; min-height: 118px; }
  .speech-bubble { font-size: 14.5px; padding: 11px 14px; max-height: 120px; }
  .chat-log { max-height: 36vh; min-height: 180px; }
  .ability-bar { flex-direction: column; align-items: stretch; gap: 10px; top: 58px; }
  .ability-progress { min-width: 0; }
  .topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); max-height: none; }
  .topic-btn .t-cn { display: none; }
}

@media (max-width: 600px) {
  .composer-row { flex-direction: column; }
  .btn-mic { padding: 14px; justify-content: center; }
  .icon-btn span:not(.ib-ico) { display: none; }
  .topic-grid { grid-template-columns: 1fr; }
  .msg { max-width: 95%; }
  .listening-card { padding: 26px 20px 22px; min-width: 0; width: 92vw; }
  .task-head { flex-direction: column; align-items: stretch; }
  .brand-text strong { font-size: 11px; }
}

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