/* 布局：桌面端左侧手账式导航 + 右侧内容；手机端底部标签栏 + 更多抽屉
   视觉：樱花纸张底色、梅子棕文字、玫瑰粉强调，便签与纸胶带作为“班主任手账”的母题 */
:root {
  --bg: #FFF4F7;          /* 樱花纸 */
  --paper: #FFFFFF;
  --ink: #4A2B36;         /* 梅子棕 */
  --muted: #9A7884;
  --line: #F5DCE4;
  --rose: #E85D8A;        /* 主强调 */
  --rose-ink: #C23E6B;
  --rose-soft: #FFE3EC;
  --on-rose: #FFFFFF;
  --peach: #FFE4D4;
  --butter: #FFF1C9;
  --mint: #D6F2E4;
  --mint-ink: #2C8A62;
  --lilac: #ECE3FF;
  --lilac-ink: #7356C4;
  --warn: #D9822B;
  --danger: #D2475E;
  --shadow: 0 1px 0 rgba(200,120,150,.12), 0 8px 24px -12px rgba(200,90,130,.28);
  --grid: rgba(232,93,138,.07);
  --font: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1F1418; --paper: #2B1C22; --ink: #FBE8EF; --muted: #C29CAB; --line: #44303A;
    --rose: #FF8DB1; --rose-ink: #FFA9C4; --on-rose: #2B1C22; --rose-soft: #4A2433; --peach: #4A3027; --butter: #463C22;
    --mint: #1F3D31; --mint-ink: #7FDCB0; --lilac: #332A4D; --lilac-ink: #BCA8FF;
    --warn: #F0A656; --danger: #FF7D90; --grid: rgba(255,141,177,.06);
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 26px -14px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1F1418; --paper: #2B1C22; --ink: #FBE8EF; --muted: #C29CAB; --line: #44303A;
  --rose: #FF8DB1; --rose-ink: #FFA9C4; --on-rose: #2B1C22; --rose-soft: #4A2433; --peach: #4A3027; --butter: #463C22;
  --mint: #1F3D31; --mint-ink: #7FDCB0; --lilac: #332A4D; --lilac-ink: #BCA8FF;
  --warn: #F0A656; --danger: #FF7D90; --grid: rgba(255,141,177,.06);
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 26px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--rose); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--font-round); text-wrap: balance; margin: 0; letter-spacing: .02em; }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-round); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 外壳 ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100%; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px 24px;
  display: flex; flex-direction: column; gap: 18px; border-right: 1.5px dashed var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand b { display: block; font: 700 17px/1.25 var(--font-round); }
.brand small { color: var(--muted); font-size: 12.5px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px;
  color: var(--ink); text-decoration: none; font-weight: 500; position: relative;
}
.nav a:hover { background: var(--rose-soft); }
.nav a.on { background: var(--paper); color: var(--rose-ink); box-shadow: var(--shadow); font-weight: 700; }
.nav a.on::after { content: ""; position: absolute; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); }
.nav .badge { margin-left: auto; font-size: 11.5px; background: var(--rose); color: var(--paper); border-radius: 99px; padding: 0 7px; line-height: 18px; }
.nav a.on .badge { margin-right: 14px; }
.side-foot { margin-top: auto; display: flex; gap: 8px; padding: 0 6px; }

