/* 中考冲刺 · 每日任务 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f2f3f7; color: #22242a; line-height: 1.65;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* 头部 */
header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e6e8ee;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 38px; height: 38px; border-radius: 10px; background: #185fa5; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600;
}
.brand-t h1 { font-size: 17px; font-weight: 600; }
.brand-t p { font-size: 11px; color: #8a8f9c; }
#streak-badge {
  background: #fff4e6; border: 1px solid #f5d9b0; color: #854F0B;
  border-radius: 999px; padding: 4px 12px; font-size: 13px; white-space: nowrap;
}
#streak-badge b { font-size: 15px; margin: 0 2px; }

/* 主区 */
main { flex: 1; padding: 14px 14px 80px; }
.view { display: none; animation: fadeIn .25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 底部导航 */
#nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; max-width: 560px; margin: 0 auto;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-top: 1px solid #e6e8ee; padding-bottom: env(safe-area-inset-bottom);
}
#nav .tab {
  flex: 1; border: none; background: none; padding: 7px 0 6px;
  font-size: 11px; color: #8a8f9c; display: flex; flex-direction: column; align-items: center; gap: 1px;
  cursor: pointer;
}
#nav .tab .ico { font-size: 20px; line-height: 1.2; filter: grayscale(1) opacity(.55); }
#nav .tab.active { color: #185fa5; font-weight: 600; }
#nav .tab.active .ico { filter: none; }

