/* PC 管理后台布局（白导航 + 浅奶白内容区，主色活力橙点缀） */
body.admin { background: var(--bg); }

.layout { display: flex; min-height: 100vh; }

/* ------------------------------ 侧栏 ------------------------------ */
.side {
  width: var(--nav-w); flex: 0 0 var(--nav-w); background: #fff;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 20;
}
.side__brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.side__logo { display: flex; align-items: center; gap: 10px; }
.side__mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  background: linear-gradient(135deg, #FFB37A, #FF8A3D);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 4px 10px rgba(255, 138, 61, .3);
}
.side__name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.side__sub { font-size: 11px; color: var(--text-3); }
.side__menu { flex: 1; overflow-y: auto; padding: 12px 10px 24px; }
.side__group { font-size: 11px; color: var(--text-4); padding: 14px 12px 6px; letter-spacing: .5px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  border-radius: 10px; color: var(--text-2); font-size: 13.5px; position: relative;
  transition: background .16s ease, color .16s ease; cursor: pointer; user-select: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item__ico { width: 18px; text-align: center; font-size: 15px; }
.nav-item__badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600;
}
.side__foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-4); }

/* ------------------------------ 主区 ------------------------------ */
.main { flex: 1; margin-left: var(--nav-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 15;
}
.crumb { font-size: 13px; color: var(--text-3); }
.crumb b { color: var(--text); font-weight: 600; font-size: 15px; }
.topbar__search { width: 260px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.bell { position: relative; font-size: 17px; color: var(--text-2); cursor: pointer; }
.bell__dot { position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }

.content { padding: 20px 24px 48px; flex: 1; min-width: 0; }

/* ------------------------------ 指标卡 ------------------------------ */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: #fff; border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.kpi::after { content: ''; position: absolute; right: -26px; top: -26px; width: 96px; height: 96px;
  border-radius: 50%; background: var(--brand-light); opacity: .55; }
.kpi--mint::after { background: var(--mint-light); }
.kpi--lemon::after { background: var(--lemon-light); }
.kpi--green::after { background: #EAF9E2; }
.kpi__label { font-size: 12.5px; color: var(--text-3); position: relative; }
.kpi__value { font-size: 30px; font-weight: 700; letter-spacing: -1px; margin-top: 6px; position: relative;
  font-variant-numeric: tabular-nums; color: var(--text); }
.kpi__value span { font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.kpi__foot { font-size: 12px; color: var(--text-3); margin-top: 8px; position: relative; }
.kpi__foot b { color: var(--brand-dark); font-weight: 600; }

/* ------------------------------ 过滤条 ------------------------------ */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .input, .filters .select { width: auto; min-width: 140px; height: 34px; background: #fff;
  border: 1px solid var(--line-strong); }
.filters .input:focus, .filters .select:focus { border-color: var(--brand); }

/* ------------------------------ 工作台 ------------------------------ */
.audit-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .audit-layout { grid-template-columns: 1fr; } }
.audit-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 220px); overflow: auto; }
.audit-item {
  padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff; cursor: pointer; transition: all .16s ease;
}
.audit-item:hover { border-color: var(--brand-soft); background: #FFFCF8; }
.audit-item.active { border-color: var(--brand); background: var(--brand-light); }
.audit-item__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.audit-item__name { font-size: 13.5px; font-weight: 600; }
.audit-item__meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.detail-item__label { font-size: 12px; color: var(--text-3); }
.detail-item__value { font-size: 14px; margin-top: 2px; word-break: break-all; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 22px 0 12px;
  padding-left: 9px; border-left: 3px solid var(--brand); line-height: 1; }

/* ------------------------------ 分页 ------------------------------ */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; font-size: 13px; }
.pager button { height: 30px; min-width: 30px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text-2); }
.pager button:disabled { color: var(--text-4); border-color: var(--line); }
.pager button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ------------------------------ 登录页 ------------------------------ */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1000px 500px at 15% 10%, #FFF2E5 0%, rgba(255,249,240,0) 60%),
              radial-gradient(900px 480px at 88% 90%, #E7F8F6 0%, rgba(255,249,240,0) 62%), var(--bg); }
.login-box { width: 400px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 36px 34px 28px; }
.login-box__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }

