/* 资料架 — 主体资料分发 */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #ffffff;
  --bg2: #f7f7f8;
  --bg3: #efeff1;
  --line: rgba(0, 0, 0, .09);
  --line2: rgba(0, 0, 0, .16);
  --tx: #1c1c1e;
  --tx2: #8a8a8e;
  --tx3: #b0b0b4;
  --accent: #0a7cff;
  --accent-bg: #eaf3ff;
  --ok: #1fa84d;
  --ok-bg: #e9f8ee;
  --warn: #c77700;
  --warn-bg: #fff4e0;
  --bad: #d92b23;
  --bad-bg: #fdecea;
  --top: 56px;
  --side: 286px;
  --r: 12px;
  --r-sm: 9px;
}

html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tx);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------------- 顶栏 ---------------- */
.top {
  position: sticky; top: 0; z-index: 40;
  height: var(--top);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.logo {
  flex: none;
  font-size: 16px; font-weight: 600; letter-spacing: -.2px;
  white-space: nowrap;
}
.logo i {
  display: inline-block; width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); margin-right: 7px; vertical-align: 2px;
}

.search {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 380px;
}
.search input {
  width: 100%; min-width: 0; height: 34px; padding: 0 30px 0 32px;
  border: 1px solid transparent; border-radius: 9px;
  background: var(--bg3); outline: none;
  font-size: 14px; transition: background .15s, border-color .15s;
  -webkit-appearance: none;
}
.search input:focus { background: #fff; border-color: var(--line2); }
.search input::-webkit-search-cancel-button { display: none; }
.search::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 13px; height: 13px;
  margin-top: -7px; border-radius: 50%; border: 1.6px solid var(--tx3);
  pointer-events: none;
}
.search::after {
  content: ""; position: absolute; left: 21px; top: 50%; width: 6px; height: 1.6px;
  background: var(--tx3); transform: rotate(45deg); transform-origin: left center;
  margin-top: 5px; pointer-events: none;
}
.clr {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; background: var(--tx3);
  color: #fff; font-size: 14px; line-height: 22px; text-align: center;
  display: none;
}
.clr.show { display: block; }

.topnav { flex: none; margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topnav a, .topnav button {
  padding: 6px 11px; border-radius: 8px; font-size: 14px; color: var(--tx2);
  transition: background .15s, color .15s; white-space: nowrap;
}
.topnav a:hover, .topnav button:hover { background: var(--bg3); color: var(--tx); }
.topnav a.on { color: var(--accent); background: var(--accent-bg); }
.topnav a.strong { color: var(--tx); }

/* ---------------- 骨架 ---------------- */
.wrap {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  height: calc(100vh - var(--top));
  height: calc(100dvh - var(--top));
}
.side {
  display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.main {
  min-width: 0; overflow-y: auto; overflow-x: hidden;
  padding: 22px 26px 90px;
  -webkit-overflow-scrolling: touch;
}

/* ---------------- 分段控件 ---------------- */
.tabs {
  display: flex; gap: 2px; padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  flex: 1; min-width: 0;
  padding: 6px 2px; border-radius: 7px;
  font-size: 13px; color: var(--tx2);
  transition: background .15s, color .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tabs button:hover { background: var(--bg3); }
.tabs button.on { background: var(--bg3); color: var(--tx); font-weight: 500; }

/* ---------------- 主体列表 ---------------- */
.ents { flex: 1; overflow-y: auto; padding: 4px 0 40px; -webkit-overflow-scrolling: touch; }
.ent {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 14px;
  border-left: 2.5px solid transparent;
  border-bottom: 1px solid rgba(0, 0, 0, .045);
  transition: background .12s;
}
.ent:last-of-type { border-bottom: 0; }
.ent:hover { background: var(--bg2); }
.ent.on { background: var(--accent-bg); border-left-color: var(--accent); }
.ent .nm {
  flex: 1; min-width: 0; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ent .st {
  flex: none; font-size: 12px; padding: 1px 7px; border-radius: 20px;
  font-variant-numeric: tabular-nums;
}
.ent .st.ok { color: var(--ok); background: var(--ok-bg); }
.ent .st.miss { color: var(--bad); background: var(--bad-bg); }
.ent .st.part { color: var(--warn); background: var(--warn-bg); }
.ent .st.none { color: #62626a; background: #e6e6ea; }

.side .empty {
  padding: 40px 20px; text-align: center; color: var(--tx2); font-size: 13.5px; line-height: 1.7;
}
.side .addent {
  margin: 8px 14px 0; width: calc(100% - 28px);
  padding: 9px; border-radius: var(--r-sm);
  border: 1px dashed var(--line2); color: var(--tx2); font-size: 13.5px;
  transition: all .15s;
}
.side .addent:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* ---------------- 主体详情 ---------------- */
.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--tx2); margin-bottom: 14px;
}
.crumb button { color: var(--accent); font-size: 13px; padding: 2px 0; }
.crumb .sep { color: var(--tx3); }

.head { margin-bottom: 22px; }
.head h1 {
  margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.3px;
  line-height: 1.3;
}
.head .sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--tx2);
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px; font-size: 12.5px;
}
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.miss { color: var(--bad); background: var(--bad-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.gray { color: var(--tx2); background: var(--bg3); }
.head .acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line2); background: #fff;
  font-size: 14px; transition: all .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg2); border-color: var(--tx3); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { filter: brightness(1.06); }
.btn.dgr { color: var(--bad); border-color: rgba(217, 43, 35, .3); }
.btn.dgr:hover { background: var(--bad-bg); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 7px; }

/* ---------------- 槽位 ---------------- */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(198px, 1fr));
  gap: 12px;
}
.slot {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  overflow: hidden;
  text-align: left;
  display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
  min-height: 0;
}
.slot:hover { border-color: var(--line2); }
.slot.filled { cursor: pointer; }
.slot.filled:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.slot.empty {
  border-style: dashed;
  background: #fcfcfd;
}
.slot.empty:hover { border-color: var(--accent); background: var(--accent-bg); }

