@font-face {
  font-family: "GothamRndMedium";
  src: url("/assets/fonts/GothamRnd-Medium.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "GothamRndBold";
  src: url("/assets/fonts/GothamRnd-Bold.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "GothamBold";
  src: url("/assets/fonts/Gotham-Bold.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "HKYuanW7";
  src: url("/assets/fonts/HKYuan-W7.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "HKYuanW8";
  src: url("/assets/fonts/HKYuan-W8.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "HKYuanW9";
  src: url("/assets/fonts/HKYuan-W9.ttf") format("truetype");
  font-display: swap;
}
:root {
  --brandY: #ffcc00;
  --brandBrown: #632c16;
  --brandRed: #d93924;
  --paper: #fbf4df;
  --paper2: #f3e7c4;
  --card: #fffdf7;
  --ink: #3f2414;
  --ink2: #6b4326;
  --muted: #a07f5a;
  --line: #e7d6ab;
  --line2: #dcc488;
  --gold: #b06a14;
  --pos: #2f7d32;
  --neg: #d93924;
  --shadow: 0 16px 36px rgba(99, 44, 22, .10);
  --font-body: "GothamRndMedium", "HKYuanW7", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-subtitle: "GothamRndBold", "HKYuanW8", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-title: "GothamBold", "HKYuanW8", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 204, 0, .10), transparent 45%),
    radial-gradient(circle at 88% 92%, rgba(217, 57, 36, .05), transparent 45%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input, select { font: inherit; }
button, .button-like {
  cursor: pointer;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--ink2);
  padding: 6px 12px;
  border-radius: 2px;
  font-family: var(--font-subtitle);
  font-weight: 600;
  text-decoration: none;
}
button:hover, .button-like:hover { border-color: var(--gold); color: var(--ink); }
button.on, .seg button.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
button.ghost { background: var(--card); }
.hidden { display: none !important; }

.login-view {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: clamp(24px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(255, 204, 0, .82) 0%, rgba(255, 204, 0, .42) 40%, rgba(255, 204, 0, .08) 72%),
    url("/assets/login-bg.png") center / cover no-repeat;
}
.login-card {
  width: min(460px, calc(100vw - 32px));
  background: rgba(255, 253, 247, .76);
  border: 1px solid rgba(99, 44, 22, .18);
  padding: 18px;
  box-shadow: 0 22px 54px rgba(99, 44, 22, .14);
  backdrop-filter: blur(16px) saturate(1.12);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
}
.login-card h1 {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  margin: 14px 0;
}
.form { display: grid; gap: 12px; }
.form label {
  display: grid;
  gap: 6px;
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: 12px;
  font-weight: 600;
}
.form input, select {
  min-height: 34px;
  border: 1px solid var(--line2);
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
}
.remember-option {
  width: fit-content;
  align-self: start;
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  font-size: 13px !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}
.remember-option input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 16px;
  min-width: 16px;
  min-height: 16px !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  accent-color: var(--gold);
}
.login-card > .brandbar {
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 8px;
}
.login-card > .brandbar .logo {
  width: 48px;
  height: 48px;
}
.login-card > .brandbar .wordmark {
  font-size: 25px;
  letter-spacing: 2px;
}
.login-card > .brandbar .slogan {
  font-size: 11px;
  letter-spacing: 4px;
}
.login-card > .brandbar .superslogan {
  font-size: 12px;
  padding-left: 10px;
}
.hint {
  min-height: 20px;
  color: var(--brandRed);
  font-size: 12px;
}
.app {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 22px 24px 60px;
  position: relative;
  z-index: 2;
}
.module-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 220px));
  gap: 8px;
  margin: 0 0 8px;
}
.module-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 7px 7px 0 0;
  text-align: center;
  background: var(--card);
  font-size: 15px;
}
.module-btn.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.top,
.page {
  min-width: 0;
}
.price-module-active .tabs button[data-tab],
.price-module-active #refreshBtn,
.price-module-active #refreshHint {
  display: none !important;
}
.top {
  position: sticky;
  top: 0;
  z-index: 10000;
  padding-top: 10px;
  background: rgba(251, 244, 223, .94);
  backdrop-filter: blur(8px);
}

@media (max-width: 980px) {
  .module-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-btn {
    min-height: 42px;
    text-align: center;
  }
}
.brandbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--brandY);
  border: 2px solid var(--brandBrown);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 12px;
}
.brandbar .logo {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 44, 22, .25);
}
.brandbar .wordmark {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 900;
  color: var(--brandBrown);
  letter-spacing: 3px;
  line-height: 1;
}
.brandbar .wordmark .reg {
  font-size: 12px;
  vertical-align: super;
  font-weight: 700;
}
.brandbar .slogan {
  font-family: var(--font-subtitle);
  font-size: 13px;
  color: var(--brandBrown);
  letter-spacing: 7px;
  margin-top: 5px;
  font-weight: 700;
  opacity: .92;
}
.brandbar .superslogan {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-subtitle);
  font-size: 15px;
  font-weight: 800;
  color: var(--brandBrown);
  line-height: 1.45;
  border-left: 2px solid rgba(99, 44, 22, .28);
  padding-left: 16px;
}
.tabs {
  font-family: var(--font-subtitle);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  position: relative;
  z-index: 10001;
  overflow: visible;
}
.tabs .spacer { flex: 1; }
.price-module-frame {
  width: 100%;
  min-height: calc(100vh - 190px);
  border: 0;
  background: transparent;
  display: block;
}
.settings-menu {
  position: relative;
  z-index: 10002;
  overflow: visible;
}
.settings-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  left: auto;
  z-index: 10003;
  width: 150px;
  background: var(--card);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
  gap: 4px;
}
.settings-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border-color: transparent;
}
.settings-item:hover {
  background: var(--paper2);
  border-color: var(--line2);
}
.refresh-hint {
  max-width: min(420px, 100%);
  color: var(--brandRed);
  font-family: var(--font-body);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-line {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 11px;
}
.page { display: grid; gap: 18px; }
.filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.report-sticky-toolbar {
  position: fixed;
  top: calc(var(--report-fixed-top, 0px) + 6px);
  left: max(24px, calc((100vw - 1500px) / 2 + 24px));
  right: max(24px, calc((100vw - 1500px) / 2 + 24px));
  z-index: 7;
  background: rgba(251, 244, 223, .96);
  border: 1px solid rgba(231, 214, 171, .86);
  box-shadow: 0 8px 18px rgba(99, 44, 22, .08);
  padding: 8px 10px;
  align-self: start;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.page.has-fixed-toolbar {
  padding-top: calc(var(--report-toolbar-height, 46px) + 16px);
}
.filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-family: var(--font-subtitle);
  font-size: 11px;
  font-weight: 600;
}
.seg { display: inline-flex; gap: 4px; }
.date-step {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  background: var(--card);
}
.date-step-label {
  grid-auto-flow: column;
  align-items: end;
  gap: 8px;
}
.date-step-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.month-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.month-stepper-label {
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: var(--map-control-font);
  font-weight: 600;
  white-space: nowrap;
}
.month-stepper-control {
  display: flex;
  align-items: center;
  gap: 6px;
}
.date-step-placeholder {
  width: 34px;
  height: 34px;
  display: inline-block;
}
.map-toolbar {
  --map-control-h: 34px;
  --map-control-font: 13px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.map-tools-left {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.map-advanced-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.map-advanced-label {
  display: none;
}
.map-advanced-panel {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 320px;
}
.date-range-tools {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.map-tools-left > label,
.date-range-title,
.date-range-tools .date-mini {
  display: flex;
  align-items: center;
  height: var(--map-control-h);
  gap: 4px;
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: var(--map-control-font);
  font-weight: 600;
}
.date-range-title {
  min-height: 0;
}
.date-range-tools .date-mini {
  font-size: 12px;
}
.map-tools-left > .map-advanced-label {
  display: none;
}
.map-toolbar select,
.map-toolbar input[type="date"],
.map-toolbar button,
.map-toolbar .button-like {
  display: inline-flex;
  align-items: center;
  height: var(--map-control-h);
  min-height: var(--map-control-h);
  padding: 0 10px;
  font-size: var(--map-control-font);
  line-height: 1;
}
.map-toolbar select {
  min-width: 118px;
}
.map-toolbar input[type="date"] {
  min-width: 150px;
  border: 1px solid var(--line2);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-subtitle);
}
.channel-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.channel-btn {
  min-width: 92px;
  background: var(--card);
  color: var(--ink2);
}
.channel-btn .check {
  display: inline-block;
  width: 16px;
  color: var(--brandBrown);
  font-weight: 900;
}
.channel-btn.on {
  background: var(--brandY);
  border-color: var(--brandBrown);
  color: var(--brandBrown);
}
.channel-dropdowns {
  --map-control-h: 34px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.channel-menu {
  position: relative;
  min-width: 128px;
}
.channel-menu summary {
  list-style: none;
  height: var(--map-control-h);
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line2);
  background: var(--card);
  color: var(--ink2);
  padding: 0 10px;
  cursor: pointer;
  font-family: var(--font-subtitle);
}
.channel-menu summary::-webkit-details-marker {
  display: none;
}
.channel-menu summary::after {
  content: "⌄";
  margin-left: auto;
  color: var(--muted);
}
.channel-menu.on summary {
  background: var(--brandY);
  border-color: var(--brandBrown);
  color: var(--brandBrown);
}
.channel-menu .check {
  display: inline-block;
  width: 13px;
  font-weight: 900;
}
.channel-menu b {
  font-size: 13px;
  white-space: nowrap;
}
.channel-menu small {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.channel-menu-panel {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 6px);
  width: 230px;
  background: #fffdf7;
  border: 1px solid var(--line2);
  box-shadow: 0 14px 28px rgba(99, 44, 22, .14);
  padding: 8px;
}
.platform-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 5px 6px;
  color: var(--ink2);
  font-size: 12px;
}
.platform-option:hover {
  background: var(--paper2);
}
.platform-option.all {
  font-family: var(--font-subtitle);
  border-bottom: 1px solid var(--line);
  margin-bottom: 3px;
}
.platform-option span {
  color: var(--muted);
  font-size: 11px;
}
.platform-filter {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 12px;
}
.platform-select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-subtitle);
  font-size: 12px;
}
.platform-select-label select {
  height: var(--map-control-h);
  min-width: 168px;
  border: 1px solid var(--line2);
  background: rgba(255, 253, 247, .96);
  color: var(--ink2);
  padding: 0 10px;
  font-family: var(--font-subtitle);
}
.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line2);
  background: rgba(255, 253, 247, .9);
  color: var(--ink2);
  border-radius: 4px;
  min-height: 34px;
  padding: 7px 12px;
  font-family: var(--font-subtitle);
  cursor: pointer;
}
.map-channel-filter,
.map-category-filter {
  display: grid;
  gap: 8px;
  background: rgba(255, 253, 247, .72);
  border: 1px solid var(--line);
  padding: 14px;
}
.map-channel-filter {
  margin-top: 6px;
}
.map-update-note {
  min-width: 90px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.map-toolbar-right {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 220px;
}
.map-clear-all {
  white-space: nowrap;
}
.page.map-updating .map-layout,
.page.map-updating .kpis,
.page.map-updating .map-rank-panel,
.page.map-updating .sku-table-panel {
  opacity: .58;
  pointer-events: none;
  transition: opacity .16s ease;
}
.page.map-updating .map-update-note::after {
  content: "正在更新";
}
.filter-title {
  font-family: var(--font-subtitle);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
}
.filter-title.sub { margin-top: 4px; }
.category-pills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.cat-pill {
  background: var(--card);
  color: var(--ink2);
}
.cat-pill.on {
  background: var(--brandY);
  border-color: var(--brandBrown);
  color: var(--brandBrown);
}
.cat-pill.child {
  font-size: 12px;
  padding: 5px 10px;
}
.cat-pill span {
  color: var(--muted);
  font-size: 11px;
  margin-left: 6px;
}
.map-platform-row {
  display: grid;
  gap: 8px;
}
.cat-pill.tiny {
  font-size: 10px;
  padding: 3px 7px;
  opacity: .82;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.kpi {
  position: relative;
  background: var(--card);
  padding: 16px;
  min-height: 108px;
}
.kpi.has-action {
  padding-right: 44px;
}
.kpi-share-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: .72;
}
.kpi-share-btn:hover,
.kpi-share-btn:focus-visible {
  opacity: 1;
  background: rgba(255, 204, 0, .16);
}
.kpi-share-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
.kpi .k {
  font-family: var(--font-subtitle);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi .k.dynamic {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 1.4em;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}
.kpi-filter-label {
  color: var(--ink2);
  font-weight: inherit;
}
.kpi .v {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  margin-top: 7px;
}
.kpi .d {
  font-size: 11.5px;
  margin-top: 5px;
  color: var(--ink2);
}
.kpi .d.tone-up {
  color: #19753a;
  font-weight: 700;
}
.kpi .d.tone-down {
  color: #c83f2b;
  font-weight: 700;
}
.product-empty-note {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 12px;
}
.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .8fr);
  gap: 18px;
}
.map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.gridEq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px;
  overflow: hidden;
}
.panel h2 {
  font-family: var(--font-subtitle);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
}
.panel-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-title-row span {
  color: var(--muted);
  font-size: 12px;
}
.note {
  font-size: 11px;
  color: var(--muted);
  margin: 2px 0 10px;
}
.load-error {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.load-error h2 {
  font-family: var(--font-title);
  font-size: 24px;
}
.load-error p {
  color: var(--muted);
  font-size: 13px;
}
.load-error button {
  width: fit-content;
}
.bars { display: grid; gap: 8px; }
.bar-row {
  display: grid;
  grid-template-columns: 112px 1fr 82px;
  gap: 9px;
  align-items: center;
  font-size: 12px;
}
.bar-name {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track {
  height: 18px;
  background: var(--paper2);
  border: 1px solid var(--line);
}
.fill { height: 100%; background: var(--brandY); }
.value {
  text-align: right;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.table th {
  font-family: var(--font-subtitle);
  text-align: left;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 7px 8px;
  border-bottom: 1.5px solid var(--ink);
}
.table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.table tr:hover td { background: var(--paper2); }
.pie {
  width: min(340px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 10px auto 14px;
}
.daily-filters {
  align-items: center;
  gap: 10px;
}
.daily-filters label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.daily-filters input {
  min-height: 34px;
  border: 1px solid var(--line2);
  background: #fff;
  color: var(--ink);
  padding: 6px 9px;
  font-family: var(--font-subtitle);
}
.daily-card {
  position: relative;
  background: rgba(255, 253, 247, .96);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(99, 44, 22, .08);
}
.daily-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.daily-kpi-card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .98);
  border-radius: 6px;
  padding: 16px 20px 14px;
  min-height: 108px;
  box-shadow: 0 8px 20px rgba(99, 44, 22, .07);
}
.daily-kpi-card .k {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.daily-kpi-card .v {
  color: #050505;
  font-family: var(--font-title);
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1.05;
}
.daily-rate {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}
.daily-rate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 9px;
}
.daily-rate-row .daily-rate {
  margin-top: 0;
  font-size: 12px;
  font-weight: 800;
}
.daily-rate.up { color: var(--pos); }
.daily-rate.down { color: var(--neg); }
.product-filter-panel {
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .84);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.product-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.product-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}
.product-quadrant-card {
  min-height: 880px;
  margin-bottom: 12px;
}
.quadrant-wrap,
.product-heatmap-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}
.product-quadrant-chart {
  width: 100%;
  min-width: 1320px;
  height: 760px;
  display: block;
}
.quadrant-bg {
  fill: rgba(255, 250, 240, .72);
  stroke: var(--line);
}
.quadrant-axis {
  stroke: rgba(99, 44, 22, .54);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}
