/* 排课记录工具（/{lang}/lesson 与 /{lang}/lesson/{链接码}）共用样式，手机优先。
   色调：纸色背景 + 深青主色；绿色 = 已确认，琥珀 = 待确认，灰 = 已取消。 */
:root {
  color-scheme: light;
  --bg: #F5F3EE;
  --panel: #FFFFFF;
  --ink: #1D2125;
  --muted: #687078;
  --faint: #9AA0A6;
  --line: #E5E1D8;
  --line-2: #EFECE6;
  --accent: #0E6E66;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3F1EF;
  --ok: #17804A;
  --ok-soft: #E6F4EC;
  --wait: #A85A06;
  --wait-soft: #FCF0DC;
  --off: #8A8F94;
  --off-soft: #EEEEEC;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(29, 33, 37, .06), 0 4px 14px rgba(29, 33, 37, .06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
/* 日文、韩文页面用各自的字体，免得汉字按中文字形显示 */
html:lang(ja) { --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Segoe UI", Roboto, sans-serif; }
html:lang(ko) { --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif; }
/* 韩文按词换行，不在词中间断开；长链接照样能折行 */
html:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: pan-x pan-y; } /* 不允许双指缩放、双击放大 */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 243, 238, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.bar .wrap { display: flex; align-items: center; gap: 8px; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); min-width: 0; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 17px; height: 17px; }
.bar .spacer { flex: 1; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn.icon { width: 34px; padding: 0; justify-content: center; }
.back-link { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.back-link svg { width: 18px; height: 18px; }

/* ---------- 通用块 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.section { margin: 20px 0; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; margin: 0 0 10px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; text-align: center; line-height: 1.2;
  transition: transform .06s ease, background-color .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-danger { background: var(--panel); border-color: #F1C9C4; color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-google { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-google img, .btn-google svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--accent); font-weight: 600; font-size: 14px; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field > span em { font-style: normal; color: var(--faint); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FCFBF9;
  font-size: 16px; /* 16px：iOS 聚焦不放大 */
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 110, 102, .14); background: #fff; }
/* minmax(0, 1fr)：列宽不被里面控件的最小宽度撑开（iOS 的日期 / 时间框有原生最小宽度，会顶出屏幕） */
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.row2 > * { min-width: 0; }
/* iOS Safari 的日期 / 时间框：去掉原生外观和最小宽度，文字靠左，空的时间框也保持同样高度 */
input[type="date"].input, input[type="time"].input {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; height: 46px; line-height: 24px; text-align: left;
}
input[type="date"].input::-webkit-date-and-time-value, input[type="time"].input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.seg { display: flex; padding: 3px; background: #ECE9E2; border-radius: 12px; gap: 3px; }
.seg button {
  flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent;
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick button {
  min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); font-size: 13px; font-weight: 600; color: var(--muted);
}
.quick button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #D6D2C9; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(14, 110, 102, .25); }

/* ---------- 按时长分档的价格 ---------- */
.tiers { display: grid; gap: 8px; }
.tiers:not(:empty) { margin-bottom: 4px; }
.tier-head, .tier-row { display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.tier-head { font-size: 12px; font-weight: 600; color: var(--faint); margin: -2px 0 6px; }
.affix { position: relative; display: block; }
.affix .input { padding-right: 48px; }
.affix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--muted); pointer-events: none; }
.tier-eq { text-align: center; color: var(--faint); font-weight: 700; }
.tier-warn { grid-column: 1 / -1; margin-top: -2px; padding: 6px 10px; border-radius: 8px; background: var(--wait-soft); color: #7A4205; font-size: 13px; }
.tier-warn .link-btn { padding: 0; font-size: 13px; }
.tier-del { width: 40px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); display: grid; place-items: center; }
.tier-del svg { width: 16px; height: 16px; }
.tier-add { text-align: left; }
.tier-hint { margin: 2px 0 0; }
.field > span.price-auto { display: block; margin: 6px 0 0; font-size: 12px; color: var(--accent); font-weight: 600; }

/* ---------- 价格行、修改记录、导出 ---------- */
.price-line {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--ink);
  font-size: 14px; text-align: left;
}
.price-line > span { flex: 1; min-width: 0; }
.price-line b { color: var(--accent); font-size: 13px; white-space: nowrap; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.hist { display: grid; gap: 8px; }
.hist-item { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; background: #FCFBF9; }
.hist-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.hist-head b { flex: 1; }
.hist-head .faint { font-size: 12px; }
.hist-line { display: grid; grid-template-columns: 40px 1fr; gap: 6px; font-size: 13px; color: #3E454C; overflow-wrap: anywhere; }
.hist-line em { font-style: normal; color: var(--faint); }
.exp-preview { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; min-height: 120px; }
.exp-preview img { display: block; width: 100%; height: auto; -webkit-touch-callout: default; }
a.btn.disabled { opacity: .5; pointer-events: none; }

/* ---------- 底部弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 22, 25, .42);
  opacity: 0; transition: opacity .2s ease;
}
.sheet-mask.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--panel); border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(18px + var(--safe-b));
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet.show { transform: translateY(0); }
@media (min-width: 640px) {
  .sheet { left: 50%; right: auto; width: 560px; margin-left: -280px; bottom: 24px; border-radius: 18px; }
}
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: #DCD8CF; margin: 2px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 18px; }
.sheet-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #F1EFEA; display: grid; place-items: center; color: var(--muted); }
.sheet-close svg { width: 18px; height: 18px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px;
  background: rgba(29, 33, 37, .92); color: #fff; font-size: 14px; font-weight: 600; text-align: center;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: #0B4F49; font-size: 14px; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.notice.warn { background: var(--wait-soft); color: #7A4205; }

/* ---------- 链接框 ---------- */
.linkbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #FCFBF9; margin-bottom: 12px; }
.linkbox h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.linkbox p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.linkbox code {
  display: block; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px dashed var(--line);
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: var(--ink); margin-bottom: 10px;
  user-select: all; -webkit-user-select: all;
}
.linkbox .btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 身份标签 ---------- */
.role { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.role.TEACHER { background: var(--accent-soft); color: var(--accent); }
.role.PARENT { background: #EDE9FB; color: #5B3FC4; }

/* ---------- 账号 ---------- */
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.me-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.me-row:last-child { border-bottom: 0; }
.me-row .grow { flex: 1; min-width: 0; }
.me-row .t { font-weight: 700; }
.me-row .d { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* ============================================================= 介绍页 */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
.hero p { margin: 0; color: var(--muted); font-size: 15px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hero-tags span { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 4px 9px; border-radius: 999px; }
.create h2 { margin: 0 0 14px; font-size: 18px; }
.done-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.done-head .tick { width: 36px; height: 36px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; flex: none; }
.done-head .tick svg { width: 20px; height: 20px; }
.done-head h2 { margin: 0; font-size: 18px; }
.boards { display: grid; gap: 8px; }
.board-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; color: var(--ink);
}
.board-item .grow { flex: 1; min-width: 0; }
.board-item .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-item .d { font-size: 13px; color: var(--muted); }
.board-item .badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--wait-soft); color: var(--wait); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.board-item svg.chev { width: 18px; height: 18px; color: var(--faint); flex: none; }
.steps { counter-reset: s; display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.steps li { position: relative; padding: 12px 14px 12px 50px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center;
}
.steps b { display: block; }
.steps span { font-size: 14px; color: var(--muted); }
.faq details { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 8px; }
.faq summary { list-style: none; padding: 13px 40px 13px 14px; font-weight: 700; position: relative; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 20px; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: 14px; }
.foot { padding: 24px 0 40px; text-align: center; font-size: 13px; color: var(--faint); }
.foot a { color: var(--muted); }

/* ============================================================= 记录页 */
.board-head { padding: 16px 0 4px; }
.board-head h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.board-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.stat { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.stat .v { font-size: 22px; font-weight: 800; line-height: 1.15; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.stat.ok .v { color: var(--ok); }
.stat.wait .v { color: var(--wait); }
.money { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 10px 12px; margin-bottom: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; font-size: 13px; color: var(--muted); }
.money b { font-size: 17px; color: var(--ink); }
.money .ok b { color: var(--ok); }
.viewbar { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.viewbar .seg { flex: 1; }
.nav { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.unc-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 14px; font-weight: 700;
}
.unc-btn svg { width: 16px; height: 16px; flex: none; }
.unc-btn b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ECE9E2; color: var(--ink); font-size: 12px; display: inline-grid; place-items: center; }
.unc-btn b:empty { display: none; }
.unc-btn.mine { color: var(--wait); border-color: #EBC48F; }
.unc-btn.mine b { background: var(--wait); color: #fff; }
.unc-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.unc-btn[aria-pressed="true"] b { background: rgba(255,255,255,.22); color: #fff; }
.unc-head { margin-bottom: 10px; }
.unc-top { display: flex; align-items: flex-start; gap: 10px; }
.unc-top .grow { flex: 1; min-width: 0; }
.unc-top b { display: block; font-size: 16px; }
.unc-top .grow span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.unc-top .btn svg { width: 16px; height: 16px; }
.unc-head .quick { margin-top: 10px; }
.unc-head p { margin: 8px 0 0; }
.nav button.arrow { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--ink); flex: none; }
.nav button.arrow svg { width: 20px; height: 20px; }
.nav .label { flex: 1; text-align: center; border: 0; background: none; padding: 4px; }
.nav .label b { display: block; font-size: 16px; }
.nav .label span { font-size: 12px; color: var(--accent); font-weight: 700; }

.day { margin-bottom: 10px; }
.day-head { display: flex; align-items: center; gap: 8px; padding: 6px 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.day-head .today { color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 6px; font-size: 11px; }
.day-head .grow { flex: 1; }
.day-add { width: 30px; height: 30px; border-radius: 9px; border: 1px dashed #CFCABF; background: transparent; color: var(--muted); display: grid; place-items: center; }
.day-add svg { width: 16px; height: 16px; }
.day-empty { padding: 2px 2px 4px; font-size: 13px; color: var(--faint); }
.day.empty .day-head { padding-bottom: 0; }

.lesson {
  position: relative; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 8px; overflow: hidden;
}
.lesson::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.lesson.both::before { background: var(--ok); }
.lesson.pending::before { background: #E8B05C; }
.lesson.cancelled { background: #FAFAF8; box-shadow: none; }
.lesson.cancelled .l-main { color: var(--off); text-decoration: line-through; }
/* 双方确认未上课：灰色、划掉（和取消一样不计钱）；双方不一致：红色 */
.lesson.missed { background: #FAFAF8; box-shadow: none; }
.lesson.missed::before { background: var(--off); }
.lesson.missed .l-main { color: var(--off); text-decoration: line-through; }
.lesson.conflict::before { background: var(--danger); }
.l-top { display: flex; align-items: baseline; gap: 8px; }
.l-time { font-size: 17px; font-weight: 800; }
.l-dur { font-size: 13px; color: var(--muted); }
.l-price { margin-left: auto; font-size: 16px; font-weight: 800; }
.l-date { font-size: 13px; color: var(--muted); font-weight: 600; }
.l-topic { margin-top: 2px; font-size: 15px; overflow-wrap: anywhere; }
.l-topic.none { color: var(--faint); font-size: 14px; }
.l-status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill svg { width: 14px; height: 14px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.wait { background: var(--wait-soft); color: var(--wait); }
.pill.off { background: var(--off-soft); color: var(--off); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.future { background: #F1EFEA; color: var(--muted); }
.pill.extra { background: #EAF0FD; color: #2F5BC4; }
.lesson.cancelled .l-status .pill.extra { opacity: .7; }
.l-notes { margin-top: 10px; display: grid; gap: 6px; }
.l-note { font-size: 13px; color: #3E454C; background: #F7F6F2; border-radius: 8px; padding: 7px 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.l-note b { color: var(--muted); font-weight: 700; margin-right: 4px; }
.l-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.l-actions .btn { min-height: 40px; font-size: 14px; border-radius: 10px; }
.l-actions .grow { flex: 1; }
.l-actions .icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--muted); flex: none; }
.l-actions .icon-btn svg { width: 18px; height: 18px; }
.l-hint { font-size: 13px; color: var(--faint); }

.empty-week { text-align: center; padding: 26px 16px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-week p { margin: 0 0 14px; color: var(--muted); }
.empty-week .btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 10px 0 calc(10px + var(--safe-b));
}
.dock .wrap { display: flex; gap: 8px; }
.dock .btn { flex: 1; min-width: 0; min-height: 46px; padding: 0 8px; font-size: 14px; white-space: nowrap; gap: 6px; }
.dock .btn.narrow { flex: 0 0 auto; }
.has-dock { padding-bottom: calc(86px + var(--safe-b)); }
.more-menu { display: grid; gap: 8px; }
.more-menu .btn { justify-content: flex-start; }

.state { text-align: center; padding: 60px 20px; color: var(--muted); }
.state h1 { font-size: 20px; color: var(--ink); margin: 0 0 8px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
@media (max-width: 360px) {
  .stats { gap: 6px; }
  .stat { padding: 8px; }
  .stat .v { font-size: 19px; }
  .dock .btn { font-size: 13px; }
}

/* 语言菜单（顶栏，<details> 下拉） */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary svg { width: 16px; height: 16px; flex: none; }
.lang-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; display: grid; min-width: 150px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.lang-pop a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; }
.lang-pop a:hover { background: var(--line-2); }
.lang-pop a[aria-current] { color: var(--accent); background: var(--accent-soft); }
/* 记录页顶栏按钮多，语言按钮只留地球图标 */
.has-dock .lang-menu > summary { width: 34px; padding: 0; justify-content: center; }
.has-dock .lang-menu > summary span { display: none; }
/* 两种确认按钮：单独一行、等宽，各语言都不折行 */
.l-confirm { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.l-confirm .btn { min-height: 40px; font-size: 14px; border-radius: 10px; white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.l-confirm + .l-actions { margin-top: 8px; }
.l-confirm.one { grid-template-columns: 1fr; }
/* 确认上课前调时长：上课时长  −  60 分钟  + */
.l-min { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 14px; }
.l-min-label { color: var(--muted); }
.l-min-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.l-min-btn:active { background: var(--line-2); }
.l-min-val { min-width: 64px; text-align: center; }
.l-min-val b { font-size: 16px; }
.l-min-other { font-size: 13px; }
.l-dur .l-plan { opacity: .55; font-weight: 400; margin-left: 2px; }

/* 2026-11-06：通知邮箱（不注册）+ 老师确认时的课堂反馈 */
.tip-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.mail-add { display: flex; gap: 8px; margin: 12px 0 4px; }
.mail-add .input { flex: 1; min-width: 0; }
.mail-add .btn { flex: none; padding: 0 18px; }
.mail-line { margin-top: 8px; }
.mail-line svg { flex: none; width: 18px; height: 18px; color: var(--accent); }
.mail-line > span { overflow-wrap: anywhere; }
.mail-line em { font-style: normal; font-weight: 700; margin-right: 8px; }
.mail-line.empty { border-color: var(--accent); background: var(--accent-soft); }
.mail-line.empty > span { color: #0B4F49; }
.mail-line.pending > span { color: #7A4205; }
.l-fb { display: block; margin: 10px 0 0; }
.l-fb > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.l-fb > span em { font-style: normal; font-weight: 400; color: var(--faint); }
.l-fb .textarea { min-height: 64px; }
/* 确认弹框里的课后备注：整块高亮，一眼能看到 */
.l-note-entry { margin: 2px 0 14px; padding: 12px 12px 10px; background: var(--accent-soft); border: 1px solid rgba(14, 110, 102, .18); border-radius: 12px; }
.l-note-entry-h { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }
.l-note-entry-h svg { width: 16px; height: 16px; flex: none; }
.l-note-entry-h em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); margin-left: auto; }
.l-note-entry .textarea { min-height: 88px; background: #fff; }
