/* ============================================================
   学监会内部小程序 · 设计系统
   纯白 / 极简 / 移动端优先
   ============================================================ */

:root {
  --white: #ffffff;
  --ink: #101114;
  --ink-2: #6c7178;
  --ink-3: #a3a8b0;
  --ink-4: #c6cad0;
  --line: #ededf0;
  --line-strong: #e2e4e8;
  --soft: #f6f7f8;
  --soft-2: #fafbfc;

  /* 语义色（深色模式只覆盖这些，不改选择器） */
  --bg: #f4f5f6;
  --bg-2: #f2f3f4;
  --bg-3: #eceef0;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --tab-bg: rgba(255, 255, 255, 0.94);
  --solid-bg: #101114;
  --solid-fg: #ffffff;
  --sk-1: #ebedf0;
  --sk-2: #dee1e5;
  --shadow: rgba(16, 17, 20, 0.10);

  --ok: #0f8a5f;
  --ok-bg: #f0f8f4;
  --warn: #a96a12;
  --warn-bg: #fdf6ec;
  --bad: #c0392b;
  --bad-bg: #fdf2f0;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;

  --sp: 20px;
  --tab-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  /* 移动端：禁止横向拖拽出白边，纵向滚动由页面接管（下拉刷新自实现） */
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: pan-y;
}

/* 允许横向滚动的控件单独放开 */
.seg, .weekstrip { touch-action: pan-x; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
svg { display: block; }

/* ---------- 应用外壳 ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

@media (min-width: 520px) {
  body { background: var(--bg-2); }
  .app {
    min-height: 100vh;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}

.page {
  flex: 1;
  padding: 0 var(--sp) 32px;
  animation: rise 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.page--tabbed { padding-bottom: calc(var(--tab-h) + 26px); }

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 var(--sp);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__back {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}
.nav__back:active { transform: scale(0.94); background: var(--soft); }

.nav__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav__dept {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  flex: 0 0 auto;
  letter-spacing: 0.02em;
}
.nav__action {
  font-size: 13px;
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.nav__action:active { color: var(--ink); }

/* 右上角「使用说明」圆形按钮 */
.nav__help {
  width: 38px; height: 38px; flex: 0 0 38px;
  margin-left: 2px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-3);
  transition: color 0.16s, border-color 0.16s, transform 0.16s, background 0.16s;
}
.nav__help:hover { color: var(--ink-2); border-color: var(--ink-4); transform: translateY(-1px); }
.nav__help:active { color: var(--ink); border-color: var(--ink); transform: scale(0.96); }
.nav__help__q {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", sans-serif;
}

/* ---------- 标题区 ---------- */
.hero { padding: 18px 0 22px; }
.hero__eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero__title {
  margin: 0;
  font-size: 25px;
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.hero__sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

.page-head {
  padding: 14px 0 18px;
}
.page-head h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.page-head p {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ---------- 区块标题 ---------- */
.sec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 26px 0 12px;
}
.sec:first-child { margin-top: 8px; }
.sec h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.sec a, .sec button {
  font-size: 12px;
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card--pad { padding: 16px; }
.card--soft { background: var(--soft-2); border-color: var(--line); }

/* ---------- 系统宫格 ---------- */
.sys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sys-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--white);
  transition: border-color 0.2s, transform 0.18s, background 0.2s;
}
.sys-card:active {
  transform: scale(0.985);
  background: var(--soft-2);
  border-color: var(--line-strong);
}
@media (hover: hover) {
  .sys-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 12px 26px var(--shadow);
  }
}
.sys-card__ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--soft);
  display: grid;
  place-items: center;
  color: var(--ink);
}
.sys-card__name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sys-card__desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
  margin-top: -4px;
}
.sys-card__dept {
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-top: auto;
}
.sys-card__badge {
  position: absolute;
  top: 14px;
  right: 50px;
  font-size: 10px;
  color: var(--ink-2);
  background: var(--soft);
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
}

/* 卡片右上角「使用说明」圆形按钮 */
.sys-card__help {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, transform 0.16s;
}
.sys-card__help:hover { color: var(--ink-2); border-color: var(--ink-4); transform: translateY(-1px); }
.sys-card__help:active { color: var(--ink); border-color: var(--ink); transform: scale(0.94); }
.sys-card__help__q {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", sans-serif;
}