.quadrant-label {
  fill: var(--muted);
  font-family: var(--font-subtitle);
  font-size: 13px;
}
.product-bubble {
  cursor: default;
}
.product-bubble-label {
  fill: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: 12px;
  paint-order: stroke;
  stroke: rgba(255, 253, 247, .92);
  stroke-width: 5px;
}
.product-lower-grid .product-pareto-chart {
  width: 100%;
  min-width: 680px;
  height: 430px;
  display: block;
}
.pareto-bar {
  fill: #f2a23a;
}
.pareto-line {
  fill: none;
  stroke: #632c16;
  stroke-width: 2.4;
}
.pareto-line.target {
  stroke: rgba(217, 57, 36, .62);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.pareto-dot {
  fill: #632c16;
}
.product-axis-label {
  font-size: 10px;
}
.product-heatmap-card,
.product-trend-panel {
  margin-bottom: 12px;
}
.product-sku-case-panel {
  margin-bottom: 12px;
}
.product-sku-case-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.product-sku-case-summary {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
  min-width: min(620px, 58vw);
}
.sku-case-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 1fr));
  gap: 6px;
  width: 100%;
}
.sku-case-summary-cell {
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(176, 106, 20, .28);
  background: rgba(255, 253, 247, .78);
  display: grid;
  align-content: center;
  gap: 3px;
}
.sku-case-summary-cell.is-total {
  border-color: rgba(90, 45, 24, .42);
  background: rgba(255, 242, 207, .62);
}
.sku-case-summary-cell span {
  color: var(--muted);
  font-size: 12px;
}
.sku-case-summary-cell b {
  color: var(--ink);
  font-family: var(--font-subtitle);
  font-size: 16px;
  line-height: 1.15;
  white-space: nowrap;
}
.product-sku-case-summary .warn {
  color: var(--neg);
}
.product-sku-case-meta {
  width: 100%;
}
.product-sku-case-scroll {
  overflow-x: auto;
  border: 1px solid rgba(176, 106, 20, .18);
  background: rgba(255, 253, 247, .72);
}
.product-sku-case-table {
  min-width: 940px;
}
.product-sku-case-table th,
.product-sku-case-table td {
  text-align: right;
  vertical-align: middle;
}
.product-sku-case-table th:first-child,
.product-sku-case-table td:first-child {
  width: 38%;
  min-width: 280px;
  text-align: left;
}
.product-sku-case-table td:first-child {
  color: var(--ink);
  font-family: var(--font-subtitle);
}
.product-sku-case-table th:nth-child(2),
.product-sku-case-table td:nth-child(2) {
  text-align: center;
}
.product-sku-case-table tbody tr:nth-child(odd) td {
  background: rgba(247, 230, 183, .42);
}
.product-heatmap-grid {
  display: grid;
  gap: 1px;
  min-width: 760px;
  border: 1px solid var(--line);
  background: var(--line);
}
.product-heatmap-name,
.product-heatmap-cell,
.product-heatmap-grid .heatmap-head {
  background: rgba(255, 253, 247, .96);
  min-height: 46px;
  padding: 8px 10px;
  display: grid;
  align-content: center;
}
.product-heatmap-name {
  font-family: var(--font-subtitle);
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-heatmap-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.product-heatmap-cell.strong {
  color: #fffaf0;
  text-shadow: 0 1px 1px rgba(60, 28, 12, .34);
}
.product-heatmap-cell b {
  font-family: var(--font-subtitle);
  font-size: 14px;
}
.product-heatmap-cell span {
  color: var(--muted);
  font-size: 10.5px;
}
.product-heatmap-cell.strong span {
  color: rgba(255, 250, 240, .86);
}
.product-status-bars {
  display: grid;
  gap: 9px;
}
.status-row {
  display: grid;
  grid-template-columns: 76px 1fr 78px;
  gap: 9px;
  align-items: center;
}
.status-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: 12px;
}
.status-name i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.status-track {
  height: 16px;
  background: rgba(242, 162, 58, .13);
  border: 1px solid rgba(242, 162, 58, .28);
}
.status-fill {
  height: 100%;
}
.status-value {
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: 12px;
  text-align: right;
}
.status-value span {
  display: block;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
}
.product-trend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.product-trend-card {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, .72);
  padding: 10px;
  min-height: 132px;
}
.product-trend-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}
.product-trend-head span {
  font-family: var(--font-subtitle);
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-trend-head b {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}
.product-trend-head b.up { color: var(--pos); }
.product-trend-head b.down { color: var(--neg); }
.product-spark {
  width: 100%;
  height: 88px;
  display: block;
}
.product-spark-line {
  fill: none;
  stroke: #b06a14;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.product-spark-dot {
  fill: #632c16;
}
.daily-wide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
}
.daily-card h2 {
  font-family: var(--font-subtitle);
  color: var(--brandBrown);
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.daily-pie-card {
  min-height: 620px;
  display: grid;
  align-content: start;
}
.daily-platform-card {
  min-height: 620px;
  display: flex;
  flex-direction: column;
}
.daily-pie-svg {
  width: 100%;
  height: 560px;
  margin-top: 18px;
  display: block;
}
.daily-pie-mobile-svg {
  display: none;
}
.daily-pie-mobile-legend {
  display: none;
}
@keyframes dailyPieReveal {
  0% { opacity: 0; transform: scale(.88) rotate(-12deg); filter: saturate(.65); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: saturate(1); }
}
.daily-pie-slice {
  stroke: rgba(255, 253, 247, .92);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: dailyPieReveal .8s cubic-bezier(.2,.7,.2,1) both;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, filter .18s ease, stroke-width .18s ease;
}
.daily-pie-slice:hover,
.daily-pie-slice.selected {
  opacity: .94;
  filter: saturate(1.16);
  stroke: #4a2412;
  stroke-width: 4;
}
.pie-callout-line {
  fill: none;
  stroke: rgba(99, 44, 22, .38);
  stroke-width: 1.3;
}
.pie-callout-name {
  fill: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: 15px;
}
.pie-callout-value {
  fill: var(--muted);
  font-size: 14px;
}
.pie-center-title {
  fill: var(--muted);
  font-size: 14px;
}
.pie-center-value {
  fill: var(--ink);
  font-family: var(--font-title);
  font-size: 25px;
}
.daily-dealer-card,
.daily-trend-card {
  margin-bottom: 12px;
}
.chart-scroll {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}
.dealer-chart,
.trend-chart {
  width: 100%;
  min-width: 980px;
  display: block;
}
.chart-grid {
  stroke: rgba(99, 44, 22, .12);
  stroke-width: 1;
}
.chart-axis {
  fill: var(--muted);
  font-size: 11px;
}
.bar-value {
  fill: var(--ink2);
  font-size: 10px;
  font-family: var(--font-subtitle);
}
.bar-value.fresh {
  fill: #b06a14;
}
.chart-legend,
.trend-legend {
  color: var(--muted);
  font-size: 12px;
}
.chart-legend text {
  fill: var(--muted);
  font-size: 12px;
}
.drill-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.drill-title-row h2 {
  margin-bottom: 3px;
}
.drill-title-row p {
  color: var(--muted);
  font-size: 12px;
}
.ghost.compact {
  min-height: 32px;
  padding: 6px 12px;
  white-space: nowrap;
}
.drill-table-wrap {
  flex: initial;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid rgba(176, 106, 20, .18);
  background: rgba(255, 253, 247, .72);
}
.default-channel-wrap {
  width: 100%;
  flex: 1;
  display: flex;
}
.default-channel-wrap .daily-platform-table {
  height: 100%;
}
.daily-channel-overview-wrap {
  border: 0;
  background: transparent;
}
.daily-channel-overview-table {
  height: auto;
}
.daily-channel-overview-table th {
  padding: 6px 8px;
  font-size: 11px;
}
.daily-channel-overview-table td {
  padding: 8px 8px;
  background: transparent !important;
}
.daily-channel-overview-table tr:hover td {
  background: rgba(255, 250, 238, .64) !important;
}
.daily-channel-overview-table .overview-name {
  font-family: var(--font-subtitle);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink2);
}
.daily-channel-overview-table .overview-amount {
  font-family: var(--font-title);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.daily-channel-overview-table .overview-rate {
  font-family: var(--font-subtitle);
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.daily-channel-overview-table .overview-rate.up {
  color: var(--pos);
}
.daily-channel-overview-table .overview-rate.down {
  color: var(--neg);
}
.drill-table {
  min-width: 100%;
}
.drill-table th,
.drill-table td,
.price-diagnostic-table th,
.price-diagnostic-table td {
  text-align: center;
  vertical-align: middle;
}
.price-diagnostic-table th,
.price-diagnostic-table td {
  font-family: var(--font-subtitle);
  font-size: 14px;
  font-weight: 800;
}
.drill-table td:first-child,
.price-diagnostic-table td:nth-child(2) {
  text-align: left;
}
.daily-pie-store-table th {
  font-size: 13px;
  padding: 8px 10px;
}
.daily-pie-store-table td {
  font-size: 15px;
  padding: 10px 10px;
}
.daily-pie-store-table .subtotal-row td {
  font-size: 16px;
}
.daily-pie-store-table .drill-child td {
  font-size: 14px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.clickable {
  cursor: pointer;
}
.toggle-caret {
  display: inline-block;
  width: 18px;
  color: var(--brandBrown);
  transform-origin: 45% 50%;
  transition: transform .16s ease;
}
tr.open .toggle-caret {
  transform: rotate(90deg);
}
.toggle-caret.muted {
  color: var(--muted);
}
.drill-child td:first-child,
.price-child td:nth-child(2) {
  padding-left: 28px;
  color: var(--ink2);
}
.up { color: var(--pos); }
.down { color: var(--neg); }
.flat { color: var(--muted); }
.dealer-bar[data-dealer-province] {
  cursor: pointer;
  transition: opacity .16s ease, filter .16s ease;
}
.dealer-bar[data-dealer-province]:hover {
  opacity: .86;
  filter: saturate(1.12);
}
.daily-price-card {
  margin-bottom: 12px;
}
.price-table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}
.price-table-wrap.has-open-store {
  max-height: 620px;
  overflow: auto;
}
.price-summary-row td {
  font-family: var(--font-subtitle);
}
.price-summary-row.channel-total td {
  background: rgba(255, 245, 217, .95) !important;
}
.price-summary-row.online-total td {
  background: rgba(255, 226, 166, .96) !important;
  border-top: 2px solid rgba(99, 44, 22, .34);
}
.price-metric-with-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.price-trend-btn {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: .72;
}
.price-trend-btn:hover {
  background: transparent;
  opacity: 1;
}
.price-trend-btn img {
  width: 13px;
  height: 13px;
  object-fit: contain;
  display: block;
}
.price-trend-chart {
  width: 100%;
  min-height: 360px;
  display: block;
}
.price-trend-line {
  fill: none;
  stroke: #b06a14;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.price-trend-dot {
  fill: #632c16;
  stroke: #fff8dc;
  stroke-width: 1.5;
}
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 0 3px rgba(138, 172, 111, .12);
  vertical-align: -1px;
}
.status-dot.normal {
  background: var(--pos);
}
.status-dot.low {
  background: var(--neg);
  box-shadow: 0 0 0 3px rgba(217, 57, 36, .12);
}
.status-dot.down {
  background: #e0a100;
  box-shadow: 0 0 0 3px rgba(224, 161, 0, .14);
}
.status-dot.warning {
  background: var(--neg);
  box-shadow: 0 0 0 3px rgba(217, 57, 36, .12);
}
.status-label {
  font-family: var(--font-subtitle);
  font-size: 12px;
}
.status-label.normal {
  color: var(--pos);
}
.status-label.low {
  color: var(--neg);
}
.status-label.down {
  color: #b06a14;
}
.status-label.warning {
  color: var(--neg);
}
.trend-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin: 4px 0 10px;
}
.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.trend-chip {
  min-height: 32px;
  padding: 6px 10px;
  background: #fffaf0;
}
.trend-chip.drillable:hover,
.trend-chip.drillable:focus {
  background: #fff0b8;
  border-color: #b17809;
}
.trend-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.trend-back {
  white-space: nowrap;
}
.stack-segment {
  cursor: pointer;
  transition: opacity .16s ease, filter .16s ease;
}
.stack-segment:hover {
  opacity: .86;
  filter: saturate(1.12);
}
.stack-label {
  fill: rgba(65, 31, 15, .86);
  font-family: var(--font-subtitle);
  font-size: 10px;
  pointer-events: none;
}
.channel-heatmap-card {
  margin-bottom: 12px;
}
.heatmap-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.heatmap-title-row p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}
.channel-heatmap-grid {
  min-width: 1080px;
  display: grid;
  grid-template-columns: 86px 128px repeat(3, minmax(185px, 1fr)) 154px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .72);
}
.heatmap-head,
.heatmap-channel,
.heatmap-platform,
.heatmap-cell,
.heatmap-total {
  border-right: 1px solid rgba(176, 106, 20, .18);
  border-bottom: 1px solid rgba(176, 106, 20, .18);
}
.heatmap-head {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  background: #fff8df;
  color: var(--ink2);
  font-family: var(--font-subtitle);
  text-align: center;
}
.heatmap-head span {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 11px;
}
.heatmap-channel {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 7px 10px;
  background: #fffdf7;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 15px;
}
.heatmap-platform {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 7px 10px;
  background: #fffdf7;
  color: var(--ink2);
  font-family: var(--font-subtitle);
  text-align: center;
}
.heatmap-channel.subtotal,
.heatmap-platform.subtotal,
.heatmap-total.subtotal {
  background: #f4ce88;
  color: var(--ink);
  font-family: var(--font-title);
}
.heatmap-cell {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 7px 12px;
  color: var(--ink2);
  transition: transform .16s ease, box-shadow .16s ease;
}
.heatmap-cell:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 2px rgba(99, 44, 22, .22);
}
.heatmap-cell.subtotal {
  background: #f4ce88 !important;
}
.heatmap-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}
.heatmap-metric b {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 18px;
  line-height: 1.1;
}
.heatmap-metric i {
  color: var(--ink2);
  font-style: normal;
  font-size: 12px;
}
.heatmap-total span {
  color: var(--ink2);
  font-size: 12px;
}
.heatmap-metric em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}
.heatmap-metric em.up {
  color: var(--pos);
}
.heatmap-metric em.down {
  color: var(--neg);
}
.heatmap-cell.hot b,
.heatmap-cell.hot i,
.heatmap-cell.hot em {
  color: #3b210f;
}
.heatmap-total {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  background: #fff7df;
  text-align: center;
}
.heatmap-total .heatmap-metric {
  justify-content: center;
}
.channel-driver-card {
  margin-bottom: 12px;
}
.driver-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(176, 106, 20, .18);
  background: rgba(255, 253, 247, .72);
}
.channel-driver-table {
  min-width: 900px;
}
.channel-driver-table th,
.channel-driver-table td {
  text-align: center;
  vertical-align: middle;
}
.channel-driver-table td:nth-child(2) {
  text-align: left;
}
.driver-channel-row td {
  background: #f4ce88;
  color: var(--ink);
  font-family: var(--font-title);
  font-weight: 900;
}
.driver-platform-row td {
  background: #fffdf7;
}
.driver-platform-row.clickable:hover td {
  background: #fff2c7;
}
.driver-child-row td {
  color: var(--ink2);
  background: rgba(255, 250, 238, .82);
}
.driver-indent {
  display: inline-block;
  padding-left: 26px;
  max-width: 560px;
  white-space: normal;
  line-height: 1.35;
}
.driver-delta {
  font-family: var(--font-title);
}
.driver-delta.up {
  color: var(--pos);
}
.driver-delta.down {
  color: var(--neg);
}
.driver-delta.flat {
  color: var(--muted);
}
.driver-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.driver-title-row p {
  color: var(--ink2);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 2px;
}
.driver-filter-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.driver-filter-chip {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 8px 11px;
  text-align: left;
  background: #fffaf0;
  border: 1px solid rgba(176, 106, 20, .32);
  color: var(--ink2);
  cursor: pointer;
}
.driver-filter-chip.on {
  background: #fff2c7;
  border-color: var(--brandBrown);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(99, 44, 22, .18);
}
.driver-filter-chip.on span {
  color: var(--ink);
}
.driver-filter-chip.on b {
  color: var(--brandBrown);
}
.driver-filter-chip span {
  font-family: var(--font-subtitle);
  font-size: 14px;
}
.driver-filter-chip b {
  font-size: 11px;
  color: var(--muted);
}
.driver-filter-chip i {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: rgba(99, 44, 22, .09);
}
.driver-filter-chip em {
  display: block;
  height: 100%;
  background: #8aac6f;
}
.driver-filter-chip.down em {
  background: #d75f3f;
}
.driver-attribution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.driver-attribution-panel {
  border: 1px solid rgba(176, 106, 20, .18);
  background: rgba(255, 253, 247, .72);
  padding: 12px;
  min-height: 360px;
}
.driver-attribution-panel h3 {
  font-family: var(--font-subtitle);
  color: var(--brandBrown);
  font-size: 20px;
  margin-bottom: 10px;
}
.driver-rank-list {
  display: grid;
  gap: 8px;
}
.driver-rank-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 58px;
  grid-template-areas:
    "rank path percent"
    "rank bar tag";
  gap: 4px 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(176, 106, 20, .14);
  background: #fffaf0;
}
.driver-rank-no {
  grid-area: rank;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #fffdf7;
  background: var(--brandBrown);
  font-family: var(--font-title);
  font-size: 13px;
}
.driver-rank-path {
  grid-area: path;
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-subtitle);
  font-size: 13px;
  line-height: 1.35;
}
.driver-rank-item strong {
  grid-area: percent;
  justify-self: end;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 18px;
}
.driver-rank-item small {
  grid-area: tag;
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
}
.driver-share-bar {
  grid-area: bar;
  display: block;
  height: 10px;
  overflow: hidden;
  background: rgba(99, 44, 22, .08);
}
.driver-share-bar i {
  display: block;
  height: 100%;
  transition: width .35s ease;
}
.driver-rank-item.up .driver-share-bar i {
  background: linear-gradient(90deg, #c9dfaa, #6f9b55);
}
.driver-rank-item.down .driver-share-bar i {
  background: linear-gradient(90deg, #ffd29d, #c83f2b);
}
.driver-rank-item.up.dominant {
  background: #f3f9e7;
  border-color: rgba(111, 155, 85, .45);
}
.driver-rank-item.down.dominant {
  background: #fff1e7;
  border-color: rgba(200, 63, 43, .42);
}
.driver-rank-item.up.dominant .driver-rank-no,
.driver-rank-item.up.high .driver-rank-no {
  background: #6f9b55;
}
.driver-rank-item.down.dominant .driver-rank-no,
.driver-rank-item.down.high .driver-rank-no {
  background: #c83f2b;
}
.driver-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  color: var(--muted);
  border: 1px dashed rgba(176, 106, 20, .26);
  background: rgba(255, 250, 238, .6);
}
.daily-platform-table th,
.daily-platform-table td {
  text-align: center;
}
.table .subtotal-row td {
  background: #f4ce88;
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-weight: 800;
}
.traffic-toolbar {
  display: grid;
  grid-template-columns: auto 180px;
  gap: 10px;
  align-items: end;
  justify-content: start;
}
.traffic-period-segment {
  display: inline-flex;
  align-items: end;
  gap: 4px;
}
.traffic-period-segment button {
  min-height: 38px;
  min-width: 48px;
  padding: 8px 12px;
}
.traffic-period-segment button:first-child {
  border-radius: 6px 0 0 6px;
}
.traffic-period-segment button:last-child {
  margin-left: -5px;
  border-radius: 0 6px 6px 0;
}
.traffic-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.traffic-toolbar input,
.traffic-toolbar select {
  width: 100%;
  border: 1px solid var(--line2);
  background: var(--card);
  color: var(--ink);
  padding: 8px 10px;
  min-height: 38px;
}
.traffic-period-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.traffic-status {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.traffic-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.traffic-kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 4px;
}
.traffic-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.traffic-trend-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  opacity: .62;
  cursor: pointer;
}
.traffic-trend-btn:hover,
.traffic-trend-btn:focus-visible {
  background: rgba(255, 244, 207, .5);
  opacity: 1;
}
.traffic-trend-btn img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.traffic-kpi-card span {
  color: var(--muted);
  font-size: 12px;
}
.traffic-kpi-card strong {
  color: #0a0a0a;
  font-family: var(--font-title);
  font-size: 32px;
  line-height: 1.15;
}
.traffic-kpi-card em {
  color: var(--muted);
  font-family: var(--font-subtitle);
  font-style: normal;
  font-size: 13px;
}
.traffic-kpi-card em.up { color: var(--pos); }
.traffic-kpi-card em.down { color: var(--neg); }
.traffic-kpi-card small {
  color: var(--muted);
  font-size: 11px;
}
.traffic-compare-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 18px;
}
.traffic-compare {
  color: var(--muted);
  font-family: var(--font-subtitle);
  font-size: 12px;
}
.traffic-compare.up { color: var(--pos); }
.traffic-compare.down { color: var(--neg); }
.traffic-trend-glyph {
  display: inline-flex;
  flex: 0 0 auto;
  width: 52px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(176, 106, 20, .18);
  border-radius: 6px;
  background: rgba(255, 250, 238, .72);
}
.traffic-trend-glyph svg {
  width: 46px;
  height: 20px;
  overflow: visible;
}
.traffic-trend-glyph polyline {
  fill: none;
  stroke: var(--brandBrown);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.traffic-trend-glyph.up polyline { stroke: var(--pos); }
.traffic-trend-glyph.down polyline { stroke: var(--neg); }
.traffic-trend-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(38, 22, 12, .42);
}
.traffic-trend-modal {
  box-sizing: border-box;
  width: min(960px, 100%);
  max-height: calc(100vh - 76px);
  max-height: calc(100dvh - 76px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 18px 60px rgba(67, 38, 18, .24);
}
.traffic-trend-modal-head {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 0 56px;
  text-align: center;
}
.traffic-trend-modal-head > div {
  min-width: 0;
}
.traffic-trend-modal-head span {
  color: var(--muted);
  font-size: 12px;
}
.traffic-trend-modal-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 22px;
  overflow-wrap: anywhere;
}
.traffic-trend-close {
  position: absolute;
  top: 50%;
  right: 0;
  flex: 0 0 auto;
  transform: translateY(-50%);
}
.traffic-trend-modal-content {
  min-height: 0;
  overflow: auto;
  padding: 0 2px 2px;
}
.traffic-trend-date-row {
  display: grid;
  grid-template-columns: repeat(var(--traffic-trend-count, 7), minmax(0, 1fr));
  gap: 8px;
  margin: 0 8px 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.traffic-trend-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.traffic-trend-metric-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper2);
}
.traffic-trend-metric-card:last-child {
  grid-column: 1 / -1;
}
.traffic-trend-metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.traffic-trend-metric-head span {
  color: var(--muted);
  font-size: 12px;
}
.traffic-trend-metric-head strong {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 20px;
}
.traffic-modal-sparkline {
  display: block;
  width: 100%;
  height: 72px;
  padding: 8px 0;
  border-top: 1px solid rgba(176, 106, 20, .14);
  border-bottom: 1px solid rgba(176, 106, 20, .14);
}
.traffic-modal-sparkline polyline {
  fill: none;
  stroke: var(--brandBrown);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.traffic-trend-values {
  display: grid;
  grid-template-columns: repeat(var(--traffic-trend-count, 7), minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.traffic-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.traffic-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}
.traffic-section-head h2 {
  margin: 2px 0 0;
  font-family: var(--font-title);
  font-size: 24px;
}
.traffic-section-head > span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.traffic-section-head > .traffic-section-trend-btn {
  margin-left: auto;
}
.traffic-eyebrow {
  color: var(--brandBrown);
  font-family: var(--font-subtitle);
  font-size: 12px;
  font-weight: 800;
}
.traffic-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.traffic-mode-trend-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.traffic-mode-trend-legend-item,
.traffic-mode-trend-summary-card strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.traffic-mode-trend-legend-item i,
.traffic-mode-trend-summary-card i {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}
.traffic-mode-trend-chart-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper2);
}
.traffic-mode-trend-chart {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
  min-height: 260px;
}
.traffic-mode-trend-line {
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.traffic-mode-trend-dot {
  stroke: var(--paper2);
  stroke-width: 2;
}
.traffic-mode-trend-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.traffic-mode-trend-summary-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper2);
}
.traffic-mode-trend-summary-card > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.traffic-mode-trend-summary-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-title);
  font-size: 14px;
}
.traffic-mode-trend-summary-card > b {
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 20px;
}
.traffic-mode-trend-summary-card > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.traffic-mode-card,
.traffic-shelf-summary article {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper2);
}
.traffic-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.traffic-mode-head h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 16px;
}
.traffic-shelf-summary small {
  color: var(--muted);
  font-size: 11px;
}
.traffic-mode-card > strong,
.traffic-shelf-summary strong {
  display: block;
  margin: 14px 0 10px;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 24px;
}
.traffic-mode-net {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.traffic-mode-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}
.traffic-mode-card.is-cooperation .traffic-mode-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.traffic-mode-metrics span {
  display: grid;
  gap: 2px;
}
.traffic-mode-metrics b {
  color: var(--ink2);
  font-size: 12px;
}
.traffic-shelf-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.traffic-shelf-summary article {
  display: grid;
  gap: 5px;
}
.traffic-shelf-platform {
  color: var(--brandBrown);
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
}
.traffic-shelf-summary strong {
  margin: 4px 0 0;
}
.traffic-shelf-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}
.traffic-shelf-metrics span {
  display: grid;
  gap: 2px;
}
.traffic-shelf-metrics b {
  color: var(--ink2);
  font-size: 12px;
}
.traffic-mobile-list {
  display: none;
}
.traffic-main-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
}
.traffic-chart-wrap,
.traffic-table-wrap {
  overflow: hidden;
}
.traffic-trend-chart {
  width: 100%;
  height: auto;
}
.traffic-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.traffic-axis {
  fill: var(--muted);
  font-size: 12px;
}
.traffic-gmv-bar {
  fill: #f2a335;
}
.traffic-cost-line {
  fill: none;
  stroke: var(--brandBrown);
  stroke-width: 3;
}
.traffic-cost-dot {
  fill: var(--card);
  stroke: var(--brandBrown);
  stroke-width: 2;
}
.traffic-donut {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.traffic-donut-svg {
  width: 100%;
  max-width: 240px;
}
.traffic-donut-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 64px 86px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 13px;
}
.traffic-donut-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.traffic-donut-row b,
.traffic-donut-row em {
  text-align: right;
  font-style: normal;
}
.traffic-table {
  min-width: 980px;
}
.traffic-table.compact,
.traffic-table.shelf-compact {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.traffic-table.compact th,
.traffic-table.compact td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.traffic-table.compact th:nth-child(1) { width: 16%; }
.traffic-table.compact th:nth-child(2) { width: 36%; }
.traffic-table.compact th:nth-child(3),
.traffic-table.compact th:nth-child(4),
.traffic-table.compact th:nth-child(5) { width: 16%; }
.traffic-table.shelf-compact th,
.traffic-table.shelf-compact td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.traffic-table.shelf-compact th:nth-child(1) { width: 31%; }
.traffic-table.shelf-compact th:nth-child(n+2) { width: 13.8%; }
.traffic-shelf-groups {
  display: grid;
  gap: 16px;
}
.traffic-shelf-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper2);
}
.traffic-shelf-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.traffic-shelf-group-head h3 {
  margin: 0;
  color: var(--brandBrown);
  font-family: var(--font-title);
  font-size: 16px;
}
.traffic-shelf-group-head span {
  color: var(--muted);
  font-size: 12px;
}
.traffic-table th,
.traffic-table td {
  white-space: nowrap;
  font-size: 13px;
}
.traffic-table .traffic-dim {
  text-align: left;
}
.traffic-table .traffic-trend-btn {
  margin-left: 6px;
  vertical-align: middle;
}
.traffic-table .traffic-dim:last-child {
  min-width: 150px;
}
.traffic-table .traffic-metric {
  text-align: right;
}
.traffic-dim-content {
  display: inline-block;
  max-width: calc(100% - 60px);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.traffic-table .traffic-dim > .traffic-trend-glyph {
  margin-left: 6px;
  vertical-align: middle;
}
.daily-empty {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 12px;
}
.china-map {
  width: 100%;
  aspect-ratio: 1.38;
  min-height: 420px;
}
.map-panel .china-map {
  min-height: 500px;
  margin-bottom: clamp(-260px, -18vw, -140px);
}
.map-panel {
  padding: 12px 14px 10px;
}
.map-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 0;
}
.map-panel-head > div {
  min-width: 0;
  flex: 1 1 auto;
}
.map-panel-head .note {
  max-width: 760px;
}
.map-density-note {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0;
}
.map-drill-back {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 10px;
}
.map-panel.map-drilled .china-map {
  animation: mapFadeIn .22s ease;
}
.map-panel.loading-map-drill .china-map {
  opacity: .52;
  pointer-events: none;
}
@keyframes mapFadeIn {
  from { opacity: .32; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.map-rank-panel {
  margin-bottom: 18px;
}
.rank-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.map-rank-back {
  flex: 0 0 auto;
}
.map-rank-chart-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}
.map-rank-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, .95fr);
  gap: 18px;
  align-items: stretch;
}
.map-rank-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}
.map-rank-mobile-list {
  display: none;
}
.map-rank-row {
  display: grid;
  grid-template-columns: 30px minmax(76px, 112px) minmax(140px, 1fr) 78px;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}
