/* =========================================================
   鸭鸭英语 · AI 口语私教  —  小鸭子主题（鸭黄 #FFD54F + 池塘蓝）
   ========================================================= */

:root {
  --duck:      #FFD54F;
  --duck-lite: #FFE9A8;
  --duck-deep: #F0B429;
  --duck-dark: #C98A12;
  --beak:      #FF9F45;
  --beak-dark: #F57F17;

  --pond:      #7DD3FC;
  --pond-deep: #38B6E8;
  --pond-dark: #2286B8;
  --pond-ink:  #1D6E9E;

  --leaf:      #8CD47E;
  --leaf-deep: #5CA84E;

  --pink:      #FF9EC4;
  --pink-deep: #E8709E;

  --ink:      #3D3325;
  --ink-soft: #8A7A5C;
  --paper:    #FFFFFF;
  --line:     #F2E7C8;

  --shadow-sm: 0 3px 0 rgba(61,51,37,.10);
  --shadow:    0 8px 0 rgba(61,51,37,.08), 0 12px 28px rgba(255,213,79,.18);
  --shadow-lg: 0 14px 0 rgba(61,51,37,.07), 0 24px 50px rgba(61,51,37,.16);

  --r-sm: 14px;
  --r:    22px;
  --r-lg: 32px;

  --font: "Baloo 2", "Comic Sans MS", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(168deg, #FFF6D8 0%, #FFFDF2 46%, #E6F5FF 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---------- 背景装饰：鸭鸭与泡泡 ---------- */
.bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pond-f { position: absolute; font-size: 34px; opacity: .5; animation: floaty 7s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(255,213,79,.35)); }
.p1 { top: 12%; left: 5%; }
.p2 { top: 66%; left: 7%; font-size: 30px; animation-delay: 1.6s; }
.p3 { top: 30%; right: 7%; font-size: 26px; animation-delay: .8s; }
.p4 { bottom: 16%; right: 11%; font-size: 28px; animation-delay: 2.4s; }
.p5 { top: 8%; right: 24%; font-size: 26px; animation-delay: 3.2s; }
.p6 { bottom: 34%; left: 14%; font-size: 24px; animation-delay: 4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-7deg); }
  50%      { transform: translateY(-22px) rotate(9deg); }
}

.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .3; }
.b1 { width: 340px; height: 340px; background: var(--duck); top: -90px; right: -60px; }
.b2 { width: 300px; height: 300px; background: var(--pond); bottom: -110px; left: -70px; opacity: .26; }
.b3 { width: 260px; height: 260px; background: var(--leaf); top: 44%; right: -90px; opacity: .2; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 14px 22px;
  background: rgba(255,255,255,.76);
  backdrop-filter: blur(14px);
  border-bottom: 3px solid #fff;
  box-shadow: 0 4px 22px rgba(255,213,79,.18);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 54px; height: 54px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 28%, #FFFFFF, #FFF3C4 65%, #FFE082);
  border: 3px solid #fff;
  box-shadow: 0 4px 0 var(--duck-deep), 0 8px 18px rgba(255,213,79,.45);
}
.brand-logo svg { width: 100%; height: 100%; display: block; }

