/* 价策 · 鞋类行情与调价台
   视觉体系：纸质编辑 + 粗野主义
   纸 #FBF7F0 / 墨 #14110E / 柿橙 #E2542C / 芥末黄 #F2C14E
   所有容器 2px 实线黑边、零圆角、4px 硬阴影；分隔一律 1px 虚线 */

:root {
  --paper: #FBF7F0;
  --white: #FFFFFF;
  --ink: #14110E;
  --muted: #6B6459;
  --orange: #E2542C;
  --orange-deep: #C4431F;
  --orange-wash: #FFF4EE;
  --mustard: #F2C14E;
  --mustard-wash: #FDF3D6;
  --wash: #F2ECE1;
  --hover: #FFFDF6;
  --line-soft: #D9D1C3;
  --line-faint: rgba(20, 17, 14, 0.28);
  --serif: 'Songti SC', 'STSong', 'SimSun', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 17, 14, 0.045) 0.55px, transparent 0.7px);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

input {
  font: inherit;
  color: inherit;
  border-radius: 0;
}

::selection {
  background: var(--mustard);
  color: var(--ink);
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

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

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 8px 12px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 顶部黑条 ---------- */

.masthead {
  background: var(--ink);
  color: var(--paper);
}

.masthead-inner {
  max-width: 1400px;
  min-height: 78px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  background: var(--orange);
  border: 2px solid var(--paper);
  box-shadow: 3px 3px 0 rgba(251, 247, 240, 0.9);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.brand h1 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-dot {
  color: var(--orange);
  padding: 0 1px;
}

.brand-text p {
  margin-top: 4px;
  color: #B8AF9F;
  font-size: 10.5px;
  letter-spacing: 0.14em;
}

.mast-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.today {
  text-align: right;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.today-date {
  display: block;
  font-weight: 600;
}

.today-sub {
  display: block;
  margin-top: 3px;
  color: #B8AF9F;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: var(--orange);
  border: 2px solid var(--paper);
  box-shadow: 3px 3px 0 var(--paper);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
}

.btn-export:hover {
  background: #ED6A43;
}

.btn-export:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--paper);
}

/* ---------- 数据条 ---------- */

.meta-strip {
  border-bottom: 1px dashed var(--line-faint);
  background: rgba(255, 255, 255, 0.32);
}

.meta-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 9px 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.meta-inner b {
  color: var(--ink);
  font-weight: 600;
}

.sep {
  width: 1px;
  height: 10px;
  background: var(--line-faint);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
}

.live i {
  width: 6px;
  height: 6px;
  display: block;
  background: var(--orange);
}

.meta-right {
  margin-left: auto;
}

/* ---------- 版心 ---------- */

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 32px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 24px;
  align-items: start;
  padding-top: 20px;
}

.main-col {
  min-width: 0;
}

.rail {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  padding: 16px 0 0 16px;
  border-left: 1px dashed var(--line-faint);
  display: flex;
  justify-content: flex-end;
}

.vert {
  writing-mode: vertical-rl;
  color: #8C8375;
  font-size: 10px;
  letter-spacing: 0.35em;
  line-height: 1;
  white-space: nowrap;
}

.vert::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto 10px;
  background: var(--orange);
}

/* ---------- 指标 ---------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  position: relative;
  min-height: 112px;
  padding: 13px 14px 12px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.metric-label::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  display: block;
  background: var(--ink);
}

.metric-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 1px 5px;
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.metric-tag.mustard {
  background: var(--mustard);
}

.metric-num {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.metric-num .unit {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.metric-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.metric-sub b {
  color: var(--orange);
  font-weight: 600;
}

.metric-sub .down {
  color: var(--orange);
  font-weight: 700;
}

.metric-index {
  position: absolute;
  right: 9px;
  bottom: 2px;
  color: rgba(20, 17, 14, 0.07);
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
  pointer-events: none;
}

.metric.bump .metric-num {
  animation: bump 0.5s ease;
}

@keyframes bump {
  0% { transform: translateY(0); }
  35% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* ---------- 章节标题 ---------- */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-faint);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mark {
  width: 9px;
  height: 20px;
  display: block;
  background: var(--orange);
  border: 2px solid var(--ink);
}