.rank-index {
  color: var(--muted);
  font-family: var(--font-subtitle);
  font-size: 12px;
  text-align: right;
}
.rank-name {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink2);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-track {
  height: 15px;
  background: rgba(242, 162, 58, .16);
  border: 1px solid rgba(242, 162, 58, .30);
  overflow: hidden;
}
.rank-fill {
  height: 100%;
  background: #f2a23a;
}
.map-rank-row:hover .rank-fill {
  background: #ffcc00;
}
.rank-value {
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: 12px;
}
.rank-trend-btn {
  padding: 3px 8px;
  font-size: 11px;
  background: #fffaf0;
}
.rank-trend-btn.icon-only {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.rank-trend-btn.icon-only:hover {
  background: rgba(255, 204, 0, .16);
}
.rank-trend-btn.icon-only img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.rank-trend-btn.icon-only svg {
  width: 22px;
  height: 22px;
  display: block;
}
.sku-action-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.sku-share-btn[hidden] {
  display: none !important;
}
.map-trend-panel,
.sku-trend-panel {
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .72);
  padding: 12px;
}
.map-trend-panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}
.sku-trend-panel {
  margin: 10px 0 12px;
}
.sku-trend-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10004;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(55, 31, 18, .18);
  animation: trendFadeIn .18s ease-out both;
}
.sku-trend-modal {
  width: min(720px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  max-height: min(620px, calc(100dvh - 36px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(190, 139, 64, .55);
  background: linear-gradient(180deg, #fffdf7 0%, #fff6df 100%);
  box-shadow: 0 18px 50px rgba(80, 44, 18, .20);
  padding: 14px;
  animation: trendPopIn .22s cubic-bezier(.2, .82, .22, 1) both;
}
.sku-trend-modal .map-trend-chart {
  min-height: 360px;
}
.sku-trend-modal .rank-panel-head.compact {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fffdf7;
}
.sku-share-modal {
  width: min(760px, calc(100vw - 36px));
}
.sku-share-pie-layout {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
}
.sku-share-pie-svg {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
}
.sku-share-legend {
  display: grid;
  gap: 8px;
}
.sku-share-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 64px 82px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(220, 196, 136, .72);
  background: rgba(255, 250, 240, .62);
}
.sku-share-legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.sku-share-legend-row span {
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-subtitle);
}
.sku-share-legend-row b,
.sku-share-legend-row em {
  color: var(--ink2);
  font-style: normal;
  text-align: right;
  font-family: var(--font-subtitle);
}
.sku-trend-close {
  flex: 0 0 auto;
}
@keyframes trendFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes trendPopIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.rank-panel-head.compact {
  margin-bottom: 4px;
}
.rank-panel-head h3 {
  font-family: var(--font-subtitle);
  font-size: 18px;
  color: var(--brandBrown);
}
.map-trend-chart {
  width: 100%;
  min-height: 430px;
  display: block;
}
.trend-bar {
  fill: #f2a23a;
}
.map-rank-chart {
  width: 100%;
  min-width: 980px;
  height: 390px;
  display: block;
}
.rank-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.rank-axis,
.rank-x-label,
.rank-value-label {
  fill: var(--muted);
  font-size: 12px;
}
.trend-x-label {
  font-size: 10px;
}
.trend-y-label {
  font-size: 10px;
}
.rank-value-label {
  fill: var(--ink2);
  font-family: var(--font-subtitle);
  font-weight: 700;
}
.map-rank-bar rect {
  fill: #f2a23a;
}
.map-rank-bar.clickable {
  cursor: pointer;
}
.map-rank-bar.clickable:hover rect {
  fill: #ffcc00;
}
.map-rank-panel.loading-rank .map-rank-chart-wrap {
  opacity: .55;
  pointer-events: none;
}
.rank-panel .bar-row {
  grid-template-columns: 86px 1fr 76px;
}
.sku-table-panel .table {
  table-layout: fixed;
  font-size: 13.5px;
}
.sku-rank-table th,
.sku-rank-table td {
  padding-top: 9px;
  padding-bottom: 9px;
}
.sku-rank-table th:not(:first-child),
.sku-rank-table td:not(:first-child) {
  text-align: left;
}
.sku-rank-table .rank-trend-btn {
  white-space: nowrap;
}
.sku-rank-table th:last-child,
.sku-rank-table td:last-child {
  text-align: center;
}
.sku-table-panel .table td:first-child,
.sku-name-cell {
  white-space: normal;
}
.sku-card-list {
  display: none;
}
.sku-share-diff {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) 48px;
  align-items: center;
  gap: 8px;
  min-width: 96px;
}
.sku-diff-track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: rgba(176, 106, 20, .12);
  overflow: hidden;
}
.sku-diff-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
}
.sku-share-diff.up .sku-diff-track i {
  background: #218a45;
}
.sku-share-diff.down .sku-diff-track i {
  background: #c83f2b;
}
.sku-share-diff b {
  font-size: 12px;
  font-family: var(--font-subtitle);
  color: var(--ink2);
}
.tile-map {
  display: grid;
  grid-template-columns: repeat(12, minmax(48px, 1fr));
  gap: 7px;
  min-height: 560px;
  align-content: center;
}
.tile {
  min-height: 48px;
  border: 1px solid #fff;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  color: #3c2a05;
  padding: 4px;
}
.tile:hover { outline: 3px solid rgba(99, 44, 22, .25); }
.market-frame {
  width: 100%;
  display: block;
  height: 1600px;
  min-height: 1600px;
  border: 0;
  background: var(--paper);
}
dialog {
  border: 0;
  padding: 0;
  background: transparent;
}
dialog::backdrop {
  background: rgba(46, 31, 12, .48);
  animation: qa-backdrop-in .2s ease-out both;
}
dialog.is-closing::backdrop {
  animation: qa-backdrop-out .18s ease-in both;
}
.dialog-card, .dialog-form {
  width: min(760px, calc(100vw - 30px));
  background: var(--card);
  border: 2px solid var(--brandBrown);
  padding: 20px;
  box-shadow: var(--shadow);
}
.dialog-form { width: min(420px, calc(100vw - 30px)); }
.admin-dialog {
  width: min(1120px, calc(100vw - 30px));
  max-height: calc(100vh - 60px);
  overflow: auto;
}
#adminUserList {
  overflow-x: auto;
}
.admin-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
}
.admin-permission-cell {
  min-width: 240px;
  line-height: 1.45;
}
.admin-permission-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.bulk-import-panel {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fffaf0;
}
.bulk-import-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--brandBrown);
  font-size: 13px;
}
.bulk-import-head span {
  color: var(--muted);
  font-weight: 600;
}
.bulk-import-table-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
}
.bulk-import-table {
  min-width: 900px;
  margin: 0;
}
.bulk-import-table td,
.bulk-import-table th {
  white-space: nowrap;
}
.bulk-valid {
  color: #2d7e38;
  font-weight: 700;
}
.bulk-invalid {
  color: var(--brandRed);
  font-weight: 700;
}

