/* 布局：桌面端左侧导航 + 内容区；手机端顶栏 + 底部标签栏，表格转为可横向滚动 */
:root {
  --bg: #f4f6f5; --surface: #ffffff; --surface-2: #f7f9f8; --ink: #1a1a1a; --muted: #5b6661; --line: #dde4e0;
  --accent: #064e3b; --accent-ink: #ffffff; --accent-soft: #e3eee9; --warm: #0d7a58; --warm-soft: #e9f4ee;
  --info: #3b5b7c; --info-soft: #e8eef4; --logo: #064e3b;
  --ok: #1f8a5b; --ok-soft: #e3f4ec; --bad: #c2412d; --bad-soft: #fbe9e5; --warn: #b7791f; --warn-soft: #fbf1df;
  --grey-soft: #eceeed; --violet: #6b4fbb; --violet-soft: #efeafb;
  --shadow: 0 1px 2px rgba(26, 26, 26, .06), 0 4px 16px rgba(26, 26, 26, .05);
  --f-display: "Bricolage Grotesque", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 10px; --side: 236px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1412; --surface: #171d1a; --surface-2: #1c2420; --ink: #ececec; --muted: #9aa59f; --line: #28322d;
  --accent: #5cc49a; --accent-ink: #04261c; --accent-soft: #15302a; --warm: #7fd3ae; --warm-soft: #142c24;
  --info: #93b5d8; --info-soft: #1b2733; --logo: #ffffff;
  --ok: #4cc28c; --ok-soft: #12301f; --bad: #f07a65; --bad-soft: #3a1a15; --warn: #e6b058; --warn-soft: #362812;
  --grey-soft: #222a26; --violet: #a993ef; --violet-soft: #271f40; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f1412; --surface: #171d1a; --surface-2: #1c2420; --ink: #ececec; --muted: #9aa59f; --line: #28322d;
  --accent: #5cc49a; --accent-ink: #04261c; --accent-soft: #15302a; --warm: #7fd3ae; --warm-soft: #142c24;
  --info: #93b5d8; --info-soft: #1b2733; --logo: #ffffff;
  --ok: #4cc28c; --ok-soft: #12301f; --bad: #f07a65; --bad-soft: #3a1a15; --warn: #e6b058; --warn-soft: #362812;
  --grey-soft: #222a26; --violet: #a993ef; --violet-soft: #271f40; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- 登录 ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-side { background: var(--accent); color: var(--accent-ink); padding-block: 48px; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.login-side .brand { font: 700 22px/1 var(--f-display); letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.login-side h1 { font: 600 clamp(28px, 3.6vw, 44px)/1.15 var(--f-display); max-width: 14em; }
.login-side p { opacity: .85; max-width: 30em; margin: 12px 0 0; }
.ticket { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 16px 18px; max-width: 360px; display: grid; gap: 4px; }
.ticket .t-k { font-size: 12px; opacity: .75; letter-spacing: .04em; }
.ticket .t-v { font: 500 18px var(--f-mono); }
.login-main { display: flex; align-items: center; justify-content: center; padding-block: 40px; padding-left: 24px; padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.login-card { width: 100%; max-width: 400px; display: grid; gap: 18px; }
.login-card h2 { font: 600 24px var(--f-display); }
.demo-accts { display: grid; gap: 8px; }
.demo-accts .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.demo-accts .lab { font-size: 12px; color: var(--muted); width: 3.5em; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-side { padding-block: 28px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); gap: 18px; }
  .login-side h1 { font-size: 26px; }
  .login-side .ticket { display: none; }
  .login-main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 24px 40px; align-items: flex-start; }
}

