/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --c-purple: #6C5CE7;
  --c-pink: #FF6FA5;
  --c-orange: #FF8A5B;
  --c-green: #3FB984;
  --c-blue: #36B7D6;
  --c-yellow: #FFB23E;
  --ink: #3A3357;
  --ink-soft: #8A83A8;
  --card: #FFFFFF;
  --bg1: #EDE9FF;
  --bg2: #FFF4E6;
  --shadow: 0 8px 20px rgba(108, 92, 231, 0.16);
  --radius: 22px;
}
html, body {
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Comic Sans MS", "Baloo 2", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
b { font-weight: 700; }

/* ===== 顶部栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.08);
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-logo { font-size: 26px; }
.brand-name { font-weight: 800; font-size: 18px; color: var(--c-purple); letter-spacing: 0.5px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.coin-box {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #FFD76B, #FFB23E);
  color: #7A4B00; font-weight: 800;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(255, 178, 62, 0.4);
  min-width: 64px; justify-content: center;
}
.coin-emoji { font-size: 16px; }
.pet-quick {
  font-size: 24px; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.pet-quick:active { transform: scale(0.9); }

/* ===== 主内容 ===== */
.app {
  max-width: 880px; margin: 0 auto;
  padding: 18px 16px 96px;
  min-height: 100%;
}

/* 标题块 */
.page-head { text-align: center; margin: 6px 0 18px; }
.page-head h1 { font-size: 24px; color: var(--c-purple); }
.page-head p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--c-purple); font-weight: 700;
  padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.back-btn:active { transform: scale(0.96); }

/* ===== 闯关地图 ===== */
.map-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
.unit-card {
  position: relative; overflow: hidden;
  background: var(--card); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
  transition: transform 0.18s;
  border: 3px solid transparent;
}
.unit-card:active { transform: scale(0.97); }
.unit-card.locked { filter: grayscale(0.6); opacity: 0.75; }
.unit-badge {
  font-size: 40px; width: 64px; height: 64px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.unit-title { font-size: 18px; font-weight: 800; }
.unit-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.unit-meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; }
.stars { color: var(--c-yellow); letter-spacing: 1px; }
.lock-tag {
  position: absolute; top: 12px; right: 12px; font-size: 22px;
}
.progress-ring { font-size: 12px; color: var(--ink-soft); }

