/* ==========================================================================
   视光帮 — 设计基线
   语言：精密仪器 × 行业刊物
   - 暖纸底 + 墨色骨架，唯一的彩色是「镀膜青」，用在结论、强调与交互
   - 数字全部等宽，标题用宋体建立刊物感，正文用系统黑体保证可读
   - 容器全站统一 1080，任何页面不再单独改宽度
   ========================================================================== */

:root {
  /* 底色与墨色 */
  --paper: #f6f4ef;
  --surface: #fffdfa;
  --soft: #efede6;
  --ink: #15181a;
  --ink-2: #3f4749;
  --muted: #6f7677;
  --line: #e3ded3;
  --line-2: #cec8bb;

  /* 主色：镜片减反射膜的青绿 */
  --accent: #0e6a5e;
  --accent-2: #0a544a;
  --accent-deep: #072e2a;
  --accent-soft: #e5efec;
  --accent-line: #bcd8d2;

  /* 状态色：与主色区分，避免「绿=通过」和「绿=品牌」打架 */
  --ok-bg: #e8f1ea;
  --ok-line: #c3dcc9;
  --ok-ink: #1c6b45;
  --warn-bg: #fbf0db;
  --warn-line: #ebd3a5;
  --warn-ink: #8d5611;
  --bad-bg: #fbeae7;
  --bad-line: #eccbc5;
  --bad-ink: #a33427;

  --radius: 10px;
  --radius-lg: 16px;
  --wrap: 1080px;

  --shadow-sm: 0 1px 2px rgba(21, 24, 26, 0.04);
  --shadow-md: 0 2px 4px rgba(21, 24, 26, 0.04), 0 10px 24px -12px rgba(21, 24, 26, 0.16);
  --shadow-lg: 0 20px 44px -24px rgba(21, 24, 26, 0.38);
  --ring: 0 0 0 3px rgba(14, 106, 94, 0.14);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; }
