/* D3 英语乐园 — 一年级小朋友的 iPad 桌面 Web App(大按钮、圆润字体、弹跳动画) */
:root {
  color-scheme: light;
  --bg1: #FFF4DE;
  --bg2: #FFE3EC;
  --ink: #3B2F4A;
  --ink2: #75688A;
  --card: #FFFFFF;
  --orange: #FF9F1C;
  --orange-d: #E07A00;
  --green: #22C38E;
  --green-d: #169A6E;
  --blue: #4DA3FF;
  --blue-d: #2F7FD8;
  --pink: #FF6B9D;
  --star: #FFC83D;
  --radius: 26px;
  --shadow: 0 6px 0 rgba(59, 47, 74, .06), 0 14px 30px rgba(59, 47, 74, .10);
  --font: "Arial Rounded MT Bold", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --ipa: "Lucida Grande", "Helvetica Neue", "Arial Unicode MS", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { touch-action: manipulation; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(165deg, var(--bg1) 0%, #FFFFFF 48%, var(--bg2) 100%) fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
}
button { font-family: inherit; color: inherit; touch-action: manipulation; cursor: pointer; }
#app {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) max(18px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 28px) max(18px, env(safe-area-inset-left, 0px));
}
.hidden { display: none !important; }
.ipa { font-family: var(--ipa); font-weight: 600; letter-spacing: .02em; }

/* ── 启动 ── */
.boot { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.boot__fox { font-size: 96px; animation: bob 2.4s ease-in-out infinite; }
.boot__text { font-size: 20px; color: var(--ink2); }

/* ── 通用动画 ── */
.view-enter { animation: viewIn .35s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.bounce { animation: bounce .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bounce { 0% { transform: scale(1); } 35% { transform: scale(.92); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ── 按钮 ── */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 5px 0 var(--orange-d);
  transition: transform .08s, box-shadow .08s, opacity .2s;
  white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--orange-d); }
.btn:disabled { opacity: .4; }
.btn--big { font-size: 22px; padding: 16px 30px; min-height: 62px; }
.btn--green { background: var(--green); box-shadow: 0 5px 0 var(--green-d); }
.btn--green:active:not(:disabled) { box-shadow: 0 1px 0 var(--green-d); }
.btn--blue { background: var(--blue); box-shadow: 0 5px 0 var(--blue-d); }
.btn--blue:active:not(:disabled) { box-shadow: 0 1px 0 var(--blue-d); }
.btn--ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #EADFD2; }
.btn--ghost:active:not(:disabled) { box-shadow: 0 1px 0 #EADFD2; }
.btn.pulse { animation: pulse 1s ease-in-out infinite; }
.icon-btn { flex: none; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #fff; font-size: 22px; box-shadow: 0 4px 0 #EADFD2; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #EADFD2; }
.link { border: 0; background: none; color: var(--blue-d); font-size: 16px; padding: 4px; }

/* ── 顶栏 ── */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 26px; font-weight: 800; }
.brand__logo { font-size: 38px; }
.stats { margin-left: auto; display: flex; gap: 8px; }
.stat { border: 0; background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 18px; box-shadow: 0 3px 0 #EFE4D6; }
.stat b { font-size: 20px; }
.topbar--sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 0 10px;
  margin-top: calc(-1 * env(safe-area-inset-top, 0px) - 8px);
  background: linear-gradient(var(--bg1) 70%, rgba(255, 244, 222, 0));
}
.topbar__title { margin: 0 auto; font-size: 24px; }
.dots { display: flex; gap: 8px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.dot {
  min-width: 48px; height: 48px; padding: 0 8px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: #fff; color: var(--c); font-size: 22px; box-shadow: inset 0 0 0 3px #F1E5D6;
  transition: transform .2s;
}
.dot.is-done { background: var(--c); color: #fff; box-shadow: none; }
.dot.is-current { transform: scale(1.15); box-shadow: 0 0 0 4px var(--c); }
.dot--quiz { height: 56px; }
.dot small { font-size: 10px; margin-top: 2px; }
.dot small i { font-style: normal; color: #E6DCCF; }
.dot small i.on { color: var(--star); }
.dot.is-done small i { color: rgba(255, 255, 255, .5); }
.dot.is-done small i.on { color: #FFE07A; }
.counter { flex: none; min-width: 60px; text-align: right; color: var(--ink2); font-size: 18px; }

/* ── 小狐狸老师 ── */
.mascot { display: flex; align-items: flex-end; gap: 10px; margin: 10px 0 16px; }
.mascot__fox { font-size: 64px; line-height: 1; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .08)); }
.mascot--small .mascot__fox { font-size: 50px; }
.mascot--hero .mascot__fox { font-size: 86px; }
.mascot__bubble {
  position: relative;
  background: #fff;
  padding: 14px 18px;
  border-radius: 22px 22px 22px 6px;
  box-shadow: var(--shadow);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.45;
  max-width: 720px;
}
.mascot__bubble b { color: var(--orange-d); }

/* ── 安装提示 ── */
.install { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 16px; margin: 8px 0 2px; }
.install span { flex: 1; line-height: 1.5; }
.install b { color: var(--blue-d); }

/* ── 首页任务卡 ── */
.missions { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .missions { grid-template-columns: 1fr 1fr; } }
.mission { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.mission--learn { border-top: 8px solid var(--orange); }
.mission--quiz { border-top: 8px solid var(--green); }
.mission.is-complete::before {
  content: '已完成';
  position: absolute; top: 18px; right: -36px; transform: rotate(35deg);
  background: var(--green); color: #fff; font-size: 13px; padding: 4px 42px;
}
.mission__head { display: flex; gap: 12px; align-items: center; }
.mission__icon { font-size: 46px; }
.mission__head h2 { margin: 0; font-size: 26px; }
.mission__head p { margin: 2px 0 0; color: var(--ink2); font-size: 15px; }
.mission__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.mission__foot { color: var(--ink2); font-size: 15px; margin-top: -4px; }
.chip-glyph {
  position: relative; min-width: 72px; height: 72px; padding: 0 12px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  font-size: 32px; color: var(--c); background: #FFF9F0; box-shadow: inset 0 0 0 3px #F4E7D6;
}
.chip-glyph.is-done { background: var(--c); color: #fff; box-shadow: none; }
.chip-glyph__check {
  position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 15px; display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--green-d); font-style: normal;
}
.mini-stars { font-size: 12px; margin-top: 4px; letter-spacing: 1px; }
.mini-stars i { font-style: normal; color: #E6DCCF; }
.mini-stars i.on { color: var(--star); }
.chip-glyph.is-done .mini-stars i { color: rgba(255, 255, 255, .5); }
.chip-glyph.is-done .mini-stars i.on { color: #FFE07A; }
.progress { height: 14px; background: #F4ECE2; border-radius: 99px; overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, #FFC46B, var(--orange)); border-radius: inherit; transition: width .5s; }

/* ── 发音乐园(全部字母/组合)── */
.panel { margin-top: 22px; background: rgba(255, 255, 255, .72); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel__head h3 { margin: 0; font-size: 24px; }
.panel__head span { color: var(--ink2); font-size: 14px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 0; border-radius: 999px; padding: 10px 16px; font-size: 17px; background: #fff; box-shadow: 0 3px 0 #EADFD2; color: var(--ink2); }
.tab small { font-size: 12px; opacity: .7; margin-left: 2px; }
.tab.active { background: var(--ink); color: #fff; box-shadow: 0 3px 0 #1F1830; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin-top: 10px; }
.tile {
  position: relative; border: 0; background: #fff; border-radius: 22px; padding: 12px 6px 10px;
  box-shadow: 0 5px 0 #EFE4D6; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 #EFE4D6; }
.tile__glyph { font-size: 38px; color: var(--c); line-height: 1.1; }
.tile__label { font-size: 12px; color: var(--ink2); background: #F6F0E8; border-radius: 8px; padding: 1px 6px; }
.tile__emoji { font-size: 26px; line-height: 1.2; }
.tile__ipa { font-size: 15px; color: var(--ink2); }
.tile.is-learned::after { content: '✓'; position: absolute; top: 6px; right: 9px; color: var(--green); font-size: 16px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day { background: #fff; border-radius: 16px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; box-shadow: 0 3px 0 #EFE4D6; }
.day.is-today { box-shadow: 0 0 0 3px var(--orange); }
.day__w { color: var(--ink2); }
.day__learn { font-size: 20px; }
.day__stars { font-size: 13px; }
.foot { display: flex; justify-content: center; gap: 18px; margin-top: 26px; font-size: 14px; }
.foot a { color: var(--ink2); text-decoration: none; }

/* ── 学习卡片(今日学习 / 发音乐园详情 共用)── */
.card {
  background: var(--card); border-radius: 32px; box-shadow: var(--shadow); padding: 20px;
  display: grid; gap: 20px; grid-template-columns: 1fr;
}
@media (min-width: 900px) { .card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; } }
.card-enter { animation: cardIn .5s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateX(60px) rotate(2deg); } to { opacity: 1; transform: none; } }
.card__glyph {
  display: flex; align-items: baseline; justify-content: center; gap: .12em; flex-wrap: wrap;
  font-size: clamp(96px, 16vw, 168px); line-height: 1; color: var(--c);
  background: #FFF9F0; border-radius: 26px; padding: 18px 10px 24px;
  text-shadow: 0 6px 0 rgba(0, 0, 0, .07); cursor: pointer;
}
.g-lo { font-size: .78em; opacity: .9; }
.card__glyph--combo { font-size: clamp(84px, 13vw, 140px); }
.g-label { align-self: center; font-size: 22px; color: var(--ink2); background: #fff; border-radius: 12px; padding: 4px 10px; text-shadow: none; }
.card__sounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.sound-btn {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 0; border-radius: 20px; background: #F4F0FF; box-shadow: 0 5px 0 #DCD3F7; text-align: left;
  transition: transform .08s;
}
.sound-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #DCD3F7; }
.sound-btn__icon { font-size: 30px; }
.sound-btn__text { display: flex; flex-direction: column; }
.sound-btn__label { font-size: 15px; color: var(--ink2); }
.sound-btn .ipa { font-size: 30px; color: var(--ink); }
.sound-btn__play { margin-left: auto; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 16px; }
.playing .sound-btn__play, .playing .word__play { animation: pulse .5s ease-in-out infinite; }

.card__tip { display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 12px 14px; background: #EFFAF5; border-radius: 20px; }
.card__mouth { width: 100px; height: 100px; flex: none; }
.mouth { width: 100%; height: 100%; display: block; }
.mouth__lips { transform-box: fill-box; transform-origin: center; }
.card__mouth.talk .mouth__lips { animation: talk .3s ease-in-out 5 alternate; }
@keyframes talk { from { transform: scale(1, 1); } to { transform: scale(1.12, 1.4); } }
.card__mouth.talk .mouth--lips .mouth__lips { animation: lipsPop .38s ease-in-out 3; }
@keyframes lipsPop { 0%, 55% { transform: scaleY(1); } 78% { transform: scaleY(2); } 100% { transform: scaleY(1); } }
.mouth__air { opacity: 0; }
.card__mouth.talk .mouth__air { animation: air .75s ease-out 2; }
@keyframes air { 0% { opacity: .95; transform: translateX(-12px); } 100% { opacity: 0; transform: translateX(14px); } }
.tip-main { font-size: 22px; font-weight: 800; line-height: 1.35; }
.tip-ipa { font-size: 16px; color: var(--ink2); margin-top: 4px; line-height: 1.5; }
.tip-ipa .ipa { color: var(--green-d); font-size: 20px; margin-right: 4px; }

.card__right { display: flex; flex-direction: column; }
.card__words-title { font-size: 16px; color: var(--ink2); margin: 2px 4px 10px; }
.card__words { display: grid; gap: 12px; }
.word {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 12px 16px; border: 0; border-radius: 22px; background: #FFF7EC; box-shadow: 0 5px 0 #F5DFC4;
}
.word:active { transform: translateY(4px); box-shadow: 0 1px 0 #F5DFC4; }
.word__emoji { font-size: 56px; line-height: 1; width: 72px; text-align: center; flex: none; }
.word__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.word__en { font-size: 34px; letter-spacing: .02em; overflow-wrap: anywhere; }
.word__en .hl { color: var(--c); }
.word__sub { display: flex; gap: 12px; flex-wrap: wrap; font-size: 18px; color: var(--ink2); }
.word__play { font-size: 24px; opacity: .55; flex: none; }

/* 按顺序点读:下一个要点的发光,点过的打勾 */
.is-next { animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { outline: 0 solid rgba(255, 159, 28, .0); } 50% { outline: 6px solid rgba(255, 159, 28, .55); } }
[data-step].is-done::after {
  content: '✓'; position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 17px; display: grid; place-items: center;
  box-shadow: 0 2px 0 var(--green-d); animation: popIn .3s cubic-bezier(.3, 1.6, .5, 1);
}
.lesson__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }

/* ── 小测验 ── */
.quiz__stage { background: #fff; border-radius: 32px; box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.quiz__glyph { font-size: clamp(130px, 22vw, 220px); line-height: 1; color: var(--c); display: flex; gap: .1em; align-items: baseline; animation: float 3s ease-in-out infinite; cursor: pointer; }
.quiz__stars { display: flex; gap: 14px; }
.big-star { font-size: clamp(54px, 8vw, 76px); color: #EFE6DA; line-height: 1; }
.big-star.on { color: var(--star); text-shadow: 0 4px 0 #E8A800; }
.big-star.pop { animation: starPop .55s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes starPop { 0% { transform: scale(.2) rotate(-40deg); } 70% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(1); } }
.quiz__result { min-height: 64px; width: min(520px, 100%); }
.sim { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.sim__bar { flex: 1; height: 16px; border-radius: 99px; background: #F3ECE3; overflow: hidden; }
.sim__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FFD36E, var(--green)); border-radius: inherit; transition: width .8s; }
.quiz__hint { margin-top: 8px; text-align: center; color: var(--ink2); font-size: 18px; }
.quiz__hint b { color: var(--orange-d); }
.quiz__controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-top: 22px; }
.quiz__controls > .btn { justify-self: end; }
.quiz__after { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
@media (max-width: 640px) {
  .quiz__controls { grid-template-columns: 1fr; justify-items: center; }
  .quiz__controls > .btn { justify-self: center; }
  .quiz__after { flex-direction: row; align-items: center; }
}
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mic {
  position: relative; width: 156px; height: 156px; border-radius: 50%; border: 0; color: #fff;
  background: radial-gradient(circle at 35% 30%, #FF9CBC, var(--pink));
  box-shadow: 0 8px 0 #D94C7D, 0 16px 30px rgba(255, 107, 157, .35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.mic:active { transform: translateY(4px); box-shadow: 0 4px 0 #D94C7D; }
.mic__icon { font-size: 60px; line-height: 1; }
.mic__label { font-size: 18px; font-weight: 800; }
.mic__ring { position: absolute; inset: -12px; border-radius: 50%; border: 7px solid transparent; }
.mic.recording { background: radial-gradient(circle at 35% 30%, #FF8A8A, #F04444); box-shadow: 0 8px 0 #B82C2C; animation: pulse .9s ease-in-out infinite; }
.mic.recording .mic__ring { border-color: rgba(240, 68, 68, .25); border-top-color: #F04444; animation: spin 2.2s linear forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
.mic.busy { opacity: .7; }
.level { display: flex; gap: 5px; height: 40px; align-items: center; opacity: 0; transition: opacity .2s; }
.level.on { opacity: 1; }
.level i { width: 7px; height: 34px; border-radius: 4px; background: var(--pink); transform: scaleY(.2); transition: transform .08s; }

/* ── 完成 / 成绩 ── */
.view--done { text-align: center; padding-top: 5vh; }
.trophy { font-size: 140px; line-height: 1; }
.bounce-in { animation: bounceIn .8s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes bounceIn { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1); } }
.view--done h1 { font-size: clamp(32px, 5vw, 48px); margin: 10px 0; }
.done__sub { font-size: 22px; color: var(--ink2); line-height: 1.5; }
.done__streak { display: inline-block; margin-top: 6px; padding: 8px 18px; background: #fff; border-radius: 999px; font-size: 20px; box-shadow: var(--shadow); }
.done__btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.score-list { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.score-item { background: #fff; border-radius: 22px; padding: 12px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; }
.score-item__g { font-size: 48px; color: var(--c); line-height: 1.1; }
.score-item__s i { font-style: normal; font-size: 20px; color: #E6DCCF; }
.score-item__s i.on { color: var(--star); }

/* ── 学习记录 ── */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.summary__item { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.summary__icon { font-size: 34px; }
.summary__item b { font-size: 30px; }
.summary__label { color: var(--ink2); font-size: 14px; }
.records { display: flex; flex-direction: column; gap: 8px; }
.record { display: grid; grid-template-columns: 116px 1fr 1fr; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: 0 3px 0 #EFE4D6; font-size: 17px; }
.record.is-today { box-shadow: 0 0 0 3px var(--orange); }
.record__date b { font-size: 20px; margin-right: 6px; }
.record__date span { color: var(--ink2); font-size: 14px; }
.record__learn, .record__quiz { color: var(--ink2); }
.record .ok { color: var(--ink); font-weight: 800; }
@media (max-width: 520px) { .record { grid-template-columns: 1fr; gap: 4px; } }

/* ── 登录 ── */
.view--login { display: flex; flex-direction: column; align-items: center; padding-top: 5vh; text-align: center; }
.login__card { background: #fff; border-radius: 30px; box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr { width: 260px; height: 260px; display: grid; place-items: center; background: #FAF6F0; border-radius: 18px; color: var(--ink2); }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; border-radius: 12px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.login__status { font-size: 18px; margin: 4px 0; }
.login__tip { color: var(--ink2); font-size: 14px; margin: 0; }

/* ── 详情抽屉 ── */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(40, 28, 52, .35); opacity: 0; transition: opacity .25s; }
.sheet__panel {
  position: relative; width: min(1100px, 100%); max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 18px);
  background: linear-gradient(#FFF7EA, #FFFFFF); border-radius: 30px 30px 0 0;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .9, .3, 1.1);
}
.sheet.open { pointer-events: auto; }
.sheet.open .sheet__backdrop { opacity: 1; }
.sheet.open .sheet__panel { transform: none; }
.sheet__bar { display: flex; justify-content: flex-end; position: sticky; top: 0; z-index: 2; margin-bottom: 8px; }
@media (min-width: 900px) { .sheet { align-items: center; } .sheet__panel { border-radius: 30px; } }

/* ── 提示 / 彩带 ── */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 30px); transform: translate(-50%, 20px);
  background: rgba(59, 47, 74, .92); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 17px;
  opacity: 0; transition: .25s; z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 90; }
.confetti { position: absolute; top: -24px; width: 12px; height: 18px; border-radius: 3px; animation: fall 2.4s linear forwards; }
@keyframes fall { to { transform: translateY(112vh) rotate(720deg); } }

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

/* ── 2026-09-16:每日全课程(39 项)+ 混合测验 ── */
.mission__chips--dense { gap: 6px; }
.chip-glyph--sm { min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px; font-size: 20px; }
.chip-glyph--sm .chip-glyph__check { width: 18px; height: 18px; font-size: 11px; top: -5px; right: -5px; }
.lesson-progress { flex: 1; display: flex; flex-direction: column; gap: 4px; margin: 0 8px; }
.lesson-progress .progress { height: 10px; }
.lesson-progress__text { font-size: 13px; color: var(--ink2); text-align: center; }
.quiz__glyph--combo { font-size: clamp(96px, 16vw, 168px); gap: .2em; }
.quiz__glyph--combo .g-label { font-size: 22px; }
.stat--exit { text-decoration: none; color: var(--ink); }

/* ── 单词练习 ── */
.missions--1 { grid-template-columns: 1fr; }
.mission--words { border-top: 8px solid var(--blue); }
.panel--words .btnrow { margin-top: 4px; }
.btnrow { display: flex; gap: 12px; flex-wrap: wrap; }
.btnrow .btn { flex: 1; min-width: 160px; }
.wordchips { display: flex; flex-wrap: wrap; gap: 8px; }
.wordchip { padding: 6px 12px; border-radius: 999px; background: #F3F6FB; color: var(--ink2); font-size: 18px; box-shadow: inset 0 0 0 2px #E1E8F3; }
.wordchip.is-done { background: var(--blue); color: #fff; box-shadow: none; }
.wcards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .wcards { grid-template-columns: 1fr 1fr; } }
.wcard { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; border-left: 8px solid var(--c); }
.wcard.is-learned { border-left-color: var(--green); }
.wcard.is-learned .wcard__word::after { content: '✓ 学过'; position: absolute; top: -8px; right: 12px; background: var(--green); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.wcard__word { position: relative; display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 20px; background: #FFF7EC; box-shadow: 0 5px 0 #F5DFC4; padding: 12px 14px; }
.wcard__word:active { transform: translateY(4px); box-shadow: 0 1px 0 #F5DFC4; }
.wcard__emoji { font-size: 44px; text-align: center; }
.wcard__en { font-size: 36px; color: var(--c); grid-column: 2; }
.wcard__sub { grid-column: 2; display: flex; gap: 12px; font-size: 18px; color: var(--ink2); flex-wrap: wrap; }
.wcard__cn { color: var(--ink); font-weight: 700; }
.wcard__play { grid-column: 3; grid-row: 1 / 3; font-size: 26px; opacity: .6; }
.wcard__word.playing .wcard__play { animation: pulse .5s ease-in-out infinite; opacity: 1; }
.wcard__sec { display: flex; flex-direction: column; gap: 8px; }
.wcard__label { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink2); padding: 0 4px; }
.wline { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; text-align: left; border: 0; border-radius: 16px; background: #F4F0FF; box-shadow: 0 4px 0 #DCD3F7; padding: 10px 14px; }
.wline:active { transform: translateY(3px); box-shadow: 0 1px 0 #DCD3F7; }
.wline__en { font-size: 20px; }
.wline__cn { font-size: 14px; color: var(--ink2); grid-column: 1; }
.wline__play { grid-column: 2; grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 13px; }
.wline.playing .wline__play { animation: pulse .5s ease-in-out infinite; }
.wline--dlg { grid-template-columns: 30px 1fr auto; background: #EFFAF5; box-shadow: 0 4px 0 #CDEBDD; }
.wline--B { background: #E9F3FF; box-shadow: 0 4px 0 #CFE0F7; }
.wline__who { grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.wline--dlg .wline__en { grid-column: 2; }
.wline--dlg .wline__cn { grid-column: 2; }
.wline--dlg .wline__play { grid-column: 3; }
.dict__stage { gap: 6px; padding: 30px 22px; }
.dict__no { font-size: 16px; color: var(--ink2); }
.dict__cn { font-size: clamp(56px, 10vw, 110px); line-height: 1.2; font-weight: 800; color: var(--ink); cursor: pointer; }
.dict__hint { color: var(--ink2); font-size: 18px; }
.dict__list { display: flex; flex-direction: column; gap: 8px; }
.dict__row { display: grid; grid-template-columns: 36px 1fr 1fr 40px; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 #EFE4D6; padding: 10px 14px; }
.dict__row-no { width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; }
.dict__row-en { font-size: 30px; }
.dict__row-cn { font-size: 18px; color: var(--ink2); }
.dict__row-mark { font-size: 22px; color: var(--green); text-align: center; }
.dict__row.is-wrong { background: #FFF1F1; box-shadow: 0 3px 0 #F5C6C6; }
.dict__row.is-wrong .dict__row-mark::before { content: '✗ 写错'; font-size: 13px; color: var(--red, #E5484D); white-space: nowrap; }
.dict__row.is-wrong .dict__row-mark { color: transparent; }

.icon-btn--link { display: grid; place-items: center; text-decoration: none; }
.wcard__no { grid-column: 1; grid-row: 1 / 3; justify-self: start; align-self: start; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font-size: 14px; font-weight: 800; display: grid; place-items: center; margin: -4px 0 0 -6px; }
.wcard__word { grid-template-columns: 64px 1fr auto; }
.wcard__word .wcard__emoji { grid-column: 1; grid-row: 1 / 3; }
.wordchip__no { font-style: normal; font-size: 12px; margin-right: 4px; opacity: .7; }

/* ── 单词学习:一次一个词(2026-09-17)── */
.wdots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.wdot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #E9DFD3; background: #fff; color: var(--ink2); font-weight: 700; font-size: 14px; cursor: pointer; }
.wdot.is-learned { background: #E7F7EC; border-color: var(--green); color: #15803D; }
.wdot.is-current { background: var(--orange); border-color: var(--orange); color: #fff; transform: scale(1.12); box-shadow: 0 4px 10px rgba(255, 140, 50, .35); }
.wcard--single { max-width: 720px; margin: 0 auto; width: 100%; }
.wcard--single .wcard__en { font-size: clamp(40px, 8vw, 64px); }
.wnav { max-width: 720px; margin-left: auto; margin-right: auto; }
.wnav .btn { flex: 1; min-width: 150px; }
.wnav .btn:disabled { opacity: .45; }

/* ── 老师讲课 ── */
.media-entry { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 720px; margin: 16px auto 0; padding: 14px 18px; border: 0; border-radius: 20px; background: linear-gradient(90deg, #EEF4FF, #F5EEFF); color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.media-entry__icon { font-size: 30px; }
.media-entry__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.media-entry__text b { font-size: 18px; }
.media-entry__text span { font-size: 14px; color: var(--ink2); }
.media-entry__go { font-size: 22px; color: #6B4FD8; }
.mission .media-entry { margin-top: 4px; box-shadow: none; }
/* 边听边看:标签 + 吸顶播放器(含「正在讲」横幅)+ 词卡网格 */
.media-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; max-width: 980px; margin: 0 auto; }
.media-tab { flex: 1 0 auto; min-height: 52px; padding: 8px 16px; border: 2px solid #E9DFD3; border-radius: 16px; background: #fff; color: var(--ink2); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; cursor: pointer; font-size: 13px; }
.media-tab b { font-size: 16px; color: var(--ink); }
.media-tab.active { border-color: var(--orange); background: #FFF4E0; }
.media-player { position: sticky; top: 64px; z-index: 5; max-width: 980px; margin: 0 auto 16px; padding: 12px 14px; border-radius: 22px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.media-player__audio { width: 100%; }
.media-now { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 6px 10px; border-radius: 16px; background: #F6F1EA; transition: background .25s; }
.media-now.is-live { background: linear-gradient(90deg, #FFE9B8, #FFD9A0); }
.media-now__emoji { font-size: 40px; line-height: 1; }
.media-now__text { display: flex; flex-direction: column; min-width: 0; }
.media-now__en { font-size: clamp(22px, 4.5vw, 34px); font-weight: 800; color: var(--ink); line-height: 1.15; }
.media-now__cn { font-size: 15px; color: var(--ink2); }
.mcards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: 980px; margin: 0 auto; }
.mcards--phrase { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.mcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 132px; padding: 16px 10px 12px; border-radius: 20px; background: #fff; border: 3px solid transparent; border-bottom-color: var(--c); box-shadow: var(--shadow); cursor: pointer; text-align: center; transition: transform .18s, border-color .18s, box-shadow .18s, background .18s; -webkit-tap-highlight-color: transparent; }
.mcard.is-nocue { cursor: default; opacity: .75; }
.mcard.is-heard { background: #F3FBF5; }
.mcard.is-now { border-color: var(--orange); background: #FFF4DC; transform: scale(1.06); box-shadow: 0 10px 26px rgba(255, 140, 40, .35); z-index: 2; }
.mcard.is-now .mcard__en { color: #D9480F; }
.mcard__no { position: absolute; top: 8px; left: 10px; font-size: 12px; font-weight: 700; color: var(--ink2); }
.mcard__emoji { font-size: 34px; line-height: 1.1; }
.mcard__en { font-size: 22px; font-weight: 800; color: var(--ink); word-break: break-word; }
.mcards--phrase .mcard__en { font-size: 17px; font-weight: 600; color: var(--ink2); }
.mcards--phrase .mcard__en b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); }
.mcards--phrase .mcard.is-now .mcard__en b { color: #D9480F; }
.mcard__ipa { font-size: 13px; color: var(--ink2); }
.mcard__cn { font-size: 15px; color: var(--ink2); }
.mcard__time { margin-top: auto; font-size: 12px; color: #B08A4A; }
.mcard__say { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .mcard { transition: none; } .mcard.is-now { transform: none; } }

/* 收起来的次要入口(点读 / 听写 / 没有老师录音的课时) */
.morefold { margin-top: 14px; border-radius: 16px; background: rgba(255,255,255,.55); border: 1.5px dashed rgba(120,100,160,.28); }
.morefold > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-size: 15px; font-weight: 700; color: #7a6f92; display: flex; align-items: center; gap: 8px; -webkit-tap-highlight-color: transparent; }
.morefold > summary::-webkit-details-marker { display: none; }
.morefold > summary::before { content: '▸'; transition: transform .18s; display: inline-block; }
.morefold[open] > summary::before { transform: rotate(90deg); }
.morefold__body { padding: 4px 14px 14px; }
.morefold__body .btnrow { flex-wrap: wrap; }
.view--words > .missions > .morefold { margin-top: 4px; }
.mission__listen { width: 100%; margin-top: 12px; }

.mcard__abbr { display: block; width: fit-content; margin: 3px auto 0; font-size: .55em; font-style: normal; font-weight: 700; color: #8a7fa6; background: rgba(120,100,160,.12); border-radius: 8px; padding: 1px 6px; vertical-align: middle; }
