/* ============ 一年级全能练习 - 儿童友好样式 ============ */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { height:100%; }
body {
  font-family: "PingFang SC","Microsoft YaHei","微软雅黑",system-ui,sans-serif;
  background: linear-gradient(180deg,#FFF6E3 0%,#FFEDE1 60%,#FFE7EF 100%);
  color:#3A3A3A;
  touch-action: manipulation;
  overflow-x:hidden;
}
#app { max-width:560px; margin:0 auto; padding:14px 14px calc(30px + env(safe-area-inset-bottom)); min-height:100%; }

button { font-family:inherit; border:none; cursor:pointer; background:none; color:inherit; touch-action:manipulation; }

/* ---------- 顶栏 ---------- */
.topbar { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.backbtn {
  width:46px;height:46px;border-radius:16px;background:#fff;font-size:22px;
  box-shadow:0 3px 0 rgba(0,0,0,.08); flex:0 0 auto;
}
.title { font-size:22px; font-weight:800; flex:1; }
.title small { display:block; font-size:12px; font-weight:400; color:#999; }

/* ---------- 首页 ---------- */
.home-hero { text-align:center; padding:16px 0 6px; }
.home-hero .logo { font-size:64px; line-height:1; }
.home-hero h1 { font-size:30px; font-weight:900; letter-spacing:2px; margin-top:6px;
  background:linear-gradient(90deg,#FF6B6B,#FFA630,#6BCB77,#4D96FF);
  -webkit-background-clip:text; background-clip:text; color:transparent; }
.home-hero p { color:#8a7f74; font-size:14px; margin-top:4px; }

.statcards { display:flex; gap:8px; margin:14px 0; }
.statcard { flex:1; background:#fff; border-radius:20px; padding:12px 4px; text-align:center; box-shadow:0 4px 0 rgba(0,0,0,.06); min-width:0; }
.statcard .num { font-size:21px; font-weight:900; }
.statcard .lbl { font-size:11px; color:#999; margin-top:2px; white-space:nowrap; }
.statcard.stars .num { color:#FFB000; }
.statcard.ok .num { color:#34C759; }

.dailybox { background:#fff; border-radius:20px; padding:14px 16px; margin-bottom:16px; box-shadow:0 4px 0 rgba(0,0,0,.06); }
.dailybox .row { display:flex; justify-content:space-between; font-size:14px; font-weight:700; margin-bottom:8px; }
.progress { height:14px; background:#F0EAE0; border-radius:99px; overflow:hidden; }
.progress > div { height:100%; border-radius:99px; background:linear-gradient(90deg,#FFB84D,#FF7B54); transition:width .4s; }
.dailybox .tip { font-size:12px; color:#A09488; margin-top:8px; }

.subjgrid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.subjcard {
  border-radius:26px; padding:20px 14px 16px; color:#fff; text-align:left;
  box-shadow:0 6px 0 rgba(0,0,0,.12); transition:transform .1s;
}
.subjcard:active { transform:scale(.96); }
.subjcard .ic { font-size:42px; display:block; }
.subjcard .nm { font-size:24px; font-weight:900; margin-top:6px; }
.subjcard .ds { font-size:12px; opacity:.92; margin-top:2px; }

.footbtns { display:flex; gap:10px; margin-top:18px; }
.footbtn { flex:1; background:#fff; border-radius:18px; padding:13px 4px; font-size:14px; font-weight:700;
  box-shadow:0 3px 0 rgba(0,0,0,.06); color:#7A6F63; }
.badges { text-align:center; font-size:22px; letter-spacing:8px; margin:-4px 0 14px; }

/* ---------- 模块列表 ---------- */
.modlist { display:flex; flex-direction:column; gap:10px; }
.modrow { background:#fff; border-radius:20px; padding:12px 14px; display:flex; align-items:center; gap:12px;
  box-shadow:0 3px 0 rgba(0,0,0,.06); }
.modrow .ic { font-size:32px; flex:0 0 40px; text-align:center; }
.modrow .info { flex:1; min-width:0; }
.modrow .nm { font-size:17px; font-weight:800; }
.modrow .ds { font-size:12px; color:#A09488; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.modrow .stars { font-size:14px; letter-spacing:1px; color:#E4DCCF; margin-top:3px; }
.modrow .stars .on { color:#FFB000; }
.modrow .stars span { color:#E8DFD2; }
.modrow .stars span.on { color:#FFB000; }
.roundbtn { width:44px;height:44px;border-radius:50%;font-size:20px;flex:0 0 auto;
  box-shadow:0 3px 0 rgba(0,0,0,.1); display:flex;align-items:center;justify-content:center; }
.roundbtn.play { background:var(--c,#FF6B6B); color:#fff; font-size:18px; }
.roundbtn.learn { background:#FFF3D9; }

/* ---------- 练习页 ---------- */
.quiztop { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.qprogress { flex:1; height:12px; background:#F0EAE0; border-radius:99px; overflow:hidden; }
.qprogress > div { height:100%; background:var(--c,#FF6B6B); border-radius:99px; transition:width .3s; }
.qcount { font-size:14px; font-weight:800; color:#9A8F82; min-width:44px; text-align:right; }
.mutebtn { width:46px;height:46px;border-radius:14px;background:#fff;font-size:19px;box-shadow:0 3px 0 rgba(0,0,0,.08); }

.qcard { background:#fff; border-radius:26px; padding:20px 18px; box-shadow:0 5px 0 rgba(0,0,0,.07); text-align:center; }
.qtext { font-size:22px; font-weight:800; line-height:1.5; }
.qbig { font-size:64px; font-weight:900; margin:14px 0 4px; line-height:1.2; }
.qbig.mid { font-size:48px; }
.qsvg svg.fig { width:200px; height:200px; }
.qaudio { margin-top:10px; display:flex; justify-content:center; gap:10px; flex-wrap:wrap; }
.audiobtn, .hintbtn { background:#EEF6FF; border-radius:99px; padding:12px 20px; min-height:46px; font-size:16px; font-weight:700; color:#2F62C0; box-shadow:0 3px 0 rgba(47,98,192,.15); }
.hintbtn { background:#FFF3D9; color:#B07000; box-shadow:0 3px 0 rgba(176,112,0,.12); }
.hinttext { margin-top:10px; font-size:18px; color:#B07000; font-weight:800; }
.nextbtn { margin-top:12px; background:#34C759; color:#fff; border-radius:16px; padding:13px 34px; font-size:17px; font-weight:900; box-shadow:0 4px 0 rgba(0,0,0,.12); }

/* 退出确认弹窗 */
.quitbox { position:fixed; inset:0; background:rgba(40,30,20,.45); z-index:100; display:flex; align-items:center; justify-content:center; padding:24px; }
.quitcard { background:#fff; border-radius:26px; padding:24px 20px; width:100%; max-width:320px; display:flex; flex-direction:column; gap:12px; text-align:center; animation:pop .25s; }
.quitmsg { font-size:20px; font-weight:900; line-height:1.5; margin-bottom:6px; }
.quitmsg small { font-size:13px; color:#A09488; font-weight:400; }

/* 轻提示 */
.toast { position:fixed; left:50%; bottom:12vh; transform:translateX(-50%) translateY(16px); background:rgba(50,44,38,.92); color:#fff;
  border-radius:14px; padding:11px 20px; font-size:15px; font-weight:700; opacity:0; pointer-events:none; z-index:110;
  transition:opacity .25s, transform .25s; max-width:80vw; text-align:center; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

.optgrid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; }
.opt {
  background:#fff; border-radius:22px; min-height:76px; font-size:24px; font-weight:800;
  box-shadow:0 5px 0 rgba(0,0,0,.08); padding:12px 8px;
  display:flex; align-items:center; justify-content:center; text-align:center; line-height:1.3;
  transition:transform .1s; border:4px solid transparent;
}
.opt:active { transform:scale(.95); }
.opt .em { font-size:44px; }
.opt.correct { border-color:#34C759; background:#EAFCEF; color:#1E8E3E; animation:pop .35s; }
.opt.wrong { border-color:#FF3B30; background:#FFEEEC; color:#D32F1E; animation:shake .4s; }
.opt.dim { opacity:.45; }
.opt svg.fig { width:84px; height:84px; }

.explain { margin-top:14px; background:#FFF8E7; border-radius:14px; padding:10px 14px; font-size:16px; color:#8A6D1F; font-weight:700; }

/* 键盘输入 */
.keydisp { background:#F7F2E9; border-radius:18px; margin-top:14px; padding:14px; font-size:44px; font-weight:900; min-height:76px;
  display:flex; align-items:center; justify-content:center; letter-spacing:4px; }
.keypad { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.keypad button { background:#fff; border-radius:18px; min-height:62px; font-size:28px; font-weight:800; box-shadow:0 4px 0 rgba(0,0,0,.08); }
.keypad button:active { transform:scale(.94); }
.keypad .ok { background:#34C759; color:#fff; font-size:22px; }
.keypad .del { background:#FFEEEC; color:#D32F1E; }

/* 连连看 */
.matchwrap { display:flex; gap:12px; margin-top:16px; }
.matchcol { flex:1; display:flex; flex-direction:column; gap:10px; }
.matchcol .collbl { text-align:center; font-size:13px; color:#A09488; font-weight:700; }
.matchbtn { background:#fff; border-radius:18px; min-height:66px; font-size:34px; font-weight:900;
  box-shadow:0 4px 0 rgba(0,0,0,.08); border:4px solid transparent; }
.matchbtn.sel { border-color:#FFB000; background:#FFF6DF; }
.matchbtn.ok { border-color:#34C759; background:#EAFCEF; color:#1E8E3E; opacity:.65; }
.matchbtn.shake { animation:shake .4s; }

/* ---------- 学一学 ---------- */
.learntip { text-align:center; color:#A09488; font-size:14px; margin:6px 0 12px; }
.learncard {
  background:#fff; border-radius:20px; padding:12px 6px; text-align:center; box-shadow:0 3px 0 rgba(0,0,0,.06);
  animation:pop .3s;
}
.learncard .f { font-size:34px; font-weight:900; }
.learncard .b { font-size:13px; color:#A09488; margin-top:3px; }
.learncard:active { background:#FFF6DF; }

/* ---------- 结算 ---------- */
.result { text-align:center; padding-top:20px; }
.result .face { font-size:80px; animation:pop .5s; }
.result .bigstars { font-size:52px; margin:10px 0; }
.result .bigstars span { display:inline-block; opacity:.25; }
.result .bigstars span.on { animation:star .5s forwards; color:#FFB000; }
.result h2 { font-size:26px; font-weight:900; }
.result .score { color:#9A8F82; font-size:18px; margin:8px 0 22px; font-weight:700; }
.result .btns { display:flex; flex-direction:column; gap:12px; }
.bigbtn { border-radius:20px; padding:16px; font-size:19px; font-weight:900; box-shadow:0 5px 0 rgba(0,0,0,.12); }
.bigbtn.main { background:var(--c,#FF6B6B); color:#fff; }
.bigbtn.plain { background:#fff; color:#7A6F63; }

/* ---------- 家长中心 ---------- */
.pcard { background:#fff; border-radius:20px; padding:16px; margin-bottom:12px; box-shadow:0 3px 0 rgba(0,0,0,.06); }
.pcard h3 { font-size:16px; font-weight:800; margin-bottom:10px; }
.ptable { width:100%; font-size:14px; border-collapse:collapse; }
.ptable td { padding:6px 2px; border-bottom:1px dashed #F0EAE0; }
.ptable td:last-child { text-align:right; color:#FFB000; letter-spacing:1px; font-size:13px; }
.ptable tr:last-child td { border-bottom:none; }
.pnums { display:flex; gap:10px; text-align:center; }
.pnums .num { font-size:24px; font-weight:900; }
.pnums .lbl { font-size:12px; color:#999; }
.dangerbtn { width:100%; background:#FFEEEC; color:#D32F1E; border-radius:16px; padding:13px; font-weight:800; font-size:15px; }
.dangerbtn.arm { background:#FF3B30; color:#fff; }
.weekchart { display:flex; align-items:flex-end; gap:8px; height:78px; }
.weekchart .bar { flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:4px; height:100%; }
.weekchart .col { width:100%; max-width:34px; background:linear-gradient(180deg,#FFB84D,#FF7B54); border-radius:6px 6px 0 0; }
.weekchart .lb { font-size:10px; color:#A09488; }
.weekchart .vl { font-size:11px; color:#7A6F63; font-weight:800; }
.goalbtns button { background:#F7F2E9; border:2px solid transparent; border-radius:12px; padding:10px 16px; margin-left:8px; font-weight:800; font-size:14px; min-height:44px; }
.goalbtns button.on { background:#FF9800; color:#fff; }
.about { font-size:13px; color:#8A8073; line-height:1.8; }
.about b { color:#5F574C; }

/* ---------- 特殊显示 ---------- */
.row { display:flex; justify-content:center; gap:18px; margin:10px 0 4px; }
.row .cell { text-align:center; }
.row .em { font-size:40px; }
.row .n { font-size:14px; color:#B0A79A; font-weight:800; }
.emojiwrap { font-size:38px; line-height:1.8; letter-spacing:6px; word-break:break-all; padding:6px 0; }

/* ---------- 动画 ---------- */
@keyframes pop { 0%{transform:scale(.6);opacity:0} 70%{transform:scale(1.12)} 100%{transform:scale(1);opacity:1} }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 50%{transform:translateX(8px)} 75%{transform:translateX(-5px)} }
@keyframes star { to { opacity:1; transform:scale(1.15); } }
@keyframes floatup { 0%{transform:translateY(0) scale(1);opacity:1} 100%{transform:translateY(-70px) scale(1.6);opacity:0} }
@keyframes fall { to { transform:translateY(108vh) rotate(560deg); opacity:.85; } }
.floatfx { position:fixed; font-size:34px; pointer-events:none; z-index:99; animation:floatup .9s forwards; }
.cf { position:fixed; top:-40px; z-index:98; pointer-events:none; animation:fall 2.6s linear forwards; }

@media (min-width:700px){ .qbig{font-size:80px} .opt{min-height:86px} }
