/* ==========================================================================
   店策 StoreOps · 产品界面（双端）
   规则：产品内必须安静。卡片靠线分组，阴影只给抽屉与浮层。
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-13);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 3px;
}

img {
  display: block;
  max-width: 100%;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   1. 桌面壳体
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  height: 100vh;
  min-width: 1180px;
  overflow: hidden;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 12px 14px;
  background: var(--sand);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.side__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px 14px;
}

.side__brand svg {
  flex: none;
  border-radius: 7px;
}

.side__brand b {
  display: block;
  font-size: var(--fs-13);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.side__brand i {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: 1px;
}

.side__grp {
  padding: 12px 8px 5px;
  font-size: var(--fs-11);
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

.side__grp:first-of-type {
  padding-top: 6px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--r-s);
  font-size: var(--fs-12);
  color: var(--ink-2);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav svg {
  flex: none;
  opacity: 0.75;
}

.nav:hover {
  background: rgba(14, 91, 69, 0.06);
  color: var(--ink);
}

.nav.is-on {
  background: var(--card);
  color: var(--brand);
  font-weight: 500;
  box-shadow: var(--shadow-1);
}

.nav.is-on svg {
  opacity: 1;
}

.nav__badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--amber-ink);
  background: var(--amber-soft);
  border-radius: 3px;
  padding: 1px 5px;
}

.side__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 0;
  border-top: 1px solid var(--line);
}

.side__foot .who b {
  display: block;
  font-size: var(--fs-11);
  font-weight: 500;
}

.side__foot .who i {
  display: block;
  font-style: normal;
  font-size: 9px;
  color: var(--ink-3);
}

/* 真实人像头像：52px 源图渲染在 26px 里，圆形裁切 */
.ava {
  width: 28px;
  height: 28px;
  flex: none;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 42%;
  background: var(--brand-soft);
  box-shadow: 0 0 0 1px rgba(12, 40, 32, 0.09);
  -webkit-user-drag: none;
  user-select: none;
}

/* ---------- 主区 ---------- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-11);
  color: var(--ink-3);
}

.crumb b {
  color: var(--ink);
  font-weight: 500;
}

.crumb svg {
  opacity: 0.5;
}

.topbar__r {
  display: flex;
  align-items: center;
  gap: 14px;
}

.find {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 208px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--ink-4);
  font-size: var(--fs-11);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-s);
  color: var(--ink-2);
  position: relative;
}

.icon-btn:hover {
  background: var(--sand);
}

.icon-btn i {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brick);
}

.content {
  padding: clamp(14px, 2.44vh, 24px) 24px;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ==========================================================================
   2. 页头 / 标题
   ========================================================================== */

.page-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(10px, 2vh, 20px);
}

.page-hd h1 {
  font-size: var(--fs-22);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-hd .sub {
  margin-top: 5px;
  font-size: var(--fs-11);
  color: var(--ink-3);
}

.page-hd .sub b {
  color: var(--ink-2);
  font-weight: 500;
}

.hd-acts {
  display: flex;
  gap: 8px;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-s);
  border: 1px solid var(--line-2);
  background: var(--card);
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--ink);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn:hover {
  background: var(--sand);
}

.btn--pri {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn--pri:hover {
  background: var(--brand-ink);
}

.btn--quiet {
  border-color: transparent;
  background: none;
  color: var(--brand);
}

/* ==========================================================================
   3. 卡片 / 指标
   ========================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.card__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: clamp(38px, 4.89vh, 46px);
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.card__hd h2 {
  font-size: var(--fs-13);
  font-weight: 600;
}

.card__hd .meta {
  font-size: var(--fs-11);
  color: var(--ink-3);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(10px, 2vh, 20px);
}

.kpi {
  padding: clamp(10px, 1.56vh, 15px) 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.kpi:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-1);
}

.kpi .k {
  font-size: var(--fs-11);
  color: var(--ink-3);
}

.kpi .v {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 3px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.kpi .v small {
  font-size: var(--fs-11);
  font-weight: 400;
  color: var(--ink-3);
  font-family: var(--sans);
}

.kpi .n {
  margin-top: 4px;
  font-size: 10px;
  color: var(--ink-4);
  line-height: 1.45;
}

.kpi.is-warn .v {
  color: var(--amber-ink);
}

.kpi.is-down .v {
  color: var(--brick);
}

/* ==========================================================================
   4. 表格
   ========================================================================== */

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-12);
}