/* ---------- 数据条 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stats > div {
  padding: 14px 8px 13px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.stats > div:last-child { border-right: 0; }
.stats b {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-3);
}

/* ---------- 列表 ---------- */
.list { border-top: 1px solid var(--line); }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.row:last-child { border-bottom: 0; }
.row__main { flex: 1; min-width: 0; }
.row__title {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.row__meta {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__side {
  flex: 0 0 auto;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.row__num {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.row__unit { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.row--link { cursor: pointer; }
.row--link:active { opacity: 0.6; }

/* ---------- 标签 / 状态 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 500;
  padding: 2.5px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink-2);
  white-space: nowrap;
  line-height: 1.5;
}
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--bad { background: var(--bad-bg); color: var(--bad); }
.pill--ink { background: var(--solid-bg); color: var(--solid-fg); }
.pill--ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-3); }

.tag {
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ---------- 分段筛选 ---------- */
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--soft);
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1 0 auto;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.seg button.is-active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 17, 20, 0.07);
}

/* ---------- 搜索 ---------- */
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 13px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.search:focus-within { background: var(--white); border-color: var(--ink); }
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  min-width: 0;
}
.search input::placeholder { color: var(--ink-3); }
.search svg { color: var(--ink-3); flex: 0 0 auto; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 11.5px;
  color: var(--ink-2);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
.input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--soft-2);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus { border-color: var(--ink); background: var(--white); }
select.input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c7178' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.field-row { display: flex; gap: 10px; }
.field-row > .field { flex: 1; margin-bottom: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--solid-bg);
  color: var(--solid-fg);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.16s, opacity 0.16s, background 0.2s;
  width: 100%;
}
.btn:active { transform: scale(0.985); opacity: 0.9; }
.btn--ghost {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--sm {
  height: 34px;
  padding: 0 13px;
  font-size: 12.5px;
  border-radius: 10px;
  width: auto;
}
.btn--block { width: 100%; }
.btn[disabled] { background: var(--soft); color: var(--ink-3); border-color: transparent; cursor: default; }

.fab-row {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

/* ---------- 进度 ---------- */
.bar {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
  transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.bar--warn > i { background: var(--warn); }

/* ---------- 头像 ---------- */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  flex: 0 0 auto;
  border: 1px solid var(--line);
}
.avatar--lg { width: 56px; height: 56px; font-size: 19px; }

/* ---------- 空状态 ---------- */
.empty {
  padding: 44px 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.empty svg { margin: 0 auto 10px; color: var(--ink-4); }

/* ---------- 底部标签栏 ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  margin: 0 auto;
  max-width: 430px;
  display: flex;
  background: var(--tab-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.tabbar a.is-active { color: var(--ink); }
.tabbar .dot {
  position: absolute;
  margin: -14px 0 0 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

/* ---------- 底部弹层 ---------- */
.mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 17, 20, 0.3);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s;
}
.mask.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  max-width: 430px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px var(--sp) calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateY(102%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  max-height: 88vh;
  overflow-y: auto;
}
.sheet.is-open { transform: translateY(0); }
.sheet__grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: 6px auto 14px;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sheet__head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sheet__close {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 13px;
  padding: 4px;
  cursor: pointer;
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 90;
  transform: translate(-50%, 10px);
  background: var(--solid-bg);
  color: var(--solid-fg);
  font-size: 12.5px;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s, transform 0.24s;
  max-width: 86%;
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 下拉刷新指示器（移动端） ---------- */
.ptr {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 85;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px var(--shadow);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transform: translate(-50%, -90px);
  transition: transform 0.28s, color 0.2s;
  pointer-events: none;
}
.ptr.is-show { transform: translate(-50%, 0); }
.ptr.is-ready { color: var(--ink); }
.ptr.is-ready svg { animation: ptrspin 0.9s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* ============================================================
   桌面端布局（≥900px）：侧边栏 + 宽内容区
   ============================================================ */
.side { display: none; }

@media (min-width: 900px) {
  body { background: var(--bg-3); }

  /* ---- 侧边栏 ---- */
  .side {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 232px;
    background: var(--white);
    border-right: 1px solid var(--line);
    padding: 24px 14px 18px;
    z-index: 50;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .side::-webkit-scrollbar { width: 0; height: 0; }
  .side__brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; }
  .side__mark {
    width: 34px; height: 34px; flex: 0 0 34px;
    border-radius: 11px; overflow: hidden;
  }
  .side__mark img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 11px; }
  .side__brand b { display: block; font-size: 14px; letter-spacing: -0.01em; }
  .side__brand span { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; letter-spacing: 0.04em; }
  .side__sec {
    font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3);
    padding: 16px 11px 7px; text-transform: uppercase;
  }
  .side__link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; border-radius: 10px;
    font-size: 13.5px; color: var(--ink-2);
    transition: background 0.16s, color 0.16s;
  }
  .side__link:hover { background: var(--soft); color: var(--ink); }
  .side__link.is-active { background: var(--soft); color: var(--ink); font-weight: 500; }
  .side__link svg { flex: 0 0 auto; color: var(--ink-3); }
  .side__link:hover svg, .side__link.is-active svg { color: var(--ink); }
  .side__loading { display: block; font-size: 11.5px; color: var(--ink-3); padding: 8px 11px; }
  /* 系统清单未返回前的骨架行 */
  .side__sk { display: flex; align-items: center; gap: 10px; padding: 9px 11px; }
  .side__sk--ico { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 5px; display: block; }
  .side__sk--bar { height: 9px; display: block; border-radius: 5px; }
  .side__foot {
    margin-top: auto; padding: 12px 11px 0;
    font-size: 10.5px; color: var(--ink-3);
    border-top: 1px solid var(--line);
  }

  /* ---- 内容区 ---- */
  .app {
    display: block;
    width: auto;
    margin-left: 232px;
    max-width: none;
    min-height: 100vh;
    background: var(--bg);
    border: none;
  }
  .nav {
    height: 66px;
    padding-left: max(40px, calc((100% - 920px) / 2 + 40px));
    padding-right: max(40px, calc((100% - 920px) / 2 + 40px));
    background: var(--nav-bg);
    border-bottom: 1px solid var(--line);
  }
  .page {
    max-width: 920px;
    margin: 0 auto;
    padding: 8px 40px 72px;
  }
  .page--tabbed { padding-bottom: 72px; }

  .hero { padding: 26px 0 28px; }
  .page-head { padding: 18px 0 22px; }
  .sec { margin: 34px 0 14px; }

  .sys-grid { grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 12px; }
  .sys-card { min-height: 138px; padding: 16px; }

  .list {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 2px 20px;
  }

  .tabbar { display: none; }

  /* 底部弹层 → 居中弹窗 */
  .sheet {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 480px;
    max-height: 82vh;
    border-radius: var(--r-xl);
    padding-bottom: 24px;
    transform: translate(-50%, -47%) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s, opacity 0.22s;
  }
  .sheet.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .toast { bottom: 40px; }
}

