:root {
  color-scheme: light;
  --ink: #172621;
  --muted: #66736e;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --green: #146b58;
  --green-soft: #dceee6;
  --coral: #d75b47;
  --yellow: #f3c95b;
  --blue: #4d78a8;
  --line: #dfe5e1;
  --shadow: 0 8px 24px rgba(26, 44, 37, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Microsoft YaHei", system-ui, sans-serif; letter-spacing: 0; padding-bottom: 88px; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.topbar { max-width: 760px; margin: 0 auto; padding: 22px 18px 12px; display: flex; align-items: center; justify-content: space-between; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; font-weight: 500; }
h2 { font-size: 18px; font-weight: 500; }
.eyebrow { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.energy { border: 0; background: var(--yellow); color: #332b13; min-width: 62px; height: 38px; border-radius: 8px; display: flex; gap: 5px; align-items: center; justify-content: center; }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; }
.view { display: none; }
.view.active { display: block; }
.date-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 8px 0 14px; }
.date-button { border: 0; background: transparent; padding: 8px 2px; color: var(--muted); border-radius: 8px; }
.date-button strong, .date-button span { display: block; }
.date-button strong { color: var(--ink); margin-top: 3px; }
.date-button.selected { background: var(--green); color: white; }
.date-button.selected strong { color: white; }
.date-button.done::after { content: "•"; display: block; color: var(--coral); line-height: 7px; }
.progress-band { background: var(--green); color: white; padding: 16px; border-radius: 8px; margin-bottom: 14px; }
.progress-copy { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.progress-copy span { font-size: 12px; opacity: .82; text-align: right; }
.progress-track { height: 6px; background: rgba(255,255,255,.25); margin-top: 12px; overflow: hidden; border-radius: 3px; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .25s ease; }
.task-list { display: grid; gap: 9px; }
.task-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 11px; align-items: center; box-shadow: var(--shadow); }
.task-card.done { box-shadow: none; opacity: .7; }
.task-icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); font-size: 20px; }
.task-copy strong { font-weight: 500; display: block; }
.task-copy span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.task-check { appearance: none; width: 25px; height: 25px; border: 2px solid #aab5b0; border-radius: 50%; display: grid; place-content: center; }
.task-check:checked { border-color: var(--green); background: var(--green); }
.task-check:checked::after { content: "✓"; color: white; font-size: 16px; }
.submit-task { border: 1px solid var(--line); background: var(--surface); color: var(--green); border-radius: 6px; padding: 7px 9px; min-width: 58px; }
.submit-task.pending { color: var(--blue); background: #e7eef5; }
.submit-task.approved { color: var(--green); background: var(--green-soft); border-color: transparent; }
.submit-task.rejected { color: var(--coral); background: #fae9e6; }
.bonus-section, .parent-section { margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; }
.soft-badge { color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.compact .task-card { box-shadow: none; }
.bottom-nav { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(4, 1fr); }
.bottom-nav button { border: 0; background: transparent; color: var(--muted); display: grid; gap: 2px; justify-items: center; font-size: 12px; min-height: 48px; }
.bottom-nav span { font-size: 20px; }
.bottom-nav button.selected { color: var(--green); font-weight: 500; }
.week-switch, .segmented { display: grid; grid-template-columns: repeat(3,1fr); background: #e7ebe8; padding: 3px; border-radius: 8px; margin: 8px 0 16px; }
.segmented { grid-template-columns: repeat(3, 1fr); }
.week-switch button, .segmented button { border: 0; background: transparent; padding: 9px; border-radius: 6px; color: var(--muted); }
.week-switch button.selected, .segmented button.selected { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.week-summary { padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.week-summary p { color: var(--muted); margin-top: 6px; }
.plan-day { padding: 15px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; }
.plan-day strong { font-weight: 500; }
.plan-day p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.review-hero { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 24px; }
.review-hero h2 { font-size: 22px; margin-bottom: 14px; }
.score-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-progress { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.word-quiz { border-top: 1px solid var(--line); padding-top: 18px; }
.word-prompt { font-size: 24px; font-weight: 500; margin-bottom: 5px; }
.word-phonetic { color: var(--blue); min-height: 22px; margin-bottom: 3px; font-family: Arial, sans-serif; }
.word-example { color: var(--muted); min-height: 20px; margin-bottom: 14px; }
.phonetic-focus { background: var(--green-soft); padding: 10px; border-radius: 7px; margin-bottom: 12px; }
.phonetic-focus strong, .phonetic-focus span { display: block; }
.phonetic-focus span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.pronunciation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.pronunciation-actions button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 10px; }
.answer-feedback { min-height: 22px; margin-bottom: 10px; font-size: 13px; }
.answer-feedback.correct { color: var(--green); }
.answer-feedback.wrong { color: var(--coral); }
.quiz-actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.quiz-actions button { border: 1px solid var(--line); border-radius: 7px; padding: 12px; }
.quiz-actions .primary-button { border: 0; }
.word-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 22px; }
.word-row { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px; min-width: 0; }
.word-row strong, .word-row span { display: block; overflow-wrap: anywhere; }
.word-row strong { font-weight: 500; }
.word-row span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.word-list.hidden-answers strong { filter: blur(5px); user-select: none; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
input, textarea, select { width: 100%; border: 1px solid #b9c3be; border-radius: 6px; background: white; color: var(--ink); padding: 11px; }
textarea { resize: vertical; }
.primary-button, .upload-button { border: 0; background: var(--green); color: white; padding: 12px 16px; border-radius: 7px; width: 100%; text-align: center; display: block; }
.upload-button { background: var(--blue); margin-bottom: 12px; color: white; }
.history-list, .reward-list { display: grid; gap: 8px; }
.history-item, .reward-item { padding: 13px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.history-item p, .reward-item p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.history-item button, .reward-item button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 7px 10px; }
.photo-preview { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 10px; }
.photo-preview img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; }
.photo-preview video { width: 112px; height: 76px; object-fit: cover; border-radius: 6px; }
.icon-button { border: 0; background: var(--green); color: white; border-radius: 6px; width: 34px; height: 34px; font-size: 22px; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 8px; }
.metric { background: var(--surface); padding: 14px 10px; border: 1px solid var(--line); border-radius: 8px; }
.metric strong { display: block; font-size: 22px; font-weight: 500; }
.metric span { color: var(--muted); font-size: 12px; }
.data-actions { display: flex; gap: 8px; }
.data-actions button, .data-actions label { display: block; margin: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 13px; border-radius: 6px; }
.approval-list, .recitation-list { display: grid; gap: 8px; }
.approval-item, .recitation-item { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 13px; }
.approval-item p, .recitation-item p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.approval-actions, .recitation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.approval-actions button, .recitation-actions button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 11px; }
.approval-actions .approve { background: var(--green); color: white; border-color: var(--green); }
.approval-actions .reject { color: var(--coral); }
.recitation-text { white-space: pre-wrap; line-height: 1.9; margin: 12px 0 18px; }
.recitation-text.masked { filter: blur(5px); user-select: none; }
.recitation-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.recitation-modes button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 4px; }
.recitation-modes button.selected { background: var(--green); color: white; border-color: var(--green); }
.dictation-result { margin-top: 10px; padding: 10px 0; line-height: 1.7; }
.dictation-result strong { color: var(--green); }
.section-label { color: var(--green); font-size: 12px; display: block; margin-top: 10px; }
.pinyin-pair { margin-bottom: 13px; }
.pinyin-line { color: var(--blue); font-family: Arial, sans-serif; font-size: 14px; margin-bottom: 3px; }
.hanzi-line { line-height: 1.8; }
.recitation-actions .primary-button { border: 0; color: white; background: var(--green); flex: 1 1 100%; }
.hidden { display: none; }
dialog { width: min(92vw, 440px); border: 0; border-radius: 8px; padding: 18px; color: var(--ink); }
dialog::backdrop { background: rgba(17,31,26,.52); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dialog-head button { border: 0; background: transparent; font-size: 24px; }
.dialog-energy { margin-bottom: 14px; color: var(--muted); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 86px; transform: translate(-50%,20px); background: var(--ink); color: white; padding: 10px 15px; border-radius: 7px; opacity: 0; pointer-events: none; transition: .2s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 680px) {
  .task-list { grid-template-columns: 1fr 1fr; }
  .compact { grid-template-columns: repeat(3,1fr); }
  .bottom-nav { left: 50%; transform: translateX(-50%); max-width: 760px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