.tbl th {
  height: 38px;
  padding: 0 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.035em;
  color: var(--ink-3);
  background: #faf9f5;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

.tbl td {
  height: clamp(38px, 5.33vh, 50px);
  padding: 0 14px;
  border-bottom: 1px solid #f1eee7;
  vertical-align: middle;
}

.tbl tr:last-child td {
  border-bottom: 0;
}

.tbl tbody tr {
  transition: background var(--dur) var(--ease);
}

.tbl tbody tr:hover {
  background: #f7faf8;
}

.tbl tbody tr[data-href] {
  cursor: pointer;
}

.tbl .name {
  font-weight: 500;
  color: var(--ink);
}

.tbl .name i {
  display: block;
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-4);
  margin-top: 1px;
}

.tbl .r {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.tbl .muted {
  color: var(--ink-3);
}

.tbl__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-11);
  color: var(--ink-3);
}

/* ---------- 状态：小圆点 + 11px 文字（不用彩色徽标） ---------- */

.st {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
}

.st::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
  flex: none;
  box-shadow: 0 0 0 2.5px rgba(23, 26, 23, 0.07);
}

.st--on::before {
  background: var(--brand-2);
  box-shadow: 0 0 0 2.5px rgba(23, 128, 109, 0.14);
}

.st--warn::before {
  background: var(--amber);
  box-shadow: 0 0 0 2.5px rgba(180, 120, 42, 0.14);
}

.st--off::before {
  background: var(--line-2);
}

.st--bad::before {
  background: var(--brick);
  box-shadow: 0 0 0 2.5px rgba(168, 74, 54, 0.14);
}

.st--off {
  color: var(--ink-4);
}

/* ---------- 标签：只在少数地方 ---------- */

.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--mono);
  background: var(--sand);
  color: var(--ink-2);
  white-space: nowrap;
}

.tag--brand {
  background: var(--brand-soft);
  color: var(--brand);
}

.tag--warn {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.tag--bad {
  background: var(--brick-soft);
  color: var(--brick-2);
}

/* ==========================================================================
   5. 对话（手机端 + 桌面端共用）
   ========================================================================== */

.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.bubble {
  align-self: flex-end;
  max-width: 78%;
  padding: 9px 13px;
  border-radius: var(--r-l) var(--r-l) 4px var(--r-l);
  background: var(--brand);
  color: #fff;
  font-size: var(--fs-13);
  line-height: 1.55;
}

.ans {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ans__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--ink-4);
}

.ans__hd b {
  color: var(--brand);
  font-weight: 500;
}

.ans__body {
  font-size: var(--fs-13);
  line-height: 1.62;
}

.ans__warn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: var(--r-s);
  background: var(--amber-soft);
  color: var(--amber-ink);
  font-size: 11px;
  font-weight: 500;
}