::selection { background: #cfe6e1; color: var(--accent-deep); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.wrap.wide { max-width: var(--wrap); }

/* 控制台页面：不要外层留白，自己管布局 */
main.bare { max-width: none; padding: 0; }

/* ==========================================================================
   顶栏
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex: none;
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: block;
}
.brand:hover { text-decoration: none; }
.brand:hover .brand-mark { opacity: 0.85; }
.brand span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  font-size: 14px;
  white-space: nowrap;
}
.nav > a, .nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.nav > a:hover, .nav-item > a:hover { background: var(--soft); text-decoration: none; color: var(--ink); }
.nav > a.on, .nav-item > a.on { color: var(--accent-2); font-weight: 600; background: var(--accent-soft); }
.nav-item > a.on:hover { background: var(--accent-soft); }
.nav-item .caret { opacity: 0.45; transition: transform 0.15s; }
.nav-item:hover .caret { transform: rotate(180deg); opacity: 0.8; }

.nav-item { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -10px;
  width: 328px;
  /* 顶栏 .nav 是 nowrap 的，菜单必须显式恢复换行，否则描述会撑出框外 */
  white-space: normal;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 7px;
  display: none;
  z-index: 60;
}
.nav-item:hover .menu, .nav-item:focus-within .menu { display: block; }
.menu .mh {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 11px 4px;
}
.menu a {
  display: block;
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--ink);
}
.menu a b { display: block; font-size: 13.5px; font-weight: 600; }
.menu a span { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu a:hover { background: var(--soft); text-decoration: none; }
.menu a:hover span { color: var(--ink-2); }

.userbox { flex: none; display: flex; align-items: center; }
.loginlink {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff !important;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  transition: background 0.15s;
}
.loginlink:hover { text-decoration: none; background: var(--accent-2); }
.usermenu { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; }
.usermenu .uname { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
a.uname:hover { color: var(--accent); text-decoration: none; }
.usermenu .uname small { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: 12px; }
.usermenu a { color: var(--muted); font-size: 13px; }
.usermenu a:hover { color: var(--accent); }

/* ==========================================================================
   排版
   ========================================================================== */
h1 {
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1.32;
  margin: 30px 0 10px;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: var(--ink);
}
h2 { font-size: 19px; line-height: 1.4; margin: 34px 0 12px; letter-spacing: 0; font-weight: 700; }
h3 { font-size: 15.5px; margin: 22px 0 8px; font-weight: 700; }
p { margin: 11px 0; }
.lede { color: var(--ink-2); margin: 0 0 22px; font-size: 16px; line-height: 1.78; max-width: 720px; }
.muted { color: var(--muted); font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
code { font-family: var(--mono); font-size: 0.92em; }

/* 页面抬头（工具页 / 列表页共用） */
.pagehead { padding: 26px 0 0; }
.pagehead .eyebrow, .eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.pagehead h1 { margin-top: 0; }

.about-logo { display: block; width: 300px; max-width: 78%; height: auto; margin: 0 0 20px; }

/* 区块标题：编号 + 标题 + 右侧入口，上边一条发丝线 */
.sect-label {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 40px 0 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.sechead {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 46px 0 16px;
}
.sechead .n {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.sechead h2 { margin: 0; font-size: 20px; }
.sechead .more { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sechead .more:hover { color: var(--accent); text-decoration: none; }
.sechead .sub { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   按钮
   ========================================================================== */
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 11px 22px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.08s;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.ghost {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  font-weight: 500;
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.btn.danger { color: var(--bad-ink); border-color: var(--line-2); }
.btn.danger:hover { border-color: var(--bad-ink); color: var(--bad-ink); background: var(--bad-bg); }
.btn.sm { padding: 7px 13px; font-size: 13px; }

/* ==========================================================================
   卡片与列表
   ========================================================================== */
.cards { display: grid; gap: 12px; margin: 16px 0; }
@media (min-width: 620px) { .cards.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 700px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: inherit;
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.card .t { font-weight: 600; font-size: 15.5px; letter-spacing: 0; }
.card .d { color: var(--muted); font-size: 13.5px; margin-top: 6px; line-height: 1.65; }
.card .k { font-size: 12.5px; color: var(--accent); margin-top: 12px; font-weight: 600; }
.card.dl .t .badge { margin-left: 2px; }

.cicon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-bottom: 13px;
}
.card:hover .cicon { background: var(--accent); color: #fff; }
.cicon svg { display: block; }
.dl-icon { background: var(--ok-bg); color: var(--ok-ink); }
.card:hover .dl-icon { background: var(--ok-ink); color: #fff; }

/* 工具索引行：密度优先，不用大卡片 */
.toolgrid { display: grid; gap: 0 34px; }
@media (min-width: 780px) { .toolgrid { grid-template-columns: 1fr 1fr; } }
.toolrow {
  display: flex;
  gap: 13px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  align-items: flex-start;
  transition: background 0.15s;
  border-radius: 4px;
}
.toolrow:hover { background: rgba(255, 253, 250, 0.9); text-decoration: none; }
.toolrow .ic {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-top: 1px;
}
.toolrow:hover .ic { background: var(--accent); color: #fff; }
.toolrow .tx { flex: 1; min-width: 0; }
.toolrow .tn { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.toolrow .td { font-size: 12.8px; color: var(--muted); line-height: 1.55; margin-top: 2px; }
.toolrow .go { flex: none; color: var(--line-2); font-size: 14px; align-self: center; transition: color 0.15s, transform 0.15s; }
.toolrow:hover .go { color: var(--accent); transform: translateX(2px); }

/* 未上线：占个位置但不给点，视觉上退后一层 */
.toolrow.soon { cursor: default; opacity: 0.62; }
.toolrow.soon:hover { background: transparent; }
.toolrow.soon:hover .ic { background: var(--accent-soft); color: var(--accent-2); }
.toolrow.soon .badge { margin-left: 8px; font-size: 10px; padding: 1px 7px; letter-spacing: 0.04em; }

/* 竖排链接列表 */
.linklist { border-top: 1px solid var(--line); margin: 14px 0 8px; }
.linklist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.linklist a:hover { text-decoration: none; }
.linklist .t { font-weight: 500; font-size: 15px; }
.linklist .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.linklist .arrow { color: var(--line-2); font-size: 14px; flex: none; }
.linklist a:hover .t { color: var(--accent); }
.linklist a:hover .arrow { color: var(--accent); }

/* ==========================================================================
   表单
   ========================================================================== */
form.calc { margin: 20px 0 8px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 560px) {
  .grid.c2 { grid-template-columns: 1fr 1fr; }
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
}
.field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; letter-spacing: 0; }

.mini {
  margin-left: auto;
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
  flex: none;
  background: var(--surface);
}
.mini button {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.5;
  padding: 3px 9px;
  color: var(--muted);
  cursor: pointer;
}
.mini button + button { border-left: 1px solid var(--line-2); }
.mini button.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }

input[type="text"], input:not([type]), input[type="number"], input[type="password"],
input[type="email"], input[type="search"], select, textarea {
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-variant-numeric: tabular-nums;
}
textarea { font-size: 15px; line-height: 1.7; resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #a5a49c; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.field.bad input { border-color: var(--bad-ink); }

.seg { display: flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }

input[type="range"] { width: 100%; accent-color: var(--accent); }

/* 分段标签页 */
.tabs { display: flex; gap: 4px; margin: 12px 0 6px; flex-wrap: wrap; }
.tab {
  flex: 1;
  min-width: 84px;
  text-align: center;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  transition: all 0.15s;
}
.tab:hover { color: var(--accent); border-color: var(--accent-line); }
.tab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.hidden { display: none !important; }

/* 圆形筛选项 */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 20px; }
.chip {
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }

/* ==========================================================================
   结果与读数
   ========================================================================== */
.result {
  margin: 24px 0 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px 16px;
}
.result .cap {
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}
.rx {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: var(--accent-deep);
  word-break: break-word;
}
.rx small { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--ink-2); }
.rx + .rx { margin-top: 2px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin-top: 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13.5px; }

.flag { display: inline-block; padding: 3px 10px; border-radius: 5px; font-size: 12.5px; font-weight: 600; }
.flag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.flag.bad { background: var(--bad-bg); color: var(--bad-ink); }

.err { color: var(--bad-ink); font-size: 13.5px; margin-top: 10px; }

.verdict {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.verdict .k {
  font-size: 11px;
  color: var(--accent-2);
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
}
.verdict .head { font-size: 19px; font-weight: 700; margin: 6px 0 8px; line-height: 1.4; color: var(--ink); }
.verdict p { margin: 0; font-size: 14px; color: var(--ink-2); }
.verdict .band, .band { font-family: var(--mono); color: var(--accent-2); letter-spacing: 0.02em; }

.tone-good { color: var(--ok-ink); }
.tone-warn { color: var(--warn-ink); }
.tone-bad { color: var(--bad-ink); }

/* ==========================================================================
   提示块
   ========================================================================== */
.note {
  border-left: 2px solid var(--line-2);
  padding: 2px 0 2px 16px;
  color: var(--ink-2);
  font-size: 13.8px;
  margin: 22px 0;
  line-height: 1.75;
}
.note.warn { border-left-color: var(--warn-line); background: var(--warn-bg); padding: 13px 16px; border-radius: 0 8px 8px 0; }
.note b { color: var(--ink); }

.formula {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 18px 0;
}
.formula code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent-2);
}

.disclaimer {
  margin: 38px 0 44px;
  padding: 15px 18px;
  background: transparent;
  border-top: 1px solid var(--line);
  border-radius: 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}
.disclaimer b { color: var(--ink-2); }

/* ==========================================================================
   宽版双栏与面板
   ========================================================================== */
.reading { max-width: 730px; margin-inline: auto; }

.split { display: grid; gap: 16px; margin: 22px 0 8px; }
.split > * { min-width: 0; }
@media (min-width: 880px) {
  .split { grid-template-columns: 340px 1fr; align-items: start; gap: 24px; }
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  background: var(--surface);
  min-width: 0;
}
.panel + .panel { margin-top: 14px; }
.panel-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
}
.stat .k { font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; }
.stat .v {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
}
.stat .v small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

tr.hl td { background: var(--accent-soft); font-weight: 600; }
td .name-en { color: var(--muted); font-size: 12px; }

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-2);
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 600;
}
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 15px;
  margin: 10px 0;
  background: var(--surface);
}
summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details[open] summary { margin-bottom: 6px; }
details p { margin: 8px 0 2px; color: var(--ink-2); font-size: 14px; }

.figure { margin: 16px 0 8px; }
.figure svg { width: 100%; height: auto; display: block; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* 表格 */
.tablewrap { overflow-x: auto; margin: 16px 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th {
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-2);
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13.5px; }
tbody tr:hover td { background: rgba(255, 253, 250, 0.8); }

.ver {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 13.5px;
  background: var(--surface);
}
.ver dl { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; margin: 0; }
.ver dt { color: var(--muted); }
.ver dd { margin: 0; }

/* 标尺 */
.calbox { border: 1px dashed var(--line-2); border-radius: 4px; margin: 12px 0 10px; }
.rulerwrap { overflow-x: auto; margin: 10px 0; -webkit-overflow-scrolling: touch; }

/* ==========================================================================
   首页 hero
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  background:
    radial-gradient(900px 420px at 88% -20%, rgba(24, 148, 130, 0.34), transparent 62%),
    radial-gradient(600px 320px at 0% 120%, rgba(14, 106, 94, 0.34), transparent 60%),
    linear-gradient(155deg, #0d1614 0%, #101f1c 52%, #0b2b26 100%);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  margin: 24px 0 0;
  color: #f2efe7;
  overflow: hidden;
  box-shadow: 0 18px 44px -30px rgba(7, 46, 42, 0.9);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.8), transparent 70%);
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.8), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
  margin: 0 0 14px;
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #fff;
  font-family: var(--serif);
}
.hero p { color: rgba(242, 239, 231, 0.78); font-size: 15px; max-width: 470px; margin: 0; line-height: 1.8; }
.hero .eyebrow { color: #6fbfb1; margin-bottom: 14px; }
.hero .hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn { background: #f2efe7; color: var(--accent-deep); border-color: #f2efe7; }
.hero .btn:hover { background: #fff; border-color: #fff; }
.hero .btn.ghost { background: rgba(255, 255, 255, 0.06); color: #f2efe7; border: 1px solid rgba(242, 239, 231, 0.3); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(242, 239, 231, 0.55); }

/* hero 右侧：验光单式读数卡 */
.rxcard {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(242, 239, 231, 0.16);
  border-radius: 12px;
  padding: 16px 18px 14px;
  backdrop-filter: blur(6px);
  font-size: 13px;
}
.rxcard .rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242, 239, 231, 0.55);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(242, 239, 231, 0.12);
}
.rxcard .rc-tag { color: #7ed0c0; letter-spacing: 0.04em; }
.rxcard .rc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(242, 239, 231, 0.08);
}
.rxcard .rc-k { color: rgba(242, 239, 231, 0.58); font-size: 12.5px; }
.rxcard .rc-v { font-family: var(--mono); font-size: 14.5px; color: #f2efe7; letter-spacing: 0.02em; }
.rxcard .rc-verdict { padding-top: 12px; }
.rxcard .rc-verdict b { display: block; font-size: 15px; color: #f2efe7; font-weight: 600; }
.rxcard .rc-verdict span { display: block; font-size: 12.5px; color: rgba(242, 239, 231, 0.62); margin-top: 3px; }
.rxcard .rc-verdict em { font-style: normal; color: #7ed0c0; }

/* ==========================================================================
   知识库 / 文章
   ========================================================================== */
.masthead { padding: 40px 0 22px; border-bottom: 1px solid var(--line); }
.masthead h1 { margin: 0 0 10px; font-size: 40px; letter-spacing: 0.02em; }
.masthead .lede { margin-bottom: 0; }

.art-grid { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
@media (min-width: 760px) { .art-grid { grid-template-columns: 1fr 1fr; } }
.art-item {
  display: block;
  background: var(--surface);
  padding: 20px 22px;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.art-item:last-child { border-bottom: 0; }
@media (min-width: 760px) {
  .art-item:nth-child(odd) { border-right: 1px solid var(--line); }
  /* 奇数条时最后一条占满整行，不留空单元格 */
  .art-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.art-item:hover { background: #fff; text-decoration: none; }
.art-item .c {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.art-item h3 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink);
}
.art-item:hover h3 { color: var(--accent-2); }
.art-item p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.art-item .m { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; gap: 12px; font-family: var(--mono); }

.art-feature {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 26px 28px;
  margin: 22px 0 0;
  color: inherit;
}
@media (min-width: 760px) { .art-feature { grid-template-columns: 1.35fr 1fr; align-items: center; } }
.art-feature:hover { text-decoration: none; border-color: var(--accent-line); }
.art-feature .c { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.art-feature h2 { font-family: var(--serif); font-size: 27px; line-height: 1.4; margin: 10px 0 10px; }
.art-feature p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }
.art-feature .m { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 14px; }
.art-feature .thumb {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 2;
}
.art-feature .thumb b { color: var(--accent-2); }

/* 文章正文：两栏 + 目录 */
.doc-layout { display: grid; gap: 30px; margin-top: 26px; }
.doc-main { min-width: 0; }
.doc-rail { min-width: 0; }
@media (max-width: 939px) { .doc-rail { display: none; } }
@media (min-width: 940px) {
  .doc-layout { grid-template-columns: minmax(0, 700px) 230px; justify-content: space-between; }
  .doc-rail { position: sticky; top: 88px; align-self: start; }
}

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--line-2); }

.toc-wrap { font-size: 13px; }
.toc-title {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.toc { border-left: 1px solid var(--line); padding-left: 14px; }
.toc a { display: block; padding: 4px 0; color: var(--muted); line-height: 1.5; font-size: 12.8px; }
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.lv3 { padding-left: 12px; font-size: 12.5px; }
.toc a.on { color: var(--accent-2); font-weight: 600; }
.rail-card {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 15px 16px;
}
.rail-card .rt { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.rail-card a { display: block; font-size: 13.5px; padding: 5px 0; color: var(--ink-2); }
.rail-card a:hover { color: var(--accent); }
.rail-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }

article.post { max-width: 720px; }
article.post h1 { font-size: 33px; line-height: 1.36; margin: 0 0 16px; }
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12.5px;
  color: var(--muted);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.doc-meta .tag { color: var(--accent-2); font-weight: 600; }
.doc-meta .dot { color: var(--line-2); }

article.post .lede { font-size: 16.5px; color: var(--ink-2); line-height: 1.85; margin: 0 0 6px; }
article.post h2 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
  margin: 40px 0 12px;
  padding-top: 6px;
  scroll-margin-top: 84px;
}
article.post h3 { font-size: 16px; margin: 24px 0 8px; scroll-margin-top: 84px; }
article.post p { font-size: 15.8px; line-height: 1.9; color: var(--ink-2); margin: 14px 0; }
article.post b { color: var(--ink); }
article.post ul, article.post ol { padding-left: 22px; margin: 14px 0; }
article.post li { margin: 7px 0; font-size: 15.8px; line-height: 1.85; color: var(--ink-2); }
article.post blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.8;
}
article.post blockquote p { margin: 6px 0; font-size: 16.5px; }
article.post .meta { font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
article.post .cover { width: 100%; border-radius: var(--radius); margin: 18px 0; border: 1px solid var(--line); }
article.post .formula { font-size: 14px; }

.doc-foot { margin-top: 46px; border-top: 1px solid var(--line); padding-top: 22px; }
.doc-foot .ft { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.rel-grid { display: grid; gap: 10px; margin-bottom: 22px; }
@media (min-width: 640px) { .rel-grid { grid-template-columns: 1fr 1fr; } }
.rel {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
  background: var(--surface);
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.rel:hover { border-color: var(--accent-line); transform: translateY(-1px); text-decoration: none; }
.rel b { display: block; font-size: 14px; font-weight: 600; }
.rel span { display: block; font-size: 12.3px; color: var(--muted); margin-top: 3px; line-height: 1.55; }

.docnav { display: grid; gap: 10px; }
@media (min-width: 640px) { .docnav { grid-template-columns: 1fr 1fr; } }
.docnav a {
  display: block;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
}
.docnav a:hover { border-color: var(--accent-line); text-decoration: none; }
.docnav .k { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.docnav .t { font-size: 14px; font-weight: 600; margin-top: 3px; line-height: 1.5; }

/* ==========================================================================
   社区
   ========================================================================== */
.feed {
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 700px) { .feed { grid-template-columns: 1fr 1fr; } }

.post-card {
  display: block;
  background: var(--surface);
  padding: 18px 20px 16px;
  color: inherit;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid transparent;
  transition: background 0.15s;
}
.post-card:last-child { border-bottom: 0; }
@media (min-width: 700px) {
  .post-card:nth-child(odd) { border-right-color: var(--line); }
  .post-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.post-card:hover { background: #fff; text-decoration: none; }
.post-card .t { font-size: 15.5px; font-weight: 600; margin: 10px 0 6px; line-height: 1.5; }
.post-card:hover .t { color: var(--accent-2); }
.post-card .d { color: var(--muted); font-size: 13px; line-height: 1.62; }
.post-card .m { color: var(--muted); font-size: 12px; margin-top: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.post-card img { width: 100%; border-radius: 8px; margin-top: 12px; display: block; }

.post-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-2);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.post-tag.qc { background: var(--warn-bg); color: var(--warn-ink); }
.post-tag.ask { background: var(--bad-bg); color: var(--bad-ink); }
.post-tag.help { background: #e3eef3; color: #1b5c78; }
.post-tag.rant { background: #efe6f5; color: #6b3f96; }
.post-tag.lens { background: var(--ok-bg); color: var(--ok-ink); }
.post-tag.gear { background: #ece8e0; color: #5b5850; }

.feed-stat { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 46px 0; }
.empty a { font-weight: 500; }

/* 案例详情正文 */
.article { max-width: 730px; margin-inline: auto; }
.article h1 { margin-top: 22px; }
.article .meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.article .body { font-size: 15.5px; line-height: 1.88; color: var(--ink-2); white-space: normal; }
.article .body p { margin: 12px 0; }
.article .body h2 { font-family: var(--serif); font-size: 21px; margin: 30px 0 10px; }
.article .body h3 { font-size: 16.5px; margin: 22px 0 8px; }
.article .body ul, .article .body ol { margin: 12px 0; padding-left: 22px; }
.article .body li { margin: 5px 0; }
.article .cover { width: 100%; border-radius: var(--radius); margin: 16px 0; border: 1px solid var(--line); }

.likebar { display: flex; gap: 10px; align-items: center; margin: 26px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 17px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-2); font-weight: 600; }

.cmt-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 20px;
}
.cmt-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.cmt-head h3 { margin: 0; font-size: 15px; }
.cmt-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}
.cmt-tip { font-size: 12px; color: var(--muted); margin-left: auto; }
.composer { display: flex; gap: 12px; }
.composer .cbox { flex: 1; min-width: 0; }
.identity { margin-bottom: 10px; }
.identity input { font-size: 14px; padding: 8px 12px; width: auto; min-width: 200px; }
.who-line { font-size: 13.5px; color: var(--ink-2); }
.who-line b { color: var(--ink); }
.who-login { font-size: 12.5px; margin-left: 10px; }
.composer textarea { width: 100%; min-height: 84px; resize: vertical; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.cnt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cnt.warn { color: var(--bad-ink); font-weight: 600; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  flex: none;
  user-select: none;
  background: var(--accent);
}
.comment { display: flex; gap: 12px; padding: 15px 2px; border-top: 1px solid var(--line); }
.comment:first-child { border-top: 0; }
.comment .avatar { width: 32px; height: 32px; font-size: 13px; margin-top: 1px; }
.comment .cbody { flex: 1; min-width: 0; }
.comment .who { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.comment .when { font-size: 12px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.comment .txt { font-size: 14.5px; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; line-height: 1.7; overflow-wrap: break-word; }

.notice { padding: 11px 15px; border-radius: 8px; font-size: 13.5px; margin: 14px 0; }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice.bad { background: var(--bad-bg); color: var(--bad-ink); }

/* 投稿表单 */
.post-card { background: var(--surface); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
.title-row { position: relative; }
.title-row input { padding-right: 74px; }
.title-count {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.title-count.warn { color: var(--bad-ink); font-weight: 600; }
.mono { font-family: var(--mono); font-size: 14.5px; }
.body-foot { display: flex; justify-content: flex-end; margin-top: 6px; }

.upload-box {
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--soft);
}
.upload-box:hover { border-color: var(--accent); color: var(--accent); background: #f1f6f4; }
.upload-thumb { position: relative; display: inline-block; }
.upload-thumb img { max-width: 100%; max-height: 300px; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.upload-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.upload-remove:hover { background: rgba(15, 23, 42, 0.85); }

/* 质检 */
.qc-verdict {
  border-radius: var(--radius);
  padding: 16px 19px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.qc-verdict.pass { background: var(--ok-bg); border: 1px solid var(--ok-line); }
.qc-verdict.fail { background: var(--bad-bg); border: 1px solid var(--bad-line); }
.qc-verdict .big { font-size: 21px; font-weight: 700; font-family: var(--serif); }
.qc-verdict.pass .big { color: var(--ok-ink); }
.qc-verdict.fail .big { color: var(--bad-ink); }
.qc-verdict .sub { font-size: 13px; color: var(--muted); }
.ok-mark { color: var(--ok-ink); font-weight: 600; }
.bad-mark { color: var(--bad-ink); font-weight: 600; }

/* ==========================================================================
   账号
   ========================================================================== */
.authwall {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 44px 24px;
  text-align: center;
  margin: 20px 0 28px;
}
.aw-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.aw-t { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 0.01em; }
.aw-d { color: var(--muted); font-size: 14px; max-width: 420px; margin: 8px auto 18px; line-height: 1.75; }
.authwall .btn { display: inline-block; }
.aw-note { color: var(--muted); font-size: 12.5px; margin-top: 14px; }

.authpage { display: flex; justify-content: center; padding: 30px 0 10px; }
.auth-split { display: grid; gap: 30px; width: 100%; max-width: 900px; align-items: start; }
@media (min-width: 820px) { .auth-split { grid-template-columns: minmax(0, 1fr) 400px; gap: 44px; padding-top: 14px; } }
.auth-intro h1 { margin: 0 0 10px; font-size: 30px; }
.auth-intro .lede { font-size: 15px; margin-bottom: 6px; }
.auth-intro .steps li { font-size: 14px; color: var(--ink-2); }
.authcard {
  width: 100%;
  max-width: 404px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 30px 26px;
}
.authcard .tabs { margin: 0 0 18px; }
.authcard .btn { width: 100%; margin-top: 4px; }

.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; letter-spacing: 4px; }
.code-row .code-btn { flex: none; width: auto; margin-top: 0; padding: 0 18px; font-size: 14px; white-space: nowrap; }

.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-lg {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.ph-main { flex: 1; min-width: 160px; }
.ph-name { font-size: 18px; font-family: var(--serif); font-weight: 700; }
.ph-name .badge { margin-left: 8px; }
.ph-points { min-width: 130px; }
.ph-points .stat { text-align: center; }

/* ==========================================================================
   Markdown 编辑器
   ========================================================================== */
.md-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--soft);
  padding: 5px 8px;
}
.md-toolbar button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  width: 30px;
  height: 28px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
}
.md-toolbar button:hover { background: #e4e1d8; color: var(--accent); }
.md-tools-right { margin-left: auto; display: inline-flex; gap: 4px; }
.md-tools-right button { width: auto; padding: 0 12px; font-weight: 500; }
.md-tools-right button.on { background: var(--accent-soft); color: var(--accent-2); }
.field textarea#body { border-radius: 0 0 8px 8px; }
.md-preview {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
  min-height: 180px;
  font-size: 15px;
  line-height: 1.8;
}
.md-body h3, .md-body h4, .md-body h5, .md-body h6 { margin: 18px 0 8px; }
.md-body blockquote {
  margin: 12px 0;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  background: var(--soft);
  border-radius: 0 6px 6px 0;
}
.md-body pre { background: #10201d; color: #e2e8e6; border-radius: 8px; padding: 12px 14px; overflow-x: auto; font-size: 13px; margin: 12px 0; }
.md-body code { font-family: var(--mono); font-size: 13px; background: var(--soft); border-radius: 3px; padding: 1px 5px; }
.md-body pre code { background: transparent; padding: 0; color: inherit; }
.md-body ul, .md-body ol { padding-left: 22px; margin: 10px 0; }
.md-body li { margin: 4px 0; }
.md-body .md-img { max-width: 100%; border-radius: 8px; margin: 10px 0; }
.md-body hr { margin: 16px 0; }
.md-body .table-wrap { overflow-x: auto; margin: 14px 0; -webkit-overflow-scrolling: touch; }
.md-body table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
.md-body th, .md-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.md-body th { background: var(--soft); font-weight: 600; white-space: nowrap; font-size: 12.5px; }
.md-body tbody tr:nth-child(even) td { background: #fbfaf6; }

/* ==========================================================================
   后台控制台
   ========================================================================== */
.admin-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  align-items: stretch;
}
.a-side {
  background: #101a18;
  color: #b9c6c2;
  padding: 20px 12px 28px;
}
.a-side .a-title {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6f817c;
  padding: 0 10px 10px;
  font-weight: 700;
}
.a-nav { display: grid; gap: 2px; }
.a-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #c3cfcb;
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.a-nav button:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.a-nav button.on { background: var(--accent); color: #fff; font-weight: 600; }
.a-nav button svg { flex: none; opacity: 0.85; }
.a-nav .nb {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.12);
  color: #e8eeec;
  border-radius: 4px;
  padding: 1px 6px;
  min-width: 20px;
  text-align: center;
}
.a-nav button.on .nb { background: rgba(0, 0, 0, 0.22); }
.a-nav .nb.hot { background: #b8452f; color: #fff; }
.a-side .a-foot {
  margin-top: 18px;
  padding: 14px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #7d918c;
  line-height: 1.7;
}
.a-side .a-foot a { color: #b9c6c2; display: block; padding: 3px 0; }

.a-main { padding: 26px 30px 70px; min-width: 0; }
.a-bar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.a-bar h1 { font-family: var(--sans); font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.a-bar .sub { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.a-bar .spacer { margin-left: auto; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.kpi { background: var(--surface); padding: 15px 17px; min-width: 0; }
.kpi .k { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.kpi .v { font-family: var(--mono); font-size: 26px; line-height: 1.25; color: var(--ink); letter-spacing: -0.02em; }
.kpi .d { font-size: 11.5px; color: var(--muted); }
.kpi.alert .v { color: var(--bad-ink); }
.kpi.alert { background: #fdf6f4; }
.kpi.warn .v { color: var(--warn-ink); }
.kpi.warn { background: #fdf9f1; }

.a-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; }
.a-card > .hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.a-card > .hd .more { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.a-card > .bd { padding: 16px 18px; }
.a-card > .bd.tight { padding: 6px 0; }

.aq { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.aq:last-child { border-bottom: 0; }
.aq .aq-main { flex: 1; min-width: 0; }
.aq .aq-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aq .aq-head b { font-size: 14px; }
.aq .aq-head .meta { font-size: 12px; color: var(--muted); }
.aq .aq-body {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.7;
  background: var(--soft);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 9px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 132px;
  overflow: hidden;
}
.aq .aq-ops { display: flex; gap: 7px; margin-top: 10px; }
.aq .aq-ops .btn { padding: 6px 13px; font-size: 12.5px; }
.aq .aq-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.aq .aq-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.adm-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.adm-tools input[type="search"] { max-width: 240px; padding: 8px 12px; font-size: 13.5px; }
.adm-tools .grp { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--surface); }
.adm-tools .grp button {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--muted);
  padding: 7px 12px;
  cursor: pointer;
}
.adm-tools .grp button + button { border-left: 1px solid var(--line-2); }
.adm-tools .grp button.on { background: var(--ink); color: #fff; font-weight: 600; }

.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-table th { padding: 9px 12px; font-size: 10.5px; letter-spacing: 0.1em; }
.a-table td { padding: 10px 12px; white-space: nowrap; }
.a-table td.wrap-cell { white-space: normal; min-width: 180px; }
.a-table tr:hover td { background: #fbfaf6; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.status-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-dot.ok::before { background: var(--ok-ink); }
.status-dot.pending::before { background: var(--warn-ink); }
.status-dot.off::before { background: var(--bad-ink); }

/* 概览双栏 / 走势小图 */
.a-grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1040px) { .a-grid-2 { grid-template-columns: 1.12fr 0.88fr; } }
.a-grid-2 > .a-card { margin-bottom: 0; }
.a-main .a-grid-2 { margin-bottom: 16px; }

.bchart { display: flex; align-items: flex-end; gap: 4px; height: 92px; margin-top: 8px; }
.bcol { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.bstack {
  width: 100%;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #2f8c7e 0%, #0e6a5e 100%);
  opacity: 0.82;
  transition: opacity 0.15s;
}
.bcol:hover .bstack { opacity: 1; }
.bchart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-family: var(--mono); margin-top: 7px; }

/* 紧贴卡片边的内容（待办队列 / 小表）留出内边距 */
.a-card > .bd.tight .aq { padding: 15px 18px; border-bottom: 1px solid var(--line); }
.a-card > .bd.tight .aq:last-child { border-bottom: 0; }
.a-card > .bd.tight .a-table th:first-child,
.a-card > .bd.tight .a-table td:first-child { padding-left: 18px; }
.a-card > .bd.tight .a-table th:last-child,
.a-card > .bd.tight .a-table td:last-child { padding-right: 18px; }

/* 兼容旧的后台类名 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 18px 0 4px; }
.stat-cards .stat { text-align: center; padding: 14px 10px; }
.stat-cards .stat .v { font-size: 24px; }
.admin-item { margin: 12px 0; }
.ai-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-body {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
  background: var(--soft);
  border-radius: 8px;
  padding: 10px 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-ops { display: flex; gap: 8px; margin-top: 10px; }
.ai-ops .btn { padding: 8px 16px; font-size: 13.5px; }
.adj { display: inline-flex; gap: 6px; align-items: center; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input { flex: 0 1 300px; width: auto; min-width: 0; }
.adj input { font-size: 13.5px !important; }

/* ==========================================================================
   其它
   ========================================================================== */
.pts-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.dl-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--soft);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 7px 12px;
  text-decoration: none;
  transition: all 0.15s;
}
.dl-lock:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); text-decoration: none; }

.ui-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(16, 26, 24, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ui-fade 0.15s ease-out;
}
@keyframes ui-fade { from { opacity: 0; } to { opacity: 1; } }
.ui-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(11, 30, 27, 0.35);
  max-width: 400px;
  width: 100%;
  padding: 26px 28px 24px;
  animation: ui-pop 0.18s ease-out;
  text-align: center;
}
@keyframes ui-pop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ui-title { margin: 0 0 10px; font-size: 17px; color: var(--ink); font-family: var(--serif); }
.ui-msg { font-size: 14px; line-height: 1.75; color: var(--ink-2); margin-bottom: 18px; overflow-wrap: break-word; }
.ui-modal .btn { min-width: 140px; }

.contact-card {
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0 8px;
}
.cc-left { flex: 1; min-width: 260px; }
.cc-label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 5px; }
.cc-mail { font-size: 17px; font-weight: 600; font-family: var(--mono); }
.cc-note { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 8px 0 0; }
.cc-right { display: flex; align-items: center; gap: 14px; }
.cc-right img { width: 108px; height: auto; border-radius: 8px; border: 1px solid var(--line); display: block; }

/* 打印用 PD 尺 */
.printarea { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; background: #fff; }
.printarea h3 { margin-top: 0; }
.calibline { width: 85.6mm; max-width: 100%; height: 5mm; border: 0.3mm solid #111; }
.printnote { font-size: 13px; color: var(--muted); }
svg#printruler { width: 187mm; height: 26mm; display: block; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 16px 0; }
.steps li { position: relative; padding-left: 32px; margin: 12px 0; }
.steps li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  line-height: 20px;
  font-weight: 600;
}

.recent { margin: 16px 0 0; }
.recent .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.recent .chip { font-variant-numeric: tabular-nums; padding: 5px 13px; }

/* ==========================================================================
   页脚
   ========================================================================== */
footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 32px 0 46px;
  font-size: 13px;
  color: var(--muted);
}
footer .fcols { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 720px) { footer .fcols { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; } }
footer .fbrand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 0.06em;
}
footer .fbrand-mark { width: 22px; height: 22px; flex: none; }
footer .fbrand span { color: var(--accent); }
footer .ftag { margin: 8px 0 0; font-size: 12.5px; line-height: 1.75; max-width: 260px; }
footer .fcol h4 {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}
footer .fcol a { display: block; color: var(--ink-2); padding: 3px 0; font-size: 13px; }
footer .fcol a:hover { color: var(--accent); }
footer .fnote {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
}
footer .links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.12fr 0.88fr; padding: 46px 42px; align-items: center; }
  .hero h1 { font-size: 40px; }
}

@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .menu { display: none !important; }
  .nav { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav > a, .nav-item > a { padding: 8px 10px; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .a-side { min-width: 0; overflow: hidden; }
  .a-side { padding: 12px 12px 10px; }
  .a-side .a-title, .a-side .a-foot { display: none; }
  .a-nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .a-nav::-webkit-scrollbar { display: none; }
  .a-nav button { width: auto; white-space: nowrap; }
  .a-main { padding: 20px 18px 60px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { padding: 28px 22px 26px; border-radius: 14px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 14px; }
  h1 { font-size: 25px; }
  .masthead { padding: 26px 0 18px; }
  .masthead h1 { font-size: 29px; }
  .sechead { margin-top: 34px; }
  .sechead .sub { display: none; }
  article.post h1 { font-size: 26px; }
  article.post h2 { font-size: 20px; }
  .art-feature { padding: 20px 20px; }
  .art-feature h2 { font-size: 22px; }
  .rx { font-size: 22px; }
  /* 手机上顶栏折成两行：第一行品牌 + 账号，第二行导航可横向滑动 */
  .topbar .wrap {
    height: auto;
    flex-wrap: wrap;
    gap: 0 12px;
    padding-top: 9px;
    padding-bottom: 0;
  }
  .brand { font-size: 17px; order: 1; }
  .brand-mark { width: 23px; height: 23px; }
  .userbox { order: 2; margin-left: auto; }
  .nav {
    order: 3;
    flex-basis: 100%;
    margin: 0;
    padding: 5px 0 7px;
    gap: 0;
    font-size: 13.5px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }
  .nav > a, .nav-item > a { padding: 6px 10px 6px 0; }
  .nav > a.on, .nav-item > a.on { background: transparent; padding-right: 10px; }
  .loginlink { padding: 7px 12px; font-size: 12.5px; }
  .usermenu .uname small { display: none; }
  .docnav { grid-template-columns: 1fr; }
  .a-main { padding: 16px 14px 56px; }
}

@media print {
  .topbar, footer, .noprint, .wrap > h1, .wrap > .lede, .wrap > h2,
  .wrap > .panel, .wrap > .split, .wrap > .linklist, .wrap > .recent,
  .authwall, #authwall, .a-side, .doc-rail { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .printarea { display: block !important; border: 0; padding: 0; margin: 0; }
  /* 打印件只留尺子和说明：FAQ、页内提示、站内链接都别跟着打出来 */
  details, main > p, main > .note, main > .linklist { display: none !important; }
  body { font-size: 11pt; background: #fff; }
}

/* 概览待办：整行两列 */
.aqgrid { display: grid; gap: 0 26px; }
@media (min-width: 1120px) {
  .aqgrid { grid-template-columns: 1fr 1fr; }
  .aqgrid .aq { padding-left: 18px; padding-right: 18px; }
  .aqgrid .aq:nth-child(2n) { border-left: 1px solid var(--line); }
}

/* 正文 + 右侧栏（社区、资料等列表页） */
.with-rail { display: grid; gap: 22px; margin-top: 22px; }
.with-rail > * { min-width: 0; }
@media (min-width: 900px) {
  .with-rail { grid-template-columns: minmax(0, 1fr) 288px; align-items: start; gap: 26px; }
}
.rail { display: grid; gap: 14px; }
.rail .panel { padding: 16px 18px; }
.rail .panel + .panel { margin-top: 0; }

/* 对比结论卡（验光单对比） */
.cmpv {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px;
  margin: 22px 0 18px;
}
.cmpv.warn { border-left-color: var(--warn-ink); background: #fdfaf3; }
.cmpv.ok { border-left-color: var(--ok-ink); background: #f7fbf8; }
.cmpv .h { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.cmpv .b { font-size: 14px; line-height: 1.8; color: var(--ink-2); }

/* 工具总览里条数为奇数时，最后一条占满整行 */
@media (min-width: 780px) {
  .toolgrid > .toolrow:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ==========================================================
   屏幕标尺校准（瞳距尺页）
   ========================================================== */
.calib { display: grid; gap: 18px; margin: 16px 0 20px; }
@media (min-width: 820px) {
  .calib { grid-template-columns: minmax(0, 1fr) 248px; gap: 26px; align-items: center; }
}
.calib-stage {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  overflow: auto;
  text-align: center;
}
.calib-card {
  display: inline-block;
  vertical-align: top;
  width: 323px;
  height: 204px;
  background: #fff;
  border: 1.5px dashed var(--accent);
  border-radius: 8px;
}
.calib-ctl label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.calib-ctl label .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.calib-ctl input[type="range"] { width: 100%; }
.calib-read { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.calib-read b { font-family: var(--mono); font-size: 14px; color: var(--ink); }
.calib-read .btn { padding: 5px 10px; min-width: 32px; }
.calib-cap { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.calib-cap b { color: var(--ink-2); }
#screenruler { display: block; }

/* 只在打印件上出现的元素（如 85.6mm 校准条） */
@media screen { .printonly { display: none !important; } }
@media print { .printonly { display: block !important; } }

/* 打印尺在窄屏里横向滚动，打印时必须完整展开 */
@media print { .rulerwrap { overflow: visible !important; } }

/* 打印尺校准（瞳距尺页） */
.printcal { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 18px 0 8px; }
.printcal .field { flex: 0 1 230px; margin: 0; }
.printcal-status { font-size: 13px; color: var(--ink-2); line-height: 1.75; margin: 4px 0 12px; }
.printcal-status b { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.pstep { margin: 6px 0 10px; }
.calibline-cap { font-size: 12px; color: #555; margin: 4px 0 14px; }

/* 只在屏幕上出现的占位（比如打印件里的校准条位置） */
@media screen { .screenonly { display: block; } }
@media print { .screenonly { display: none !important; } }
.calib-slot {
  border: 1.5px dashed var(--line-2);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 6px 0 12px;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--soft);
  max-width: 460px;
}

/* 打印缩放的醒目读数 */
.printcal-status .calpct-wrap { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.printcal-status .calpct {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: -0.01em;
  margin-left: 2px;
}
.printcal-status .calpct-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 2px; }