.main {
  min-width: 0; padding-block: 26px 60px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 通用组件 ---------- */
.card { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h2 { font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.card-h .link { font-size: 13px; color: var(--rose-ink); text-decoration: none; background: none; border: 0; padding: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 99px; padding: 9px 18px;
  background: var(--rose); color: var(--on-rose); font-weight: 600; font-size: 14px; white-space: nowrap;
  box-shadow: 0 6px 14px -8px var(--rose); transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--rose-soft); color: var(--rose-ink); box-shadow: none; }
.btn.plain { background: transparent; color: var(--muted); box-shadow: none; padding: 8px 12px; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn svg.i { width: 17px; height: 17px; }
.icon-btn { border: 0; background: transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--rose-soft); color: var(--rose-ink); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 99px; font-size: 12px; line-height: 20px; background: var(--rose-soft); color: var(--rose-ink); white-space: nowrap; }
.chip.mint { background: var(--mint); color: var(--mint-ink); }
.chip.butter { background: var(--butter); color: var(--warn); }
.chip.lilac { background: var(--lilac); color: var(--lilac-ink); }
.chip.peach { background: var(--peach); color: var(--danger); }
.chip.gray { background: var(--bg); color: var(--muted); }

.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 9px 12px; outline: none;
}
.input:focus { border-color: var(--rose); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.6; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }
.search .input { padding-left: 34px; min-width: 200px; border-radius: 99px; }
.seg { display: inline-flex; background: var(--rose-soft); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 99px; font-size: 13px; color: var(--rose-ink); }
.seg button.on { background: var(--paper); box-shadow: var(--shadow); font-weight: 700; }

.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }
.empty svg { width: 76px; height: 76px; display: block; margin: 0 auto 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 首页：手账封面 ---------- */
.hello {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px 28px; min-height: 150px;
  background:
    radial-gradient(circle at 1px 1px, var(--grid) 1.4px, transparent 1.6px) 0 0 / 18px 18px,
    linear-gradient(115deg, var(--rose-soft), var(--peach) 70%, var(--butter));
  display: flex; align-items: center; gap: 18px;
}
.hello h1 { font-size: 28px; color: var(--ink); }
.hello .sub { margin-top: 6px; color: var(--muted); font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hello .week { background: var(--paper); color: var(--rose-ink); border-radius: 99px; padding: 2px 12px; font-weight: 700; font-size: 13px; }
.hello .quote { margin-top: 12px; font-size: 13.5px; color: var(--ink); opacity: .82; }
.hello .bunny { width: 130px; height: 130px; margin-left: auto; flex: none; }

.notice { display: flex; align-items: center; gap: 10px; background: var(--butter); color: var(--warn); border-radius: 14px; padding: 10px 14px; font-size: 13.5px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--paper); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .k i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stat .v { font: 700 28px/1.2 var(--font-round); font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat .bar { height: 6px; background: var(--rose-soft); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.stat .bar span { display: block; height: 100%; background: var(--rose); border-radius: 99px; }

/* 便签式待办 */
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg);
  border: 1.5px solid transparent; transition: opacity .2s;
}
.todo:hover { border-color: var(--line); }
.todo .chk {
  width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--rose); background: transparent; flex: none;
  display: grid; place-items: center; padding: 0; color: transparent;
}
.todo .chk svg { width: 15px; height: 15px; stroke-width: 3; }
.todo.done .chk { background: var(--rose); color: var(--paper); }
.todo.done .t { text-decoration: line-through; color: var(--muted); }
.todo .t { font-weight: 600; }
.todo .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.pri-紧急 { background: var(--peach); color: var(--danger); }
.pri-重要 { background: var(--butter); color: var(--warn); }
.pri-普通 { background: var(--lilac); color: var(--lilac-ink); }
.quick-add { display: flex; gap: 8px; margin-top: 12px; }
.quick-add .input { border-radius: 99px; }

.sched { display: flex; flex-direction: column; gap: 10px; }
.sched-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.datebox { border-radius: 12px; background: var(--rose-soft); color: var(--rose-ink); text-align: center; padding: 4px 0; line-height: 1.2; }
.datebox b { display: block; font: 700 19px/1.1 var(--font-round); }
.datebox small { font-size: 11px; }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; text-decoration: none; color: var(--ink); font-size: 13px; }
.quick a:hover { background: var(--rose-soft); }
.quick .qi { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; }
.bday { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.bday:last-child { border-bottom: 0; }

/* ---------- 列表 / 表格 ---------- */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 4px; border-bottom: 1px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 700; }
.item .desc { color: var(--muted); font-size: 13.5px; white-space: pre-wrap; margin-top: 2px; }
.item .acts { display: flex; gap: 2px; flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 16px var(--font-round); }
.av-女 { background: var(--rose-soft); color: var(--rose-ink); }
.av-男 { background: var(--lilac); color: var(--lilac-ink); }

.students { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.stu { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; border: 1.5px solid transparent; text-align: left; }
.stu:hover { border-color: var(--rose-soft); }
.stu .info { font-size: 13px; color: var(--muted); display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; }

.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl input.score { width: 74px; text-align: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 5px; background: var(--bg); }
.tbl input.score:focus { border-color: var(--rose); outline: none; }

/* 考勤 */
.att { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg); }
.att-row .name { flex: 1; min-width: 0; font-weight: 600; }
.att-opts { display: flex; gap: 4px; }
.att-opts button { border: 0; border-radius: 9px; padding: 3px 8px; font-size: 12.5px; background: var(--paper); color: var(--muted); }
.att-opts button.on.s-出勤 { background: var(--mint); color: var(--mint-ink); font-weight: 700; }
.att-opts button.on.s-迟到 { background: var(--butter); color: var(--warn); font-weight: 700; }
.att-opts button.on.s-请假 { background: var(--lilac); color: var(--lilac-ink); font-weight: 700; }
.att-opts button.on.s-缺勤 { background: var(--peach); color: var(--danger); font-weight: 700; }