.conds {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cond {
  padding: 2px 7px;
  border-radius: var(--r-s);
  background: var(--brand-soft-2);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 500;
}

.cond--warn {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

/* ---------- 出处块（本产品的核心元件） ---------- */

.cite {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--paper);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.cite:hover {
  border-color: var(--line-2);
  background: #fff;
}

.cite.is-open {
  border-color: var(--brand);
  background: var(--brand-soft-2);
}

.cite__src {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.cite__src b {
  color: var(--brand);
  font-weight: 500;
}

.cite__act {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 10px;
}

.cite__act span {
  color: var(--brand);
  font-weight: 500;
}

.cite__act em {
  font-style: normal;
  color: var(--ink-4);
}

.chips-sug {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-sug {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  font-size: 10.5px;
  color: var(--ink-2);
  transition: border-color var(--dur) var(--ease);
}

.chip-sug:hover {
  border-color: var(--brand-2);
  color: var(--brand);
}

/* ==========================================================================
   6. 手机端壳体
   ========================================================================== */

.phone {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--paper);
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

.stat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
}

.stat-bar__r {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ph-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px 10px;
}

.ph-hd__t b {
  display: block;
  font-size: var(--fs-17);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ph-hd__t i {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 1px;
}

.ctx-bar {
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--line);
}

.ctx {
  padding: 3px 8px;
  border-radius: var(--r-s);
  font-size: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.ctx--quiet {
  background: var(--sand);
  color: var(--ink-3);
  font-weight: 400;
}

.chat--phone {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.composer {
  border-top: 1px solid var(--line);
  padding: 10px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.composer__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 42px;
  padding: 0 6px 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
}

.composer__box span {
  font-size: 11.5px;
  color: var(--ink-4);
}

.composer__send {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  flex: none;
}

.composer__note {
  text-align: center;
  font-size: 9.5px;
  color: var(--ink-4);
}

/* ==========================================================================
   7. 抽屉 / 条款 / 差异
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 428px) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.split__l {
  border-right: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.split__r {
  background: var(--card);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.dw-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
}

.dw-hd .k {
  font-size: 10px;
  color: var(--ink-4);
}

.dw-hd h2 {
  font-size: var(--fs-17);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.dw-meta {
  display: flex;
  gap: 14px;
  padding: 9px 20px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--ink-3);
}

.dw-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-s);
  background: var(--sand-2);
}

.seg button {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.seg button[aria-pressed="true"] {
  background: var(--card);
  color: var(--brand);
  font-weight: 500;
  box-shadow: var(--shadow-1);
}

.dw-body {
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
}

/* 条款卡：左竖条用内嵌边框实现，不用 fill 高度的子元素 */
.clause {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-s);
  background: var(--brand-soft-2);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.clause--ref {
  border-left-color: var(--line-2);
  background: var(--paper);
}

.clause__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clause__no {
  font-size: 11.5px;
  font-weight: 600;
}

.clause__body {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.85;
  color: #3d3a33;
}

.clause__body .hit {
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 -0.55em 0 rgba(14, 91, 69, 0.1);
}

/* 修订对比 */
.diff {
  border: 1px solid #f0e0c6;
  border-radius: var(--r-s);
  background: var(--amber-soft);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diff__hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
  color: var(--amber-ink);
  font-weight: 500;
}

.diff__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
}

.diff__row .v {
  font-family: var(--mono);
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink-2);
  flex: none;
}

.diff__row.is-old {
  color: var(--ink-3);
}

.diff__row.is-old .t {
  text-decoration: line-through;
  text-decoration-color: rgba(138, 90, 22, 0.4);
}

.diff__row.is-new {
  color: var(--ink);
  font-weight: 500;
}

/* 判断路径 */
.path {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.path .k {
  font-size: 10px;
  color: var(--ink-4);
}

.path__step {
  display: flex;
  gap: 8px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-2);
}

.path__step i {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--mono);
  font-size: 8.5px;
  font-style: normal;
  margin-top: 1px;
}

.path__step:last-child i {
  background: var(--brand);
  color: #fff;
}

.dw-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--ink-3);
}

/* ==========================================================================
   8. 条形图（手写，不引图表库）
   ========================================================================== */

.bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
}

.bars__hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-3);
}

.bar {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.bar__n {
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar__t {
  height: 11px;
  border-radius: 2px;
  background: #f1eee6;
  overflow: hidden;
}

.bar__f {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--brick);
  transform-origin: left;
  animation: bar-in 620ms var(--ease) both;
}

.bar--top .bar__f {
  background: var(--brick-2);
}

.bar__v {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--brick);
}

.bar--top .bar__v,
.bar--top .bar__n {
  color: var(--brick-2);
  font-weight: 500;
}

@keyframes bar-in {
  from {
    transform: scaleX(0.02);
  }
}

/* 口径条 */
.caliber {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--paper);
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

.caliber b {
  color: var(--brand);
  font-weight: 500;
  flex: none;
}

/* ==========================================================================
   9. 指标字典（左列表 + 右详情）
   ========================================================================== */

.dict {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.dict__list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
}

.dict__list > .hd {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 10px;
  color: var(--ink-4);
  border-bottom: 1px solid var(--line);
}

.dict__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: var(--fs-12);
  color: var(--ink-2);
  border-bottom: 1px solid #f2efe8;
}

.dict__item:last-child {
  border-bottom: 0;
}

.dict__item:hover {
  background: #fdfcf9;
}

.dict__item.is-on {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}

.dict__item em {
  font-style: normal;
  font-size: 10px;
  color: var(--ink-4);
}

.dict__item.is-on em {
  color: var(--brand-2);
}

.dict__item em.warn {
  color: var(--amber-ink);
}

.def {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
}

.def__hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--line);
}

