:root {
  --bg: #f4f1ea;
  --panel: #fffdf8;
  --panel-2: #f9f6ef;
  --ink: #1e1b16;
  --muted: #67615a;
  --line: #e3ddd0;
  --line-2: #cfc8b8;
  --red: #c23a1f;
  --red-bg: #fbe9e3;
  --amber: #8f5d12;
  --amber-bg: #fcefd6;
  --green: #2f7a48;
  --green-bg: #e3f1e6;
  --blue: #2b5ea6;
  --blue-bg: #e4ecf8;
  --grey-bg: #ece8df;
  --on-accent: #fff;      /* 绿色、红色实心按钮上的字 */
  --pin: #c23a1f;         /* 大头针和看大图时的红色：看大图永远是深色遮罩，所以不跟主题变 */
  --shadow: 0 1px 2px rgba(30, 27, 22, .06), 0 8px 24px rgba(30, 27, 22, .06);
  --radius: 10px;
  --font: -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17161a; --panel: #201f24; --panel-2: #26252b; --ink: #ece8df; --muted: #9c968a;
    --line: #34323a; --line-2: #4a4750; --red: #ff7a5c; --red-bg: #3a221c; --amber: #e6a84a; --amber-bg: #3a2d16;
    --green: #6fcb8c; --green-bg: #1d3426; --blue: #7fa9ec; --blue-bg: #1f2c44; --grey-bg: #2d2c33;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --on-accent: #14130f;
  }
}
:root[data-theme="dark"] {
  --bg: #17161a; --panel: #201f24; --panel-2: #26252b; --ink: #ece8df; --muted: #9c968a;
  --line: #34323a; --line-2: #4a4750; --red: #ff7a5c; --red-bg: #3a221c; --amber: #e6a84a; --amber-bg: #3a2d16;
  --green: #6fcb8c; --green-bg: #1d3426; --blue: #7fa9ec; --blue-bg: #1f2c44; --grey-bg: #2d2c33;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --on-accent: #14130f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* 原来 .side 写了 display:grid，hidden 不起作用，「并排」一直显示在拖线对比下面 */
html, body { min-height: 100%; } /* 原来是 height:100%，往下滚超过一屏，吸顶的顶栏会跟着 body 一起滚走 */
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
button { font: inherit; color: inherit; cursor: pointer; }
code { font: 13px/1.4 var(--mono); background: var(--grey-bg); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
::selection { background: var(--amber-bg); }

/* ---------- 顶栏 ---------- */
header.top {
  position: sticky; top: 0; z-index: 20; height: 54px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; background: var(--panel); border-bottom: 1px solid var(--line);
}
header.top .brand { font-weight: 700; font-size: 16px; letter-spacing: .02em; white-space: nowrap; }
header.top .brand small { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 12px; }
.chips { display: flex; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 13px;
  color: var(--muted);
}
.chip.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.chip b { font-weight: 600; margin-left: 4px; }
header select, header input[type=search] {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 10px; min-width: 0; max-width: 180px;
}
header input[type=search] { width: 200px; }
header .spacer { flex: 1; }
header .hint { color: var(--muted); font-size: 12px; white-space: nowrap; }
.btn-ghost { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 13px; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------- 主区 ---------- */
main { display: grid; grid-template-columns: 330px 1fr; min-height: calc(100vh - 54px); }
aside.queue { border-right: 1px solid var(--line); background: var(--panel-2); overflow-y: auto; height: calc(100vh - 54px); position: sticky; top: 54px; }
.qgroup { padding: 14px 12px 6px; font-size: 12px; color: var(--muted); letter-spacing: .04em; display: flex; justify-content: space-between; }
.qgroup.red { color: var(--red); }
.qgroup.amber { color: var(--amber); }
.qitem {
  display: grid; grid-template-columns: 1fr 56px; gap: 10px; margin: 0 8px 6px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .12s, transform .12s;
}
.qitem:hover { border-color: var(--line-2); }
.qitem.on { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.qitem .t { font-weight: 600; font-size: 14px; line-height: 1.35; margin: 2px 0 4px; }
.qitem .m { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.qitem .thumb { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--grey-bg); border: 1px solid var(--line); }
.qitem .thumb.none { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.qitem.done { opacity: .72; }
.qempty { padding: 30px 20px; color: var(--muted); text-align: center; font-size: 14px; }

.tag { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 6px; background: var(--grey-bg); color: var(--muted); white-space: nowrap; }
.tag.type { background: var(--blue-bg); color: var(--blue); font-weight: 600; }
.tag.red { background: var(--red-bg); color: var(--red); font-weight: 600; }
.tag.amber { background: var(--amber-bg); color: var(--amber); font-weight: 600; }
.tag.green { background: var(--green-bg); color: var(--green); font-weight: 600; }
.tag.ink { background: var(--ink); color: var(--panel); }

/* ---------- 卡片 ---------- */
section.card { padding: 28px 36px 140px; overflow-x: hidden; }
.card-inner { max-width: 960px; margin: 0 auto; }
.welcome { max-width: 640px; margin: 80px auto; color: var(--muted); }
.welcome h2 { color: var(--ink); font-size: 22px; margin: 0 0 10px; }
.welcome ol { padding-left: 20px; }
.welcome code { font-size: 12px; }

.head { margin-bottom: 26px; }
.head .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.head .tags .meta { font-size: 12px; color: var(--muted); margin-left: 4px; }
.head h1 { font-size: 26px; line-height: 1.3; margin: 0 0 12px; letter-spacing: -.01em; }
.ask {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--radius);
  padding: 14px 18px; font-size: 17px; line-height: 1.6; box-shadow: var(--shadow);
}
.ask .lbl { display: block; font-size: 12px; color: var(--muted); letter-spacing: .06em; margin-bottom: 4px; }
.blocks { margin-top: 10px; font-size: 13px; color: var(--muted); }
.blocks b { color: var(--red); font-weight: 600; }
.demo-note { margin: 0 0 16px; padding: 8px 12px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 13px; }

.sec { margin: 30px 0; }
.sec > h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.sec > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec > h2 .n { color: var(--ink); }

/* 前因后果 */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.step .k { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.step .k i { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--grey-bg); color: var(--muted); font: 600 11px/18px var(--font); text-align: center; font-style: normal; }
.step.why { grid-column: 1 / -1; border-left: 3px solid var(--amber); }
.step .v { font-size: 14.5px; }

/* 证据 */
.evs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ev { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; position: relative; }
.ev.wide { grid-column: 1 / -1; }
.ev .img { position: relative; background: var(--grey-bg); cursor: zoom-in; }
.ev .img img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.ev figcaption { padding: 10px 12px; font-size: 13px; color: var(--ink); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; }
.ev figcaption .n { color: var(--muted); font-size: 12px; flex: none; }
.ev figcaption { flex-wrap: wrap; }
.ev figcaption > span:not(.n):not(.src) { flex: 1 1 0; min-width: 0; }
.ev figcaption .src { color: var(--muted); font-size: 11px; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 0 100%; padding-left: 18px; }
.ev figcaption .src:empty { display: none; }
.ev .pins-mini { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--pin);
  color: #fff; font: 700 11px/22px var(--font); text-align: center; transform: translate(-50%, -100%) rotate(-45deg); box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.pin span { display: inline-block; transform: rotate(45deg); }
.pin.sm { width: 16px; height: 16px; font-size: 9px; line-height: 16px; }

/* 对比 */
.cmp { position: relative; user-select: none; -webkit-user-select: none; background: var(--grey-bg); cursor: ew-resize; touch-action: pan-y; overflow: hidden; }
.cmp img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; pointer-events: none; }
.cmp .after { position: absolute; top: 0; bottom: 0; right: 0; left: auto; width: 50%; overflow: hidden; background: var(--grey-bg); }
.cmp .after img { position: absolute; top: 0; right: 0; height: 100%; max-height: none; width: calc(100% / var(--w, .5)); max-width: none; }
.cmp .bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none; }
.cmp .bar::after { content: "◂ ▸"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; color: #222; border-radius: 999px; padding: 2px 8px; font-size: 11px; white-space: nowrap; }
.cmp .lab { position: absolute; top: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; pointer-events: none; }
.cmp .lab.l { left: 8px; } .cmp .lab.r { right: 8px; }
.cmp-tools { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; }
.cmp-tools button, .frames-tools button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 2px 10px; font-size: 12px; }
.cmp-tools button.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.side { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.side figure { margin: 0; background: var(--panel); }
.side .img { position: relative; cursor: zoom-in; background: var(--grey-bg); }
.side img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
.side figcaption { font-size: 12px; color: var(--muted); padding: 4px 10px; text-align: center; }

/* 连拍 */
.frames-tools { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.frames-tools input[type=range] { flex: 1; }

/* 链接和文件 */
.ev.link { padding: 14px; display: flex; gap: 12px; align-items: center; grid-column: 1 / -1; flex-wrap: wrap; }
.ev.link > div { flex: 1 1 240px; min-width: 0; }
.ev.link a.go { display: inline-block; background: var(--ink); color: var(--panel); text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.ev.link .note { color: var(--muted); font-size: 13px; }
.ev.link .href { color: var(--muted); font: 11px/1.4 var(--mono); word-break: break-all; }
.ev.file { padding: 12px 14px; font-size: 13px; grid-column: 1 / -1; }

/* 选项 */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.opt { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color .12s; position: relative; }
.opt:hover { border-color: var(--line-2); }
.opt.on { border-color: var(--ink); box-shadow: var(--shadow); }
.opt .img { background: var(--grey-bg); position: relative; }
.opt .img img { display: block; width: 100%; height: 200px; object-fit: cover; }
.opt .body { padding: 12px 14px; }
.opt .key { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--panel); font-weight: 700; text-align: center; line-height: 26px; margin-right: 8px; }
.opt.on .key { background: var(--green); }
.opt .ttl { font-weight: 600; font-size: 15px; }
.opt .desc { font-size: 14px; margin-top: 6px; }
.opt .cost { font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.opt .rec { position: absolute; top: 8px; right: 8px; }
.opt .zoom { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 6px; font-size: 12px; padding: 2px 8px; }
.opt .picked { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 6px; }

/* 自查 */
.tbl { overflow-x: auto; border-radius: var(--radius); }
table.checks { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
table.checks th, table.checks td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.checks th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--panel-2); }
table.checks tr:last-child td { border-bottom: 0; }
table.checks td.ev-cell { color: var(--muted); font-size: 13px; }
.checks-sum { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
table.checks tr.r-untested td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
table.checks tr.r-no td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* 后果 */
.after { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.after .a { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; }
.after .a .k { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.after .a.ok .k { color: var(--green); }
.after .a.no .k { color: var(--red); }

/* 在哪看、记录 */
.where { display: flex; flex-direction: column; gap: 6px; }
.where .w { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.where .w .l { color: var(--muted); flex: none; min-width: 70px; }
.where .w code { flex: 1; background: transparent; padding: 0; }
.where .w button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; font-size: 12px; padding: 2px 8px; }
.hist { font-size: 13px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; }
.hist div { margin: 4px 0; }
.hist b { color: var(--ink); font-weight: 600; }

/* 已有结论 */
.verdict { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; box-shadow: var(--shadow); }
.verdict .big { font-size: 22px; font-weight: 700; }
.verdict.ok .big { color: var(--green); } .verdict.no .big { color: var(--red); } .verdict.mid .big { color: var(--muted); }
.verdict .note { font-size: 14px; white-space: pre-wrap; }
.verdict .when { font-size: 12px; color: var(--muted); }
.verdict .acted { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; }
.verdict .acted b { color: var(--green); }
.verdict .pinlist { font-size: 13px; margin-top: 6px; }

/* ---------- 底部决定栏 ---------- */
.decide {
  position: fixed; left: 330px; right: 0; bottom: 0; z-index: 15; background: var(--panel); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(0,0,0,.06); padding: 12px 36px 14px;
}
.decide .row { max-width: 960px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.decide textarea {
  flex: 1 1 320px; min-height: 42px; max-height: 160px; resize: vertical; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px;
}
.decide textarea:focus { outline: 2px solid var(--blue-bg); border-color: var(--blue); }
.decide .btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid var(--line-2); background: var(--panel); border-radius: 8px; padding: 9px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn kbd { font: 11px var(--mono); color: var(--muted); margin-left: 6px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-weight: 400; }
.btn.primary { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.btn.primary kbd { color: var(--panel); border-color: rgba(255,255,255,.3); opacity: .8; }
.btn.ok { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.btn.ok kbd { color: var(--on-accent); border-color: currentColor; opacity: .75; }
.btn.no { color: var(--red); border-color: var(--red); }
.btn.quiet { color: var(--muted); font-weight: 400; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.decide .pins { max-width: 960px; margin: 6px auto 0; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.decide .pins .p { background: var(--red-bg); color: var(--red); border-radius: 6px; padding: 1px 8px; display: inline-flex; gap: 6px; align-items: center; }
.decide .pins .p button { border: 0; background: transparent; color: inherit; padding: 0; font-size: 12px; text-decoration: underline; }
.decide .tip { max-width: 960px; margin: 6px auto 0; font-size: 12px; color: var(--muted); }

/* ---------- 看大图 + 批注 ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(12, 10, 8, .92); display: none; flex-direction: column; }
.lb.on { display: flex; }
.lb .bar { display: flex; align-items: center; gap: 12px; padding: 10px 18px; color: #ddd; font-size: 13px; }
.lb .bar .cap { flex: 1; color: #fff; font-size: 14px; }
.lb .bar button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 6px; padding: 5px 12px; font-size: 13px; }
.lb .bar button.on { background: var(--pin); }
.lb .stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 20px 20px; }
.lb .wrap { position: relative; display: inline-block; max-width: 100%; max-height: 100%; }
.lb .wrap img { display: block; max-width: calc(100vw - 40px); max-height: calc(100vh - 110px); width: auto; height: auto; }
.lb .wrap.pinning { cursor: crosshair; }
.lb .wrap .pin { cursor: pointer; }
.lb .pinbox { position: absolute; z-index: 2; background: #fff; color: #222; border-radius: 8px; padding: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.4); width: 260px; }
.lb .pinbox input { width: 100%; font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; }
.lb .pinbox .r { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.lb .pinbox button { border: 0; border-radius: 6px; padding: 4px 10px; font-size: 12px; background: #eee; color: #222; }
.lb .pinbox button.ok { background: var(--pin); color: #fff; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,.15); color: #fff; border: 0; height: 44px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.lb .nav:hover { background: rgba(255,255,255,.28); }
.lb .nav.l { left: 12px; } .lb .nav.r { right: 12px; }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: var(--ink); color: var(--panel); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }

/* ---------- 登录 ---------- */
.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; }
.login { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-box { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px 24px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.login-box h2 { margin: 0; font-size: 22px; }
.login-box p { margin: 0; color: var(--muted); font-size: 14px; }
.login-box input[type=password] { font: inherit; font-size: 16px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 12px; }
.login-box input[type=password]:focus { outline: 2px solid var(--blue-bg); border-color: var(--blue); }
.login-box .btn { padding: 11px 14px; font-size: 16px; }
.login-err { color: var(--red); font-size: 14px; min-height: 1.4em; }

@media (max-width: 1180px) {
  header .hint { display: none; }
  header input[type=search] { width: 130px; }
  header select { max-width: 140px; }
}
@media (max-width: 900px) {
  header.top { height: auto; min-height: 54px; flex-wrap: wrap; gap: 8px; padding: 8px 12px; position: static; }
  header .spacer { display: none; }
  header input[type=search] { flex: 1 1 120px; width: auto; }
  main { grid-template-columns: 1fr; }
  main { min-height: 0; }
  aside.queue { position: static; height: auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .decide textarea { flex-basis: 100%; }
  .verdict { grid-template-columns: 1fr; }
  section.card { padding: 18px 16px 200px; }
  .decide { left: 0; padding: 10px 16px; }
  .steps, .after { grid-template-columns: 1fr; }
  header input[type=search] { width: 120px; }
  header .hint { display: none; }
}

/* ---------- 手机（2026-11-07 上线后加：早报里的卡链接在手机上点开）---------- */
@media (max-width: 600px) {
  header.top { gap: 6px; padding: 8px 10px; }
  header .brand { flex: 1 1 auto; }
  header select { flex: 1 1 40%; max-width: none; }
  header input[type=search] { flex: 1 1 100%; }
  aside.queue { max-height: 34vh; }
  .qitem { grid-template-columns: 1fr 48px; }
  .qitem .thumb { width: 48px; height: 48px; }
  section.card { padding: 14px 12px 230px; }
  .head h1 { font-size: 21px; }
  .ask { font-size: 16px; padding: 12px 14px; }
  .decide { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .decide textarea { min-height: 44px; height: 44px; }
  .decide .pins > span:not(.p):only-child { display: none; } /* 「点开图可以钉批注」的提示，手机上省掉；真有批注照常显示 */
  .decide .btns { width: 100%; }
  .decide .btn { flex: 1 1 auto; padding: 10px 8px; }
  /* iOS 输入框字号小于 16px 会自动放大页面 */
  .decide textarea, .lb .pinbox input, header select, header input[type=search] { font-size: 16px; }
  .lb .bar { flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  .lb .bar .cap { flex-basis: 100%; font-size: 13px; }
  .lb .stage { padding: 0 6px 10px; }
  .lb .wrap img { max-width: calc(100vw - 12px); max-height: calc(100vh - 150px); }
  .lb .nav { height: 38px; padding: 0 8px; font-size: 13px; top: auto; bottom: 14px; transform: none; }
  /* 钉批注的输入框：屏幕窄，固定在底部，不跟着点的位置跑出屏幕 */
  .lb .pinbox { position: fixed; left: 10px !important; right: 10px; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; z-index: 5; }
}
/* 没有键盘的设备（手机、平板）不显示快捷键提示 */
@media (hover: none) and (pointer: coarse) {
  .btn kbd, header .hint { display: none; }
}
