:root {
  --ink: #1f2b29;
  --muted: #687773;
  --canvas: #f3f5f1;
  --paper: #ffffff;
  --line: #dce3df;
  --green: #176b5b;
  --green-deep: #0e4c42;
  --green-soft: #e4f1ec;
  --coral: #d66d58;
  --coral-soft: #fae9e5;
  --yellow: #e7b83f;
  --yellow-soft: #fff5d8;
  --blue: #397d9d;
  --blue-soft: #e5f1f6;
  --violet: #725e92;
  --violet-soft: #eee9f5;
  --danger: #b8483e;
  --shadow: 0 10px 30px rgba(31, 53, 46, .08);
}

* { box-sizing: border-box; letter-spacing: 0; }
html { min-height: 100%; background: var(--canvas); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { color: inherit; font: inherit; line-height: 1.45; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1, h2, h3, p { margin-top: 0; }
.hidden { display: none !important; }
.visually-hidden { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.muted { color: var(--muted); }

.login-screen { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.35fr) minmax(410px, .65fr); background: #edf1ec; }
.login-visual { position: relative; min-height: 560px; overflow: hidden; background: #36594e; }
.login-visual::after { position: absolute; inset: 0; content: ""; background: rgba(15, 54, 45, .2); }
.login-visual img { width: 100%; height: 100%; object-fit: cover; }
.login-visual-copy { position: absolute; z-index: 2; left: clamp(38px, 6vw, 86px); bottom: clamp(40px, 8vh, 90px); color: #fff; }
.login-visual-copy p { margin: 22px 0 0; font-family: "STKaiti", "KaiTi", serif; font-size: 31px; line-height: 1.6; text-shadow: 0 2px 16px rgba(0,0,0,.28); }
.brand-seal { display: grid; width: 47px; height: 47px; place-items: center; color: #fff; background: var(--green); border-radius: 7px; font-family: "STKaiti", "KaiTi", serif; font-size: 27px; font-weight: 800; box-shadow: 0 6px 18px rgba(11, 67, 57, .24); }
.login-panel { display: grid; min-height: 100vh; padding: 48px; place-items: center; background: #fff; }
.login-form { width: min(100%, 390px); }
.login-form h1 { max-width: 340px; margin-bottom: 12px; font-size: 30px; line-height: 1.35; }
.login-note { margin-bottom: 34px; color: var(--muted); font-size: 14px; }
.login-form label, .form-field label { display: block; margin-bottom: 18px; font-size: 12px; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 46px; margin-top: 8px; padding: 10px 13px; background: #fff; border: 1px solid #cfd9d4; border-radius: 6px; outline: 0; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 91, .12); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 42px; }
.mobile-brand .brand-seal { width: 42px; height: 42px; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: 12px; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; font-weight: 750; }
.button:hover { border-color: #aab9b3; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: var(--green-deep); }
.button.coral { color: #fff; background: var(--coral); border-color: var(--coral); }
.button.soft { color: var(--green); background: var(--green-soft); border-color: transparent; }
.button.danger { color: var(--danger); background: #fff; border-color: #e8bab5; }
.button.wide { width: 100%; justify-content: space-between; padding: 0 18px; }
.button.small { min-height: 36px; padding: 0 12px; font-size: 12px; }
.button.icon-only { width: 44px; padding: 0; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 22px 16px 17px; overflow-y: auto; color: #e6f1ed; background: #173c35; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; }
.brand .brand-seal { width: 39px; height: 39px; background: #d99e3e; box-shadow: none; font-size: 23px; }
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand small { display: block; margin-top: 3px; color: #91ada5; font-size: 8px; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-button { position: relative; display: flex; min-height: 48px; align-items: center; gap: 11px; padding: 0 11px; color: #b8cbc5; background: transparent; border: 0; border-radius: 7px; text-align: left; }
.nav-button span { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; color: #bdd2cc; background: rgba(255,255,255,.07); border-radius: 6px; font-size: 17px; }
.nav-button b { font-size: 13px; }
.nav-button.is-active { color: #fff; background: #286155; box-shadow: inset 3px 0 #f0c65e; }
.nav-button.is-active span { color: #173c35; background: #f0c65e; }
.daily-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: -1px 3px 4px 42px; padding: 5px 0 3px 8px; border-left: 1px solid #376158; }
.daily-subnav button { min-height: 31px; color: #9fb9b2; background: transparent; border: 0; border-radius: 5px; font-size: 12px; font-weight: 700; }
.daily-subnav button:hover, .daily-subnav button.is-active { color: #fff; background: #214b42; }
.side-wallet { margin-top: auto; padding: 15px 13px; background: #214b42; border: 1px solid #315c52; border-radius: 7px; }
.side-wallet > small { display: block; margin-bottom: 11px; color: #9ebbb2; font-size: 10px; }
.side-wallet div { display: grid; grid-template-columns: 22px 1fr auto; align-items: baseline; gap: 5px; margin-top: 7px; }
.side-wallet div span { color: #f0c65e; }
.side-wallet strong { color: #fff; font-size: 18px; }
.side-wallet em { color: #9ebbb2; font-size: 9px; font-style: normal; }
.parent-entry { display: grid; min-height: 58px; grid-template-columns: 31px 1fr auto; align-items: center; gap: 8px; margin-top: 11px; padding: 0 10px; color: #bed0ca; background: transparent; border: 0; border-radius: 6px; text-align: left; }
.parent-entry:hover { background: #214b42; }
.parent-entry > span { display: grid; width: 29px; height: 29px; place-items: center; background: #2b5b50; border-radius: 50%; }
.parent-entry b { display: block; color: #fff; font-size: 12px; }
.parent-entry small { display: block; margin-top: 2px; color: #8fabA3; font-size: 9px; }
.parent-entry i { font-size: 22px; font-style: normal; }

.main-area { min-width: 0; }
.topbar { position: sticky; z-index: 20; top: 0; display: flex; height: 78px; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(243,245,241,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 20px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .avatar-button, .date-button { min-height: 44px; border: 1px solid var(--line); border-radius: 6px; }
.icon-button { width: 44px; padding: 0; background: #fff; font-size: 20px; }
.date-button { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; }
.date-button span { color: var(--green); font-size: 18px; }
.date-button b { font-size: 11px; }
.avatar-button { width: 44px; padding: 0; color: #fff; background: var(--coral); border: 0; border-radius: 50%; font-size: 11px; font-weight: 800; }
.page-content { width: min(100%, 1280px); margin: 0 auto; padding: 27px 28px 48px; }
.mobile-nav { display: none; }

.welcome-band { display: grid; min-height: 150px; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); margin-bottom: 18px; overflow: hidden; color: #fff; background: var(--green); border-radius: 8px; }
.welcome-copy { padding: 26px 28px; }
.welcome-copy .eyebrow { color: #b9dcd3; }
.welcome-copy h2 { margin-bottom: 8px; font-size: 25px; line-height: 1.25; }
.welcome-copy p { margin-bottom: 18px; color: #d4e7e2; font-size: 12px; }
.welcome-progress { display: flex; max-width: 440px; align-items: center; gap: 12px; }
.welcome-progress .progress-track { flex: 1; background: rgba(255,255,255,.25); }
.welcome-progress .progress-fill { background: #f0c65e; }
.welcome-progress strong { min-width: 45px; color: #fff; font-size: 12px; }
.arrival-box { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 22px; color: var(--ink); background: #f0c65e; }
.arrival-box strong { margin-bottom: 5px; font-size: 15px; }
.arrival-box p { margin-bottom: 13px; font-size: 11px; line-height: 1.5; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.metric { position: relative; min-height: 98px; padding: 16px 17px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.metric::after { position: absolute; right: 13px; bottom: -12px; color: var(--tone-soft); content: attr(data-symbol); font-size: 55px; font-weight: 800; }
.metric span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.metric strong { position: relative; z-index: 1; font-size: 25px; }
.metric small { position: relative; z-index: 1; margin-left: 3px; color: var(--muted); font-size: 9px; }
.metric.green { --tone-soft: #dcece6; }.metric.coral { --tone-soft: #f5ddd8; }.metric.yellow { --tone-soft: #faedc9; }.metric.blue { --tone-soft: #dcecf3; }

.today-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(285px, .55fr); gap: 18px; align-items: start; }
.section-block { margin-bottom: 17px; }
.section-head { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.section-head h2 { margin: 0; font-size: 16px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.section-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.task-list { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.task-card { display: grid; min-height: 84px; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px 13px 0; border-bottom: 1px solid var(--line); }
.task-card:last-child { border-bottom: 0; }
.task-accent { align-self: stretch; background: var(--subject-color); border-radius: 0 3px 3px 0; }
.task-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 8px; }
.task-title-line h3 { margin: 0; font-size: 14px; }
.tag { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; color: var(--tag-color, var(--green)); background: var(--tag-bg, var(--green-soft)); border-radius: 4px; font-size: 9px; font-weight: 750; }
.tag.overdue { color: var(--danger); background: #fbe4e1; }
.task-meta { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 10px; }
.task-meta span { display: inline-flex; align-items: center; gap: 3px; }
.task-actions { display: flex; align-items: center; gap: 6px; }
.task-timer { min-width: 64px; font-variant-numeric: tabular-nums; text-align: center; }
.task-status { color: var(--green); font-size: 11px; font-weight: 800; }
.task-status.returned { color: var(--coral); }

.side-panel { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.side-panel + .side-panel { margin-top: 12px; }
.side-panel h2 { margin-bottom: 13px; font-size: 15px; }
.bank-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bank-mini div { padding: 12px; background: var(--canvas); border-radius: 6px; }
.bank-mini span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.bank-mini strong { font-size: 21px; }
.pending-line { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 11px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }
.pending-line b { color: var(--coral); }
.screen-bar { margin: 10px 0 8px; }
.screen-numbers { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.progress-track { height: 8px; overflow: hidden; background: #e5ebe7; border-radius: 4px; }
.progress-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width .2s; }
.tip-box { margin-top: 12px; padding: 11px; color: #665521; background: var(--yellow-soft); border-left: 3px solid var(--yellow); font-size: 10px; line-height: 1.55; }
.empty { padding: 35px 18px; color: var(--muted); text-align: center; }
.empty span { display: grid; width: 46px; height: 46px; margin: 0 auto 10px; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; font-size: 21px; }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 13px; }
.empty p { margin: 0; font-size: 10px; }

.subject-tabs, .segmented { display: flex; gap: 3px; margin-bottom: 18px; padding: 4px; overflow-x: auto; background: #e6ece8; border-radius: 7px; }
.subject-tabs button, .segmented button { min-height: 38px; flex: 1; min-width: max-content; padding: 0 14px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; font-size: 11px; font-weight: 750; }
.subject-tabs button.is-active, .segmented button.is-active { color: var(--green); background: #fff; box-shadow: 0 2px 8px rgba(30,55,48,.08); }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-subject { min-height: 210px; padding: 19px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--subject-color); border-radius: 7px; }
.plan-subject-head { display: flex; min-height: 70px; align-items: center; gap: 12px; margin: -19px -19px 0; padding: 13px 16px; background: var(--subject-soft); border-bottom: 1px solid var(--line); }
.plan-subject h2 { margin-bottom: 4px; font-size: 17px; }
.plan-subject p { color: var(--muted); font-size: 10px; }
.subject-block { display: grid; min-width: 54px; min-height: 38px; place-items: center; color: #fff; background: var(--subject-color); border-radius: 5px; font-size: 14px; font-weight: 850; }
.task-type-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.task-type-guide div { min-height: 72px; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px; }
.task-type-guide div:nth-child(2) { border-left-color: var(--blue); }
.task-type-guide div:nth-child(3) { border-left-color: var(--coral); }
.task-type-guide b { display: block; margin-bottom: 6px; font-size: 12px; }
.task-type-guide span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.project-grid > .empty { grid-column: 1/-1; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.project-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--subject-color); border-radius: 7px; }
.project-card > header { display: grid; min-height: 72px; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 13px 15px; background: var(--subject-soft); border-bottom: 1px solid var(--line); }
.project-card h3 { margin: 0 0 4px; font-size: 14px; }
.project-card header p { margin: 0; color: var(--muted); font-size: 9px; }
.project-progress-line { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 16px 16px 9px; }
.project-progress-line strong { font-size: 11px; }
.project-next { margin: 0; padding: 5px 16px 13px; font-size: 11px; line-height: 1.6; }
.project-card > footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; padding: 11px 16px; color: var(--muted); background: var(--canvas); border-top: 1px solid var(--line); font-size: 9px; }
.project-card details { border-top: 1px solid var(--line); }
.project-card summary { min-height: 44px; padding: 13px 16px; color: var(--green); font-size: 10px; font-weight: 750; cursor: pointer; }
.project-card ol { margin: 0; padding: 0 16px 12px; list-style: none; }
.project-card li { display: grid; min-height: 34px; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 9px; }
.project-card li small { color: var(--muted); }
.project-card li.is-done { color: var(--green); text-decoration: line-through; }
.plan-task-list { margin-top: 16px; padding: 0; list-style: none; }
.plan-task-list li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.plan-task-list li:last-child { border-bottom: 0; }
.plan-task-list small { color: var(--muted); }

.discovery-hero { display: grid; min-height: 172px; grid-template-columns: minmax(0, 1fr) 190px; align-items: center; gap: 24px; margin-bottom: 16px; padding: 26px 28px; color: #fff; background: #234f55; border-bottom: 5px solid var(--subject-color); border-radius: 8px; }
.discovery-hero .eyebrow { color: #c7dde0; }
.discovery-hero h2 { margin-bottom: 8px; font-size: 27px; line-height: 1.3; }
.discovery-hero p:last-child { max-width: 680px; margin-bottom: 0; color: #d7e5e7; font-size: 14px; }
.discovery-score { display: grid; min-height: 116px; padding: 15px 18px; place-content: center; color: var(--ink); background: var(--subject-soft); border: 1px solid rgba(255,255,255,.35); border-radius: 7px; }
.discovery-score span { color: var(--muted); font-size: 12px; }
.discovery-score strong { margin: 2px 0; color: var(--subject-color); font-size: 35px; line-height: 1.1; }
.discovery-score strong small { font-size: 16px; }
.discovery-score em { color: var(--muted); font-size: 12px; font-style: normal; }
.discovery-tabs { margin-bottom: 14px; }
.discovery-reading-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.discovery-reading { min-width: 0; padding: 21px 22px 23px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--subject-color); border-radius: 7px; }
.discovery-reading.knowledge-reading { background: var(--subject-soft); }
.discovery-reading header { display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 15px; }
.discovery-reading header > span { display: grid; width: 43px; height: 43px; place-items: center; color: #fff; background: var(--subject-color); border-radius: 6px; font-size: 13px; font-weight: 800; }
.discovery-reading small { color: var(--muted); font-size: 12px; font-weight: 700; }
.discovery-reading h2 { margin: 2px 0 0; font-size: 19px; line-height: 1.4; }
.discovery-reading > p { margin: 0; font-size: 15px; line-height: 1.9; text-align: justify; }
.discovery-quiz { margin-bottom: 20px; }
.subject-chip { display: inline-flex; min-height: 32px; align-items: center; padding: 0 12px; color: #fff; background: var(--subject-color); border-radius: 5px; font-size: 13px; font-weight: 800; }
.discovery-quiz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.quiz-card { min-width: 0; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.quiz-number { margin-bottom: 7px; color: var(--subject-color); font-size: 12px; font-weight: 800; }
.quiz-card h3 { min-height: 48px; margin-bottom: 14px; font-size: 16px; line-height: 1.55; }
.quiz-options { display: grid; gap: 8px; }
.quiz-option { display: grid; min-height: 50px; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.quiz-option span { display: grid; width: 29px; height: 29px; place-items: center; color: var(--subject-color); background: var(--subject-soft); border-radius: 50%; font-size: 12px; font-weight: 800; }
.quiz-option b { min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.quiz-option:hover { border-color: var(--subject-color); }
.quiz-option.is-wrong { color: var(--danger); background: #fff4f2; border-color: #e8aaa2; }
.quiz-option.is-correct { color: var(--green); background: var(--green-soft); border-color: #83b2a5; }
.quiz-result { margin-top: 12px; padding: 11px 13px; border-left: 3px solid var(--yellow); background: var(--yellow-soft); }
.quiz-result.correct { border-left-color: var(--green); background: var(--green-soft); }
.quiz-result strong { font-size: 13px; }
.quiz-result p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.bank-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.bank-card { position: relative; min-height: 165px; padding: 24px; overflow: hidden; color: #fff; border-radius: 8px; }
.bank-card.points { background: #315f7a; }
.bank-card.time { background: var(--green); }
.bank-card::after { position: absolute; right: 20px; bottom: -35px; color: rgba(255,255,255,.12); content: attr(data-symbol); font-size: 130px; font-weight: 900; }
.bank-card span { color: #d6e6ed; font-size: 10px; }
.bank-card h2 { position: relative; z-index: 1; margin: 7px 0 3px; font-size: 39px; }
.bank-card h2 small { font-size: 12px; }
.bank-card p { position: relative; z-index: 1; margin: 0; color: #d6e6ed; font-size: 10px; }
.reward-goal { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 18px; padding: 18px 20px; background: var(--yellow-soft); border-left: 4px solid var(--yellow); }
.reward-goal h3 { margin-bottom: 5px; font-size: 14px; }
.reward-goal p { margin-bottom: 10px; color: #6e633e; font-size: 10px; }
.reward-goal strong { color: #806615; font-size: 15px; }
.goal-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.reward-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.reward-card { display: flex; min-height: 210px; flex-direction: column; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.reward-icon { display: grid; width: 46px; height: 46px; margin-bottom: 14px; place-items: center; color: var(--reward-color, var(--green)); background: var(--reward-bg, var(--green-soft)); border-radius: 7px; font-size: 23px; }
.reward-card h3 { margin-bottom: 5px; font-size: 14px; }
.reward-card p { margin-bottom: 15px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.reward-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.reward-price { color: #806615; font-size: 15px; font-weight: 850; }
.reward-price small { color: var(--muted); font-size: 9px; font-weight: 500; }
.redemption-row { display: grid; min-height: 61px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.redemption-row:last-child { border-bottom: 0; }
.redemption-row strong { display: block; font-size: 12px; }
.redemption-row p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }

.growth-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 16px; }
.chart-panel, .report-panel { padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.chart-panel h2, .report-panel h2 { margin-bottom: 4px; font-size: 15px; }
.chart-panel > p, .report-panel > p { color: var(--muted); font-size: 10px; }
.week-chart { display: grid; height: 230px; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; margin-top: 20px; padding: 0 5px 28px; border-bottom: 1px solid var(--line); }
.week-column { position: relative; display: flex; height: 100%; flex-direction: column; justify-content: flex-end; text-align: center; }
.week-column span { margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.week-bar { width: min(42px, 70%); min-height: 4px; margin: 0 auto; background: var(--blue); border-radius: 4px 4px 0 0; }
.week-column small { position: absolute; top: calc(100% + 8px); right: 0; left: 0; color: var(--muted); font-size: 9px; }
.streak-box { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 13px; margin-top: 16px; padding: 14px; background: var(--green-soft); }
.streak-number { display: grid; width: 58px; height: 58px; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 20px; font-weight: 900; }
.streak-box h3 { margin-bottom: 4px; font-size: 13px; }
.streak-box p { margin: 0; color: var(--muted); font-size: 9px; }
.ledger-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-icon { display: grid; width: 32px; height: 32px; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 50%; font-size: 12px; }
.ledger-row strong { display: block; font-size: 11px; }
.ledger-row p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.ledger-value { color: var(--green); font-size: 12px; font-weight: 850; }
.ledger-value.negative { color: var(--coral); }

.mistake-hero { display: flex; min-height: 132px; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 14px; padding: 23px 26px; color: #fff; background: #315f7a; border-radius: 8px; }
.mistake-hero .eyebrow { color: #bcd9e6; }
.mistake-hero h2 { margin-bottom: 7px; font-size: 21px; }
.mistake-hero p:last-child { max-width: 680px; margin-bottom: 0; color: #d8e7ed; font-size: 11px; line-height: 1.6; }
.mistake-metrics { margin-bottom: 14px; }
.mistake-tabs { width: min(100%, 520px); }
.mistake-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mistake-grid > .empty { grid-column: 1/-1; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.mistake-card { display: flex; min-height: 310px; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--subject-color); border-radius: 7px; }
.mistake-photo { position: relative; height: 155px; overflow: hidden; background: var(--subject-soft); }
.mistake-photo img { width: 100%; height: 100%; object-fit: cover; }
.mistake-photo .subject-block { position: absolute; top: 10px; left: 10px; min-width: 46px; min-height: 32px; font-size: 11px; box-shadow: 0 4px 12px rgba(20,39,34,.15); }
.mistake-info { display: flex; flex: 1; flex-direction: column; padding: 15px; }
.mistake-info h3 { font-size: 14px; }
.mistake-info > p { margin-bottom: 11px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.mistake-info footer { display: flex; justify-content: flex-end; gap: 6px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.mistake-review-photo { max-height: 330px; margin: 12px 0 15px; }
.review-answer { margin-top: 9px; padding: 12px 14px; background: var(--canvas); border-left: 3px solid var(--blue); }
.review-answer + .review-answer { border-left-color: var(--green); }
.review-answer span { color: var(--muted); font-size: 9px; }
.review-answer p { margin: 6px 0 0; font-size: 11px; line-height: 1.65; white-space: pre-wrap; }
.mistake-review-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.parent-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
.parent-tabs { position: sticky; top: 94px; align-self: start; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.parent-tabs button { width: 100%; min-height: 43px; padding: 0 11px; color: var(--muted); background: transparent; border: 0; border-radius: 5px; text-align: left; font-size: 11px; font-weight: 700; }
.parent-tabs button.is-active { color: var(--green); background: var(--green-soft); }
.parent-panel { min-width: 0; }
.parent-toolbar { display: flex; min-height: 49px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.parent-toolbar h2 { margin: 0; font-size: 16px; }
.review-card { margin-bottom: 10px; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-head h3 { margin-bottom: 5px; font-size: 14px; }
.review-head p { margin-bottom: 0; color: var(--muted); font-size: 10px; }
.review-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 14px 0; }
.review-grid div { padding: 10px; background: var(--canvas); border-radius: 5px; }
.review-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; }
.review-grid strong { font-size: 12px; }
.quality-checks { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.quality-check { position: relative; }
.quality-check input { position: absolute; opacity: 0; pointer-events: none; }
.quality-check span { display: inline-flex; min-height: 36px; align-items: center; padding: 0 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 18px; font-size: 10px; }
.quality-check input:checked + span { color: var(--green); background: var(--green-soft); border-color: #88b3a7; font-weight: 750; }
.review-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; }
.review-actions label { flex: 1 1 150px; margin: 0; color: var(--muted); font-size: 9px; }
.review-actions input { min-height: 40px; margin-top: 4px; }
.data-table { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.data-row { display: grid; min-height: 66px; grid-template-columns: minmax(180px, 1.5fr) .55fr .55fr .65fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 10px; }
.data-row:last-child { border-bottom: 0; }
.data-row strong { display: block; margin-bottom: 3px; font-size: 11px; }
.data-row small { color: var(--muted); font-size: 9px; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.settings-form { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-field { min-width: 0; }
.form-field.full { grid-column: 1/-1; }
.form-field label { margin-bottom: 0; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.check-row label { margin: 0; }
.form-actions { display: flex; grid-column: 1/-1; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.notice { margin-bottom: 13px; padding: 12px 14px; color: #665521; background: var(--yellow-soft); border-left: 3px solid var(--yellow); font-size: 10px; line-height: 1.6; }
.notice.full { grid-column: 1/-1; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; padding: 22px; place-items: center; background: rgba(17, 35, 30, .56); }
.modal { width: min(100%, 620px); max-height: calc(100vh - 44px); overflow: auto; background: #fff; border-radius: 8px; box-shadow: 0 25px 70px rgba(13,35,28,.3); }
.modal.narrow { width: min(100%, 430px); }
.modal-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-close { width: 44px; height: 44px; background: #fff; border: 1px solid var(--line); border-radius: 50%; font-size: 20px; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }
.task-submit-top { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; padding: 13px; background: var(--canvas); }
.task-submit-top span { color: var(--green); font-size: 28px; }
.task-submit-top strong { display: block; font-size: 13px; }
.task-submit-top small { color: var(--muted); font-size: 9px; }
.photo-preview { width: 100%; max-height: 220px; margin-top: 8px; object-fit: contain; background: var(--canvas); border: 1px solid var(--line); border-radius: 6px; }
.pin-boxes { display: flex; justify-content: center; gap: 10px; margin: 22px 0; }
.pin-boxes input { width: 56px; height: 60px; margin: 0; padding: 0; text-align: center; font-size: 24px; font-weight: 800; }
.centered { text-align: center; }
.toast-region { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: flex; width: min(340px, calc(100% - 36px)); flex-direction: column; gap: 7px; }
.toast { padding: 13px 15px; color: #fff; background: #24423a; border-left: 4px solid #f0c65e; border-radius: 6px; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { border-color: var(--coral); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Tablet-first typography: comfortable at arm's length without loosening the layout. */
.eyebrow { font-size: 12px; }
.login-form label, .form-field label { font-size: 14px; font-weight: 700; }
input, select, textarea { min-height: 50px; font-size: 16px; }
textarea { min-height: 96px; }
.form-error { font-size: 13px; }
.button { min-height: 46px; font-size: 15px; font-weight: 700; }
.button.small { min-height: 40px; font-size: 13px; }
.brand strong { font-size: 16px; }
.brand small { font-size: 10px; }
.nav-button { min-height: 50px; }
.nav-button b { font-size: 14px; }
.side-wallet > small { font-size: 12px; }
.side-wallet em { font-size: 11px; }
.parent-entry b { font-size: 14px; }
.parent-entry small { font-size: 11px; }
.topbar h1 { font-size: 23px; }
.date-button b { font-size: 13px; }
.avatar-button { font-size: 13px; }
.welcome-copy h2 { font-size: 27px; }
.welcome-copy p, .welcome-progress strong { font-size: 14px; }
.arrival-box strong { font-size: 17px; }
.arrival-box p { font-size: 13px; }
.metric span { font-size: 12px; }
.metric small { font-size: 11px; }
.section-head h2 { font-size: 19px; }
.section-head p { font-size: 13px; line-height: 1.55; }
.task-card { min-height: 94px; }
.task-title-line h3 { font-size: 16px; }
.tag { min-height: 24px; font-size: 11px; }
.task-meta { font-size: 12px; line-height: 1.5; }
.task-status { font-size: 13px; }
.side-panel h2 { font-size: 17px; }
.bank-mini span, .pending-line, .screen-numbers { font-size: 12px; }
.tip-box { font-size: 13px; }
.empty strong { font-size: 15px; }
.empty p { font-size: 12px; }
.subject-tabs button, .segmented button { min-height: 42px; font-size: 14px; }
.plan-subject h2 { font-size: 19px; }
.plan-subject p { font-size: 13px; line-height: 1.55; }
.task-type-guide b { font-size: 14px; }
.task-type-guide span { font-size: 12px; }
.project-card h3 { font-size: 16px; }
.project-card header p { font-size: 12px; }
.project-progress-line strong, .project-next { font-size: 13px; }
.project-card > footer { font-size: 12px; }
.project-card summary { font-size: 13px; }
.project-card li { min-height: 40px; font-size: 12px; }
.plan-task-list li { font-size: 13px; line-height: 1.5; }
.bank-card span, .bank-card p { font-size: 12px; }
.bank-card h2 small { font-size: 14px; }
.reward-goal h3, .reward-card h3 { font-size: 16px; }
.reward-goal p, .reward-card p { font-size: 13px; }
.reward-goal strong, .reward-price { font-size: 17px; }
.reward-price small { font-size: 11px; }
.redemption-row { min-height: 70px; }
.redemption-row strong { font-size: 14px; }
.redemption-row p { font-size: 12px; }
.chart-panel h2, .report-panel h2 { font-size: 17px; }
.chart-panel > p, .report-panel > p { font-size: 13px; }
.week-column span, .week-column small { font-size: 11px; }
.streak-box h3 { font-size: 15px; }
.streak-box p { font-size: 12px; }
.ledger-row strong { font-size: 13px; }
.ledger-row p { font-size: 11px; }
.ledger-value { font-size: 14px; }
.mistake-hero h2 { font-size: 24px; }
.mistake-hero p:last-child { font-size: 13px; }
.mistake-info h3 { font-size: 16px; }
.mistake-info > p { font-size: 12px; }
.review-answer span { font-size: 11px; }
.review-answer p { font-size: 13px; }
.parent-tabs button { min-height: 48px; font-size: 14px; }
.parent-toolbar h2 { font-size: 19px; }
.review-head h3 { font-size: 16px; }
.review-head p { font-size: 12px; }
.review-grid span { font-size: 11px; }
.review-grid strong { font-size: 14px; }
.quality-check span { min-height: 40px; font-size: 13px; }
.review-actions label { font-size: 12px; }
.data-row { min-height: 76px; font-size: 13px; line-height: 1.5; }
.data-row strong { font-size: 14px; }
.data-row small { font-size: 11px; }
.notice { font-size: 13px; }
.modal-header h2 { font-size: 20px; }
.task-submit-top strong { font-size: 15px; }
.task-submit-top small { font-size: 12px; }
.toast { font-size: 14px; }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .reward-grid { grid-template-columns: repeat(2, 1fr); }
  .today-layout { grid-template-columns: minmax(0, 1.2fr) minmax(270px, .65fr); }
  .login-screen { grid-template-columns: minmax(0, 1fr) 410px; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 72px; padding: 0 20px; }
  .page-content { padding: 22px 20px calc(86px + env(safe-area-inset-bottom)); }
  .mobile-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; height: calc(70px + env(safe-area-inset-bottom)); grid-template-columns: repeat(7, 1fr); padding: 5px 6px env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); }
  .mobile-nav .nav-button { min-width: 0; min-height: 56px; flex-direction: column; justify-content: center; gap: 2px; padding: 0 3px; border-radius: 5px; text-align: center; }
  .mobile-nav .nav-button span { height: 24px; font-size: 19px; }
  .mobile-nav .nav-button b { font-size: 11px; white-space: nowrap; }
  .mobile-nav .nav-button.is-active { color: var(--green); background: var(--green-soft); }
  .today-layout, .growth-layout { grid-template-columns: 1fr; }
  .mistake-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-band { grid-template-columns: 1fr 270px; }
  .parent-layout { grid-template-columns: 1fr; }
  .parent-tabs { position: static; display: flex; overflow-x: auto; padding: 4px; }
  .parent-tabs button { min-width: max-content; width: auto; }
  .toast-region { bottom: calc(77px + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  .login-screen { display: block; }
  .login-visual { display: none; }
  .login-panel { padding: 30px 24px; }
  .mobile-brand { display: flex; }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 19px; }
  .date-button b { display: none; }
  .welcome-band { grid-template-columns: 1fr; }
  .arrival-box { min-height: 120px; }
  .plan-grid, .bank-hero { grid-template-columns: 1fr; }
  .discovery-reading-grid, .discovery-quiz-grid { grid-template-columns: 1fr; }
  .discovery-hero { grid-template-columns: 1fr; }
  .discovery-score { width: min(100%, 220px); }
  .project-grid { grid-template-columns: 1fr; }
  .task-type-guide { grid-template-columns: 1fr; }
  .mistake-hero { align-items: flex-start; flex-direction: column; }
  .data-row { grid-template-columns: minmax(0, 1fr) auto; }
  .data-row > :not(:first-child):not(.row-actions) { display: none; }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .page-content { padding-right: 13px; padding-left: 13px; }
  .topbar { padding: 0 13px; }
  .top-actions { gap: 5px; }
  .date-button { width: 44px; padding: 0; justify-content: center; }
  .metric-grid { gap: 7px; }
  .metric { min-height: 91px; padding: 13px; }
  .metric strong { font-size: 24px; }
  .welcome-copy { padding: 23px 19px; }
  .welcome-copy h2 { font-size: 24px; }
  .task-card { grid-template-columns: 7px minmax(0, 1fr); padding-right: 12px; }
  .task-actions { grid-column: 2; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }
  .reward-grid { grid-template-columns: 1fr; }
  .mistake-grid { grid-template-columns: 1fr; }
  .reward-goal { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full, .form-actions { grid-column: 1; }
  .modal-backdrop { padding: 8px; }
  .modal { max-height: calc(100vh - 16px); }
  .modal-body { padding: 17px; }
  .discovery-hero { padding: 22px 19px; }
  .discovery-hero h2 { font-size: 23px; }
  .discovery-reading { padding: 18px; }
  .quiz-card { padding: 17px; }
}

@media (min-width: 561px) and (max-width: 1024px) {
  body { font-size: 17px; }
  .button { min-height: 50px; font-size: 16px; }
  .button.small { min-height: 42px; font-size: 14px; }
  .topbar h1 { font-size: 24px; }
  .section-head h2, .parent-toolbar h2 { font-size: 21px; }
  .section-head p { font-size: 14px; }
  .task-title-line h3 { font-size: 18px; }
  .task-meta, .task-status { font-size: 14px; }
  .tag { font-size: 12px; }
  .side-panel h2 { font-size: 19px; }
  .discovery-reading > p { font-size: 17px; line-height: 1.95; }
  .discovery-reading h2 { font-size: 21px; }
  .quiz-card h3 { font-size: 18px; }
  .quiz-option b { font-size: 16px; }
  .quiz-result strong { font-size: 15px; }
  .quiz-result p { font-size: 14px; }
  .mobile-nav .nav-button b { font-size: 12px; }
}

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