.def__hd h2 {
  font-size: var(--fs-17);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.def__hd .sub {
  margin-top: 3px;
  font-size: 10px;
  color: var(--ink-4);
}

.def__body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blk__k {
  font-size: 10px;
  color: var(--ink-4);
  margin-bottom: 6px;
}

.def__text {
  font-size: var(--fs-12);
  line-height: 1.7;
  color: var(--ink-2);
}

.formula {
  padding: 11px 13px;
  border-radius: var(--r-s);
  background: var(--sand);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
}

.formula b {
  font-weight: 600;
}

.formula .ex {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.confuse {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.confuse__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: var(--paper);
}

.confuse__row.is-on {
  border-color: rgba(14, 91, 69, 0.25);
  background: var(--brand-soft-2);
}

.confuse__row.is-clash {
  border-color: #f0e0c6;
  background: var(--amber-soft);
}

.confuse__row b {
  font-size: 11px;
  font-weight: 500;
}

.confuse__row i {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 1px;
}

.confuse__row em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  flex: none;
}

/* 时间轴 */
.tl {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tl__row {
  display: flex;
  gap: 9px;
}

.tl__dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--line-2);
}

.tl__row.is-on .tl__dot {
  background: var(--brand);
}

.tl__row b {
  display: block;
  font-size: 11px;
  font-weight: 500;
}

.tl__row i {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 1px;
}

/* ==========================================================================
   10. 对比卡（订货建议）
   ========================================================================== */