.slot .sh {
  padding: 9px 12px;
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--line);
}
.slot.empty .sh { border-bottom: 0; }
.slot .tn {
  font-size: 13.5px; font-weight: 500; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slot .req {
  flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--bad);
}
.slot .n {
  flex: none; font-size: 11.5px; color: var(--tx2); background: var(--bg3);
  padding: 1px 6px; border-radius: 20px; font-variant-numeric: tabular-nums;
}
.slot .sb {
  flex: none; aspect-ratio: 4 / 3; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2);
  overflow: hidden;
}
.slot .sb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.slot .sb .txt {
  padding: 10px 12px; font-size: 12.5px; color: var(--tx2);
  line-height: 1.55; width: 100%;
  max-height: 100%; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  background: #fff;
}
.slot .sb .ico {
  font-size: 12px; font-weight: 600; color: var(--tx2);
  padding: 7px 10px; border: 1px solid var(--line2); border-radius: 7px;
  background: #fff;
}
.slot .sb .ph {
  font-size: 12.5px; color: var(--tx3);
}
.slot.empty .sb { background: transparent; }
.slot .sx {
  position: absolute; right: 8px; top: 8px;
  font-size: 11.5px; padding: 1px 6px; border-radius: 20px;
  background: var(--bad); color: #fff;
}
.slot .sexp {
  position: absolute; left: 8px; bottom: 8px;
  font-size: 11.5px; padding: 1px 7px; border-radius: 20px;
  background: rgba(0, 0, 0, .62); color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.slot .sexp.bad { background: var(--bad); }

.slot-add {
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line2); border-radius: var(--r);
  color: var(--tx2); font-size: 13.5px; min-height: 132px;
  transition: all .15s;
}
.slot-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.sechead {
  display: flex; align-items: center; gap: 10px;
  margin: 30px 0 12px;
}
.sechead h2 { margin: 0; font-size: 14px; font-weight: 600; }
.sechead .line { flex: 1; height: 1px; background: var(--line); }
.sechead .tip { font-size: 12.5px; color: var(--tx2); }

/* ---------------- 资料包 ---------------- */
.packs { display: flex; flex-direction: column; gap: 10px; }
.pack {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
.pack:hover { border-color: var(--line2); box-shadow: 0 2px 10px rgba(0, 0, 0, .05); }
.pack .pi { flex: 1; min-width: 0; }
.pack .pn { font-size: 14.5px; font-weight: 500; margin-bottom: 3px; }
.pack .pd { font-size: 12.5px; color: var(--tx2); }
.pack .go { color: var(--tx3); font-size: 18px; }

.filt {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; background: var(--bg2); border-radius: var(--r);
  margin-bottom: 18px; font-size: 13.5px;
}
.filt select {
  height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line2); background: #fff; outline: none;
  max-width: 260px;
}
.filt .cnt { color: var(--tx2); font-size: 12.5px; margin-left: auto; }

