/* =========================================================
   布丁老师 · AI 英语口语私教  —— 样式表
   风格：明亮、圆润、卡通，面向 3-6 年级小学生
   ========================================================= */

:root {
  --orange:   #ff8a3d;
  --orange-d: #f2701a;
  --mint:     #34cfa0;
  --mint-d:   #1fae83;
  --purple:   #9b7bff;
  --blue:     #3aa8ff;
  --pink:     #ff5c8a;
  --yellow:   #ffce3d;
  --ink:      #40342b;
  --ink-2:    #7a6a5d;
  --line:     #eadfd2;
  --card:     #ffffff;
  --radius:   26px;
  --shadow:   0 10px 0 rgba(0,0,0,.06), 0 16px 34px rgba(120,90,60,.14);
  --shadow-s: 0 4px 0 rgba(0,0,0,.06), 0 8px 18px rgba(120,90,60,.12);
}

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

html, body {
  height: 100%;
  margin: 0;
  font-family: "Baloo 2", "Segoe UI Rounded", "Comic Sans MS", "PingFang SC",
               "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--ink);
  background: #cdeeff;
  overflow: hidden;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input  { font-family: inherit; }

/* ---------------------------------------------------- 背景 */
.sky {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, #7fd4ff 0%, #b6e7ff 38%, #e6f7ff 62%, #fff6d9 100%);
  overflow: hidden;
}
.cloud {
  position: absolute; background: #fff; border-radius: 100px;
  filter: blur(.4px); opacity: .9;
  box-shadow: 0 20px 40px rgba(120,170,220,.18);
}
.cloud::before, .cloud::after {
  content: ''; position: absolute; background: #fff; border-radius: 50%;
}
.c1 { width: 190px; height: 62px; top: 12%; left: -240px; animation: drift 58s linear infinite; }
.c1::before { width: 90px; height: 90px; top: -40px; left: 26px; }
.c1::after  { width: 62px; height: 62px; top: -26px; left: 104px; }
.c2 { width: 140px; height: 48px; top: 30%; left: -200px; animation: drift 82s linear infinite 8s; }
.c2::before { width: 68px; height: 68px; top: -30px; left: 20px; }
.c2::after  { width: 48px; height: 48px; top: -20px; left: 78px; }
.c3 { width: 230px; height: 74px; top: 6%; left: -300px; animation: drift 110s linear infinite 22s; opacity: .75; }
.c3::before { width: 108px; height: 108px; top: -52px; left: 32px; }
.c3::after  { width: 74px; height: 74px; top: -30px; left: 128px; }
@keyframes drift { to { transform: translateX(calc(100vw + 320px)); } }

.hill {
  position: absolute; bottom: -80px; border-radius: 50% 50% 0 0;
}
.h1 { left: -8%;  width: 62vw; height: 250px; background: #9fe0a8; opacity: .85; }
.h2 { right: -10%; width: 70vw; height: 200px; background: #7fd693; opacity: .8; }

.star { position: absolute; font-size: 20px; opacity: .85; animation: twinkle 3.4s ease-in-out infinite; }
.s1 { top: 16%; right: 12%; animation-delay: .2s; }
.s2 { top: 40%; right: 6%;  animation-delay: 1.1s; font-size: 15px; }
.s3 { top: 8%;  right: 30%; animation-delay: 2s; font-size: 17px; }
@keyframes twinkle {
  0%,100% { transform: scale(1) rotate(0deg); opacity: .55; }
  50%     { transform: scale(1.35) rotate(18deg); opacity: 1; }
}

/* ---------------------------------------------------- 欢迎页 */
.welcome {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #7fd4ff, #b6e7ff 45%, #fff3cf);
  padding: 20px;
  transition: opacity .45s ease, visibility .45s;
}
.welcome.hide { opacity: 0; visibility: hidden; }
.welcome-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 34px;
  padding: 28px 30px 26px;
  text-align: center;
  box-shadow: 0 22px 0 rgba(0,0,0,.07), 0 30px 70px rgba(80,120,160,.3);
  border: 6px solid #fff;
  animation: pop .5s cubic-bezier(.2,1.5,.4,1);
  max-height: 100%; overflow-y: auto;
}
@keyframes pop { from { transform: scale(.85) translateY(20px); opacity: 0; } }
.welcome-mascot svg { width: 132px; height: 132px; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }
.welcome-card h1 { font-size: 27px; margin: 6px 0 4px; color: var(--orange-d); }
.welcome-sub { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.welcome-points { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.welcome-points span {
  background: #fff4e2; color: var(--orange-d); font-size: 13px; font-weight: 700;
  padding: 6px 13px; border-radius: 999px; border: 2px dashed #ffcfa0;
}
.welcome-grade p { font-size: 15px; font-weight: 700; margin: 12px 0 10px; }
.grade-pick { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.grade-pick button {
  padding: 12px 20px; border-radius: 18px; background: #f4f8ff;
  border: 3px solid #d9e8ff; font-weight: 800; font-size: 15px; color: #4a6b96;
  transition: .18s;
}
.grade-pick button:hover { transform: translateY(-3px); }
.grade-pick button.on {
  background: var(--orange); border-color: var(--orange-d); color: #fff;
  box-shadow: 0 6px 0 var(--orange-d);
}
.btn-start {
  margin-top: 20px;
  width: 100%; padding: 17px; border-radius: 22px;
  background: linear-gradient(180deg, #ffc44d, #ff9a2e);
  color: #fff; font-size: 20px; font-weight: 900; letter-spacing: 1px;
  box-shadow: 0 8px 0 #e07c10, 0 14px 26px rgba(224,124,16,.35);
  transition: .12s;
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 10px 0 #e07c10, 0 18px 30px rgba(224,124,16,.4); }
.btn-start:active { transform: translateY(6px); box-shadow: 0 2px 0 #e07c10; }
.welcome-tip { font-size: 12px; color: #a99b8e; margin: 16px 0 0; }

/* ---------------------------------------------------- 布局 */
.app {
  position: relative; z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  padding: 12px 18px 16px;
  max-width: 1240px; margin: 0 auto;
}

/* ---------------------------------------------------- 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: var(--shadow-s);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mascot svg { width: 52px; height: 52px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 20px; color: var(--orange-d); }
.brand-text small { font-size: 11px; color: var(--ink-2); letter-spacing: .5px; }

.top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill-group {
  display: flex; background: #f1f6fb; border-radius: 999px; padding: 3px; gap: 2px;
  border: 2px solid #e2ecf6;
}
.pill-group button {
  width: 34px; height: 30px; border-radius: 999px; font-weight: 800; font-size: 14px;
  color: #7c93ab; transition: .16s;
}
.pill-group button:hover { background: #e3eefb; }
.pill-group button.on { background: var(--blue); color: #fff; box-shadow: 0 3px 0 #2a8ada; }

.toggle {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 800;
  background: #f1f6fb; color: #93a8bd; border: 2px solid #e2ecf6; transition: .16s;
}
.toggle.on { background: #e6fbf3; color: var(--mint-d); border-color: #a9ecd3; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; background: #fff2e2; font-size: 17px;
  border: 2px solid #ffdfbe; transition: .18s;
}
.icon-btn:hover { transform: rotate(-90deg); }

/* ---------------------------------------------------- 模式导航 */
.modes {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
}
.mode-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 4px 10px; border-radius: 20px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px);
  border: 3px solid transparent;
  box-shadow: var(--shadow-s);
  transition: .18s; position: relative; overflow: hidden;
}
.mode-btn .mi { font-size: 22px; line-height: 1.1; }
.mode-btn b { font-size: 13.5px; color: var(--ink); }
.mode-btn i { font-size: 10.5px; font-style: normal; color: #a2948a; }
.mode-btn:hover { transform: translateY(-3px); }
.mode-btn.active {
  background: linear-gradient(180deg, #fff, #fff4e4);
  border-color: var(--orange);
  box-shadow: 0 6px 0 #ffcf9e, 0 12px 22px rgba(255,138,61,.24);
}
.mode-btn.active b { color: var(--orange-d); }

/* ---------------------------------------------------- 舞台 */
.stage { position: relative; min-height: 0; }
.panel {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px 16px;
  min-height: 0;
}
.panel.active { display: flex; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }

/* ---------------------------------------------------- 对话面板 */
.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 6px 10px; border-bottom: 2px dashed var(--line); margin-bottom: 10px;
}
.chat-head-left { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 700; }
.dot-live {
  width: 10px; height: 10px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 4px rgba(52,207,160,.22); animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot { 50% { box-shadow: 0 0 0 9px rgba(52,207,160,0); } }
.stars-total { font-size: 14px; font-weight: 900; color: var(--yellow); text-shadow: 0 1px 0 #e0a800; }

/* ---------------------------------------------------- 等级 & 成就 */
.level-chip {
  font-size: 12.5px; font-weight: 900; padding: 7px 14px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe9a8, #ffd257); color: #7a5200;
  border: 2px solid #f0b429; box-shadow: 0 3px 0 #d99e17; transition: .15s;
  white-space: nowrap;
}
.level-chip:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #d99e17; }
.level-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 #d99e17; }

.lv-banner {
  background: linear-gradient(135deg, #fff8e1, #ffefd0);
  border: 3px solid #ffe1a1; border-radius: 20px; padding: 16px 18px;
}
.lv-top { display: flex; align-items: center; gap: 12px; }
.lv-emoji { font-size: 34px; line-height: 1; }
.lv-info { flex: 1; min-width: 0; }
.lv-info b { display: block; font-size: 17px; color: #8a5a00; }
.lv-info small { display: block; font-size: 12.5px; color: #a9812f; margin-top: 2px; }
.lv-stars { font-size: 15px; font-weight: 900; color: #e0a800; white-space: nowrap; }
.lv-bar {
  height: 14px; border-radius: 999px; background: #fff; border: 2px solid #f2dfae;
  margin-top: 12px; overflow: hidden;
}
.lv-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ffce3d, #ff8a3d);
  transition: width .5s cubic-bezier(.22,1,.36,1);
}
.lv-hint { font-size: 12.5px; color: #a9812f; margin-top: 9px; font-weight: 700; }

.lv-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.lv-node {
  background: #f6f1e8; border: 2px solid #e7dcc9; border-radius: 16px;
  padding: 11px 13px; opacity: .62;
}
.lv-node .lve { font-size: 22px; }
.lv-node b { display: block; font-size: 13px; color: var(--ink); margin-top: 4px; }
.lv-node small { display: block; font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.lv-node.open { opacity: 1; background: #fff9ec; border-color: #ffe1a1; }
.lv-node.now { border-color: var(--orange); background: #fff3e2; box-shadow: 0 4px 0 #ffd9b3; }

.ach-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 9px;
}
.ach {
  background: #f6f1e8; border: 2px solid #e7dcc9; border-radius: 16px;
  padding: 12px 13px; opacity: .66;
}
.ach .ache { font-size: 24px; }
.ach b { display: block; font-size: 13.5px; color: var(--ink); margin-top: 4px; }
.ach small { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.ach i { display: block; font-style: normal; font-size: 11px; font-weight: 800; color: #c9b48f; margin-top: 6px; }
.ach.got {
  opacity: 1; background: linear-gradient(160deg, #fffdf4, #fff3d6);
  border-color: #ffd76b; box-shadow: 0 3px 0 #ffe7a8;
}
.ach.got i { color: #d99e17; }
.ach.got .ache { filter: drop-shadow(0 2px 3px rgba(217,158,23,.45)); }

/* ---------------------------------------------------- 全屏庆祝时刻 */
.celeb-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(64, 52, 43, .55);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: celebFadeIn .25s ease-out;
}
@keyframes celebFadeIn { from { opacity: 0; } to { opacity: 1; } }

.celeb-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.celeb-rain span {
  position: absolute; top: -48px;
  animation: celebFall linear forwards;
}
@keyframes celebFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  100% { transform: translateY(110vh) rotate(340deg); opacity: .9; }
}

.celeb-card {
  position: relative;
  background: linear-gradient(165deg, #fffdf4, #fff1cd);
  border: 4px solid #ffd76b; border-radius: 30px;
  box-shadow: 0 14px 0 rgba(0,0,0,.12), 0 30px 60px rgba(0,0,0,.25);
  padding: 34px 46px 26px; text-align: center; max-width: 86vw;
  animation: celebPop .5s cubic-bezier(.18,1.4,.4,1);
}
.celeb-card.level { border-color: #ff9d4d; background: linear-gradient(165deg, #fff8ec, #ffe3c4); }
@keyframes celebPop {
  0%   { transform: scale(.4) translateY(60px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.celeb-emoji {
  font-size: 64px; line-height: 1; margin-bottom: 12px;
  animation: celebBounce 1.1s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 10px rgba(217,158,23,.5));
}
@keyframes celebBounce {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-10px) scale(1.07); }
}
.celeb-card b { display: block; font-size: 24px; color: #7a5200; }
.celeb-card.level b { color: #a8541a; }
.celeb-card small { display: block; font-size: 14.5px; color: #a9812f; margin-top: 8px; font-weight: 700; }
.celeb-card i {
  display: inline-block; font-style: normal; margin-top: 14px;
  font-size: 13.5px; font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #ffce3d, #f5b41c);
  padding: 7px 18px; border-radius: 999px; box-shadow: 0 3px 0 #d99e17;
}
.celeb-tip {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  font-size: 13px; font-weight: 800; color: rgba(255,255,255,.85);
  animation: celebBlink 1.2s ease-in-out infinite alternate;
}
@keyframes celebBlink { from { opacity: .45; } to { opacity: 1; } }

/* ---------------------------------------------------- 家长周报 */
.weekly {
  background: linear-gradient(165deg, #ffffff, #f7faff);
  border: 3px solid #dbe9f8; border-radius: 20px; padding: 16px 18px;
}
.wk-kpis {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px;
}
.wk-kpi {
  background: #f2f8ff; border: 2px solid #e2eefb; border-radius: 14px;
  padding: 9px 6px; text-align: center;
}
.wk-kpi i { font-style: normal; font-size: 17px; }
.wk-kpi b { display: block; font-size: 15.5px; color: #2f6ea8; margin-top: 2px; }
.wk-kpi small { display: block; font-size: 10.5px; color: #8fa3b6; margin-top: 1px; }
.wk-meta {
  margin-top: 12px; font-size: 12.5px; color: #7a6a5d; line-height: 1.9;
  background: #fff9ec; border: 2px dashed #ffe1a1; border-radius: 12px; padding: 8px 12px;
}
.wk-meta b { color: #a8541a; }
.wk-sec { margin-top: 13px; font-size: 13px; font-weight: 900; color: var(--ink); }
.wk-sec ul { margin: 6px 0 0; padding-left: 20px; }
.wk-sec li { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; font-weight: 600; }
.wk-sec li b { color: #146e52; }
.wk-hint { margin-top: 13px; font-size: 11.5px; color: #a99787; font-weight: 700; }

/* 打印时周报保持原色 */
@media print {
  .weekly { border-color: #c8d8ea; }
  .wk-kpi, .wk-meta { background: #fff; }
}

/* ---------------------------------------------------- 生词复习挑战 */
.wg-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wg-bar {
  flex: 1; height: 12px; border-radius: 999px; background: #eef4fb;
  border: 2px solid #dfeaf6; overflow: hidden;
}
.wg-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #34cfa0, #3aa8ff);
  transition: width .35s ease;
}
.wg-progress span { font-size: 12.5px; font-weight: 900; color: #7a8ba0; white-space: nowrap; }

.wg-card {
  background: linear-gradient(165deg, #ffffff, #f2fbff);
  border: 3px solid #cfe9fb; border-radius: 22px;
  padding: 22px 18px; text-align: center; margin-bottom: 14px;
}
.wg-card small { display: block; font-size: 12px; font-weight: 800; color: #8fa3b6; letter-spacing: 1px; }
.wg-card b {
  display: inline-block; margin-top: 8px; font-size: 30px; color: #23608f;
  cursor: pointer; transition: transform .15s;
}
.wg-card b:hover { transform: scale(1.05); }

.wg-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.wg-opt {
  min-height: 56px; border-radius: 16px; padding: 10px 12px;
  font-size: 15.5px; font-weight: 800; color: #40566b;
  background: #f4f9fd; border: 3px solid #e2eef8; transition: .15s;
}
.wg-opt:hover { background: #eaf5ff; border-color: #bcdcf5; transform: translateY(-2px); }
.wg-opt.locked { cursor: default; }
.wg-opt.locked:hover { transform: none; }
.wg-opt.right { background: #e8fbf2; border-color: #6fdcb4; color: #0e7d58; }
.wg-opt.wrong { background: #fdeeee; border-color: #f2a6a6; color: #c0392b; }

.wg-end { text-align: center; padding: 18px 6px 6px; }
.wg-end-ico { font-size: 58px; line-height: 1; }
.wg-end b { display: block; font-size: 34px; color: #23608f; margin-top: 10px; }
.wg-end small { display: block; font-size: 13.5px; color: #8fa3b6; font-weight: 700; margin-top: 8px; }
.wg-end-acts { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }





.chat-scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 4px 6px 10px; display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}
.chat-scroll::-webkit-scrollbar { width: 9px; }
.chat-scroll::-webkit-scrollbar-thumb { background: #ffd9b0; border-radius: 9px; }

.msg { display: flex; gap: 10px; max-width: 88%; animation: fadeUp .28s ease; }
.msg.tutor { align-self: flex-start; }
.msg.user  { align-self: flex-end; flex-direction: row-reverse; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
  background: #fff2e1; display: grid; place-items: center; overflow: hidden;
  border: 3px solid #ffd9a8;
}
.avatar svg { width: 44px; height: 44px; }
.msg.user .avatar { background: #e6f4ff; border-color: #b9dcff; font-size: 22px; }

.bubble {
  background: #fff; border-radius: 20px; padding: 12px 16px;
  box-shadow: var(--shadow-s); border: 3px solid #ffe6c9;
  position: relative;
}
.msg.user .bubble {
  background: linear-gradient(180deg, #5fc0ff, #35a6f5);
  border-color: #2a90dd; color: #fff; border-bottom-right-radius: 6px;
}
.msg.tutor .bubble { border-bottom-left-radius: 6px; }

.bubble .en {
  font-size: 19px; line-height: 1.45; font-weight: 700; margin: 0;
  color: #2f2419; letter-spacing: .2px;
}
.msg.user .bubble .en { color: #fff; font-size: 17px; }
.bubble .zh {
  font-size: 13.5px; color: #9c8b7c; margin: 7px 0 0; line-height: 1.5;
  border-top: 1px dashed #eee2d4; padding-top: 7px;
}
.msg.user .bubble .zh { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.3); }

.speak-hint { font-size: 12px; color: #c3b3a4; margin-top: 6px; font-style: italic; }

.bubble-actions { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.mini-btn {
  font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 999px;
  background: #fff4e8; color: var(--orange-d); border: 2px solid #ffdcb6; transition: .15s;
}
.mini-btn:hover { background: #ffe9d3; transform: translateY(-1px); }
.mini-btn.playing { background: var(--orange); color: #fff; border-color: var(--orange-d); }

.word-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.wchip {
  background: #eef9f4; border: 2px solid #b7ecd6; border-radius: 12px;
  padding: 4px 10px; font-size: 12.5px; color: #1e8a68;
  display: flex; align-items: center; gap: 5px;
}
.wchip b { font-size: 13.5px; color: #146e52; }
.wchip .spk { font-size: 12px; opacity: .7; }

/* 纠错卡片 */
.fixcard {
  align-self: flex-start; margin: -4px 0 0 54px; max-width: 84%;
  background: linear-gradient(180deg, #fff9ec, #fff3dd);
  border: 3px dashed #ffc97d; border-radius: 18px; padding: 11px 15px;
  box-shadow: var(--shadow-s); animation: fadeUp .3s ease;
}
.fixcard.ok { background: linear-gradient(180deg, #effcf6, #e2f8ee); border-color: #8fdcbb; }
.fixcard .fix-title { font-size: 12.5px; font-weight: 900; color: var(--orange-d); margin-bottom: 6px; letter-spacing: .5px; }
.fixcard.ok .fix-title { color: var(--mint-d); }
.fixcard .fix-body { font-size: 15px; line-height: 1.65; color: #5b4a3d; }
.fixcard .fix-body .bad  { color: #e8543a; text-decoration: line-through; text-decoration-thickness: 2px; }
.fixcard .fix-body .good { color: #18996d; font-weight: 800; }

/* 建议回答 */
.suggest-row {
  display: flex; gap: 7px; flex-wrap: wrap; padding: 8px 2px 6px; min-height: 0;
}
.suggest-row:empty { display: none; }
.sug {
  font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px;
  background: #fff; color: #2d7fc4; border: 2px solid #bfe2ff;
  box-shadow: 0 3px 0 #d9ecff; transition: .15s;
}
.sug:hover { background: #eaf6ff; transform: translateY(-2px); }

/* 输入栏 */
.input-bar { display: flex; align-items: center; gap: 9px; padding-top: 4px; }
#chatInput {
  flex: 1; height: 52px; border-radius: 18px; border: 3px solid #e6ded4;
  padding: 0 18px; font-size: 16px; background: #fffdfa; outline: none; color: var(--ink);
  transition: .18s;
}
#chatInput:focus { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(58,168,255,.14); }
.send-btn {
  height: 52px; padding: 0 24px; border-radius: 18px; font-size: 16px; font-weight: 900;
  background: linear-gradient(180deg, #56c9ff, #2f9de8); color: #fff;
  box-shadow: 0 5px 0 #1f7cbd; transition: .13s; white-space: nowrap;
}
.send-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #1f7cbd; }
.send-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1f7cbd; }
.send-btn:disabled { filter: grayscale(.6); opacity: .6; transform: none; }

.mic-btn {
  position: relative; width: 56px; height: 56px; border-radius: 50%; flex: 0 0 56px;
  background: linear-gradient(180deg, #ffb15c, #ff8a3d);
  box-shadow: 0 5px 0 #d96d18; display: grid; place-items: center;
  transition: .13s;
}
.mic-btn .mic-ico { font-size: 25px; position: relative; z-index: 2; }
.mic-btn:hover { transform: translateY(-2px); }
.mic-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d96d18; }
.mic-btn.rec { background: linear-gradient(180deg, #ff8080, #f04b4b); box-shadow: 0 5px 0 #c22c2c; }
.mic-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 3px solid #ff8a3d; opacity: 0;
}
.mic-btn.rec .mic-ring { animation: ring 1.4s ease-out infinite; border-color: #f04b4b; }
@keyframes ring {
  from { transform: scale(1); opacity: .85; }
  to   { transform: scale(1.75); opacity: 0; }
}

.listen-status {
  min-height: 18px; font-size: 12.5px; color: var(--orange-d); font-weight: 700;
  text-align: center; padding-top: 4px;
}

/* 打字光标 */
.caret::after {
  content: ''; display: inline-block; width: 9px; height: 18px;
  background: var(--orange); margin-left: 3px; vertical-align: -3px;
  animation: blink .8s steps(1) infinite; border-radius: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* 三条跳动小点 */
.typing { display: flex; gap: 5px; align-items: center; height: 22px; }
.typing span {
  width: 9px; height: 9px; border-radius: 50%; background: #ffb26b;
  animation: jump 1.1s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: .16s; }
.typing span:nth-child(3) { animation-delay: .32s; }
@keyframes jump { 0%,60%,100% { transform: translateY(0); opacity: .55 } 30% { transform: translateY(-7px); opacity: 1 } }

/* ---------------------------------------------------- 卡片面板 */
.scorebar { display: flex; gap: 10px; margin-bottom: 10px; }
.stat {
  flex: 1; background: linear-gradient(180deg, #fffaf0, #fff3e0);
  border: 3px solid #ffe0b5; border-radius: 18px; padding: 7px 6px;
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.stat .ico { font-size: 15px; }
.stat b { font-size: 21px; color: var(--orange-d); }
.stat i { font-size: 10.5px; font-style: normal; color: #a99787; }

.topic-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.topic-row:empty { display: none; }
.topic-chip {
  font-size: 12.5px; font-weight: 800; padding: 6px 13px; border-radius: 999px;
  background: #f3f7fb; color: #7b8fa3; border: 2px solid #e3ecf5; transition: .15s;
}
.topic-chip:hover { background: #e9f3ff; }
.topic-chip.on { background: var(--purple); color: #fff; border-color: #7d5cf0; box-shadow: 0 3px 0 #6b4ad8; }
/* 当前教材单元的话题（贴着课本走） */
.topic-unit-tag {
  font-size: 12px; font-weight: 800; color: #6b4ad8; align-self: center;
  padding: 2px 4px; white-space: nowrap;
}
.topic-chip.unit { background: #f0ebff; color: #6b4ad8; border-color: #ddd0ff; }
.topic-chip.unit:hover { background: #e6ddff; }
.topic-chip.unit.on { background: var(--purple); color: #fff; border-color: #7d5cf0; box-shadow: 0 3px 0 #6b4ad8; }

.qcard {
  flex: 1; min-height: 0; overflow-y: auto;
  background: linear-gradient(180deg, #ffffff, #fdfbff);
  border: 4px solid #eee5f9; border-radius: 22px;
  padding: 18px 20px; display: flex; flex-direction: column;
}
.qcard::-webkit-scrollbar { width: 9px; }
.qcard::-webkit-scrollbar-thumb { background: #e2d5f5; border-radius: 9px; }

.loading-card { margin: auto; text-align: center; color: var(--ink-2); font-weight: 700; }
.spinner {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border: 6px solid #ffe4c4; border-top-color: var(--orange);
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.q-tag {
  display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 900;
  padding: 5px 13px; border-radius: 999px; background: #efe8ff; color: #6b4ad8;
  margin-bottom: 12px; letter-spacing: .5px;
}
.q-stem {
  font-size: clamp(19px, 2.2vw, 26px); font-weight: 800; line-height: 1.6;
  color: #2f2419; margin: 0 0 8px; letter-spacing: .3px;
}
.q-zh { font-size: 14px; color: #9f8f80; margin: 0 0 16px; line-height: 1.6; }

.blank {
  display: inline-block; min-width: 92px; padding: 0 10px; margin: 0 4px;
  border-bottom: 4px dashed #ffb26b; text-align: center; color: var(--orange-d);
}
.blank.ok { color: #18996d; border-color: #59cfa5; background: #e8fbf3; border-radius: 8px 8px 0 0; }
.blank.no { color: #e8543a; border-color: #f0957f; background: #ffeceb; border-radius: 8px 8px 0 0; }

.big-speaker {
  width: 130px; height: 130px; border-radius: 50%; margin: 6px auto 16px;
  background: linear-gradient(180deg, #6fd8ff, #2fa8f0);
  box-shadow: 0 8px 0 #1b7fc0; display: grid; place-items: center;
  font-size: 54px; color: #fff; transition: .14s; position: relative;
}
.big-speaker:hover { transform: translateY(-3px); box-shadow: 0 11px 0 #1b7fc0; }
.big-speaker:active { transform: translateY(5px); box-shadow: 0 2px 0 #1b7fc0; }
.big-speaker.playing { animation: spkPulse .7s ease-in-out infinite; }
@keyframes spkPulse { 50% { transform: scale(1.06); } }

.options { display: grid; gap: 10px; margin-top: 4px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px 16px; border-radius: 18px; font-size: 17px; font-weight: 700;
  background: #fff; border: 3px solid #e6e9f0; color: #3b4a5a;
  box-shadow: 0 4px 0 #e9edf3; transition: .15s;
}
.opt .key {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  display: grid; place-items: center; background: #eef2f8; color: #7b8fa3;
  font-size: 15px; font-weight: 900;
}
.opt-text { flex: 1; }
.opt:hover:not(.locked) { transform: translateY(-2px); border-color: #bcd8f5; background: #f7fbff; }
.opt.locked { cursor: default; }
.opt.right {
  background: linear-gradient(180deg, #eafbf3, #d8f6e9); border-color: #6fd3ab;
  color: #10744f; box-shadow: 0 4px 0 #a8e6cd;
}
.opt.right .key { background: #6fd3ab; color: #fff; }
.opt.wrong {
  background: linear-gradient(180deg, #ffeeec, #ffe0dc); border-color: #f3a396;
  color: #b8371f; box-shadow: 0 4px 0 #f8cfc7; animation: shake .4s;
}
.opt.wrong .key { background: #f3a396; color: #fff; }
.opt .mark { margin-left: auto; font-size: 20px; }
@keyframes shake {
  0%,100% { transform: translateX(0) }
  20% { transform: translateX(-8px) }
  40% { transform: translateX(8px) }
  60% { transform: translateX(-5px) }
  80% { transform: translateX(5px) }
}

.explain {
  margin-top: 14px; padding: 13px 16px; border-radius: 16px; font-size: 15px;
  line-height: 1.65; border: 3px dashed #cfe9d9; background: #f3fdf8; color: #2b6b52;
  animation: fadeUp .3s ease;
}
.explain.warn { border-color: #ffd8a8; background: #fff9ef; color: #8a5a17; }

.repeat-box { text-align: center; }
.repeat-sentence {
  font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; color: #2f2419;
  line-height: 1.55; margin: 8px 0 6px; letter-spacing: .4px;
}
.repeat-zh { font-size: 14.5px; color: #9f8f80; margin-bottom: 14px; }
.focus-chip {
  display: inline-block; background: #fff5e6; border: 2px dashed #ffc97d;
  color: #a9701c; font-size: 13px; font-weight: 700; padding: 6px 14px;
  border-radius: 999px; margin-bottom: 6px;
}
.repeat-controls { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 14px 0 4px; }
.round-btn {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  font-size: 27px; background: linear-gradient(180deg, #ffb15c, #ff8a3d); color: #fff;
  box-shadow: 0 6px 0 #d96d18; transition: .13s;
}
.round-btn.blue { background: linear-gradient(180deg, #6fd8ff, #2fa8f0); box-shadow: 0 6px 0 #1b7fc0; }
.round-btn:hover { transform: translateY(-2px); }
.round-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #d96d18; }
.round-btn.rec { background: linear-gradient(180deg, #ff8080, #f04b4b); box-shadow: 0 6px 0 #c22c2c; }
.round-label { font-size: 12.5px; font-weight: 800; color: #a99787; margin-top: 8px; }

.stars-big { font-size: 34px; letter-spacing: 4px; margin: 6px 0; }
.score-num { font-size: 42px; font-weight: 900; color: var(--orange-d); line-height: 1; }
.praise { font-size: 16px; font-weight: 800; color: #2b6b52; margin: 10px 0 4px; }
.prob-list { list-style: none; padding: 0; margin: 8px 0; display: inline-flex; flex-direction: column; gap: 5px; }
.prob-list li {
  background: #fff5f3; border: 2px solid #ffd9d0; color: #b8371f;
  font-size: 13.5px; padding: 6px 14px; border-radius: 12px; font-weight: 700;
}

.card-actions { display: flex; gap: 10px; padding-top: 12px; }
.cbtn {
  flex: 1; height: 50px; border-radius: 18px; font-size: 15.5px; font-weight: 900;
  background: #fff; border: 3px solid #e6e9f0; color: #64748b;
  box-shadow: 0 4px 0 #e9edf3; transition: .14s;
}
.cbtn:hover:not(:disabled) { transform: translateY(-2px); }
.cbtn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #e9edf3; }
.cbtn.primary {
  background: linear-gradient(180deg, #ffc44d, #ff9a2e); border-color: #f08a1c; color: #fff;
  box-shadow: 0 5px 0 #e07c10;
}
.cbtn.ghost { background: #fff9ef; border-color: #ffe0b5; color: #c07c1c; }
.cbtn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------------------------------------------- 提示气泡 & 撒花 */
.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #fff; border-radius: 999px; padding: 11px 24px;
  font-weight: 800; font-size: 15px; color: var(--ink);
  box-shadow: 0 10px 28px rgba(120,90,60,.22);
  border: 3px solid #ffe0b5; animation: toastIn .35s cubic-bezier(.2,1.5,.4,1);
  max-width: 88vw; text-align: center;
}
.toast.good { border-color: #8fdcbb; color: #10744f; background: #f1fcf7; }
.toast.bad  { border-color: #f3a396; color: #b8371f; background: #fff6f4; }
@keyframes toastIn { from { transform: translateY(-18px) scale(.9); opacity: 0; } }

.confetti {
  position: fixed; top: -24px; width: 11px; height: 15px; z-index: 300;
  pointer-events: none; border-radius: 3px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(105vh) rotate(680deg); opacity: .15; }
}

/* ---------------------------------------------------- 说话动画 */
body.speaking .mouth { animation: talk .28s ease-in-out infinite; transform-origin: 60px 56px; }
@keyframes talk { 50% { transform: scaleY(2.1) translateY(-1px); } }
body.speaking .brand-mascot { animation: bob .5s ease-in-out infinite; }

/* ---------------------------------------------------- 学习报告 */
.report-btn {
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 800;
  background: linear-gradient(180deg, #b79bff, #9271f5); color: #fff;
  border: 2px solid #8a68ee; box-shadow: 0 3px 0 #7554d8; transition: .15s;
}
.report-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #7554d8; }
.report-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #7554d8; }

.sheet {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(60, 45, 30, .42);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  opacity: 0; visibility: hidden; transition: .28s;
}
.sheet.open { opacity: 1; visibility: visible; }
.sheet-card {
  width: min(860px, 100%); max-height: 100%;
  background: #fffdf9; border-radius: 30px;
  box-shadow: 0 26px 70px rgba(70,50,30,.35);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(18px) scale(.97); transition: .28s cubic-bezier(.2,1.3,.4,1);
}
.sheet.open .sheet-card { transform: none; }
.sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-bottom: 3px dashed #eee2d2;
  background: linear-gradient(180deg, #f8f2ff, #fffdf9);
}
.sheet-head h2 { margin: 0; font-size: 20px; color: #6b4ad8; }
.sheet-actions { display: flex; gap: 8px; align-items: center; }
.sheet-body { padding: 18px 22px 26px; overflow-y: auto; }
.sheet-body::-webkit-scrollbar { width: 9px; }
.sheet-body::-webkit-scrollbar-thumb { background: #ddd0f0; border-radius: 9px; }

.sec-title {
  font-size: 15.5px; font-weight: 900; color: #4a3a2c; margin: 22px 0 10px;
  display: flex; align-items: center; gap: 7px;
}
.sec-title:first-child { margin-top: 0; }
.sec-title .cnt {
  font-size: 12px; font-weight: 800; color: #9b8cf0; background: #f1ecff;
  border-radius: 999px; padding: 2px 10px;
}

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi {
  background: linear-gradient(180deg, #fffaf0, #fff4e3);
  border: 3px solid #ffe2ba; border-radius: 20px; padding: 12px 6px;
  text-align: center; line-height: 1.25;
}
.kpi b { display: block; font-size: 26px; color: var(--orange-d); }
.kpi i { font-style: normal; font-size: 11.5px; color: #a99787; }

.chart {
  display: flex; align-items: flex-end; gap: 10px; height: 132px;
  padding: 12px 14px 0; background: #fbf7ff; border-radius: 20px;
  border: 3px solid #efe7fb;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; }
.bar {
  width: 100%; max-width: 42px; border-radius: 8px 8px 4px 4px; min-height: 5px;
  background: linear-gradient(180deg, #b79bff, #8a68ee);
  transition: height .5s cubic-bezier(.3,1.4,.5,1); position: relative;
}
.bar.today { background: linear-gradient(180deg, #ffc44d, #ff9a2e); }
.bar-num { font-size: 11px; font-weight: 900; color: #8a7ab8; }
.bar-day { font-size: 11px; color: #a5978a; font-weight: 700; }

.ai-report {
  background: linear-gradient(180deg, #f4f0ff, #fdfbff);
  border: 3px solid #ded2fb; border-radius: 22px; padding: 16px 18px;
}
.ai-report .lvl {
  display: inline-block; font-size: 12.5px; font-weight: 900; padding: 4px 14px;
  border-radius: 999px; background: #8a68ee; color: #fff; margin-bottom: 9px;
}
.ai-report .sum { font-size: 15px; line-height: 1.7; color: #4a3f63; margin: 0 0 12px; }
.ai-list { margin: 0 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ai-list li { font-size: 14px; line-height: 1.6; padding-left: 24px; position: relative; color: #55496b; }
.ai-list li::before { position: absolute; left: 0; top: 0; }
.ai-list.good li::before { content: '🌟'; }
.ai-list.weak li::before { content: '⚠️'; }
.ai-list.todo li::before { content: '👉'; }
.ai-report .cheer {
  margin-top: 12px; padding: 11px 15px; border-radius: 16px;
  background: #fff6df; border: 2px dashed #ffcb7a; color: #8a5a17;
  font-size: 14.5px; font-weight: 800; text-align: center;
}

.err-item {
  background: #fff; border: 3px solid #ffe0d8; border-radius: 18px;
  padding: 12px 15px; margin-bottom: 9px;
}
.err-item .eh { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.err-item .etag {
  font-size: 11.5px; font-weight: 900; color: #c0392b; background: #ffeceb;
  border-radius: 999px; padding: 3px 11px; flex: 0 0 auto;
}
.err-item .eq { font-size: 15.5px; font-weight: 800; color: #3c3226; margin: 8px 0 4px; line-height: 1.55; }
.err-item .ezh { font-size: 12.5px; color: #a1927f; }
.err-item .eline { font-size: 13.5px; margin-top: 6px; line-height: 1.6; }
.err-item .eline .no { color: #c0392b; text-decoration: line-through; }
.err-item .eline .yes { color: #18996d; font-weight: 800; }
.err-item .eex { font-size: 13px; color: #7d6a58; background: #fdf9f4; border-radius: 12px; padding: 8px 12px; margin-top: 7px; line-height: 1.6; }
.err-item .eops { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.err-item .eop {
  font-size: 13.5px; font-weight: 700; padding: 7px 14px; border-radius: 12px;
  background: #f8fafc; border: 2px solid #e6eaf0; color: #4a5a6b; transition: .14s;
}
.err-item .eop:hover:not(:disabled) { background: #eef6ff; border-color: #bcd8f5; }
.err-item .eop.ok { background: #e6fbf3; border-color: #6fd3ab; color: #10744f; }
.err-item .eop.bad { background: #ffeeec; border-color: #f3a396; color: #b8371f; }
.err-item .eop:disabled { cursor: default; }
.err-item .edel {
  font-size: 12px; font-weight: 800; color: #b9a99a; border-radius: 999px;
  padding: 3px 10px; background: #faf6f1; flex: 0 0 auto;
}
.err-item .edel:hover { color: #c0392b; background: #ffeceb; }

.word-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.wcard {
  display: flex; align-items: baseline; gap: 7px;
  background: #eef9f4; border: 2px solid #b7ecd6; border-radius: 14px;
  padding: 7px 13px; font-size: 13.5px; color: #1e8a68; transition: .14s;
}
.wcard:hover { transform: translateY(-2px); background: #e2f6ec; }
.wcard b { font-size: 15px; color: #146e52; }
.wcard .times { font-size: 10.5px; color: #7fc0a5; }

.empty-note {
  text-align: center; color: #b3a496; font-size: 13.5px; padding: 22px;
  background: #fcfaf7; border-radius: 18px; border: 2px dashed #eee2d4;
}

.sheet-foot { display: flex; gap: 10px; margin-top: 18px; }
.sheet-foot .cbtn { height: 46px; font-size: 14.5px; }

/* ---------------------------------------------------- 今日任务 */
.daily {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(90deg, #fffaf2, #fff5e8 55%, #fdf1ff);
  border: 3px solid #ffe0b5;
  border-radius: 22px; padding: 8px 14px;
  box-shadow: var(--shadow-s);
  transition: .3s;
}
.daily.done {
  background: linear-gradient(90deg, #f1fdf7, #e8fbf2 55%, #f0f8ff);
  border-color: #a9ecd3;
}
.daily-id { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.daily-ico { font-size: 22px; }
.daily-txt { display: flex; flex-direction: column; line-height: 1.2; }
.daily-txt b { font-size: 14.5px; color: var(--orange-d); }
.daily.done .daily-txt b { color: var(--mint-d); }
.daily-txt small { font-size: 10.5px; color: #a99787; }

.daily-tasks { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dtask {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  background: #fff; border: 2px solid #eee2d4; color: #6b5a4b; transition: .15s;
  white-space: nowrap;
}
.dtask:hover { transform: translateY(-2px); border-color: #ffcb7a; background: #fffaf0; }
.dtask .dc { color: #c9a06a; font-size: 11.5px; }
.dtask.ok { background: #effcf6; border-color: #8fdcbb; color: #10744f; }
.dtask.ok .dc { color: #4fc39b; }
.daily-stamp {
  font-size: 13px; font-weight: 800; color: #10744f;
  background: #e8fbf2; border: 2px dashed #8fdcbb; border-radius: 999px;
  padding: 6px 16px;
}

.daily-ring {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#ff8a3d 0deg, #eceff3 0deg);
  transition: background .5s ease;
}
.daily-ring::before {
  content: ''; position: absolute; width: 31px; height: 31px;
  border-radius: 50%; background: #fff;
}
.daily-ring { position: relative; }
.daily-ring span {
  position: relative; z-index: 1; font-size: 11px; font-weight: 900; color: var(--orange-d);
}
.daily.done .daily-ring span { color: var(--mint-d); font-size: 15px; }

.daily-btn {
  flex: 0 0 auto; padding: 9px 18px; border-radius: 14px;
  font-size: 13.5px; font-weight: 900;
  background: linear-gradient(180deg, #ffc44d, #ff9a2e); color: #fff;
  box-shadow: 0 4px 0 #e07c10; transition: .14s; white-space: nowrap;
}
.daily-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #e07c10; }
.daily-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #e07c10; }
.daily.done .daily-btn {
  background: linear-gradient(180deg, #7fe0c0, #3ec79c); box-shadow: 0 4px 0 #2a9b79;
}

/* ---------------------------------------------------- 教材单元 */
.unit-chip {
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 800;
  background: linear-gradient(180deg, #79c4ff, #3d96ea); color: #fff;
  border: 2px solid #2f86d8; box-shadow: 0 3px 0 #2170b8; transition: .15s;
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.unit-chip:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #2170b8; }
.unit-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 #2170b8; }
.unit-chip.empty { background: linear-gradient(180deg, #e6edf5, #cfdce8); border-color: #bcccd9; box-shadow: 0 3px 0 #a9bccd; color: #7d90a3; }

.unit-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.unit-tab {
  padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 800;
  background: #f3f7fb; color: #7b8fa3; border: 2px solid #e3ecf5; transition: .15s;
}
.unit-tab:hover { background: #e9f3ff; }
.unit-tab.on { background: var(--blue); color: #fff; border-color: #2a8ada; box-shadow: 0 3px 0 #2a8ada; }

.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.unit-card {
  text-align: left; padding: 11px 14px; border-radius: 16px;
  background: #fff; border: 3px solid #e6eef8; transition: .15s;
}
.unit-card:hover { transform: translateY(-2px); border-color: #bcd8f5; background: #f8fcff; }
.unit-card.on { border-color: var(--blue); background: #eef7ff; box-shadow: 0 4px 0 #bfe2ff; }
.unit-card .uc-t { display: block; font-size: 14.5px; font-weight: 900; color: #33475b; }
.unit-card .uc-z { display: block; font-size: 11.5px; color: #8fa3b6; margin-top: 2px; }
.unit-card .uc-w { display: block; font-size: 10.5px; color: #6aa9dd; margin-top: 4px; font-weight: 800; }

.unit-detail {
  margin-top: 16px; padding: 15px 17px; border-radius: 20px;
  background: linear-gradient(180deg, #f6fbff, #fdfeff);
  border: 3px solid #d9eaf9;
}
.unit-detail h3 { margin: 0 0 4px; font-size: 17px; color: #2f6ea8; }
.unit-detail .ud-zh { font-size: 13px; color: #8fa3b6; margin: 0 0 12px; }

.unit-patterns { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.unit-patterns .up {
  font-size: 13.5px; font-weight: 700; color: #3d6b9c;
  background: #fff; border: 2px solid #dceaf7; border-radius: 12px;
  padding: 7px 13px; cursor: pointer; text-align: left;
}
.unit-patterns .up:hover { background: #f2f9ff; }

.unit-words { display: flex; flex-wrap: wrap; gap: 7px; }
.uword {
  display: flex; align-items: baseline; gap: 6px;
  background: #fff; border: 2px solid #cfe6d8; border-radius: 13px;
  padding: 6px 12px; font-size: 13.5px; color: #1e8a68; transition: .14s;
}
.uword:hover { transform: translateY(-2px); background: #f2fbf6; }
.uword b { font-size: 14.5px; color: #146e52; }

.unit-empty {
  font-size: 13px; color: #9aabbc; background: #f7fbff;
  border: 2px dashed #dceaf7; border-radius: 14px; padding: 16px; text-align: center;
}
.unit-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.unit-actions .cbtn { flex: 0 1 auto; padding: 0 18px; height: 44px; font-size: 14px; }

.import-box {
  width: 100%; min-height: 110px; border-radius: 14px; border: 3px solid #e8e0d6;
  background: #fffdfa; padding: 12px 14px; font-size: 13.5px; line-height: 1.7;
  font-family: inherit; color: var(--ink); outline: none; resize: vertical;
}
.import-box:focus { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(58,168,255,.13); }
.import-wrap { width: 100%; }

/* ---------------------------------------------------- 多孩档案 */
.profile-chip {
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 800;
  background: linear-gradient(180deg, #7fe0c0, #3ec79c); color: #fff;
  border: 2px solid #35b58e; box-shadow: 0 3px 0 #2a9b79; transition: .15s;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-chip:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #2a9b79; }
.profile-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a9b79; }

.profile-pick { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.pcard {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 11px 17px; border-radius: 20px; min-width: 82px;
  background: #f7fbff; border: 3px solid #dbe9f7; transition: .16s;
}
.pcard .pe { font-size: 28px; line-height: 1.15; }
.pcard b { font-size: 14px; font-weight: 900; color: #5a6b7d; }
.pcard i { font-size: 10.5px; font-style: normal; color: #9fb0c0; }
.pcard:hover { transform: translateY(-3px); }
.pcard.on {
  background: linear-gradient(180deg, #fff8ee, #ffeed6);
  border-color: var(--orange); box-shadow: 0 5px 0 #ffcf9e;
}
.pcard.on b { color: var(--orange-d); }
.pcard.add { border-style: dashed; }
.pcard.add .pe { font-size: 22px; color: #9fb0c0; }

.profile-grid { display: flex; flex-direction: column; gap: 9px; }
.prow {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 3px solid #e8eef6; border-radius: 20px;
  padding: 8px 12px; transition: .15s;
}
.prow.on { border-color: var(--mint); background: #f2fdf9; box-shadow: 0 4px 0 #c7f0e2; }
.prow-main {
  flex: 1; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 6px 4px; border-radius: 14px;
}
.prow-main:hover { background: #f6fafd; }
.prow .pe { font-size: 30px; flex: 0 0 auto; }
.prow .pn { font-size: 16px; font-weight: 900; color: #3d4c5c; flex: 1; }
.prow .ps { font-size: 12.5px; font-weight: 800; color: #f0a800; flex: 0 0 auto; }

.add-profile {
  background: #fbfdff; border: 3px dashed #dfeaf5; border-radius: 20px; padding: 16px;
}
.emoji-row { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji-btn {
  width: 42px; height: 42px; border-radius: 13px; font-size: 22px;
  background: #fff; border: 2px solid #e8eef6; transition: .14s;
  display: grid; place-items: center;
}
.emoji-btn:hover { transform: translateY(-2px); border-color: #bcd8f5; }
.emoji-btn.on {
  background: #fff4e4; border-color: var(--orange); box-shadow: 0 3px 0 #ffcf9e;
}

/* ---------------------------------------------------- 语音识别设置 */
.sheet-card.narrow { width: min(580px, 100%); }

.set-row { margin-bottom: 16px; }
.set-label {
  display: block; font-size: 13.5px; font-weight: 900; color: #4a3a2c; margin-bottom: 7px;
}
.set-label small { font-weight: 700; color: #a89a8c; font-size: 11.5px; margin-left: 6px; }
.set-input, .set-select {
  width: 100%; height: 46px; border-radius: 14px; border: 3px solid #e8e0d6;
  background: #fffdfa; padding: 0 14px; font-size: 14.5px; color: var(--ink);
  outline: none; transition: .16s; font-family: inherit;
}
.set-input:focus, .set-select:focus { border-color: #8a68ee; box-shadow: 0 0 0 5px rgba(138,104,238,.13); }
.set-select { appearance: none; cursor: pointer; }

.set-status {
  border-radius: 16px; padding: 12px 15px; font-size: 13.5px; line-height: 1.65;
  border: 3px solid #e2ecf6; background: #f5faff; color: #4a6b96; margin-bottom: 16px;
}
.set-status.ok   { border-color: #8fdcbb; background: #f1fcf7; color: #10744f; }
.set-status.warn { border-color: #ffd8a8; background: #fff9ef; color: #8a5a17; }
.set-status.bad  { border-color: #f3a396; background: #fff6f4; color: #b8371f; }
.set-status b { font-weight: 900; }

.set-hint {
  font-size: 12.5px; color: #a1938a; line-height: 1.75; margin-top: 7px;
}
.set-hint code {
  background: #f4f8fd; border: 1px solid #e0eaf5; border-radius: 6px;
  padding: 1px 6px; font-size: 11.5px; color: #3d6b9c; word-break: break-all;
}
.set-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ---------------------------------------------------- 录音 A/B 对比 */
.ab-bar { display: flex; gap: 9px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.ab-btn {
  font-size: 14px; font-weight: 900; padding: 11px 20px; border-radius: 16px;
  background: #fff; border: 3px solid #e6e9f0; color: #64748b;
  box-shadow: 0 4px 0 #e9edf3; transition: .14s;
}
.ab-btn:hover { transform: translateY(-2px); border-color: #bcd8f5; background: #f7fbff; }
.ab-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #e9edf3; }
.ab-btn.on { background: linear-gradient(180deg, #6fd8ff, #2fa8f0); border-color: #2a90dd; color: #fff; box-shadow: 0 4px 0 #1b7fc0; }
.ab-btn.on.mine { background: linear-gradient(180deg, #ffb15c, #ff8a3d); border-color: #f08a1c; box-shadow: 0 4px 0 #d96d18; }
.ab-btn.primary { background: linear-gradient(180deg, #ffc44d, #ff9a2e); border-color: #f08a1c; color: #fff; box-shadow: 0 5px 0 #e07c10; }
.ab-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.rec-tip {
  text-align: center; font-size: 13px; font-weight: 700; color: #a99787;
  margin-top: 10px; min-height: 18px;
}
.rec-tip.rec { color: #e8543a; }

.mic-warn {
  background: #fffaf0; border: 3px dashed #ffd8a8; border-radius: 16px;
  padding: 12px 15px; font-size: 13px; color: #8a5a17; line-height: 1.7;
  margin-top: 12px; text-align: left;
}
.mic-warn b { color: #c07c1c; }

/* ---------------------------------------------------- 响应式 */
@media (max-width: 900px) {
  .modes { grid-template-columns: repeat(3, 1fr); }
  .mode-btn i { display: none; }
  .brand-text small { display: none; }
}
@media (max-width: 640px) {
  .app { padding: 8px 10px 12px; gap: 8px; }
  .topbar { padding: 6px 10px; border-radius: 18px; }
  .brand-text b { font-size: 17px; }
  .brand-mascot svg { width: 42px; height: 42px; }
  .modes { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .mode-btn { padding: 8px 2px; border-radius: 16px; }
  .mode-btn .mi { font-size: 19px; }
  .mode-btn b { font-size: 12px; }
  .msg { max-width: 96%; }
  .bubble .en { font-size: 17px; }
  .fixcard { margin-left: 0; }
  .opt { font-size: 15.5px; padding: 12px 13px; }
  .send-btn { padding: 0 16px; font-size: 15px; }
  #chatInput { height: 48px; font-size: 15px; }
  .mic-btn { width: 50px; height: 50px; flex: 0 0 50px; }
  .cbtn { font-size: 13.5px; height: 46px; }
  .scorebar .stat i { font-size: 9.5px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .sheet { padding: 10px; }
  .sheet-card { border-radius: 22px; }
  .sheet-head { padding: 12px 14px; }
  .sheet-head h2 { font-size: 16.5px; }
  .sheet-body { padding: 14px 14px 20px; }
  .report-btn { padding: 7px 11px; font-size: 12px; }
  .profile-chip { padding: 7px 11px; font-size: 12px; max-width: 96px; }
  .toggle { padding: 7px 10px; font-size: 12px; }
  .chart { height: 112px; gap: 6px; padding: 10px 8px 0; }
  .emoji-btn { width: 38px; height: 38px; font-size: 20px; }
  .daily { padding: 7px 10px; gap: 9px; border-radius: 18px; flex-wrap: wrap; }
  .daily-txt b { font-size: 13px; }
  .daily-txt small { font-size: 9.5px; }
  .daily-ico { font-size: 18px; }
  .daily-tasks { gap: 5px; }
  .dtask { padding: 5px 9px; font-size: 11.5px; }
  .dtask .dl { display: none; }
  .daily-ring { width: 36px; height: 36px; flex: 0 0 36px; }
  .daily-ring::before { width: 27px; height: 27px; }
  .daily-btn { padding: 7px 12px; font-size: 12px; }
}

/* ---------------------------------------------------- 打印 / 存 PDF */
@media print {
  .sky, .app, .toast-wrap, .sheet-actions, .sheet-foot { display: none !important; }
  #setSheet, #profileSheet { display: none !important; }
  .sheet { position: static; opacity: 1; visibility: visible; background: none; padding: 0; }
  .sheet-card { box-shadow: none; border-radius: 0; max-height: none; width: 100%; }
  .sheet-body { overflow: visible; padding: 0; }
  .sheet-head { border-bottom: 2px solid #ccc; }
  .err-item, .ai-report, .kpi, .chart { break-inside: avoid; }
  body { background: #fff; overflow: visible; }
}

@page { margin: 14mm; }