.cmp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.cmp__side {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmp__side.is-pick {
  border-color: rgba(14, 91, 69, 0.28);
  background: var(--brand-soft-2);
}

.cmp__k {
  font-size: 10px;
  color: var(--ink-3);
}

.cmp__v {
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.cmp__side.is-pick .cmp__v {
  color: var(--brand);
}

.cmp__why {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.cmp__mid {
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 10px;
  line-height: 1.45;
  color: var(--amber-ink);
  font-weight: 500;
}

.rule-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rule {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  font-size: 10.5px;
  color: var(--ink-2);
}

.rule b {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
}

.rule--warn {
  border-color: #f0e0c6;
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.rule--warn b {
  color: var(--amber-ink);
}

.note {
  padding: 8px 11px;
  border-radius: var(--r-s);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.note b {
  font-weight: 500;
}

/* ==========================================================================
   11. 工作台（首页）
   ========================================================================== */

.hello {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(10px, 1.78vh, 18px);
}

.hello h1 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hello p {
  margin-top: 6px;
  font-size: var(--fs-12);
  color: var(--ink-3);
}

.hello p b {
  color: var(--ink);
  font-weight: 500;
}

.hello .date {
  font-size: var(--fs-11);
  color: var(--ink-4);
  font-family: var(--mono);
  flex: none;
}

.mods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: clamp(8px, 1.33vh, 14px);
}

.mod {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 17px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.mod:hover {
  border-color: var(--brand-2);
  transform: translateY(-1px);
}

.mod__i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}

.mod h2 {
  font-size: var(--fs-14);
  font-weight: 600;
}

.mod p {
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.mod__n {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mod__n small {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-3);
}

.mod__go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--brand);
}

.mod__go::after {
  content: "→";
  font-size: 11px;
  opacity: 0.7;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.mod:hover .mod__go::after {
  opacity: 1;
  transform: translateX(3px);
}

/* 待办 */
.todo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(7px, 1.11vh, 11px) 16px;
  border-bottom: 1px solid #f2efe8;
  transition: background var(--dur) var(--ease);
}

.todo:hover {
  background: #fdfcf9;
}

.todo:last-child {
  border-bottom: 0;
}

.todo__t {
  font-size: var(--fs-12);
  font-weight: 500;
  color: var(--ink);
}

.todo__m {
  font-size: 10px;
  color: var(--ink-4);
  margin-top: 1px;
}

.todo__m em {
  font-style: normal;
  color: var(--amber-ink);
}

.todo__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.todo:hover .todo__go {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ==========================================================================
   12. 动效（只做进入与状态，不循环）
   ========================================================================== */

.fade {
  animation: fade-in 240ms var(--ease) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.ans.is-new {
  animation: ans-in 260ms var(--ease) both;
}

@keyframes ans-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* ==========================================================================
   13. 断点
   ========================================================================== */

@media (max-width: 1279px) {
  .app {
    grid-template-columns: 208px minmax(0, 1fr);
    min-width: 0;
  }

  .content {
    padding: 18px;
  }

  .dict {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 1023px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mods {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .split__l {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dict {
    grid-template-columns: 1fr;
  }

  .cmp {
    grid-template-columns: 1fr;
  }

  .cmp__mid {
    padding: 4px 0;
  }
}

/* ---------- 补充：待办两行、演示说明、窄版对话列 ---------- */
.todo__main { display: flex; flex-direction: column; gap: 1px; }
.todo__t { display: block; }
.todo__m { display: block; }

.demo-note { margin-top: 10px; font-size: 10px; line-height: 1.7; color: var(--ink-4); }

.narrow { max-width: 860px; }

.ask-stats { display: flex; gap: 28px; padding: 2px 0 2px; }
.ask-stats > div { display: flex; flex-direction: column; gap: 1px; }
.ask-stats .k { font-size: 10px; color: var(--ink-3); }
.ask-stats .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 600; }
.ask-stats .v.down { color: var(--brick); }

/* ==========================================================================
   工作台 · 两栏（待办 + 右侧节奏/活动）
   ========================================================================== */

.wb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 302px;
  gap: 14px;
  align-items: start;
}

.wb-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 让右栏末卡吃满剩余高度，与左栏底边对齐 */
.wb-side > .card:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wb-side > .card:last-child .flow {
  flex: 1;
  justify-content: space-evenly;
}

/* 今日节奏：像门店值班表，不是一个图表 */
.rhythm {
  padding: 4px 16px 10px;
}

.rhythm__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(5px, 0.89vh, 9px) 0;
  border-bottom: 1px dashed #efece4;
}

.rhythm__row:last-child {
  border-bottom: 0;
}

.rhythm__t {
  flex: none;
  width: 40px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--ink-3);
}

.rhythm__n {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-11);
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rhythm__s {
  flex: none;
  font-size: 10px;
  color: var(--ink-4);
}

.rhythm__row.is-now {
  margin: 0 -16px;
  padding: 8px 16px;
  background: var(--brand-soft-2);
}

.rhythm__row.is-now .rhythm__n,
.rhythm__row.is-now .rhythm__t {
  color: var(--brand);
  font-weight: 500;
}

.rhythm__row.is-now .rhythm__s {
  color: var(--brand-2);
}

.rhythm__row.is-done .rhythm__n {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}

/* 最近活动：谁知道、什么时候、改了什么 */
.flow {
  padding: 10px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flow__row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 10px;
  padding: clamp(4px, 0.78vh, 8px) 0;
}

.flow__dot {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--line-2);
  box-shadow: 0 0 0 2.5px rgba(23, 26, 23, 0.05);
}

.flow__row.is-key .flow__dot {
  background: var(--ink-4);
  box-shadow: none;
}

.flow__row.is-warn .flow__dot {
  background: var(--amber);
  box-shadow: 0 0 0 2.5px rgba(180, 120, 42, 0.14);
}

.flow__b {
  display: block;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-2);
}

.flow__b b {
  font-weight: 500;
  color: var(--ink);
}

.flow__m {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   店长问数 · 对话 + 查询依据
   ========================================================================== */

.q-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 14px;
  align-items: start;
}

/* 左栏 = 答复卡 + 追问入口，追问紧跟卡片而不是漂在栅格下方 */
.q-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.q-again {
  display: flex;
  align-items: center;
  gap: 10px;
}

.q-again span {
  font-size: 10px;
  color: var(--ink-4);
}

.q-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 依据清单：标签右对齐成两列，像一份查询凭证 */
.proof {
  padding: 8px 16px 14px;
}

.proof__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #efece4;
  font-size: 10.5px;
  line-height: 1.6;
}

.proof__row:last-child {
  border-bottom: 0;
}

.proof__k {
  color: var(--ink-4);
}

.proof__v {
  color: var(--ink-2);
}

.proof__v b {
  font-weight: 500;
  color: var(--ink);
}

.proof__v em {
  font-style: normal;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

/* 耗时分解：一条细横条，三段 */
.cost {
  display: flex;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 6px;
}

.cost i {
  display: block;
  height: 100%;
}

.cost i:nth-child(1) { background: var(--brand-2); }
.cost i:nth-child(2) { background: #7aa898; }
.cost i:nth-child(3) { background: #c3d6ce; }

.cost-legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--ink-4);
}

.cost-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cost-legend i {
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
}

/* 明细折叠：图表已经回答了问题，明细默认收起 */
.fold {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.fold > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0 8px;
  cursor: pointer;
  list-style: none;
}

.fold > summary::-webkit-details-marker {
  display: none;
}

.fold > summary b {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  transition: color var(--dur) var(--ease);
}

.fold > summary:hover b {
  color: var(--brand);
}

.fold > summary span {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-4);
}

.fold > summary i {
  flex: none;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
}

.fold > summary i::before {
  content: "";
  width: 4.5px;
  height: 4.5px;
  border-right: 1.4px solid var(--ink-3);
  border-bottom: 1.4px solid var(--ink-3);
  transform: rotate(45deg) translate(-1px, -1.5px);
  transition: transform var(--dur) var(--ease);
}

.fold[open] > summary i::before {
  transform: rotate(225deg) translate(-1px, -1.5px);
}

.fold > table {
  margin-top: 2px;
}

/* 相关报表 */
.rpts {
  padding: 6px 0 10px;
}

.rpts a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--ink-2);
  transition: background var(--dur) var(--ease);
}

