:root {
  --primary: #185FA5;
  --primary-d: #0C447C;
  --primary-l: #E6F1FB;
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --hint: #9CA3AF;
  --line: #E5E7EB;
  --ok: #0F6E56;
  --ok-l: #E1F5EE;
  --warn: #BA7517;
  --warn-l: #FAEEDA;
  --danger: #A32D2D;
  --danger-l: #FCEBEB;
  --r: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06);
  --topbar-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

/* ---------- 布局 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 1px 6px rgba(12, 68, 124, .18);
}
.topbar h1 {
  font-size: 16px; font-weight: 500; margin: 0; flex: 1;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar .sub { font-size: 12px; opacity: .85; font-weight: 400; }
.topbar .who { display: flex; align-items: center; gap: 9px; flex: none; }

/* 顶栏个人中心图标按钮 */
.btn-icon {
  flex: none;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
}
.btn-icon svg { width: 19px; height: 19px; }
.btn-icon:active { background: rgba(255, 255, 255, .32); }

/* 个人中心页返回按钮 */
.btn-back {
  flex: none;
  display: flex; align-items: center; gap: 2px;
  border: none; background: none;
  color: #fff; font-size: 14px;
  padding: 4px 4px 4px 0;
  cursor: pointer;
}

@media (max-width: 430px) {
  .topbar h1 .sub { display: none; }
}