/* 平铺发送视图 */
.sheet { max-width: 760px; }
.sheet .note {
  font-size: 13px; color: var(--tx2); line-height: 1.7;
  padding: 12px 14px; background: var(--warn-bg); border-radius: var(--r);
  margin-bottom: 20px;
}
.piece { margin-bottom: 26px; }
.piece .ph2 {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 9px;
}
.piece .ph2 .own {
  font-size: 12px; color: var(--accent); background: var(--accent-bg);
  padding: 1px 7px; border-radius: 20px;
}
.piece .ph2 .tt { font-size: 14px; font-weight: 500; }
.piece .ph2 .ex { font-size: 12px; color: var(--bad); }
.piece img.pic {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg2);
}
.piece .pdoc {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg2);
}
.piece .ptext {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
  font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
  background: #fff;
}
.piece .ploc {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
  font-size: 14px; line-height: 1.75;
}
.piece .pbar { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ---------------- 灯箱 ---------------- */
.lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .94);
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .18s;
}
.lb.on { opacity: 1; }
.lb-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.lb-stage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
}
.lb-x {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 20px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lb-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  color: #fff; font-size: 13.5px;
}
.lb-bar .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-bar button, .lb-bar a {
  padding: 7px 13px; border-radius: 8px;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 13.5px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  white-space: nowrap;
}
.lb-bar button:hover, .lb-bar a:hover { background: rgba(255, 255, 255, .28); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px;
}
.lb-nav.l { left: 12px; }
.lb-nav.r { right: 12px; }

/* ---------------- 弹层 ---------------- */
.mod {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity .16s;
}
.mod.on { opacity: 1; }
.mod-box {
  width: 100%; max-width: 460px; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
  transform: translateY(8px); transition: transform .18s;
}
.mod.on .mod-box { transform: translateY(0); }
.mod-h {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.mod-h b { font-size: 15.5px; font-weight: 600; flex: 1; }
.mod-h .x { width: 28px; height: 28px; border-radius: 50%; background: var(--bg3); font-size: 16px; }
.mod-b { padding: 16px 18px; overflow-y: auto; flex: 1; }
.mod-f {
  display: flex; gap: 8px; padding: 14px 18px;
  border-top: 1px solid var(--line); justify-content: flex-end;
}

.field { margin-bottom: 14px; }
.field > label {
  display: block; font-size: 12.5px; color: var(--tx2); margin-bottom: 6px;
}
.field input[type=text],
.field input[type=tel],
.field input[type=date],
.field input[type=url],
.field textarea,
.field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line2);
  border-radius: var(--r-sm); outline: none; background: #fff;
  font-size: 14.5px; transition: border-color .15s;
  -webkit-appearance: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
.field .hint { font-size: 12px; color: var(--tx3); margin-top: 5px; line-height: 1.5; }
.field .filepick {
  display: block; padding: 14px; border: 1px dashed var(--line2);
  border-radius: var(--r-sm); text-align: center; font-size: 13.5px; color: var(--tx2);
  cursor: pointer;
}
.field .filepick:hover { border-color: var(--accent); color: var(--accent); }
.field .filepick input { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 12px);
  z-index: 400;
  padding: 10px 20px; border-radius: 22px;
  background: rgba(28, 28, 30, .92); color: #fff; font-size: 13.5px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: 80vw; text-align: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 空状态 ---------------- */
.blank {
  padding: 70px 20px; text-align: center;
}
.blank .bi {
  width: 46px; height: 46px; margin: 0 auto 16px;
  border-radius: 12px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--tx3);
}
.blank b { display: block; font-size: 15px; font-weight: 500; margin-bottom: 7px; }
.blank p { margin: 0; font-size: 13.5px; color: var(--tx2); line-height: 1.7; }