.rpts a:hover {
  background: #f7faf8;
}

.rpts a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rpts a em {
  flex: none;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}

/* 小号表格：嵌在回答卡内部 */
.tbl--mini {
  font-size: 11px;
}

.tbl--mini th {
  height: 30px;
  font-size: 9.5px;
  background: none;
  border-bottom: 1px solid var(--line);
}

.tbl--mini td {
  height: 33px;
  border-bottom: 1px solid #f4f1ea;
}

.tbl--mini tbody tr:last-child td {
  border-bottom: 0;
}

.mini-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 -2px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.mini-hd b {
  font-weight: 500;
  color: var(--ink-2);
}

/* 紧凑表格：10 行以上的列表用 */
.tbl--dense td {
  height: clamp(36px, 5vh, 46px);
}

.tbl--dense th {
  height: 36px;
}

/* ---------- 溯源页：会话小结与引用记录 ---------- */

.conv-note {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  background: #fbfaf7;
  font-size: 10px;
  color: var(--ink-4);
}

.conv-note b {
  font-weight: 500;
  color: var(--ink-3);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* 引用记录：这条条款被谁问过 */
.dw-ref {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.dw-ref .k {
  display: block;
  margin-bottom: 8px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-4);
}

.dw-ref__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 10.5px;
  color: var(--ink-2);
}

.dw-ref__row em {
  flex: none;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}

/* 溯源页：对话区吃满剩余高度，让会话小结贴到底部 */
.split__l > .chat {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* ==========================================================================
   权限矩阵 · 岗位 × 章节
   ========================================================================== */

/* 单元格里的三态标记：可读 / 仅摘要 / 不可见 */
.perm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

.perm i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
  flex: none;
}

.perm--on {
  color: var(--ink-2);
}

.perm--on i {
  background: var(--brand-2);
  box-shadow: 0 0 0 2.5px rgba(23, 128, 109, 0.14);
}

.perm--part {
  color: var(--amber-ink);
}

.perm--part i {
  background: var(--amber);
  box-shadow: 0 0 0 2.5px rgba(180, 120, 42, 0.14);
}

/* 受控行（第 7、8 章）整行轻微示警 */
.perm-row--gated td {
  background: #fdfbf6;
}

.perm-row--gated:hover td {
  background: #faf6ec;
}

/* 章节名右侧的条数 */
.tbl .ch i {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 400;
  color: var(--ink-4);
}

/* 图例 */
.perm-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  height: 34px;
  border-bottom: 1px solid var(--line);
  background: #fdfcf9;
  font-size: 10px;
  color: var(--ink-4);
}

.perm-legend .perm {
  font-size: 10px;
}

/* 越权请求：三张并排 */
.deny-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.deny {
  padding: 13px 15px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 2px solid var(--amber);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  transition: box-shadow var(--dur) var(--ease);
}

.deny:hover {
  box-shadow: var(--shadow-1);
}

.deny__who {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-4);
}

.deny__who b {
  font-weight: 500;
  color: var(--ink-2);
}

.deny__q {
  margin: 6px 0 7px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink);
}

.deny__why {
  font-size: 10px;
  line-height: 1.6;
  color: var(--ink-3);
}

