:root {
  --ink: #3f342e;
  --muted: #7f7066;
  --orange: #ff8a24;
  --orange-dark: #d96010;
  --cream: #fffaf1;
  --blue: #4d91ff;
  --green: #36ad70;
  --red: #e87968;
  --line: #eadfce;
  --shadow: 0 14px 38px rgba(68, 48, 35, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 4%, rgba(255, 221, 154, .68), transparent 24%),
    radial-gradient(circle at 94% 9%, rgba(168, 224, 255, .55), transparent 23%),
    linear-gradient(180deg, #fffaf1, #f5fbff 60%, #fffaf1);
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.app {
  width: min(820px, 100%);
  min-height: 100vh;
  margin: auto;
  padding: 18px 18px 104px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}
.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  border: 2px solid #ffb347;
  border-radius: 50%;
  background: #ffe8cc;
  font-size: 24px;
}
.hello { flex: 1; }
.hello small { display: block; color: var(--muted); font-weight: 700; }
.hello strong { display: block; margin-top: 2px; font-size: 21px; color: #3a566b; }
.star-pill {
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #ffd58d;
  border-radius: 16px;
  background: #fff7df;
  color: #a96700;
  font-weight: 900;
  white-space: nowrap;
}
.hero {
  margin: 16px 0;
  padding: 20px;
  overflow: hidden;
  position: relative;
  border-radius: 28px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "★";
  position: absolute;
  right: -10px;
  top: -28px;
  color: rgba(255, 181, 63, .13);
  font-size: 130px;
  transform: rotate(12deg);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
  color: #6d584d;
  font-size: 14px;
  font-weight: 800;
}
.progress-track {
  height: 12px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede3d5;
}
.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffad44, #ff7c34);
  transition: width .35s ease;
}
.next-line {
  margin: 16px 0 0;
  position: relative;
  z-index: 1;
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.25;
  color: #3a566b;
}
.next-line span { color: var(--orange-dark); }
.tiny-note { margin: 7px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.task-list { display: grid; gap: 12px; }
.task {
  width: 100%;
  min-height: 94px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 13px;
  border: 2px solid transparent;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 22px rgba(68,48,35,.08);
  text-align: left;
  cursor: pointer;
  transition: transform .15s, border-color .2s, opacity .2s;
}
.task:active { transform: scale(.985); }
.task.next { border-color: #ffbd5b; box-shadow: 0 10px 25px rgba(255,143,35,.15); }
.task.done { background: #f0fbf5; border-color: #a8ddbd; }
.task.done .task-icon { background: #dff5e8; }
.task.syncing { border-style: dashed; border-color: #7ab9e6; }
.task.holding {
  border-color: #4d91ff;
  background: linear-gradient(90deg, #eef6ff 0 80%, #fff 80%);
  background-size: 125% 100%;
  animation: adultHold 2s linear forwards;
}
@keyframes adultHold { to { background-position: -100% 0; } }
.task-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff2d9;
  font-size: 29px;
}
.task:nth-child(2) .task-icon { background: #e8f6ff; }
.task:nth-child(3) .task-icon { background: #ede9ff; }
.task:nth-child(4) .task-icon { background: #fff1e3; }
.task:nth-child(5) .task-icon { background: #e7f8eb; }
.task-title { display: block; color: #3a566b; font-size: 20px; font-weight: 900; }
.task-detail { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.35; }
.task-state {
  min-width: 54px;
  text-align: right;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 900;
}
.task.done .task-state { color: #258458; }
.carry {
  display: inline-flex;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0d7;
  color: #b46513;
  font-size: 11px;
  font-weight: 800;
}
.foot-links {
  margin: 18px 0 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}
.soft-btn, .primary-btn, .danger-btn {
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
}
.soft-btn { background: rgba(255,255,255,.84); color: #536c7c; border: 1px solid #dce7ed; }
.primary-btn {
  background: linear-gradient(135deg, #ff9d35, #f6752d);
  color: white;
  box-shadow: 0 9px 20px rgba(238,112,35,.22);
}
.danger-btn { background: #fff0ed; color: #a85249; }
.bottom-nav {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 0;
  width: min(820px, 100%);
  height: 78px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #eadfce;
  background: rgba(255,252,246,.96);
  backdrop-filter: blur(12px);
}
.bottom-nav a {
  min-height: 60px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #8a786b;
  font-size: 13px;
  font-weight: 800;
}
.bottom-nav a span { font-size: 22px; }
.bottom-nav a.active { color: var(--orange-dark); }
.overlay {
  position: fixed;
  z-index: 30;
  inset: 0;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgba(41,39,37,.42);
  backdrop-filter: blur(4px);
}
.overlay[hidden], [hidden] { display: none !important; }
.sheet {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 25px 80px rgba(0,0,0,.22);
}
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head b { flex: 1; color: #3a566b; font-size: 23px; }
.close {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #eef3f5;
  font-size: 24px;
  cursor: pointer;
}
.listen-art {
  height: 170px;
  margin: 18px 0;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #dff2ff, #fff2d7);
  font-size: 72px;
}
.play {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: auto;
  border: 3px solid #ffc76b;
  border-radius: 50%;
  background: #fff4d7;
  color: #a75213;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 8px 0 #f3d393;
}
.audio-track { height: 10px; margin: 22px 0 8px; overflow: hidden; border-radius: 999px; background: #e8ded1; }
.audio-fill { width: 0; height: 100%; background: linear-gradient(90deg,#4d91ff,#6ac9ff); transition: width .2s; }
.audio-time { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; }
.writing-card {
  margin: 18px 0;
  padding: 22px;
  border-radius: 22px;
  background: #fff8e8;
  text-align: center;
}
.big-letter { color: #3a566b; font: 900 70px Georgia, serif; }
.word-row { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.word-chip { padding: 10px 17px; border-radius: 13px; background: white; color: #47718d; font: 900 23px Georgia, serif; }
.adult-note { padding: 13px; border-radius: 14px; background: #eef6fa; color: #587080; font-size: 13px; line-height: 1.5; }
.child-writing-note { margin-top: 16px; text-align: center; font-size: 17px; font-weight: 900; }
.adult-confirm p { color: var(--muted); text-align: center; font-weight: 700; }
.adult-check {
  padding: 20px;
  border-radius: 18px;
  background: #fff8e8;
  color: #3a566b;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.8;
}
.celebrate { text-align: center; }
.celebrate .burst { font-size: 72px; }
.celebrate h2 { margin: 5px; color: #3a566b; font-size: 28px; }
.state-card {
  min-height: 58vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
}
.state-icon { font-size: 72px; }
.state-card h1 { margin: 0; color: #3a566b; }
.state-card p { margin: 0; color: var(--muted); font-weight: 700; }
.skeleton { width: min(560px,100%); display: grid; gap: 12px; }
.skeleton i {
  height: 92px;
  border-radius: 22px;
  background: linear-gradient(90deg,#eee5d9,#faf7f1,#eee5d9);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* 书架 */
.shelf-page { background: #fffaf1; }
.shelf-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.shelf-header strong { flex: 1; }
.today-entry {
  min-height: 94px;
  padding: 17px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 13px;
  border: 2px solid var(--orange);
  border-radius: 20px;
  background: linear-gradient(135deg,#fff1dc,#fffdf8);
  box-shadow: 0 10px 28px rgba(255,132,30,.13);
}
.today-entry > span:first-child { font-size: 38px; }
.today-entry b { display: block; font-size: 20px; color: #3a566b; }
.today-entry small { display: block; margin-top: 5px; color: var(--muted); font-weight: 700; }
.today-entry em { color: var(--orange-dark); font-style: normal; font-weight: 900; }
.tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 16px 0 10px; }
.tabs button { min-height: 48px; border: 1px solid #ffdeaa; border-radius: 12px; background: white; font-weight: 800; }
.tabs button.active { border: 2px solid var(--orange); background: #fff3e0; }
.book-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.book { padding: 9px; border-radius: 16px; background: #fff; box-shadow: 0 4px 12px rgba(68,48,35,.08); }
.cover { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#ccecff,#fff0b7); font-size: 45px; }
.book b { display: block; margin-top: 8px; font-size: 13px; }
.book small { color: var(--muted); }

/* 家长报告 */
.parent-body { background: #f4f7f9; }
.parent-app { width: min(980px,100%); margin: auto; padding: 20px; }
.parent-top { display: flex; gap: 12px; align-items: center; }
.parent-top h1 { flex: 1; margin: 0; color: #294a61; font-size: 25px; }
.report-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 18px 0; }
.metric { padding: 18px; border-radius: 18px; background: white; box-shadow: 0 5px 18px rgba(61,82,96,.07); }
.metric small { color: #71818c; }
.metric b { display: block; margin-top: 7px; color: #294a61; font-size: 29px; }
.panel { margin-top: 14px; padding: 20px; border-radius: 20px; background: white; box-shadow: 0 5px 18px rgba(61,82,96,.07); }
.panel h2 { margin: 0 0 15px; color: #294a61; font-size: 19px; }
.weak-list, .manage-list { display: grid; gap: 9px; }
.weak-item, .manage-item {
  min-height: 60px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  background: #f7fafb;
}
.weak-item b, .manage-item b { flex: 1; color: #39566b; }
.tag { padding: 5px 9px; border-radius: 999px; background: #fff0df; color: #ad641d; font-size: 12px; font-weight: 800; }
.skip { min-height: 44px; border: 0; border-radius: 12px; background: #fff0ed; color: #a85249; font-weight: 800; cursor: pointer; }
.reason-list { display: grid; gap: 9px; margin: 16px 0; }
.reason-list button { min-height: 50px; border: 2px solid #e2e9ed; border-radius: 14px; background: white; text-align: left; font-weight: 800; }
.reason-list button.selected { border-color: var(--blue); background: #eef6ff; color: #245e9e; }
.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 14px;
  background: #294a61;
  color: white;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.sheet-emoji { font-size: 38px; }
.full-btn { width: 100%; margin-top: 16px; min-height: 56px; }
.center-copy { text-align: center; color: var(--muted); font-weight: 800; }
.demo-links { opacity: .82; }
.skip-note {
  margin: 14px 2px 0;
  padding: 12px 15px;
  border-radius: 14px;
  background: #eef6fa;
  color: #587080;
  font-size: 13px;
  font-weight: 800;
}
.step-dots {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 7px;
  margin: 18px 0;
}
.step-dots i { height: 8px; border-radius: 99px; background: #e5e8e9; }
.step-dots i.active { background: linear-gradient(90deg,#ffac45,#ff7a33); }
.word-progress { margin: 16px 0 -8px; color: #47718d; text-align: center; font-size: 17px; font-weight: 900; }
.question-no { margin: 13px 0 5px; color: #8b7668; text-align: center; font-size: 13px; font-weight: 900; }
.sound-bubble {
  width: min(240px,100%);
  min-height: 72px;
  margin: 14px auto;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #eaf5ff;
  color: #356d9b;
  font-size: 30px;
  font-weight: 900;
}
.sound-button { border: 0; cursor: pointer; }
.compact-art { height: 120px; font-size: 54px; }
.answer-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
  margin: 17px 0;
}
.answer-grid button, .letter-blocks button {
  min-height: 62px;
  border: 2px solid #dce7ed;
  border-radius: 17px;
  background: white;
  color: #3a566b;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.answer-grid button:disabled { cursor: wait; opacity: .52; }
.answer-grid button.correct { border-color: #60bc88; background: #e7f8ee; }
.answer-grid button.wrong { border-color: #e87968; background: #fff0ed; }
.word-options button { font-family: Georgia, serif; }
.spell-slots {
  min-height: 66px;
  display: grid;
  place-items: center;
  color: #3a566b;
  font: 900 38px Georgia, serif;
}
.letter-blocks { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.letter-blocks button { width: 68px; }
.quiz-question { margin: 10px 0; text-align: center; color: #3a566b; font-size: 25px; }
.quiz-message { min-height: 24px; margin: 12px 0 0; text-align: center; color: #9a6a36; font-weight: 900; }
.quiz-progress { height: 9px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #e6eaec; }
.quiz-progress > div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5bbd82,#7ed79a); transition: width .25s; }
.replaying { animation: soundPulse .6s ease-in-out infinite alternate; }
@keyframes soundPulse { to { transform: scale(1.04); background: #fff2cf; } }
.page-count { margin: 16px 0 10px; color: var(--muted); text-align: center; font-size: 13px; font-weight: 900; }
.reader-audio { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reader-audio .audio-action { min-height: 52px; color: #356d9b; background: #eaf5ff; }
.reader-audio .audio-action:disabled { opacity: .7; cursor: wait; }
.reader-audio-state { min-height: 22px; margin: 9px 0; color: #47718d; text-align: center; font-size: 13px; font-weight: 900; }
.book-page {
  min-height: 285px;
  padding: 26px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 24px;
  background: linear-gradient(145deg,#dff2ff,#fff2d7);
  text-align: center;
}
.book-page > div { font-size: 74px; }
.book-page p { max-width: 360px; margin: 25px 0 0; color: #3a566b; font: 900 24px/1.45 Georgia, serif; }
.writing-rule { margin: 8px 0 14px; color: #745e50; font-weight: 800; }
.parent-today-link { display: inline-grid; place-items: center; margin-top: 8px; }
.empty-report { padding: 42px 20px; text-align: center; color: #71818c; }
.empty-report > div { font-size: 58px; }
.empty-report h2 { margin: 12px 0 6px; }
.empty-report p { margin: 0; }
.empty-manage { padding: 20px; border-radius: 14px; background: #f7fafb; color: #71818c; text-align: center; }
@media (max-width: 620px) {
  .app { padding: 14px 12px 98px; }
  .hero { padding: 17px; border-radius: 23px; }
  .task { grid-template-columns: 52px 1fr auto; min-height: 88px; padding: 12px; gap: 10px; }
  .task-icon { width: 52px; height: 52px; font-size: 25px; }
  .task-title { font-size: 18px; }
  .book-grid { grid-template-columns: repeat(2,1fr); }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .report-grid .metric:last-child { grid-column: 1 / -1; }
  .parent-top { flex-wrap: wrap; }
  .parent-top h1 { flex-basis: calc(100% - 90px); }
  .answer-grid { grid-template-columns: 1fr 1fr; }
}