/* ===== 模式选择 ===== */
.mode-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.mode-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: 20px; padding: 16px 18px;
  box-shadow: var(--shadow); transition: transform 0.18s;
  text-align: left; width: 100%;
}
.mode-card:active { transform: scale(0.97); }
.mode-icon { font-size: 34px; width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.mode-text b { font-size: 17px; display: block; }
.mode-text span { font-size: 13px; color: var(--ink-soft); }

/* ===== 单词学习卡片 ===== */
.word-stage { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.word-card {
  width: 100%; max-width: 320px; height: 220px;
  perspective: 1000px; cursor: pointer;
}
.word-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.5s; transform-style: preserve-3d;
}
.word-card.flipped .word-inner { transform: rotateY(180deg); }
.word-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--shadow); padding: 16px; text-align: center;
}
.word-face.front { background: linear-gradient(150deg, #fff, #F3F0FF); }
.word-face.back { background: linear-gradient(150deg, #FFF0F6, #FFE3EE); transform: rotateY(180deg); }
.word-emoji { font-size: 56px; }
.word-en { font-size: 30px; font-weight: 800; color: var(--c-purple); }
.word-ipa { font-size: 15px; color: var(--ink-soft); }
.word-zh { font-size: 22px; font-weight: 700; }
.word-hint { font-size: 12px; color: var(--ink-soft); }
.speak-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-purple));
  color: #fff; font-size: 32px; box-shadow: 0 8px 18px rgba(54, 183, 214, 0.45);
  display: flex; align-items: center; justify-content: center;
}
.speak-big:active { transform: scale(0.92); }
.word-actions { display: flex; gap: 12px; width: 100%; max-width: 320px; }
.btn-know, .btn-unknown {
  flex: 1; padding: 14px; border-radius: 16px; font-weight: 800; font-size: 16px;
  box-shadow: var(--shadow); transition: transform 0.15s;
}
.btn-know { background: var(--c-green); color: #fff; }
.btn-unknown { background: #fff; color: var(--c-orange); }
.btn-know:active, .btn-unknown:active { transform: scale(0.95); }
.counter-pill { font-size: 13px; color: var(--ink-soft); font-weight: 700; }

/* ===== 测验 ===== */
.quiz-stage { display: flex; flex-direction: column; gap: 16px; }
.quiz-progress { height: 10px; background: #E6E1FF; border-radius: 999px; overflow: hidden; }
.quiz-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-green), var(--c-blue)); border-radius: 999px; transition: width 0.3s; }
.quiz-q { font-size: 22px; font-weight: 800; text-align: center; padding: 8px 0; }
.quiz-q .play-sound {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; margin-left: 8px;
  background: #EFE9FF; font-size: 20px; vertical-align: middle;
}
.quiz-options { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.quiz-opt {
  background: #fff; border-radius: 16px; padding: 18px 12px;
  font-size: 18px; font-weight: 700; box-shadow: var(--shadow);
  transition: transform 0.15s; text-align: center;
}
.quiz-opt:active { transform: scale(0.96); }
.quiz-opt.correct { background: var(--c-green); color: #fff; }
.quiz-opt.wrong { background: #FF7675; color: #fff; }
.quiz-opt:disabled { opacity: 0.7; }
.quiz-score { text-align: center; font-size: 14px; color: var(--ink-soft); }

/* ===== 句子跟读 ===== */
.sentence-list { display: flex; flex-direction: column; gap: 14px; }
.sentence-card {
  background: #fff; border-radius: 20px; padding: 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.sentence-en { font-size: 20px; font-weight: 800; color: var(--c-purple); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sentence-zh { font-size: 15px; color: var(--ink-soft); }
.sentence-actions { display: flex; gap: 10px; }
.mini-speak {
  background: linear-gradient(135deg, var(--c-blue), var(--c-purple));
  color: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 14px;
}
.btn-done {
  background: var(--c-green); color: #fff; border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 14px;
  margin-left: auto;
}
.sentence-card.read .btn-done { background: var(--ink-soft); }

/* ===== 萌宠养成 ===== */
.pet-stage { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.pet-scene {
  width: 100%; background: linear-gradient(160deg, #D9F4FF, #E9E3FF);
  border-radius: var(--radius); padding: 24px; text-align: center;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.pet-figure { font-size: 96px; line-height: 1; animation: float 2.6s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }
.pet-stage-name { font-weight: 800; font-size: 18px; margin-top: 6px; }
.pet-house { display: inline-block; margin-top: 8px; padding: 5px 14px; border-radius: 999px;
  background: linear-gradient(90deg, #FFF3D6, #FFE0EC); color: #C47A1A; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 12px rgba(196,122,26,0.18); }
.pet-stage-stage { font-size: 13px; color: var(--ink-soft); }
.mood-bar { width: 100%; max-width: 320px; }
.mood-bar label { font-size: 13px; color: var(--ink-soft); display: flex; justify-content: space-between; }
.mood-track { height: 14px; background: #E6E1FF; border-radius: 999px; overflow: hidden; margin-top: 4px; }
.mood-track > i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-orange), var(--c-pink)); border-radius: 999px; transition: width 0.4s; }
.evo-card { width: 100%; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.evo-card h3 { font-size: 15px; margin-bottom: 10px; color: var(--c-purple); }
.evo-steps { display: flex; justify-content: space-between; gap: 6px; }
.evo-step { flex: 1; text-align: center; font-size: 11px; color: var(--ink-soft); }
.evo-step .e { font-size: 26px; display: block; }
.evo-step.done { color: var(--c-green); font-weight: 700; }
.evo-step.cur { color: var(--c-purple); font-weight: 800; }
.shop-title { width: 100%; font-weight: 800; color: var(--c-purple); margin-top: 4px; }
.shop-grid { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.shop-item { background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow); text-align: center; }
.shop-item .si-emoji { font-size: 36px; }
.shop-item .si-name { font-size: 13px; font-weight: 700; margin: 4px 0; }
.shop-item .si-cost { font-size: 12px; color: var(--c-orange); font-weight: 700; }
.buy-btn {
  margin-top: 8px; width: 100%; background: var(--c-yellow); color: #7A4B00;
  font-weight: 800; padding: 8px; border-radius: 12px; font-size: 13px;
}
.buy-btn:disabled { background: #E6E1FF; color: #B9B2D6; }
.buy-btn:active:not(:disabled) { transform: scale(0.95); }
.feed-msg { font-size: 13px; color: var(--c-green); font-weight: 700; min-height: 18px; }

/* ===== 我的 ===== */
.me-card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.me-card h3 { font-size: 15px; color: var(--c-purple); margin-bottom: 12px; }
.stat-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #EEE; font-size: 14px; }
.stat-row:last-child { border-bottom: none; }
.stat-row b { color: var(--c-purple); }
.me-actions { display: grid; gap: 12px; }
.me-btn {
  background: linear-gradient(135deg, var(--c-purple), var(--c-pink));
  color: #fff; font-weight: 800; padding: 14px; border-radius: 16px; font-size: 15px;
  box-shadow: var(--shadow);
}
.me-btn.alt { background: #fff; color: var(--c-purple); }
.me-btn:active { transform: scale(0.97); }

/* ===== 结果弹窗 ===== */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(58, 51, 87, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.result-card {
  background: #fff; border-radius: 26px; padding: 28px 24px; text-align: center;
  max-width: 340px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  animation: pop 0.35s ease;
}
@keyframes pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.result-card .big-emoji { font-size: 64px; }
.result-card h2 { color: var(--c-purple); margin: 8px 0; }
.result-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 16px; }
.result-card .reward { font-size: 20px; font-weight: 800; color: var(--c-orange); margin-bottom: 16px; }

/* ===== 底部导航 ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-around;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  box-shadow: 0 -4px 16px rgba(108,92,231,0.1);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  max-width: 880px; margin: 0 auto;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--ink-soft); font-size: 12px; padding: 4px 8px; border-radius: 14px;
  transition: color 0.2s;
}
.nav-btn span { font-size: 21px; }
.nav-btn b { font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ===== 贴纸图鉴 + 许愿 ===== */
.card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h3 { font-size: 15px; color: var(--c-purple); margin-bottom: 12px; }
.sticker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-cell { background: #F7F5FF; border-radius: 14px; padding: 12px 6px; text-align: center; opacity: 0.45; transition: opacity 0.2s; }
.st-cell.got { opacity: 1; background: linear-gradient(160deg, #FFF6E0, #FFEFC7); }
.st-emoji { font-size: 30px; line-height: 1; }
.st-name { font-size: 11px; font-weight: 700; margin-top: 5px; }
.st-desc { font-size: 10px; color: var(--ink-soft); margin-top: 2px; line-height: 1.3; }
.wish-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #F0EDFF; }
.wish-item:last-child { border-bottom: none; }
.w-text { font-size: 14px; }
.w-status { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.w-status.granted { color: var(--c-green); font-weight: 800; }

/* 愿望主卡片（先许愿 → 追目标 → 领取） */
.wish-hero { background: linear-gradient(160deg, #FFF6E0, #FFEFC7); border: 2px solid #FFE0A3; }
.wish-hero h3 { color: #B7791F; }
.wish-lead { font-size: 13px; color: #8A6D3B; line-height: 1.7; margin-bottom: 14px; }
.wish-text {
  font-size: 18px; font-weight: 800; color: var(--ink);
  background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(183, 121, 31, 0.10);
}
.wp-track { height: 14px; background: rgba(255, 255, 255, 0.75); border-radius: 999px; overflow: hidden; }
.wp-track i { display: block; height: 100%; background: linear-gradient(90deg, #FFB02E, #FF8A5B); border-radius: 999px; transition: width 0.4s; }
.wp-label { font-size: 13px; color: #8A6D3B; font-weight: 700; margin-top: 8px; }
.wish-done {
  margin-top: 12px; padding: 12px; border-radius: 14px; text-align: center;
  background: #fff; color: var(--c-green); font-weight: 800; font-size: 14px;
  box-shadow: 0 2px 8px rgba(63, 185, 132, 0.15);
}
.wish-tip { margin-top: 10px; font-size: 13px; color: #8A6D3B; }

/* 目标难度选择 */
.goal-pick { display: flex; gap: 10px; margin-bottom: 10px; }
.goal-opt {
  flex: 1; background: #F7F5FF; border-radius: 14px; padding: 12px 10px; text-align: center;
  border: 2px solid transparent; cursor: pointer;
}
.goal-opt.on { background: #EFEBFF; border-color: var(--c-purple); }
.goal-opt b { display: block; font-size: 14px; color: var(--ink); }
.goal-opt small { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }

/* 家长端心愿条目（修改 + 确认兑现） */
.pw-item { padding: 14px 0; border-bottom: 1px solid #F0EDFF; }
.pw-item:last-of-type { border-bottom: none; }
.pw-text { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.pw-state { font-size: 12px; color: var(--ink-soft); margin: 6px 0 10px; }
.pw-state.ready { color: var(--c-orange); font-weight: 800; }
.pw-state.ok { color: var(--c-green); font-weight: 800; }
.pw-ops { display: flex; gap: 8px; }
.buy-btn.small { flex: 1; padding: 8px 6px; font-size: 12px; border-radius: 12px; }
.buy-btn.dim { opacity: 0.55; }
.nav-btn.active { color: var(--c-purple); }
.nav-btn.active b { color: var(--c-purple); }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; top: 70px; transform: translateX(-50%) translateY(-20px);
  background: var(--c-purple); color: #fff; font-weight: 700;
  padding: 10px 20px; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 60; font-size: 15px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 响应式 ===== */
@media (min-width: 600px) {
  .map-grid { grid-template-columns: repeat(3, 1fr); }
  .mode-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 820px) {
  .quiz-options { grid-template-columns: repeat(4, 1fr); }
  .page-head h1 { font-size: 28px; }
}

/* ===== 顶部用户标签 ===== */
.brand-user {
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--c-pink), var(--c-purple));
  padding: 3px 10px; border-radius: 999px; margin-left: 4px;
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== 拼写闯关 ===== */
.spell-slot {
  min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; border-radius: 16px; padding: 10px 16px; box-shadow: var(--shadow);
  font-size: 30px; font-weight: 800; letter-spacing: 4px; color: var(--c-purple); flex-wrap: wrap;
}
.spell-slot .ph { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink-soft); }
.spell-slot span { min-width: 22px; text-align: center; border-bottom: 3px solid var(--c-blue); padding: 0 2px; }
.spell-keys { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.spell-key {
  width: 52px; height: 56px; border-radius: 14px;
  background: linear-gradient(150deg, #fff, #F0EDFF);
  font-size: 26px; font-weight: 800; color: var(--c-purple);
  box-shadow: var(--shadow); transition: transform 0.15s;
}
.spell-key:active:not(:disabled) { transform: scale(0.92); }
.spell-key:disabled { opacity: 0.3; }
.spell-ops { display: flex; gap: 12px; justify-content: center; }
.spell-ops .mini-speak { background: #fff; color: var(--c-purple); }

/* ===== 用户管理 / 报告 ===== */
.user-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.user-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow);
  border: 3px solid transparent;
}
.user-card.active { border-color: var(--c-purple); }
.user-ava { font-size: 36px; width: 52px; height: 52px; border-radius: 14px; background: #F3F0FF; display: flex; align-items: center; justify-content: center; }
.user-meta { flex: 1; }
.user-meta b { font-size: 16px; display: block; }
.user-meta span { font-size: 12px; color: var(--ink-soft); }
.user-ops { display: flex; align-items: center; gap: 8px; }
.cur-tag { font-size: 12px; color: var(--c-green); font-weight: 800; }
.btn-del { background: #FFE9E9; color: #FF7675; font-weight: 700; padding: 6px 12px; border-radius: 10px; font-size: 13px; }
.btn-del:active { transform: scale(0.95); }

.add-user { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.add-user h3 { font-size: 15px; color: var(--c-purple); margin-bottom: 12px; }
.name-input {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid #E6E1FF;
  font-size: 16px; font-family: inherit; outline: none; margin-bottom: 12px;
}
.name-input:focus { border-color: var(--c-purple); }

.pet-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.pet-opt {
  flex: 1; min-width: 56px; padding: 10px 4px; border-radius: 14px;
  background: #F3F0FF; font-size: 28px; text-align: center; line-height: 1.1;
  border: 3px solid transparent; transition: transform 0.15s;
}
.pet-opt small { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.pet-opt.on { border-color: var(--c-purple); background: #E4DEFF; }
.pet-opt:active { transform: scale(0.94); }

.report-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rep-chip {
  background: #fff; color: var(--ink-soft); font-weight: 700; font-size: 13px;
  padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow);
}
.rep-chip.on { background: linear-gradient(135deg, var(--c-purple), var(--c-pink)); color: #fff; }

.unit-prog { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.up-name { font-size: 13px; width: 86px; flex-shrink: 0; font-weight: 700; }
.up-track { flex: 1; height: 12px; background: #E6E1FF; border-radius: 999px; overflow: hidden; }
.up-track > i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-green), var(--c-blue)); border-radius: 999px; }
.up-num { font-size: 12px; color: var(--ink-soft); width: 48px; text-align: right; }

/* ---------- 跟读练习 / 录音 / 自评 ---------- */
.rec-btn {
  display: block; width: 100%; max-width: 320px; margin: 14px auto 0; padding: 14px;
  border: none; border-radius: 16px; background: #FFE9F2; color: #E84393;
  font-size: 16px; font-weight: 800; font-family: inherit; box-shadow: var(--shadow);
}
.rec-btn:active { transform: scale(0.97); }
.read-rate { margin-top: 16px; text-align: center; }
.read-tip { font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; font-weight: 700; }
.rate-btn {
  display: block; width: 100%; max-width: 320px; margin: 8px auto; padding: 14px;
  border: none; border-radius: 16px; font-size: 16px; font-weight: 800; font-family: inherit;
  box-shadow: var(--shadow); transition: transform 0.12s;
}
.rate-btn:active { transform: scale(0.97); }
.rate-btn.great { background: linear-gradient(135deg, #FFD66B, #FFB02E); color: #7A4B00; }
.rate-btn.ok { background: #E4F8EC; color: #1B9E5A; }
.rate-btn.more { background: #EAF1FF; color: #2D6CDF; }
.read-rate.mini { margin-top: 8px; }
.read-rate.mini .rate-btn { display: inline-block; width: auto; max-width: none; margin: 4px 4px 0; padding: 8px 14px; font-size: 13px; }
.read-badge { display: inline-block; margin-top: 8px; color: var(--c-green); font-weight: 800; font-size: 14px; }

/* 离线提示页 */
.offline-box { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.offline-box .big-emoji { font-size: 64px; margin-bottom: 12px; }
.offline-box h2 { color: var(--ink); margin-bottom: 10px; }
.offline-box p { max-width: 320px; margin: 0 auto 20px; line-height: 1.6; }

/* ===== 跟读自动打分 ===== */
.upload-btn { display: block; width: 100%; margin: 10px 0; padding: 13px; border: none; border-radius: 14px; background: #fff; color: #293DD4; font-weight: 700; font-size: 15px; box-shadow: 0 2px 8px rgba(41, 61, 212, .15); cursor: pointer; }
.upload-btn:active { transform: scale(.98); }
.rec-on { background: #E26D6D !important; color: #fff !important; }
.score-result { margin: 10px 0; min-height: 10px; }
.score-loading, .score-err { text-align: center; color: #888; font-size: 14px; padding: 16px; }
.score-err { color: #E26D6D; }
.score-card { background: #fff; border-radius: 16px; padding: 18px 16px; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); text-align: center; }
.score-ring { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #eee 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }
.score-ring span { position: relative; font-size: 30px; font-weight: 800; color: var(--c); }
.score-ring small { position: relative; font-size: 12px; color: #888; }
.score-detail { font-size: 14px; line-height: 1.9; text-align: left; margin: 6px 0; }
.score-detail b { color: #293DD4; }
.score-tip { color: #FF8A5B; font-size: 13px; }
.next-btn { margin-top: 12px; width: 100%; padding: 12px; border: none; border-radius: 12px; background: #293DD4; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.next-btn:active { transform: scale(.98); }

/* ===== 录音打分 通用样式（单词 / 句子 / 跟读练习 共用） ===== */
.record-box { margin: 10px 0 6px; }
.record-btns { display: flex; gap: 8px; align-items: stretch; }
.record-btns .rec-btn, .record-btns .upload-btn {
  flex: 1; max-width: none; margin: 0; padding: 12px 8px; font-size: 14px;
}
.record-btns .rec-btn { background: linear-gradient(135deg, #FFB02E, #E84393); color: #fff; }
.record-btns .upload-btn { background: #fff; color: #293DD4; }
.record-btns .rec-btn.rec-on { background: #E26D6D !important; }
.record-hint { font-size: 13px; color: var(--ink-soft); padding: 10px 12px; background: #FFF7E6; border: 1px dashed #FF8A5B; border-radius: 12px; line-height: 1.6; }
.record-hint code { background: #fff; padding: 1px 6px; border-radius: 4px; font-family: ui-monospace, Menlo, Consolas, monospace; color: #293DD4; }
.score-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 800; vertical-align: middle; }
.sentence-card.spoken { border-color: #3FB984; }
.sentence-card.spoken .sentence-en::before { content: "🎙️ "; }
.word-actions { flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.word-actions > button { flex: 1 1 28%; min-width: 76px; }
@media (max-width: 480px) { .record-btns { flex-direction: column; } .record-btns .rec-btn, .record-btns .upload-btn { width: 100%; } }

