:root {
  --ground: #f4f5f2;
  --paper: #ffffff;
  --ink: #1c2624;
  --ink-2: #4a5654;
  --ink-3: #5c6764;
  --line: #dfe3de;
  --wood-light: #f0d9b5;
  --wood-dark: #b58863;
  --red: #c8372d;
  --red-soft: #fbe9e6;
  --amber: #965900;
  --amber-soft: #fdf1dc;
  --green: #22804f;
  --green-soft: #e3f3ea;
  --blue: #3554c7;
  --focus: #3554c7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 38, 36, .06), 0 8px 24px rgba(28, 38, 36, .07);
  --font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  font-variant-numeric: tabular-nums;
}
::selection { background: #f5d27a; color: var(--ink); }
html { scrollbar-color: #c3cac4 transparent; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
textarea {
  width: 100%;
  font: 14px/1.55 ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
  caret-color: var(--red);
}
textarea:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(53, 84, 199, .15); }
#notes { font-family: var(--font); font-size: 15px; }

/* 顶栏 */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1280px; margin: 0 auto; padding: 18px 24px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand::before {
  content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px;
  background: conic-gradient(var(--wood-dark) 0 25%, var(--wood-light) 0 50%, var(--wood-dark) 0 75%, var(--wood-light) 0);
  border-radius: 4px;
}
.top nav { display: flex; gap: 4px; }
.top nav a {
  color: var(--ink-2); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 15px;
}
.top nav a:hover { background: #e8ebe6; }
.top nav a.on { background: var(--ink); color: #fff; }

main { max-width: 1280px; margin: 0 auto; padding: 0 24px 80px; }
.loading, .empty { color: var(--ink-3); }
.warn { color: var(--amber); background: var(--amber-soft); padding: 10px 14px; border-radius: 10px; }
.bad { color: var(--red); }
.status { color: var(--ink-3); font-size: 14px; min-height: 1.4em; }
.link { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.hint { color: var(--ink-3); font-size: 13px; }

.primary {
  background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 28px; font-weight: 600; font-size: 16px;
  transition: transform .15s ease-out, background .15s;
}
.primary:hover:not(:disabled) { background: #2d3b38; }
.primary:active:not(:disabled) { transform: scale(.98); }

/* 新复盘 */
.home { max-width: 720px; margin: 24px auto 0; display: grid; gap: 22px; }
.intro h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; margin-bottom: 10px; }
.intro p { color: var(--ink-2); margin: 0 0 8px; max-width: 60ch; }
.field { display: grid; gap: 8px; }
.field > span { font-weight: 600; font-size: 15px; }
.field > .hint { margin-top: -4px; }
.peek { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 15px; color: var(--ink-2); }
.peek b { color: var(--ink); }
.seg { display: inline-flex; background: #e6e9e4; padding: 4px; border-radius: 999px; width: max-content; }
.seg button { border: 0; background: none; padding: 8px 22px; border-radius: 999px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-checked="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg button[data-color="w"]::before, .seg button[data-color="b"]::before {
  content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: -1px;
  border: 1.5px solid var(--ink);
}
.seg button[data-color="b"]::before { background: var(--ink); }
.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.progress { height: 6px; background: #e3e6e1; border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }

/* 复盘页：总览 */
.sheet {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 32px 20px; margin-top: 8px;
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.players { margin: 0 0 6px; color: var(--ink-3); font-size: 15px; }
.sheet h1 { font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -.02em; }
.why { font-size: 18px; margin: 16px 0 4px; max-width: 70ch; }
.praise { color: var(--green); margin: 0; max-width: 70ch; }
.result {
  flex: none; display: grid; place-items: center; min-width: 76px; padding: 10px 16px; border-radius: 12px;
  font-size: 24px; font-weight: 800; background: #eceeea; color: var(--ink-2); line-height: 1.1; text-align: center;
}
.result small { display: block; font-size: 12px; font-weight: 500; margin-top: 4px; }
.result.win { background: var(--green-soft); color: var(--green); }
.result.loss { background: var(--red-soft); color: var(--red); }
.result.sm { font-size: 14px; min-width: 0; padding: 2px 10px; border-radius: 99px; display: inline-block; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 22px 0 8px; border-top: 1px solid var(--line); }
.facts div { padding: 12px 0 0; }
.facts div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font-size: 22px; font-weight: 700; }
.facts dd small { font-size: 13px; font-weight: 500; color: var(--ink-3); }

.curve { margin: 14px 0 0; }
.curve .plot { position: relative; height: 120px; cursor: pointer; }
.curve svg { display: block; width: 100%; height: 100%; }
.curve .area.up { fill: var(--green-soft); }
.curve .area.down { fill: var(--red-soft); }
.curve .mid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.curve .line { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.curve .cursor { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--blue); pointer-events: none; transition: left .2s cubic-bezier(.16, 1, .3, 1); }
.curve .cursor.dim { opacity: .45; }
.curve .cursor i {
  position: absolute; left: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue);
  transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--paper); transition: top .2s cubic-bezier(.16, 1, .3, 1);
}
.curve .mark {
  position: absolute; width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 3px solid currentColor; background: var(--paper);
  transform: translate(-50%, -50%); transition: transform .15s;
}
.curve .mark::before { content: ""; position: absolute; inset: -8px; }
.curve .mark:hover, .curve .mark:focus-visible { transform: translate(-50%, -50%) scale(1.3); }
.curve .mark.on { background: currentColor; transform: translate(-50%, -50%) scale(1.35); }
.curve .mark.blunder { color: var(--red); }
.curve .mark.mistake { color: var(--amber); }
.curve .mark.good { color: var(--green); }
@media (prefers-reduced-motion: reduce) { .curve .cursor, .curve .cursor i { transition: none; } }
.curve figcaption span:first-child, .curve figcaption span:last-child { white-space: nowrap; }
.curve figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* 复盘页：工作台 */
.workbench { display: grid; grid-template-columns: minmax(320px, 520px) minmax(0, 1fr); gap: 32px; margin-top: 28px; align-items: start; }
.board-pane { position: sticky; top: 16px; max-width: calc(100vh - 330px); min-width: 320px; }
.linebar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 10px; padding: 8px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
}
.linebar .link { color: #fff; font-size: 14px; }
.board-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
.evalbar {
  position: relative; border-radius: 6px; overflow: hidden; background: #3a3632;
  box-shadow: 0 2px 4px rgba(60, 40, 20, .12);
}
.evalbar.kid-b { background: #f4f1ea; }
.evalbar i { position: absolute; left: 0; right: 0; background: #f4f1ea; transition: height .35s cubic-bezier(.16, 1, .3, 1); }
.evalbar.kid-b i { background: #3a3632; }
.evalbar.bottom i { bottom: 0; }
.evalbar.top i { top: 0; }
.evalbar::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(200, 55, 45, .7); }
.evalbar span { position: absolute; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; }
.evalbar.bottom span.kid, .evalbar.top span.opp { bottom: 4px; }
.evalbar.bottom span.opp, .evalbar.top span.kid { top: 4px; }
.evalbar.kid-w span.kid, .evalbar.kid-b span.opp { color: #3a3632; }
.evalbar.kid-w span.opp, .evalbar.kid-b span.kid { color: #f4f1ea; }
@media (prefers-reduced-motion: reduce) { .evalbar i { transition: none; } }
.curve .branch { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: .55; }
.curve .branch.try { opacity: 1; stroke-width: 3.5; stroke-dasharray: none; stroke-linecap: round; }
.board-box {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(60, 40, 20, .12), 0 16px 40px rgba(60, 40, 20, .16);
}
.board-box .board { position: absolute; inset: 0; }
.board-box .cg-wrap { width: 100%; height: 100%; }
/* 坐标字再大一点，6 岁孩子也看得清 */
.board-box coords { font-size: 11px; font-weight: 700; }
.board-box cg-board square.move-dest { background: radial-gradient(rgba(20, 85, 30, .45) 22%, transparent 23%); }
.board-box cg-board square.oc.move-dest { background: radial-gradient(transparent 0%, transparent 79%, rgba(20, 85, 30, .35) 80%); }
.tip {
  position: relative; margin: 10px 0 -4px; padding: 8px 14px; border-radius: 10px; background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600; animation: rise .2s ease-out;
}
.board-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 2px 0; }
.board-hint .hint { margin: 0; }
.flip {
  flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink-2); border-radius: 999px; padding: 5px 12px 5px 8px; font-size: 13px; font-weight: 600;
}
.flip:hover { border-color: var(--ink-3); color: var(--ink); }
.caption { font-size: 22px; font-weight: 600; line-height: 1.45; min-height: 2.9em; margin: 18px 4px 10px; text-wrap: pretty; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper button {
  height: 52px; padding: 0 20px 0 14px; border-radius: 999px; border: 0; background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 16px; transition: transform .12s ease-out, background .15s;
}
.stepper #next { padding: 0 14px 0 20px; }
.stepper button:hover:not(:disabled) { background: #2d3b38; }
.stepper button:active:not(:disabled) { transform: scale(.96); }
.stepper button:disabled { background: #c3cac4; opacity: 1; }
.stepper > span { text-align: center; color: var(--ink-3); font-size: 14px; }

.side { display: grid; gap: 14px; align-content: start; }
.kstrip { display: flex; flex-wrap: wrap; gap: 6px; }
.kstrip button {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 6px 12px 5px;
  font-weight: 600; font-size: 14px; text-align: left; line-height: 1.3; transition: border-color .15s, background .15s;
}
.kstrip button small { display: block; font-size: 12px; font-weight: 600; }
.kstrip .blunder small { color: var(--red); }
.kstrip .mistake small { color: var(--amber); }
.kstrip .good small { color: var(--green); }
.kstrip button:hover { border-color: var(--ink-3); }
.kstrip button.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.kstrip button.on small { color: #fff; opacity: .85; }
.ctx { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; }
.ctx-step { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.ctx-move { margin: 0 0 10px; font-size: 18px; line-height: 1.6; }
.ctx-move b { margin-right: 8px; }
.ctx-move .tag { margin-left: 8px; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 99px; vertical-align: 2px; }
.ctx-move .tag.blunder { background: var(--red-soft); color: var(--red); }
.ctx-move .tag.mistake { background: var(--amber-soft); color: var(--amber); }
.ctx-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ghost-btn { border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; }
.ghost-btn:hover { border-color: var(--ink-3); }
.moment, .ctx { animation: rise .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .moment, .ctx { animation: none; } }
.moment {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px 16px; position: relative;
}
.moment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.moment .mv { font-weight: 700; font-size: 15px; }
.moment .tag { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 99px; }
.moment.blunder .tag { background: var(--red-soft); color: var(--red); }
.moment.mistake .tag { background: var(--amber-soft); color: var(--amber); }
.moment.good .tag { background: var(--green-soft); color: var(--green); }
.turning { font-size: 13px; font-weight: 700; color: #fff; background: var(--red); padding: 2px 10px; border-radius: 99px; }
.moment h3 { font-size: 24px; margin: 10px 0 10px; letter-spacing: -.01em; }
.ask { font-size: 20px; font-weight: 600; margin: 0 0 14px; line-height: 1.5; }
.ask span { display: block; font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 2px; }
.kid { font-size: 20px; line-height: 1.6; margin: 0 0 10px; max-width: 34em; }
.lesson { font-size: 17px; font-weight: 700; margin: 0 0 6px; padding: 10px 14px; border-radius: 10px; background: #f1f3ef; }
.moment.good .kid { margin-bottom: 14px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.btns button {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 16px;
  font-weight: 600; font-size: 15px; transition: border-color .15s, background .15s;
}
.btns button:hover { border-color: var(--ink-3); }
.btns button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.btns [data-show="played"].on { background: var(--red); border-color: var(--red); }
.btns [data-show="best"].on, .moment.good .btns [data-show="played"].on { background: var(--green); border-color: var(--green); }
.reveal-btn { font-size: 14px; margin-bottom: 8px; }
.reveal { animation: rise .35s cubic-bezier(.16, 1, .3, 1); }
.parent { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; color: var(--ink-2); font-size: 15px; }
.parent summary { cursor: pointer; font-weight: 600; color: var(--ink-3); font-size: 14px; width: max-content; list-style: none; }
.parent summary::-webkit-details-marker { display: none; }
.parent summary::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform .15s ease-out; margin: 0 10px 2px 2px; vertical-align: middle;
}
.parent[open] summary::before { transform: rotate(45deg); }
.parent summary:hover { color: var(--ink); }
.parent p { margin: 10px 0; max-width: 70ch; }
.parent ul { margin: 8px 0; padding-left: 20px; }
.parent li { margin: 4px 0; }
.meta { font-size: 13px; color: var(--ink-3); }

/* 追问 */
.chat { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.chat-log { display: grid; gap: 8px; margin-bottom: 10px; }
.chat-log:empty { display: none; }
.chat-log .q { justify-self: end; max-width: 85%; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 16px 16px 4px 16px; font-size: 15px; }
.chat-log .a { max-width: 92%; background: #f1f3ef; padding: 10px 14px; border-radius: 16px 16px 16px 4px; font-size: 16px; line-height: 1.65; white-space: pre-wrap; }
.chat-log .a.pending { color: var(--ink-3); animation: breathe 1.6s ease-in-out infinite; }
.chat-log .a.bad { background: var(--red-soft); color: var(--red); }
@keyframes breathe { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .chat-log .a.pending { animation: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); caret-color: var(--red);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; background: var(--paper);
}
.chat-form input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(53, 84, 199, .15); }
.chat-form input:disabled { background: #f4f5f2; }
.primary.sm { padding: 9px 20px; font-size: 15px; }

.after { max-width: 980px; margin-top: 28px; }
.plan-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 900px) { .plan-cols { grid-template-columns: 1fr; } }
.plan { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; }
.plan h2 { font-size: 22px; margin-bottom: 12px; }
.plan h3 { font-size: 16px; margin: 20px 0 6px; }
.plan ul { margin: 0; padding-left: 20px; max-width: 70ch; }
.plan li { margin: 6px 0; }
.ptype { margin: 0; max-width: 70ch; }
.ptype b { display: inline-block; margin-right: 10px; padding: 1px 10px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 14px; }
.plan textarea { margin-top: 4px; }

.movelist {
  list-style: none; margin: 14px 0 0; padding: 8px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0 10px;
  max-height: 136px; overflow-y: auto; background: var(--paper); border-radius: 10px; box-shadow: var(--shadow); transition: opacity .2s;
}
.movelist.dim { opacity: .55; }
.movelist li { display: grid; grid-template-columns: 30px 1fr 1fr; align-items: center; }
.movelist .no { color: var(--ink-3); font-size: 13px; }
.movelist button { border: 0; background: none; text-align: left; padding: 3px 6px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.movelist button.next { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.movelist button:hover { background: #eef0ec; }
.movelist button.cur { background: var(--ink); color: #fff; }
.movelist button.key::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-left: 4px; vertical-align: 3px; }
.movelist .sev-blunder { color: var(--red); font-weight: 800; }
.movelist .sev-mistake { color: var(--amber); font-weight: 700; }
.movelist .sev-inacc { text-decoration: underline dotted var(--ink-3); text-underline-offset: 4px; }
.danger-zone { text-align: right; font-size: 13px; }
.danger-zone .link { color: var(--ink-3); }

/* 复盘记录 */
.history h1, .growth h1 { font-size: 30px; margin: 12px 0 20px; letter-spacing: -.02em; }
.history table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.history th { text-align: left; font-size: 13px; color: var(--ink-3); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.history td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.history tr:last-child td { border-bottom: 0; }
.history tbody tr { cursor: pointer; transition: background .12s; }
.history tbody tr:hover { background: #f7f8f6; }
.history td small { display: block; color: var(--ink-3); font-size: 13px; }
.history .hl { color: var(--ink-2); }
.history .num { white-space: nowrap; }

/* 成长记录 */
.growth .lead { font-size: 18px; color: var(--ink-2); max-width: 70ch; margin: -6px 0 24px; }
.growth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.growth-grid > section, .trend { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; }
.growth h2 { font-size: 20px; margin-bottom: 14px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 7em 1fr 2em; align-items: center; gap: 10px; }
.bars i { display: block; height: 12px; width: var(--w); background: #9aa49f; border-radius: 99px; min-width: 6px; }
.bars li:first-child i { background: var(--red); }
.bars b { text-align: right; }
.acc { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 8px; height: 170px; border-bottom: 1px solid var(--line); }
.acc li { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; max-width: 36px; position: relative; }
.acc i { display: block; width: 100%; max-height: calc(100% - 22px); height: var(--h); background: #c3cbc4; border-radius: 6px 6px 0 0; }
.acc li:last-child i { background: var(--ink-2); }
.acc b { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.acc span { position: absolute; bottom: -22px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.acc li.win span { color: var(--green); }
.acc li.loss span { color: var(--red); }
.acc + .hint { margin-top: 30px; }
.trend { margin-top: 20px; }
.trend-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.trend-head h2 { margin: 0; }
.trend > div > p { max-width: 70ch; }
.trend-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trend-cols h3 { font-size: 15px; margin: 8px 0 4px; }
.trend-cols ul { padding-left: 18px; margin: 0; }
.kidmsg { font-size: 20px; font-weight: 600; padding: 14px 18px; background: var(--green-soft); border-radius: 12px; color: #155c38; }

@media (max-width: 900px) {
  main { padding: 0 16px 60px; }
  .top { padding: 14px 16px; flex-wrap: wrap; }
  .sheet { padding: 20px; }
  .sheet-head { flex-direction: column-reverse; gap: 12px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .workbench { grid-template-columns: 1fr; gap: 20px; }
  .board-pane { position: static; max-width: none; min-width: 0; }
  .stepper button { height: 48px; font-size: 15px; white-space: nowrap; padding: 0 16px 0 10px; }
  .stepper #next { padding: 0 10px 0 16px; }
  .stepper > span { font-size: 13px; white-space: nowrap; }
  .caption { font-size: 19px; }
  .moment { padding: 18px; }
  .growth-grid, .trend-cols { grid-template-columns: 1fr; }
  .history table, .history thead, .history tbody { display: block; }
  .history thead { display: none; }
  .history tr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .history tr:last-child { border-bottom: 0; }
  .history td { border: 0; padding: 0; }
  .history td:nth-child(1) { grid-column: 1; grid-row: 1; color: var(--ink-3); font-size: 14px; }
  .history td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .history td:nth-child(4) { grid-column: 3; grid-row: 1; font-weight: 700; }
  .history td:nth-child(2), .history td:nth-child(5), .history td:nth-child(6) { grid-column: 1 / -1; }
  .history td:nth-child(2) { font-weight: 600; }
  .history td:nth-child(2) small { display: inline; margin-left: 8px; font-weight: 400; }
  .history td:nth-child(5) { font-size: 14px; color: var(--ink-3); }
}

/* 练习作业 */
.hw-link { display: flex; align-items: center; gap: 14px; margin: 18px 0 0; }
.hw-link .primary { text-decoration: none; display: inline-block; }
.hw-link span { color: var(--ink-3); font-size: 14px; }
.hw-head { margin: 8px 0 4px; }
.hw-head .back { font-size: 14px; color: var(--ink-3); text-decoration: none; }
.hw-head .back:hover { color: var(--ink); }
.hw-head h1 { font-size: 30px; margin: 8px 0 8px; letter-spacing: -.02em; }
.hw-head .lead { color: var(--ink-2); margin: 0 0 8px; max-width: 70ch; }
.caption.good { color: var(--green); }
.caption.bad { color: var(--red); }
.hw-controls button.ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); padding: 0 20px; }
.hw-controls button.ghost:hover:not(:disabled) { background: #f1f3ef; }
.hw-controls button.ghost:disabled { background: var(--paper); color: var(--ink-3); opacity: .6; }
.hw-side { display: grid; gap: 18px; align-content: start; }
.hw-list { list-style: none; margin: 0; padding: 6px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 2px; }
.hw-list button {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 0; background: none;
  padding: 10px 12px; border-radius: 10px; transition: background .12s;
}
.hw-list button:hover { background: #f4f5f2; }
.hw-list button.cur { background: #eceeea; }
.hw-list .n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; background: #eceeea; color: var(--ink-2);
}
.hw-list button.cur .n { background: var(--ink); color: #fff; }
.hw-list button.done .n { background: var(--green); color: #fff; }
.hw-list button.gave .n { background: var(--amber-soft); color: var(--amber); }
.hw-list .t { display: grid; }
.hw-list .t b { font-weight: 600; }
.hw-list .t small { color: var(--ink-3); font-size: 13px; }
