@charset "UTF-8";

:root {
  --ink: #192e32;
  --muted: #607477;
  --primary: #146956;
  --primary-dark: #0d4d3f;
  --primary-soft: #e8f3ee;
  --accent: #d7a451;
  --paper: #ffffff;
  --canvas: #f5f7f4;
  --line: #dce5df;
  --danger: #a73535;
  --radius: 16px;
  --shadow: 0 8px 28px rgb(32 65 46 / 5%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.65;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b38334; outline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.35; letter-spacing: -.035em; margin-bottom: .7rem; }
h2 { font-size: 1.2rem; line-height: 1.45; margin-bottom: 1rem; }
h3 { font-size: 1.05rem; line-height: 1.5; margin-bottom: .5rem; }
p { margin-bottom: 1rem; }
small, .muted, .help, .subtitle { color: var(--muted); }
.help { font-size: .87rem; margin: .4rem 0 0; }
.subtitle { margin-bottom: 0; max-width: 62ch; }
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 20; padding: .65rem 1rem; background: var(--paper); border: 2px solid var(--primary); }
.skip-link:focus { top: .75rem; }
.site-header { background: rgb(255 255 255 / 95%); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1200px; margin: auto; padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-size: 1.1rem; font-weight: 750; flex-shrink: 0; line-height: 1.3; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px 13px 13px 3px; color: white; background: var(--primary); font-family: Georgia, "Songti SC", serif; font-size: 1.5rem; font-weight: 500; }
.brand small { display: block; font-size: .58rem; letter-spacing: .13em; margin-top: .2rem; font-weight: 500; }
.main-nav { display: flex; align-items: center; gap: 1.35rem; flex-wrap: wrap; font-size: .91rem; }
.main-nav > a { text-decoration: none; color: var(--muted); }
.main-nav > a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.account-name { padding-left: 1rem; border-left: 1px solid var(--line); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-shell { max-width: 1200px; margin: auto; padding: 2.5rem 2rem 4rem; min-height: calc(100vh - 173px); }
.page-header { display: flex; align-items: start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.7rem; }
.eyebrow { display: block; color: var(--primary); text-transform: uppercase; font-size: .73rem; font-weight: 750; letter-spacing: .13em; margin-bottom: .55rem; }
.card, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card + .card, .panel + .panel { margin-top: 1.25rem; }
.card > :last-child, .panel > :last-child { margin-bottom: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; }
.grid-2, .two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.stack { display: grid; gap: 1rem; }
.row, .actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.auth-shell { max-width: 460px; margin: 1.8rem auto; }
.auth-shell .card { padding: 2rem; }
.auth-header { text-align: center; margin-bottom: 1.8rem; }
.auth-header h1 { font-size: 1.75rem; }
.field, .form-group { margin-bottom: 1.15rem; }
label { display: block; font-size: .92rem; font-weight: 650; margin-bottom: .4rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { width: 100%; padding: .72rem .85rem; background: var(--paper); color: var(--ink); border: 1px solid #c6d3cc; border-radius: 9px; min-height: 45px; }
input::placeholder, textarea::placeholder { color: #85928d; }
textarea { resize: vertical; min-height: 110px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
.checkbox-label { display: flex; gap: .6rem; align-items: center; font-weight: 400; }
.button, button:not(.button-quiet) { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .65rem 1.15rem; background: var(--primary); color: white; border: 1px solid var(--primary); border-radius: 9px; font-weight: 650; font-size: .92rem; text-decoration: none; line-height: 1.5; }
.button:hover, button:not(.button-quiet):hover { background: var(--primary-dark); color: white; }
.button.secondary, .button-secondary, button.secondary { background: white; color: var(--primary); border-color: #bfcdc5; }
.button.secondary:hover, .button-secondary:hover, button.secondary:hover { background: var(--primary-soft); color: var(--primary-dark); }
.button.danger, button.danger { background: var(--danger); border-color: var(--danger); }
.button-small { min-height: 36px; padding: .4rem .85rem; }
.main-nav > a.button { color: white; }
.button-quiet { background: none; border: 0; color: var(--muted); padding: .25rem 0; font-size: .9rem; }
.button-quiet:hover { color: var(--primary); text-decoration: underline; }
.full-width { width: 100%; }
.inline-form { display: inline; margin: 0; }
.flash-stack { display: grid; gap: .75rem; margin-bottom: 1.5rem; }
.alert { padding: .85rem 1rem; border: 1px solid #c9ded2; border-radius: 10px; background: var(--primary-soft); color: #1c5543; }
.alert-error, .alert-danger { background: #fff0ee; border-color: #ebc7c2; color: #8b2d2d; }
.alert-warning { background: #fff8e9; border-color: #ebd6a7; color: #76551d; }
.badge { display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 30px; background: var(--primary-soft); color: var(--primary); font-size: .76rem; font-weight: 650; white-space: nowrap; }
.badge.warning, .badge-draft { background: #fbf0d9; color: #805d1e; }
.empty-state { padding: 3rem 1.5rem; text-align: center; background: white; border: 1px dashed #c6d3cc; border-radius: var(--radius); }
.empty-state p { max-width: 42ch; margin: 0 auto 1.25rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
th { color: var(--muted); font-size: .8rem; font-weight: 600; background: #f8faf7; }
th, td { padding: .85rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td { overflow-wrap: anywhere; }
.stats, .progress-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.stat { border-radius: 11px; background: #f3f7f3; padding: .9rem; }
.stat strong, .stat-value { display: block; color: var(--primary); font-size: 1.7rem; font-weight: 700; line-height: 1.25; }
.stat small, .stat-label { font-size: .78rem; color: var(--muted); }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; align-items: start; gap: 1.3rem; }
.chat-log, .messages { display: flex; flex-direction: column; gap: 1.2rem; padding: .5rem 0 1.5rem; }
.message { max-width: 88%; border-radius: 14px; padding: 1rem 1.15rem; overflow-wrap: anywhere; }
.message.assistant, .message-assistant { align-self: flex-start; background: white; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.message.student, .message.user, .message-user { align-self: flex-end; background: var(--primary-soft); border: 1px solid #cbded2; border-bottom-right-radius: 4px; }
.message-content { white-space: pre-wrap; }
.message-meta { font-size: .73rem; color: var(--muted); margin-bottom: .35rem; }
.composer { padding-top: 1rem; border-top: 1px solid var(--line); }
.composer textarea { min-height: 85px; }
.composer .actions { justify-content: space-between; margin-top: .7rem; }
.correction-list { margin: 0; padding-left: 1.25rem; }
.correction-list li + li { margin-top: .8rem; }
.lesson-entry { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.lesson-entry:last-child { border: 0; }
.report-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); margin: 0; }
.report-grid dt, .report-grid dd { padding: .8rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.report-grid dt { color: var(--muted); font-size: .88rem; padding-right: 1rem; }
.report-grid dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.hero { padding: 3rem; border-radius: 22px; background: #eaf2e9; border: 1px solid #d5e3d2; margin-bottom: 1.5rem; }
.hero h1 { max-width: 18ch; font-size: clamp(2rem, 4vw, 3.3rem); }
.hero p { max-width: 52ch; color: #486255; }
.hero .actions { margin-top: 1.5rem; }
.site-footer { max-width: 1200px; margin: auto; padding: 1.3rem 2rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .78rem; }
code { font-size: .88em; background: #eff3ef; padding: .15rem .35rem; border-radius: 4px; overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

@media (max-width: 820px) {
  .header-inner { padding: 1rem 1.2rem; align-items: flex-start; }
  .main-nav { justify-content: flex-end; gap: .7rem 1rem; }
  .account-name { display: none; }
  .page-shell { padding: 1.75rem 1.2rem 3rem; }
  .practice-layout { grid-template-columns: 1fr; }
  .practice-sidebar { order: -1; }
  .two-column, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 2rem; }
}
@media (max-width: 520px) {
  .header-inner { flex-wrap: wrap; gap: 1rem; }
  .main-nav { width: 100%; justify-content: flex-start; font-size: .85rem; }
  .brand { font-size: 1rem; }
  .page-header { flex-direction: column; gap: 1rem; }
  .card, .panel { padding: 1.15rem; }
  .auth-shell { margin: .5rem auto; }
  .auth-shell .card { padding: 1.4rem; }
  .hero { padding: 1.5rem; }
  .message { max-width: 95%; padding: .85rem .95rem; }
  .report-grid { grid-template-columns: 1fr; }
  .report-grid dt { border: 0; padding-bottom: .15rem; }
  .report-grid dd { padding-top: 0; }
  .site-footer { padding: 1.2rem; flex-direction: column; gap: .2rem; }
  th, td { padding: .7rem .55rem; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button, input, textarea, select { transition: background-color .15s, border-color .15s, color .15s; }
}

/* Shared workspace and welcome surfaces */
:root { --canvas: #f5f7f2; --ink: #173530; --muted: #657a70; --primary: #176b58; --primary-dark: #104c3f; --line: #dce7dd; --radius: 17px; }
body { background: var(--canvas); }
.site-header { background: rgba(255,255,252,.97); }
.header-inner { padding-top: .8rem; padding-bottom: .8rem; }
.brand-mark { background: #176b58; border-radius: 14px 14px 14px 5px; }
.main-nav > a:not(.button) { display: inline-flex; align-items: center; min-height: 39px; padding: .4rem .7rem; border-radius: 9px; }
.main-nav > a:not(.button):hover { color: var(--primary); background: #edf5ed; }
.main-nav > a[aria-current="page"] { color: var(--primary); background: #e9f3ea; }
.account-name { font-size: .85rem; color: #405b50; }
.account-name small { display: inline-block; padding: .1rem .4rem; margin-left: .2rem; border-radius: 5px; background: #edf3e8; font-size: .68rem; }
.grid > .card, .grid > .panel, .grid-2 > .card, .two-column > .card { margin-top: 0; }
.welcome-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(320px,.95fr); overflow: hidden; min-height: 430px; border: 1px solid #d8e6d8; border-radius: 24px; background: #eaf3e5; }
.welcome-copy { z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(2rem,5vw,4.3rem); }
.welcome-kicker { display: inline-flex; gap: .55rem; align-items: center; color: #42765c; font-size: .68rem; font-weight: 750; letter-spacing: .12em; }
.welcome-kicker > span { font-size: 1.1rem; color: #bd8a3d; }
.welcome-copy h1 { margin: 1.15rem 0 1rem; color: #173d32; font-size: clamp(2.35rem,4.7vw,4.2rem); line-height: 1.22; letter-spacing: -.06em; }
.welcome-copy h1 span { color: #28745c; }
.welcome-copy > p:not(.welcome-footnote) { max-width: 34rem; margin: 0; font-size: 1rem; color: #526f60; line-height: 1.9; }
.welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.35rem; margin-top: 1.8rem; }
.welcome-primary { min-height: 50px; padding-inline: 1.35rem; gap: 1.1rem; }
.welcome-link { font-size: .92rem; font-weight: 700; text-decoration: none; }
.welcome-footnote { display: flex; align-items: center; gap: .55rem; margin: 2.1rem 0 0; color: #748a78; font-size: .76rem; }
.welcome-dot { width: 7px; height: 7px; border-radius: 50%; background: #7da88e; }
.welcome-visual { position: relative; display: grid; place-items: center; min-height: 380px; background: radial-gradient(circle at 58% 48%, #d6e9cf 0 33%, transparent 33.2%); }
.welcome-orbit { position: absolute; border: 1px solid rgba(54,115,75,.16); border-radius: 50%; }
.orbit-one { width: 350px; height: 350px; }.orbit-two { width: 430px; height: 430px; }
.welcome-note { position: relative; display: flex; flex-direction: column; width: min(72%,310px); min-height: 310px; padding: 1.45rem; border: 1px solid #dce4d7; border-radius: 8px; background: #fffef8; box-shadow: 0 22px 50px #38644720; transform: rotate(-4deg); }
.note-top, .note-bottom { display: flex; align-items: center; justify-content: space-between; color: #839589; font-size: .57rem; font-weight: 700; letter-spacing: .12em; }
.note-top i { color: #d2a453; font-size: 1.25rem; font-style: normal; }
.note-big { margin-top: 2.3rem; color: #225744; font-family: "Songti SC", "Noto Serif CJK SC", serif; font-size: clamp(2.25rem,4vw,3.3rem); letter-spacing: .05em; }
.note-big em { color: #d1a459; font-style: normal; }
.note-pinyin { color: #829387; font-family: Georgia,serif; font-size: .9rem; letter-spacing: .08em; }
.note-rule { height: 1px; margin-top: 1.35rem; background: #e8eee6; }
.note-caption { margin-top: .7rem; color: #66806c; font-size: .8rem; }
.note-bottom { margin-top: auto; padding-top: 1.7rem; font-size: .5rem; }.note-bottom b { color: #8aa28e; }
.welcome-bubble { position: absolute; right: 3%; bottom: 18%; display: flex; gap: .65rem; align-items: center; padding: .8rem 1rem; background: white; border: 1px solid #dbe8da; border-radius: 14px 14px 14px 4px; color: #264d3d; box-shadow: 0 12px 25px #3764431a; font-size: .9rem; }
.welcome-bubble > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #e7f2e2; font-size: .78rem; font-weight: 700; }
.welcome-bubble small { display: block; font-family: Georgia,serif; font-size: .72rem; }.welcome-stamp { position: absolute; top: 16%; right: 13%; display: grid; place-items: center; width: 57px; height: 57px; border: 1px solid #ca9a5c; border-radius: 50%; color: #a87739; font-family: serif; font-size: .7rem; line-height: 1.3; text-align: center; transform: rotate(12deg); }
.welcome-steps { padding: 2.5rem 0 .5rem; }.section-intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }.section-intro h2 { margin: 0; font-size: 1.55rem; }.section-intro > p { margin: 0; color: var(--muted); font-size: .87rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }.step-card { min-height: 145px; padding: 1.3rem 1.45rem; border: 1px solid var(--line); border-radius: 15px; background: #fff; }.step-index { display: flex; justify-content: space-between; color: #8eaa96; font-size: .72rem; font-weight: 700; letter-spacing: .08em; }.step-index span { color: #a4b8a6; font-size: 1rem; }.step-card h3 { margin: 1rem 0 .3rem; color: #254d3b; }.step-card p { margin: 0; color: var(--muted); font-size: .86rem; }
.auth-layout { max-width: 940px; min-height: 570px; margin: .5rem auto; display: grid; grid-template-columns: minmax(260px,.8fr) minmax(320px,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 18px 45px #254d3b0c; }
.auth-aside { display: flex; flex-direction: column; justify-content: space-between; padding: 2.2rem; background: #dfeee0; color: #1b5340; }.auth-aside-label,.auth-aside-bottom { display: flex; justify-content: space-between; color: #6d9278; font-size: .63rem; font-weight: 700; letter-spacing: .13em; }.auth-aside-bottom b { color: #b98440; font-size: 1rem; }.auth-aside-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 2rem; border-radius: 16px 16px 16px 4px; background: #fffdf3; font-family: serif; font-size: 1.5rem; }.auth-aside h1 { margin-bottom: 1rem; font-size: clamp(1.8rem,3vw,2.5rem); }.auth-aside p { color: #577967; font-size: .9rem; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem clamp(1.6rem,5vw,4.5rem); }.auth-panel h1 { font-size: 1.9rem; margin-bottom: .3rem; }.auth-back { align-self: flex-start; margin-bottom: 2rem; font-size: .8rem; color: var(--muted); text-decoration: none; }.auth-intro { margin-bottom: 1.7rem; color: var(--muted); font-size: .9rem; }.auth-form label { margin-bottom: 1rem; }.auth-form input,.auth-form select { margin-top: .35rem; }.auth-form small { display: block; margin-top: .25rem; font-weight: 400; }.auth-submit { width: 100%; justify-content: space-between !important; margin-top: .3rem; }.auth-switch { margin: 1.2rem 0 0; font-size: .86rem; color: var(--muted); }.auth-switch a { font-weight: 700; }
@media (max-width: 820px) { .welcome-hero { grid-template-columns: 1fr 300px; }.welcome-copy { padding: 2.3rem; }.welcome-visual { min-height: 350px; }.welcome-note { width: 73%; min-height: 270px; }.welcome-stamp { right: 6%; }.welcome-bubble { right: 2%; bottom: 13%; }.orbit-one { width: 250px; height: 250px; }.orbit-two { width: 310px; height: 310px; } }
@media (max-width: 600px) { .header-inner { gap: .55rem; }.main-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; max-width: 100%; padding-bottom: .15rem; gap: .25rem; white-space: nowrap; }.main-nav > a:not(.button) { padding: .4rem .55rem; }.welcome-hero { display: flex; flex-direction: column; }.welcome-copy { padding: 2rem 1.4rem .5rem; }.welcome-copy h1 { font-size: 2.6rem; }.welcome-copy > p:not(.welcome-footnote) { font-size: .91rem; }.welcome-footnote { margin-top: 1.5rem; font-size: .69rem; }.welcome-visual { min-height: 275px; }.welcome-note { width: 190px; min-height: 220px; padding: 1rem; }.note-big { margin-top: 1.2rem; font-size: 2.2rem; }.note-bottom { padding-top: .8rem; }.welcome-bubble { right: 7%; bottom: 12%; padding: .6rem .7rem; }.welcome-stamp { top: 9%; right: 19%; width: 48px; height: 48px; }.section-intro { align-items: start; flex-direction: column; gap: .4rem; }.steps-grid { grid-template-columns: 1fr; gap: .7rem; }.step-card { min-height: auto; padding: 1rem 1.2rem; }.step-card h3 { margin-top: .45rem; }.auth-layout { grid-template-columns: 1fr; min-height: 0; }.auth-aside { min-height: 180px; padding: 1.4rem; }.auth-aside-icon { display: none; }.auth-aside h1 { font-size: 1.65rem; margin: .5rem 0; }.auth-aside h1 br { display: none; }.auth-aside p { margin: 0; }.auth-aside-bottom { display: none; }.auth-panel { padding: 1.6rem 1.4rem 2rem; }.auth-back { margin-bottom: 1.3rem; }.page-shell { padding-inline: 1rem; } }
.auth-aside .auth-aside-title { margin-bottom: 1rem; color: #1b5340; font-size: clamp(1.8rem,3vw,2.5rem); line-height: 1.35; font-weight: 750; letter-spacing: -.035em; }
@media (max-width: 600px) { .auth-aside .auth-aside-title { font-size: 1.65rem; margin: .5rem 0; }.auth-aside .auth-aside-title br { display: none; } }
.demo-notice { margin-bottom:1rem; font-size:.85rem; }
@media (max-width:520px) { .demo-notice { padding:.55rem .7rem; font-size:.74rem; margin-bottom:.65rem; } }