/* ---------------- 登录页 ---------------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; margin: 0; padding: 20px;
  background: #f7f7f8;
}
.login-card {
  width: 100%; max-width: 340px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 28px rgba(0, 0, 0, .07);
}
.login-card .logo {
  font-size: 20px; font-weight: 600; text-align: center;
  margin-bottom: 7px; letter-spacing: -.2px;
}
.login-card .sub {
  font-size: 13px; color: var(--tx2); text-align: center;
  margin: 0 0 26px; line-height: 1.6;
}
.login-card input {
  display: block; width: 100%;
  padding: 11px 13px; margin-bottom: 11px;
  border: 1px solid var(--line2); border-radius: 10px;
  font-size: 15px; outline: none; background: #fff;
  -webkit-appearance: none; transition: border-color .15s;
}
.login-card input:focus { border-color: var(--accent); }
.login-card .primary {
  width: 100%; padding: 12px; margin-top: 7px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 500;
  transition: filter .15s;
}
.login-card .primary:hover { filter: brightness(1.07); }
.login-card .err {
  display: none; margin: 14px 0 0; text-align: center;
  color: var(--bad); font-size: 13px;
}
.login-card .err.show { display: block; }

/* ---------------- 管理页 ---------------- */
.adm {
  max-width: 800px; margin: 0 auto;
  padding: 26px 20px 90px;
}
.adm .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 20px 18px;
  margin-bottom: 16px;
}
.adm .card h2 {
  margin: 0 0 7px; font-size: 15.5px; font-weight: 600; letter-spacing: -.1px;
}
.adm .card .desc {
  margin: 0 0 16px; font-size: 12.5px; color: var(--tx2); line-height: 1.75;
}
.adm .rows { display: flex; flex-direction: column; }
.adm .row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.adm .row:last-child { border-bottom: 0; }
.adm .rmain {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.adm .rmain b { font-size: 14px; font-weight: 500; }
.adm .rtag {
  font-size: 11.5px; padding: 1px 7px; border-radius: 20px;
  background: var(--bg3); color: var(--tx2); white-space: nowrap;
}
.adm .rtag.req { background: var(--bad-bg); color: var(--bad); }
.adm .rtag.off { background: var(--bg3); color: var(--tx3); text-decoration: line-through; }
.adm .none { padding: 16px 0; color: var(--tx3); font-size: 13.5px; }
.adm .inp {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  font-size: 14.5px; outline: none; background: #fff;
  -webkit-appearance: none;
}
.adm .inp:focus { border-color: var(--accent); }
.adm .ta {
  display: block; width: 100%; padding: 11px 13px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  font-size: 14.5px; line-height: 1.7; font-family: inherit;
  outline: none; resize: vertical;
}
.adm .ta:focus { border-color: var(--accent); }

.part {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px; margin-bottom: 9px;
  background: #fbfbfc;
}
.part-top { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.part-top select {
  flex: 1; min-width: 0; height: 32px; padding: 0 8px;
  border: 1px solid var(--line2); border-radius: 7px;
  background: #fff; font-size: 13.5px; outline: none;
}
.pdel {
  flex: none; width: 28px; height: 28px;
  border-radius: 7px; background: var(--bg3); color: var(--tx2);
  font-size: 16px; line-height: 1;
}
.pdel:hover { background: var(--bad-bg); color: var(--bad); }
.tchips { display: flex; gap: 6px; flex-wrap: wrap; }
.tchip {
  padding: 4px 10px; border-radius: 20px;
  font-size: 12.5px; border: 1px solid var(--line2);
  color: var(--tx2); background: #fff;
  transition: all .13s;
}
.tchip:hover { border-color: var(--tx3); }
.tchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------- 移动端 ---------------- */
@media (max-width: 820px) {
  :root { --top: 52px; }
  .top { padding: 0 12px; gap: 10px; }
  .logo { font-size: 15px; }
  .topnav a, .topnav button { padding: 6px 8px; font-size: 13.5px; }
  .topnav .hide-sm { display: none; }
  .logo .lt { display: none; }
  .logo i { margin-right: 0; }

  .wrap { display: block; height: auto; min-height: calc(100dvh - var(--top)); }
  .side { border-right: 0; height: auto; }
  .main { padding: 16px 14px 80px; overflow: visible; }

  body.detail .side { display: none; }
  body.detail .main { display: block; }
  body:not(.detail) .main { display: none; }

  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .slot { min-height: 0; }
  .slot .tn { font-size: 12.5px; }
  .head h1 { font-size: 19px; }
  .ent { padding: 12px 14px; }
  .ent .nm { font-size: 15px; }
  .mod { padding: 0; align-items: flex-end; }
  .mod-box {
    max-width: none; border-radius: 16px 16px 0 0;
    max-height: 92dvh;
  }
  .row2 { grid-template-columns: 1fr; }
  .lb-nav { display: none; }
  .adm { padding: 14px 12px 70px; }
  .adm .card { padding: 16px 14px 14px; }
}

@media (max-width: 380px) {
  .slots { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
  /* 用户主要白天发资料，暂不做深色，避免半成品 */
}