.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;
}

#qaDialog {
  position: fixed;
  inset: auto;
  top: 50%;
  left: 50%;
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: visible;
  transform: translate(-50%, -50%);
}

.qa-dialog {
  width: min(720px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(176, 106, 20, .35);
  border-radius: 12px;
  background: #fffaf0;
  box-shadow: 0 24px 80px rgba(65, 35, 18, .28), 0 0 0 1px rgba(255, 194, 0, .16);
  animation: qa-dialog-in .22s cubic-bezier(.2, .8, .2, 1) both;
}

#qaDialog.is-closing .qa-dialog {
  animation: qa-dialog-out .18s ease-in both;
}

.qa-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid var(--brandBrown);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--brandBrown);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(65, 35, 18, .18);
  display: grid;
  place-items: center;
  transition: transform .16s ease, color .16s ease, background .16s ease;
}

.qa-fab svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qa-fab.is-busy::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #fffdf7;
  border-radius: 50%;
  background: var(--brandRed);
  animation: qa-busy-pulse .9s ease-in-out infinite alternate;
}

@keyframes qa-busy-pulse {
  from { transform: scale(.78); opacity: .6; }
  to { transform: scale(1); opacity: 1; }
}

.qa-fab:hover,
.qa-fab:focus-visible {
  background: var(--brandBrown);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
}

