﻿/* =========================================================================
   结构力学求解器 StructLab — app.css
   ========================================================================= */

:root {
  --c-bg: #ffffff;
  --c-surface: #ffffff;
  --c-line: #e4eaf3;
  --c-line-2: #d3dceb;
  --c-text: #16233a;
  --c-muted: #6b7c93;
  --c-accent: #2563eb;
  --c-accent-2: #1d4ed8;
  --c-soft: #eef4ff;
  --c-danger: #dc2626;
  --c-ok: #0f9d58;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 56, .05);
  --shadow: 0 1px 2px rgba(16, 32, 56, .04), 0 10px 28px rgba(16, 32, 56, .07);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; font-size: inherit; color: inherit; }

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================= 顶栏 ================= */

.topbar {
  height: 58px;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; margin-right: 10px; }

.logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .3);
}
.logo svg { width: 20px; height: 20px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 14.5px; letter-spacing: .2px; white-space: nowrap; }
.brand-text span { font-size: 10.5px; color: var(--c-muted); letter-spacing: .3px; }

.menu { display: flex; align-items: center; gap: 2px; }

.tb {
  height: 32px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: #34465f;
  font-size: 12.8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.tb:hover { background: #f1f5fb; }
.tb:active { background: #e8eff9; }
.caret { width: 9px; height: 6px; opacity: .55; }

.dropdown { position: relative; }

.menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 50;
  max-height: 70vh;
  overflow: auto;
}
.menu-pop.open { display: block; }
.menu-pop button,
.menu-pop a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.8px;
  color: #2b3a50;
  text-decoration: none;
  box-sizing: border-box;
}
.menu-pop button:hover,
.menu-pop a:hover { background: var(--c-soft); color: var(--c-accent); }
.menu-pop button small,
.menu-pop a small { display: block; color: var(--c-muted); font-size: 11px; margin-top: 1px; }
.menu-pop a b { font-weight: 600; }
.menu-pop a.on { color: var(--c-accent); background: #f2f7ff; }
.menu-pop a.on b::after { content: '· 当前'; margin-left: 6px; font-size: 10.5px; font-weight: 400; color: #7c9bd2; }
.tb.here { color: var(--c-accent); background: var(--c-soft); }
.menu-pop .sep { height: 1px; background: var(--c-line); margin: 5px 4px; }

.grow { flex: 1; }

.model-name {
  font-size: 12.5px;
  color: #41546e;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: text;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px dashed transparent;
}
.model-name:hover { background: #f6f9fd; border-color: var(--c-line-2); }

.icon-btn {
  width: 32px; height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #51637b;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.icon-btn:hover { background: #f1f5fb; color: var(--c-accent); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: .3; cursor: default; }

.btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--c-line-2);
  background: #fff;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12.8px;
  font-weight: 600;
  color: #2b3a50;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: .15s;
}
.btn:hover { border-color: #b9c8dd; background: #fafcff; }
.btn svg { width: 13px; height: 13px; }
.btn.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .28);
  padding: 0 15px;
}
.btn.primary:hover { background: linear-gradient(135deg, #2f74e8, #1d4ed8); }
.btn.primary kbd {
  font: inherit;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .2);
  color: #eaf1ff;
}
.btn.small { height: 29px; padding: 0 11px; font-size: 12px; }
/* 当前生效的那一项（如「斜梁荷载形式」①②③） */
.btn.active {
  background: #eaf1ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .28);
}
.btn.active:hover { background: #e2ecff; border-color: #1d4ed8; }
.btn.danger { color: var(--c-danger); border-color: #f3c9c9; }
.btn.danger:hover { background: #fff5f5; border-color: #e9a8a8; }
.btn.block { width: 100%; justify-content: center; }

/* ================= 主体布局 ================= */

.body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 10px;
  padding: 10px;
}

/* ---- 工具栏 ---- */

.rail {
  width: 76px;
  flex: 0 0 76px;
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-line);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}

.tool {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: #5a6c85;
  position: relative;
  flex: 0 0 auto;
}
.tool svg { width: 21px; height: 21px; }
.tool span { font-size: 10.5px; letter-spacing: .2px; }
.tool:hover { background: #f4f7fc; color: var(--c-accent); }
.tool.on {
  background: var(--c-soft);
  color: var(--c-accent);
  font-weight: 600;
}
.tool.on::before {
  content: "";
  position: absolute;
  left: -6px; top: 9px; bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c-accent);
}
.rail-sep { height: 1px; background: var(--c-line); margin: 5px 6px; }

/* ---- 画布 ---- */

.stage {
  flex: 1;
  min-width: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage-top {
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--c-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.stage-top::-webkit-scrollbar { display: none; }

.seg {
  display: inline-flex;
  gap: 2px;
  background: #ffffff;
  border: 1px solid var(--c-line);
  padding: 3px;
  border-radius: 9px;
  flex: 0 0 auto;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.4px;
  color: #56677f;
  white-space: nowrap;
}
.seg button:hover { color: var(--c-accent); }
.seg button.on {
  background: #fff;
  color: var(--c-accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(30, 58, 95, .12);
}

/* 「支座反力」等开关按钮：与视图切换区分开 */
.seg button.toggle {
  border-left: 1px dashed #cbd5e1;
  margin-left: 2px;
  color: #0f766e;
}
/* 单独一个开关按钮（如圆轴扭转页的「扭矩图」）不要那条虚线 */
.seg button.toggle:first-child { border-left: 0; margin-left: 0; }
.seg button.toggle::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  border: 1.6px solid currentColor;
  vertical-align: 0;
}
.seg button.toggle.on::before { background: currentColor; }
.seg button.toggle.on { background: #ecfdf5; color: #047857; font-weight: 700; }

.chk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #5b6d86;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.chk input { width: 13px; height: 13px; accent-color: var(--c-accent); cursor: pointer; margin: 0; }

.canvas-host {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #ffffff;
}
#cv { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }

.statusbar {
  height: 28px;
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  border-top: 1px solid var(--c-line);
  font-size: 11.5px;
  color: #7a8ba1;
  background: #ffffff;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
}
.st-item { overflow: hidden; text-overflow: ellipsis; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 8px);
  background: rgba(22, 35, 58, .92);
  color: #fff;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  max-width: 80%;
  text-align: center;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: rgba(190, 30, 40, .95); }
.toast.ok { background: rgba(13, 122, 74, .95); }

/* ---- 右侧面板 ---- */

.inspector {
  width: 366px;
  flex: 0 0 366px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 视图条右端的三角形折叠键：收起 / 展开右侧属性、结果栏 */
.panel-toggle {
  margin-left: auto;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  right: 0;
  z-index: 6;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  background: #fff;
  color: #4b6487;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(30, 58, 95, .06);
  transition: background .12s, color .12s, border-color .12s;
}
.panel-toggle:hover,
.panel-toggle:focus-visible {
  background: var(--c-soft);
  color: var(--c-accent);
  border-color: #bfd3f5;
  outline: none;
}
.panel-toggle svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: transform .16s ease;
}
body.hide-side .panel-toggle svg { transform: rotate(180deg); }

body.hide-side .inspector,
body.hide-side .ah-side { display: none !important; }
body.hide-side .stage,
body.hide-side .ah-left { flex: 1 1 auto; min-width: 0; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 7px;
  border-bottom: 1px solid var(--c-line);
  flex: 0 0 auto;
}
.tabs button {
  flex: 1;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.8px;
  color: #5b6d86;
}
.tabs button:hover { background: #f4f7fc; }
.tabs button.on {
  background: var(--c-soft);
  color: var(--c-accent);
  font-weight: 700;
}

.pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
}
.pane.hidden { display: none; }
.pane::-webkit-scrollbar { width: 9px; }
.pane::-webkit-scrollbar-thumb { background: #d7e0ee; border-radius: 6px; border: 2px solid #fff; }

/* ---- 卡片 / 表单 ---- */

.sel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sel-title .badge {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--c-soft);
  color: var(--c-accent);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 11px;
}
.sel-title b { font-size: 14px; }
.sel-title small { color: var(--c-muted); font-size: 11.5px; display: block; }

.card {
  border: 1px solid var(--c-line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
}
.card-h {
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--c-line);
  font-size: 11.8px;
  font-weight: 700;
  color: #3c4f68;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .2px;
}
.card-h .grow { flex: 1; }
.card-b { padding: 12px; }

/* --- 折叠卡：默认只显示标题，点标题展开 --- */
.card.fold > .card-h {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.card.fold:not(.open) > .card-h { border-bottom-color: transparent; }
.card.fold > .card-h:hover { background: #f6faff; }
.card.fold > .card-b { display: none; }
.card.fold.open > .card-b { display: block; }
.fold-caret {
  flex: none;
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 5.5px solid #9db0c8;
  transform: rotate(-90deg);
  transition: transform .16s ease;
}
.card.fold.open .fold-caret { transform: rotate(0deg); }
.card.fold.open > .card-h { border-bottom-color: var(--c-line); }

.fold-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.fold-bar .hint-text { margin: 0; min-width: 0; }
.fold-bar .grow { flex: 1; }
.fold-bar .btn { flex: none; }
.btn.mini {
  height: 24px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 7px;
}

.field { margin-bottom: 10px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: 11.3px;
  color: var(--c-muted);
  margin-bottom: 4px;
  letter-spacing: .2px;
}
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }

input[type="text"], input[type="number"], select {
  width: 100%;
  height: 32px;
  border: 1px solid var(--c-line-2);
  border-radius: 8px;
  padding: 0 9px;
  font-family: inherit;
  font-size: 12.6px;
  color: var(--c-text);
  background: #fff;
  font-variant-numeric: tabular-nums;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
select { cursor: pointer; padding-right: 4px; }
input[type="number"] { text-align: right; }
input:disabled { background: #f6f8fb; color: #97a6b9; }

.unit-input { position: relative; }
.unit-input input { padding-right: 40px; }
.unit-input span {
  position: absolute;
  right: 9px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #93a2b6;
  pointer-events: none;
}

.hint-text { font-size: 11.5px; color: var(--c-muted); line-height: 1.55; }
.hint-text code {
  background: #f2f6fc;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 11px;
}

.seg.small { width: 100%; }
.seg.small button { flex: 1; text-align: center; padding: 5px 4px; font-size: 11.8px; }

.list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
}
.list-row:hover { background: #f6f9fd; }
.list-row.on { background: var(--c-soft); border-color: #cfe0ff; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { font-size: 12.3px; font-weight: 600; }
.list-row .lr-main small { display: block; color: var(--c-muted); font-size: 11px; }
.list-row .lr-x {
  width: 22px; height: 22px;
  border: 0; background: transparent; border-radius: 6px;
  color: #9aabc0; cursor: pointer; display: grid; place-items: center;
  font-size: 13px;
}
.list-row .lr-x:hover { background: #fdecec; color: var(--c-danger); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eff3f9;
  color: #5b6d86;
  font-weight: 600;
}
.tag.blue { background: #e8f0ff; color: #2563eb; }
.tag.red { background: #fdeaea; color: #dc2626; }
.tag.green { background: #e7f6ee; color: #0f7a4a; }
.tag.amber { background: #fdf1e0; color: #b45309; }

.divider { height: 1px; background: var(--c-line); margin: 12px 0; }

.btn-row { display: flex; gap: 8px; margin-top: 10px; }
.btn-row .btn { flex: 1; justify-content: center; }

/* ---- 结果 ---- */

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 9px 11px;
  background: linear-gradient(180deg, #fbfdff, #f6f9fd);
}
.stat small { display: block; font-size: 10.8px; color: var(--c-muted); margin-bottom: 2px; }
.stat b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .u { font-size: 10.5px; color: var(--c-muted); font-weight: 500; margin-left: 2px; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.tbl th {
  text-align: right;
  font-weight: 600;
  font-size: 10.8px;
  color: var(--c-muted);
  padding: 6px 7px;
  border-bottom: 1px solid var(--c-line);
  background: #fff;
  position: sticky;
  top: 0;
  white-space: nowrap;
}
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td {
  padding: 5px 7px;
  text-align: right;
  border-bottom: 1px solid #f2f6fb;
  white-space: nowrap;
}
.tbl tr:hover td { background: #fafcff; }
.tbl td.neg { color: #b91c1c; }
.tbl-wrap { max-height: 260px; overflow: auto; }

.alert {
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 11.8px;
  line-height: 1.55;
  margin-bottom: 10px;
  border: 1px solid;
}
.alert.err { background: #fff5f5; border-color: #f5cccc; color: #b91c1c; }
.alert.warn { background: #fffbeb; border-color: #fde8b5; color: #92610a; }
.alert.ok { background: #f2fbf6; border-color: #c8ecd9; color: #0b6b41; }
.alert b { font-weight: 700; }

/* ---- 弹层 ---- */

.popover {
  position: fixed;
  width: 250px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 11px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 60;
}
.popover.show { display: block; }
.popover .pop-title {
  font-size: 11px;
  color: var(--c-muted);
  padding: 5px 8px 6px;
  font-weight: 600;
}
.popover button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12.4px;
}
.popover button b { display: block; font-weight: 600; }
.popover button small { color: var(--c-muted); font-size: 11px; }
.popover button:hover { background: var(--c-soft); }
.popover button.on { background: var(--c-soft); color: var(--c-brand); }
.popover .pop-seg {
  display: flex;
  gap: 6px;
  padding: 0 6px 4px;
}
.popover .pop-seg button {
  display: block;
  width: auto;
  flex: 1 1 0;
  text-align: center;
  border: 1px solid var(--c-line);
  background: #fff;
  padding: 5px 4px;
  border-radius: 7px;
}
.popover .pop-seg button b { font-weight: 600; font-size: 11.8px; }
.popover .pop-seg button.on {
  border-color: var(--c-brand);
  background: var(--c-soft);
  color: var(--c-brand);
}
.popover .pop-hint {
  font-size: 10.5px;
  color: var(--c-muted);
  line-height: 1.45;
  padding: 2px 8px 7px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 28, 45, .38);
  display: grid;
  place-items: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}
.modal-mask.hidden { display: none; }
.modal {
  width: min(720px, 92vw);
  max-height: 82vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 30, 55, .25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-line);
}
.modal-head b { flex: 1; font-size: 14px; }
.modal-body { padding: 16px; overflow: auto; }

.kbd-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 7px 14px;
  font-size: 12.5px;
  align-items: center;
}
.kbd-grid kbd {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  padding: 2px 6px;
  border: 1px solid #d5deec;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f8fafd;
  font-family: inherit;
  font-size: 11.5px;
  color: #3b4d66;
}

.test-list { display: flex; flex-direction: column; gap: 6px; }
.test-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafd;
  font-size: 12.3px;
}
.test-item .dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.test-item.pass .dot { background: var(--c-ok); }
.test-item.fail .dot { background: var(--c-danger); }
.test-item .tname { flex: 1; }
.test-item .tval { font-variant-numeric: tabular-nums; color: var(--c-muted); font-size: 11.5px; }

/* 滚动条 */
.rail::-webkit-scrollbar, .menu-pop::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb, .menu-pop::-webkit-scrollbar-thumb {
  background: #dbe3ef; border-radius: 6px;
}

@media (max-width: 1240px) {
  .inspector { width: 330px; flex-basis: 330px; }
  .brand-text span { display: none; }
  /* 平台名比原来的「结构力学求解器」长两字，窄屏把间距收紧，别把右侧按钮挤出去 */
  .topbar { gap: 6px; padding: 0 12px; }
  .brand { margin-right: 6px; }
  .menu { gap: 1px; }
}
@media (max-width: 1020px) {
  .brand-text { display: none; }
  .inspector { width: 300px; flex-basis: 300px; }
}

/* ---- 节点连接（半铰）浮层 ---- */

.joint-pop { width: 252px; padding-bottom: 4px; }
.joint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.joint-row:hover { background: var(--c-soft); }
.joint-row .jr-name { font-weight: 700; font-size: 12.4px; }
.joint-row .jr-len { color: var(--c-muted); font-size: 11px; margin-left: 7px; }
.joint-row .tag {
  margin-left: auto;
  border: 1px solid #d7e0ee;
  background: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  transition: .12s;
}
.joint-row:hover .tag { border-color: var(--c-accent); color: var(--c-accent); }
.joint-row.hinged .tag { border-color: #fdba74; background: #fff7ed; }
.joint-hint {
  padding: 2px 10px 6px;
  font-size: 10.8px;
  color: var(--c-muted);
}
.joint-row.hinged .jr-name { color: #b45309; }
.joint-row.disabled { cursor: default; opacity: .75; }
.joint-row.disabled:hover { background: transparent; }

.pop-actions {
  display: flex;
  gap: 6px;
  padding: 7px 8px 2px;
  border-top: 1px solid var(--c-line);
  margin-top: 4px;
}
.pop-actions button {
  flex: 1;
  border: 1px solid var(--c-line-2);
  background: #fff;
  border-radius: 7px;
  padding: 6px 4px;
  font-size: 11.8px;
  cursor: pointer;
  color: #3c4f68;
}
.pop-actions button:hover { background: var(--c-soft); color: var(--c-accent); border-color: #c3d6f5; }
.pop-note { padding: 6px 10px 8px; font-size: 10.8px; color: var(--c-muted); }

.btn.hinge {
  background: #fff7ed;
  border-color: #fdba74;
  color: #b45309;
  font-weight: 700;
}
.btn.hinge:hover { background: #ffedd5; border-color: #fb923c; }



/* ---- 圆轴扭转补充 ---- */
.tbl td.left { text-align: left; }
a.tb { text-decoration: none; }

/* ---- 截面公式框 ---- */
.formula {
  margin-top: 10px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  background: #f8fafd;
  padding: 8px 10px;
}
.formula-h {
  font-size: 10.8px;
  color: var(--c-muted);
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: .2px;
}
.formula-l {
  font-size: 11.3px;
  color: #334155;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.formula-l.muted { color: #8b9bb0; margin-top: 4px; }

/* ================= 触屏 / 窄屏适配 ================= */

.canvas-host, #cv {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 平板竖屏 / 手机 */
@media (max-width: 900px) {
  .app { height: 100%; max-width: 100vw; overflow: hidden; }
  .topbar {
    height: auto;
    flex: 0 0 auto;
    flex-wrap: wrap;
    padding: 6px 8px;
    gap: 4px;
    min-width: 0;
  }
  .brand { margin-right: 2px; }
  .brand-text span { display: none; }
  .menu { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; }
  .menu::-webkit-scrollbar { display: none; }
  /* 「← 平面杆系」始终留着，手机上没有别的入口回主页面 */
  .menu > a.tb[href="index.html"] { display: inline-flex; }
  /* 顶栏是横向滚动容器，普通下拉会被裁掉：窄屏改成挂在顶栏下方的整条面板 */
  .menu-pop {
    position: fixed;
    left: 6px;
    right: 6px;
    top: 44px;              /* 打开时会由 mech-menu.js 按按钮位置微调 */
    min-width: 0;
    max-height: 62vh;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .3);
    z-index: 400;
  }
  /* 手机上顶栏矮，菜单项压成一行（名称 + 小字说明并排），5 项也不会超屏 */
  .menu-pop a, .menu-pop button { padding: 7px 12px; font-size: 12.8px; }
  .menu-pop a small, .menu-pop button small { display: inline; margin: 0 0 0 8px; font-size: 11px; }
  .model-name { display: none; }
  .btn.primary { padding: 0 12px; }
  .btn.primary kbd { display: none; }

  .body {
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    min-width: 0;
    min-height: 0;
  }
  .rail {
    width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    padding: 4px 6px;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .rail .tool { width: 52px; padding: 6px 2px 4px; }
  .rail .tool svg { width: 19px; height: 19px; }
  .rail .tool span { font-size: 9.5px; }
  .rail-sep { width: 1px; height: 34px; margin: 0 3px; flex: 0 0 1px; }

  .stage { flex: 1 1 auto; min-height: 220px; min-width: 0; }
  .stage-top { height: 40px; flex: 0 0 40px; gap: 6px; padding: 0 8px; min-width: 0; }

  .inspector {
    width: auto;
    flex: 0 0 38%;
    min-height: 130px;
    max-height: 44%;
  }
  .statusbar { gap: 10px; padding: 0 8px; font-size: 10.5px; }
}

/* 手机横屏：保持左右布局，缩小两侧 */
@media (max-width: 900px) and (orientation: landscape) {
  .body { flex-direction: row; }
  .rail {
    flex-direction: column;
    width: 62px;
    flex: 0 0 62px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .rail-sep { width: auto; height: 1px; margin: 3px 4px; }
  .inspector { flex: 0 0 270px; max-height: none; min-height: 0; }
  .stage { min-height: 0; }
}



/* ================= 叠加法作弯矩图 ================= */
.sup-overlay{position:fixed;inset:0;background:rgba(15,23,42,0.45);display:none;align-items:center;justify-content:center;z-index:200;padding:16px}
.sup-overlay.show{display:flex}
.sup-panel{background:#fff;border-radius:14px;box-shadow:0 24px 60px rgba(15,23,42,.35);width:min(1080px,96vw);height:min(680px,92vh);display:flex;flex-direction:column;overflow:hidden}
.sup-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid #e5eaf2;flex:none}
.sup-head b{font-size:14px}
.sup-sub{color:#8b9bb0;font-size:12px}
.sup-x{margin-left:auto;border:0;background:transparent;font-size:22px;line-height:1;cursor:pointer;color:#64748b}
.sup-body{flex:1;display:flex;min-height:0}
.sup-canvas{flex:1;min-width:0;padding:10px;min-height:0}
.sup-canvas canvas{display:block}
.sup-side{width:322px;border-left:1px solid #e5eaf2;display:flex;flex-direction:column;padding:12px;gap:10px;overflow:auto;flex:none}
.sup-steps{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex:none}
.sup-step{border:1px solid #dbe3ee;background:#fff;border-radius:8px;padding:7px 6px;font-size:12px;cursor:pointer;color:#334155}
.sup-step.on{background:#eef4ff;border-color:#bfd3f5;color:#1d4ed8;font-weight:600}
.sup-desc{font-size:12.5px;line-height:1.65;color:#334155}
.sup-desc p{margin:6px 0}
.sup-desc b{color:#0f172a}
.sup-val{display:flex;justify-content:space-between;gap:8px;font-size:12px;padding:4px 8px;background:#f7f9fc;border-radius:6px;margin:4px 0}
.sup-val span{color:#64748b}
.sup-val b{color:#0f172a}
.sup-note{color:#7c8ba0;font-size:11.5px}
.sup-nav{display:flex;gap:8px;margin-top:auto;flex:none}
.sup-nav .btn{flex:1}
.sup-tbl{font-size:11.5px;border:1px solid #e5eaf2;border-radius:8px;overflow:hidden;margin:6px 0}
.sup-tbl div{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr;padding:4px 6px;border-top:1px solid #eef2f7}
.sup-tbl .hd{background:#f7f9fc;color:#64748b;font-weight:600;border-top:0}
.sup-tbl span{text-align:right}
.sup-tbl span:first-child{text-align:left}
.sup-tbl .sum{color:#1d4ed8;font-weight:700}
@media (max-width:820px){
  .sup-body{flex-direction:column}
  .sup-side{width:auto;border-left:0;border-top:1px solid #e5eaf2}
  .sup-panel{height:94vh}
}

/* 叠加 / 截面法浮层里的按钮文字颜色（防止跟随主界面反色） */
.sup-nav .btn { flex: 1; color: #2b3a50; background: #fff; }
.sup-nav .btn.primary { color: #fff; background: linear-gradient(135deg, #3b82f6, #2563eb); }
.sup-nav .btn.primary:hover { background: linear-gradient(135deg, #2f74e8, #1d4ed8); }

/* 截面法浮层：左右段切换按钮 */
.sup-seg { display: flex; gap: 8px; margin-top: auto; flex: none; }
.sup-seg button {
  flex: 1; height: 36px; border: 1px solid #dbe3ee; background: #fff;
  border-radius: 9px; font-size: 12.8px; font-weight: 600; color: #2b3a50; cursor: pointer;
}
.sup-seg button:hover { border-color: #b9c8dd; background: #fafcff; }
.sup-seg button.on {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: #2563eb; color: #fff;
}

/* 截面法：位置输入 */
.sec-ctl { display: flex; flex-direction: column; gap: 8px; flex: none; }
.sec-ctl .field { margin: 0; }
.sec-ctl input[type="number"] { width: 100%; }
.sec-ctl input[type="range"] { width: 100%; }

/* 受力分析：杆件勾选列表 */
.fb-tools { display: flex; gap: 8px; flex: none; }
.fb-tools button {
  flex: 1; height: 30px; border: 1px solid #dbe3ee; background: #fff; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: #2b3a50; cursor: pointer;
}
.fb-tools button:hover { background: #fafcff; border-color: #b9c8dd; }
.fb-list { display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: auto; flex: none; }
.fb-item {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #2b3a50;
  padding: 5px 8px; border: 1px solid #e5eaf2; border-radius: 8px; cursor: pointer; background: #fff;
}
.fb-item:hover { background: #f7f9fc; }
.fb-item em { margin-left: auto; font-style: normal; color: #94a3b8; font-size: 11px; }
.fb-item input { accent-color: #2563eb; }

/* 开发者署名（固定在模型名左侧） */
.credit {
  flex: none;
  margin-right: 10px;
  padding: 0 10px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: linear-gradient(135deg, #f8fafc, #eef4ff);
  color: #3b6ea5;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
  user-select: none;
}

/* ---------- 三铰拱页 ---------- */
.ah-body { flex: 1; display: flex; min-height: 0; gap: 12px; padding: 12px; }
.ah-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.ah-left > .panel-toggle { position: absolute; top: 8px; right: 8px; margin: 0; }
.ah-left > canvas, .ah-diag-wrap {
  background: #fff; border: 1px solid #e5eaf2; border-radius: 12px;
}
.ah-diag-wrap { padding: 4px; }
.ah-side {
  width: 344px; flex: none; overflow: auto;
  display: flex; flex-direction: column; gap: 10px; padding-right: 2px;
}
.ah-side .card { background: #fff; border: 1px solid #e5eaf2; border-radius: 12px; }
.ah-side .card-h { padding: 9px 12px; font-size: 12.5px; font-weight: 700; color: #0f172a; border-bottom: 1px solid #eef2f7; }
.ah-side .card-b { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ah-side .field { margin: 0; }
.ah-side .field label { font-size: 11.5px; color: #64748b; }
.ah-side input[type="number"], .ah-side select {
  width: 100%; height: 32px; border: 1px solid #dbe3ee; border-radius: 8px;
  padding: 0 8px; font-size: 13px; color: #1f2937; background: #fff;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.kv span { color: #64748b; }
.kv b { color: #0f172a; font-variant-numeric: tabular-nums; }
.kv.muted span, .kv.muted b { color: #94a3b8; font-weight: 600; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #2b3a50; cursor: pointer; }
.chk input { accent-color: #2563eb; }
.formula {
  font-family: "Cambria Math", "Times New Roman", serif; font-size: 13px;
  color: #334155; background: #f7f9fc; border-radius: 8px; padding: 5px 9px;
}
@media (max-width: 980px) {
  .ah-body { flex-direction: column; }
  .ah-side { width: auto; max-height: 46vh; }
  .ah-left { min-height: 420px; }
}

.ah-side .card { flex: none; }

/* 三铰拱：两块画布在纵向 flex 中不压缩 */
.ah-left > canvas { flex: none; display: block; }
.ah-diag-wrap { flex: none; }
.ah-diag-wrap canvas { display: block; }

/* 三铰拱：防止 flex 因子项内容撑高而溢出视口 */
.ah-body { min-height: 0; overflow: hidden; }
.ah-left { min-height: 0; }
.ah-side { min-height: 0; }


/* 图中数字/单位字号调节 */
.fontctl {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  padding: 0 4px;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  background: #fff;
  flex: none;
}
.fontctl .fc-btn {
  height: 20px;
  min-width: 24px;
  padding: 0 4px;
  border: 0;
  border-radius: 6px;
  background: #f2f5fa;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.fontctl .fc-btn:hover { background: #e3ebf6; }
.fontctl .fc-btn:active { background: #d6e2f2; }
.fontctl .fc-val {
  min-width: 34px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* 结果表格里的小字附注（如应力出现的位置） */
.tbl .sx { display: block; font-size: 10px; color: #90a0b5; font-weight: 400; line-height: 1.2; }

/* 计算过程（结果页逐项代入） */
.calc-row { display: flex; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--c-line); align-items: flex-start; }
.calc-row:last-child { border-bottom: 0; }
.calc-row > b { flex: 0 0 34px; color: var(--c-accent); font-size: 12px; padding-top: 2px; }
.calc-box { flex: 1 1 auto; min-width: 0; }
.calc-box > div { font-size: 11.5px; line-height: 1.5; color: var(--c-text); word-break: break-word; font-variant-numeric: tabular-nums; }
.calc-para { color: var(--c-muted) !important; font-size: 11px !important; }

/* 支座反力求解过程：方程行、分步小标题 */
.calc-eq {
  display: block; margin: 3px 0 3px;
  padding: 4px 8px; border-radius: 6px;
  background: #f5f9ff; border: 1px solid #e2ebf8;
  color: #0f172a !important; font-size: 12px !important;
  font-variant-numeric: tabular-nums; white-space: normal;
}
.calc-eq sub { font-size: 9.5px; }
.calc-step-h {
  margin: 10px 0 2px; padding-top: 6px;
  font-size: 11.5px; font-weight: 700; color: var(--c-accent);
  border-top: 1px solid var(--c-line);
}
.calc-box sub { font-size: 9.5px; }

/* ---------- 符号内力图 ---------- */

/* =========================================================================
   三维实体 · 应力 / 变形云图（solid3d.html）
   ========================================================================= */

.canvas-host#host { cursor: grab; }
.canvas-host#host:active { cursor: grabbing; }

.s3-hint {
  position: absolute;
  left: 14px;
  top: 12px;
  padding: 4px 9px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
  color: #8b9bb0;
  font-size: 11.5px;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* 云图图例（色标） */
.legend {
  position: absolute;
  right: 16px;
  bottom: 18px;
  width: 174px;
  padding: 9px 10px 8px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  user-select: none;
}
.legend.hidden { display: none; }
.legend .lg-title { font-size: 11.5px; font-weight: 600; color: #41546e; text-align: center; margin-bottom: 7px; }
.legend .lg-body { display: flex; gap: 8px; height: 156px; }
.legend .lg-bar { width: 18px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(20, 40, 70, .12); }
.legend .lg-ticks {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10.5px;
  color: #5b6d86;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.legend .lg-note { margin-top: 7px; font-size: 9.5px; color: #8b9bb0; text-align: center; line-height: 1.5; }

/* 杆件表：选中行 */
.tbl tbody tr.on td { background: var(--c-soft); color: var(--c-accent); font-weight: 600; }
.tbl tbody tr[data-member] { cursor: pointer; }

/* 变形放大滑块 */
input[type="range"] { width: 100%; accent-color: var(--c-accent); }

@media (orientation: landscape) and (max-height: 520px) {
  .s3-hint { display: none; }
  .legend { width: 118px; padding: 5px 7px; right: 10px; bottom: 12px; }
  .legend .lg-title { font-size: 9.5px; margin-bottom: 4px; }
  .legend .lg-body { height: 84px; gap: 6px; }
  .legend .lg-bar { width: 12px; }
  .legend .lg-ticks { font-size: 8.5px; }
  .legend .lg-note { font-size: 8px; margin-top: 3px; }
}

/* =========================================================================
 * 截面几何性质（geoprops）— 结果条 + 求值过程块
 * ========================================================================= */

.gp-bar {
  height: 42px;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-bottom: 1px solid var(--c-line);
  background: linear-gradient(180deg, #fbfdff, #f6f9fe);
  overflow-x: auto;
  scrollbar-width: none;
}
.gp-bar::-webkit-scrollbar { display: none; }
.gp-bar-label {
  font-size: 11.4px;
  font-weight: 700;
  color: #8b9bb0;
  letter-spacing: .3px;
  margin-right: 2px;
  flex: 0 0 auto;
}
.gp-btn {
  height: 28px;
  flex: 0 0 auto;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--c-line-2);
  border-radius: 8px;
  background: #fff;
  color: #3c4d63;
  font-size: 12.2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.gp-btn svg { width: 14px; height: 14px; }
.gp-btn:hover { border-color: #b9c8dd; background: #fafcff; color: var(--c-accent); }
.gp-btn.on {
  background: #eaf1ff;
  border-color: var(--c-accent);
  color: var(--c-accent-2);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .2);
}
.gp-btn:disabled { opacity: .42; cursor: default; }
.gp-btn:disabled:hover { border-color: var(--c-line-2); background: #fff; color: #3c4d63; }
.gp-btn:disabled.on { opacity: .5; }
.gp-bar-hint {
  font-size: 11.2px;
  color: #9aa9bd;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* 求值过程块 */
.gp-step {
  border: 1px solid var(--c-line);
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}
.gp-step:last-of-type { margin-bottom: 0; }
.gp-step.on {
  border-color: #bcd4ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .07);
}
.gp-step-h {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: #fbfdff;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font-size: 12.3px;
  font-weight: 600;
  color: #2b3a50;
}
.gp-step.on .gp-step-h { border-bottom: 1px solid var(--c-line); background: #f6faff; }
.gp-step-h:hover { color: var(--c-accent); }
.gp-step-h .grow { flex: 1; }
.gp-step-h b {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #16233a;
  font-size: 11.6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58%;
}
.gp-step-b { padding: 8px 11px 10px; display: none; }
.gp-step.on .gp-step-b { display: block; }

.gp-sect {
  font-size: 10.6px;
  font-weight: 700;
  color: #8b9bb0;
  letter-spacing: .3px;
  margin: 8px 0 2px;
}
.gp-sect:first-child { margin-top: 0; }

.gp-kv {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3.5px 0;
  font-size: 12.1px;
  border-bottom: 1px dashed #f1f5fa;
}
.gp-kv:last-child { border-bottom: 0; }
.gp-kv span {
  color: var(--c-muted);
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Consolas", "SFMono-Regular", monospace;
  font-size: 11.4px;
  word-break: break-word;
}
.gp-kv b {
  font-variant-numeric: tabular-nums;
  color: #16233a;
  font-weight: 600;
  white-space: nowrap;
}
.gp-kv.big b { font-size: 13.4px; color: var(--c-accent-2); }

.gp-note {
  font-size: 11.3px;
  color: var(--c-muted);
  line-height: 1.65;
  margin-top: 6px;
}
.gp-mini {
  display: block;
  font-family: ui-monospace, "Consolas", monospace;
  font-size: 11.2px;
  color: #41546e;
  background: #f6f9fe;
  border: 1px solid #eaf1fa;
  border-radius: 6px;
  padding: 5px 8px;
  margin-top: 6px;
  line-height: 1.55;
}

@media (orientation: landscape) and (max-height: 560px) {
  .gp-bar { height: 34px; flex: 0 0 34px; gap: 4px; padding: 0 8px; }
  .gp-btn { height: 24px; padding: 0 8px; font-size: 11.2px; }
  .gp-btn svg { width: 12px; height: 12px; }
  .gp-bar-hint, .gp-bar-label { display: none; }
}

/* 截面几何性质：窄屏下结果卡改成单列，避免数字被裁 */
.gp-stats .stat b { font-size: 14.4px; }
@media (max-width: 1100px) {
  .gp-stats { grid-template-columns: 1fr; }
}

/* 网格步长这种小分段按钮，选中态要看得出来 */
.seg.small[data-k] button.on {
  background: #eaf1ff;
  color: var(--c-accent-2);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .28);
}