.section-title h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.count-chip {
  padding: 2px 6px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-meta {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

/* ---------- 工具条 ---------- */

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.seg {
  display: inline-flex;
  flex: 0 0 auto;
  background: var(--paper);
  border: 2px solid var(--ink);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-right: 1px solid var(--ink);
  font-size: 11.5px;
  white-space: nowrap;
}

.seg-btn:last-child {
  border-right: 0;
}

.seg-btn span {
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

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

.seg-btn.is-active {
  background: var(--orange);
  font-weight: 700;
}

.seg-btn.is-active:hover {
  background: var(--orange);
}

.seg-btn.is-active span {
  color: var(--ink);
  opacity: 0.72;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 2px;
  font-size: 11.5px;
  white-space: nowrap;
}

.switch-track {
  position: relative;
  width: 34px;
  height: 19px;
  flex: 0 0 34px;
  background: #E9E1D4;
  border: 2px solid var(--ink);
  transition: background 0.15s;
}

.switch-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 13px;
  height: 13px;
  background: var(--ink);
  transition: transform 0.15s;
}

.switch[aria-checked="true"] .switch-track {
  background: var(--orange);
}

.switch[aria-checked="true"] .switch-knob {
  transform: translateX(15px);
}

.switch-label {
  color: var(--ink);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 190px;
  min-width: 170px;
  max-width: 360px;
  height: 32px;
  padding: 0 8px;
  background: var(--white);
  border: 2px solid var(--ink);
}

.search svg {
  flex: 0 0 auto;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.search input::placeholder {
  color: #A79E90;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search:focus-within {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.search-clear {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--muted);
}

.search-clear:hover {
  color: var(--ink);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.reset-btn {
  padding: 0 0 1px;
  border-bottom: 1px dashed var(--muted);
  color: var(--ink);
  font-size: 10.5px;
  white-space: nowrap;
}

.reset-btn:hover {
  border-color: var(--ink);
}

.result-count {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- 表格 ---------- */

.table-card {
  margin-top: 14px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.table-scroll {
  max-height: 345px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--ink) var(--wash);
}

.table-scroll table {
  width: 100%;
  min-width: 1044px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 8px;
  background: var(--wash);
  border-bottom: 2px solid var(--ink);
  color: #514A40;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-align: left;
  white-space: nowrap;
}

.table-scroll thead th:first-child {
  padding-left: 34px;
}

.ta-r {
  text-align: right !important;
}

.ta-c {
  text-align: center !important;
}

.table-scroll tbody td {
  height: 43px;
  padding: 0 8px;
  background: transparent;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 12px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.1s;
}

.table-scroll tbody td:first-child {
  padding-left: 14px;
}

.table-scroll tbody tr:last-child td {
  border-bottom: 0;
}

.table-scroll tbody tr.is-actionable {
  cursor: pointer;
}

@media (hover: hover) {
  .table-scroll tbody tr.is-actionable:hover td {
    background: var(--hover);
  }
}

.table-scroll tbody tr.is-selected td {
  background: var(--orange-wash);
}

.table-scroll tbody tr.is-selected td:first-child {
  box-shadow: inset 6px 0 0 var(--orange);
}

.table-scroll tbody tr.is-selected:hover td {
  background: var(--orange-wash);
}

.table-scroll tbody tr:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.row-check {
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  background: var(--white);
  border: 1.5px solid #B9B0A2;
  vertical-align: -1px;
  transition: background 0.12s, border-color 0.12s;
}

.row-check svg {
  width: 9px;
  height: 9px;
  opacity: 0;
  color: var(--ink);
}

tr.is-selected .row-check {
  background: var(--orange);
  border-color: var(--ink);
}

tr.is-selected .row-check svg {
  opacity: 1;
}

tr.is-locked .row-check {
  opacity: 0.4;
}

.sku-text {
  color: #4B443B;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.01em;
}

.name-text {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plat {
  display: inline-block;
  padding: 1px 4px;
  border: 1px solid #CFC6B7;
  color: #4A443B;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

td.c-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.c-cost {
  color: var(--muted);
}

td.c-price,
td.c-suggest {
  color: var(--ink);
  font-weight: 700;
}

td.c-comp {
  color: var(--muted);
}

td.c-margin {
  color: var(--ink);
}

td.c-margin.neg {
  color: var(--orange);
  font-weight: 700;
}

.c-trend svg {
  display: block;
  margin-left: auto;
}

.c-status .chip {
  display: inline-block;
  padding: 3px 5px;
  border: 2px solid var(--ink);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.chip-pending {
  background: var(--orange-wash);
  border-color: var(--orange) !important;
  color: var(--orange);
}

.chip-normal {
  background: var(--white);
  border-color: #C9C0B2 !important;
  color: var(--muted);
  font-weight: 500;
}

.chip-loss {
  background: var(--orange);
  border-color: var(--ink) !important;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 700;
}

td.c-act {
  padding-right: 12px;
  text-align: right;
}

.act-btn {
  padding: 5px 6px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.act-btn + .act-btn {
  margin-left: 4px;
}

.act-btn.adopt {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.act-btn.adopt:hover {
  background: var(--orange);
  color: var(--ink);
}

.act-btn.ignore {
  border-color: #C9C0B2;
  color: var(--muted);
  font-weight: 500;
}

.act-btn.ignore:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.act-btn:disabled {
  background: var(--white);
  border-color: #DED6C9;
  color: #B3AA9C;
  opacity: 0.7;
  cursor: not-allowed;
}

tr.flash td {
  animation: rowflash 0.9s ease;
}

@keyframes rowflash {
  0% { background: var(--mustard-wash); }
  100% { background: transparent; }
}

/* 空状态 */

.empty-row td {
  height: auto !important;
  padding: 26px 14px !important;
  border-bottom: 0 !important;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.empty p {
  font-size: 13px;
  font-weight: 600;
}

.empty > span:not(.empty-mark) {
  color: var(--muted);
  font-size: 10.5px;
}

.empty button {
  margin-top: 8px;
  padding: 5px 10px;
  background: var(--orange);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 10.5px;
  font-weight: 600;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 8px 14px;
  background: #FFFCF7;
  border-top: 1px dashed var(--line-faint);
  color: var(--muted);
  font-size: 10px;
}

.foot-stats b {
  color: var(--ink);
  font-weight: 600;
}

.foot-stats .loss {
  color: var(--orange);
}

.foot-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.dash {
  display: inline-block;
  width: 11px;
  height: 2px;
  background: var(--ink);
}

.dash.up {
  background: var(--orange);
}

.show-count {
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- 批量调价抽屉 ---------- */

.drawer {
  margin-top: 18px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.drawer.is-active {
  box-shadow: 4px 4px 0 var(--orange);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: #FFFCF7;
  border-bottom: 1px dashed var(--line-faint);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.grip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 14px;
}

.grip i {
  display: block;
  width: 14px;
  height: 2px;
  background: var(--ink);
  opacity: 0.55;
}

.grip i:nth-child(2) {
  width: 10px;
}

.drawer-title h3 {
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.sel-chip {
  padding: 1px 5px;
  background: var(--orange);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.link-btn {
  padding: 0 0 1px;
  border-bottom: 1px dashed var(--muted);
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.link-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.drawer-body {
  padding: 12px 14px;
}

.drawer-empty {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: #FFFDF9;
  border: 1px dashed #C9C0B2;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
}

.drawer-empty p {
  font-size: 12px;
  font-weight: 600;
}

.drawer-empty div > span {
  color: var(--muted);
  font-size: 10.5px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 16px;
}

.sel-list {
  max-height: 152px;
  padding-right: 4px;
  overflow: auto;
  scrollbar-color: var(--ink) var(--wash);
}

.sel-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 60px;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(20, 17, 14, 0.18);
}

.sel-item:last-child {
  border-bottom: 0;
}

.sel-name {
  min-width: 0;
}

.sel-name b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sel-name em {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: 0.02em;
}

.sel-price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  white-space: nowrap;
}

.sel-price s {
  color: #A79E90;
  text-decoration-thickness: 1px;
}

.sel-price b {
  font-size: 11.5px;
}

.sel-price svg {
  color: var(--orange);
}

.sel-delta {
  color: var(--orange);
  font-size: 10.5px;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.drawer-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-left: 16px;
  border-left: 1px dashed var(--line-faint);
}

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

.summary-line b {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.summary-big {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  padding: 2px 0 4px;
  border-bottom: 1px dashed rgba(20, 17, 14, 0.2);
}

.summary-big span {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.summary-big strong {
  color: var(--orange);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

.btn-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 5px;
  padding: 9px 12px;
  background: var(--orange);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
}

.btn-confirm:hover {
  background: #ED6A43;
}

.btn-confirm:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.summary-note {
  color: #83796A;
  font-size: 9.5px;
  line-height: 1.5;
}

/* ---------- 今日公告便签 ---------- */

.note {
  position: fixed;
  right: max(24px, calc((100vw - 1400px) / 2 + 16px));
  bottom: 24px;
  z-index: 60;
  width: 236px;
  padding: 18px 16px 14px;
  background-color: #FBEFC9;
  background-image: radial-gradient(rgba(20, 17, 14, 0.045) 0.55px, transparent 0.7px);
  background-size: 4px 4px;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
  transform-origin: 100% 100%;
}

.tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 74px;
  height: 20px;
  background: rgba(242, 193, 78, 0.92);
  border: 1px solid rgba(20, 17, 14, 0.35);
  transform: translateX(-50%) rotate(2.5deg);
}

.note-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(20, 17, 14, 0.35);
}

.note-head h2 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.note-head span {
  color: #7A6F5C;
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.note p {
  color: #3A332A;
  font-size: 11px;
  line-height: 1.68;
}

.note-sign {
  margin-top: 8px;
  color: #7A6F5C !important;
  font-size: 9.5px !important;
  text-align: right;
}

.note-link {
  margin-top: 7px;
  padding: 0 0 1px;
  border-bottom: 1px dashed #7A6F5C;
  color: #3A332A;
  font-size: 10px;
}

.note-link:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: auto;
  min-width: 280px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  background: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--orange);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}

.toast.is-show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 1px;
  background: var(--orange);
  color: var(--ink);
}

.toast-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.toast-sub {
  display: block;
  margin-top: 2px;
  color: #BFB5A5;
  font-size: 10px;
  line-height: 1.45;
}

/* ---------- 页脚 ---------- */

.site-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 26px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-faint);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.site-foot p:first-child {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ---------- 滚动条 ---------- */

.table-scroll::-webkit-scrollbar,
.sel-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll::-webkit-scrollbar-track,
.sel-list::-webkit-scrollbar-track {
  background: var(--wash);
}

.table-scroll::-webkit-scrollbar-thumb,
.sel-list::-webkit-scrollbar-thumb {
  background: var(--ink);
  border: 2px solid var(--wash);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1390px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail,
  .note {
    display: none;
  }
}

@media (min-width: 1391px) {
  .site-foot {
    padding-right: 290px;
  }
}

@media (max-width: 1100px) {
  .wrap {
    padding: 0 24px 28px;
  }

  .masthead-inner,
  .meta-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 104px;
  }

  .search {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 16px 24px;
  }

  .masthead-inner {
    min-height: 64px;
    padding: 10px 16px;
    gap: 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 17px;
    box-shadow: 2px 2px 0 rgba(251, 247, 240, 0.9);
  }

  .brand h1 {
    font-size: 16px;
    letter-spacing: 0.02em;
    line-height: 1.3;
    white-space: normal;
  }

  .brand-text p {
    display: none;
  }

  .mast-actions {
    gap: 8px;
  }

  .today {
    display: none;
  }

  .btn-export {
    gap: 5px;
    padding: 7px 9px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--paper);
    font-size: 11px;
  }

  .btn-export svg {
    width: 12px;
    height: 12px;
  }

  .meta-inner {
    padding: 7px 16px;
    gap: 7px 10px;
    font-size: 9.5px;
  }

  .meta-hide,
  .meta-right,
  .sep {
    display: none;
  }

  .layout {
    padding-top: 14px;
  }

  .metrics {
    gap: 10px;
  }

  .metric {
    min-height: 98px;
    padding: 10px 10px 9px;
    box-shadow: var(--shadow-sm);
  }

  .metric-label {
    gap: 4px;
    font-size: 9px;
    letter-spacing: 0.05em;
  }

  .metric-label::before {
    width: 5px;
    height: 5px;
    flex-basis: 5px;
  }

  .metric-tag {
    top: 8px;
    right: 8px;
    padding: 1px 3px;
    font-size: 8px;
    border-width: 1px;
  }

  .metric-num {
    margin-top: 7px;
    font-size: 27px;
  }

  .metric-num .unit {
    font-size: 9.5px;
  }

  .metric-sub {
    margin-top: 4px;
    font-size: 9px;
    gap: 3px;
  }

  .metric-index {
    right: 8px;
    bottom: 2px;
    font-size: 18px;
  }

  .section-head {
    margin: 16px 0 9px;
    gap: 8px;
  }

  .section-title h2 {
    font-size: 17px;
  }

  .mark {
    width: 8px;
    height: 17px;
  }

  .count-chip {
    padding: 1px 5px;
    font-size: 9px;
  }

  .section-meta {
    display: none;
  }

  .toolbar {
    gap: 9px;
    padding: 9px;
    box-shadow: var(--shadow-sm);
  }

  .seg {
    width: 100%;
  }

  .seg-btn {
    flex: 1;
    justify-content: center;
    min-height: 36px;
    padding: 7px 2px;
    font-size: 11px;
  }

  .switch {
    order: 1;
    min-height: 36px;
    font-size: 11.5px;
  }

  .search {
    order: 2;
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
  }

  .search input {
    font-size: 12px;
  }

  .toolbar-right {
    order: 1;
    gap: 8px;
    margin-left: auto;
  }

  .reset-btn {
    font-size: 10px;
  }

  .result-count {
    font-size: 9.5px;
  }

  .table-card {
    margin-top: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .table-scroll {
    max-height: none;
    overflow: visible;
  }

  .table-scroll table,
  .table-scroll tbody,
  .table-scroll tr,
  .table-scroll td {
    display: block;
  }

  .table-scroll table {
    width: 100%;
    min-width: 0;
  }

  .table-scroll thead {
    display: none;
  }

  .table-scroll tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .table-scroll tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px 0 0;
    background: var(--white);
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-sm);
    position: relative;
  }

  .table-scroll tbody td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    height: auto;
    padding: 6px 12px;
    border: 0;
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .table-scroll tbody td::before {
    content: attr(data-label);
    color: #9A9081;
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.2;
  }

  .table-scroll tbody td.c-sku {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    padding: 7px 12px 4px;
    color: #4B443B;
    font-size: 10.5px;
  }

  .table-scroll tbody td.c-sku::before {
    display: none;
  }

  .table-scroll tbody td.c-name {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    padding: 0 12px 8px;
    border-bottom: 1px dashed #DCD3C4;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
  }

  .table-scroll tbody td.c-name::before {
    display: none;
  }

  .table-scroll tbody td.c-num {
    text-align: left;
    font-size: 13px;
  }

  .table-scroll tbody td.c-act {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    padding: 9px 12px 10px;
    border-top: 1px dashed #DCD3C4;
  }

  .table-scroll tbody td.c-act::before {
    display: none;
  }

  .act-btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 12px;
  }

  .act-btn + .act-btn {
    margin-left: 0;
  }

  .table-scroll tbody tr.is-selected {
    box-shadow: var(--shadow-sm), inset 6px 0 0 var(--orange);
  }

  .table-scroll tbody tr.is-selected td:first-child {
    box-shadow: none;
  }

  .row-check {
    width: 13px;
    height: 13px;
    margin-right: 6px;
  }

  .table-foot {
    padding: 9px 2px 0;
    background: transparent;
    border-top: 0;
    font-size: 9.5px;
  }

  .legend {
    display: none;
  }

  .drawer {
    margin-top: 14px;
    box-shadow: var(--shadow-sm);
  }

  .drawer-head {
    padding: 9px 12px;
  }

  .drawer-title {
    gap: 7px;
  }

  .drawer-title h3 {
    font-size: 13px;
  }

  .drawer-body {
    padding: 10px 12px;
  }

  .drawer-empty {
    padding: 11px 12px;
  }

  .drawer-empty p {
    font-size: 11.5px;
  }

  .drawer-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sel-list {
    max-height: 132px;
  }

  .sel-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    padding: 8px 0;
  }

  .sel-delta {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 10px;
  }

  .drawer-summary {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px dashed var(--line-faint);
    border-left: 0;
  }

  .summary-big strong {
    font-size: 22px;
  }

  .btn-confirm {
    min-height: 42px;
    font-size: 13px;
  }

  .site-foot {
    margin-top: 20px;
    font-size: 9px;
    gap: 4px;
  }

  .toast {
    top: 76px;
    width: calc(100% - 32px);
    min-width: 0;
    padding: 10px 12px;
  }
}

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