@keyframes qa-dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes qa-dialog-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(.96); }
}
@keyframes qa-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes qa-backdrop-out { from { opacity: 1; } to { opacity: 0; } }

.qa-dialog .dialog-head {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}

.qa-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.qa-title-wrap h2 {
  margin: 0;
  font-size: 18px;
}

.qa-title-wrap p {
  margin: 2px 0 0;
  color: #8a6d48;
  font-size: 12px;
}

.qa-agent-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brown);
  background: var(--yellow);
}

.qa-agent-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qa-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  color: #654421;
  background: transparent;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.qa-close:hover,
.qa-close:focus-visible {
  background: #f4ead4;
}

.qa-messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 18px 24px;
  background: #f8f3e8;
}

.qa-message-row {
  display: flex;
  margin: 0 0 14px;
}

.qa-message-row.user {
  justify-content: flex-end;
}

.qa-message-bubble {
  max-width: 84%;
  padding: 11px 14px;
  border: 1px solid #ead8b8;
  border-radius: 4px 12px 12px 12px;
  background: #fff;
  color: #422612;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(73, 45, 21, .06);
}

.qa-message-row.user .qa-message-bubble {
  border-color: #d4a72e;
  border-radius: 12px 4px 12px 12px;
  background: #ffcf29;
  color: #3e260c;
  box-shadow: none;
}