/* 日历 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .wd { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal button { aspect-ratio: 1 / .86; border: 0; border-radius: 12px; background: transparent; position: relative; font: 600 14px var(--font-round); color: var(--ink); max-width: 100%; }
.cal button.out { color: var(--muted); opacity: .45; }
.cal button:hover { background: var(--rose-soft); }
.cal button.today { color: var(--rose-ink); box-shadow: inset 0 0 0 2px var(--rose); }
.cal button.sel { background: var(--rose); color: var(--paper); }
.cal button .dots { position: absolute; left: 0; right: 0; bottom: 5px; display: flex; justify-content: center; gap: 3px; }
.cal button .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--rose); }
.cal button.sel .dots i { background: var(--paper); }
.cal button .dots i.ev { background: var(--lilac-ink); }

/* 成绩分布柱 */
.dist { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 8px; }
.dist .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.dist .b { width: 100%; max-width: 46px; background: var(--rose); border-radius: 10px 10px 4px 4px; min-height: 3px; }
.dist .col:nth-child(1) .b { background: var(--danger); opacity: .7; }
.dist .col small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dist .col b { font: 700 13px var(--font-round); }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kv div { background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.kv small { color: var(--muted); font-size: 12px; display: block; }
.kv b { font: 700 22px var(--font-round); font-variant-numeric: tabular-nums; }

/* 评语 */
.phrases { display: flex; flex-wrap: wrap; gap: 6px; }
.phrases button { border: 1.5px dashed var(--line); background: var(--paper); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--ink); }
.phrases button:hover { border-color: var(--rose); color: var(--rose-ink); border-style: solid; }
.phrase-group { display: flex; flex-direction: column; gap: 6px; }
.phrase-group h3 { font-size: 13px; color: var(--muted); font-weight: 600; }

/* 日志 */
.log { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 20px 18px; position: relative; }
.log::before { content: ""; position: absolute; top: -7px; left: 26px; width: 74px; height: 18px; background: var(--rose-soft); opacity: .9; transform: rotate(-3deg); border-radius: 3px;
  background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,.35) 6px 12px); }
.log .content { white-space: pre-wrap; margin-top: 8px; line-height: 1.8; }
.mood { font-size: 12px; }

/* 班级档案便签 */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.note { border-radius: 6px 6px 18px 6px; padding: 22px 18px 16px; position: relative; box-shadow: var(--shadow); min-width: 0; }
.note:nth-child(4n+1) { background: var(--butter); }
.note:nth-child(4n+2) { background: var(--rose-soft); }
.note:nth-child(4n+3) { background: var(--mint); }
.note:nth-child(4n+4) { background: var(--lilac); }
.note::before { content: ""; position: absolute; top: -8px; left: 50%; width: 80px; height: 18px; margin-left: -40px; transform: rotate(2deg);
  background: rgba(255,255,255,.55); border-radius: 2px; }
.note pre { margin: 8px 0 0; font: 14px/1.85 var(--font); white-space: pre-wrap; word-break: break-word; }

/* 弹窗 */
.modal-bg { position: fixed; inset: 0; background: rgba(74,43,54,.32); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--paper); border-radius: 24px; width: min(560px, 100%); max-height: 88vh; overflow-y: auto; padding: 22px 22px 18px; box-shadow: 0 30px 60px -20px rgba(120,40,70,.45); }
.modal h2 { font-size: 19px; margin-bottom: 14px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.form label.full { grid-column: 1 / -1; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; align-items: center; }
.modal-foot .left { margin-right: auto; }
.checks { display: flex; gap: 6px; flex-wrap: wrap; }
.checks label { flex-direction: row; align-items: center; gap: 4px; background: var(--bg); padding: 4px 10px; border-radius: 99px; color: var(--ink); }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg);
  padding: 9px 18px; border-radius: 99px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; white-space: nowrap; }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* 登录 */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.login .box { width: min(380px, 100%); text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.login .box svg { width: 140px; height: 140px; }
.login h1 { font-size: 24px; }
.login form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.login .input { text-align: center; border-radius: 99px; padding: 12px; }
.login .btn { justify-content: center; padding: 12px; }
.err { color: var(--danger); font-size: 13px; min-height: 20px; }

/* 手机端底栏 */
.tabbar { display: none; }
.sheet .nav a { padding: 12px 14px; }

@media (max-width: 960px) {
  .g-main, .g3 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding-block: 16px calc(92px + env(safe-area-inset-bottom, 0px)); }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 22px; }
  .hello { padding: 20px; min-height: 0; border-radius: 22px; }
  .hello h1 { font-size: 22px; }
  .hello .bunny { width: 86px; height: 86px; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .search .input { min-width: 0; }
  .card { padding: 16px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--paper); border-top: 1.5px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 4px 0; }
  .tabbar .on { color: var(--rose-ink); font-weight: 700; }
  .tabbar svg.i { width: 23px; height: 23px; }
  .modal-bg { place-items: end center; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); max-height: 92vh; }
  .modal-foot .btn { flex: 1; justify-content: center; }
  .modal-foot .left { flex: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
section.kv > div { background: var(--paper); box-shadow: var(--shadow); }