/* ------------------------------ 顶栏用户菜单 ------------------------------ */
.userbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px;
  border: 1px solid transparent; background: transparent; border-radius: 999px;
  cursor: pointer; transition: background .16s ease, border-color .16s ease;
}
.userbtn:hover, .userbtn.is-open { background: var(--surface-2); border-color: var(--line); }
.userbtn__name { font-size: 13px; color: var(--text-2); max-width: 120px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.userbtn__caret { font-size: 10px; color: var(--text-4); line-height: 1; }

.usermenu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30;
  min-width: 208px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; overflow: hidden;
}
.usermenu[hidden] { display: none; }
.usermenu__head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu__name { font-size: 13.5px; font-weight: 600; }
.usermenu__sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; word-break: break-all; }
.usermenu__item {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 38px; padding: 0 12px;
  border: 0; background: transparent; border-radius: 9px; cursor: pointer;
  font-size: 13.5px; color: var(--text-2); text-align: left; font-family: inherit;
  transition: background .14s ease, color .14s ease;
}
.usermenu__item:hover { background: var(--brand-light); color: var(--brand-dark); }
.usermenu__ico { width: 18px; text-align: center; font-size: 14px; }

/* ===================== 官网内容页（平台后台） ===================== */
/* 头部：左标题 + 右快捷入口。做成两栏是为了让「查看官网」这类跳转
 * 和标题在同一行对齐，而不是缩在标题下面成为一排参差的按钮。 */
.sitehero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sitehero__main { min-width: 0; }
.sitehero__quick { display: flex; flex-wrap: wrap; gap: 8px; }

.qlink {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
  color: var(--text-2); font-size: 12.5px; text-decoration: none; white-space: nowrap;
  transition: all .15s ease;
}
.qlink:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); }
.qlink__ico { font-size: 13px; line-height: 1; }

/* 底部保存条：吸底，长表单滚到底部时不必再往上找按钮 */
.savebar {
  position: sticky; bottom: 0; z-index: 12;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 4px; padding: 12px 0 14px;
  background: linear-gradient(180deg, rgba(250,248,245,0) 0%, var(--bg) 34%, var(--bg) 100%);
}
.savebar .btn { flex: 0 0 auto; }