/* 卡片 */
.card {
  background: #fff; border: 1px solid #e8eaf0; border-radius: 14px;
  padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(30,40,80,.04);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: #eef2fa; color: #185fa5; border: 1px solid #d5e2f5;
}
.chip.rev { background: #fdeeee; color: #A32D2D; border-color: #f3caca; }
.chip.ok { background: #e9f7ef; color: #0F6E56; border-color: #c8ead9; }

.q-text { font-size: 16px; font-weight: 500; margin-bottom: 14px; white-space: pre-wrap; }

.opts { display: flex; flex-direction: column; gap: 9px; }
.opt-btn {
  text-align: left; border: 1.5px solid #dfe3ec; background: #fafbfe; border-radius: 11px;
  padding: 11px 13px; font-size: 15px; color: #22242a; cursor: pointer;
  display: flex; gap: 9px; align-items: flex-start; transition: border-color .15s;
}
.opt-btn:active { border-color: #185fa5; }
.opt-btn .letter {
  flex: none; width: 22px; height: 22px; border-radius: 6px; background: #eef0f6;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #5a6070;
}
.opt-btn.correct { border-color: #1D9E75; background: #ecf9f3; }
.opt-btn.correct .letter { background: #1D9E75; color: #fff; }
.opt-btn.wrong { border-color: #E24B4A; background: #fdf0ef; }
.opt-btn.wrong .letter { background: #E24B4A; color: #fff; }
.opt-btn:disabled { cursor: default; color: inherit; }

.exp-box {
  margin-top: 13px; border-radius: 11px; padding: 12px 13px; font-size: 14px;
  background: #f4f7fd; border: 1px solid #dde6f5; color: #33415e;
}
.exp-box b { color: #185fa5; }
.exp-box .verdict { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.exp-box.good { background: #ecf9f3; border-color: #c8ead9; }
.exp-box.good .verdict { color: #0F6E56; }
.exp-box.bad { background: #fdf0ef; border-color: #f3caca; }
.exp-box.bad .verdict { color: #A32D2D; }

.btn {
  display: block; width: 100%; border: none; border-radius: 11px; padding: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 13px;
}
.btn-primary { background: #185fa5; color: #fff; }
.btn-ghost { background: #eef2fa; color: #185fa5; }

/* 进度条 */
.progress-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.progress-head .p-label { font-size: 13px; color: #5a6070; }
.progress-head .p-count { font-size: 13px; font-weight: 600; color: #185fa5; }
.progress-bar { height: 6px; border-radius: 999px; background: #e6e9f2; overflow: hidden; margin-bottom: 14px; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg,#378ADD,#185FA5); border-radius: 999px; transition: width .3s; }

/* 完成页 */
.done-hero { text-align: center; padding: 26px 10px 10px; }
.done-hero .big { font-size: 52px; }
.done-hero h2 { font-size: 20px; margin: 6px 0 2px; }
.done-hero p { color: #5a6070; font-size: 14px; }
.rate-ring {
  width: 120px; height: 120px; border-radius: 50%; margin: 16px auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(#1D9E75 var(--p,0%), #e6e9f2 0);
  position: relative;
}
.rate-ring::after {
  content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff;
}
.rate-ring span { position: relative; z-index: 1; }
.rate-ring b { font-size: 26px; color: #0F6E56; }
.rate-ring i { font-style: normal; font-size: 12px; color: #8a8f9c; }

/* 错题本 */
.empty-tip { text-align: center; color: #8a8f9c; padding: 46px 20px; font-size: 14px; }
.empty-tip .big { font-size: 44px; display: block; margin-bottom: 8px; }
.wrong-item .q-mini { font-size: 14px; color: #333; margin-bottom: 8px; }
.wrong-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mini-btn {
  border: 1px solid #d5e2f5; background: #f5f8fd; color: #185fa5; border-radius: 8px;
  padding: 5px 13px; font-size: 13px; cursor: pointer; margin-left: auto;
}
.sub-title { font-size: 14px; font-weight: 600; margin: 14px 0 8px; color: #3a4050; display: flex; justify-content: space-between; }
.sub-title small { font-weight: 400; color: #8a8f9c; }

/* 听力 */
.listen-tools { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.listen-tools button {
  border: 1px solid #d5e2f5; background: #f5f8fd; color: #185fa5; border-radius: 999px;
  padding: 7px 15px; font-size: 13px; cursor: pointer;
}
.listen-tools button.stop { border-color: #f3caca; background: #fdf3f2; color: #A32D2D; }
.listen-text {
  margin-top: 12px; background: #f7f8fb; border: 1px dashed #d5d9e4; border-radius: 10px;
  padding: 12px; font-size: 13.5px; color: #4a5164; display: none;
}
.listen-text.show { display: block; }

/* 打印表单 */
.form-row { margin-bottom: 13px; }
.form-row label.t { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: #3a4050; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; }
.check-pill {
  border: 1.5px solid #dfe3ec; background: #fafbfe; border-radius: 999px; padding: 6px 14px;
  font-size: 14px; cursor: pointer; color: #5a6070;
}
.check-pill.on { border-color: #185fa5; background: #eaf2fc; color: #185fa5; font-weight: 600; }
select.sel {
  border: 1.5px solid #dfe3ec; border-radius: 10px; padding: 8px 12px; font-size: 14px;
  background: #fff; color: #22242a;
}
.print-hint { font-size: 12px; color: #8a8f9c; margin-top: 10px; line-height: 1.6; }

/* 预习卡 */
.pv-sec { margin-bottom: 11px; }
.pv-h { font-size: 13px; font-weight: 600; color: #185fa5; margin-bottom: 4px; }
.pv-sec ol { padding-left: 20px; }
.pv-sec li { font-size: 14px; color: #333a48; margin-bottom: 5px; line-height: 1.62; }

/* 我的 */
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 14px; }
.stat-cell { background: #fff; border: 1px solid #e8eaf0; border-radius: 12px; padding: 13px 6px; text-align: center; }
.stat-cell b { display: block; font-size: 22px; color: #185fa5; }
.stat-cell span { font-size: 11.5px; color: #8a8f9c; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-row .s-name { flex: none; width: 42px; font-size: 13px; color: #5a6070; }
.bar-row .bar { flex: 1; height: 8px; background: #e6e9f2; border-radius: 999px; overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: #378ADD; border-radius: 999px; }
.bar-row .s-val { flex: none; width: 52px; font-size: 12px; color: #5a6070; text-align: right; }
.danger-btn { border: none; background: none; color: #A32D2D; font-size: 13px; cursor: pointer; padding: 8px 0; text-decoration: underline; }

/* 弹层 */
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(10px);
  background: rgba(30,35,50,.92); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s;
  z-index: 60; max-width: 86%; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(20,25,40,.45);
  display: none; align-items: flex-end; justify-content: center;
}
#overlay.show { display: flex; }
.sheet {
  background: #fff; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 86vh; overflow-y: auto;
  animation: up .25s ease;
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.sheet .close-x { border: none; background: #eef0f6; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 14px; color: #5a6070; }

/* 欢迎层 */
.welcome { text-align: center; }
.welcome .big { font-size: 56px; }
.welcome h2 { font-size: 19px; margin: 8px 0; }
.welcome ul { text-align: left; margin: 14px 4px 6px; padding-left: 20px; font-size: 14px; color: #4a5164; }
.welcome li { margin-bottom: 7px; }

/* ===== 打印样式 ===== */
#print-root { display: none; }
@media print {
  #app { display: none !important; }
  body { background: #fff; }
  #print-root { display: block; font-size: 12.5pt; color: #000; }
  .p-head { text-align: center; margin-bottom: 6mm; }
  .p-head h2 { font-size: 15pt; letter-spacing: 2px; }
  .p-head .p-meta { display: flex; justify-content: space-between; font-size: 10.5pt; margin-top: 2mm; }
  .p-q { margin-bottom: 5mm; page-break-inside: avoid; }
  .p-q .p-stem { font-weight: 600; }
  .p-q .p-opts { display: flex; flex-wrap: wrap; gap: 2mm 8mm; margin: 1.5mm 0 0 6mm; }
  .p-space { height: 16mm; }
  .p-key { page-break-before: always; }
  .p-key h3 { font-size: 13pt; margin-bottom: 4mm; }
  .p-key .k-item { margin-bottom: 2.5mm; font-size: 11pt; }
  .print-only-note { font-size: 10pt; color: #555; margin-bottom: 3mm; }
}

/* ---------- 周末二次验证 ---------- */
.wk-hero .big { font-size: 42px; }
.wk-topics { display: flex; flex-wrap: wrap; gap: 7px; }
.wk-topics .wk-t {
  font-size: 12.5px; padding: 6px 10px; border-radius: 9px;
  background: #f3f6fc; border: 1px solid #dde6f3; color: #33415e;
}
.wk-topics .wk-t i { font-style: normal; font-size: 10.5px; color: #8a8f9c; margin-left: 4px; }
.wk-topics .wk-t.bad { background: #fdecec; border-color: #f2c9c9; color: #9e2b2b; }
.wk-topics .wk-t.bad i { color: #a55252; }
.wk-tip { font-size: 12.5px; color: #8a8f9c; text-align: center; padding: 2px 14px 16px; line-height: 1.6; }
.wk-sub { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 9px; }
.wk-sub:last-child { margin-bottom: 0; }
.wk-sub .nm { flex: none; width: 42px; color: #3a4050; font-weight: 600; }
.wk-sub .bar { flex: 1; height: 9px; border-radius: 5px; background: #eef0f5; overflow: hidden; }
.wk-sub .bar i { display: block; height: 100%; background: linear-gradient(90deg,#378ADD,#185FA5); }
.wk-sub .pc { flex: none; font-size: 12px; color: #8a8f9c; font-variant-numeric: tabular-nums; }

/* ---------- 英语听说专项 ---------- */
.spk-hero { border-left: 4px solid #185FA5; }
.chip.spk { background: #e8f1fb; color: #185FA5; border-color: #cfe0f3; font-weight: 600; }
.spk-phrases { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 10px; }
.spk-ph {
  font-size: 13.5px; padding: 6px 10px; border-radius: 9px;
  background: #f3f6fc; border: 1px solid #dde6f3; color: #22304b;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.spk-ph.kw { background: #fdf6e9; border-color: #f2e0bf; color: #7a5410; }
.spk-sent { margin: 0 0 11px; padding: 9px 11px; background: #fafbfe; border-radius: 10px; border: 1px solid #e9edf5; }
.spk-sent:last-of-type { margin-bottom: 6px; }
.spk-en { font-size: 15.5px; line-height: 1.55; color: #1c2434; font-weight: 500; }
.spk-tip { font-size: 12.5px; color: #6b7280; margin-top: 4px; line-height: 1.55; }
.spk-qs { margin: 0 0 6px; padding-left: 20px; }
.spk-qs li { margin-bottom: 12px; }
.spk-qs li::marker { color: #185FA5; font-weight: 600; }
.spk-points { margin: 0 0 8px; padding-left: 18px; font-size: 14px; }
.spk-points li { margin-bottom: 6px; color: #2a3242; }
.spk-points li i { display: block; font-style: normal; font-size: 12px; color: #8a8f9c; font-family: "SF Mono", Menlo, Consolas, monospace; }
.spk-ans { margin-top: 6px; font-size: 13px; }
.spk-ans summary { cursor: pointer; color: #185FA5; font-size: 12.5px; list-style: none; }
.spk-ans summary::-webkit-details-marker { display: none; }
.spk-ans summary::before { content: "▸ "; }
.spk-ans[open] summary::before { content: "▾ "; }
.spk-ans > div { margin-top: 6px; padding: 8px 10px; background: #f2f8f4; border: 1px solid #d7ecdf; border-radius: 9px; color: #1e4638; line-height: 1.6; }
.spk-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.spk-tools audio { flex: 1; min-width: 170px; height: 34px; }
.spk-rec {
  border: 1px solid #cfe0f3; background: #e8f1fb; color: #185FA5;
  border-radius: 10px; padding: 9px 14px; font-size: 14px; font-weight: 600;
}
.spk-rec.on { background: #fdecec; border-color: #f2c9c9; color: #A32D2D; }
.spk-done {
  margin-top: 10px; border: 1px solid #dde6f3; background: #fff; color: #5a6273;
  border-radius: 10px; padding: 8px 14px; font-size: 13px; margin-left: 8px;
}
.spk-done.on { background: #e9f7ef; border-color: #c8ead9; color: #0F6E56; font-weight: 600; }