/* ---------- 内联小工具 ---------- */
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 11.5px; }
.mono { font-variant-numeric: tabular-nums; }
.hr { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* 骨架屏 */
.sk {
  background: linear-gradient(90deg, var(--sk-1) 25%, var(--sk-2) 37%, var(--sk-1) 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  border-radius: 8px;
}
@keyframes sk {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

/* 高亮新增 */
.flash { animation: flash 1.6s ease; }
@keyframes flash {
  0% { background: #f4f7ff; }
  100% { background: transparent; }
}

/* ============================================================
   深色模式（html[data-theme="dark"]）
   ============================================================ */
[data-theme="dark"] {
  color-scheme: dark;

  --white: #17181b;
  --ink: #e9eaed;
  --ink-2: #a3a8b0;
  --ink-3: #7d838c;
  --ink-4: #5d636c;
  --line: #26282d;
  --line-strong: #34373d;
  --soft: #1e2023;
  --soft-2: #1b1d20;

  --ok: #4fd1a5;
  --ok-bg: rgba(79, 209, 165, 0.14);
  --warn: #e0a44b;
  --warn-bg: rgba(224, 164, 75, 0.14);
  --bad: #ef6d5f;
  --bad-bg: rgba(239, 109, 95, 0.14);

  --bg: #0f1113;
  --bg-2: #0f1113;
  --bg-3: #0c0e10;
  --nav-bg: rgba(23, 24, 27, 0.88);
  --tab-bg: rgba(23, 24, 27, 0.94);
  --solid-bg: #e9eaed;
  --solid-fg: #16171a;
  --sk-1: #24262a;
  --sk-2: #2f3237;
  --shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mask { background: rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .side__mark { background: #17181b; }
[data-theme="dark"] .nav__help,
[data-theme="dark"] .sys-card__help {
  background: #23262a;
  border-color: #3a3e44;
  color: var(--ink-2);
}

/* ---------- 开关（我的 · 外观） ---------- */
.switch {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--soft);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.switch__dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink-4);
  transition: transform 0.22s, background 0.22s;
}
.switch[aria-checked="true"] {
  background: var(--solid-bg);
  border-color: var(--solid-bg);
}
.switch[aria-checked="true"] .switch__dot {
  transform: translateX(18px);
  background: var(--solid-fg);
}
.switch:focus-visible { outline: 2px solid var(--ink-3); outline-offset: 2px; }

/* ============================================================
   动效：页面衔接、卡片入场、按压反馈
   ============================================================ */
body {
  transition: opacity 0.16s ease, transform 0.16s ease;
}
body.is-leaving {
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}
.sys-grid > * { animation: cardIn 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.sys-grid > *:nth-child(1) { animation-delay: 0.02s; }
.sys-grid > *:nth-child(2) { animation-delay: 0.04s; }
.sys-grid > *:nth-child(3) { animation-delay: 0.06s; }
.sys-grid > *:nth-child(4) { animation-delay: 0.08s; }
.sys-grid > *:nth-child(5) { animation-delay: 0.1s; }
.sys-grid > *:nth-child(6) { animation-delay: 0.12s; }
.sys-grid > *:nth-child(7) { animation-delay: 0.14s; }
.sys-grid > *:nth-child(8) { animation-delay: 0.16s; }
.sys-grid > *:nth-child(9) { animation-delay: 0.18s; }
.sys-grid > *:nth-child(10) { animation-delay: 0.2s; }
.sys-grid > *:nth-child(11) { animation-delay: 0.22s; }
.sys-grid > *:nth-child(12) { animation-delay: 0.24s; }
.sys-grid > *:nth-child(n+13) { animation-delay: 0.26s; }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.list > * { animation: rowIn 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.list > *:nth-child(n+2) { animation-delay: 0.03s; }
.list > *:nth-child(n+4) { animation-delay: 0.06s; }
.list > *:nth-child(n+7) { animation-delay: 0.09s; }

.btn,
.input,
.nav__action,
.seg button,
.tabbar a,
.side__link {
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.16s, opacity 0.16s;
}
@media (hover: hover) {
  .btn--ghost:hover { background: var(--soft); }
  .side__link:hover { transform: translateX(2px); }
}

/* ============================================================
   统一提示窗
   ============================================================ */
.dlg__mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(16, 17, 20, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dlg__mask.is-open { opacity: 1; pointer-events: auto; }

.dlg {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}
.dlg__card {
  width: min(400px, 100%);
  padding: 22px 20px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(16, 17, 20, 0.2);
  transform: translateY(10px) scale(0.97);
  opacity: 0;
  pointer-events: auto;
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.2s;
}
.dlg.is-open .dlg__card { transform: none; opacity: 1; }

.dlg__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.dlg__text {
  font-size: 13px;
  line-height: 1.62;
  color: var(--ink-2);
  white-space: pre-line;
  word-break: break-word;
}
.dlg__field { margin-top: 14px; }
.dlg__field label {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.dlg__field .input { width: 100%; }
.dlg__foot {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.dlg__foot .btn { flex: 1; height: 44px; }

.btn--danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}
@media (hover: hover) {
  .btn--danger:hover { opacity: 0.92; }
}

/* ============================================================
   骨架屏
   ============================================================ */
.sk {
  position: relative;
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--sk-1) 25%, var(--sk-2) 37%, var(--sk-1) 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
}
.sk--num { width: 34px; height: 22px; display: inline-block; }
.sk--title { width: 150px; height: 26px; display: inline-block; vertical-align: middle; }
.sk--line { width: 200px; height: 13px; display: inline-block; margin-top: 8px; }
.sk--ico { width: 38px; height: 38px; border-radius: 12px; }
.sk--name { width: 62%; height: 15px; margin-top: 14px; }
.sk--desc { width: 100%; height: 10px; margin-top: 8px; }
.sk--desc-s { width: 52%; }
.sys-card--sk { pointer-events: none; }
.sys-card--sk .sk--name { margin-top: 12px; }
.stats .sk { margin: 0 auto 3px; }

/* 通用列表行 / 卡片组 / 表格骨架（XJH.sk.*） */
.sk-list { display: block; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 15px 0; }
.sk-row:first-child { padding-top: 6px; }
.sk-row + .sk-row { border-top: 1px solid var(--line); }
.sk-row__ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; }
.sk-row__main { flex: 1; min-width: 0; }
.sk-row__t { height: 13px; display: block; border-radius: 7px; }
.sk-row__s { height: 10px; display: block; margin-top: 8px; border-radius: 6px; }
.sk-row__act { width: 54px; height: 28px; flex: 0 0 54px; border-radius: 999px; }

.sk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sk-tile { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); padding: 16px; }
.sk-tile__ico { width: 38px; height: 38px; display: block; border-radius: 12px; }
.sk-tile__t { height: 14px; display: block; margin-top: 14px; border-radius: 7px; }
.sk-tile__s { height: 10px; display: block; margin-top: 9px; border-radius: 6px; }
.sk-tile__s2 { width: 46%; }

.sk-tbl { display: block; }
.sk-tbl__row { display: flex; gap: 10px; padding: 11px 0; }
.sk-tbl__row + .sk-tbl__row { border-top: 1px solid var(--line); }
.sk-tbl__cell { height: 12px; display: block; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *,
  .sys-grid > *,
  .list > * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