/* ------------------------------ 其它 ------------------------------ */
.chart-box { width: 100%; }
.bar-list__row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.bar-list__row:last-child { border-bottom: none; }
.rank-badge { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: #F4F1EC; color: var(--text-3); flex: 0 0 22px; }
.rank-badge--1 { background: linear-gradient(135deg,#FFD93D,#FFB800); color: #7A5600; }
.rank-badge--2 { background: linear-gradient(135deg,#E9EFF6,#C9D6E3); color: #54687C; }
.rank-badge--3 { background: linear-gradient(135deg,#FFE0C7,#F5C08E); color: #8A5320; }

.note { background: var(--lemon-light); border-radius: var(--radius); padding: 12px 14px; font-size: 12.5px;
  color: #8A6A00; line-height: 1.7; }
.note--mint { background: var(--mint-light); color: #16786F; }
.note--red { background: #FFF1F0; color: #B8302F; }
.code-box { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2);
  padding: 10px 12px; border-radius: 10px; font-size: 12.5px; word-break: break-all; }

.cfg-row { display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cfg-row:last-child { border-bottom: none; }
.cfg-row__label { font-size: 13.5px; }
.cfg-row__desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cfg-row input[type="number"] { text-align: right; }

/* 宽字段行（官网内容等「标签 + 大输入框」的场景）
 * ---------------------------------------------------------------
 * 默认 .cfg-row 是「1fr + 150px」，那是给平台默认规则页的「标签 + 小数字框」用的。
 * 官网内容页的输入框要**占满剩余宽度**（品牌名、一句话定位、JSON 列表…），
 * 沿用默认栅格会把输入框压成 150px 一条、长文案直接被裁掉 —— 这正是 2026-09-29
 * 截图里那处「右侧输入区太窄」的根因。这里用修饰类显式声明标签与正文的宽度。 */
.cfg-row--wide { grid-template-columns: minmax(180px, 232px) minmax(0, 1fr); align-items: start; }
.cfg-row--wide .cfg-row__label { font-weight: 500; color: var(--text); }
.cfg-row--wide .cfg-row__key {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px;
  color: var(--text-4); margin-top: 4px; word-break: break-all;
}
.cfg-row--wide .input, .cfg-row--wide textarea.input { width: 100%; }
.cfg-row--wide textarea.input { line-height: 1.75; }

/* ==================== 分享落地页装修 / 海报模板 ==================== */
.lpz { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }
.lpz__side { position: sticky; top: 76px; }

/* --- 手机预览框 --- */
.pv { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.pv__bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); font-size: 11px; color: var(--text-4); }
.pv__bar i { width: 8px; height: 8px; border-radius: 50%; background: #E3DCD2; display: inline-block; }
.pv__bar span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv__frame { width: 100%; height: 620px; border: 0; display: block; background: #fff; }

/* --- 区块行 --- */
.blk { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; }
.blk + .blk { margin-top: 10px; }
.blk--off { background: #FCFAF7; }
.blk--off .blk__title, .blk--off .blk__desc { opacity: .55; }
.blk__ord { display: flex; flex-direction: column; gap: 3px; }
.blk__ord button { width: 22px; height: 16px; line-height: 1; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text-3); border-radius: 5px; cursor: pointer; font-size: 9px; padding: 0; }
.blk__ord button:disabled { color: #DDD6CC; cursor: not-allowed; }
.blk__ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--brand-light);
  display: flex; align-items: center; justify-content: center; font-size: 16px; }
.blk__main { flex: 1; min-width: 0; }
.blk__title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.blk__desc { font-size: 12px; color: var(--text-3); margin-top: 3px; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blk__ops { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* --- 上传控件 --- */
.up { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 1px dashed var(--line-strong);
  border-radius: 12px; background: #FFFDFA; }
.up__file { display: none; }
.up__thumb { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.up__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up__ph { font-size: 12px; color: var(--text-4); }
.up__vico { font-size: 24px; }
.up__side { flex: 1; min-width: 0; }
.up__url { font-size: 12.5px; word-break: break-all; }

/* --- 表单里的小行（权益项 / 数据项） --- */
.fi { display: grid; grid-template-columns: 64px 1fr 1.4fr 30px; gap: 8px; align-items: center; margin-bottom: 8px; }
.ti { display: grid; grid-template-columns: 1fr 1fr 30px; gap: 8px; align-items: center; margin-bottom: 8px; }
.fi .input, .ti .input { height: 32px; }
.fi__del, .ti__del { padding: 0; width: 30px; height: 32px; border-radius: 8px; font-size: 14px; line-height: 1; }
.ck { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 6px 0 2px; }

/* --- 海报模板卡片 --- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.pcard { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 14px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); }
.pcard--off { background: #FCFAF7; }
.pcard--off .pcard__name, .pcard--off canvas { opacity: .5; }
.pcard__canvas { width: 168px; border-radius: 10px; overflow: hidden; background: var(--surface-2);
  display: flex; align-items: flex-start; justify-content: center; }
.pcard__canvas canvas { width: 100%; height: auto; display: block; }
.pcard__body { min-width: 0; display: flex; flex-direction: column; }
.pcard__name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pcard__size { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--brand-dark);
  background: var(--brand-light); border-radius: 6px; padding: 2px 7px; display: inline-block; margin: 6px 0; }
.pcard__ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }

/* --- 手机号小眼睛（仅总管理员可见可点） --- */
.eye-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-left: 4px; padding: 0; vertical-align: middle;
  border: 0; background: transparent; border-radius: 6px; color: var(--text-4);
  cursor: pointer; transition: color .15s ease, background .15s ease;
}
.eye-btn:hover { color: var(--brand-dark); background: var(--brand-light); }
.eye-btn svg { display: block; }
/* 2026-10-02：移动端把点击热区撑到 30px。
   _ui-probe 的判据是「移动端可点元素高度 ≥ 30px」，原来 22px 在手机上手很难点中；
   图标本身仍是 13px，只是按钮盒变大，视觉几乎无变化。 */
@media (max-width: 780px) {
  .eye-btn { width: 30px; height: 30px; margin-left: 2px; }
}

/* ===================== 组织架构页 ===================== */
.orgbox {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}
.orgbox--sub {
  margin: 10px 0 0;
  background: var(--bg-soft, #FAFBFC);
  border-style: dashed;
}
.orgbox .row { display: flex; align-items: center; gap: 8px; }
.orgbox .row--between { justify-content: space-between; }
.orgbox .mt8 { margin-top: 8px; }
.orgbox .mt16 { margin-top: 16px; }

/* ===================== 短信通道页 ===================== */
.sms2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.srow { display: grid; grid-template-columns: minmax(0, 1.5fr) 170px minmax(0, 1.3fr) 62px; gap: 10px;
  align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.srow:last-child { border-bottom: none; }
.srow__name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.srow__vars { font-size: 11.5px; color: var(--text-3); margin-top: 4px; word-break: break-all; }
.srow__vars code { background: var(--brand-light); color: var(--brand-dark);
  padding: 1px 5px; border-radius: 5px; font-size: 11px; }
.srow__map { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.vmap { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.vmap code { background: var(--surface-2); color: var(--text-2); padding: 1px 5px; border-radius: 5px; font-size: 11px; }
.vmap input { width: 92px; height: 28px; font-size: 12px; padding: 0 8px; }
.steps { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--text-2); line-height: 1.85; }
.steps li { margin-bottom: 2px; }
.steps b { color: var(--brand-dark); }
@media (max-width: 1280px) {
  .sms2 { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 1fr 1fr; }
}

/* ---------- 分享卡片（家长在微信里转发落地页时显示的那张卡片） ---------- */
.shg { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1280px) { .shg { grid-template-columns: 1fr; } }
.shg__from { font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.shcard { display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: #F5F5F5; }
.shcard__thumb {
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 8px; overflow: hidden;
  background: #E6E6E6; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #9A9A9A; text-align: center; line-height: 1.3;
}
.shcard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shcard__main { flex: 1; min-width: 0; }
.shcard__title {
  font-size: 13.5px; font-weight: 600; color: #1A1A1A; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-all;
}
.shcard__desc {
  font-size: 12px; color: #9A9A9A; margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* ==================== 手机 / 平板适配 ====================
 * 分两个断点，别混在一起：
 *   ≤1024px —— **栅格收敛**。纯布局压平，侧栏还是常驻的。
 *              为什么单独拎出来：`.lpz` 是「1fr + 372px 预览框」，
 *              在 900px 的窄窗里左栏会被挤到 100px 出头，先于侧栏就该压掉。
 *   ≤780px  —— **手机形态**。侧栏改抽屉、顶栏瘦身、间距收紧。
 *              断点取 780 而不是 768/860：iPad 竖屏是 810/820，那里留常驻侧栏更好用，
 *              真要切成抽屉反而少了随时的导航。
 * 设计取舍：
 *  · 侧栏用抽屉而不是底部 tab —— 18 个菜单项挤到底部只剩图标，运营认不出来。
 *  · 只收敛布局，不隐藏任何功能按钮，避免出现「电脑上有、手机上没有」的投诉。
 *  · 宽表格横向滚动，不折叠成卡片（20 多张表逐张改写风险太大）。
 *  · 权限显隐仍由 app.js 的 can() 决定，这里只管样式，两件事互不干扰。
 * ===================================================================== */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 34px; padding: 0;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text-2);
  border-radius: 10px; font-size: 16px; line-height: 1; cursor: pointer;
}
.side-mask { display: none; }

@media (max-width: 1024px) {
  .lpz { grid-template-columns: 1fr; }
  .lpz__side { position: static; }
  .pgrid { grid-template-columns: 1fr; }
  .pcard { grid-template-columns: 140px minmax(0, 1fr); }
  .pcard__canvas { width: 140px; }
}

@media (max-width: 780px) {
  :root { --nav-w: 0px; }

  /* --- 侧栏：抽屉 --- */
  .side {
    width: 270px; flex: 0 0 270px;
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.2, .8, .3, 1);
    box-shadow: 8px 0 32px rgba(120, 100, 80, .16);
  }
  .side.open { transform: none; }
  .side-mask {
    display: block; position: fixed; inset: 0; z-index: 19;
    background: rgba(51, 45, 38, .34);
    opacity: 0; pointer-events: none; transition: opacity .24s ease;
  }
  .side-mask.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }

  /* --- 顶栏 --- */
  .nav-toggle { display: inline-flex; }
  .topbar { height: 54px; padding: 0 12px; gap: 10px; }
  .topbar__search { display: none; }        /* 线索页自带关键词筛选，这里让位给标题 */
  .crumb { font-size: 12px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .crumb__group, .crumb__sep { display: none; }
  .crumb b { font-size: 15.5px; }
  .content { padding: 12px 12px 64px; }

  /* --- 栅格 --- */
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; border-radius: 14px; }
  .kpi__value { font-size: 24px; }
  .kpi__label, .kpi__foot { font-size: 12px; }
  .audit-layout, .sms2, .shg, .detail-grid { grid-template-columns: 1fr; }
  .audit-list { max-height: none; }
  .cfg-row, .fi, .ti, .srow { grid-template-columns: 1fr; }
  .cfg-row { gap: 6px; }
  /* 宽字段行在手机上也是单列，但要收紧标签与输入框的间距 */
  .cfg-row--wide { grid-template-columns: 1fr; gap: 7px; }
  .cfg-row--wide .cfg-row__label { font-size: 13px; }
  /* 官网内容页头部：竖排 + 快捷入口铺满 */
  .sitehero { flex-direction: column; align-items: stretch; gap: 12px; }
  .sitehero__quick { gap: 6px; }
  .qlink { flex: 1 1 calc(50% - 3px); justify-content: center; }
  /* 保存条：按钮等宽平分，拇指好点 */
  .savebar { padding: 10px 0 12px; }
  .savebar .btn { flex: 1; }

  /* --- 触控目标放大（手机上 26px 的按钮基本点不准） ---
   * 判据：iOS HIG 建议可点高度 ≥ 44px，安卓 Material 建议 ≥ 48dp；
   * 这里取 34px 作下限 —— 列表里的行内操作按钮（编辑/删除）如果放到 44px，
   * 一行会高出一倍、一屏放不下几个区块。34px 是「点得准」与「看得下」的折中。
   * 只放大高度、不改字号，视觉上仍是小按钮，但可点区域够用。 */
  .btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
  /* btn--xs 是列表行里最常见的操作按钮（编辑/删除/下架），原来只有 26px。
   * 它是这一轮移动端体检里命中最多的一项（4 个页面共 60+ 个）。 */
  .btn--xs { height: 32px; padding: 0 12px; font-size: 12.5px; }
  /* 区块排序的 ▲▼：原来只有 22×16，是全站最小的可点目标 */
  .blk__ord button { width: 32px; height: 30px; font-size: 12px; border-radius: 8px; }
  .blk__ord { gap: 4px; }
  /* 短信页的行内小输入框（模板 code / 时效 minutes / 映射值） */
  .vmap input { width: 104px; height: 34px; font-size: 13px; }
  .fi .input, .ti .input { height: 36px; }
  .ck { min-height: 34px; margin: 4px 0; }
  /* 勾选框：原生 checkbox 只有 13-18px，手指点不准；margin 撑不开命中区
   * （margin 不接收点击），所以只能把控件本身放大到 24px。
   * 24px 是「点得准」与「不笨重」的折中，再大就会撑乱表单的纵向节奏。 */
  input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; margin: 5px 0; }
  /* 过滤条：手机上每个控件各占一整行，按钮与主操作上下对齐。
   * 原来用 flex-wrap 让它自然换行，结果「查询」跟在下拉框后半行、
   * 「+ 开通机构」被 spacer 推到右边，两行按钮一左一右看着是错位的。 */
  .filters { gap: 8px; }
  .filters .input, .filters .select { flex: 1 1 100%; min-width: 0; height: 38px; }
  .filters .btn { height: 38px; }
  .filters > .spacer { display: none; }
  /* 主操作（如「+ 开通机构」）单独占一行、右对齐，与上一行的筛选区分开 */
  .filters > .btn:last-child { flex: 1 1 100%; margin-left: 0; }
  /* 表格里的小操作按钮也抬一档，避免和相邻链接误触 */
  table.tb .btn--sm, table.rl-table .btn--sm { height: 32px; padding: 0 12px; }
  .pcard { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .pcard__canvas { width: 110px; }
  /* 少数几处把栅格直接写在 style 上的，这里统一压平 —— 否则它们会撑破屏幕 */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* --- 表格：横向滚动 --- */
  table.tb, table.rl-table { display: block; width: 100%; overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch; }
  .table-wrap { -webkit-overflow-scrolling: touch; }

  /* --- 行 / 弹层 --- */
  .row { flex-wrap: wrap; }
  .modal-mask { padding: 12px; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 88vh; border-radius: 16px; }
  .modal__head { padding: 16px 18px 0; }
  .modal__body { padding: 14px 18px 8px; }
  .modal__foot { padding: 12px 18px 18px; }
  .modal__foot .btn { flex: 1; }

  /* --- 登录 & 预览框 --- */
  .login-box { width: 100%; padding: 28px 22px 22px; border-radius: 18px; }
  .login-page { padding: 16px; }
  .pv__frame { height: 70vh; min-height: 420px; }
}

/* 更窄的机型（iPhone SE / 小屏安卓）再收一点 */
@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
  .content { padding: 10px 10px 60px; }
}