.deny__why em {
  font-style: normal;
  color: var(--amber-ink);
  font-weight: 500;
}

.deny--ok {
  border-left-color: var(--brand-2);
}

/* 权限矩阵页专用收紧 */
.tbl--tight td {
  height: clamp(34px, 4.67vh, 44px);
}

.perm-legend {
  height: 30px;
}

.deny-row {
  margin-top: 12px;
}

.deny {
  padding: 11px 14px 12px;
}

.deny__q {
  margin: 4px 0 6px;
}

/* ---------- 顶栏返回：回到演示首页（门面） ---------- */
.crumb .back {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-left: -9px;
  margin-right: 3px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  font-size: var(--fs-11);
  line-height: 1;
  white-space: nowrap;
  flex: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.crumb .back:hover {
  background: var(--sand);
  color: var(--ink);
}

.crumb .back:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 1px;
}

/* ---------- 轻量 tooltip：替代原生 title，悬停即现、文案更明确 ---------- */
.tip {
  position: relative;
}

.tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  padding: 6px 9px 7px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 90;
  transform: translate(-50%, -3px);
  box-shadow: 0 10px 22px -8px rgba(11, 20, 16, 0.55);
  transition: opacity 120ms var(--ease), transform 120ms var(--ease),
    visibility 120ms;
}

.tip:hover::after,
.tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* 贴左边界的元素（如返回键）左对齐，避免提示被视口裁掉 */
.tip--l::after {
  left: 0;
  transform: translate(0, -3px);
}

.tip--l:hover::after,
.tip--l:focus-visible::after {
  transform: translate(0, 0);
}

/* ---------- 手机端页头返回 ---------- */
.ph-hd__l {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ph-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  border-radius: 8px;
  color: var(--ink-3);
  flex: none;
}

.ph-back:hover {
  background: var(--sand);
  color: var(--ink);
}

/* 侧栏环境标识：数据声明常驻可见，不占主内容高度 */
.side__env {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: auto 6px 0;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(180, 120, 42, 0.09);
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--amber-ink);
  letter-spacing: 0.01em;
}

.side__env i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
  box-shadow: 0 0 0 2px rgba(180, 120, 42, 0.12);
}

/* 环境标识负责贴底，用户区紧随其后 */
.side__foot {
  margin-top: 6px;
}

/* ==========================================================================
   演示流程：顶栏进度 + 上一步/下一步
   ========================================================================== */

.tour {
  display: flex;
  align-items: center;
  gap: 1px;
  height: 28px;
  padding: 0 3px;
  margin-right: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  flex: none;
}

.tour__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  border-radius: 5px;
  color: var(--ink-3);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.tour__step:hover {
  background: var(--sand);
  color: var(--ink);
}

.tour__step.is-off {
  opacity: 0.32;
  pointer-events: none;
}

.tour__n {
  padding: 0 5px;
  font-size: 10.5px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tour__n b {
  color: var(--ink-2);
  font-weight: 500;
}

/* 最后一屏的收尾按钮 */
.tour--end {
  border-color: transparent;
  background: none;
  padding: 0;
  gap: 6px;
}

.tour__done {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  transition: background var(--dur) var(--ease);
}

.tour__done:hover {
  background: var(--brand-ink);
}

/* ---------- 手机端：一条细进度条 ---------- */
.tour-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 26px;
  margin: 0 16px 2px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--sand);
  font-size: 9.5px;
  color: var(--ink-3);
  flex: none;
}

.tour-bar__n {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.tour-bar__next {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--brand);
  font-weight: 500;
}

.tour-bar__next:hover {
  color: var(--brand-ink);
}

/* 手机端：下一屏放在状态栏空白处，不占布局高度 */
/* 演示控件：手机端做成底部演示条，不再侵占 iOS 状态栏 */
.demo-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 26px;
  padding: 0 14px;
  background: var(--sand);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-4);
}

.stat-next {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--brand);
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.stat-next:hover {
  color: var(--brand-ink);
  transform: translateX(2px);
}

/* ---------- 商品缩略图（效期 / 订货单） ---------- */
.sku {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sku__i {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(23, 26, 23, 0.05);
}

/* 名称旁的副信息（SKU / 库存）继续换行 */
.sku__t {
  min-width: 0;
}

.sku__t i {
  display: block;
}
