/* 作业助手 · 家长页面样式（孩子端用 kid.css）
   和孩子端同一套设计语言（docs/05-界面规范.md v4）：纸底 + 墨色文字、马卡龙色只表示状态、留白克制
   规则：颜色、字号、圆角只用下面的变量；每屏一个墨色实心主按钮；字号不小于 12px；文字对比度 ≥ 4.5；手机 390 宽不横向滚动 */

/* ============ 1. 变量 ============ */
/* ==== 令牌兼容副本：由 scripts/sync-style-tokens.js 从 ui/tokens.css 生成，别手改；改令牌改 tokens.css 再跑这个脚本 ==== */
:root {
  --bg: #F7F5F1; --paper: #FFFEFC; --line: #ECE9E3; --line2: #DCD8D0; --line-ctl: #8A857C;
  --ink: #2E2E2E; --on-ink: #fff; --t2: #4A4843; --quiet: #5F5D58; --t3: #6F6C66; --t4: #BDB9B1;
  --hw: #2E2E2E; --hw-bg: #EDEBE6; --brand: #1F1F1F; --accent: #F2A48C; --accent-ink: #C8664A;
  --accent-bg: #FCE6DE; --ok: #3F6B55; --ok-bg: #EDEBE6; --warn: #7F5518; --warn-bg: #FCE6DE;
  --bad: #9E3B4D; --bad-bg: #FCE6DE; --accent-text: #A84E35; --warn-text: #8A5A12;
  --bad-text: #A84E35; --mint: #D3EDE1; --lav: #E3DDF6; --sky: #D6E8F6; --lemon: #FAF0BC;
  --peach: #FBDFD0; --pink: #F7D6DF;
  --lift: 0 1px 2px rgba(60, 50, 40, .04), 0 6px 18px rgba(60, 50, 40, .05);
  --card-shadow: 0 1px 2px rgba(40, 34, 24, .04), 0 10px 30px rgba(40, 34, 24, .07);
  --scrim: rgba(40, 36, 30, .35); --fs-34: 2.125rem; --fs-28: 1.75rem; --fs-22: 1.375rem;
  --fs-20: 1.25rem; --fs-17: 1.0625rem; --fs-15: 0.9375rem; --fs-13: 0.8125rem; --fs-12: 0.75rem;
  --fs-large-title: var(--fs-34); --fs-title: var(--fs-28); --fs-title-2: var(--fs-22);
  --fs-title-3: var(--fs-20); --fs-body: var(--fs-17); --fs-callout: var(--fs-15);
  --fs-footnote: var(--fs-13); --fs-caption: var(--fs-12); --f1: var(--fs-22); --f2: var(--fs-17);
  --f3: var(--fs-15); --f4: var(--fs-13); --f5: var(--fs-12);
  --fx: clamp(1.75rem, 1.275rem + 3.487vmin, 2.75rem); --sp-1: 8px; --sp-2: 16px; --sp-3: 24px;
  --sp-4: 32px; --sp-5: 40px; --sp-6: 48px; --sp-half: 4px; --sp: 16px; --sp-s: 10px; --r-card: 16px;
  --r-btn: 12px; --r-sheet: 20px; --tap: 44px; --tap-main: 56px; --t-move: .34s; --t-fast: .2s;
  --ease: cubic-bezier(.2, .8, .2, 1); --z-bar: 10; --z-float: 15; --z-wait: 18; --z-toast: 20;
  --z-sheet: 30; --z-listen: 50; --z-dim: 55; --z-lock: 60; --z-boot: 70; --z-dialog: 80;
}
/* ==== 兼容副本结束 ==== */

/* ============ 2. 基础 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--bg); color: var(--ink); font-size: var(--f3); line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
b, strong { font-weight: 700; }
img { max-width: 100%; }
.hidden { display: none !important; }
.note { font-size: var(--f4); color: var(--quiet); line-height: 1.5; }
.small { font-size: var(--f5); color: var(--t3); }
.err { color: var(--bad-text); }
.num { font-variant-numeric: tabular-nums; }
svg { display: block; flex: 0 0 auto; }

/* ============ 3. 骨架：标题、一级标签、「更多」 ============ */
.parent { max-width: 760px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) var(--sp) 96px; }
.phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px 12px; }
.phead h1 { font-size: var(--f1); margin: 0; font-weight: 700; white-space: nowrap; }
.phead > button { white-space: nowrap; flex: 0 0 auto; }
.kidsel { appearance: none; -webkit-appearance: none; border: 0; background: var(--paper); box-shadow: var(--lift); border-radius: 999px;
  font: inherit; font-size: var(--f4); color: var(--ink); min-height: 36px; padding: 0 14px; max-width: min(60%, 240px); }

.tabs { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 4px;
  background: var(--line); border-radius: 14px; margin: 0 0 var(--sp); }
