:root {
  --paper: #f7f4ed;
  --paper-deep: #eee9df;
  --ink: #1f2d32;
  --muted: #7a8583;
  --line: #d9d8cf;
  --blue: #284e59;
  --blue-soft: #dce8e6;
  --coral: #e57657;
  --coral-soft: #f5ddd3;
  --mint: #8eafa6;
  --gold: #c2a564;
  --shadow: 0 18px 48px rgba(48, 65, 63, .08);
  --radius: 18px;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 7% 3%, #fffdf9 0, transparent 26%), var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 1440px; margin: 0 auto; padding: 30px 42px 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 52px; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 40px; height: 40px; border: 1px solid var(--blue); display: flex; align-items: end; justify-content: center; gap: 3px; padding: 9px 8px; transform: rotate(-5deg); background: var(--blue); }
.brand-mark span { display: block; width: 5px; background: var(--coral); }
.brand-mark span:nth-child(1) { height: 12px; opacity: .65; }.brand-mark span:nth-child(2) { height: 20px; }.brand-mark span:nth-child(3) { height: 27px; opacity: .78; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; letter-spacing: -.03em; font-weight: 800; }
h2 { font-size: clamp(40px, 5.2vw, 72px); line-height: .98; letter-spacing: -.07em; max-width: 680px; margin: 18px 0 22px; font-weight: 750; }
h2 em { color: var(--coral); font-style: normal; }
h3 { font-size: 21px; letter-spacing: -.04em; font-weight: 800; }
.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .18em; font-weight: 800; line-height: 1.4; }
.coral { color: var(--coral); }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.save-state, .sync-state { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }.sync-state { color: var(--blue); }.sync-dot.pending { background: var(--gold); box-shadow: 0 0 0 4px rgba(194,165,100,.14); }.sync-dot.error { background: var(--coral); box-shadow: 0 0 0 4px rgba(229,118,87,.14); }.sync-dot.local { background: var(--muted); box-shadow: 0 0 0 4px rgba(122,133,131,.14); }
.status-dot { width: 7px; height: 7px; background: #72a38d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(114, 163, 141, .14); }
.ghost-button { border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 0; font-size: 12px; }
.ghost-button:hover, .text-button:hover { color: var(--coral); border-color: var(--coral); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 58px; align-items: end; margin-bottom: 50px; }
.hero-side-stack { display: grid; gap: 15px; }
.hero-note { max-width: 520px; line-height: 1.75; color: var(--muted); font-size: 14px; }
.hero-metrics { display: flex; gap: 30px; margin-top: 42px; flex-wrap: wrap; }
.hero-metric { display: grid; gap: 6px; }
.hero-metric strong { font-size: 26px; letter-spacing: -.06em; }.hero-metric strong span { font-size: 11px; margin-left: 4px; color: var(--muted); letter-spacing: 0; }.hero-metric span { color: var(--muted); font-size: 11px; }
.daily-bar-card { background: var(--blue); color: #f7f4ed; padding: 28px 30px 25px; min-height: 190px; box-shadow: var(--shadow); }
.daily-bar-card .eyebrow { color: #a3b9b6; }.daily-bar-card h3 { color: #fffdf8; }
.compact-heading { align-items: start; }.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; }.compact-heading h3 { margin-top: 4px; }.time-pill { background: var(--coral); padding: 7px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.countdown-card { background: #fffdf8; border: 1px solid var(--line); padding: 24px 27px 20px; box-shadow: var(--shadow); }.countdown-card h3 { margin-top: 4px; }.countdown-status { color: var(--coral); font-size: 10px; font-weight: 800; text-align: right; }.countdown-numbers { display: flex; align-items: end; gap: 8px; margin: 24px 0 18px; }.countdown-unit { display: grid; gap: 1px; }.countdown-unit strong { font-size: 34px; line-height: 1; letter-spacing: -.07em; color: var(--blue); min-width: 40px; }.countdown-unit span { color: var(--muted); font-size: 10px; }.countdown-separator { color: var(--coral); font-size: 24px; padding-bottom: 5px; }.countdown-settings { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10px; }.date-setting { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }.date-setting input, .date-setting select { width: 100%; min-width: 0; background: var(--paper); border: 1px solid var(--line); color: var(--ink); padding: 8px 9px; font-size: 11px; outline: none; }.date-setting input:focus, .date-setting select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(229,118,87,.12); }
.range-row { display: flex; align-items: center; gap: 15px; margin: 25px 0 14px; }.range-row input { flex: 1; accent-color: var(--coral); }.range-row output { width: 68px; color: var(--coral); font-size: 12px; font-weight: 800; text-align: right; }
.bar-track { background: rgba(255,255,255,.17); overflow: hidden; }.bar-track.large { height: 8px; }.bar-fill { height: 100%; width: 50%; background: var(--coral); transition: width .25s ease; }.bar-labels { display: flex; justify-content: space-between; color: #a3b9b6; font-size: 10px; margin-top: 8px; }
.budget-line { display: flex; justify-content: space-between; gap: 10px; color: #cfdbd7; font-size: 10px; margin: -2px 0 10px; }.budget-line b { color: #fffdf8; font-size: 13px; }.budget-breakdown { color: #a3b9b6; font-size: 10px; margin-bottom: 12px; }.budget-hint { color: var(--coral); font-size: 10px; line-height: 1.45; margin-top: 11px; }
.microcopy { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 13px; }.daily-bar-card .microcopy { color: #a3b9b6; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(330px, .85fr); gap: 24px; align-items: start; }.main-column, .side-column { display: grid; gap: 24px; }
.panel { background: rgba(255,255,255,.64); border: 1px solid rgba(217,216,207,.9); padding: 27px 28px; box-shadow: 0 9px 30px rgba(48,65,63,.035); }.checkin-panel { min-height: 425px; }.date-chip, .period-label { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 6px 9px; }.section-intro { color: var(--muted); font-size: 12px; margin: 12px 0 22px; }
.subject-table { border-top: 1px solid var(--line); }.subject-row { display: grid; grid-template-columns: minmax(105px, 1fr) .55fr .55fr .65fr .9fr minmax(145px, 1.4fr); gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }.subject-name { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 13px; }.subject-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--coral); }.subject-row:nth-child(2) .subject-dot { background: var(--mint); }.subject-row:nth-child(3) .subject-dot { background: var(--gold); }.subject-row:nth-child(4) .subject-dot { background: #9e879d; }.subject-row:nth-child(5) .subject-dot { background: #7395a0; }.subject-row:nth-child(6) .subject-dot { background: #b48764; }
.cell-label { display: none; }.input-wrap { position: relative; }.input-wrap input { width: 100%; height: 34px; border: 1px solid var(--line); background: var(--paper); padding: 0 10px; color: var(--ink); outline: none; }.input-wrap input:focus, .field-label input:focus, .field-label select:focus, textarea:focus, .cause-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(229,118,87,.12); }.unit { position: absolute; right: 9px; top: 9px; color: var(--muted); font-size: 10px; }.rate-cell { font-size: 12px; color: var(--blue); font-weight: 800; }.rate-cell.low { color: var(--coral); }.cause-input { width: 100%; height: 34px; border: 1px solid var(--line); background: var(--paper); padding: 0 10px; color: var(--ink); outline: none; font-size: 11px; }
.note-field { margin-top: 20px; }.note-field label, .field-label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }.note-field textarea, textarea, .field-label input, .field-label select { width: 100%; border: 1px solid var(--line); background: var(--paper); padding: 10px 11px; resize: vertical; outline: none; color: var(--ink); }.note-field textarea { min-height: 64px; }
.date-chip, .soft-tag, .recommendation-badge { white-space: nowrap; }.soft-tag, .recommendation-badge { padding: 6px 8px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 800; }.coral-tag { background: var(--coral-soft); color: #ad5c42; }.recommendation-badge { background: var(--coral-soft); color: #ad5c42; }
.course-grid { display: grid; grid-template-columns: 1fr 1.45fr .7fr .9fr; gap: 12px; margin-top: 25px; }.preference-note { margin-top: 20px; background: var(--paper-deep); padding: 12px 13px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }.preference-note b { color: var(--ink); }.small-icon { font-size: 17px; color: var(--coral); }.text-button { margin-left: auto; border: 0; border-bottom: 1px solid var(--line); color: var(--blue); background: transparent; font-size: 11px; white-space: nowrap; padding: 2px 0; }
.review-layout { display: grid; grid-template-columns: .75fr 1.6fr; gap: 12px; margin-top: 25px; }.full-width { grid-column: 2; grid-row: 1; }.review-history { margin-top: 20px; }.history-empty { padding: 14px; border-left: 3px solid var(--line); color: var(--muted); font-size: 11px; }.history-item { padding: 13px 15px; border-left: 3px solid var(--coral); background: var(--paper-deep); font-size: 12px; line-height: 1.6; }.history-item + .history-item { margin-top: 8px; }.history-meta { color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.notes-intro { line-height: 1.65; margin-bottom: 16px; }.notes-panel textarea { min-height: 165px; line-height: 1.7; }
.plan-panel { background: var(--blue); color: #f7f4ed; border-color: var(--blue); }.plan-panel .eyebrow { color: #a3b9b6; }.plan-panel h3 { color: #fffdf8; }.plan-summary { color: #b7c5c0; font-size: 12px; line-height: 1.65; margin: 14px 0 10px; }.plan-budget-note { color: #a3b9b6; font-size: 10px; line-height: 1.5; margin-bottom: 17px; }.plan-list { display: grid; gap: 10px; }.plan-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); padding: 14px 15px; }.plan-card-top { display: flex; align-items: center; gap: 9px; }.plan-rank { color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: .08em; }.plan-subject { color: #fffdf8; font-size: 14px; font-weight: 800; }.plan-reason { color: #afc0bc; font-size: 11px; line-height: 1.5; margin-top: 6px; }.plan-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }.plan-input { width: 72px; border: 1px solid rgba(255,255,255,.24); background: rgba(0,0,0,.12); color: #fffdf8; padding: 6px 8px; text-align: right; outline: none; }.plan-input:focus { border-color: var(--coral); }.plan-input:disabled { opacity: .62; cursor: not-allowed; }.plan-minutes { color: #cfdbd7; font-size: 10px; }.primary-button { width: 100%; margin-top: 19px; background: var(--coral); color: #fffdf8; border: 0; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 12px; }.primary-button:hover { background: #d96749; }.button-arrow { font-size: 18px; line-height: 10px; }.primary-button.small { width: auto; margin-top: 0; padding: 10px 14px; }.plan-panel .microcopy { color: #a3b9b6; }
.weekly-essay-card { border-top: 1px solid rgba(255,255,255,.16); margin-top: 24px; padding-top: 20px; }.weekly-essay-card h4 { color: #fffdf8; font-size: 15px; margin-top: 4px; }.essay-progress { background: rgba(255,255,255,.11); color: #cfdbd7; font-size: 10px; padding: 5px 7px; }.weekly-essay-intro { color: #b7c5c0; font-size: 10px; line-height: 1.55; margin: 11px 0 13px; }.essay-blocks { display: grid; gap: 7px; }.essay-block { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; background: rgba(255,255,255,.07); padding: 8px; }.essay-check { position: relative; width: 16px; height: 16px; }.essay-check input { position: absolute; opacity: 0; }.checkmark { display: block; width: 16px; height: 16px; border: 1px solid rgba(255,255,255,.45); }.essay-check input:checked + .checkmark { background: var(--coral); border-color: var(--coral); box-shadow: inset 0 0 0 3px var(--blue); }.essay-block-main { display: grid; gap: 2px; min-width: 0; }.essay-title { width: 100%; border: 0; border-bottom: 1px solid transparent; color: #fffdf8; background: transparent; outline: none; padding: 0; font-size: 11px; font-weight: 800; }.essay-title:focus { border-color: var(--coral); }.essay-block-main span { color: #a3b9b6; font-size: 9px; }.essay-add { border: 0; background: transparent; color: var(--coral); font-size: 9px; white-space: nowrap; padding: 3px 0; }.essay-add:hover { color: #ffad92; }.essay-add:disabled { color: #73908b; cursor: default; }.essay-block.is-done .essay-title { text-decoration: line-through; color: #9bb0ab; }
.schedule-intro { margin-bottom: 15px; line-height: 1.65; }.schedule-reminder-note { display: grid; gap: 4px; background: var(--coral-soft); border-left: 3px solid var(--coral); padding: 11px 12px; margin-bottom: 17px; }.schedule-reminder-note strong { color: #ad5c42; font-size: 11px; }.schedule-reminder-note span { color: #8a6e64; font-size: 10px; line-height: 1.5; }.schedule-list { display: grid; gap: 0; }.schedule-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; padding: 11px 0; border-top: 1px solid var(--line); }.schedule-marker { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-top: 5px; box-shadow: 0 0 0 3px rgba(142,175,166,.16); }.schedule-copy { display: grid; gap: 4px; min-width: 0; }.schedule-copy strong { color: var(--ink); font-size: 11px; }.schedule-copy span { color: var(--muted); font-size: 10px; line-height: 1.5; }.schedule-action .schedule-marker { background: var(--coral); }.schedule-item.is-action .schedule-marker { background: var(--coral); box-shadow: 0 0 0 3px rgba(229,118,87,.14); }.schedule-action { color: var(--coral); font-size: 9px; font-weight: 800; padding-top: 2px; }
.trend-total { display: flex; align-items: baseline; gap: 9px; margin: 26px 0 17px; }.trend-total strong { font-size: 34px; letter-spacing: -.07em; }.trend-total span { color: var(--muted); font-size: 11px; }.trend-chart { display: grid; gap: 9px; }.trend-row { display: grid; grid-template-columns: 38px 1fr 39px; gap: 9px; align-items: center; font-size: 10px; }.trend-label { color: var(--muted); }.trend-bar { height: 8px; background: var(--paper-deep); position: relative; }.trend-bar-fill { height: 100%; background: var(--mint); transition: width .3s ease; }.trend-value { font-weight: 800; text-align: right; color: var(--blue); }.trend-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }.legend-item { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 5px; }.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.rule-body { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 18px; }.rule-row { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 10px 0; }.rule-row b { color: var(--ink); text-align: right; font-size: 10px; }.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 20px; padding: 0 3px; line-height: 1; }.icon-button:hover { color: var(--coral); }.footer-note { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; }
.auth-gate { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(31,45,50,.34); backdrop-filter: blur(7px); }.auth-gate[hidden] { display: none; }.auth-card { width: min(410px, 100%); background: var(--paper); border: 1px solid var(--line); padding: 30px; box-shadow: var(--shadow); }.auth-card h3 { margin-top: 6px; }.auth-copy { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 15px 0 22px; }.auth-card .field-label + .field-label { margin-top: 13px; }.auth-card input { width: 100%; border: 1px solid var(--line); background: #fffdf8; padding: 10px 11px; outline: none; color: var(--ink); }.auth-card input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(229,118,87,.12); }.auth-actions { display: flex; align-items: center; gap: 18px; margin-top: 22px; }.auth-message { min-height: 18px; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 14px; }.auth-message.is-error { color: var(--coral); }
.teacher-dialog { border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: min(520px, calc(100% - 30px)); padding: 27px; box-shadow: var(--shadow); }.teacher-dialog::backdrop { background: rgba(31,45,50,.35); }.dialog-heading { display:flex; justify-content:space-between; align-items:start; }.dialog-heading h3 { margin-top: 5px; }.dialog-copy { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 18px 0; }.teacher-field { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; padding: 10px 0; border-top: 1px solid var(--line); }.teacher-field label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }.teacher-field input { width: 100%; border: 1px solid var(--line); background: #fffdf8; padding: 9px 10px; outline: none; }.dialog-actions { display:flex; justify-content:flex-end; gap:18px; margin-top: 24px; align-items:center; }.dialog-actions .ghost-button { font-size: 12px; }.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 11px 15px; font-size: 12px; opacity: 0; pointer-events: none; transition: all .2s ease; }.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 980px) { .app-shell { padding: 25px 22px; }.hero-grid, .workspace-grid { grid-template-columns: 1fr; }.hero-grid { gap: 28px; }.side-column { grid-template-columns: 1fr 1fr; align-items: start; }.plan-panel { grid-row: span 2; }.rule-panel { grid-column: 2; } }
@media (max-width: 700px) { .topbar { align-items: start; margin-bottom: 38px; }.topbar-actions { align-items: end; flex-direction: column; gap: 9px; }.hero-metrics { gap: 20px; margin-top: 30px; }.hero-metric strong { font-size: 22px; }.countdown-numbers { gap: 4px; }.countdown-unit strong { font-size: 28px; min-width: 31px; }.subject-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }.subject-name { grid-column: 1 / -1; }.cell-label { display: block; font-size: 9px; color: var(--muted); margin-bottom: 4px; }.rate-cell { align-self: end; padding-bottom: 9px; }.course-grid, .review-layout { grid-template-columns: 1fr 1fr; }.full-width { grid-column: 1 / -1; grid-row: auto; }.side-column { display: grid; grid-template-columns: 1fr; }.plan-panel { grid-row: auto; }.rule-panel { grid-column: auto; }.footer-note { flex-direction: column; }.panel { padding: 23px 19px; }.auth-card { padding: 24px 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