.qa-message-row.error .qa-message-bubble {
  border-color: #e6aaa3;
  color: #9f2f24;
  background: #fff6f4;
}

.qa-message-row.loading .qa-message-bubble {
  color: #8a6d48;
  animation: qa-loading 1.1s ease-in-out infinite alternate;
}

@keyframes qa-loading {
  from { opacity: .48; }
  to { opacity: 1; }
}

.qa-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fffdf8;
}

.qa-composer textarea {
  width: 100%;
  min-height: 46px;
  max-height: 120px;
  resize: none;
  padding: 11px 12px;
  border: 1px solid #d7bd8d;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  line-height: 1.45;
}

.qa-composer textarea:focus {
  border-color: #9f6117;
  outline: 2px solid rgba(255, 194, 0, .22);
}

.qa-composer-actions {
  display: flex;
  gap: 8px;
}

.qa-clear,
.qa-send {
  min-height: 42px;
  padding: 0 15px;
}

.qa-send {
  border-color: var(--brandBrown);
  color: #fff !important;
  background: var(--brandBrown);
}

@media (max-width: 640px) {
  #qaDialog {
    top: 50%;
    left: 50%;
  }

  .qa-dialog {
    width: calc(100vw - 16px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 10px;
  }

  .qa-dialog .dialog-head {
    padding: 12px 14px;
  }

  .qa-title-wrap h2 {
    font-size: 16px;
  }

  .qa-agent-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .qa-messages {
    padding: 16px 12px 20px;
  }

  .qa-message-bubble {
    max-width: 90%;
    font-size: 14px;
  }

  .qa-composer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .qa-composer-actions {
    justify-content: flex-end;
  }

  .qa-clear,
  .qa-send {
    min-height: 38px;
  }

  .qa-fab {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }

  .qa-fab svg {
    width: 23px;
    height: 23px;
  }
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.admin-users-table {
  margin-bottom: 18px;
}
.admin-users-table td {
  vertical-align: middle;
}
.admin-actions {
  white-space: nowrap;
}
button.danger {
  color: var(--brandRed);
}
button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.admin-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.admin-form h3 {
  font-family: var(--font-subtitle);
  color: var(--brandBrown);
  font-size: 20px;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-form-grid .price-role-field { grid-column: span 2; }
.admin-multi-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--ink2);
  font-family: var(--font-subtitle);
  font-size: 13px;
}
.admin-multi {
  position: relative;
  width: 100%;
  min-width: 0;
}
.admin-multi summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line2);
  background: #fff;
  color: var(--ink2);
  cursor: pointer;
  list-style: none;
}
.admin-multi summary::-webkit-details-marker {
  display: none;
}
.admin-multi summary::after {
  content: "⌄";
  color: var(--muted);
  font-size: 14px;
}
.admin-multi[open] summary {
  border-color: var(--brandBrown);
}
.admin-multi-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line2);
  background: #fffdf8;
  box-shadow: 0 12px 30px rgba(65, 35, 18, .16);
}
.admin-multi-options label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--ink2);
  font-size: 13px;
  cursor: pointer;
}
.admin-multi-options label:hover {
  background: var(--paper2);
}
.admin-multi-options input {
  min-height: auto;
  margin: 0;
}
.permission-box {
  border: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.permission-box .admin-multi {
  flex: 1 1 420px;
}
.permission-box legend {
  padding: 0 6px;
  color: var(--muted);
  font-family: var(--font-subtitle);
  font-size: 12px;
}
.permission-box label,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink2);
  font-size: 13px;
  font-family: var(--font-subtitle);
}
.permission-box input,
.inline-check input {
  min-height: auto;
}
@media (max-width: 900px) {
  .grid2, .gridEq, .map-layout, .daily-kpi-grid, .daily-wide-grid, .heatmap-layout, .driver-attribution-grid, .product-lower-grid, .product-trend-grid { grid-template-columns: 1fr; }
  .map-rank-grid { grid-template-columns: 1fr; }
  .driver-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brandbar .superslogan { display: none; }
  .admin-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-form-grid .price-role-field { grid-column: auto; }
  .admin-tools { justify-content: stretch; }
  .admin-tools button { flex: 1 1 0; }
  .map-toolbar.report-sticky-toolbar {
    position: fixed;
    top: calc(var(--report-fixed-top, 0px) + 6px);
    left: 14px;
    right: 14px;
    margin: 0;
    box-shadow: 0 8px 18px rgba(99, 44, 22, .08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  #mapPage.page.has-fixed-toolbar {
    padding-top: calc(var(--report-toolbar-height, 92px) + 16px);
  }
  .map-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
  }
  .map-tools-left {
    width: 100%;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .map-tools-left .month-stepper {
    flex: 1 1 auto;
    min-width: 0;
  }
  .map-tools-left .month-stepper-control {
    flex: 1 1 auto;
    min-width: 0;
  }
  .map-toolbar .map-advanced-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--map-control-h);
    min-height: var(--map-control-h);
    padding: 0 10px;
    border: 1px solid var(--line2);
    background: var(--card);
    color: var(--ink2);
    border-radius: 2px;
    font-family: var(--font-subtitle);
    font-size: var(--map-control-font);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .map-advanced-toggle:checked ~ .map-tools-left .map-advanced-label {
    background: var(--gold);
    border-color: var(--ink);
    color: var(--ink);
  }
  .map-advanced-panel {
    display: none;
    width: 100%;
    min-width: 0;
    padding: 10px;
    border: 1px dashed var(--line2);
    background: rgba(255, 253, 247, .82);
    gap: 8px;
  }
  .map-advanced-toggle:checked ~ .map-advanced-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .map-advanced-panel .date-range-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .map-advanced-panel .date-range-title {
    grid-column: 1 / -1;
    height: auto;
  }
  .map-advanced-panel .date-mini {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    height: var(--map-control-h);
  }
  .map-advanced-panel .date-mini input,
  .map-advanced-panel button,
  .map-advanced-panel .button-like {
    width: 100%;
    justify-content: center;
  }
  .map-advanced-panel .map-update-note {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
  .map-panel .china-map {
    min-height: 430px;
    margin-bottom: -80px;
  }
}
@media (max-width: 640px) {
  .admin-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 24px);
    padding: 14px;
  }
  .admin-tools {
    flex-direction: column;
  }
  .admin-tools button {
    width: 100%;
  }
  .bulk-import-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-form-grid .price-role-field {
    grid-column: auto;
  }
}
@media (max-width: 640px) {
  .app {
    padding: 10px 10px 44px;
    width: 100%;
  }
  .module-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 7px;
  }
  .module-btn {
    text-align: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 6px 6px 0 0;
    font-size: 14px;
  }
  .top {
    padding-top: 6px;
  }
  .top .brandbar {
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
  }
  .top .brandbar .wordmark {
    font-size: 20px;
    letter-spacing: 1px;
  }
  .top .brandbar .logo {
    width: 38px;
    height: 38px;
  }
  .top .brandbar .slogan {
    font-size: 10px;
    letter-spacing: 3px;
    margin-top: 3px;
  }
  .tabs {
    gap: 5px;
    padding-bottom: 8px;
  }
  .tabs .spacer {
    display: none;
  }
  .tabs button[data-tab] {
    order: 1;
  }
  .tabs button {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 14px;
    line-height: 1.1;
  }
  .price-module-active .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
  .price-module-active .tabs .price-subtab {
    width: 100%;
    min-height: 42px;
    padding: 6px 4px;
    white-space: normal;
    font-size: 12px;
  }
  .price-module-active .tabs .settings-menu {
    grid-column: 3;
    justify-self: end;
  }
  .tabs #refreshBtn {
    order: 2;
    min-height: 32px;
    padding: 5px 9px;
    font-size: 13px;
  }
  .tabs .settings-menu {
    order: 2;
    display: inline-flex;
  }
  .tabs #settingsBtn {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 13px;
  }
  .refresh-hint {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    font-size: 10px;
  }
  .map-tools-left,
  .date-range-tools {
    width: 100%;
  }
  .map-tools-left .month-stepper,
  .map-tools-left .month-stepper-control {
    width: auto;
  }
  .map-tools-left .month-stepper {
    flex: 1 1 auto;
  }
  .map-tools-left .month-stepper-control {
    flex: 1 1 auto;
  }
  .map-tools-left .month-stepper-control select {
    width: 100%;
  }
  .map-toolbar select,
  .map-toolbar input[type="date"],
  .map-toolbar button,
  .map-toolbar .button-like {
    min-width: 0;
  }
  .date-range-tools .date-mini,
  .date-range-tools .date-mini input,
  .map-toolbar .button-like,
  .map-clear-all {
    flex: 1 1 100%;
  }
  .login-view {
    justify-items: center;
    padding: 18px;
    background-position: 64% center;
  }
  .login-card {
    background: rgba(255, 253, 247, .86);
  }
  .kpis { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 90px 1fr 70px; }
  .tile-map { grid-template-columns: repeat(6, minmax(42px, 1fr)); }
  .map-panel-head { display: grid; }
  .map-density-note {
    white-space: normal;
    overflow: visible;
  }
  .map-drill-back { width: fit-content; }
  .map-panel .china-map {
    min-height: 330px;
    aspect-ratio: .86;
    margin-bottom: -40px;
  }
  #productPage.page,
  #mapPage.page,
  #marketPage.page {
    gap: 10px;
  }
  #productPage.page.has-fixed-toolbar,
  #mapPage.page.has-fixed-toolbar {
    padding-top: calc(var(--report-toolbar-height, 54px) + 10px);
  }
  #productPage .product-filters.report-sticky-toolbar {
    left: 10px;
    right: 10px;
    top: calc(var(--report-fixed-top, 0px) + 4px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    align-items: center;
  }
  #productPage .product-filters .seg {
    gap: 3px;
  }
  #productPage .product-filters .seg button {
    min-height: 34px;
    width: 40px;
    padding: 0;
    font-size: 15px;
  }
  #productPage .product-filters label,
  #productPage .product-filters .date-step-label {
    min-width: 0;
    width: 100%;
  }
  #productPage .product-filters .date-step-group {
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
  }
  #productPage .product-filters .date-step {
    width: 34px;
    height: 34px;
  }
  #productPage .product-filters input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    font-size: 14px;
    text-align: center;
  }
  #productPage .product-filter-panel,
  #mapPage .map-channel-filter,
  #mapPage .map-category-filter {
    padding: 10px;
    gap: 8px;
    border-radius: 5px;
  }
  #productPage .category-pills,
  #mapPage .category-pills {
    gap: 6px;
  }
  #productPage .cat-pill,
  #mapPage .cat-pill {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
  }
  #productPage .cat-pill.child,
  #mapPage .cat-pill.child {
    font-size: 12px;
    padding: 6px 9px;
  }
  #productPage .daily-card,
  #mapPage .panel,
  #mapPage .map-trend-panel,
  #mapPage .sku-trend-panel,
  #mapPage .sku-table-panel {
    padding: 12px;
    border-radius: 5px;
  }
  #productPage .daily-card h2,
  #mapPage .panel h2,
  #mapPage .rank-panel-head h3 {
    font-size: 21px;
    margin-bottom: 6px;
  }
  #productPage .product-kpi-grid,
  #mapPage .kpis {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 0;
  }
  #productPage .daily-kpi-card,
  #mapPage .kpi {
    min-height: 0;
    padding: 12px 14px;
  }
  #productPage .daily-kpi-card .k,
  #mapPage .kpi .k {
    font-size: 12px;
    margin-bottom: 5px;
  }
  #productPage .daily-kpi-card .v,
  #mapPage .kpi .v {
    font-size: 30px;
  }
  #productPage .product-quadrant-card {
    min-height: 0;
    margin-bottom: 10px;
  }
  #productPage .quadrant-wrap,
  #productPage .product-heatmap-scroll,
  #productPage .product-sku-case-scroll,
  #productPage .chart-scroll,
  #mapPage .map-rank-chart-wrap,
  #mapPage .sku-table-panel,
  #mapPage .sku-trend-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #productPage .product-quadrant-chart {
    min-width: 760px;
    height: 520px;
  }
  #productPage .product-lower-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }
  #productPage .product-lower-grid .product-pareto-chart {
    min-width: 680px;
    height: 360px;
  }
  #productPage .product-heatmap-grid {
    min-width: 760px;
  }
  #productPage .product-heatmap-name,
  #productPage .product-heatmap-cell,
  #productPage .product-heatmap-grid .heatmap-head {
    min-height: 40px;
    padding: 7px 8px;
  }
  #productPage .product-trend-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #productPage .product-trend-card {
    min-height: 112px;
    padding: 9px;
  }
  #productPage .product-spark {
    height: 74px;
  }
  #productPage .product-sku-case-head {
    display: grid;
    gap: 8px;
  }
  #productPage .product-sku-case-summary {
    justify-items: stretch;
    text-align: left;
    min-width: 0;
  }
  #productPage .sku-case-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #productPage .sku-case-summary-cell {
    min-height: 50px;
    padding: 7px 8px;
  }
  #productPage .sku-case-summary-cell b {
    font-size: 14px;
  }
  #productPage .product-sku-case-table {
    min-width: 760px;
  }
  #productPage .product-sku-case-table th,
  #productPage .product-sku-case-table td {
    padding: 8px 9px;
    font-size: 12px;
  }
  #productPage .product-sku-case-table th:first-child,
  #productPage .product-sku-case-table td:first-child {
    min-width: 190px;
  }
  #mapPage .map-toolbar.report-sticky-toolbar {
    left: 10px;
    right: 10px;
    top: calc(var(--report-fixed-top, 0px) + 4px);
    gap: 8px;
    padding: 8px;
  }
  #mapPage .map-tools-left {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    gap: 8px;
    align-items: center;
  }
  #mapPage .map-tools-left .month-stepper {
    min-width: 0;
    width: 100%;
  }
  #mapPage .map-tools-left .month-stepper-control {
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
  }
  #mapPage .map-tools-left .month-stepper-control select {
    width: 100%;
  }
  #mapPage .map-toolbar .map-advanced-label {
    min-width: 88px;
    height: 34px;
  }
  #mapPage .map-advanced-panel {
    padding: 8px;
  }
  #mapPage .map-advanced-panel .date-range-tools {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  #mapPage .map-advanced-panel .date-mini,
  #mapPage .map-advanced-panel button,
  #mapPage .map-advanced-panel .button-like,
  #mapPage .map-clear-all {
    min-height: 34px;
  }
  #mapPage .kpis {
    background: transparent;
    border: 0;
  }
  #mapPage .kpi {
    border: 1px solid var(--line);
  }
  #mapPage .map-panel {
    padding: 12px;
  }
  #mapPage .map-rank-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  #mapPage .map-rank-list {
    display: none;
  }
  #mapPage .map-rank-mobile-list {
    display: grid;
    gap: 7px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 2px;
  }
  #mapPage .map-rank-mobile-card {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 1px solid rgba(220, 196, 136, .70);
    background: rgba(255, 253, 247, .76);
    color: var(--ink);
    text-align: left;
    box-shadow: none;
  }
  #mapPage .map-rank-mobile-card:active,
  #mapPage .map-rank-mobile-card:focus-visible {
    border-color: var(--brandBrown);
    background: rgba(255, 204, 0, .14);
  }
  #mapPage .mobile-rank-index {
    color: var(--muted);
    font-family: var(--font-subtitle);
    font-size: 12px;
    text-align: right;
  }
  #mapPage .mobile-rank-main {
    min-width: 0;
    display: grid;
    gap: 5px;
  }
  #mapPage .mobile-rank-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-subtitle);
    font-size: 15px;
    color: var(--ink2);
  }
  #mapPage .mobile-rank-track {
    height: 6px;
    overflow: hidden;
    background: rgba(242, 162, 58, .15);
    border: 1px solid rgba(242, 162, 58, .26);
  }
  #mapPage .mobile-rank-track i {
    display: block;
    height: 100%;
    background: #f2a23a;
  }
  #mapPage .mobile-rank-value {
    color: var(--ink2);
    font-family: var(--font-subtitle);
    font-size: 14px;
    white-space: nowrap;
  }
  #mapPage .mobile-rank-share {
    min-width: 48px;
    color: var(--muted);
    font-family: var(--font-subtitle);
    font-size: 12px;
    text-align: right;
  }
  #mapPage .map-trend-panel {
    min-height: 0;
  }
  #mapPage .map-trend-chart {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 240px;
    height: auto;
  }
  #mapPage .map-rank-chart {
    min-width: 0;
    width: 100%;
    height: 300px;
  }
  #mapPage .sku-rank-table {
    min-width: 760px;
  }
  #mapPage .sku-rank-table th,
  #mapPage .sku-rank-table td {
    font-size: 12px;
    padding: 8px 7px;
  }
  #mapPage .sku-share-diff {
    min-width: 86px;
  }
  #mapPage .sku-table-panel {
    overflow-x: visible;
  }
  #mapPage .sku-table-panel .sku-rank-table {
    display: none;
  }
  #mapPage .sku-card-list {
    display: grid;
    gap: 8px;
  }
  #mapPage .sku-rank-card {
    border: 1px solid var(--line);
    background: var(--card);
    padding: 10px;
  }
  #mapPage .sku-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
  }
  #mapPage .sku-card-head h3 {
    font-family: var(--font-subtitle);
    font-size: 14px;
    line-height: 1.35;
    color: var(--ink);
  }
  #mapPage .sku-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  #mapPage .sku-card-trend,
  #mapPage .sku-card-share {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    height: 28px;
    padding: 4px 7px;
    border-color: var(--line);
    background: transparent;
    font-size: 11px;
  }
  #mapPage .sku-card-trend img,
  #mapPage .sku-card-share svg {
    width: 13px;
    height: 13px;
  }
  .sku-share-pie-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sku-share-pie-svg {
    max-width: 260px;
    justify-self: center;
  }
  .sku-share-legend-row {
    grid-template-columns: 10px minmax(0, 1fr) 54px 72px;
    padding: 7px 8px;
    font-size: 12px;
  }
  #mapPage .sku-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 10px;
  }
  #mapPage .sku-card-metrics > div {
    min-width: 0;
  }
  #mapPage .sku-card-metrics span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
  }
  #mapPage .sku-card-metrics b {
    display: block;
    color: var(--ink);
    font-family: var(--font-subtitle);
    font-size: 14px;
    line-height: 1.25;
  }
  #mapPage .sku-card-diff {
    grid-column: 1 / -1;
  }
  #mapPage .sku-card-diff .sku-share-diff {
    max-width: 180px;
  }
  #marketPage .market-frame {
    min-height: 2200px;
  }
  .sku-trend-backdrop {
    padding: 10px;
    -webkit-overflow-scrolling: touch;
  }
  .sku-trend-modal {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    padding: 10px;
  }
  .sku-trend-modal .rank-panel-head.compact {
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: flex-start;
    gap: 8px;
    margin: -10px -10px 8px;
    padding: 10px;
    background: rgba(255, 253, 247, .96);
    border-bottom: 1px solid var(--line);
  }
  .sku-trend-modal .rank-panel-head.compact h3 {
    font-size: 20px;
    line-height: 1.15;
    margin: 0 0 4px;
  }
  .sku-trend-modal .rank-panel-head.compact .note {
    font-size: 11px;
    line-height: 1.35;
  }
  .sku-trend-close {
    min-width: 56px;
    min-height: 32px;
    padding: 5px 9px;
    font-size: 13px;
  }
  .sku-trend-modal .map-trend-chart {
    min-height: 280px;
  }
  .sku-share-modal {
    width: min(100%, calc(100vw - 20px));
  }
  .sku-share-pie-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .sku-share-pie-svg {
    width: min(250px, 72vw);
    max-width: none;
    justify-self: center;
  }
  .sku-share-pie-svg .pie-center-title {
    font-size: 13px;
  }
  .sku-share-pie-svg .pie-center-value {
    font-size: 26px;
  }
  .sku-share-legend {
    gap: 6px;
  }
  .sku-share-legend-row {
    grid-template-columns: 10px minmax(0, 1fr) 52px 68px;
    gap: 6px;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }
  #dailyPage.page {
    gap: 10px;
  }
  #dailyPage.page.has-fixed-toolbar {
    padding-top: calc(var(--report-toolbar-height, 54px) + 10px);
  }
  #dailyPage .daily-filters.report-sticky-toolbar {
    left: 10px;
    right: 10px;
    top: calc(var(--report-fixed-top, 0px) + 4px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    align-items: center;
  }
  #dailyPage .daily-filters .seg {
    gap: 3px;
  }
  #dailyPage .daily-filters .seg button {
    min-height: 34px;
    width: 40px;
    padding: 0;
    font-size: 15px;
  }
  #dailyPage .daily-filters label,
  #dailyPage .daily-filters .date-step-label {
    min-width: 0;
    width: 100%;
  }
  #dailyPage .daily-filters .date-step-group {
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
  }
  #dailyPage .daily-filters .date-step {
    width: 34px;
    height: 34px;
  }
  #dailyPage .daily-filters input {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    font-size: 14px;
    text-align: center;
  }
  #dailyPage .daily-kpi-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 0;
  }
  #dailyPage .daily-kpi-card {
    min-height: 0;
    padding: 12px 14px;
    border-radius: 5px;
  }
  #dailyPage .daily-kpi-card .k {
    font-size: 12px;
    margin-bottom: 5px;
  }
  #dailyPage .daily-kpi-card .v {
    font-size: 30px;
  }
  #dailyPage .daily-rate-row {
    margin-top: 6px;
    gap: 8px;
  }
  #dailyPage .daily-rate-row .daily-rate {
    font-size: 12px;
  }
  #dailyPage .daily-wide-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 0;
  }
  #dailyPage .daily-card {
    padding: 12px;
    border-radius: 5px;
  }
  #dailyPage .daily-card h2 {
    font-size: 21px;
    margin-bottom: 8px;
  }
  #dailyPage .daily-pie-card,
  #dailyPage .daily-platform-card {
    min-height: 0;
  }
  #dailyPage .daily-pie-desktop-svg {
    display: none;
  }
  #dailyPage .daily-pie-mobile-svg {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    max-width: 360px;
  }
  #dailyPage .daily-pie-mobile-svg .daily-pie-slice {
    stroke-width: 4;
  }
  #dailyPage .pie-center-title {
    font-size: 16px;
  }
  #dailyPage .pie-center-value {
    font-size: 28px;
  }
  #dailyPage .daily-pie-mobile-legend {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
  }
  #dailyPage .daily-pie-legend-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid rgba(231, 214, 171, .9);
    background: rgba(255, 253, 247, .76);
    text-align: left;
  }
  #dailyPage .daily-pie-legend-item.on {
    background: rgba(255, 204, 0, .22);
    border-color: var(--brandBrown);
    color: var(--ink);
  }
  #dailyPage .daily-pie-legend-item i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }
  #dailyPage .daily-pie-legend-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-subtitle);
    font-size: 13px;
  }
  #dailyPage .daily-pie-legend-item b,
  #dailyPage .daily-pie-legend-item em {
    font-style: normal;
    font-family: var(--font-subtitle);
    font-size: 12px;
    white-space: nowrap;
  }
  #dailyPage .daily-pie-legend-item em {
    color: var(--muted);
  }
  #dailyPage .daily-channel-overview-wrap {
    overflow: visible;
  }
  #dailyPage .daily-channel-overview-table,
  #dailyPage .daily-channel-overview-table tbody,
  #dailyPage .daily-channel-overview-table tr,
  #dailyPage .daily-channel-overview-table td {
    display: block;
  }
  #dailyPage .daily-channel-overview-table thead {
    display: none;
  }
  #dailyPage .daily-channel-overview-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(231, 214, 171, .86);
  }
  #dailyPage .daily-channel-overview-table td {
    border: 0;
    padding: 0;
    text-align: left;
    background: transparent !important;
  }
  #dailyPage .daily-channel-overview-table .overview-name {
    grid-column: 1;
    font-size: 15px;
  }
  #dailyPage .daily-channel-overview-table .overview-amount {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    text-align: right;
    font-size: 23px;
  }
  #dailyPage .daily-channel-overview-table .overview-rate {
    display: inline-block;
    margin-right: 8px;
    font-size: 12px;
  }
  #dailyPage .daily-pie-store-table th,
  #dailyPage .daily-pie-store-table td {
    font-size: 13px;
    padding: 8px 6px;
  }
  #dailyPage .daily-pie-store-table .subtotal-row td {
    font-size: 14px;
  }
  #dailyPage .daily-price-card,
  #dailyPage .daily-trend-card,
  #dailyPage .channel-driver-card {
    margin-bottom: 10px;
  }
  #dailyPage .price-table-wrap,
  #dailyPage .driver-table-wrap,
  #dailyPage .chart-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #dailyPage .price-table-wrap {
    max-height: none;
  }
  #dailyPage .price-diagnostic-table {
    min-width: 680px;
  }
  #dailyPage .price-diagnostic-table th,
  #dailyPage .price-diagnostic-table td {
    font-size: 12px;
    padding: 8px 7px;
  }
  #dailyPage .price-metric-with-trend {
    gap: 4px;
  }
  #dailyPage .trend-toolbar {
    display: grid;
    gap: 8px;
  }
  #dailyPage .trend-legend {
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  #dailyPage .trend-chip {
    min-height: 30px;
    white-space: nowrap;
    font-size: 12px;
  }
  #dailyPage .trend-chart {
    min-width: 700px;
  }
  #dailyPage .driver-title-row {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
  }
  #dailyPage .driver-title-row p {
    font-size: 12px;
  }
  #dailyPage .driver-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #dailyPage .driver-filter-chip {
    min-height: 48px;
    padding: 7px 9px;
    font-size: 12px;
  }
  #dailyPage .driver-filter-chip b {
    font-size: 13px;
  }
  #dailyPage .driver-attribution-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #dailyPage .driver-attribution-panel {
    padding: 10px;
  }
  #dailyPage .driver-rank-list {
    gap: 7px;
  }
  #dailyPage .driver-rank-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 7px;
  }
  #dailyPage .driver-rank-label {
    font-size: 12px;
  }
  #dailyPage .channel-driver-table {
    min-width: 820px;
  }
  #dailyPage .channel-driver-table th,
  #dailyPage .channel-driver-table td {
    font-size: 12px;
    padding: 8px 7px;
  }
  .product-kpi-grid { grid-template-columns: 1fr; }
  .product-quadrant-chart { min-width: 760px; }
  .product-trend-grid { grid-template-columns: 1fr; }
  .driver-filter-row { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .settings-panel { left: auto; right: 0; top: calc(100% + 6px); }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  .chart-scroll,
  .heatmap-scroll,
  .product-heatmap-scroll,
  .product-sku-case-scroll,
  .quadrant-wrap,
  #mapPage .map-rank-chart-wrap,
  #mapPage .sku-trend-panel {
    max-width: 100%;
    overscroll-behavior-x: contain;
  }
  #dailyPage .trend-chart,
  #dailyPage .dealer-chart {
    min-width: 0;
    width: 100%;
  }
  #dailyPage .channel-heatmap-grid {
    min-width: 760px;
  }
  #productPage .product-quadrant-chart {
    min-width: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1.24;
  }
  #productPage .product-lower-grid .product-pareto-chart {
    min-width: 620px;
  }
  #mapPage .map-trend-chart {
    min-width: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1.55;
  }
  #mapPage .map-rank-grid {
    min-width: 0;
  }
  .trend-x-label {
    font-size: 9px;
  }
}
@media (max-width: 380px) {
  .top .brandbar {
    padding: 7px 9px;
  }
  .top .brandbar .wordmark {
    font-size: 18px;
  }
  .top .brandbar .logo {
    width: 34px;
    height: 34px;
  }
  .tabs button {
    padding: 5px 7px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .traffic-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .traffic-status {
    grid-column: 1 / -1;
    white-space: normal;
  }
  .traffic-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .traffic-main-grid {
    grid-template-columns: 1fr;
  }
  .traffic-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .traffic-section-head {
    align-items: start;
    flex-direction: column;
  }
  .traffic-media-section .traffic-section-head {
    align-items: center;
    flex-direction: row;
  }
  .traffic-section-head > span {
    text-align: left;
  }
}

@media (max-width: 640px) {
  #trafficPage.page {
    gap: 10px;
  }
  .traffic-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .traffic-period-segment {
    justify-content: flex-start;
  }
  .traffic-toolbar label {
    width: min(100%, 220px);
  }
  .traffic-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .traffic-kpi-card {
    min-height: 112px;
    padding: 12px;
  }
  .traffic-kpi-card strong {
    font-size: 24px;
  }
  .traffic-donut {
    grid-template-columns: 1fr;
  }
  .traffic-donut-svg {
    max-width: 200px;
    justify-self: center;
  }
  .traffic-donut-row {
    grid-template-columns: 10px minmax(0, 1fr) 52px 74px;
    font-size: 12px;
  }
  .traffic-section {
    padding: 14px;
    gap: 12px;
  }
  .traffic-section-head h2 {
    font-size: 20px;
  }
  .traffic-mode-grid,
  .traffic-shelf-summary {
    grid-template-columns: 1fr;
  }
  .traffic-mode-trend-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .traffic-mode-trend-chart {
    min-width: 560px;
  }
  .traffic-mode-card > strong,
  .traffic-shelf-summary strong {
    font-size: 22px;
  }
  .traffic-mode-card:not(.is-cooperation) .traffic-mode-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .traffic-table {
    display: none;
  }
  .traffic-mobile-list {
    display: grid;
    gap: 8px;
  }
  .traffic-mobile-row {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--paper2);
  }
  .traffic-mobile-title {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-bottom: 10px;
    color: var(--ink);
    font-family: var(--font-subtitle);
    font-size: 13px;
  }
  .traffic-mobile-title-text {
    min-width: 0;
    flex: 1 1 auto;
  }
  .traffic-mobile-title .traffic-trend-btn {
    width: 22px;
    height: 22px;
  }
  .traffic-trend-backdrop {
    align-items: flex-start;
    padding: max(56px, calc(env(safe-area-inset-top, 0px) + 16px)) 10px max(10px, env(safe-area-inset-bottom, 0px));
  }
  .traffic-trend-modal {
    width: 100%;
    max-height: calc(100vh - 66px);
    max-height: calc(100dvh - 66px);
    padding: 16px;
  }
  .traffic-trend-modal-head {
    min-height: 34px;
    margin-bottom: 16px;
    padding: 0 42px;
  }
  .traffic-trend-modal-head h2 {
    max-width: 100%;
    font-size: 18px;
  }
  .traffic-trend-metric-grid {
    grid-template-columns: 1fr;
  }
  .traffic-trend-metric-card:last-child {
    grid-column: auto;
  }
  .traffic-trend-date-row,
  .traffic-trend-values {
    gap: 3px;
    font-size: 9px;
  }
  .traffic-mobile-sep {
    color: var(--muted);
  }
  .traffic-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }
  .traffic-mobile-metrics div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid rgba(176, 106, 20, .12);
    padding-bottom: 4px;
  }
  .traffic-mobile-metrics span {
    color: var(--muted);
    font-size: 11px;
  }
  .traffic-mobile-metrics strong {
    color: var(--ink2);
    font-family: var(--font-subtitle);
    font-size: 12px;
    text-align: right;
  }
}