/* ---------- 外壳 ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding-block: 18px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: 14px; display: flex; flex-direction: column; gap: 14px; }
.side .brand { font: 700 18px/1 var(--f-display); display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.logo { width: 27px; height: 29px; color: var(--logo); flex: none; display: block; }
.login-side .logo { color: #ffffff; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.brandmark .bn { display: grid; line-height: 1.1; min-width: 0; }
.brandmark .bn b { font: 700 17px/1.15 var(--f-body); letter-spacing: .02em; white-space: nowrap; }
.brandmark .bn small { font-size: 11.5px; color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
.login-side .brandmark .bn small { color: inherit; opacity: .8; }
.login-side .brandmark .bn b { font-size: 20px; }
.login-side .logo { width: 34px; height: 36px; }
.role-tag { font-size: 12px; color: var(--muted); padding: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav-group { font-size: 11px; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav a:hover { background: var(--surface-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .ico { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 8px; display: grid; gap: 6px; }

.main { min-width: 0; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-left: 28px; padding-right: max(28px, env(safe-area-inset-right, 0px)); min-height: 60px; }
.top h1 { font: 600 19px var(--f-display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .sp { flex: 1; }
.tz-chip { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; background: var(--surface); }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--bad); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px 3px 3px; cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--warm-soft); color: var(--warm); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.child-switch { display: flex; align-items: center; gap: 6px; }
.child-switch select { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 10px; }
.content { grid-template-columns: minmax(0, 1fr); padding-block: 24px 48px; padding-left: 28px; padding-right: max(28px, env(safe-area-inset-right, 0px)); display: grid; gap: 20px; align-content: start; max-width: 1280px; width: 100%; }
.tabbar { display: none; }
.mobile-only { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); gap: 8px; min-height: 54px; }
  .top h1 { font-size: 17px; }
  .top .tz-chip, .user-chip .uname { display: none; }
  .user-chip { padding: 2px; }
  .content { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 16px calc(88px + env(safe-area-inset-bottom, 0px)); gap: 16px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; font-size: 11px; color: var(--muted); text-decoration: none; position: relative; background: none; border: 0; cursor: pointer; }
  .tabbar a.on { color: var(--accent); font-weight: 600; }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar .dot { position: absolute; top: 4px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
  .mobile-only { display: initial; }
  .desk-only { display: none !important; }
  .child-switch .lab { display: none; }
}

/* ---------- 通用组件 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2 { font: 600 16px var(--f-display); }
.card-h .sp { flex: 1; }
.card-h .sub { color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .g2, .g3, .g-main { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { color: var(--muted); text-align: center; padding: 22px 8px; border: 1px dashed var(--line); border-radius: var(--r); font-size: 13px; }
.kv { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.label { font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 14px; cursor: pointer; text-decoration: none; font-weight: 500; white-space: nowrap; font-size: 13.5px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.warm { background: var(--warm); color: var(--accent-ink); border-color: var(--warm); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); padding-inline: 8px; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 11px 20px; font-size: 15px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 14px; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 9px; border-radius: 999px; white-space: nowrap; font-weight: 500; background: var(--grey-soft); color: var(--muted); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.scheduled { background: var(--info-soft); color: var(--info); }
.pill.completed { background: var(--ok-soft); color: var(--ok); }
.pill.cancelled { background: var(--grey-soft); color: var(--muted); }
.pill.student_absent { background: var(--warn-soft); color: var(--warn); }
.pill.teacher_absent { background: var(--bad-soft); color: var(--bad); }
.pill.pending { background: var(--violet-soft); color: var(--violet); }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.plain::before { display: none; }
.badge { min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; background: var(--bad); color: #fff; font-size: 11px; line-height: 20px; text-align: center; font-weight: 600; }
.badge.soft { background: var(--grey-soft); color: var(--muted); }

/* 表单 */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; color: var(--muted); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .fields, .fields.three { grid-template-columns: minmax(0, 1fr); } }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; background: var(--surface); }
.checks input { accent-color: var(--accent); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.radio-cards label { position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; display: grid; gap: 2px; font-size: 13px; background: var(--surface); }
.radio-cards input { position: absolute; opacity: 0; pointer-events: none; }
.radio-cards label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.radio-cards small { color: var(--muted); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.err { color: var(--bad); font-size: 13px; background: var(--bad-soft); border-radius: 8px; padding: 8px 12px; }
.note { font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.note.warm { background: var(--warm-soft); border-color: transparent; }
.issues { display: grid; gap: 4px; }
.issue { font-size: 12.5px; display: flex; gap: 6px; align-items: baseline; }
.issue.error { color: var(--bad); } .issue.warn { color: var(--warn); }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; }
.plus { color: var(--ok); } .minus { color: var(--bad); }

/* 课程卡片 */
.lesson { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.lesson:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.lesson .when { display: grid; gap: 0; text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.lesson .when b { font: 600 18px var(--f-mono); }
.lesson .when span { font-size: 11.5px; color: var(--muted); }
.lesson .what { min-width: 0; display: grid; gap: 2px; }
.lesson .what .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson .what .m { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson .side-r { display: grid; gap: 6px; justify-items: end; }
.lesson.cancelled { opacity: .62; }
@media (max-width: 600px) { .lesson { grid-template-columns: 62px minmax(0, 1fr); } .lesson .side-r { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; } }

/* 下一节课 */
.next { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.next-main { padding: 22px; display: grid; gap: 12px; align-content: start; }
.next-main .eyebrow { display: flex; align-items: center; gap: 8px; color: var(--warm); font-weight: 600; font-size: 13px; }
.next-main h2 { font: 600 24px/1.25 var(--f-display); }
.next-time { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.next-time b { font: 600 30px/1 var(--f-mono); letter-spacing: -.01em; }
.countdown { font-size: 13px; color: var(--muted); }
.next-room { background: var(--surface-2); border-left: 1px solid var(--line); padding: 22px; display: grid; gap: 12px; align-content: start; }
@media (max-width: 860px) { .next { grid-template-columns: minmax(0, 1fr); } .next-room { border-left: 0; border-top: 1px solid var(--line); } .next-main h2 { font-size: 20px; } .next-time b { font-size: 26px; } }

/* 课堂房间 */
.room { display: grid; gap: 8px; }
.room-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 8px 8px 8px 12px; background: var(--surface); }
.room-row .k { font-size: 12px; color: var(--muted); }
.room-row .v { font: 600 16px var(--f-mono); overflow-wrap: anywhere; }
.room-row > div { min-width: 0; }
.ticket-num { font: 600 15px var(--f-mono); }

/* 统计 */
.stat { display: grid; gap: 4px; }
.stat .v { font: 600 28px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat.attn .v { color: var(--bad); }
.meter { height: 8px; border-radius: 4px; background: var(--grey-soft); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* 课表 */
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-head .range { font: 600 15px var(--f-display); margin-right: auto; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-height: 150px; display: flex; flex-direction: column; min-width: 0; }
.day-h { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.day-h b { font: 600 16px var(--f-mono); color: var(--ink); }
.day.today .day-h { color: var(--accent); } .day.today .day-h b { color: var(--accent); }
.day.today { border-color: var(--accent); }
.day-b { display: grid; gap: 6px; padding: 8px; align-content: start; }
.ev { border-radius: 7px; padding: 6px 8px; font-size: 12px; cursor: pointer; background: var(--info-soft); color: var(--ink); border-left: 3px solid var(--info); display: grid; gap: 1px; min-width: 0; }
.ev b { font-family: var(--f-mono); font-weight: 600; }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ev.completed { background: var(--ok-soft); border-color: var(--ok); }
.ev.cancelled { background: var(--grey-soft); border-color: var(--muted); text-decoration: line-through; opacity: .7; }
.ev.student_absent { background: var(--warn-soft); border-color: var(--warn); }
.ev.teacher_absent { background: var(--bad-soft); border-color: var(--bad); }
.ev.pending { background: var(--violet-soft); border-color: var(--violet); }
.ev.avail { background: transparent; border: 1px dashed var(--ok); color: var(--ok); cursor: default; }
@media (max-width: 1000px) {
  .week { grid-template-columns: minmax(0, 1fr); }
  .day { min-height: 0; flex-direction: row; }
  .day-h { flex-direction: column; justify-content: center; align-items: center; border-bottom: 0; border-right: 1px solid var(--line); width: 64px; flex: none; }
  .day-b { flex: 1; }
  .day.empty-day .day-b::after { content: "无课程"; color: var(--muted); font-size: 12px; padding: 4px; }
}
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .wd { font-size: 12px; color: var(--muted); text-align: center; padding: 4px; }
.mcell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-height: 86px; padding: 6px; display: grid; gap: 3px; align-content: start; min-width: 0; cursor: pointer; }
.mcell.other { opacity: .45; }
.mcell.today { border-color: var(--accent); }
.mcell .d { font: 600 13px var(--f-mono); }
.mcell .mev { font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-radius: 4px; padding: 0 4px; background: var(--info-soft); }
.mcell .mev.completed { background: var(--ok-soft); } .mcell .mev.pending { background: var(--violet-soft); }
@media (max-width: 600px) { .mcell { min-height: 52px; } .mcell .mev { display: none; } .mcell .cnt { display: block; } }
.mcell .cnt { display: none; font-size: 11px; color: var(--accent); font-weight: 600; }

/* 反馈 */
.fb { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); display: grid; gap: 10px; }
.fb-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fb-h .d { font: 600 14px var(--f-mono); }
.fb-sec { display: grid; gap: 2px; }
.fb-sec .k { font-size: 12px; color: var(--muted); }
.fb-sec .v { white-space: pre-wrap; overflow-wrap: anywhere; }
.practice { background: var(--warm-soft); border-radius: 8px; padding: 10px 12px; }
.mastery { display: inline-flex; gap: 3px; align-items: center; font-size: 12px; }
.mastery i { width: 14px; height: 6px; border-radius: 3px; background: var(--grey-soft); display: block; }
.mastery.good i { background: var(--ok); } .mastery.ok i:nth-child(-n+2) { background: var(--warn); } .mastery.weak i:first-child { background: var(--bad); }

/* 进度 */
.prog-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.book { display: flex; gap: 14px; align-items: center; min-width: 0; }
.book-spine { width: 48px; height: 64px; border-radius: 4px 8px 8px 4px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 12px var(--f-display); flex: none; box-shadow: inset 6px 0 0 rgba(0,0,0,.18); text-align: center; line-height: 1.1; padding: 2px; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 92px 18px minmax(0, 1fr); gap: 10px; }
.tl .d { font: 500 12.5px var(--f-mono); color: var(--muted); padding-top: 2px; text-align: right; }
.tl .line { position: relative; }
.tl .line::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl .line::after { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl .line.completed::after { background: var(--ok); border-color: var(--ok); }
.tl .b { padding-bottom: 16px; min-width: 0; }
.tl .b .t { font-weight: 600; }
.tl .b .m { font-size: 12.5px; color: var(--muted); }
@media (max-width: 600px) { .tl { grid-template-columns: 64px 18px minmax(0, 1fr); } .prog-hero { grid-template-columns: minmax(0, 1fr); } }

/* 通知 */
.ntf { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: start; }
.ntf:last-child { border-bottom: 0; }
.ntf.unread { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.ntf .ni { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--grey-soft); color: var(--muted); }
.ntf .ni svg { width: 18px; height: 18px; }
.ntf .ni.schedule, .ntf .ni.upcoming { background: var(--info-soft); color: var(--info); }
.ntf .ni.credit { background: var(--warm-soft); color: var(--warm); }
.ntf .ni.exception, .ntf .ni.cancel { background: var(--bad-soft); color: var(--bad); }
.ntf .ni.feedback { background: var(--ok-soft); color: var(--ok); }
.ntf .ni.teacher_change, .ntf .ni.request { background: var(--violet-soft); color: var(--violet); }
.ntf .t { font-weight: 600; } .ntf .bd { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ntf .at { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* 抽屉 */
.scrim { position: fixed; inset: 0; background: rgba(10, 16, 22, .42); z-index: 20; display: flex; justify-content: flex-end; animation: fade .15s ease; }
.drawer { width: min(560px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0,0,0,.18); animation: slide .2s ease; padding-top: env(safe-area-inset-top, 0px); }
.drawer.wide { width: min(760px, 100%); }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; padding-right: max(18px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-h h2 { font: 600 17px var(--f-display); flex: 1; min-width: 0; }
.drawer-b { overflow-y: auto; padding: 18px; padding-right: max(18px, env(safe-area-inset-right, 0px)); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; align-content: start; flex: 1; grid-template-columns: minmax(0, 1fr); }
@keyframes fade { from { opacity: 0; } } @keyframes slide { from { transform: translateX(30px); opacity: .6; } }
@media (max-width: 600px) { .scrim { align-items: flex-end; } .drawer, .drawer.wide { height: 92%; border-radius: 16px 16px 0 0; animation: up .2s ease; } .drawer-h { border-radius: 16px 16px 0 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet-menu { display: grid; gap: 4px; }
.sheet-menu a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.sheet-menu a.on { color: var(--accent); border-color: var(--accent); }
.sheet-menu .ico { width: 20px; height: 20px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; z-index: 40; font-size: 13.5px; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: fade .2s; }
.toast.bad { background: var(--bad); color: #fff; }
@media (max-width: 860px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.filters .field { min-width: 140px; flex: 1 1 140px; max-width: 220px; }
.demo-bar { font-size: 12px; background: var(--warm-soft); color: var(--ink); padding: 6px 12px; text-align: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.demo-bar button { border: 0; background: none; color: var(--accent); cursor: pointer; text-decoration: underline; padding: 0 4px; font-size: 12px; }
.loading { color: var(--muted); padding: 40px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; background: var(--surface); cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.diff { font-family: var(--f-mono); font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; background: var(--surface-2); border-radius: 6px; padding: 6px 8px; margin: 4px 0 0; }
.avail-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.avail-day { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px; display: grid; gap: 4px; align-content: start; min-height: 90px; min-width: 0; }
.avail-day h4 { margin: 0 0 2px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.slot { font: 500 12px var(--f-mono); background: var(--ok-soft); color: var(--ok); border-radius: 6px; padding: 3px 6px; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.slot button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }
@media (max-width: 860px) { .avail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
svg.ico { width: 16px; height: 16px; flex: none; }
.icon-btn svg.ico { width: 19px; height: 19px; }
.next-main .eyebrow svg.ico { width: 16px; height: 16px; }
.nav svg.ico { width: 18px; height: 18px; }
.tabbar svg.ico { width: 22px; height: 22px; }
.sheet-menu svg.ico { width: 20px; height: 20px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary h2::after { content: " ▾"; color: var(--muted); font-size: 12px; }
details.card[open] > summary { margin-bottom: 4px; }
form:has(input[name=roomMode][value=fixed]:checked) [data-custom-room] { display: none; }

/* ---------- 官网首页 ---------- */
.lp { background: var(--bg); min-height: 100%; }
.lp-wrap { max-width: 1120px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.lp-narrow { max-width: 820px; }
.lp-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-nav-in { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.lp-nav .sp { flex: 1; }
.lp-brand { display: inline-flex; align-items: center; min-width: 0; }
.lp-links { display: flex; gap: 2px; margin-left: 18px; }
.lp-links button { border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 14px; }
.lp-links button:hover { color: var(--ink); background: var(--surface-2); }
.lp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background-color: var(--accent-soft);
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px);
  background-size: 28px 28px; }
.lp-hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: max(24px, calc(50% - 560px + 24px)); width: 2px; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.lp-hero-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 72px 80px; position: relative; }
.lp-hero-copy { display: grid; gap: 18px; padding-left: 22px; }
.lp-eyebrow { margin: 0; font-size: 13px; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
.lp-hero h1 { font: 800 clamp(30px, 3.9vw, 46px)/1.2 var(--f-body); letter-spacing: -.01em; color: var(--ink); }
.lp-sub { margin: 0; font-size: 17px; color: var(--muted); max-width: 32em; line-height: 1.75; }
.lp-hero-cta { gap: 10px; }
.lp-mock { position: relative; min-height: 360px; }
.lp-mock-tag { position: absolute; top: -8px; right: 0; font-size: 11px; letter-spacing: .08em; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; z-index: 3; }
.lp-card { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(22, 32, 42, .10); display: grid; gap: 8px; }
.lp-card-a { top: 14px; left: 0; width: min(330px, 86%); transform: rotate(-2deg); z-index: 1; }
.lp-card-b { top: 168px; right: 0; width: min(320px, 84%); transform: rotate(1.5deg); z-index: 2; }
.lp-card-c { bottom: -6px; left: 8%; display: flex; align-items: baseline; gap: 10px; transform: rotate(-1deg); z-index: 2; }
.lp-card-c b { font-size: 26px; color: var(--accent); }
.lp-time { display: flex; align-items: baseline; gap: 10px; }
.lp-time b { font: 600 32px/1 var(--f-mono); }
.lp-time span { color: var(--muted); font-size: 13px; }
.lp-room { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.lp-room b { flex: 1; }
.lp-copy { font-size: 12px; color: var(--accent); }
.lp-sec { padding-block: 80px; }
.lp-band { background: var(--surface); border-block: 1px solid var(--line); }
.lp-h2 { font: 700 clamp(24px, 3vw, 32px)/1.3 var(--f-body); margin-bottom: 32px; max-width: 22em; }
.lp-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.lp-why article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.lp-why h3, .lp-teachers h3, .lp-price h3 { font: 700 18px var(--f-body); margin: 0; }
.lp-why p, .lp-teachers p, .lp-price p { margin: 0; color: var(--muted); line-height: 1.75; }
.lp-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--warm-soft); color: var(--warm); }
.lp-ico svg.ico { width: 22px; height: 22px; }
.lp-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; position: relative; }
.lp-flow li { counter-increment: step; display: grid; gap: 8px; padding: 0 20px 0 0; position: relative; align-content: start; }
.lp-flow li::before { content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 17px var(--f-mono); position: relative; z-index: 1; }
.lp-flow li::after { content: ""; position: absolute; top: 20px; left: 40px; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
.lp-flow li:last-child::after { display: none; }
.lp-flow b { font-size: 17px; margin-top: 6px; }
.lp-flow span { color: var(--muted); line-height: 1.7; }
.lp-teachers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.lp-teachers article { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.lp-avatar { width: 56px; height: 56px; font-size: 22px; background: var(--accent-soft); color: var(--accent); }
.lp-teachers .chips { margin-top: 8px; }
.lp-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 14px; }
.lp-price { border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 8px; align-content: start; background: var(--bg); }
.lp-price-trial { border-color: var(--accent); background: var(--accent-soft); }
.lp-amt { font: 700 36px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.lp-amt span { font-size: 20px; margin-right: 2px; } .lp-amt small { font-size: 14px; color: var(--muted); font-weight: 500; }
.lp-price .btn { justify-self: start; margin-top: 6px; }
.lp-faq { display: grid; gap: 10px; }
.lp-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.lp-faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq p { margin: 0 0 18px; color: var(--muted); line-height: 1.8; }
.lp-book { background: var(--accent); color: var(--accent-ink); }
.lp-book-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.lp-book-copy { display: grid; gap: 14px; }
.lp-book-copy p { margin: 0; opacity: .88; line-height: 1.8; }
.lp-book .card { color: var(--ink); padding: 24px; }
.lp-book .btn:not(.primary) { color: var(--ink); }
.lp-done { display: grid; gap: 10px; } .lp-done h3 { margin: 0; font-size: 20px; color: var(--ok); } .lp-done p { margin: 0; }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-foot { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); }
@media (max-width: 960px) {
  .lp-links { display: none; }
  .lp-hero-in, .lp-book-in { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 44px 56px; }
  .lp-why { grid-template-columns: minmax(0, 1fr); }
  .lp-flow { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .lp-flow li { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding: 0; }
  .lp-flow li::before { grid-row: span 2; }
  .lp-flow li b { margin-top: 8px; }
  .lp-flow li::after { top: 44px; left: 19px; right: auto; width: 2px; height: calc(100% - 22px); background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 12px); }
  .lp-sec { padding-block: 56px; }
}
@media (max-width: 600px) {
  .lp-wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .lp-nav .lp-cta-nav { display: none; }
  .lp-brand .bn small { display: none; }
  .lp-hero::before { left: 16px; }
  .lp-hero-copy { padding-left: 12px; }
  .lp-sub { font-size: 15.5px; }
  .lp-mock { min-height: 330px; }
  .lp-card-a { width: 88%; } .lp-card-b { top: 168px; width: 86%; } .lp-mock { min-height: 350px; }
  .lp-hero-cta .btn { flex: 1 1 auto; }
  .lp-foot .lp-wrap { gap: 6px; }
}

/* ---------- 动效：流动光晕、浮动卡片、手机端美化 ---------- */
:root { --glow-1: rgba(6, 78, 59, .20); --glow-2: rgba(92, 196, 154, .30); --glow-3: rgba(185, 230, 211, .55); --fx: #064e3b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --glow-1: rgba(92, 196, 154, .16); --glow-2: rgba(6, 78, 59, .55); --glow-3: rgba(127, 211, 174, .10); --fx: #7fd3ae; } }
:root[data-theme="dark"] { --glow-1: rgba(92, 196, 154, .16); --glow-2: rgba(6, 78, 59, .55); --glow-3: rgba(127, 211, 174, .10); --fx: #7fd3ae; }
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i { position: absolute; width: 70vmax; height: 70vmax; max-width: 1100px; max-height: 1100px; border-radius: 50%; will-change: transform; }
.aurora i:nth-child(1) { background: radial-gradient(circle at center, var(--glow-1), transparent 62%); top: -45%; left: -25%; animation: aur1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: radial-gradient(circle at center, var(--glow-2), transparent 60%); top: -10%; right: -35%; animation: aur2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: radial-gradient(circle at center, var(--glow-3), transparent 60%); bottom: -55%; left: 15%; animation: aur3 38s ease-in-out infinite alternate; }
@keyframes aur1 { to { transform: translate3d(18%, 14%, 0) scale(1.15); } }
@keyframes aur2 { to { transform: translate3d(-16%, 18%, 0) scale(.9); } }
@keyframes aur3 { to { transform: translate3d(-12%, -20%, 0) scale(1.2); } }
.lp-hero > .lp-wrap, .lp-book > .lp-wrap, .login-side > *:not(.aurora), .next-main > *:not(.aurora) { position: relative; z-index: 1; }
.lp-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.lp-hero { background-image: none; }
.lp-hero::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent); }
.lp-hero::before { z-index: 1; }
.lp-book { position: relative; overflow: hidden; --glow-1: rgba(255, 255, 255, .10); --glow-2: rgba(92, 196, 154, .35); --glow-3: rgba(0, 0, 0, .18); }
.login-side { --glow-1: rgba(255, 255, 255, .10); --glow-2: rgba(92, 196, 154, .38); --glow-3: rgba(0, 0, 0, .2); }
.next-main { position: relative; overflow: hidden; --glow-1: color-mix(in srgb, var(--accent) 10%, transparent); --glow-2: color-mix(in srgb, var(--accent) 7%, transparent); --glow-3: transparent; }
.lp-card-a { --r: -2deg; } .lp-card-b { --r: 1.5deg; } .lp-card-c { --r: -1deg; }
.lp-card { animation: bob 7s ease-in-out infinite; }
.lp-card-b { animation-delay: -2.3s; animation-duration: 8s; } .lp-card-c { animation-delay: -4.1s; animation-duration: 6.5s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-8px) rotate(var(--r)); } }
.lp-hero h1 .hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 22%, transparent) 62%); }
.lp-sticky { display: none; }
@supports (animation-timeline: view()) {
  .lp-why article, .lp-flow li, .lp-teachers article, .lp-price, .lp-faq details { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  @keyframes rise { from { transform: translateY(18px); opacity: .35; } to { transform: none; opacity: 1; } }
}
@media (max-width: 600px) {
  .lp-nav { background: color-mix(in srgb, var(--surface) 78%, transparent); }
  .lp-hero-in { padding-block: 36px 52px; }
  .lp-hero h1 { font-size: 31px; line-height: 1.22; }
  .lp-eyebrow { display: inline-flex; justify-self: start; align-items: center; gap: 6px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); border-radius: 999px; padding: 4px 12px; letter-spacing: .08em; }
  .lp-hero-cta .btn { border-radius: 999px; }
  .lp-mock { margin-inline: -4px; }
  .lp-card { border-radius: 16px; backdrop-filter: blur(6px); background: color-mix(in srgb, var(--surface) 88%, transparent); }
  .lp-h2 { font-size: 23px; margin-bottom: 20px; }
  .lp-sec { padding-block: 48px; }
  /* 横向滑动卡片 */
  .lp-why, .lp-teachers, .lp-prices { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 14px; scroll-padding-inline: 16px; scrollbar-width: none; }
  .lp-why::-webkit-scrollbar, .lp-teachers::-webkit-scrollbar, .lp-prices::-webkit-scrollbar { display: none; }
  .lp-why > *, .lp-teachers > *, .lp-prices > * { scroll-snap-align: start; }
  .lp-why article { padding: 20px; border-radius: 18px; box-shadow: 0 6px 20px rgba(6, 78, 59, .07); }
  .lp-price { border-radius: 18px; }
  .lp-teachers article { border-radius: 18px; }
  .lp-swipe { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: -8px 0 12px; }
  .lp-faq details { border-radius: 14px; padding: 0 16px; }
  .lp-faq summary { font-size: 15px; padding: 14px 0; }
  .lp-book .card { border-radius: 18px; padding: 18px; }
  .lp-sticky { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .28s ease; }
  .lp-sticky.on { transform: none; }
  .lp-sticky .btn.primary { flex: 1; border-radius: 999px; }
  .lp-sticky .btn:not(.primary) { border-radius: 999px; }
  .lp-foot { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  /* 学员端手机美化 */
  .next { border-radius: 18px; }
  .card { border-radius: 14px; }
  .lesson { border-radius: 14px; }
  .tabbar { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(12px); }
}
@media (min-width: 601px) { .lp-swipe { display: none; } }
@media (prefers-reduced-motion: reduce) { .aurora i, .lp-card { animation: none !important; } .lp-fx { display: none; } .lp-sticky { transition: none; } }
.lp-sec { scroll-margin-top: 64px; }

/* ---------- 系统内页品牌化：深绿侧栏、欢迎横幅 ---------- */
:root { --side-bg: #064e3b; --side-ink: rgba(255, 255, 255, .86); --side-muted: rgba(255, 255, 255, .55); --side-hover: rgba(255, 255, 255, .08); --side-on: rgba(255, 255, 255, .15); --side-line: rgba(255, 255, 255, .12); --side-hi: #7fd3ae; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --side-bg: #0c1f19; --side-hi: #5cc49a; } }
:root[data-theme="dark"] { --side-bg: #0c1f19; --side-hi: #5cc49a; }
.side { background: var(--side-bg); color: var(--side-ink); border-right: 0; overflow-x: hidden; }
.side .logo { color: #ffffff; }
.side .brandmark .bn b { color: #ffffff; }
.side .brandmark .bn small, .side .role-tag, .side .nav-group, .side .side-foot { color: var(--side-muted); }
.side .role-tag { display: inline-flex; align-self: flex-start; border: 1px solid var(--side-line); border-radius: 999px; padding: 1px 10px; margin-left: 8px; font-size: 11.5px; letter-spacing: .06em; }
.side .nav a { color: var(--side-ink); position: relative; }
.side .nav a:hover { background: var(--side-hover); }
.side .nav a.on { background: var(--side-on); color: #ffffff; }
.side .nav a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--side-hi); }
.side .side-foot .btn { background: transparent; color: #ffffff; border-color: var(--side-line); }
.side .side-foot .btn:hover { background: var(--side-hover); }
.side-mark { position: absolute; width: 190px; height: 210px; right: -46px; bottom: 70px; color: #ffffff; opacity: .05; pointer-events: none; }
.side > *:not(.side-mark) { position: relative; z-index: 1; }
.hello { position: relative; overflow: hidden; border-radius: 16px; background: var(--accent); color: #ffffff; --glow-1: rgba(255, 255, 255, .12); --glow-2: rgba(92, 196, 154, .40); --glow-3: rgba(0, 0, 0, .18); }
.hello-in { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 22px 24px; }
.hello-txt { min-width: 0; display: grid; gap: 4px; }
.hello h2 { font: 700 24px/1.25 var(--f-body); }
.hello-date { margin: 0; font-size: 12.5px; opacity: .75; letter-spacing: .04em; }
.hello-sub { margin: 0; opacity: .9; }
.hello-sub b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hello-act { display: flex; gap: 8px; flex-wrap: wrap; }
.hello-act .btn { background: rgba(255, 255, 255, .12); color: #ffffff; border-color: rgba(255, 255, 255, .22); }
.hello-act .btn:hover { background: rgba(255, 255, 255, .2); }
.hello-act .btn.primary { background: #ffffff; color: #064e3b; border-color: #ffffff; }
.hello-act .badge { background: #ffffff; color: #064e3b; }
.hello-mark { position: absolute; right: 18px; top: 50%; transform: translateY(-50%) rotate(-6deg); width: 120px; height: 132px; color: #ffffff; opacity: .07; z-index: 0; }
:root[data-theme="dark"] .hello { background: #0f3a2d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hello { background: #0f3a2d; } }
.tbl th { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); color: color-mix(in srgb, var(--accent) 55%, var(--muted)); }
.stat .v { color: var(--ink); }
.card-h h2 { letter-spacing: .01em; }
.top { border-bottom-color: color-mix(in srgb, var(--accent) 10%, var(--line)); }
@media (max-width: 860px) {
  .tabbar a.on .ico { background: var(--accent-soft); border-radius: 999px; padding: 3px 14px; width: 50px; height: 28px; }
  .tabbar svg.ico { width: 50px; height: 28px; padding: 3px 14px; }
  .hello-in { padding: 18px; }
  .hello h2 { font-size: 21px; }
  .hello-act { width: 100%; }
  .hello-act .btn { flex: 1 1 auto; }
  .hello-mark { width: 90px; height: 100px; top: 16px; transform: rotate(-6deg); }
  .top { background: color-mix(in srgb, var(--surface) 82%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .hello .aurora i { animation: none !important; } }

/* ---------- 手机端字号放大（系统内页） ---------- */
@media (max-width: 860px) {
  .shell { font-size: 15.5px; line-height: 1.65; }
  .shell .small, .shell .card-h .sub, .shell .tbl th, .shell .issue, .shell .lesson .what .m, .shell .ntf .at, .shell .stat .k, .shell .label, .shell .fb-sec .k, .shell .field > span { font-size: 13.5px; }
  .shell .tbl { font-size: 14.5px; }
  .shell .tbl td { padding: 11px 12px; }
  .shell .kv { font-size: 15px; grid-template-columns: 5.6em minmax(0, 1fr); }
  .shell .pill { font-size: 13px; padding: 2px 10px; }
  .shell .btn { font-size: 15px; padding: 9px 16px; }
  .shell .btn.sm { font-size: 14px; padding: 6px 12px; }
  .shell .card-h h2 { font-size: 17.5px; }
  .shell .lesson .what .t { font-size: 16px; }
  .shell .lesson .when b { font-size: 19px; }
  .shell .lesson .when span { font-size: 12.5px; }
  .shell .ntf .t { font-size: 16px; } .shell .ntf .bd { font-size: 14.5px; }
  .shell .stat .v { font-size: 30px; }
  .shell .seg button { font-size: 14.5px; padding: 8px 14px; }
  .shell .chip { font-size: 14px; padding: 5px 13px; }
  .shell .room-row .k { font-size: 13px; } .shell .room-row .v { font-size: 17px; }
  .shell .ev { font-size: 13.5px; }
  .shell .day-h { font-size: 13px; }
  .shell .tl .d { font-size: 13px; } .shell .tl .b .m { font-size: 14px; }
  .shell .note, .shell .err { font-size: 14.5px; }
  .shell .radio-cards label, .shell .checks label { font-size: 15px; padding: 10px 12px; }
  /* iOS 输入框小于 16px 会自动放大页面，统一 16px */
  .shell input, .shell select, .shell textarea, .drawer input, .drawer select, .drawer textarea, .login input, .lp input, .lp select, .lp textarea { font-size: 16px !important; }
  .tabbar a { font-size: 12px; }
  .top h1 { font-size: 18px; }
  .drawer { font-size: 15.5px; }
  .drawer .small, .drawer .field > span, .drawer .card-h .sub { font-size: 13.5px; }
  .drawer .kv { font-size: 15px; }
  .drawer .btn { font-size: 15px; padding: 9px 16px; } .drawer .btn.sm { font-size: 14px; }
  .drawer .pill { font-size: 13px; }
  .drawer .tbl { font-size: 14.5px; }
  .drawer .radio-cards label { font-size: 15px; }
  .drawer-h h2 { font-size: 18px; }
  .sheet-menu a { font-size: 16px; padding: 14px; }
  .hello-date { font-size: 13.5px; } .hello-sub { font-size: 15.5px; }
}

/* ---------- 中英文切换按钮 ---------- */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--accent); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; }
.lang-btn:hover { border-color: var(--accent); }
.lang-btn svg.ico { width: 16px; height: 16px; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 2px; }
@media (max-width: 860px) { .lang-btn { padding: 0 10px; font-size: 14px; } }
.login-head { justify-content: space-between; flex-wrap: nowrap; }

/* ---------- 登录页上方动效 ---------- */
.login-side { --fx: #ffffff; isolation: isolate; }
.login-fx { z-index: 0; opacity: .9; }
.login-beam { position: absolute; inset: -40% -60%; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .07) 48%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .07) 52%, transparent 58%);
  transform: translateX(-60%); animation: beam 9s ease-in-out 1.2s infinite; }
@keyframes beam { 0% { transform: translateX(-60%); } 45%, 100% { transform: translateX(60%); } }
.login-mark { position: absolute; right: -40px; top: 50%; width: min(46%, 420px); aspect-ratio: 41 / 45; max-width: 100%; transform: translateY(-50%) rotate(-8deg); z-index: 0; pointer-events: none; animation: markfloat 12s ease-in-out infinite; }
.login-mark svg { width: 100%; height: 100%; overflow: visible; }
.login-mark .lm-body { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .22); stroke-width: .25; }
.login-mark .lm-bolt { fill: none; stroke: rgba(127, 211, 174, .9); stroke-width: .5; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: boltdraw 6s ease-in-out .6s infinite; filter: drop-shadow(0 0 1.5px rgba(127, 211, 174, .9)); }
.login-mark .lm-sweep { animation: sweep 6s ease-in-out 1.4s infinite; }
@keyframes markfloat { 0%, 100% { transform: translateY(-50%) rotate(-8deg); } 50% { transform: translateY(calc(-50% - 14px)) rotate(-6deg); } }
@keyframes boltdraw { 0% { stroke-dashoffset: 90; opacity: 0; } 15% { opacity: 1; } 45% { stroke-dashoffset: 0; opacity: 1; } 75% { stroke-dashoffset: 0; opacity: .0; } 100% { stroke-dashoffset: 90; opacity: 0; } }
@keyframes sweep { 0%, 55% { transform: translateX(0); } 85%, 100% { transform: translateX(80px); } }
.login-side > .brandmark, .login-side > div:not(.aurora):not(.login-beam):not(.login-mark), .login-side > .ticket { position: relative; z-index: 1; }
.login-side h1, .login-side p, .login-side .ticket { animation: rise-in .9s cubic-bezier(.2, .7, .2, 1) both; }
.login-side p { animation-delay: .12s; }
.login-side .ticket { animation-delay: .26s; background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .25); position: relative; overflow: hidden; }
.login-side .ticket::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .18) 50%, transparent 65%); transform: translateX(-100%); animation: sheen 7s ease-in-out 2s infinite; }
@keyframes sheen { 0%, 70% { transform: translateX(-100%); } 90%, 100% { transform: translateX(100%); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-side h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, .15); }
@media (max-width: 860px) {
  .login-side { min-height: 260px; }
  .login-mark { width: 52%; right: -28px; opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .login-beam, .login-mark, .login-mark .lm-bolt, .login-mark .lm-sweep, .login-side .ticket::after, .login-side h1, .login-side p, .login-side .ticket { animation: none !important; }
  .login-mark .lm-bolt { stroke-dashoffset: 0; }
}
.login-side > canvas.login-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.login-side > .login-beam, .login-side > .login-mark { position: absolute; z-index: 0; }
.login { min-height: 100vh; min-height: 100dvh; }
.demo-bar + .login { min-height: calc(100vh - 30px); min-height: calc(100dvh - 30px); }
.login-side .ticket { max-width: 420px; }
.login-side .ticket .t-v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .login, .demo-bar + .login { min-height: 0; } }

/* ---------- 登录页光影柔化 ---------- */
.login-side { --glow-1: rgba(255, 255, 255, .06); --glow-2: rgba(92, 196, 154, .20); --glow-3: rgba(0, 0, 0, .10); }
.login-side .aurora i { animation-duration: 40s, 40s; }
.login-fx { opacity: .5; }
.login-beam {
  inset: -50% -80%;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .025) 42%, rgba(255, 255, 255, .055) 50%, rgba(255, 255, 255, .025) 58%, transparent 70%);
  filter: blur(18px);
  animation: beam-soft 22s ease-in-out infinite alternate;
}
@keyframes beam-soft { from { transform: translateX(-35%); } to { transform: translateX(35%); } }
.login-mark { opacity: .85; animation-duration: 18s; -webkit-mask-image: radial-gradient(ellipse at 40% 50%, #000 45%, transparent 85%); mask-image: radial-gradient(ellipse at 40% 50%, #000 45%, transparent 85%); }
.login-mark .lm-body { fill: rgba(255, 255, 255, .045); stroke: none; }
.login-mark .lm-sweep { display: none; }
.login-mark .lm-bolt { stroke: rgba(160, 225, 196, .42); stroke-width: .35; filter: none; animation: boltdraw-soft 12s ease-in-out .8s infinite; }
@keyframes boltdraw-soft {
  0% { stroke-dashoffset: 90; opacity: 0; }
  12% { opacity: .9; }
  40% { stroke-dashoffset: 0; opacity: 1; }
  70% { stroke-dashoffset: 0; opacity: .6; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.login-side .ticket { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); box-shadow: 0 8px 30px rgba(0, 0, 0, .10), inset 0 1px 0 rgba(255, 255, 255, .12); }
.login-side .ticket::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); filter: blur(6px); animation: sheen-soft 14s ease-in-out 3s infinite; }
@keyframes sheen-soft { 0%, 60% { transform: translateX(-110%); } 100% { transform: translateX(110%); } }
.login-side h1 { text-shadow: 0 1px 16px rgba(0, 0, 0, .08); }
.login-side h1, .login-side p, .login-side .ticket { animation-duration: 1.2s; }
@media (max-width: 860px) {
  .login-fx { opacity: .32; }
  .login-mark { opacity: .55; width: 46%; right: -36px; }
  .login-mark .lm-bolt { stroke: rgba(160, 225, 196, .32); }
}
/* 首页小动物飞行层：只在首屏大图区域内，不挡点击 */
.lp-critters { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .lp-critters { display: none; } }
@media (min-width: 601px) { .lp-teachers { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); } }
@media (min-width: 601px) and (max-width: 960px) { .lp-teachers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 字号调整（内容区与弹窗按比例缩放） ---------- */
.shell .content, .drawer-b { zoom: var(--fs, 1); }
.fs-pick { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 4px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); flex: none; }
.fs-pick svg.ico { width: 16px; height: 16px; }
.fs-pick select { border: 0; background: transparent; font-weight: 600; color: var(--ink); padding: 4px 2px; cursor: pointer; }
.fs-seg { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fs-seg button { padding: 8px 4px; }
.fs-seg button[data-v="s"] { font-size: 12.5px; } .fs-seg button[data-v="m"] { font-size: 14px; } .fs-seg button[data-v="l"] { font-size: 15.5px; } .fs-seg button[data-v="xl"] { font-size: 17px; }
.nowrap{white-space:nowrap}
details.rules > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
details.rules > summary::-webkit-details-marker { display: none; }
details.rules > summary::after { content: '▾'; color: var(--muted, #6b7280); transition: transform .2s; }
details.rules[open] > summary::after { transform: rotate(180deg); }