.tabs button { border: 0; background: none; border-radius: 10px; min-height: var(--tap); padding: 0 2px; font-size: var(--f4); color: var(--quiet);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs button.on { background: var(--paper); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tabs .more::after { content: ' ▾'; font-size: var(--f5); }

/* 「更多」面板 .moresheet：在 ui/overlay.css */

/* ============ 4. 卡片、小标题 ============ */
.card { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--lift); padding: var(--sp); margin-bottom: 12px; min-width: 0; }
.card.flat { box-shadow: none; background: transparent; padding: 4px; }
.card .meta, .meta { font-size: var(--f4); color: var(--quiet); margin-bottom: 6px; }
.sect { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 4px 8px; }
.sect h2 { font-size: var(--f2); margin: 0; font-weight: 700; }
.sect .small { white-space: nowrap; }
.empty { text-align: center; padding: 28px var(--sp); color: var(--quiet); }
.lead { font-size: var(--f2); font-weight: 700; margin: 0 0 4px; }

/* ============ 5. 表单 ============ */
.parent textarea, .parent input[type=text], .parent input[type=number], .parent select {
  width: 100%; font: inherit; font-size: var(--f3); color: var(--ink); padding: 10px 12px; min-height: var(--tap);
  border: 1px solid var(--line-ctl); border-radius: var(--r-btn); background: var(--paper); }
.parent textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.parent textarea:focus, .parent input:focus, .parent select:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.parent input[type=number] { width: 72px; display: inline-block; padding: 6px 8px; min-height: 36px; text-align: center; }
.field { margin-top: 10px; }
.field > label { display: block; font-size: var(--f4); color: var(--quiet); margin-bottom: 4px; }
.frow { display: flex; gap: 8px; margin-top: 10px; }
.frow > * { min-width: 0; }
/* 选文件：原生控件藏起来，整块虚线框可点 */
.filepick { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 56px; padding: 10px 14px; border: 1.5px dashed var(--line-ctl);
  border-radius: var(--r-btn); color: var(--quiet); font-size: var(--f4); cursor: pointer; position: relative; }
.filepick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.filepick b { color: var(--ink); font-size: var(--f3); }
.filepick.has { border-style: solid; border-color: var(--ink); color: var(--ink); }

/* ============ 6. 按钮三级 ============ */
.pri, .sec, .soft { border: 0; border-radius: var(--r-btn); min-height: var(--tap); font-size: var(--f3); padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pri { background: var(--ink); color: var(--on-ink, #fff); font-weight: 700; min-height: var(--tap-main); }
.sec { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.soft { background: var(--bg); color: var(--ink); }
.pri:active, .sec:active, .soft:active, .ibtn:active, .chip:active { transform: scale(.97); }
.pri:disabled, .sec:disabled { opacity: .45; cursor: default; }
.block { width: 100%; margin-top: 12px; }
.link { border: 0; background: none; padding: 6px 2px; color: var(--quiet); font-size: var(--f4); text-decoration: underline; text-underline-offset: 3px; min-height: var(--tap); }
.link.danger { color: var(--bad-text); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
/* 图标按钮（行右边的操作） */
.ibtn { width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: none; color: var(--quiet); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ibtn svg { width: 20px; height: 20px; }
.ibtn.tick { color: var(--t3); }
.ibtn.tick svg { width: 28px; height: 28px; }
.ibtn.tick.on { color: var(--ok); }

/* ============ 7. 列表行（一项一行，操作在右边） ============ */
/* 行：.row / .nrow / .set / .gi / .urow / .addrow / .chev 都在 ui/row.css（10-26 组件化，和孩子端 .srow 一份） */
.list { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--lift); overflow: hidden; margin-bottom: 12px; }
.tag { display: inline-block; font-size: var(--f5); line-height: 1.6; padding: 0 8px; border-radius: 999px; background: var(--bg); color: var(--ink); margin-right: 6px; white-space: nowrap; vertical-align: 1px; }
.tag.mint { background: var(--mint); } .tag.lav { background: var(--lav); } .tag.sky { background: var(--sky); }
.tag.lemon { background: var(--lemon); } .tag.peach { background: var(--peach); } .tag.pink { background: var(--pink); }

/* ============ 8. 筛选（判题） ============ */
.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; border-radius: 999px; min-height: 36px; padding: 0 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-ctl); font-size: var(--f4); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--on-ink, #fff); box-shadow: none; font-weight: 700; }
.chip .n { font-size: var(--f5); opacity: .75; margin-left: 4px; }
.filters select { max-width: 240px; }

/* 判题：一题一块 */
.qitem { border-top: 1px solid var(--line); padding: 10px 0; }
.qitem:first-of-type { border-top: 0; }
.qhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qhead .q { flex: 1; min-width: 0; color: var(--quiet); font-size: var(--f4); overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: 5.5em 1fr; gap: 2px 8px; margin-top: 6px; font-size: var(--f4); }
.kv dt { color: var(--t3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd.secret { background: var(--bg); border-radius: 6px; padding: 0 6px; }
.v { display: inline-block; font-size: var(--f5); font-weight: 700; line-height: 1.7; padding: 0 10px; border-radius: 999px; }
.v-对 { background: var(--mint); } .v-错 { background: var(--pink); } .v-存疑 { background: var(--lemon); }

/* ============ 9. 图片 ============ */
.thumb { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--line); margin: 8px 0; object-fit: contain; background: var(--bg); }
.media { display: flex; gap: 12px; align-items: flex-start; }
.media .pic { width: 96px; flex: 0 0 96px; position: relative; }
.media .pic img { width: 96px; height: 128px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.media .body { flex: 1; min-width: 0; }
canvas.crop { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); margin-top: 8px; }

/* 扫描件：右上角的圆形勾选 */
.pick { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 90%, transparent); box-shadow: inset 0 0 0 2px var(--ink); cursor: pointer; }
.pick:checked { background: var(--ink); }
.pick:checked::after { content: ''; position: absolute; left: 10px; top: 5px; width: 6px; height: 12px; border: solid var(--on-ink, #fff); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.pick:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.scan-tasks { margin-top: 12px; border-radius: 10px; background: var(--bg); padding: 6px 10px; }
.scan-tasks .ttl { font-size: var(--f4); }
.selbar { position: sticky; bottom: 12px; z-index: 8; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.selbar .note { flex: 1 1 100%; }

/* ============ 10. 设置：一行一个开关 ============ */
.sw { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--t4); position: relative; flex: 0 0 auto; margin: 0; cursor: pointer; transition: background .15s; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); transition: left .15s; }
.sw:checked { background: var(--ink); }
.sw:checked::after { left: 23px; }
.sw:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* 保存反馈：控件旁边变成「已保存 ✓」再淡出 */
.saved { font-size: var(--f5); font-weight: 700; color: var(--ok); white-space: nowrap; opacity: 0; transition: opacity .6s; pointer-events: none; }
.saved.show { opacity: 1; transition: none; }
.saved.bad { color: var(--bad-text); }
.inl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.inl input[type=text] { width: 9em; }
.inl select { width: auto; }
audio { width: 100%; height: 40px; margin-top: 8px; }

/* ============ 11. 对话、背诵 ============ */
/* 对话气泡改叫 .chatb（10-26：孩子端的 .bubble 是提示气泡，同名，现在两端共用 ui/overlay.css 不能撞） */
.chatb { max-width: 86%; padding: 8px 12px; border-radius: 14px; margin: 6px 0; overflow-wrap: anywhere; }
.chatb.kid { background: var(--sky); margin-left: auto; border-bottom-right-radius: 4px; }
.chatb.ai { background: var(--paper); box-shadow: var(--lift); border-bottom-left-radius: 4px; }
.chatb .small { display: block; margin-top: 2px; }
.weak { background: var(--pink); border-radius: 4px; padding: 0 3px; }
.sent { padding: 6px 0; border-top: 1px solid var(--line); display: flex; align-items: flex-start; gap: 10px; }
.sent:first-child { border-top: 0; }
.sent .no { color: var(--t3); font-size: var(--f5); min-width: 1.6em; white-space: nowrap; flex: 0 0 auto; padding-top: 2px; }
.sent .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sent.miss .txt { background: var(--lemon); border-radius: 4px; padding: 0 4px; }
details summary { cursor: pointer; font-size: var(--f4); color: var(--quiet); min-height: 32px; display: flex; align-items: center; }
details[open] summary { margin-bottom: 6px; }
.big { font-size: var(--f1); font-weight: 700; line-height: 1.2; }

/* ============ 12. 提示条（底部，几秒后自己消失） ============ */
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 30; max-width: min(92vw, 560px);
  background: var(--ink); color: var(--on-ink, #fff); border-radius: 14px; padding: 12px 16px; font-size: var(--f4); box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.err { background: var(--bad); }

/* 印出来的练习纸预览 */
iframe.ws { display: block; width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; background: #fff; } /* 印出来的纸：夜里也是白的 */

/* 家长页「数据存在哪」：选存储、填地址和密钥 */
.radios { display: grid; gap: 6px; margin: 10px 0 6px; }
.radio { display: flex; align-items: center; gap: 8px; min-height: var(--tap); font-size: var(--f3, 1rem); }
.radio input { width: 20px; height: 20px; }
.radio input:disabled + * , .radio:has(input:disabled) { color: var(--t3, #8a877f); }
.card .fld { display: block; margin-top: 10px; font-size: var(--f4, .9375rem); color: var(--quiet, #5F5D58); }
.card .fld input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line-ctl); border-radius: 12px; font: inherit; font-size: 1rem; color: var(--ink, #2E2E2E); background: var(--on-ink, #fff); }
.card .fld .small { display: block; margin-top: 3px; }
/* 家长页课程表：一周一张表，每格一个输入框 */
.ttedit { overflow-x: auto; margin: 10px -4px; }
.ttedit table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.ttedit th:first-child { width: 50px; }
.ttedit th { font-size: var(--f5); color: var(--quiet); font-weight: 600; padding: 4px 2px; text-align: center; }
.ttedit th input { display: block; width: 46px; margin-top: 2px; padding: 3px 4px; font-size: var(--fs-12); border: 1px solid var(--line-ctl); border-radius: 6px; background: var(--paper, #fff); color: var(--t3); }
.ttedit td { padding: 2px; }
.ttedit td input { width: 100%; min-width: 0; padding: 7px 2px; border: 1px solid var(--line-ctl); border-radius: 8px; text-align: center; font: inherit; background: var(--paper, #fff); }
.ttoff { gap: 6px; align-items: center; margin-top: 6px; }
.ttoff input { min-width: 0; flex: 1; padding: 8px; border: 1px solid var(--line-ctl); border-radius: 10px; font: inherit; background: var(--paper, #fff); }
.ttoff { flex-wrap: wrap; }
.ttoff input[data-off="name"] { flex: 1 1 100%; }
.ttoff input[type="date"] { flex: 1 1 38%; }

/* ---- 家长页和孩子页对齐（2026-10-24）：顶栏、底部导航、「更多」都按孩子页的样子 ---- */
.parent { padding: 0 calc(1.1 * var(--sp)) calc(96px + env(safe-area-inset-bottom)); max-width: 560px; }
.phead { position: sticky; top: 0; z-index: 9; background: var(--bg); margin: 0 calc(-1.1 * var(--sp)) 4px; min-height: 52px;
  padding: max(12px, env(safe-area-inset-top)) calc(1.1 * var(--sp) + 4px) 8px; gap: 8px; }
/* 10-27：家长顶栏毛玻璃。不支持模糊时下面的 @supports 把底色改回实色 */
.phead { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .phead { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.phello { display: flex; align-items: center; min-width: 0; flex: 1; }
.phead .dot { display: none !important; }
.phead h1 { font-size: var(--fs-title, 28px); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.phead .kidsel, .phead > button { min-height: var(--tap); box-shadow: inset 0 0 0 1px var(--line-ctl); background: var(--paper); font-size: var(--fs-footnote, 13px); font-weight: 600; padding: 0 14px; border: 0; border-radius: 999px; color: var(--ink); }
.phead .kidsel { max-width: 46%; }
.tabs { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 0; margin: 0; border-radius: 0;
  padding: 6px 12px max(8px, env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; padding: 2px 0;
  border-radius: 0; background: none; box-shadow: none; color: var(--t3); font-size: var(--fs-caption, 12px); position: relative; transition: color .15s ease; }
.tabs button.on { background: none; box-shadow: none; color: var(--ink); font-weight: 700; }
.tabs button.on::after { content: ''; position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); }
.tabs .ti svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs .more::after { content: none; }

.phead .picon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line2);
  display: flex; align-items: center; justify-content: center; color: var(--ink); padding: 0; }
.phead .picon svg { width: 18px; height: 18px; }
.phead:has(.picon) .kidsel { max-width: 38%; }
/* 切换模式胶囊按钮：温润边框药丸，深浅色自适应，不突兀刺眼 */
.phead .pgive { flex: 0 0 auto; min-height: var(--tap); padding: 0 14px; border: 1px solid var(--line-ctl); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-footnote, 13px); font-weight: 600; white-space: nowrap; box-shadow: var(--lift); transition: all .12s ease; }
.phead .pgive:active { background: var(--line); }
.phead:has(.pgive) .kidsel { max-width: 34%; }

/* 骨架屏：要等数据的页面先画出大概样子（灰块，轻微流光），数据到了换成真的。系统设了「减少动态效果」就不流光 */
.skel { display: block; background: linear-gradient(90deg, var(--line) 25%, color-mix(in srgb, var(--line) 45%, var(--paper)) 50%, var(--line) 75%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
/* 图片还没取到（03-cache.js 的 data-wait）：占位透明小图下面露出骨架；取不到就停在静止的骨架，不出现破图标 */
img[data-wait] { background: linear-gradient(90deg, var(--line) 25%, color-mix(in srgb, var(--line) 45%, var(--paper)) 50%, var(--line) 75%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .skel, img[data-wait] { animation: none; } }
.skel-line { height: 14px; margin: 8px 0; width: 80%; }
.skel-line.short { width: 45%; }
.skel-title { height: 22px; width: 40%; margin: 4px 0 14px; }

/* ============ 家长端改版（10-25，docs/05）：今天 / 用户 / 报告 / 书架 / 家庭 ============
   一页一事；内容区只放信息，主按钮在底部操作栏（每屏一个）；一组意思一张纸，组里用细线分行；马卡龙色只表示状态 */
.phead .back { margin-left: -6px; margin-right: 2px; box-shadow: none; background: none; }
#pTools { display: flex; gap: 6px; flex: 0 0 auto; }
.parent .hello { padding: 4px 4px 14px; }
.parent .hello .g { font-size: calc(var(--f1) * 1.25); font-weight: 700; line-height: 1.3; }
.parent .hello .note { margin-top: 2px; }
/* 主卡：一页最多一张，颜色表示状态（柠檬 = 要留意、薄荷 = 没事、薰衣草 = 画像这类中性信息） */
.pcard { border-radius: 22px; padding: 16px 18px; margin-bottom: 8px; color: var(--ink); }
.pcard.lemon { background: var(--lemon); } .pcard.mint { background: var(--mint); } .pcard.lav { background: var(--lav); }
.pcard .lb { font-size: var(--f5); color: color-mix(in srgb, var(--ink) 72%, transparent); }
.pcard .tt { font-size: var(--f2); font-weight: 700; margin: 2px 0; line-height: 1.4; }
.pcard .lb2 { font-size: var(--f4); color: color-mix(in srgb, var(--ink) 78%, transparent); }
.pcard .pill { margin-top: 12px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-ink, #fff); font-weight: 700; min-height: var(--tap); padding: 0 26px; }
.pcard .psec { margin-top: 10px; }
.pcard .pit { margin-top: 2px; line-height: 1.5; }
.pcard .why { font-size: var(--f4); color: color-mix(in srgb, var(--ink) 72%, transparent); }
/* 可以点的行（.nrow）、行尾箭头 .chev：在 ui/row.css */
.trialtag { margin-left: 8px; border: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: var(--f5); padding: 2px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); vertical-align: 1px; }
.parent .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--line-ctl); }
.parent .dot.ok { background: var(--ok); } .parent .dot.warn { background: #B07F3A; } .parent .dot.bad { background: var(--bad); } .parent .dot.info { background: var(--quiet); }
.ava { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.ttl.quote { font-size: var(--f2); line-height: 1.6; }
/* 一组设置 = 一张纸，组里一行一个（细线分开；.gi / .urow / .addrow 在 ui/row.css） */
.group { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--lift); overflow: hidden; margin-bottom: 12px; }
.parent input[type=password] { width: 100%; font: inherit; font-size: var(--f3); color: var(--ink); padding: 10px 12px; min-height: var(--tap);
  border: 1px solid var(--line-ctl); border-radius: var(--r-btn); background: var(--paper); letter-spacing: .2em; }
/* 报告：用户切换（浅底，不和主按钮抢）、一周的柱子（今天描边，不用墨色填） */
.parent .seg2 { display: flex; gap: 2px; padding: 3px; background: var(--line); border-radius: 12px; margin: 0 0 12px; }
.parent .seg2 button { flex: 1; border: 0; background: none; border-radius: 9px; min-height: var(--tap); font-size: var(--f4); color: var(--quiet); }
.parent .seg2 button.on { background: var(--paper); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.parent .chart { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--lift); padding: 14px var(--sp) 10px; margin-bottom: 12px; }
.parent .chart .lb { font-size: var(--f5); color: var(--t3); }
.parent .bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 6px; }
.parent .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.parent .bar i { display: block; width: 100%; max-width: 30px; background: var(--line-ctl); border-radius: 4px 4px 0 0; }
.parent .bar.today i { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.parent .bar .v { font-size: var(--f5); color: var(--t3); }
.parent .bar .d { font-size: var(--f5); color: var(--t3); margin-top: 4px; white-space: nowrap; }
.parent .bar.today .d { color: var(--ink); font-weight: 700; }
/* 判题筛选：选中是浅底加粗，不用墨色（墨色只给主按钮） */
.chip.on { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
/* 底部操作栏：在导航上面，放这一页唯一的主按钮 */
.pbar { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 10; background: var(--bg); padding: 8px calc(1.1 * var(--sp)); border-top: 1px solid var(--line); }
.pbar .pri { width: 100%; max-width: 528px; display: flex; margin: 0 auto; }
body.hasbar .parent { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
.pri.lifted { display: none; }
body.setup .tabs { display: none; }
/* 向导期间藏起顶上的大黑胶囊：标题「第一次使用」不再被挤断。最后一步底部已有「切到用户模式」。 */
body.setup .phead .pgive { display: none; }
body.nogive .phead .pgive { display: none; }
body.setup .pbar { bottom: 0; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
/* 底部抽屉 .psheet：在 ui/overlay.css（和孩子端 .sheet 同一份） */
.toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
body.hasbar .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
.skel-hero { height: 120px; border-radius: 22px; margin-bottom: 16px; }
.parent .phead .dot { background: var(--accent, #F2A48C); }
/* 书架：两列封面 */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
.bk { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: var(--paper); box-shadow: var(--lift); margin-bottom: 6px; }
.bk .bn { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk .bs { font-size: var(--f5); color: var(--t3); }
.group .media .pic img { width: 96px; height: 128px; }

/* ============ 夜间模式（10-25 用户定：所有端都有，跟随系统） ============
   和孩子端同一版夜色：暖黑纸底、米白墨色（主按钮变成浅色底深色字）、马卡龙换成暗色调、状态色提亮一档；只改变量 */
/* ==== 令牌兼容副本：由 scripts/sync-style-tokens.js 从 ui/tokens.css 生成，别手改；改令牌改 tokens.css 再跑这个脚本 ==== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #181715; --paper: #23211E; --line: #34312C; --line2: #46423C; --line-ctl: #7A756D;
    --ink: #EDE9E1; --on-ink: #181715; --t2: #D2CCC2; --quiet: #B3ADA3; --t3: #9A958C; --t4: #5C5851;
    --hw: #EDE9E1; --hw-bg: #2C2A26; --brand: #EDE9E1; --accent: #F2A48C; --accent-ink: #F2A48C;
    --accent-bg: #3D2A22; --ok: #8CC2A4; --ok-bg: #2C2A26; --warn: #DDB06A; --warn-bg: #3D2A22;
    --bad: #E68C98; --bad-bg: #3D2A22; --accent-text: #F2A48C; --warn-text: #DDB06A;
    --bad-text: #E68C98; --mint: #22352B; --lav: #2D2A3E; --sky: #1F2F3C; --lemon: #38321D;
    --peach: #3D2A22; --pink: #3D252D;
    --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --scrim: rgba(0, 0, 0, .5); --fs-34: 2.125rem; --fs-28: 1.75rem; --fs-22: 1.375rem;
    --fs-20: 1.25rem; --fs-17: 1.0625rem; --fs-15: 0.9375rem; --fs-13: 0.8125rem; --fs-12: 0.75rem;
    --fs-large-title: var(--fs-34); --fs-title: var(--fs-28); --fs-title-2: var(--fs-22);
    --fs-title-3: var(--fs-20); --fs-body: var(--fs-17); --fs-callout: var(--fs-15);
    --fs-footnote: var(--fs-13); --fs-caption: var(--fs-12); --f1: var(--fs-22); --f2: var(--fs-17);
    --f3: var(--fs-15); --f4: var(--fs-13); --f5: var(--fs-12);
    --fx: clamp(1.75rem, 1.275rem + 3.487vmin, 2.75rem); --sp-1: 8px; --sp-2: 16px; --sp-3: 24px;
    --sp-4: 32px; --sp-5: 40px; --sp-6: 48px; --sp-half: 4px; --sp: 16px; --sp-s: 10px; --r-card: 16px;
    --r-btn: 12px; --r-sheet: 20px; --tap: 44px; --tap-main: 56px; --t-move: .34s; --t-fast: .2s;
    --ease: cubic-bezier(.2, .8, .2, 1); --z-bar: 10; --z-float: 15; --z-wait: 18; --z-toast: 20;
    --z-sheet: 30; --z-listen: 50; --z-dim: 55; --z-lock: 60; --z-boot: 70; --z-dialog: 80;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181715; --paper: #23211E; --line: #34312C; --line2: #46423C; --line-ctl: #7A756D;
  --ink: #EDE9E1; --on-ink: #181715; --t2: #D2CCC2; --quiet: #B3ADA3; --t3: #9A958C; --t4: #5C5851;
  --hw: #EDE9E1; --hw-bg: #2C2A26; --brand: #EDE9E1; --accent: #F2A48C; --accent-ink: #F2A48C;
  --accent-bg: #3D2A22; --ok: #8CC2A4; --ok-bg: #2C2A26; --warn: #DDB06A; --warn-bg: #3D2A22;
  --bad: #E68C98; --bad-bg: #3D2A22; --accent-text: #F2A48C; --warn-text: #DDB06A;
  --bad-text: #E68C98; --mint: #22352B; --lav: #2D2A3E; --sky: #1F2F3C; --lemon: #38321D;
  --peach: #3D2A22; --pink: #3D252D;
  --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --scrim: rgba(0, 0, 0, .5); --fs-34: 2.125rem; --fs-28: 1.75rem; --fs-22: 1.375rem;
  --fs-20: 1.25rem; --fs-17: 1.0625rem; --fs-15: 0.9375rem; --fs-13: 0.8125rem; --fs-12: 0.75rem;
  --fs-large-title: var(--fs-34); --fs-title: var(--fs-28); --fs-title-2: var(--fs-22);
  --fs-title-3: var(--fs-20); --fs-body: var(--fs-17); --fs-callout: var(--fs-15);
  --fs-footnote: var(--fs-13); --fs-caption: var(--fs-12); --f1: var(--fs-22); --f2: var(--fs-17);
  --f3: var(--fs-15); --f4: var(--fs-13); --f5: var(--fs-12);
  --fx: clamp(1.75rem, 1.275rem + 3.487vmin, 2.75rem); --sp-1: 8px; --sp-2: 16px; --sp-3: 24px;
  --sp-4: 32px; --sp-5: 40px; --sp-6: 48px; --sp-half: 4px; --sp: 16px; --sp-s: 10px; --r-card: 16px;
  --r-btn: 12px; --r-sheet: 20px; --tap: 44px; --tap-main: 56px; --t-move: .34s; --t-fast: .2s;
  --ease: cubic-bezier(.2, .8, .2, 1); --z-bar: 10; --z-float: 15; --z-wait: 18; --z-toast: 20;
  --z-sheet: 30; --z-listen: 50; --z-dim: 55; --z-lock: 60; --z-boot: 70; --z-dialog: 80;
}
/* ==== 兼容副本结束 ==== */


/* iPad、阔折叠屏（10-25）：底部标签栏、操作栏跟 760 宽的内容对齐，不铺满整个大屏 */
@media (min-width: 820px) {
  .tabs, .pbar { padding-left: max(12px, calc((100vw - 760px) / 2)); padding-right: max(12px, calc((100vw - 760px) / 2)); }
}

/* ===== 家长页横屏（10-25 用户：其他页面也要左右布局） ===== */
@media (orientation: landscape) and (min-width: 600px) {
  /* 放开宽度：一列 560 在横屏两边空一大片；列表、卡片排两栏（有表单、表格、书架的页面照旧一栏） */
  .parent { max-width: 1200px; }
  /* 两栏由 parent.js splitCols 按意思分（第一个主块在左，其余整块在右），不再用报纸分栏硬切 */
  .vcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: calc(var(--sp) * 1.6); align-items: start; }
  .vcol.l { align-self: start; }
  .vcol > .sect:first-child, .vcol > .hello:first-child { margin-top: 0; }
  .tabs, .pbar { padding-left: max(12px, calc((100vw - 1200px) / 2)); padding-right: max(12px, calc((100vw - 1200px) / 2)); }
  .bgrid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; }
}
/* 手机横着（矮屏）：底部导航挪到左边竖排；操作栏不钉在底部、跟着内容走；顶栏压矮。390 高的屏幕不再被三条固定栏吃掉一半 */
@media (orientation: landscape) and (min-width: 600px) and (max-height: 560px) {
  .tabs { top: 0; right: auto; bottom: 0; width: calc(80px + env(safe-area-inset-left)); flex-direction: column; justify-content: center; border-top: 0; border-right: 1px solid var(--line);
    padding: max(8px, env(safe-area-inset-top)) 0 max(8px, env(safe-area-inset-bottom)) env(safe-area-inset-left) !important; }
  .tabs button { flex: 0 0 auto; width: 100%; min-height: 54px; }
  .parent { padding-left: calc(80px + 1.1 * var(--sp) + env(safe-area-inset-left)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .phead { min-height: 40px; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 6px; }
  .phead h1 { font-size: var(--f2); }
  .pbar { position: static; margin: 0 calc(1.1 * var(--sp)) calc(16px + env(safe-area-inset-bottom)) calc(80px + 1.1 * var(--sp) + env(safe-area-inset-left)); padding: 4px 0 !important; border-top: 0; background: transparent; }
  .bgrid img, .bgrid .bcov { max-height: 45vh; }
}

/* 横屏精修（10-25 用户：略显粗糙、不精致，要贴主题 docs/05）：
   两栏顶部对齐；左侧导航是悬浮的纸色药丸（和孩子端标签栏一样，选中项图标下一个小墨点），不用一条硬分隔线；
   页面名大、板块名小而淡，用字号和留白分层 */
@media (orientation: landscape) and (min-width: 600px) {
  .vcols { margin-top: 6px; }
  .vcol > :first-child, .vcol > .sect:first-child, .vcol > .hello:first-child { margin-top: 0 !important; }
  .vcol > .hello:first-child .note { margin-top: 0; }
  .vcol .sect { margin: 26px 4px 10px; }
  .vcol .sect h2 { font-size: var(--f4); color: var(--t2); letter-spacing: .06em; }
  .vcol .list, .vcol .pcard { margin-bottom: 0; }
}
@media (orientation: landscape) and (min-width: 600px) and (max-height: 560px) {
  .tabs { top: max(12px, env(safe-area-inset-top)); bottom: max(12px, env(safe-area-inset-bottom)); left: calc(12px + env(safe-area-inset-left)); width: 72px; padding: 10px 0 !important;
    border: 0; border-radius: 28px; background: var(--paper); box-shadow: 0 8px 28px rgba(40, 34, 24, .10); justify-content: space-evenly; }
  .tabs button { min-height: 50px; gap: 3px; }
  .tabs button .ti { position: relative; }
  .tabs button.on .ti::after { content: ''; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--ink); }
  .parent { padding-left: calc(84px + 1.4 * var(--sp) + env(safe-area-inset-left)); }
  .pbar { margin-left: calc(84px + 1.4 * var(--sp) + env(safe-area-inset-left)); }
  .phead h1 { font-size: var(--f1); }
}
@media (orientation: landscape) and (min-width: 600px) and (max-height: 560px) { .tabs button { gap: 8px; } }

/* 按学科看（docs/19）：各科一览一行一科，三列小横条；每条发现一张粉彩卡，按轻重分色；规划建议天蓝卡 */
.pcard.peach { background: var(--peach); } .pcard.sky { background: var(--sky); } .pcard.pink { background: var(--pink); }
.lglance { padding-bottom: 12px; }
.lrow { display: grid; grid-template-columns: 4.6em 1fr 1fr 3em; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: var(--f4); }
.lrow.lhead { border-top: 0; padding-top: 10px; font-size: var(--f5); color: var(--t3); }
.lrow > span { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.lrow > span:last-child { justify-content: flex-end; }
.lrow small { font-size: var(--f5); color: var(--t3); margin-left: -3px; }
.lsub { font-weight: 700; }
.lbar { flex: 1; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; min-width: 24px; }
.lbar i { display: block; height: 100%; border-radius: 999px; background: var(--line-ctl); }
.lbar i.warm { background: color-mix(in srgb, var(--ink) 55%, var(--peach)); }
.ldot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 2px; }
.ldot.peach { background: color-mix(in srgb, #E07A50 85%, var(--peach)); } .ldot.lemon { background: color-mix(in srgb, #C9A21A 85%, var(--lemon)); } .ldot.mint { background: color-mix(in srgb, #3E9A6E 85%, var(--mint)); }
.lnote { font-size: var(--f5); color: var(--t3); margin-top: 8px; line-height: 1.5; }
.lcard .lb2 { margin-top: 2px; line-height: 1.55; }
.lsec { margin-top: 10px; }
.lsec ul { margin: 2px 0 0; padding-left: 1.2em; }
.lsec li { line-height: 1.55; margin-top: 2px; }
.lfb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.lfb .lb { flex: 1 1 auto; }
.lfb .chip { min-height: 34px; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.lplan .lpi { display: flex; flex-direction: column; margin-top: 8px; padding-left: 14px; position: relative; }
.lplan .lpi::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .6; }
.lplan .tt2 { font-weight: 700; line-height: 1.45; }
.lrow > span.lcol { flex-wrap: wrap; row-gap: 0; }
.lrow em { flex-basis: 100%; font-style: normal; font-size: var(--f5); color: var(--t3); text-align: right; line-height: 1.2; }
.lentry { padding-bottom: 12px; }
.erow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: var(--f4); }
.erow span:first-child { font-weight: 700; }
.erow span:last-child { color: var(--t2); text-align: right; }

/* 这周和前三周比（照 Apple 健身「趋势」）：一行五格，每格 维度名 / 分 / 四周小柱子；变好薄荷底、变差桃色底；点一格看明细 */
.wkcmp .tt2 { font-weight: 700; margin: 2px 0 10px; }
.wdims { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wdim { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; padding: 8px 2px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.wdim.up { background: var(--mint); } .wdim.down { background: var(--peach); }
.wdim[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.wdim .wdn { font-size: var(--f5); color: var(--t3); }
.wdim b { font-size: var(--f3); line-height: 1.1; }
.wdim b small { font-size: var(--f5); margin-left: 1px; }
.wsp { display: flex; align-items: flex-end; gap: 2px; width: 30px; height: 16px; }
.wsp i { flex: 1; border-radius: 2px 2px 0 0; background: var(--line-ctl); }
.wsp i.now { background: var(--ink); }
.wdet { margin-top: 10px; }
.wdet .wrow { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: var(--f5); color: var(--t3); }
.wdet .wrow span:first-child { color: var(--ink); }
.wdet .wrow b { color: var(--ink); }


/* ============ 家长端和孩子端同一套版式（10-27 用户：「家长端也应该与孩子端页面进行统一」） ============
   上面浅灰舞台只放这一页的图（进度圈、维度图），不放说明文字；黑色圆钮压在舞台右下，一页一个；
   下面是纸底 + 细线的明细，小灰字分组，不再一张张浮起的卡；顶栏大字页名、实色底；底栏平铺。
   和孩子端的对应：.pstage ↔ body.staged 舞台、.pfab ↔ .fab、.list/.row ↔ 首页 .hrow、.sect h2 ↔ .slabel */
.phead { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.phead h1 { font-size: var(--fs-large-title, 34px); line-height: 1.15; }
body:has(.pstage) .phead { background: var(--hw-bg); }
.pstage { position: relative; margin: -4px calc(-1.1 * var(--sp)) 44px; padding: 4px calc(1.1 * var(--sp) + 4px) 20px; background: var(--hw-bg); border-radius: 0 0 34px 34px; }
.pstage .seg2 { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.pstage .pchart { display: flex; justify-content: center; align-items: flex-end; gap: 22px; flex-wrap: wrap; padding-top: 8px; }
.pring { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: var(--ink); padding: 0; }
.pring svg { display: block; }
.pring .rc { position: absolute; top: 0; left: 0; right: 0; height: var(--rs, 132px); display: flex; align-items: center; justify-content: center; font-size: var(--fs-callout); color: var(--t3); }
.pring .rc b { font-size: var(--fs-34); color: var(--ink); font-variant-numeric: tabular-nums; }
.pring .rn { font-size: var(--fs-callout); color: var(--quiet); }
.pring { display: block; width: 100%; max-width: 220px; margin: 4px auto 8px; height: auto; }
.pring .big { font-size: 40px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.pring .lab { font-size: 14px; fill: var(--quiet); }
.pstage .pring + .seg2 { margin-top: 4px; }
.pradar { display: block; width: 100%; max-width: 360px; margin: 0 auto; height: auto; }
.pradar .lab { cursor: pointer; }
.pradar .lab text { font-size: 14px; fill: var(--quiet); }
.pradar .lab.on text { fill: var(--ink); font-weight: 700; }
.pradar .lab rect { fill: transparent; }
.pradar .lab:focus-visible rect { stroke: var(--ink); stroke-width: 1.5; }
.pfab { position: absolute; right: 20px; bottom: -36px; z-index: 2; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pfab .fabc { width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: var(--on-ink, #fff); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px rgba(20, 18, 14, .3); }
.pfab .fabc svg { width: 30px; height: 30px; }
.pfab .fabl { font-size: var(--fs-footnote); font-weight: 700; color: var(--ink); white-space: nowrap; }
/* 明细：纸底平铺 + 细线，不浮起 */
.parent .list { background: none; box-shadow: none; border-radius: 0; margin-bottom: 4px; }
.parent .list .row { padding-left: 2px; border-top: 0; border-bottom: 1px solid var(--line); }
.sect { margin: 18px 2px 2px; }
.sect h2 { font-size: var(--fs-footnote); font-weight: 400; color: var(--t3); letter-spacing: .1em; }
.pdet .row .val { font-size: var(--fs-20); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pdet .why { margin: 10px 2px 0; color: var(--quiet); font-size: var(--fs-callout); }
/* 图表块（每天分钟、按学科看）：纸底平铺，不再白卡片浮起 */
.parent .chart { background: none; box-shadow: none; border-radius: 0; padding-left: 2px; padding-right: 2px; }
/* 第 2 批（10-27）：读书封面、判题收起、空书、添加设备、额度 */
.bkthumb { flex: 0 0 auto; width: 44px; height: 56px; object-fit: cover; border-radius: 4px 8px 8px 4px; box-shadow: 1px 2px 4px rgba(0, 0, 0, .16); }
.bkthumb.ph { display: inline-flex; align-items: center; justify-content: center; background: var(--hw-bg); color: var(--quiet); font-weight: 700; box-shadow: none; }
.cfold { margin: 8px 2px; color: var(--t3); font-size: var(--fs-callout); }
.cfold summary { min-height: var(--tap); display: flex; align-items: center; border-top: 1px dashed var(--line2); cursor: pointer; }
.pempty { text-align: center; padding: 40px 12px; }
.pemptyart svg { width: 120px; height: 80px; color: var(--t3); }
.pempty .ttl { font-size: var(--fs-title-3); font-weight: 700; margin-top: 12px; }
.pempty .note { margin: 6px 0 18px; }
.pempty-acts { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pempty-acts .pri { min-width: 12rem; }
.pairstage { text-align: center; }
.pairart { width: 220px; height: 150px; color: var(--ink); display: block; margin: 8px auto 6px; }
.prcode input { flex: 1; min-height: 60px !important; font-size: var(--fs-28) !important; font-weight: 700; letter-spacing: .35em; text-align: center; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.qblock { padding: 4px 2px 8px; }
.qnum { font-size: var(--fs-callout); color: var(--t3); }
.qnum b { font-size: var(--fs-34); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.qmeter { height: 10px; border-radius: 5px; background: var(--hw-bg); overflow: hidden; margin: 8px 0 6px; }
.qmeter i { display: block; height: 100%; background: var(--ink); border-radius: 5px; }
.pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchips .chip { min-height: var(--tap); }
.prcode { padding-left: 0 !important; padding-right: 0 !important; }
.prcode input { width: 100%; min-width: 0; box-sizing: border-box; }
/* 第 2 批和孩子端对齐（10-27 用户：「这批页面与我们的主题不符」）：
   白卡片、白色分组去掉，改纸底平铺 + 细线；筛选是孩子端那种实心纸色药丸（选中墨色）；日期药丸能横滑；说明字不小于 14 */
.parent .card, .parent .group { background: none; box-shadow: none; border-radius: 0; padding: 14px 2px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.parent .group .gi { padding-left: 2px; padding-right: 2px; }
.parent .chip, .daypills button { border: 0; box-shadow: none; background: var(--paper); color: var(--quiet); border-radius: 999px; min-height: var(--tap); padding: 0 14px; font-size: var(--fs-callout); white-space: nowrap; }
.parent .chip.on, .daypills button.on { background: var(--ink); color: var(--on-ink, #fff); box-shadow: none; font-weight: 700; }
.parent .chip .n, .daypills .n { margin-left: 4px; opacity: .7; font-size: var(--fs-13); }
.daypills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 2px; padding: 2px; }
.daypills::-webkit-scrollbar { display: none; }
.parent .note, .parent .meta, .parent .card .meta { font-size: var(--fs-callout); }
.parent .small, .parent .row .sub { font-size: var(--fs-13); }
.parent .kv { font-size: var(--fs-callout); grid-template-columns: 5em 1fr; gap: 4px 10px; }
.parent .qitem { padding: 12px 0; }
.parent .thumb { border-radius: 14px; }
/* 舞台卡固定在顶栏下面；往下滑时缩到一半（body.stage-mini） */
.pstage { position: sticky; top: calc(max(12px, env(safe-area-inset-top)) + 46px); z-index: 7; transition: padding .2s var(--ease, ease); }
body.stage-mini .phead { background: var(--hw-bg); }
body.stage-mini .pstage { padding-top: 0; padding-bottom: 12px; cursor: pointer; box-shadow: 0 8px 18px rgba(20, 18, 14, .08); }
body.stage-mini .pstage > .note { display: none; }
body.stage-mini .pstage .seg2 { margin-bottom: 4px; }
body.stage-mini .pstage .seg2 button { min-height: 32px; }
body.stage-mini .pradar { max-width: 200px; }
body.stage-mini .pring { --rs: 64px !important; gap: 2px; }
body.stage-mini .pring svg { width: 64px; height: 64px; }
body.stage-mini .pring .rc b { font-size: 20px; }
body.stage-mini .pring .rc { font-size: 12px; }
body.stage-mini .pring .rn { font-size: 13px; }
body.stage-mini .pfab { transform: scale(.78); transform-origin: right top; }
@media (prefers-reduced-motion: reduce) { .pstage { transition: none; } }
#pTitle { cursor: pointer; }
body.stage-mini .pradar { max-width: 230px; }
body.stage-mini .pradar .lab text { font-size: 20px; } /* 图缩到约 0.7 倍，字放大补回来，实际约 14px */
/* 判题：页面上只留一行筛选摘要，条件在弹窗里（10-27 用户：页面尽量整洁） */
.fsum { display: flex; align-items: center; gap: 6px; width: 100%; min-height: var(--tap); border: 0; border-bottom: 1px solid var(--line); background: none; padding: 0 2px; color: var(--quiet); font: inherit; font-size: var(--fs-callout); text-align: left; }
.fsum svg { width: 18px; height: 18px; margin-left: auto; color: var(--t3); }
.psheet-card .fsec { margin: 14px 2px 6px; font-size: var(--fs-footnote); color: var(--t3); letter-spacing: .1em; }
.daypills.wrap { flex-wrap: wrap; overflow: visible; }
.psheet-card .daypills button { background: var(--bg); }
.psheet-card .daypills button.on { background: var(--ink); }
/* 子页面（有返回）页名 28，主页面 34：「老大 · 判题和错题」这种长名字不被截断 */
.phead:has(#pBack:not(.hidden)) h1 { font-size: var(--fs-title, 28px); }

/* 待办（10-28）：照参考图——白色圆角卡片里，上面一行这周的日子，分段「待做 / 已完成 / 待定」，按早上 / 白天 / 晚上分组的勾选项 */
.tdcard { background: var(--paper); border-radius: 20px; padding: 12px; box-shadow: inset 0 0 0 1px var(--line); margin: 0 4px 8px; }
.tdweek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 10px; }
.tdweek button { border: 0; background: none; border-radius: 14px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--t3); font: inherit; }
.tdweek button small { font-size: var(--fs-12); }
.tdweek button b { font-size: var(--fs-17); color: var(--ink); font-weight: 600; }
.tdweek button.today b { text-decoration: underline; text-underline-offset: 4px; }
.tdweek button.on { background: var(--ink); }
.tdweek button.on small, .tdweek button.on b { color: var(--on-ink, #fff); }
.tdseg { margin-bottom: 8px; }
.tdwho { margin: 4px 0 8px; }
.tdg { margin-top: 6px; }
.tdh { font-size: var(--fs-13); color: var(--t3); font-weight: 600; margin: 8px 4px 2px; }
.tdi { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.tdi:last-child { border-bottom: 0; }
.tdi input[type=checkbox] { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--ink); }
.tdi .tdt { flex: 1; }
.tdi .tdt small, .tdi .tdw { color: var(--t3); font-size: var(--fs-13); }
.tdi.hw .tdt { color: var(--t2); }
.tdempty { margin: 8px 4px; }
.sect .link.small { margin-left: auto; background: none; border: 0; color: var(--ink); font: inherit; font-size: var(--fs-15); font-weight: 600; }
.tdsheet input[type=text] { display: block; width: 100%; min-height: 52px; padding: 0 14px; margin: 12px 0 4px; border: 1px solid var(--line-ctl, #8A857C); border-radius: 14px; font: inherit; font-size: var(--fs-17); background: var(--paper); color: inherit; box-sizing: border-box; }
.tdsheet .lb { margin: 12px 0 6px; font-size: var(--fs-13); color: var(--t3); }
.tdsheet .pchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tdsheet .opt { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
/* 设置页「更多设置」（10-28 精简：一级只留 4 个） */
.pmore { margin: 16px 0; }
.pmore > summary { list-style: none; cursor: pointer; padding: 14px 4px; color: var(--t2); font-weight: 600; }
.pmore > summary::-webkit-details-marker { display: none; }
.pmore > summary::after { content: ' ›'; }
.pmore[open] > summary::after { content: ' ⌄'; }
.tdsheet .chip.on { background: var(--ink); color: var(--on-ink, #fff); box-shadow: none; font-weight: 700; }
/* 用户设置顶部：今天用了多久（10-28 布局：左数字、右按钮，一张紧凑卡） */
.usecard { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px 16px; margin: 4px 0 12px; }
.usecard .main { flex: 1; }
.usecard .lb { font-size: var(--fs-13); color: var(--t3); }
.usecard .num { font-size: var(--fs-15); color: var(--t3); margin-top: 2px; }
.usecard .num b { font-size: var(--fs-28); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.group .gi .set > select { flex: 0 0 auto; width: auto; min-width: 104px; max-width: 45%; margin: 0; }
.usecard + .group { margin-top: 0; }

/* ---- 管理员端现代化重构（用户主卡片 + 更多页分组卡片） ---- */
.stage-sticky {
  position: sticky;
  top: calc(max(12px, env(safe-area-inset-top)) + 48px);
  z-index: 8;
  margin-bottom: 16px;
}
.users-dashboard { display: flex; flex-direction: column; gap: 16px; margin: 8px 0; }
.user-hero-card { background: var(--paper); border-radius: 24px; padding: 18px 18px 16px; box-shadow: var(--lift); border: 1px solid var(--line); position: relative; }
.uh-top { display: flex; align-items: center; gap: 12px; }
.uh-avatar .ava { width: 48px; height: 48px; border-radius: 50%; font-size: var(--fs-20); font-weight: 700; background: var(--hw-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.uh-meta { flex: 1; min-width: 0; }
.uh-name { font-size: var(--fs-20); font-weight: 700; color: var(--ink); line-height: 1.3; }
.uh-badge { display: inline-block; font-size: var(--fs-12); font-weight: 600; color: var(--quiet); background: var(--bg); padding: 2px 8px; border-radius: 6px; margin-top: 4px; }
.uh-btn-set { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--t3); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.uh-btn-set:active { background: var(--bg); }
.uh-btn-set svg { width: 22px; height: 22px; }
.uh-status-line { display: flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--t3); margin: 12px 2px 14px; }
.uh-dot { width: 7px; height: 7px; border-radius: 50%; }
.uh-dot.ok { background: #34C759; }
.uh-dot.muted { background: var(--t4); }
.uh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--bg); padding: 10px 8px; border-radius: 14px; margin-bottom: 14px; }
.uh-stat { text-align: center; cursor: pointer; padding: 4px 0; border-radius: 8px; transition: background .12s ease; }
.uh-stat:active { background: var(--line); }
.uh-val { font-size: var(--fs-17); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.uh-lbl { font-size: var(--fs-12); color: var(--t3); margin-top: 2px; }
.uh-footer { display: flex; gap: 8px; }
.uh-nav { flex: 1; min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line-ctl); background: var(--paper); color: var(--ink); font-size: var(--fs-13); font-weight: 600; cursor: pointer; transition: background .12s ease; }
.uh-nav:active { background: var(--bg); }
.uh-nav.uh-prime { background: var(--ink); color: var(--on-ink, #fff); border-color: var(--ink); }

/* 更多页：顶部固定套餐与用量直览主卡 */
.usage-hero-card {
  background: var(--paper);
  border-radius: 24px;
  padding: 18px 20px 16px;
  box-shadow: var(--lift);
  border: 1px solid var(--line);
  box-sizing: border-box;
}
.uhc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.uhc-badge-wrap { display: flex; align-items: baseline; gap: 8px; }
.uhc-tag { font-size: var(--fs-12); font-weight: 700; color: var(--t3); text-transform: uppercase; }
.uhc-plan { font-size: var(--fs-20); font-weight: 700; color: var(--ink); line-height: 1.25; }
.uhc-renew { font-size: var(--fs-13); font-weight: 600; color: var(--quiet); border: 0; background: none; cursor: pointer; padding: 4px 0; }
.uhc-renew:active { opacity: .7; }
.uhc-exp { font-size: var(--fs-13); color: var(--quiet); margin: 6px 0 14px; }
.uhc-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; background: var(--bg); padding: 12px 14px; border-radius: 16px; }
.uhc-item { cursor: pointer; }
.uhc-val { font-size: var(--fs-17); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.uhc-lbl { font-size: var(--fs-12); color: var(--t3); margin-top: 3px; }

/* 更多页：分组列表 */
.more-page { display: flex; flex-direction: column; gap: 18px; margin: 4px 0 24px; }
.mg-sec { display: flex; flex-direction: column; gap: 6px; }
.mg-head { font-size: var(--fs-13); font-weight: 700; color: var(--t3); padding-left: 14px; letter-spacing: 0.04em; }
.mg-card { background: var(--paper); border-radius: 20px; box-shadow: var(--lift); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.mg-card .row,
.mg-card .nrow {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 16px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  min-height: 56px !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  text-align: left !important;
  box-sizing: border-box !important;
  cursor: pointer;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.mg-card .row:last-child,
.mg-card .nrow:last-child { border-bottom: 0 !important; }
.mg-card .row .main { flex: 1 !important; min-width: 0 !important; }
.mg-card .row .ttl { font-size: var(--fs-17) !important; font-weight: 600 !important; color: var(--ink) !important; line-height: 1.35 !important; }
.mg-card .row .sub { font-size: var(--fs-13) !important; color: var(--quiet) !important; margin-top: 3px !important; line-height: 1.4 !important; }
.mg-card .row .chev { width: 18px !important; height: 18px !important; color: var(--t3) !important; flex: 0 0 auto !important; margin-left: auto !important; }
.mg-card .row:active,
.mg-card .nrow:active { background: var(--bg) !important; }


