/* 林中问卷 · 设计系统
   中性灰底 + 纯白卡片，颜色只用来表达状态，不用来表达氛围。
   一个样式表管全部页面：控制台 + 答题页（跟随主题令牌）。 */

:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #111418;
  --ink2: #5b6472;
  --ink3: #98a0ac;
  --line: #e9ebef;
  --line2: #d9dde4;
  --accent: #0f9d6e;
  --accent-dark: #0a7d56;
  --soft: #e9f7f0;
  --danger: #c93b2f;
  --warn: #a9691f;
  --info: #2b5fa8;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 28px -18px rgba(16, 24, 40, 0.26);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
/* 组件类普遍写了 display，会盖掉 UA 的 [hidden]{display:none}，这里统一兜住 */
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: #d3f0e1; }
.i { flex: none; }

/* ---------- 基础控件 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: 9px;
  border: 1px solid var(--line2); background: var(--card); color: var(--ink);
  font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, transform .06s;
}
.btn:hover { background: #f7f8fa; border-color: #c3c9d2; }
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #23272f; border-color: #23272f; }
.btn-green { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-green:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink2); }
.btn-ghost:hover { background: #eef0f3; color: var(--ink); }
.btn-danger { color: var(--danger); border-color: #e8cdc9; }
.btn-danger:hover { background: #fbeeec; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px;
  border-radius: 20px; font-size: 11.5px; font-weight: 500; letter-spacing: .01em;
  background: #eef0f3; color: var(--ink2); white-space: nowrap;
}
.pill-green { background: #dcf3e8; color: #0b7d55; }
.pill-blue { background: #e6eefb; color: #2b5fa8; }
.pill-amber { background: #f8eeda; color: #8f5a14; }
.pill-pink { background: #f8e8ee; color: #9c3f63; }
.pill-red { background: #fbe9e7; color: #a83a2d; }
.pill-gray { background: #eef0f3; color: #5f6673; }

.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--line2); border-radius: 9px; background: #fff;
  transition: border-color .12s, box-shadow .12s; outline: none;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 157, 110, .13); }
.input::placeholder { color: #a9b0ba; }
label.lb { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--ink3); margin-top: 6px; line-height: 1.55; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.empty { padding: 44px 20px; text-align: center; color: var(--ink3); font-size: 13.5px; }
.empty b { display: block; color: var(--ink2); font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--ink2); }
.tiny { font-size: 12px; color: var(--ink3); }
.hr { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ---------- 品牌 ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: #0f9d6e; color: #fff;
}
.brand-text { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.brand-text em { font-style: normal; color: var(--ink2); font-weight: 400; margin-left: 2px; }

/* ---------- 控制台骨架 ---------- */
.app { display: flex; min-height: 100vh; background: var(--bg); }
.side {
  width: 224px; flex: none; border-right: 1px solid var(--line);
  background: var(--card); padding: 16px 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.side .brand { padding: 4px 8px 14px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; color: #545b66; font-size: 13.5px;
}
.side-nav a:hover { background: #f4f5f7; color: var(--ink); }
.side-nav a.on { background: #f1f3f5; color: var(--ink); font-weight: 600; }
.side-nav a.on .i { color: var(--accent-dark); }
.side-sep { margin: 10px 10px; height: 1px; background: var(--line); }
.side-foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #e6e9ee;
  display: grid; place-items: center; font-size: 12px; color: #454c57; font-weight: 500; flex: none;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-me { display: flex; align-items: center; gap: 9px; min-width: 0; border-radius: 8px; padding: 4px 5px; margin: 0 -5px; }
.side-me:hover { background: #f1f3f5; }
.side-who { display: flex; flex-direction: column; min-width: 0; }
.side-user .nm, .side-me .nm { font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .em, .side-me .em { font-size: 11px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user form { margin-left: auto; flex: none; }

.main { flex: 1; min-width: 0; padding: 26px 32px 72px; max-width: 1240px; }

/* 手机底部 tab：桌面不出现，≤900px 接管导航 */
.mtab { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.page-head .sub { font-size: 13px; color: var(--ink2); margin-top: 5px; }
.head-actions { display: flex; gap: 8px; align-items: center; }

.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink3); margin-bottom: 14px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .6; }

/* ---------- 统计卡 ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 25px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink2); }
.stat.accent b { color: var(--accent-dark); }

/* ---------- 列表 ---------- */
.list { border: 1px solid var(--line); border-radius: 13px; background: var(--card); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: #fbfbfc; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; min-width: 0; }
.row-title a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title a:hover { color: var(--accent-dark); }
.row-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink3); margin-top: 5px; }
.row-meta .dot { opacity: .5; }
.row-actions { display: flex; gap: 4px; }
.row-num { font-family: var(--mono); font-size: 13px; color: var(--ink); min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.row-num span { display: block; font-family: var(--font); font-size: 11px; color: var(--ink3); text-align: right; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .input { width: auto; min-width: 200px; height: 34px; font-size: 13px; }
.toolbar form { display: flex; gap: 8px; }
.seg { display: inline-flex; padding: 2px; background: #eceef1; border-radius: 9px; gap: 2px; }
.seg a { padding: 5px 11px; border-radius: 7px; font-size: 12.5px; color: var(--ink2); }
.seg a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* ---------- 表单列表卡片 ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
/* 卡片自带 display，[hidden] 的浏览器默认样式会被压过，这里补一条 */
.fcard[hidden], .tpl-card[hidden] { display: none !important; }
.fcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 9px;
  transition: border-color .14s, box-shadow .14s, opacity .18s, transform .18s;
}
.fcard:hover { border-color: #d3d8e0; box-shadow: 0 2px 10px -4px rgba(16,24,40,.14); }
.fcard.gone { opacity: 0; transform: scale(.98); }
.fcard-top { display: flex; align-items: center; gap: 8px; }
.fcard h3 { font-size: 14.5px; font-weight: 500; line-height: 1.45; min-height: 21px; }
.fcard h3 a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard h3 a:hover { color: var(--accent-dark); }
.fcard-foot { display: flex; align-items: center; gap: 6px; padding-top: 10px; margin-top: auto; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink3); }
.fcard-foot .sp { margin-left: auto; display: flex; gap: 2px; }

/* ---------- 编辑器 ---------- */
.ed-shell { height: 100vh; display: flex; flex-direction: column; background: #f1f3f5; }
.ed-top {
  height: 54px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 5;
}
.ed-top .ttl { font-size: 14px; font-weight: 500; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-top .state { font-size: 12px; color: var(--ink3); }
.ed-top .grow { flex: 1; }
.ed-body { flex: 1; display: grid; grid-template-columns: 236px minmax(0, 1fr) 336px; min-height: 0; }
.ed-pal { background: #fafbfc; border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 12px 30px; }
.ed-pal h4 { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink3); margin: 14px 4px 6px; font-weight: 600; }
/* 手机专用的添加按钮与选题面板，桌面走左侧栏 */
.add-fab { display: none; }
.pal-item {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px;
  font-size: 13px; color: #454c57; cursor: grab; user-select: none;
}
.pal-item:hover { background: #eef6f1; color: #0a6349; }
.pal-item .ic { width: 20px; text-align: center; font-size: 12px; color: #868e9a; }
.pal-item:hover .ic { color: #0b7d55; }
.ed-canvas { overflow-y: auto; padding: 24px 22px 120px; }
.ed-paper { max-width: 720px; margin: 0 auto; }
.ed-paper-head { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 20px 22px; margin-bottom: 10px; }
.ed-paper-head h2 { font-size: 20px; outline: none; }
.ed-paper-head p { font-size: 13px; color: var(--ink2); margin-top: 6px; outline: none; }
.ed-paper-head .ph { color: #a9b0ba; }
.qcard {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 11px; padding: 14px 16px 15px; margin-bottom: 8px;
  transition: border-color .12s, box-shadow .12s;
}
.qcard:hover { border-color: #cfd4dc; }
.qcard.sel { border-color: #74c7a8; box-shadow: 0 0 0 3px rgba(15,157,110,.12); }
.qcard.drag-over { border-color: var(--accent); border-style: dashed; }
.qcard.dragging { opacity: .4; }
.qcard .qh { display: flex; gap: 8px; align-items: flex-start; }
.qcard .qidx { font-size: 12px; color: var(--ink3); min-width: 18px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.qcard .qt { font-size: 14px; font-weight: 500; line-height: 1.5; word-break: break-word; }
.qcard .qreq { color: #c0392b; margin-left: 3px; }
.qcard .qd { font-size: 12px; color: var(--ink3); margin: 5px 0 0 26px; }
.qcard .qprev { margin: 11px 0 0 26px; }
.qcard .qh-tools { margin-left: auto; display: flex; gap: 2px; opacity: 0; transition: .12s; }
.qcard:hover .qh-tools, .qcard.sel .qh-tools { opacity: 1; }
.qcard .grab { cursor: grab; color: #a9b0ba; padding: 2px; }
.qcard .grab:active { cursor: grabbing; }
.qcard.drag-over::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -5px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.mini-opt { font-size: 12.5px; color: var(--ink2); display: flex; gap: 7px; padding: 3px 0; }
.mini-opt i { width: 12px; height: 12px; border: 1px solid #cfd3cd; border-radius: 50%; margin-top: 4px; flex: none; }
.mini-opt.sq i { border-radius: 3px; }
.pgbreak {
  display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--ink3);
  font-size: 11.5px; letter-spacing: .02em; cursor: pointer;
}
.pgbreak::before, .pgbreak::after { content: ''; flex: 1; height: 1px; background: repeating-linear-gradient(90deg, #cfd4dc 0 4px, transparent 4px 8px); }
.pgb-mid { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pgb-del {
  border: 1px solid var(--line2); background: #fff; color: var(--ink2);
  font-size: 11.5px; line-height: 1; padding: 5px 9px; border-radius: 6px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.pgb-del:hover { color: var(--danger); border-color: #f0c4c0; background: #fdf4f3; }
.pgb-del:active { transform: scale(0.97); }
@media (max-width: 900px) {
  .pgbreak { margin: 20px 0; font-size: 11px; }
  .pgb-mid { gap: 7px; }
  .pgb-del { padding: 9px 12px; font-size: 12px; border-radius: 8px; }
}

.ed-insp { background: var(--card); border-left: 1px solid var(--line); overflow-y: auto; }
/* 手机上的抽屉外壳：桌面上它就是第三列，不能有额外视觉 */
.ed-insp-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--card); border-left: 1px solid var(--line); }
.ed-insp-wrap .ed-insp { border-left: 0; flex: 1; }
.insp-grip { display: none; }
.insp-sec { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.insp-sec h4 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); margin-bottom: 11px; font-weight: 600; }
.insp-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.insp-tabs button {
  flex: 1; height: 42px; border: 0; background: none; font-size: 12.5px; color: var(--ink2);
  cursor: pointer; border-bottom: 2px solid transparent;
}
.insp-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chk { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink2); cursor: pointer; padding: 3px 0; }
.chk input { accent-color: var(--accent); }
/* 分段按钮：单/双列、图标、上传类型 */
.seg button { padding: 5px 11px; border-radius: 7px; font-size: 12.5px; color: var(--ink2); border: 0; background: none; cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); font-weight: 500; }
.opt-edit { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.opt-edit.tall { flex-wrap: wrap; }
.opt-edit .drag { color: #b9c0ca; cursor: grab; font-size: 12px; }
.opt-edit input[type=text] { flex: 1; min-width: 0; height: 32px; padding: 0 9px; border: 1px solid var(--line2); border-radius: 7px; font-size: 13px; outline: none; }
.opt-edit input[type=text]:focus { border-color: var(--accent); }
.opt-edit input[type=number] { height: 28px; padding: 0 5px; border: 1px solid var(--line2); border-radius: 6px; font-size: 12px; width: 44px; }
.opt-edit input[type=radio], .opt-edit input[type=checkbox] { accent-color: var(--accent); flex: none; }
.opt-edit .del { border: 0; background: none; color: #a9b0ba; cursor: pointer; padding: 4px; }
.opt-edit .del:hover { color: var(--danger); }
.opt-edit .del:disabled { opacity: .35; cursor: not-allowed; }
.opt-tools { display: inline-flex; align-items: center; gap: 1px; flex: none; }
.mini-btn {
  border: 1px solid var(--line2); background: #fff; color: var(--ink2); border-radius: 5px;
  height: 22px; min-width: 22px; padding: 0 4px; font-size: 11px; cursor: pointer; line-height: 1;
}
.mini-btn:hover { border-color: #c3c9d2; color: var(--ink); }
.mini-btn:disabled { opacity: .35; cursor: not-allowed; }
.opt-img-row { flex: 1 0 100%; display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.opt-thumb { width: 34px; height: 34px; border-radius: 6px; background: #f1f3f5; overflow: hidden; flex: none; display: grid; place-items: center; }
.opt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.add-opt { font-size: 12.5px; color: var(--accent-dark); background: none; border: 0; cursor: pointer; padding: 4px 0; }
.add-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.bulk-box { margin-top: 8px; padding: 10px; border: 1px solid var(--line2); border-radius: 9px; background: #fafbfc; }
.bulk-box textarea { width: 100%; font-size: 13px; line-height: 1.7; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.sec-head h4 { margin-bottom: 0; }
.insp-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.theme-chip { border: 1px solid var(--line2); border-radius: 8px; padding: 7px 6px; cursor: pointer; background: #fff; text-align: center; font-size: 11px; color: var(--ink2); }
.theme-chip i { display: block; height: 18px; border-radius: 4px; margin-bottom: 5px; }
.theme-chip.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15,157,110,.14); color: var(--ink); }
.logic-rule { display: grid; grid-template-columns: 1fr 84px 1fr 26px; gap: 5px; margin-bottom: 5px; align-items: center; }
.logic-rule select, .logic-rule input { height: 30px; font-size: 12px; border: 1px solid var(--line2); border-radius: 6px; padding: 0 6px; background: #fff; min-width: 0; }
.logic-rule button { border: 0; background: none; color: #a9b0ba; cursor: pointer; }

/* ---------- 答题页 ---------- */
.ans { background: var(--bg); color: var(--ink); }
.ans-shell { max-width: var(--w, 720px); margin: 0 auto; padding: 30px 20px 80px; }
.ans-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; font-size: 12px; color: var(--ink2); }
.ans-top .brand-mark { width: 24px; height: 24px; border-radius: 7px; }
.ans-top .brand-text { font-size: 12.5px; }
.ans-cover {
  height: 168px; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
  background: var(--soft); position: relative;
}
.ans-cover img { width: 100%; height: 100%; object-fit: cover; }
.ans-head { padding: 0 2px 20px; }
.ans-head h1 { font-size: clamp(25px, 3.6vw, 33px); line-height: 1.28; letter-spacing: -.02em; }
.ans-head .desc { font-size: 14.5px; color: var(--ink2); margin-top: 12px; line-height: 1.75; white-space: pre-wrap; }
.ans-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--ink2); }
.ans-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ans-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 30px 26px; box-shadow: var(--shadow);
}
.ans-shell[data-dark="1"] .ans-card { box-shadow: 0 1px 0 rgba(255,255,255,.03); }
.q { padding: 22px 0; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; }
.q.invalid .q-title { color: #b3342a; }
.q-head { display: flex; gap: 9px; align-items: baseline; }
.q-no { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; min-width: 18px; }
.q-title { font-size: 15.5px; font-weight: 500; line-height: 1.6; }
.q-req { color: #c0392b; margin-left: 3px; font-weight: 400; }
.q-desc { font-size: 12.5px; color: var(--ink2); margin: 6px 0 0 27px; line-height: 1.65; white-space: pre-wrap; }
.q-body { margin: 13px 0 0 27px; }
.q-err { display: none; font-size: 12px; color: #b3342a; margin: 8px 0 0 27px; }
.q.invalid .q-err { display: block; }

.opts { display: grid; gap: 8px; }
.opt {
  display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--line2); background: var(--soft); }
.opt input { margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.opt .ol { font-size: 14px; line-height: 1.6; }
.opt.on { border-color: var(--accent); background: var(--soft); }
.opts.cols2 { grid-template-columns: 1fr 1fr; }
.img-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
.img-opt { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--card); }
.img-opt img { height: 96px; width: 100%; object-fit: cover; background: var(--soft); }
.img-opt .cap { padding: 8px 10px; font-size: 12.5px; display: flex; gap: 7px; align-items: center; }
.img-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(15,157,110,.16); }

.inp {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--card); outline: none; font-size: 14px;
  transition: border-color .12s, box-shadow .12s;
}
textarea.inp { height: auto; min-height: 100px; padding: 11px 13px; line-height: 1.7; resize: vertical; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,157,110,.13); }
.inp::placeholder { color: #a9b0ba; }
.affix { position: relative; }
.affix .suffix { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink3); pointer-events: none; }

.matrix { overflow-x: auto; }
.matrix table { border-collapse: collapse; min-width: 100%; font-size: 13px; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: center; white-space: nowrap; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 2px; white-space: normal; min-width: 120px; }
.matrix thead th { font-size: 11.5px; color: var(--ink2); font-weight: 500; line-height: 1.4; }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix input[type=radio], .matrix input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.matrix .tin { width: 100%; min-width: 90px; height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: var(--card); }

.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale label { flex: 1; min-width: 38px; text-align: center; }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale span {
  display: grid; place-items: center; height: 40px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 13px; color: var(--ink2); cursor: pointer; transition: .12s;
}
.scale span:hover { border-color: var(--line2); background: var(--soft); }
.scale input:checked + span { background: var(--soft); border-color: var(--accent); color: var(--accent-dark); font-weight: 600; }
.scale-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink3); margin-top: 7px; }

.stars { display: flex; gap: 4px; }
.stars button { border: 0; background: none; font-size: 28px; line-height: 1; color: #dadee4; cursor: pointer; padding: 0 2px; transition: color .1s, transform .1s; }
.stars button.on { color: #d99b2b; }
.stars button:hover { transform: scale(1.08); }
.stars-lab { font-size: 12px; color: var(--ink2); margin-left: 8px; }

/* 开关：不靠 JS，用 :checked 切换轨道与文案 */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-track { width: 46px; height: 27px; border-radius: 14px; background: #d7dbe1; position: relative; transition: background .18s; flex: none; }
.sw-track i { position: absolute; left: 3px; top: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .18s; }
.switch input:checked + .sw-track { background: var(--accent); }
.switch input:checked + .sw-track i { transform: translateX(19px); }
.switch input:focus-visible + .sw-track { box-shadow: 0 0 0 3px rgba(15,157,110,.2); }
.sw-text em { font-style: normal; font-size: 13.5px; color: var(--ink2); }
.sw-text em:first-child { display: none; color: var(--ink); font-weight: 500; }
.switch input:checked ~ .sw-text em:first-child { display: inline; }
.switch input:checked ~ .sw-text em:last-child { display: none; }

.slider-row { display: flex; align-items: center; gap: 14px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); }
.slider-val { min-width: 52px; text-align: center; font-size: 13px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; }

.rank-list { display: grid; gap: 7px; }
.rank-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: var(--card); }
.rank-item .idx { width: 20px; height: 20px; border-radius: 50%; background: var(--soft); color: var(--accent-dark); font-size: 11px; display: grid; place-items: center; flex: none; }
.rank-item .rl { flex: 1; font-size: 13.5px; }
.rank-item .mv { border: 1px solid var(--line); background: var(--card); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; color: var(--ink2); }
.rank-item .mv:disabled { opacity: .3; }

.upload-box {
  border: 1px dashed var(--line2); border-radius: 10px; padding: 22px; text-align: center;
  color: var(--ink2); font-size: 13px; cursor: pointer; background: var(--soft);
}
.upload-box:hover { border-color: var(--accent); }
.upload-box .u-ic { font-size: 18px; color: var(--ink3); }
.upload-box small { display: block; color: var(--ink3); font-size: 11.5px; margin-top: 3px; }
.upload-list { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 6px; }
.upload-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); background: var(--soft); border-radius: 7px; padding: 7px 10px; }
.upload-list li .sz { color: var(--ink3); margin-left: auto; }
.upload-list button { border: 0; background: none; color: var(--ink3); cursor: pointer; }
.upload-list button:hover { color: var(--danger); }
.sig-wrap { border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.sig-wrap canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.sig-bar { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink3); }
.sig-bar button { border: 0; background: none; color: var(--ink2); cursor: pointer; font-size: 12px; }

.calc-box { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 14px; border-radius: 9px; background: var(--soft); font-size: 14px; }
.calc-box b { font-size: 20px; font-weight: 600; color: var(--accent-dark); }

.ans-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.ans-actions .sp { flex: 1; }
.ans-actions .btn { height: 44px; padding: 0 24px; font-size: 14px; }
.ans-actions .btn-primary { background: var(--accent); border-color: var(--accent); }
.ans-actions .btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.ans-foot { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--ink3); }
.ans-foot button { border: 0; background: none; color: var(--ink3); cursor: pointer; font-size: 11.5px; text-decoration: underline; text-underline-offset: 3px; padding: 0 3px; }
.ans-foot button:hover { color: var(--ink2); }

.progress { position: sticky; top: 0; z-index: 4; height: 3px; background: transparent; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s ease; border-radius: 0 3px 3px 0; }
.progress.mobile { position: fixed; left: 0; right: 0; }
.page-count { font-size: 11.5px; color: var(--ink3); }

/* 协议 / 声明 */
.consent {
  display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--ink2);
  background: var(--soft); border-radius: 9px; padding: 11px 13px; margin-top: 18px;
}
.consent input { margin-top: 2px; accent-color: var(--accent); flex: none; }
.consent a { text-decoration: underline; text-underline-offset: 2px; }

/* 结束页 */
.ending { text-align: center; padding: 46px 10px 20px; }
.ending .tick {
  width: 58px; height: 58px; border-radius: 50%; background: var(--soft); color: var(--accent-dark);
  display: grid; place-items: center; margin: 0 auto 18px; font-size: 26px;
}
.ending h2 { font-size: 23px; letter-spacing: -.01em; }
.ending p { font-size: 14px; color: var(--ink2); margin-top: 10px; white-space: pre-wrap; line-height: 1.8; }
.ending .acts { margin-top: 24px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.notice { padding: 14px 16px; border-radius: 10px; background: #fbf0ec; color: #8f352a; font-size: 13.5px; border: 1px solid #f0d7d1; }
.notice-warn { background: #fbf4e6; color: #7d5312; border-color: #f0e0bf; }
.notice-ok { background: #eaf5ef; color: #15664c; border-color: #cde8db; }

/* 举报对话框 */
dialog.report {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(480px, 92vw);
  background: var(--card); color: var(--ink); box-shadow: 0 24px 70px -20px rgba(0,0,0,.35);
}
dialog.report::backdrop { background: rgba(20, 24, 21, .42); }
.rp-head { padding: 18px 20px 0; }
.rp-head h3 { font-size: 16px; }
.rp-head p { font-size: 12.5px; color: var(--ink2); margin-top: 5px; }
.rp-body { padding: 14px 20px 18px; }
.rp-body select, .rp-body textarea, .rp-body input { width: 100%; border: 1px solid var(--line2); border-radius: 8px; padding: 9px 11px; font-size: 13px; outline: none; background: #fff; }
.rp-body textarea { min-height: 90px; resize: vertical; }
.rp-body select:focus, .rp-body textarea:focus, .rp-body input:focus { border-color: var(--accent); }
.rp-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 20px 18px; }
.rp-done { padding: 26px 20px; text-align: center; }
.rp-done .tick { width: 46px; height: 46px; border-radius: 50%; background: var(--soft); color: var(--accent-dark); display: grid; place-items: center; margin: 0 auto 12px; font-size: 20px; }

/* 通用确认弹窗（替代浏览器 confirm）：白卡、无标题栏、按钮够大 */
dialog.lz-dlg {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
}
dialog.lz-dlg::backdrop { background: rgba(20, 24, 21, .42); backdrop-filter: blur(1.5px); }
.lz-dlg-box {
  width: min(400px, 90vw); background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 15px; padding: 22px 22px 16px;
  box-shadow: 0 26px 70px -22px rgba(16, 24, 40, .45);
}
.lz-dlg-box h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.lz-dlg-text {
  margin-top: 8px; font-size: 13.5px; line-height: 1.62; color: var(--ink2);
  white-space: pre-line; word-break: break-word;
}
.lz-dlg-acts { display: flex; gap: 9px; justify-content: flex-end; margin-top: 20px; }
.lz-dlg-acts .btn { height: 38px; padding: 0 18px; font-size: 13.5px; }
.lz-dlg-acts .btn-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.lz-dlg-acts .btn-danger:hover { background: #9d2c22; border-color: #9d2c22; }
@media (max-width: 560px) {
  /* 手机上按钮整行排开，手指好点 */
  .lz-dlg-box { width: calc(100vw - 28px); padding: 20px 18px 14px; border-radius: 16px; }
  .lz-dlg-acts { gap: 8px; }
  .lz-dlg-acts .btn { flex: 1; height: 44px; font-size: 14.5px; justify-content: center; }
}

/* ---------- 登录页 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-art {
  background: #12161c; color: #f2f4f7; padding: 44px 48px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-art .brand-text, .auth-art .brand-text em { color: #f2f5f7; }
.auth-art .brand-mark { background: rgba(255,255,255,.12); }
.auth-art h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.3; letter-spacing: -.02em; margin-top: auto; font-weight: 500; max-width: 460px; }
.auth-art p { color: #a7b1bd; font-size: 14px; margin-top: 16px; max-width: 420px; line-height: 1.8; }
.auth-art .marks { display: flex; gap: 18px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; color: #8c96a2; flex-wrap: wrap; }
.auth-art .deco { position: absolute; right: -90px; top: -60px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid rgba(255,255,255,.09); }
.auth-art .deco:nth-child(2) { right: -40px; top: 40px; width: 220px; height: 220px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-box { width: 100%; max-width: 372px; }
.auth-box h2 { font-size: 22px; margin-bottom: 6px; }
.auth-box .sub { font-size: 13px; color: var(--ink2); margin-bottom: 22px; }
.auth-box .input { height: 42px; }
.auth-box .btn { width: 100%; height: 42px; justify-content: center; margin-top: 6px; }
.auth-switch { font-size: 12.5px; color: var(--ink2); margin-top: 18px; text-align: center; }
.auth-switch a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

/* 通行证登录：主按钮要压过表单里的密码登录，所以给它一点分量 */
.auth-box .btn-pass { height: 44px; font-weight: 500; background: #fff; border-color: #d9dde4; }
.auth-box .btn-pass:hover { background: #f7f8fa; border-color: #c9cfd8; }
.auth-box .btn-pass .i { color: var(--accent-dark); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; color: var(--ink2); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-or span { white-space: nowrap; }
/* 注册页只剩通行证：说明段落 + 要点列表 */
.auth-lead { font-size: 13px; line-height: 1.75; color: var(--ink2); margin-bottom: 18px; }
.auth-tips { margin-top: 20px; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.auth-tips li { position: relative; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--ink2); }
.auth-tips li::before {
  content: ''; position: absolute; left: 2px; top: 6px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent);
}
.auth-tips a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.auth-hint { margin-top: 14px; line-height: 1.7; color: var(--ink3); }
.auth-hint a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 统计页 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button {
  padding: 9px 14px; font-size: 13px; color: var(--ink2); border: 0; background: none;
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tabs a.on, .tabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.qstat { padding: 18px 20px; border-top: 1px solid var(--line); }
.qstat:first-child { border-top: 0; }
.qstat-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.qstat-head .n { font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.qstat-head h3 { font-size: 14.5px; font-weight: 500; }
.qstat-head .t { margin-left: auto; font-size: 11.5px; color: var(--ink3); white-space: nowrap; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 1.1fr) 1fr 74px; gap: 12px; align-items: center; padding: 5px 0; font-size: 13px; }
.bar-row .lab { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: #eff1f4; border-radius: 6px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s; }
.bar-row .val { text-align: right; color: var(--ink2); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-row .val b { color: var(--ink); font-weight: 500; }
.num-grid { display: flex; gap: 22px; flex-wrap: wrap; }
.num-grid div { min-width: 80px; }
.num-grid b { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.num-grid span { font-size: 11.5px; color: var(--ink3); }
.histo { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-top: 12px; }
.histo i { flex: 1; background: #cfeade; border-radius: 3px 3px 0 0; min-height: 2px; }
.histo i:hover { background: var(--accent); }
.histo2 { display: flex; align-items: flex-end; gap: 6px; margin-top: 16px; height: 118px; }
.histo2 .hb { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.histo2 .hb i { width: 100%; max-width: 46px; background: linear-gradient(180deg, #7fc6a8, #cfeade); border-radius: 4px 4px 0 0; transition: height .3s; }
.histo2 .hb:hover i { background: var(--accent); }
.histo2 .hval { font-size: 11px; color: var(--ink2); font-variant-numeric: tabular-nums; line-height: 1; }
.histo2 .hlab { font-size: 10.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nps-line { display: flex; align-items: center; gap: 18px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.nps-score { display: flex; align-items: baseline; gap: 7px; }
.nps-score b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; }
.nps-score span { font-size: 10.5px; color: var(--ink3); letter-spacing: 0.1em; font-weight: 500; }
.nps-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink2); flex-wrap: wrap; }
.nps-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-pro { background: #3f9a76; }
.dot-pas { background: #c9b56b; }
.dot-det { background: #c8817a; }
.mx-wrap { overflow-x: auto; }
table.mx { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.mx th { font-weight: 400; font-size: 11.5px; color: var(--ink3); text-align: center; padding: 0 6px 8px; white-space: nowrap; }
table.mx td { padding: 3px 6px; text-align: center; }
table.mx .mx-row { text-align: left; color: var(--ink); font-size: 13px; padding-right: 12px; white-space: nowrap; }
table.mx .mmean { color: var(--ink2); font-variant-numeric: tabular-nums; width: 54px; }
.mx-cell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 44px; height: 26px; border-radius: 6px; overflow: hidden; }
.mx-cell i { position: absolute; inset: 0; background: var(--accent); border-radius: 6px; }
.mx-cell b { position: relative; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.mx-textrow { padding: 10px 0; border-top: 1px dashed var(--line); }
.mx-textrow:first-of-type { border-top: 0; padding-top: 0; }
.mx-textrow .mx-row { display: flex; gap: 8px; align-items: baseline; font-size: 13px; font-weight: 500; }
.text-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.text-list li { font-size: 13px; color: var(--ink2); background: #f7f8fa; border-radius: 7px; padding: 8px 11px; line-height: 1.65; }
.text-list.scroll { max-height: 300px; }
.text-list li { display: flex; gap: 10px; align-items: flex-start; }
.text-list li > span:first-child { flex: 1; min-width: 0; }
.text-list .tmeta { font-size: 10.5px; color: var(--ink3); white-space: nowrap; padding-top: 1px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table.data { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.data th, table.data td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
table.data th { background: #fafbfc; font-weight: 500; color: var(--ink2); font-size: 11.5px; position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fbfbfc; }
table.data td.wrap { white-space: normal; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; font-size: 12.5px; color: var(--ink2); }

/* ---------- 审核台 ---------- */
.rv { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.rv-list { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; max-height: calc(100vh - 190px); overflow-y: auto; }
.rv-item { padding: 12px 14px; border-top: 1px solid var(--line); display: block; }
.rv-item:first-child { border-top: 0; }
.rv-item:hover { background: #fbfbfc; }
.rv-item.on { background: #f0f6f2; box-shadow: inset 3px 0 0 var(--accent); }
.rv-item .t { font-size: 13.5px; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.rv-item .m { font-size: 11.5px; color: var(--ink3); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.rv-detail { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.rv-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-head h2 { font-size: 16px; font-weight: 500; }
.rv-body { padding: 16px 18px; display: grid; gap: 14px; }
.rv-snap { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fbfbfc; max-height: 340px; overflow: auto; }
.rv-snap .snap-q { font-size: 12.5px; color: var(--ink2); padding: 4px 0; }
.rv-snap .snap-q b { color: var(--ink); font-weight: 500; }
.riskbar { height: 6px; border-radius: 4px; background: #eceef1; overflow: hidden; margin-top: 6px; }
.riskbar i { display: block; height: 100%; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ev-list li { font-size: 12.5px; color: var(--ink2); background: #fbf6f2; border: 1px solid #f0e2d6; border-radius: 8px; padding: 9px 11px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: grid; gap: 10px; }
.timeline li { position: relative; font-size: 12.5px; color: var(--ink2); }
.timeline li::before { content: ''; position: absolute; left: -18px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #cfd4ce; }
.timeline li b { color: var(--ink); font-weight: 500; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.note-in { width: 100%; min-height: 74px; border: 1px solid var(--line2); border-radius: 8px; padding: 9px 11px; font-size: 13px; resize: vertical; }

/* ---------- 首页 ---------- */
.land { min-height: 100vh; background: #f4f5f7; }
.land-nav { max-width: 1080px; margin: 0 auto; padding: 20px 24px; display: flex; align-items: center; gap: 16px; }
.land-nav .sp { flex: 1; }
.land-hero { max-width: 1080px; margin: 0 auto; padding: 56px 24px 40px; }
.land-hero .kick { font-size: 12px; letter-spacing: .16em; color: var(--ink3); font-weight: 500; }
.land-hero h1 { font-size: clamp(32px, 5.2vw, 54px); line-height: 1.16; letter-spacing: -.03em; margin-top: 12px; max-width: 760px; font-weight: 500; }
.land-hero p { font-size: 15px; color: var(--ink2); margin-top: 18px; max-width: 560px; line-height: 1.85; }
.land-hero .cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.mode-grid { max-width: 1080px; margin: 20px auto 0; padding: 0 24px 70px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mode-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.mode-card .n { font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.mode-card h3 { font-size: 16px; margin-top: 14px; font-weight: 500; }
.mode-card p { font-size: 12.5px; color: var(--ink2); margin-top: 7px; line-height: 1.7; }
.mode-card .tags { margin-top: 14px; display: flex; gap: 5px; flex-wrap: wrap; }
.land-band { border-top: 1px solid var(--line); background: #fafbfc; }
.land-band-inner { max-width: 1080px; margin: 0 auto; padding: 34px 24px 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.land-band h4 { font-size: 13.5px; font-weight: 500; }
.land-band p { font-size: 12.5px; color: var(--ink2); margin-top: 6px; line-height: 1.75; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  background: #1f2622; color: #fff; font-size: 13px; padding: 10px 16px; border-radius: 9px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 90; max-width: 88vw;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .ed-body { grid-template-columns: 210px minmax(0, 1fr) 300px; }
  .rv { grid-template-columns: 290px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { flex-direction: column; }
  /* 侧栏退成顶部品牌条，导航交给底部 tab：手机上「我的」必须有入口 */
  .side {
    width: 100%; height: 52px; position: sticky; top: 0; z-index: 30;
    flex-direction: row; align-items: center; gap: 8px;
    padding: 0 14px; border-right: 0; border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
  }
  .side .brand { padding: 0; }
  .side .brand-mark { width: 26px; height: 26px; border-radius: 8px; }
  .side .brand-text { font-size: 14px; }
  .side-nav, .side-sep, .side-foot { display: none; }

  .mtab {
    display: flex; justify-content: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--line);
    padding: 5px 6px calc(5px + var(--safe-b));
  }
  .mtab a {
    flex: 1 1 0; max-width: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 46px; border-radius: 10px; font-size: 10.5px; color: var(--ink3); letter-spacing: .02em;
  }
  .mtab a.on { color: var(--ink); font-weight: 600; }
  .mtab a.on .i { color: var(--accent-dark); }
  .mtab a:active { background: #f4f5f7; }
  .mtab-avatar {
    display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: #e6e9ee; overflow: hidden; font-size: 10px; font-weight: 600; color: #454c57;
  }
  .mtab-avatar.has-img { padding: 0; }
  .mtab-avatar img { width: 100%; height: 100%; object-fit: cover; }

  .main { padding: 16px 14px calc(80px + var(--safe-b)); max-width: none; }
  .page-head { margin-bottom: 14px; gap: 10px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
  .stat { padding: 12px 13px; border-radius: 10px; }
  .stat b { font-size: 22px; }
  .toolbar .input { min-width: 0; width: 100%; }
  .toolbar form { flex: 1; min-width: 0; }

  /* 编辑器：整页滚动，属性面板贴底 */
  .ed-shell { height: auto; min-height: 100vh; }
  .ed-body { display: flex; flex-direction: column; }
  /* 手机上不再把 30 个题型摊在顶部，改用右下角 + 号弹底部面板 */
  .ed-pal { display: none; }
  .ed-body .ed-canvas { order: 2; }
  .ed-canvas { overflow: visible; padding: 12px 12px 150px; }
  .ed-paper-head { padding: 16px 16px; }

  /* 属性面板变底部抽屉：默认整块收在屏幕外，不常驻、不占位；
     点题目卡片或分页线时才滑上来，点把手收起 */
  .ed-insp-wrap {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    max-height: 76vh; border-left: 0; border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px -22px rgba(16, 24, 40, 0.45);
    transform: translateY(100%);
    transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.3, 1);
    padding-bottom: var(--safe-b);
  }
  .ed-insp-wrap.open { transform: none; }
  .ed-insp-wrap .ed-insp { max-height: calc(76vh - 46px); overflow-y: auto; }
  /* 抽屉里的分段按钮要够点（桌面 5px 内边距在手机上只有 30px 高） */
  .ed-insp-wrap .seg { display: flex; }
  .ed-insp-wrap .seg button { flex: 1; min-height: 38px; padding: 8px 10px; font-size: 13px; }
  .insp-grip {
    position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 46px; flex: none;
    border: 0; border-bottom: 1px solid var(--line); background: var(--card);
    border-radius: 16px 16px 0 0; padding: 6px 16px 0; font-size: 13px; font-weight: 500;
    color: var(--ink); text-align: left; cursor: pointer;
  }
  .insp-grip em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--ink3); font-weight: 400; }
  .grip-bar { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 2px; background: #d5dae1; }

  /* 右下角添加题目按钮：浮在抽屉把手之上 */
  .add-fab {
    display: grid; place-items: center; position: fixed; right: 16px; z-index: 70;
    bottom: calc(60px + var(--safe-b));
    width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--accent); color: #fff;
    box-shadow: 0 8px 24px -8px rgba(15, 157, 110, 0.6), 0 2px 6px rgba(16, 24, 40, 0.12);
    transition: transform .14s, opacity .16s;
  }
  .add-fab:active { transform: scale(0.94); }
  html.drawer-open .add-fab { opacity: 0; pointer-events: none; }

  /* 抽屉里的控件放大：手机上点得准比紧凑重要 */
  .opt-edit input[type=text] { height: 38px; font-size: 14px; }
  .opt-edit .mini-btn { height: 30px; min-width: 30px; font-size: 13px; }
  .opt-edit .del { width: 30px; height: 30px; font-size: 16px; line-height: 1; }
  .opt-edit input[type=number] { height: 32px; width: 52px; }
  .add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
  .add-opt {
    height: 36px; border: 1px solid var(--line2); border-radius: 9px;
    background: #fff; color: var(--ink); font-size: 13px; padding: 0 10px;
  }
  .add-opt:active { background: var(--soft); border-color: var(--accent); }
  .bulk-box textarea { font-size: 14px; }
  .insp-sec { padding: 16px; }
  .seg button { padding: 8px 14px; font-size: 13px; }

  /* 题型选择面板 */
  .pal-sheet { position: fixed; inset: 0; z-index: 90; }
  .pal-sheet[hidden] { display: none; }
  .sheet-mask { position: absolute; inset: 0; background: rgba(16, 20, 26, 0.45); animation: maskIn .18s ease-out; }
  .sheet-body {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 80vh; display: flex; flex-direction: column;
    background: var(--card); border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 48px -18px rgba(16, 24, 40, 0.4);
    animation: sheetUp .24s cubic-bezier(0.2, 0.8, 0.3, 1);
    padding-bottom: var(--safe-b);
  }
  .sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: #d5dae1; margin: 9px auto 2px; flex: none; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 12px; border-bottom: 1px solid var(--line); flex: none; }
  .sheet-head b { font-size: 15px; font-weight: 600; }
  .sheet-x { border: 0; background: #f1f3f5; width: 28px; height: 28px; border-radius: 50%; font-size: 17px; line-height: 1; color: var(--ink2); cursor: pointer; }
  .sheet-list { overflow-y: auto; padding: 2px 14px 18px; -webkit-overflow-scrolling: touch; }
  .sheet-group h5 { font-size: 11px; letter-spacing: .08em; color: var(--ink3); font-weight: 600; margin: 16px 2px 8px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sheet-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    padding: 13px 4px 11px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--card); color: var(--ink); font-size: 12px; cursor: pointer; min-height: 74px;
  }
  .sheet-item:active { background: var(--soft); border-color: var(--accent); }
  .sheet-item .ic { color: var(--ink2); display: grid; place-items: center; }
  .sheet-item .ic svg { width: 19px; height: 19px; }
  .sheet-item .t { line-height: 1.2; text-align: center; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
  @keyframes maskIn { from { opacity: 0; } }
  html.no-scroll, html.no-scroll body { overflow: hidden; }

  .rv { grid-template-columns: 1fr; }
  .rv-list { max-height: 300px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  /* 手机上不要垂直居中：表单靠上，拇指才够得着 */
  .auth-form { align-items: flex-start; padding: 9vh 20px 48px; }
  .auth-box { max-width: 420px; margin: 0 auto; }
  .land-band-inner { grid-template-columns: 1fr; gap: 18px; }
  .mode-grid { grid-template-columns: 1fr 1fr; }
}

/* 手机上表格改成卡片：横向滚动看表格是最反人类的移动端体验之一 */
@media (max-width: 720px) {
  .table-wrap {
    border: 0; background: none; overflow: visible; border-radius: 0;
  }
  .table-wrap::after { display: none; }
  table.data { display: block; font-size: 13px; }
  table.data thead { display: none; }
  table.data tbody { display: grid; gap: 8px; }
  table.data tr {
    display: block; background: var(--card); border: 1px solid var(--line);
    border-radius: 11px; padding: 4px 13px 6px;
  }
  table.data tr:hover { background: var(--card); }
  table.data td {
    display: flex; align-items: baseline; gap: 12px;
    padding: 6px 0; border-bottom: 0; white-space: normal; max-width: none;
    overflow: visible; text-overflow: clip; text-align: left;
  }
  table.data td::before {
    content: attr(data-l); flex: none; width: 92px; color: var(--ink3); font-size: 12px; text-align: left;
  }
  table.data td:last-child, table.data td:first-child { justify-content: flex-start; }
  table.data td.mono { font-size: 12.5px; color: var(--ink3); padding-top: 10px; }
  table.data td:first-child { font-size: 13px; }
  table.data td:first-child::before { display: none; }
  table.data td:last-child { padding-bottom: 8px; }
  .pager { justify-content: space-between; }
}

@media (max-width: 640px) {
  .ans-shell { padding: 16px 14px 60px; }
  .ans-card { padding: 4px 18px 20px; border-radius: 12px; }
  .ans-actions .btn { flex: 1; justify-content: center; padding: 0 12px; }
  .ans-actions .btn-ghost { flex: none; }
  .opts.cols2 { grid-template-columns: 1fr; }
  .q { padding: 18px 0; }
  .q-body, .q-desc, .q-err { margin-left: 0; }
  .q-head { gap: 8px; }
  .matrix th, .matrix td { padding: 8px 7px; }
  .mode-grid { grid-template-columns: 1fr; }
  .row { padding: 12px 12px; gap: 10px; }
  .row-actions .btn span { display: none; }
  .bar-row { grid-template-columns: minmax(70px, 1fr) 1fr 62px; gap: 8px; font-size: 12.5px; }
  .page-head h1 { font-size: 18px; line-height: 1.35; }
  .page-head .sub { font-size: 12.5px; }
  .land-hero { padding-top: 34px; }

  /* 触控目标不小于 36px，拇指才点得准 */
  .fcard h3 a { padding: 5px 0; margin: -5px 0; }
  .fcard-foot .btn { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .fcard-foot { gap: 4px; padding-top: 8px; }
  .btn { height: 38px; }
  .btn-sm { height: 34px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; justify-content: center; }
  .grid-cards { grid-template-columns: 1fr; gap: 10px; }
  .seg { width: 100%; overflow-x: auto; }
  .seg a { flex: 1; text-align: center; white-space: nowrap; }

  /* 编辑器顶栏：只留必要按钮，别把标题挤成竖排 */
  .ed-top { height: 52px; padding: 0 10px; gap: 6px; }
  .ed-top .brand, .ed-top #topStatus { display: none; }
  .ed-top #formTitle { flex: 1; min-width: 0; width: auto !important; font-size: 14px; padding: 0 6px !important; }
  .ed-top .state { font-size: 11px; white-space: nowrap; }
  .ed-top .btn-sm { padding: 0 10px; }
  .ed-top .btxt { display: none; }

  /* 首页：手机上收边距，页脚竖排 */
  .land-nav { padding: 14px 16px; gap: 10px; }
  .land-hero { padding: 30px 18px 26px; }
  .land-hero p { font-size: 14px; }
  .mode-grid { padding: 0 16px 46px; gap: 10px; }
  .land-band-inner { padding: 0 18px; }
  .land-foot { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 18px 30px; }
  .lf-links { margin-left: 0; flex-wrap: wrap; gap: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 模板卡 ---------- */
.tpl-card { background: var(--card); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; display: flex; flex-direction: column; }
.tpl-prev { height: 108px; background: #f4f2ec; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.tpl-prev .ln { height: 5px; border-radius: 3px; background: #dadee4; }
.tpl-prev .ln.w70 { width: 70%; height: 7px; background: #c6ccd5; }
.tpl-prev .ln.w45 { width: 45%; }
.tpl-prev .ln.w60 { width: 60%; }
.tpl-prev .bx { height: 15px; border: 1px solid #d7dbe1; border-radius: 5px; background: #fff; }
.tpl-prev .bx.short { width: 72%; }
.tpl-blank { align-items: center; justify-content: center; border-bottom-style: dashed; background: repeating-linear-gradient(45deg, #f4f5f7, #f4f5f7 8px, #eff1f4 8px, #eff1f4 16px); }
.tpl-empty { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #9aa1ac; }
.tpl-optrow { display: flex; align-items: center; gap: 8px; }
.tpl-optrow i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #cfd4dc; flex: none; }
.tpl-optrow .ln { flex: 1; }
.tpl-exrow { display: flex; align-items: center; gap: 7px; }
.tpl-exrow i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #cfd4dc; flex: none; }
.tpl-exrow .ln { flex: 1; height: 5px; border-radius: 3px; background: #dde1e6; }
.tpl-exrow em { font-style: normal; font-size: 9px; color: #b08a4a; background: #f6eddc; border-radius: 4px; padding: 1px 5px; }
.tpl-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 56px; }
.tpl-thumbs i { display: block; border-radius: 5px; background: linear-gradient(160deg, #cfdcd3, #9db4a4); }
.tpl-thumbs i:nth-child(2) { background: linear-gradient(160deg, #ccd6e2, #9aaec2); }
.tpl-thumbs i:nth-child(3) { background: linear-gradient(160deg, #ecdcc8, #cbb191); }
.tpl-vote-bar { display: flex; align-items: center; gap: 7px; }
.tpl-vote-bar b { height: 6px; border-radius: 3px; background: #c6d9cd; width: 62%; display: block; }
.tpl-vote-bar span { height: 6px; border-radius: 3px; background: #e2ded3; width: 26%; display: block; }
.tpl-vote-bar:last-child b { width: 44%; }
.tpl-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.tpl-body h3 { font-size: 14.5px; font-weight: 500; }
.tpl-body p { font-size: 12.5px; color: var(--ink2); margin: 6px 0 12px; line-height: 1.65; flex: 1; }
.tpl-body .btn { align-self: flex-start; }
.calcline { font-family: var(--mono); font-size: 11.5px; color: var(--accent-dark); background: var(--soft); border-radius: 5px; padding: 3px 6px; display: inline-block; }
.seg button { padding: 5px 11px; border-radius: 7px; font-size: 12.5px; color: var(--ink2); background: none; border: 0; cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
@media (max-width: 900px) {
  .admin-cols { grid-template-columns: 1fr !important; }
}

/* ---------- 首页右侧示意卡 ---------- */
.land-hero { position: relative; }
.hero-mock { position: absolute; right: 24px; top: 54px; width: 300px; }
.hm-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; box-shadow: 0 20px 44px -28px rgba(20,23,28,.4); }
.hm-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hm-q { font-size: 14px; font-weight: 500; line-height: 1.5; margin-bottom: 12px; }
.hm-opt { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.hm-opt.on { border-color: #0f9d6e; background: #e8f6ef; color: #0a6349; }
.hm-bar { height: 3px; background: #eceef1; border-radius: 3px; margin-top: 14px; overflow: hidden; }
.hm-bar i { display: block; height: 100%; width: 38%; background: #0f9d6e; border-radius: 3px; }
.hm-chip { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 5px 11px; font-size: 11.5px; color: var(--ink2); box-shadow: 0 8px 22px -14px rgba(20,23,28,.5); }
.hm-chip-1 { left: -92px; top: 116px; }
.hm-chip-2 { right: -18px; bottom: -14px; }
@media (max-width: 1120px) {
  .hero-mock { display: none; }
  .land-hero h1 { max-width: 760px; }
}
.fcard h3 { min-height: 0; margin: 2px 0 4px; }
.stat b { line-height: 1.15; margin-bottom: 2px; }
.pal-item .ic { display: inline-flex; align-items: center; justify-content: center; }

/* 考试倒计时悬浮条 */
.exam-left {
  position: fixed; top: 14px; right: 14px; z-index: 40;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line2);
  box-shadow: 0 6px 18px -10px rgba(20, 23, 28, .5);
  font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink);
}
.exam-left.warn { color: #a2621a; border-color: #e6d3b3; background: #fdf7ec; }
.exam-left.over { color: #a83a2d; border-color: #e8cdc9; background: #fdf0ee; }
@media (max-width: 560px) { .exam-left { top: auto; bottom: 14px; right: 50%; transform: translateX(50%); } }

/* 防作弊：离开次数超限、系统自动交卷时的整屏提示 */
.ans .anti-over {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-content: center; gap: 4px; padding: 28px; text-align: center;
  background: rgba(20, 24, 22, .74); color: #fff; backdrop-filter: blur(2px);
}
.ans .anti-over b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.ans .anti-over p { font-size: 13.5px; line-height: 1.75; color: rgba(255, 255, 255, .86); max-width: 330px; }

/* 图片选项 */
.opts.img { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.opts.img.cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.img.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts.img.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opts.img .opt { flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; border-radius: 12px; }
.opts.img .opt input { position: absolute; opacity: 0; pointer-events: none; }
.opts.img .oimg { display: block; width: 100%; aspect-ratio: 4 / 3; background: #f3f1ea; overflow: hidden; }
.opts.img .oimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.opts.img .oimg-ph { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #f1f3f5, #f1f3f5 8px, #e8eaee 8px, #e8eaee 16px); }
.opts.img .ol { padding: 9px 12px 11px; display: flex; align-items: center; gap: 7px; }
.opts.img .ol::before {
  content: ''; width: 14px; height: 14px; flex: none; border: 1.5px solid #c9c5ba; border-radius: 50%; background: #fff;
}
.opts.img .opt.on .ol::before { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }
.opts.img .opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 157, 110, .12); }
.opts.img .opt:has(input[type=checkbox]) .ol::before { border-radius: 4px; }
.opts.img .opt.on:has(input[type=checkbox]) .ol::before { background: var(--accent); }
/* 编辑器里选项图片行 */
.opt-edit.tall { flex-wrap: wrap; }
.opt-img-row { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 6px; }
.opt-img-row .opt-thumb { width: 30px; height: 30px; flex: none; border-radius: 6px; background: #eff1f4; overflow: hidden; display: block; }
.opt-img-row .opt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.opt-img-row input[type=text] { flex: 1; min-width: 0; }
.opt-img-row .mini-btn { flex: none; height: 26px; padding: 0 9px; font-size: 11.5px; border: 1px solid var(--line2); background: #fff; border-radius: 6px; cursor: pointer; }
.opt-img-row .mini-btn:hover { background: #f7f6f1; }
.mini-imgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 440px; }
.mini-img { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--ink2); }
.mini-img img, .mini-img i { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 7px; object-fit: cover; background: #eff1f4; }
.rv-form { grid-template-columns: minmax(0, 1fr) 320px; }
@media (max-width: 980px) { .rv-form { grid-template-columns: minmax(0, 1fr); } }

/* 画布迷你预览：数值类 */
.mini-scale { display: flex; gap: 3px; max-width: 460px; }
.mini-scale i { flex: 1; height: 20px; border: 1px solid #dde1e6; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 10px; color: #8b908a; background: #fff; }
.mini-slider { position: relative; height: 6px; max-width: 300px; background: var(--line); border-radius: 4px; margin: 8px 0; }
.mini-slider i { position: absolute; top: -4px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 1.5px solid var(--accent); transform: translateX(-50%); }
.mini-input { max-width: 240px; height: 30px; border: 1px solid #dde1e6; border-radius: 7px; background: #fff; display: flex; align-items: center; padding: 0 10px; font-size: 12px; color: #a9ada7; }
.mini-input em { margin-left: auto; font-style: normal; font-size: 11px; color: #a9b0ba; }
.mini-switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); }
.mini-switch i { width: 32px; height: 18px; border-radius: 999px; background: #dfe2dc; position: relative; display: block; }
.mini-switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.rv-snap .snap-type { font-size: 10.5px; color: #8d918b; background: #eeece5; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }

/* 首页页脚 */
.land-foot { border-top: 1px solid var(--line); margin-top: 34px; padding: 22px 0 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lf-brand { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink3); }
.lf-links { margin-left: auto; display: flex; gap: 18px; font-size: 12.5px; color: var(--ink2); }
.lf-links a:hover { color: var(--ink); }
@media (max-width: 560px) {
  .opts.img, .opts.img.cols2, .opts.img.cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .opts.img .ol { padding: 8px 10px 9px; font-size: 12.5px; }
}
.bar-row .lab-thumb { display: inline-block; width: 22px; height: 22px; border-radius: 5px; object-fit: cover; vertical-align: -6px; margin-right: 7px; }
/* 表格横向溢出时给个提示，别让最后一列硬切 */
.table-wrap { position: relative; }
.table-wrap::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 18px; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .92));
  border-radius: 0 12px 12px 0;
}

/* ---------- 个人设置 ---------- */
.me-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 16px;
}
.me-profile { display: flex; gap: 26px; align-items: flex-start; }
.me-avatar-wrap { position: relative; flex: none; }
.avatar-lg { width: 88px; height: 88px; font-size: 32px; border-radius: 50%; }
.me-avatar-btn {
  position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line2); display: grid; place-items: center;
  cursor: pointer; color: var(--ink2); box-shadow: 0 2px 8px rgba(20, 23, 28, .1);
}
.me-avatar-btn:hover { color: var(--accent-dark); border-color: var(--accent); }
.me-profile-main { flex: 1; min-width: 0; }
.me-row { display: flex; gap: 10px; align-items: center; }
.me-row .input { max-width: 320px; }
.me-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink2);
}
.me-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.me-head h3 { font-size: 15px; }
.me-head p { font-size: 12.5px; color: var(--ink3); margin-top: 3px; }
.me-line {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0; border-top: 1px solid var(--line); margin-top: 14px;
}
.me-line-main { min-width: 0; }
.me-line-main b { font-size: 13.5px; font-weight: 500; }
.me-line-main .tiny { margin-top: 3px; }
.me-pass {
  border-top: 1px solid var(--line); margin-top: 14px; padding-top: 16px;
  display: flex; flex-direction: column; gap: 12px; max-width: 380px;
}
.me-pass .field { margin: 0; }
.me-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 16px; }
.me-kv > div { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--ink3); }
.me-kv b { font-size: 13px; color: var(--ink); font-weight: 500; word-break: break-all; }

/* 协议 / 隐私：纯阅读页，不需要控制台骨架 */
.doc { max-width: 720px; margin: 0 auto; padding: 44px 22px 90px; }
.doc h1 { font-size: 26px; margin: 28px 0 4px; }
.doc h2 { font-size: 15px; margin: 28px 0 6px; }
.doc p { color: var(--ink2); font-size: 14px; line-height: 1.85; margin-top: 8px; }
.doc a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  /* 头像与昵称并排，省掉一整块竖向空白 */
  .me-profile { flex-direction: row; align-items: flex-start; gap: 14px; }
  .me-profile-main { flex: 1; min-width: 0; }
  .avatar-lg { width: 64px; height: 64px; font-size: 22px; }
  .me-avatar-btn { width: 26px; height: 26px; right: -2px; bottom: -2px; }
  .me-kv { grid-template-columns: 1fr; gap: 12px; }
  .me-line { flex-wrap: wrap; }
  /* 退出登录是手机上离开账号的唯一出口，铺满一行更好点 */
  .me-quit { width: 100%; }
  .me-quit .btn { width: 100%; justify-content: center; }
  .me-card { padding: 16px 14px; border-radius: 12px; }
  .me-row { gap: 8px; }
  .me-row .input { max-width: none; flex: 1; min-width: 0; }
  .doc { padding: 28px 18px 72px; }
  .doc h1 { font-size: 22px; }
}

/* 预览页「提交成功」结束卡片：明确告诉用户没有保存 */
.pv-done { text-align: center; padding: 46px 22px 40px; }
.pv-tick {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--soft); color: var(--accent-dark);
  display: grid; place-items: center; font-size: 24px; line-height: 1;
}
.pv-done h2 { font-size: 19px; letter-spacing: -.01em; }
.pv-note { margin: 9px auto 0; max-width: 400px; font-size: 13px; line-height: 1.72; color: var(--ink2); }
.pv-acts { display: flex; gap: 9px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .pv-done { padding: 38px 16px 34px; }
  .pv-acts { flex-direction: column-reverse; }
  .pv-acts .btn { width: 100%; justify-content: center; height: 44px; }
}