.brand-text h1 {
  font-size: 23px; letter-spacing: .4px;
  background: linear-gradient(92deg, #E8A000, #FFB300 50%, var(--beak));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-text p { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }

.stats { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.stat-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-weight: 800; font-size: 15px;
  background: #fff; border: 3px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
}
.stat-pill.pop { transform: scale(1.18); }
.stat-pill.stars { border-color: #FFE08A; background: linear-gradient(160deg,#FFFDF2,#FFF4CC); color: #B57E00; }
.stat-pill.lv    { border-color: #FFE08A; background: linear-gradient(160deg,#FFFCF0,#FFF6D8); color: #8A6A00; }
.stat-pill.aff   { border-color: #FFD3E3; background: linear-gradient(160deg,#FFF7FB,#FFEFF6); color: #C4507E; }
.spark { font-size: 17px; }

/* 迷你进度条（等级 & 亲密度共用） */
.mini-info { display: flex; flex-direction: column; gap: 3px; }
.mini-name { font-size: 11.5px; font-weight: 800; line-height: 1; white-space: nowrap; }
.mini-bar {
  display: block; width: 76px; height: 8px; border-radius: 99px;
  background: #F4EAD0; overflow: hidden;
}
.mini-fill {
  display: block; height: 100%; width: 0%;
  border-radius: 99px;
  transition: width .5s cubic-bezier(.34,1.56,.64,1);
}
.mini-fill.gold { background: linear-gradient(90deg, var(--duck), var(--beak)); }
.mini-fill.pink { background: linear-gradient(90deg, var(--pink), var(--pink-deep)); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; cursor: pointer;
  font-size: 18px; background: #fff; border: 3px solid var(--line);
  box-shadow: var(--shadow-sm); transition: all .18s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--duck-deep); }
.icon-btn:active { transform: translateY(1px); box-shadow: none; }

/* ---------- 模式栏 ---------- */
.mode-bar {
  position: relative; z-index: 5;
  display: flex; gap: 10px; padding: 14px 22px 4px;
  overflow-x: auto; scrollbar-width: none;
}
.mode-bar::-webkit-scrollbar { display: none; }

.mode-chip {
  flex: 0 0 auto; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 15px; font-weight: 800; color: var(--ink-soft);
  background: #fff; border: 3px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.mode-chip .mi { font-size: 19px; }
.mode-chip:hover { transform: translateY(-3px); border-color: var(--duck-deep); color: var(--ink); }
.mode-chip.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #FFC93C, var(--beak-dark));
  box-shadow: 0 5px 0 #C66900, 0 10px 22px rgba(255,159,69,.42);
  transform: translateY(-1px);
}
.mode-chip.active .mt { color: #fff; }

/* ---------- 主舞台 ---------- */
.stage {
  position: relative; z-index: 3;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 22px 20px;
  max-width: 1000px; width: 100%; margin: 0 auto;
}

/* 鸭鸭头像 */
.avatar-wrap { position: relative; margin: 6px 0 0; }
.avatar {
  position: relative; z-index: 2;
  width: 116px; height: 116px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 25%, #FFFFFF, #FFF3C4 60%, #FFE082);
  box-shadow: 0 8px 0 var(--duck-deep), 0 14px 34px rgba(255,213,79,.5);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
  cursor: pointer;
}
.avatar svg { width: 100%; height: 100%; display: block; }
.avatar-wrap.speaking .avatar { animation: talk .5s ease-in-out infinite; }
@keyframes talk { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.avatar-ring {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 4px dashed rgba(255,179,0,.7);
  animation: spin 10s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-status {
  position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
  z-index: 3; white-space: nowrap;
  font-size: 12px; font-weight: 800; color: #fff;
  padding: 5px 14px; border-radius: 999px;
  background: linear-gradient(135deg, var(--leaf), var(--leaf-deep));
  box-shadow: 0 3px 10px rgba(140,212,126,.5);
}
.avatar-status.listening { background: linear-gradient(135deg, var(--pink), #E8456E); }
.avatar-status.thinking  { background: linear-gradient(135deg, #FFD54F, var(--beak-dark)); }

/* ---------- 鸭鸭表情系统 ---------- */
.dk .eyes {
  transform-box: fill-box; transform-origin: center;
  animation: blink 4.8s infinite;
}
@keyframes blink {
  0%, 91%, 100% { transform: scaleY(1); }
  94%, 96%      { transform: scaleY(.08); }
}

.dk .m-big, .dk .m-open, .dk .m-o { display: none; }
.dk .m-smile { display: block; }

.avatar-wrap[data-mood="excited"] .m-smile,
.avatar-wrap[data-mood="proud"]   .m-smile { display: none; }
.avatar-wrap[data-mood="excited"] .m-big,
.avatar-wrap[data-mood="proud"]   .m-big   { display: block; }

.avatar-wrap[data-mood="thinking"] .m-smile { display: none; }
.avatar-wrap[data-mood="thinking"] .m-o     { display: inline; }

.avatar-wrap[data-mood="caring"] .blush { opacity: 1 !important; }

.avatar-wrap.speaking .m-smile,
.avatar-wrap.speaking .m-big,
.avatar-wrap.speaking .m-o { display: none !important; }
.avatar-wrap.speaking .m-open {
  display: block;
  transform-box: fill-box; transform-origin: center top;
  animation: mouthAnim .34s ease-in-out infinite;
}
@keyframes mouthAnim {
  0%, 100% { transform: scaleY(.55); }
  50%      { transform: scaleY(1.2); }
}

/* 声波 */
.speaking-waves { display: flex; align-items: center; gap: 5px; height: 26px; margin: 16px 0 4px; opacity: 0; transition: opacity .25s; }
.speaking-waves.on { opacity: 1; }
.speaking-waves span {
  width: 6px; border-radius: 4px; height: 8px;
  background: linear-gradient(180deg, var(--duck), var(--beak));
  animation: wave .9s ease-in-out infinite;
}
.speaking-waves span:nth-child(1){ animation-delay: 0s; }
.speaking-waves span:nth-child(2){ animation-delay: .12s; }
.speaking-waves span:nth-child(3){ animation-delay: .24s; }
.speaking-waves span:nth-child(4){ animation-delay: .36s; }
.speaking-waves span:nth-child(5){ animation-delay: .48s; }
@keyframes wave { 0%,100% { height: 8px; } 50% { height: 26px; } }

/* ---------- 聊天气泡 ---------- */
.chat {
  flex: 1; width: 100%; min-height: 260px;
  overflow-y: auto; padding: 14px 6px 10px;
  display: flex; flex-direction: column; gap: 16px;
  scroll-behavior: smooth;
}
.chat::-webkit-scrollbar { width: 9px; }
.chat::-webkit-scrollbar-thumb { background: #F0E2B8; border-radius: 9px; }

.row { display: flex; gap: 11px; align-items: flex-end; animation: popIn .34s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.94); } }

.row.me { flex-direction: row-reverse; }

.mini-avatar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 25%, #fff, #FFF3C4 65%, #FFE082);
  box-shadow: 0 3px 0 var(--duck-deep);
}
.mini-avatar svg { width: 100%; height: 100%; display: block; }
.row.me .mini-avatar {
  background: linear-gradient(145deg,#A8E4FF,#5FC9F8);
  box-shadow: 0 3px 0 var(--pond-dark);
  display: grid; place-items: center; font-size: 22px;
}

.bubble {
  position: relative; max-width: min(78%, 560px);
  padding: 14px 18px; border-radius: var(--r);
  font-size: 16.5px; line-height: 1.62; font-weight: 600;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
}
.row.ai .bubble {
  background: #fff; border: 3px solid #FFE9A8;
  border-bottom-left-radius: 7px;
}
.row.me .bubble {
  background: linear-gradient(135deg, #8FDCFF, var(--pond-deep));
  border: 3px solid #fff; color: #fff;
  border-bottom-right-radius: 7px;
  box-shadow: 0 3px 0 var(--pond-dark), 0 8px 20px rgba(56,182,232,.35);
}

.bubble .en { font-size: 17.5px; font-weight: 800; letter-spacing: .2px; }
.row.ai .bubble .en { color: #8A5A00; }
.bubble .zh { display: block; margin-top: 7px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.row.me .bubble .zh { color: rgba(255,255,255,.9); }

.speak-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 11px; cursor: pointer;
  font-size: 16px; margin-left: 8px; vertical-align: middle;
  background: #FFF6D8; border: 2px solid #FFE08A;
  transition: all .16s;
}
.speak-btn:hover { transform: scale(1.14) rotate(-6deg); background: #FFEFB8; }
.speak-btn.on { background: var(--duck); border-color: var(--duck-dark); animation: talk .5s infinite; }

/* ---------- 💗 夸夸卡片（情绪价值） ---------- */
.praise-card {
  margin-bottom: 12px; border-radius: 18px; overflow: hidden;
  border: 3px solid #FFD6E6;
  background: linear-gradient(135deg, #FFF3F8, #FFE9F2);
  animation: praiseIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes praiseIn { from { opacity: 0; transform: scale(.92); } }
.praise-hd {
  padding: 6px 14px; font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  display: flex; align-items: center; gap: 6px;
}
.praise-hd .ph { animation: heartBeat 1.1s ease-in-out infinite; display: inline-block; }
@keyframes heartBeat { 0%,100% { transform: scale(1); } 30% { transform: scale(1.25); } }
.praise-bd { padding: 10px 14px; font-size: 14.5px; font-weight: 700; color: #A63D68; line-height: 1.65; }

/* ---------- 纠正卡片 ---------- */
.correction {
  margin-top: 12px; border-radius: 18px; overflow: hidden;
  border: 3px solid #FFDDE2; background: #FFF7F8;
}
.correction .hd {
  padding: 7px 14px; font-size: 12.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--pink), #E8455F);
  display: flex; align-items: center; gap: 6px;
}
.correction.good { border-color: #C8F2DC; background: #F2FEF8; }
.correction.good .hd { background: linear-gradient(135deg, var(--leaf), var(--leaf-deep)); }
.correction .bd { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.corr-line { font-size: 15px; font-weight: 700; display: flex; align-items: flex-start; gap: 8px; }
.corr-line .tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 3px 9px;
  border-radius: 8px; margin-top: 1px;
}
.tag-bad  { background: #FFE3E7; color: #D2384F; }
.tag-good { background: #D6F7E5; color: #14855A; }
.corr-wrong { text-decoration: line-through; text-decoration-color: #FF7A8A; text-decoration-thickness: 2px; color: #C33A4F; }
.corr-right { color: #12855A; }
.corr-why { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; line-height: 1.6; }
.corr-tip {
  font-size: 13px; font-weight: 700; color: #8A6A00;
  background: #FFF7D6; border-radius: 11px; padding: 8px 12px;
  border-left: 4px solid var(--duck);
}

/* ---------- 题目通用（笔试 + 阅读问题） ---------- */
.quiz { margin-top: 13px; }
.quiz-q {
  font-size: 16px; font-weight: 800; color: #8A5A00;
  background: #FFF9E8; border: 3px dashed #FFD54F;
  border-radius: 16px; padding: 13px 16px; margin-bottom: 6px;
  line-height: 1.7;
}
.quiz-q .blank { color: var(--pink-deep); font-size: 19px; letter-spacing: -1px; }
.quiz-q .qzh { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-top: 4px; }
.quiz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; }
.opt {
  cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 9px;
  padding: 12px 15px; border-radius: 15px;
  font-size: 15.5px; font-weight: 800; color: var(--ink);
  background: #fff; border: 3px solid var(--line);
  box-shadow: var(--shadow-sm); transition: all .17s cubic-bezier(.34,1.56,.64,1);
  text-align: left;
}
.opt .key {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center; font-size: 13px;
  background: #FFF3C4; color: #B57E00;
}
.opt:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--duck-deep); }
.opt:disabled { cursor: default; }
.opt.right {
  background: #E8FCF2; border-color: var(--leaf); color: #0F7A52;
  animation: popIn .3s;
}
.opt.right .key { background: var(--leaf); color: #fff; }
.opt.wrong { background: #FFF0F2; border-color: var(--pink); color: #C33A4F; opacity: .85; }
.opt.wrong .key { background: var(--pink); color: #fff; }
.quiz-explain {
  margin-top: 11px; font-size: 13.5px; font-weight: 700; color: #6B5A00;
  background: #FFF7D6; border-radius: 12px; padding: 10px 14px;
  border-left: 4px solid var(--duck);
}

/* ---------- 🎧 听力卡片 ---------- */
.listen {
  margin-top: 13px; border: 3px solid #A8DDF5; border-radius: 20px;
  background: linear-gradient(165deg, #F0FAFF, #E4F5FF);
  overflow: hidden;
}
.listen .hd {
  padding: 8px 15px; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #5FC9F8, var(--pond-deep));
  display: flex; align-items: center; gap: 7px;
}
.listen .bd { padding: 13px 15px; }
.listen-play {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.play-big {
  cursor: pointer; font-family: var(--font);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 15.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #5FC9F8, var(--pond-deep));
  border: 3px solid #fff;
  box-shadow: 0 5px 0 var(--pond-dark), 0 10px 20px rgba(56,182,232,.4);
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
  animation: playPulse 2s ease-in-out infinite;
}
@keyframes playPulse {
  0%,100% { box-shadow: 0 5px 0 var(--pond-dark), 0 0 0 0 rgba(56,182,232,.5); }
  50%     { box-shadow: 0 5px 0 var(--pond-dark), 0 0 0 14px rgba(56,182,232,0); }
}
.play-big:hover { transform: translateY(-2px) scale(1.03); }
.play-big:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--pond-dark); }
.play-slow {
  cursor: pointer; font-family: var(--font);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 800; color: var(--pond-ink);
  background: #fff; border: 3px solid #A8DDF5;
  box-shadow: var(--shadow-sm); transition: all .18s;
}
.play-slow:hover { border-color: var(--pond); transform: translateY(-2px); }
.listen-count { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.listen-reveal {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 2px dashed #8ED2F2;
  font-size: 15px; font-weight: 800; color: var(--pond-ink);
  animation: popIn .35s;
}
.listen-reveal small { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }

/* ---------- 📖 阅读卡片 ---------- */
.read-card {
  margin-top: 13px; border: 3px solid #D9E8C0; border-radius: 20px;
  background: linear-gradient(170deg, #FDFEF6, #F7FAEA);
  overflow: hidden;
}
.read-card .hd {
  padding: 8px 15px; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--leaf), var(--leaf-deep));
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.read-card .hd .speak-btn {
  margin-left: auto; width: 30px; height: 30px; font-size: 14px;
  background: #fff;
}
.read-card .bd { padding: 13px 15px; }
.read-passage {
  font-size: 15.5px; font-weight: 700; line-height: 1.9; color: #46502E;
  background: #fff; border-radius: 14px; padding: 14px 16px;
  border: 2px solid #EAF0D4;
}
.read-toggle {
  cursor: pointer; font-family: var(--font); margin-top: 9px;
  padding: 7px 15px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; color: #5F7A2E;
  background: #fff; border: 2px solid #D9E8C0;
  transition: all .16s;
}
.read-toggle:hover { border-color: #A9C878; transform: translateY(-1px); }
.read-zh {
  margin-top: 9px; font-size: 13.5px; font-weight: 600; color: #5F7A2E;
  background: #F4FAE4; border-radius: 12px; padding: 10px 14px;
  line-height: 1.8; animation: popIn .3s;
}
.read-qs { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.read-qs .q-t { font-size: 13.5px; font-weight: 800; color: var(--leaf-deep); }

/* ---------- 作文批改卡片 ---------- */
.essay {
  margin-top: 13px; border: 3px solid #E6DEFF; border-radius: 18px;
  background: #FAF8FF; overflow: hidden;
}
.essay .hd {
  padding: 9px 15px; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #A98BFF, #7B5CFF);
  display: flex; align-items: center; justify-content: space-between;
}
.essay .score {
  background: #fff; color: #6B4DFF; padding: 3px 12px; border-radius: 999px; font-size: 14px;
}
.essay .bd { padding: 13px 15px; display: flex; flex-direction: column; gap: 11px; }
.essay .sec-t { font-size: 13.5px; font-weight: 800; color: #6B4DFF; display: flex; align-items: center; gap: 6px; }
.essay .li { font-size: 14px; font-weight: 600; color: var(--ink); padding-left: 18px; position: relative; line-height: 1.6; }
.essay .li::before { content: "◆"; position: absolute; left: 2px; color: #A98BFF; font-size: 10px; top: 5px; }
.essay .improved {
  background: #fff; border: 2px dashed #CFC2FF; border-radius: 13px;
  padding: 12px 14px; font-size: 14.5px; font-weight: 700; color: var(--ink);
  line-height: 1.75; font-style: italic;
}

/* ---------- 单词卡 ---------- */
.vocab-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.vocab-chip {
  cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 800; color: #B57E00;
  background: #FFF6D8; border: 2px solid #FFE08A;
  transition: all .16s;
}
.vocab-chip:hover { transform: translateY(-2px) scale(1.05); background: #FFEFB8; }
.vocab-chip small { font-weight: 600; color: #C0A24E; }

/* 星星反馈 */
.star-row { margin-top: 10px; display: flex; gap: 3px; }
.star-row .s { font-size: 15px; }

/* 打字中 */
.typing { display: flex; gap: 5px; padding: 6px 2px; }
.typing i { width: 9px; height: 9px; border-radius: 50%; background: #EBD896; animation: blinkDots 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blinkDots { 0%,60%,100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-5px); } }

/* 提示条 */
.hint-row { justify-content: center; }
.hint-row .bubble {
  max-width: 92%; text-align: center; font-size: 13.5px;
  background: #FFFBEF; border: 2px dashed #FFD54F; color: #8A6A00;
  border-radius: 15px; padding: 10px 16px;
}

/* ---------- 快捷短语 ---------- */
.quick-row {
  width: 100%; display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; padding: 8px 0 4px;
}
.quick {
  cursor: pointer; font-family: var(--font);
  padding: 8px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 800; color: var(--pond-ink);
  background: #fff; border: 2.5px solid #C9E9FF;
  box-shadow: 0 2px 0 rgba(61,51,37,.07);
  transition: all .17s cubic-bezier(.34,1.56,.64,1);
}
.quick:hover { transform: translateY(-3px) scale(1.04); background: #EFF9FF; border-color: var(--pond); }

/* ---------- 输入区 ---------- */
.composer {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 12px; margin-top: 6px;
  background: #fff; border: 3px solid #FFE9A8; border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.input-box { flex: 1; }
#textInput {
  width: 100%; border: none; outline: none; background: transparent;
  font-family: var(--font); font-size: 16px; font-weight: 600; color: var(--ink);
  padding: 9px 4px;
}
#textInput::placeholder { color: #C4B48C; font-weight: 600; }

.mic-btn {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(145deg, #FFB74D, var(--beak-dark));
  border: 3px solid #fff;
  box-shadow: 0 4px 0 #C66900, 0 10px 22px rgba(255,159,69,.42);
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
}
.mic-btn:hover { transform: translateY(-3px) scale(1.04); }
.mic-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #C66900; }
.mic-btn.rec {
  background: linear-gradient(145deg, #FF5C7A, #D92B4A);
  animation: recPulse 1.1s ease-in-out infinite;
}
@keyframes recPulse {
  0%,100% { box-shadow: 0 4px 0 #C9405A, 0 0 0 0 rgba(217,43,74,.55); }
  50%     { box-shadow: 0 4px 0 #C9405A, 0 0 0 18px rgba(217,43,74,0); }
}

.send-btn {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 22px; color: #fff;
  background: linear-gradient(145deg, #8FDCFF, var(--pond-deep));
  border: 3px solid #fff;
  box-shadow: 0 4px 0 var(--pond-dark), 0 10px 22px rgba(56,182,232,.42);
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
}
.send-btn:hover { transform: translateY(-3px) scale(1.04); }
.send-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--pond-dark); }
.send-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.mic-hint {
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  padding: 8px 0 2px; text-align: center; transition: color .2s;
}
.mic-hint.live { color: #D2384F; }

/* ---------- 侧边栏 ---------- */
.side {
  position: fixed; right: 16px; top: 130px; width: 260px; z-index: 4;
  display: flex; flex-direction: column; gap: 14px;
}
.side-card {
  background: rgba(255,255,255,.88); backdrop-filter: blur(12px);
  border: 3px solid #fff; border-radius: var(--r);
  padding: 15px 16px; box-shadow: var(--shadow);
}
.side-card h3 { font-size: 15px; margin-bottom: 11px; color: var(--ink); letter-spacing: .3px; display: flex; align-items: center; gap: 6px; }
.side-card h3 small {
  margin-left: auto; font-size: 11px; font-weight: 800; color: #B57E00;
  background: #FFF4CC; border-radius: 999px; padding: 2px 9px;
}

.vocab-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.vocab-list .empty { font-size: 12.5px; color: #C4B48C; font-weight: 600; text-align: center; line-height: 1.7; padding: 12px 0; }
.v-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 11px; border-radius: 13px; cursor: pointer;
  background: #FFFCF0; border: 2px solid #F7ECC8;
  transition: all .17s;
  animation: popIn .3s;
}
.v-item:hover { background: #FFF6D8; transform: translateX(-3px); border-color: #FFE08A; }
.v-item .w { font-size: 14px; font-weight: 800; color: #B57E00; }
.v-item .p { font-size: 11px; color: #C0A24E; font-weight: 600; display: block; }
.v-item .z { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

/* ---------- 🏆 成就墙 ---------- */
.ach-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.ach-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 14px;
  background: #FAFAF7; border: 2px solid #EFECE2;
  filter: grayscale(1); opacity: .55;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.ach-item .ic { font-size: 22px; flex: 0 0 auto; }
.ach-item .tx { flex: 1; min-width: 0; }
.ach-item .tx b { display: block; font-size: 13px; font-weight: 800; color: var(--ink); }
.ach-item .tx small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-soft); line-height: 1.4; }
.ach-item .st { flex: 0 0 auto; font-size: 14px; }
.ach-item.unlocked {
  filter: none; opacity: 1;
  background: linear-gradient(160deg,#FFFCF0,#FFF3C4);
  border-color: var(--duck);
  box-shadow: 0 3px 0 var(--duck-deep);
  animation: popIn .4s;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; top: 84px; left: 50%; z-index: 99;
  transform: translateX(-50%);
  padding: 14px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FFC93C, var(--beak-dark));
  border: 3px solid #fff;
  box-shadow: 0 8px 26px rgba(245,127,23,.45);
  animation: toastIn .5s cubic-bezier(.34,1.56,.64,1), toastOut .4s 3.4s forwards;
  white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.pink {
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  box-shadow: 0 8px 26px rgba(232,112,158,.5);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(.8); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(-20px); } }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 50;
  display: none; place-items: center; padding: 20px;
  background: rgba(61,51,37,.42); backdrop-filter: blur(6px);
}
.modal-mask.show { display: grid; animation: fadeIn .22s; }
@keyframes fadeIn { from { opacity: 0; } }

.modal {
  width: 100%; max-width: 530px; max-height: 88vh; overflow-y: auto;
  background: var(--paper); border-radius: var(--r-lg);
  border: 4px solid #fff; padding: 26px 28px;
  box-shadow: var(--shadow-lg);
  animation: popIn .36s cubic-bezier(.34,1.56,.64,1);
}
.modal h2 { font-size: 22px; margin-bottom: 18px; color: #8A5A00; }
.help-item { margin-bottom: 13px; }
.help-item b { font-size: 15px; color: var(--beak-dark); }
.help-item p { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; line-height: 1.65; margin-top: 3px; }
.help-item.tips {
  background: #FFFBEF; border-radius: 14px; padding: 12px 14px;
  border-left: 5px solid var(--duck);
}
.help-item.tips b { color: #8A6A00; }

.modal-close {
  width: 100%; margin-top: 8px; cursor: pointer; font-family: var(--font);
  padding: 15px; border-radius: 18px; border: none;
  font-size: 16px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FFC93C, var(--beak-dark));
  box-shadow: 0 5px 0 #C66900, 0 10px 22px rgba(255,159,69,.4);
  transition: all .18s;
}
.modal-close:hover { transform: translateY(-2px); }
.modal-close:active { transform: translateY(2px); box-shadow: 0 1px 0 #C66900; }
.modal-close.ghost {
  background: #fff; color: var(--ink-soft); border: 3px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.modal-close.ghost:hover { border-color: var(--duck-deep); color: var(--ink); }

.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 16px; }
.topic {
  cursor: pointer; font-family: var(--font);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 17px 10px; border-radius: 20px;
  border: 3px solid var(--line); background: #fff;
  box-shadow: var(--shadow-sm); transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.topic:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--duck-deep);
  box-shadow: 0 8px 0 rgba(61,51,37,.08), 0 14px 28px rgba(255,213,79,.32);
}
.topic .ti { font-size: 32px; }
.topic .tt { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.topic .te { font-size: 11.5px; font-weight: 700; color: #B3A98C; }

/* ---------- 🎉 升级弹窗 ---------- */
.level-modal { text-align: center; max-width: 420px; }
.lv-big {
  font-size: 76px; line-height: 1.1;
  animation: lvBounce 1s cubic-bezier(.34,1.56,.64,1) infinite alternate;
  margin-bottom: 6px;
}
@keyframes lvBounce { from { transform: translateY(0) scale(1); } to { transform: translateY(-10px) scale(1.06); } }
.level-modal h2 { margin-bottom: 8px; }
.lv-title {
  font-size: 20px; font-weight: 800; color: #8A5A00;
  background: linear-gradient(160deg,#FFFCF0,#FFF3C4);
  border: 3px solid var(--duck); border-radius: 999px;
  display: inline-block; padding: 8px 24px; margin-bottom: 12px;
  box-shadow: 0 4px 0 var(--duck-deep);
}
.lv-desc { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 14px; }
.lv-achs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.lv-achs:empty { display: none; }
.lv-ach-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 800; color: #B57E00;
  background: #FFF4CC; border: 2px solid #FFE08A;
  animation: popIn .4s;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .side { position: static; width: 100%; max-width: 1000px; margin: 0 auto 22px; padding: 0 22px; flex-direction: row; }
  .side-card { flex: 1; }
}
@media (max-width: 860px) {
  .side { flex-direction: column; }
}
@media (max-width: 640px) {
  .topbar { padding: 11px 14px; gap: 10px; }
  .brand-logo { width: 46px; height: 46px; }
  .brand-text h1 { font-size: 18px; }
  .brand-text p { display: none; }
  .stat-pill { padding: 6px 10px; font-size: 13px; border-width: 2.5px; }
  .mini-bar { width: 54px; }
  .icon-btn { width: 37px; height: 37px; font-size: 15px; border-width: 2.5px; }
  .mode-bar { padding: 11px 14px 2px; }
  .mode-chip { padding: 9px 14px; font-size: 13.5px; }
  .mode-chip .mi { font-size: 16px; }
  .stage { padding: 4px 14px 16px; }
  .avatar { width: 92px; height: 92px; }
  .bubble { max-width: 86%; font-size: 15.5px; padding: 12px 15px; }
  .bubble .en { font-size: 16px; }
  .composer { padding: 9px; gap: 8px; border-radius: 26px; }
  .mic-btn, .send-btn { width: 48px; height: 48px; font-size: 20px; }
  #textInput { font-size: 15px; }
  .modal { padding: 22px 20px; }
  .topic-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .topic .ti { font-size: 26px; }
  .topic .tt { font-size: 13px; }
  .toast { font-size: 13.5px; }
}
