/* BAISHUN 报价系统 —— 界面样式
   色彩：靛蓝（侧栏）/ 冷白纸面 / 烫金铜色（唯一强调色）/ 青绿（利润）/ 茜红（预警）
   数字字体：Bahnschrift（Windows 自带），等宽数字便于对比 */
:root {
  --ink: #1E2A44;
  --ink-2: #2A3858;
  --ink-3: #8C97AE;
  --paper: #F5F6F8;
  --card: #FFFFFF;
  --line: #E2E5EB;
  --line-2: #CDD2DC;
  --text: #1F2533;
  --text-2: #5A6375;
  --text-3: #8A92A3;
  --brass: #A87B25;
  --brass-soft: #F6EFDF;
  --teal: #2F7D6D;
  --teal-soft: #E5F2EF;
  --red: #B23A48;
  --red-soft: #FBEAEC;
  --amber: #B7791F;
  --blue: #3A5A8C;
  --num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --r: 6px;
  /* 八项成本配色：同一色相家族由深到浅，避免花哨 */
  --c1: #1E2A44; --c2: #3A5A8C; --c3: #6E8BB8; --c4: #A9BBD6;
  --c5: #A87B25; --c6: #2F7D6D; --c7: #7FB3A6; --c8: #C9B48A;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); font-size: 13.5px; color: var(--text); background: var(--paper); line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.num, .money { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------- 框架 ---------- */
.shell { display: grid; grid-template-columns: 212px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--ink) 212px, var(--paper) 212px); }
.side { background: var(--ink); color: #D5DBE8; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand b { display: block; font-family: var(--num); font-size: 22px; letter-spacing: .06em; color: #fff; font-weight: 600; }
.brand span { font-size: 12px; color: var(--ink-3); }
.brand .stitch { margin-top: 10px; border-top: 1.5px dashed var(--brass); opacity: .7; }
.nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
.nav .grp { font-size: 11.5px; color: var(--ink-3); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 5px; color: #C9D1E2; font-size: 13.5px; }
.nav a:hover { background: var(--ink-2); text-decoration: none; color: #fff; }
.nav a.on { background: var(--ink-2); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.nav svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.side .foot { padding: 12px 18px; font-size: 11.5px; color: var(--ink-3); border-top: 1px solid rgba(255,255,255,.07); }

.mainarea { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 26px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top h1 { margin: 0; font-size: 18px; font-weight: 600; }
.top .sub { color: var(--text-3); font-size: 12.5px; }
.top .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.page { padding: 22px 26px 60px; }

/* ---------- 基础组件 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: #fff; cursor: pointer; white-space: nowrap; font-size: 13px; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-2); }
.btn.gold { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn.danger { color: var(--red); border-color: #E7C3C8; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.link { border: none; background: none; color: var(--blue); padding: 0 4px; height: auto; }
.btn.link.danger { color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.card > .hd { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.card > .hd h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card > .hd .hint { color: var(--text-3); font-size: 12px; }
.card > .hd .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card > .bd { padding: 14px 16px; }
.card > .bd.flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }

.tag { display: inline-block; padding: 0 7px; border-radius: 3px; font-size: 11.5px; line-height: 20px; background: #EEF0F4; color: var(--text-2); white-space: nowrap; }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.green { background: var(--teal-soft); color: var(--teal); }
.tag.gold { background: var(--brass-soft); color: var(--brass); }
.tag.gray { background: #F0F1F3; color: var(--text-3); }
.up { color: var(--red); } .down { color: var(--teal); }
.muted { color: var(--text-3); } .small { font-size: 12px; }
.low { color: var(--red); font-weight: 600; }
.good { color: var(--teal); }

/* 表格 */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 12px; padding: 9px 12px; background: #F8F9FB; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid #EEF0F3; vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr:hover td { background: #FAFBFC; }
table.t td.r, table.t th.r { text-align: right; }
table.t td.num, table.t td.r { white-space: nowrap; }
table.t td.c, table.t th.c { text-align: center; }
table.t tr.off td { color: var(--text-3); }
table.t tr.lowrow td { background: #FFF7F8; }
table.t .ops { white-space: nowrap; text-align: right; }
table.t .ops .btn + .btn { margin-left: 2px; }
.click { cursor: pointer; }
.empty { padding: 36px; text-align: center; color: var(--text-3); }

/* 表单 */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .sp { flex: 1; }
.inp, select.inp, textarea.inp { height: 32px; border: 1px solid var(--line-2); border-radius: var(--r); padding: 0 10px; background: #fff; min-width: 0; }
textarea.inp { height: auto; padding: 7px 10px; resize: vertical; }
.inp:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(58,90,140,.12); }
.inp.num { text-align: right; }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.form.c3 { grid-template-columns: repeat(3, 1fr); }
.form.c4 { grid-template-columns: repeat(4, 1fr); }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > label { font-size: 12px; color: var(--text-2); }
.fld > label .req { color: var(--red); }
.fld .inp { width: 100%; }
.fld.full { grid-column: 1 / -1; }
.fld.half { grid-column: span 2; }
.fld .help { font-size: 11.5px; color: var(--text-3); }
.inline { display: flex; gap: 6px; align-items: center; }
.inline .inp { flex: 1; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(20,27,43,.42); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 6vh 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: 640px; max-width: 100%; box-shadow: 0 20px 50px rgba(20,27,43,.25); animation: pop .14s ease-out; }
.modal.wide { width: 960px; } .modal.xl { width: 1120px; } .modal.narrow { width: 420px; }
.modal .mh { display: flex; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal .mh h3 { margin: 0; font-size: 15px; }
.modal .mh .x { margin-left: auto; border: none; background: none; font-size: 20px; cursor: pointer; color: var(--text-3); line-height: 1; }
.modal .mb { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
.modal .mf { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: #FAFBFC; border-radius: 0 0 10px 10px; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 6px; z-index: 300; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.toast.err { background: var(--red); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brass); font-weight: 600; }

/* ---------- 首页 ---------- */
.kpis { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
.kpi { padding: 16px 18px; border-left: 1px solid var(--line); }
.kpi:first-child { border-left: none; }
.kpi .l { font-size: 12px; color: var(--text-2); }
.kpi .v { font-family: var(--num); font-size: 28px; font-weight: 500; letter-spacing: -.01em; margin: 2px 0; line-height: 1.2; }
.kpi .v small { font-size: 14px; color: var(--text-3); margin-left: 2px; }
.kpi .d { font-size: 12px; color: var(--text-3); }
.kpi.lead { background: var(--ink); color: #fff; border-radius: 8px 0 0 8px; }
.kpi.lead .l, .kpi.lead .d { color: var(--ink-3); }
.kpi.lead .v { color: #fff; }
.spark { display: block; margin-top: 6px; }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed #ECEEF2; }
.rank li:last-child { border-bottom: none; }
.rank .i { font-family: var(--num); color: var(--text-3); }
.rank .bar { height: 4px; background: #EEF0F4; border-radius: 2px; margin-top: 4px; }
.rank .bar i { display: block; height: 100%; background: var(--brass); border-radius: 2px; }

.alert-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #ECEEF2; }
.alert-row:last-child { border-bottom: none; }
.alert-row .nm { flex: 1; min-width: 0; }
.alert-row .nm b { font-weight: 500; }

/* ---------- 报价计算器 ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 18px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.step > .sh { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #EEF0F3; }
.step > .sh .n { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--num); font-size: 12px; display: grid; place-items: center; flex: none; }
.step > .sh h4 { margin: 0; font-size: 13.5px; font-weight: 600; }
.step > .sh .hint { color: var(--text-3); font-size: 12px; }
.step > .sh .r { margin-left: auto; display: flex; gap: 6px; }
.step > .sb { padding: 14px 16px; }
.subrow { display: grid; gap: 8px; align-items: end; padding: 8px 0; border-bottom: 1px dashed #ECEEF2; }
.subrow:last-child { border-bottom: none; }
.subrow .x { height: 32px; width: 32px; border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 16px; }
.subrow .x:hover { color: var(--red); }
.geo { font-size: 12px; color: var(--text-2); background: #F8F9FB; border-radius: 6px; padding: 10px 12px; margin-top: 12px; }
.geo ul { margin: 4px 0 0; padding-left: 18px; }

.result { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 92px); overflow-y: auto; padding-bottom: 4px; }
.price-head { background: var(--ink); color: #fff; border-radius: 8px; padding: 16px 18px; }
.price-head .row { display: flex; justify-content: space-between; align-items: baseline; }
.price-head .l { color: var(--ink-3); font-size: 12px; }
.price-head .big { font-family: var(--num); font-size: 34px; line-height: 1.1; }
.price-head .mid { font-family: var(--num); font-size: 20px; }
.price-head .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.price-head .grid4 .v { font-family: var(--num); font-size: 16px; }

/* 招牌：八项成本"缝线"条 */
.stitchbar { border: 1.5px dashed var(--brass); border-radius: 7px; padding: 4px; background: #fff; }
.stitchbar .bar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; }
.stitchbar .bar i { display: block; height: 100%; transition: width .25s ease; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin-top: 8px; font-size: 12px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); margin-right: 6px; }

.lines { width: 100%; border-collapse: collapse; }
.lines td, .lines th { padding: 8px 10px; border-bottom: 1px solid #EEF0F3; }
.lines th { font-size: 12px; color: var(--text-2); font-weight: 500; text-align: right; background: #F8F9FB; }
.lines th:first-child { text-align: left; }
.lines td { text-align: right; font-family: var(--num); }
.lines td:first-child { text-align: left; font-family: var(--sans); }
.lines td:first-child i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.lines tr.dt td { padding: 0 10px 8px 25px; text-align: left; font-family: var(--sans); font-size: 11.5px; color: var(--text-2); border-bottom: 1px solid #EEF0F3; }
.lines tr.dt div { padding: 1px 0; }
.lines tr.main td { cursor: pointer; }
.lines tr.main td:first-child::after { content: "▸"; color: var(--text-3); margin-left: 6px; font-size: 10px; }
.lines tr.main.open td:first-child::after { content: "▾"; }
.lines tfoot td { font-weight: 600; background: #FAFBFC; border-bottom: none; }

.warn { background: #FFF8E8; border: 1px solid #F1DFB4; color: #7A5A12; border-radius: 6px; padding: 8px 12px; font-size: 12px; }
.warn div + div { margin-top: 2px; }
.mode-banner { background: var(--brass-soft); border: 1px solid #E8D9B5; border-radius: 6px; padding: 9px 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }

.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px; }
.detail-grid .k { font-size: 12px; color: var(--text-3); }
.detail-grid .v { font-weight: 500; }
.chart svg { display: block; width: 100%; height: auto; }
.chart text { font-family: var(--num); fill: var(--text-3); font-size: 11px; }

@media (max-width: 1280px) { .calc { grid-template-columns: 1fr; } .result { position: static; max-height: none; } }
@media (max-width: 1100px) { .kpis { grid-template-columns: 1fr 1fr 1fr; } .kpi.lead { border-radius: 8px 0 0 0; } .g-main, .g2, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; }
  .nav { display: flex; flex-wrap: wrap; } .nav .grp { display: none; }
  .form, .form.c3, .form.c4 { grid-template-columns: 1fr; } .kpis { grid-template-columns: 1fr 1fr; }
  .page { padding: 16px; } .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  .side, .top .actions { display: none; } .shell { grid-template-columns: 1fr; }
}

/* ===== v2 新增 ===== */
:root { --fabric: #F3EEE3; --piece: #FFFFFF; --piece-line: #A87B25; }
.lines td .u { font-size: 11px; color: var(--text-3); margin-left: 3px; font-family: var(--sans); }
.lines tr.dt .src { color: var(--text-3); margin-top: 3px; }
.lines tr.sub td { background: #FBFBFC; }
.issues { list-style: none; margin: 0; padding: 0; }
.issues li { display: flex; gap: 8px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed #ECEEF2; font-size: 12.5px; }
.issues li:last-child { border-bottom: none; }
.issues li .msg { flex: 1; line-height: 1.55; }
.issues li .tag { flex: none; }
.issues li.lv-block .msg { color: var(--red); }
.okbox { color: var(--teal); background: var(--teal-soft); border-radius: 6px; padding: 8px 12px; font-size: 12.5px; }
.price-head .formula { margin-top: 10px; line-height: 1.6; color: #B9C2D4; font-size: 11.5px; }
.formula-box { background: #F8F9FB; border-radius: 6px; padding: 10px 12px; margin-top: 10px; font-size: 12.5px; line-height: 1.6; }
.layout-svg { width: 100%; height: auto; margin-top: 8px; display: block; }
.layout-svg text { font-size: 8px; fill: var(--text-2); font-family: var(--num); }
.lay-facts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 6px; }
.lay-facts div { background: #F8F9FB; border-radius: 5px; padding: 6px 8px; }
.lay-facts span { display: block; font-size: 11px; color: var(--text-3); }
.lay-facts b { font-family: var(--num); font-weight: 500; font-size: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.seg label { padding: 6px 14px; cursor: pointer; font-size: 13px; border-left: 1px solid var(--line-2); background: #fff; }
.seg label:first-child { border-left: none; }
.seg label.on { background: var(--ink); color: #fff; }
.seg input { display: none; }
.crafts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
details.step > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-weight: 600; font-size: 13.5px; }
details.step > summary .n { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--num); font-size: 12px; display: grid; place-items: center; }
details.step[open] > summary { border-bottom: 1px solid #EEF0F3; }
.badge { font-style: normal; background: var(--red); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; margin-left: auto; line-height: 18px; }
.side .foot .who { display: flex; justify-content: space-between; margin-bottom: 4px; color: #fff; }
.side .foot .who span { color: var(--ink-3); }
.side .foot a { color: #C9D1E2; }
.side .foot .ver { margin-top: 6px; }
.pending-strip { display: flex; gap: 14px; align-items: center; background: var(--brass-soft); border: 1px solid #E8D9B5; border-radius: 8px; padding: 11px 16px; margin-bottom: 16px; color: var(--text); }
.pending-strip:hover { text-decoration: none; border-color: var(--brass); }
.pending-strip b { color: var(--brass); white-space: nowrap; }
.pending-strip span { font-size: 12.5px; color: var(--text-2); }
.pending-strip .go { margin-left: auto; color: var(--blue); white-space: nowrap; }
table.t tr.pendrow td { background: #FFFBF0; }
table.matrix .bandcell { font-weight: 600; background: #F8F9FB; vertical-align: top; }
table.matrix tr.bandstart td { border-top: 2px solid var(--line); }
table.pm td.cell { cursor: pointer; }
table.pm td.cell:hover { background: #EEF2F7; }
table.pm td.pendcell { background: #FFF3D6; }
table.pm sup { color: var(--brass); font-size: 9px; margin-left: 2px; }
table.cmp td.diff { background: #FFF3C4; font-weight: 600; }
h4.sec { margin: 18px 0 8px; font-size: 13.5px; }
.mono { font-family: Consolas, monospace; word-break: break-all; }
.comp-row { display: grid; grid-template-columns: 90px 1fr 60px 90px; gap: 10px; align-items: center; padding: 4px 0; }
.comp-row .bar { height: 8px; background: #EEF0F4; border-radius: 4px; }
.comp-row .bar i { display: block; height: 100%; background: var(--c2); border-radius: 4px; }
.comp-row b { text-align: right; font-weight: 500; }
.comp-row span:last-child { text-align: right; font-size: 12px; }
.doc-body { max-width: 980px; line-height: 1.75; }
.doc-body h2 { font-size: 19px; margin: 8px 0 12px; } .doc-body h3 { font-size: 16px; margin: 22px 0 8px; } .doc-body h4 { font-size: 14px; margin: 16px 0 6px; }
.doc-body table.doc { margin: 8px 0 14px; } .doc-body table.doc td, .doc-body table.doc th { white-space: normal; }
.doc-body blockquote { margin: 8px 0; padding: 8px 14px; background: var(--brass-soft); border-left: 3px solid var(--brass); }
.doc-body pre { background: #F3F4F7; padding: 10px; border-radius: 6px; overflow-x: auto; }
.doc-body code { background: #F0F1F4; padding: 0 4px; border-radius: 3px; }
/* 登录 */
body.login-mode .shell { display: none; }
.login { min-height: 100vh; display: grid; place-items: center; background: var(--ink); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px); }
.login-card { width: 360px; background: #fff; border-radius: 12px; padding: 30px 30px 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.brand-l b { font-family: var(--num); font-size: 26px; letter-spacing: .08em; color: var(--ink); display: block; }
.brand-l span { color: var(--text-3); font-size: 12.5px; }
.brand-l .stitch { margin-top: 12px; border-top: 1.5px dashed var(--brass); }
@media (max-width: 1100px) { .lay-facts { grid-template-columns: repeat(3, 1fr); } }

/* v2.1 */
.autobox { height: 32px; display: flex; align-items: center; padding: 0 10px; border-radius: 6px; background: var(--teal-soft); color: var(--teal); font-weight: 500; font-family: var(--num); }
table.t tr.tier-me td { background: var(--brass-soft); font-weight: 600; }

/* ---------- 手机（≤760px）：顶部紧凑导航、内容不超出屏幕、表格横向滑动 ---------- */
@media (max-width: 760px) {
  .shell { display: block; background: var(--paper); }
  .side { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; box-shadow: 0 1px 6px rgba(0,0,0,.18); }
  .brand { padding: 10px 14px; border: 0; }
  .brand b { font-size: 17px; }
  .brand span, .brand .stitch { display: none; }
  .side .foot { margin-left: auto; border: 0; padding: 8px 14px; text-align: right; }
  .side .foot .who { justify-content: flex-end; margin-bottom: 0; }
  .side .foot .who span, .side .foot .ver { display: none; }
  .nav { order: 3; flex: 0 0 100%; width: 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 0 8px 8px; gap: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 7px 11px; flex: none; }
  .nav a.on { box-shadow: inset 0 -2px 0 var(--brass); }
  .nav .badge { margin-left: 2px; }
  .top { position: static; flex-wrap: wrap; padding: 12px 14px; }
  .top .actions { margin-left: 0; flex-wrap: wrap; }
  .page { padding: 12px; }
  .calc > *, .form > *, .steps > *, .grid > * { min-width: 0; }
  .inp, select.inp { min-width: 0; max-width: 100%; }
  .inline { flex-wrap: wrap; }
  .seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .seg label { white-space: nowrap; padding: 7px 11px; }
  .toolbar > * { max-width: 100%; }
  .toolbar .inp { flex: 1 1 140px; }
  table.t { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .subrow { grid-template-columns: 1fr 1fr !important; }
  .price-head .grid4 { grid-template-columns: 1fr 1fr; }
  .price-head .big { font-size: 28px; }
  .modal { width: calc(100vw - 16px) !important; max-width: none !important; max-height: 92vh; }
  .modal .mf { flex-wrap: wrap; }
  .modal .mf .btn { flex: 1 1 auto; }
  .kpis, .kpis.k5 { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 22px; }
  .mode-banner { flex-wrap: wrap; }
}