/* ---------- 个人中心 ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .avatar {
  width: 52px; height: 52px; flex: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 22px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.profile-head .p-name { font-size: 17px; font-weight: 600; }
.profile-head .p-role { font-size: 12px; color: var(--muted); margin-top: 3px; }
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--muted); flex: none; }
.info-row .v { text-align: right; word-break: break-all; }

.page { max-width: 600px; margin: 0 auto; padding: 14px 14px 96px; }
.page.wide { max-width: 1180px; }

.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 10px 12px; }
.card h2 { font-size: 15px; font-weight: 500; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.card h2 .spacer { flex: 1; }

.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--hint); font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- 表单 ---------- */
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
label.field { display: block; margin-bottom: 10px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.row2 { display: flex; gap: 10px; }
.row2 > .field { flex: 1; min-width: 0; }
select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236B7280' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line);
  background: #fff; color: var(--text);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px; font-family: inherit;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-d); }
.btn-danger { background: #fff; border-color: #F0C4C4; color: var(--danger); }
.btn-ghost { border-color: transparent; color: var(--primary); background: transparent; padding: 6px 8px; }
.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 12px 16px; font-size: 16px; }

/* ---------- 徽标与状态 ---------- */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  font-size: 12px; line-height: 1.7; white-space: nowrap;
}
.badge-gray { background: #F1F3F6; color: var(--muted); }
.badge-blue { background: var(--primary-l); color: var(--primary-d); }
.badge-ok { background: var(--ok-l); color: var(--ok); }
.badge-warn { background: var(--warn-l); color: var(--warn); }
.badge-danger { background: var(--danger-l); color: var(--danger); }

/* ---------- 列表项 ---------- */
.item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.item:last-child { margin-bottom: 0; }
.item .title { font-size: 15px; font-weight: 500; line-height: 1.45; }
.item .meta { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.item .meta i { font-style: normal; color: var(--hint); }
.item .actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.item.done { border-color: #CBE6DA; background: #FCFEFD; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.stat {
  background: #fff; border-radius: 10px; padding: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.stat .num { font-size: 22px; font-weight: 500; color: var(--primary-d); line-height: 1.25; }
.stat .num small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.stat .lbl { font-size: 12px; color: var(--muted); }
.admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#overviewStats { margin-bottom: 12px; }
.admin-stat-grid .stat { min-width: 0; }
.admin-stat-grid .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  .admin-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- 条形图 ---------- */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 72px 1fr 58px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 14px; background: #EEF1F6; border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 7px; transition: width .4s ease; }
.bar-fill.good { background: #1D9E75; }
.bar-fill.mid { background: #EF9F27; }
.bar-fill.low { background: #E24B4A; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--primary-d); font-weight: 500; }

.dim-row { display: grid; grid-template-columns: 96px 1fr 62px; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.dim-row .bar-track { height: 10px; }
.dim-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.dim-row .val b { color: var(--primary-d); font-weight: 500; }

/* ---------- 打分表单 ---------- */
.score-total {
  position: sticky; top: 49px; z-index: 20;
  background: linear-gradient(180deg, #fff 70%, rgba(255,255,255,.92));
  border: 1px solid var(--primary-l);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .txt {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 500; color: var(--primary-d);
}
.dim { margin-bottom: 18px; }
.dim:last-child { margin-bottom: 4px; }
.dim-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.dim-head .nm { font-size: 15px; font-weight: 500; }
.dim-head .full { font-size: 12px; color: var(--hint); }
.dim-head .cur { margin-left: auto; font-size: 19px; font-weight: 500; color: var(--primary); font-variant-numeric: tabular-nums; }
.dim-head .cur small { font-size: 12px; color: var(--hint); font-weight: 400; }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; background: transparent; margin: 0; padding: 0;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 4px;
  background: linear-gradient(to right, var(--primary) var(--pct, 50%), #E4E8EF var(--pct, 50%));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary);
  box-shadow: 0 1px 4px rgba(12, 68, 124, .3);
  margin-top: -8px; cursor: pointer;
}
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: #E4E8EF; }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--primary); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }

.quick { display: flex; gap: 6px; margin-top: 4px; }
.quick button {
  flex: 1; font-size: 12px; padding: 4px 0;
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  color: var(--muted); font-family: inherit; cursor: pointer;
}
.quick button:active { background: var(--primary-l); color: var(--primary-d); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; border: 0; background: none; font-family: inherit;
  padding: 8px 0 9px; font-size: 12px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
}
.tabbar button.on { color: var(--primary); font-weight: 500; }
.tabbar .ico { width: 20px; height: 20px; }

/* ---------- 弹层 ---------- */
.mask {
  /* 不用 inset 简写：老内核（微信 X5 / iOS < 14.5）不识别会导致遮罩错位 */
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60;
  background: rgba(17, 24, 39, .45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 620px) { .mask { align-items: center; padding: 24px; } }
.sheet {
  background: #fff; width: 100%; max-width: 620px;
  border-radius: 16px 16px 0 0;
  /* 相对遮罩（即视口）计算，比 90vh 可靠：移动端地址栏伸缩时 vh 会大于可视高度 */
  max-height: calc(100% - 24px); display: flex; flex-direction: column;
  animation: rise .2s ease;
}
@media (min-width: 620px) { .sheet { border-radius: 14px; } }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet header {
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500;
}
.sheet header .spacer { flex: 1; }
.sheet .body { padding: 16px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet footer { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet footer .btn { flex: 1; }

/* ---------- 提示 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 88vw;
}
.toast {
  background: rgba(31, 41, 55, .93); color: #fff;
  padding: 9px 16px; border-radius: 20px; font-size: 14px;
  animation: fadein .18s ease;
}
.toast.ok { background: rgba(15, 110, 86, .95); }
.toast.err { background: rgba(163, 45, 45, .95); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

.empty { text-align: center; color: var(--hint); font-size: 13px; padding: 26px 0; }

.skeleton { height: 62px; border-radius: 10px; background: #EDF0F5; margin-bottom: 10px; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 560px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; background: #F8FAFC; white-space: nowrap; font-size: 12px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
td .cmt { color: var(--muted); font-size: 12px; max-width: 260px; }

/* 窄屏隐藏表格中的维度分列，保留总分，避免过度挤压 */
@media (max-width: 619px) {
  .dim-col { display: none; }
}

/* ---------- 子标签 ---------- */
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.subtabs button {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 20px; padding: 5px 14px; font-size: 13px; font-family: inherit;
  white-space: nowrap; cursor: pointer;
}
.subtabs button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
#peopleTabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%; overflow: visible;
}
#peopleTabs button { width: 100%; min-width: 0; padding: 10px 4px; text-align: center; }

/* 管理后台主导航：等宽 + 吸顶（扁平样式，无圆角） */
.tabwrap {
  position: sticky; top: var(--topbar-h); z-index: 20;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  margin: -14px -14px 12px;
  padding: 0 14px;
}
.subtabs.main {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0; margin-bottom: 0; padding-bottom: 0; overflow: visible;
  max-width: 900px; margin-left: auto; margin-right: auto;
}
.subtabs.main button {
  width: 100%; padding: 10px 4px; text-align: center;
  border: none; border-radius: 0; background: transparent;
  color: var(--muted); font-size: 14px;
  border-left: 1px solid var(--line);
  overflow: hidden; text-overflow: ellipsis;
}
.subtabs.main button:first-child { border-left: none; }
.subtabs.main button.on {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500;
}

/* ---------- 筛选栏 ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; align-items: end; }
/* 明细筛选：窄屏两列（关键词整行），宽屏一行三列 */
.dfilters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; }
.dfilters > .span-all { grid-column: 1 / -1; }
@media (min-width: 700px) {
  .dfilters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dfilters > .span-all { grid-column: auto; }
}

/* ---------- 勾选列表 ---------- */
.picklist { border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow-y: auto; }
.picklist label {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer;
}
.picklist label:last-child { border-bottom: 0; }
.picklist input { width: 17px; height: 17px; accent-color: var(--primary); flex: none; }
.picklist label .u { color: var(--hint); font-size: 12px; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: #244c72; position: relative; isolation: isolate;
}
.login-page::before {
  content: ''; position: fixed; inset: 0; z-index: -2;
  background: url('/assets/campus-background.jpg') center 65% / cover no-repeat;
}
.login-page::after {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(9, 32, 56, .65), rgba(9, 32, 56, .15) 70%),
    linear-gradient(180deg, rgba(9, 32, 56, .32), transparent 40%, rgba(9, 32, 56, .42));
}
.login-wrap {
  width: 100%; max-width: 1240px; flex: 1; display: flex;
  align-items: center; justify-content: space-between; gap: 48px;
  padding: 48px 48px 64px; margin: 0 auto;
}
.login-logo {
  width: 100%; padding: calc(24px + env(safe-area-inset-top, 0px)) 24px 24px;
  color: #fff; display: flex; align-items: center; justify-content: center; gap: 12px;
  flex: none; white-space: nowrap; border-bottom: 1px solid rgba(255, 255, 255, .18);
  font-size: clamp(14px, 3.8vw, 22px); font-weight: 600; line-height: 1.5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.login-emblem { width: 32px; height: 32px; flex: none; }
.login-intro { color: #fff; padding-bottom: 36px; }
.login-eyebrow { margin: 0 0 16px; font-size: 13px; font-weight: 500; letter-spacing: 2px; }
.login-intro h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.5; font-weight: 600; margin: 0 0 20px; }
.login-intro-sub { font-size: 15px; color: rgba(255, 255, 255, .85); margin: 0; }
.login-topics { display: flex; gap: 12px; margin-top: 32px; }
.login-topics span { border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px; padding: 6px 12px; font-size: 12px; }
.login-card {
  width: 400px; flex: none; background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 20px; padding: 36px;
  box-shadow: 0 24px 64px rgba(9, 32, 56, .24);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.login-card-heading { margin-bottom: 28px; text-align: center; }
.login-card .login-eyebrow { color: var(--primary); margin-bottom: 12px; letter-spacing: 1px; font-size: 26px; font-weight: 600; }
.login-title { font-size: 22px; font-weight: 600; line-height: 1.5; margin: 0 0 8px; color: #18334e; }
.login-sub { color: var(--muted); font-size: 13px; margin: 0; }
.login-card .field { margin-bottom: 18px; }
.login-card .field > span { font-size: 13px; color: #46576a; margin-bottom: 8px; }
.login-card input { height: 48px; font-size: 16px; border-radius: 10px; background: #f8fafc; border-color: #dce3eb; padding: 12px 14px; }
.login-card input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(24, 95, 165, .1); }
.login-card #submitBtn { min-height: 48px; border-radius: 10px; font-size: 16px; font-weight: 500; box-shadow: 0 6px 16px rgba(24, 95, 165, .18); }
.login-help { font-size: 12px; color: var(--muted); text-align: center; margin: 22px 0 0; }
.login-footer { padding: 0 20px calc(20px + env(safe-area-inset-bottom, 0px)); color: rgba(255, 255, 255, .85); text-align: center; font-size: 12px; }
@media (max-width: 899px) {
  .login-wrap {
    justify-content: center; align-items: center;
    padding: 32px 20px calc(22vw + 32px);
  }
  .login-intro { display: none; }
  .login-card { width: 100%; max-width: 400px; }
  .login-page::before {
    position: absolute; bottom: calc(44px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, #74b6f0, rgba(116, 182, 240, 0) 38%) center bottom / 100% 43vw no-repeat,
      url('/assets/campus-background.jpg') center bottom / 100% auto no-repeat,
      linear-gradient(180deg, #3c84c7, #74b6f0);
  }
  .login-page::after {
    position: absolute;
    background: linear-gradient(180deg, rgba(9, 32, 56, .12), transparent 35%);
  }
  .login-footer {
    background: #244c72; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 430px) {
  .login-logo { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .login-emblem { width: 24px; height: 24px; }
  .login-card { padding: 28px 24px; border-radius: 16px; }
  .login-title { font-size: 20px; }
}

/* ---------- 后勤评价 ---------- */
.lg-group { margin-bottom: 14px; }
.lg-group-title {
  display: inline-block;
  background: var(--primary-l); color: var(--primary-d);
  font-size: 13px; font-weight: 500;
  padding: 3px 12px; border-radius: 14px;
  margin-bottom: 8px;
}
.sat-item {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; background: #fff;
}
.sat-item .sat-label { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.sat-item .sat-label i { color: var(--danger); font-style: normal; margin-right: 2px; }
.sat-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sat-opts button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 7px 2px; font-size: 13px; font-family: inherit;
  color: var(--text); cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.sat-opts button.on {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ---------- 班级相册 ---------- */
.album-tip { font-size: 12px; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-item { position: relative; }
.photo-item img {
  display: block; width: 100%; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 8px;
  background: #EEF1F6; cursor: zoom-in;
}
.photo-item .photo-meta {
  font-size: 11px; color: var(--hint);
  margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.photo-item .photo-del {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; line-height: 20px;
  border: none; border-radius: 50%;
  background: rgba(17, 24, 39, .62); color: #fff;
  font-size: 12px; cursor: pointer; padding: 0;
}
.img-viewer {
  /* 同 .mask：不用 inset 简写，兼容老内核 */
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 95;
  background: rgba(17, 24, 39, .82);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  touch-action: pan-y pinch-zoom;
}
.img-viewer img { max-width: 94vw; max-height: 80vh; border-radius: 8px; object-fit: contain; user-select: none; }
.img-viewer button {
  position: absolute; z-index: 1; width: 44px; height: 44px;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, .4);
  color: #fff; font-size: 32px; line-height: 1; cursor: pointer;
}
.img-viewer button:disabled { opacity: .3; cursor: default; }
.img-viewer button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.img-viewer-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.img-viewer-prev { left: 12px; top: calc(50% - 22px); }
.img-viewer-next { right: 12px; top: calc(50% - 22px); }
.img-viewer-caption {
  position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 16px; right: 16px; text-align: center; color: #fff; font-size: 14px;
  pointer-events: none;
}
