:root {
  --bg: #061427;
  --bg-soft: #0b1d36;
  --panel: rgba(13, 28, 52, 0.96);
  --panel-strong: rgba(16, 36, 66, 0.98);
  --panel-deep: rgba(7, 18, 35, 0.94);
  --border: rgba(125, 157, 201, 0.22);
  --border-strong: rgba(148, 184, 231, 0.34);
  --text: #f8fbff;
  --subtle: #d9e6f7;
  --muted: #96aac8;
  --primary: #56b8ff;
  --primary-strong: #2e8fff;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --shadow: 0 24px 64px rgba(1, 10, 24, 0.52);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --container: 1400px;
  --bg-gradient-start: #04101f;
  --bg-gradient-end: #0a1b34;
  --bg-glow-left: rgba(63, 146, 255, 0.12);
  --bg-glow-right: rgba(45, 107, 214, 0.10);
  --topbar-bg: rgba(6, 20, 39, 0.82);
  --topbar-border: rgba(125, 157, 201, 0.16);
  --card-bg: linear-gradient(180deg, rgba(16, 36, 66, 0.98) 0%, rgba(8, 20, 39, 0.98) 100%);
  --card-top-line: linear-gradient(90deg, rgba(162, 197, 255, 0.26), transparent);
  --btn-bg: rgba(14, 30, 56, 0.86);
  --btn-hover-bg: rgba(22, 46, 82, 0.96);
  --btn-ghost-bg: rgba(10, 24, 45, 0.70);
  --field-bg: rgba(5, 15, 30, 0.62);
  --field-placeholder: rgba(163, 184, 208, 0.88);
  --table-wrap-bg: rgba(5, 15, 30, 0.28);
  --table-head-bg: rgba(10, 24, 45, 0.98);
  --table-cell-bg: rgba(12, 27, 49, 0.58);
  --table-row-hover-bg: rgba(26, 53, 92, 0.68);
  --table-link-hover-bg: rgba(125, 157, 201, 0.08);
  --empty-bg: rgba(8, 20, 39, 0.40);
  --panel-soft-bg: rgba(12, 27, 49, 0.64);
  --panel-soft-2-bg: rgba(11, 25, 46, 0.76);
  --panel-soft-3-bg: rgba(16, 36, 66, 0.82);
  --metric-bg: linear-gradient(180deg, rgba(18, 40, 72, 0.92), rgba(9, 20, 39, 0.88));
  --quick-action-bg: linear-gradient(180deg, rgba(18, 40, 72, 0.90), rgba(10, 24, 45, 0.88));
  --quick-action-hover-bg: linear-gradient(180deg, rgba(28, 59, 103, 0.96), rgba(14, 30, 56, 0.94));
  --badge-bg: rgba(86, 184, 255, 0.16);
  --badge-border: rgba(86, 184, 255, 0.24);
  --badge-text: #c8e7ff;
  --danger-bg-soft: rgba(127, 29, 29, 0.30);
  --danger-border-soft: rgba(248, 113, 113, 0.28);
  --danger-text-soft: #fecaca;
  --success-bg-soft: rgba(16, 185, 129, 0.16);
  --success-border-soft: rgba(52, 211, 153, 0.24);
  --success-text-soft: #d1fae5;
  --theme-toggle-bg: rgba(14, 30, 56, 0.90);
  --theme-toggle-border: rgba(125, 157, 201, 0.22);
  --theme-toggle-text: var(--text);
}


html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f8fbff;
  --panel: rgba(255, 255, 255, 0.98);
  --panel-strong: rgba(255, 255, 255, 1);
  --panel-deep: rgba(250, 252, 255, 0.98);
  --border: rgba(203, 213, 225, 0.92);
  --border-strong: rgba(148, 163, 184, 0.48);
  --text: #0f172a;
  --subtle: #1e293b;
  --muted: #475569;
  --primary: #1d4ed8;
  --primary-strong: #1e40af;
  --success: #15803d;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  --bg-gradient-start: #ffffff;
  --bg-gradient-end: #f3f7fc;
  --bg-glow-left: rgba(191, 219, 254, 0.36);
  --bg-glow-right: rgba(219, 234, 254, 0.34);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --topbar-border: rgba(203, 213, 225, 0.88);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(247, 250, 252, 1) 100%);
  --card-top-line: linear-gradient(90deg, rgba(59, 130, 246, 0.16), transparent);
  --btn-bg: rgba(255, 255, 255, 0.98);
  --btn-hover-bg: rgba(241, 245, 249, 1);
  --btn-ghost-bg: rgba(248, 250, 252, 1);
  --field-bg: rgba(255, 255, 255, 1);
  --field-placeholder: rgba(71, 85, 105, 0.90);
  --table-wrap-bg: rgba(255, 255, 255, 0.96);
  --table-head-bg: rgba(248, 250, 252, 1);
  --table-cell-bg: rgba(255, 255, 255, 1);
  --table-row-hover-bg: rgba(241, 245, 249, 0.95);
  --table-link-hover-bg: rgba(241, 245, 249, 0.95);
  --empty-bg: rgba(248, 250, 252, 0.96);
  --panel-soft-bg: rgba(248, 250, 252, 1);
  --panel-soft-2-bg: rgba(255, 255, 255, 1);
  --panel-soft-3-bg: rgba(241, 245, 249, 1);
  --metric-bg: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
  --quick-action-bg: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 1));
  --quick-action-hover-bg: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(241, 245, 249, 1));
  --badge-bg: rgba(37, 99, 235, 0.08);
  --badge-border: rgba(37, 99, 235, 0.18);
  --badge-text: #1e40af;
  --danger-bg-soft: rgba(254, 242, 242, 1);
  --danger-border-soft: rgba(248, 113, 113, 0.24);
  --danger-text-soft: #b91c1c;
  --success-bg-soft: rgba(240, 253, 244, 1);
  --success-border-soft: rgba(74, 222, 128, 0.24);
  --success-text-soft: #166534;
  --theme-toggle-bg: rgba(255, 255, 255, 0.98);
  --theme-toggle-border: rgba(203, 213, 225, 0.96);
  --theme-toggle-text: var(--text);
}


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

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

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, var(--bg-glow-left), transparent 26%),
    radial-gradient(circle at top right, var(--bg-glow-right), transparent 20%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text);
  font-family: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  transition: background .2s ease, color .2s ease;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container,
.page,
.topbarInner {
  width: min(calc(100vw - 40px), var(--container));
  margin: 0 auto;
}

.page {
  padding: 28px 0 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
}

.topbarInner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbarTitle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.topbarTitle .mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.topNav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topNavLink {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #e2e8f0;
  transition: .18s ease;
}

.topNavLink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.75);
  transition: .18s ease;
}

.topNavLink:hover {
  color: #ffffff;
}

.topNavLink:hover::after {
  background: #38bdf8;
  height: 3px;
}

.topNavLink.active {
  color: #ffffff;
}

.topNavLink.active::after {
  background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%);
  height: 3px;
}

.topbarActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.toolbar h1,
.toolbar h2,
.toolbar h3 {
  margin: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sideLabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sideLabel::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
}

.subline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.card,
.compareTopCard {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 22px;
}

.compareTopCard {
  overflow: hidden;
}

.card::before,
.compareTopCard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--card-top-line);
  pointer-events: none;
}

.mb16 {
  margin-bottom: 20px;
}

.mb24 {
  margin-bottom: 24px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: var(--btn-bg);
  color: var(--text);
  font-weight: 700;
  transition: .18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.3);
  background: var(--btn-hover-bg);
}

.btnPrimary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.btnPrimary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
}

.btnGhost {
  background: var(--btn-ghost-bg);
}

.btnSm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.alert {
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid transparent;
  margin-bottom: 16px;
}

.alert.error {
  color: var(--danger-text-soft);
  background: var(--danger-bg-soft);
  border-color: var(--danger-border-soft);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--subtle);
}

.field input,
.field select,
.field textarea {
  min-height: 46px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: var(--field-bg);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition: .18s ease;
}

.field textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--field-placeholder);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.inlineActions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.compareActions {
  margin-top: 16px;
}

.personHero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.name {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.gradeBadge {
  min-width: 88px;
  height: 56px;
  padding: 0 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.miniGradeBadge {
  min-width: 44px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.14);
}

.grade-s {
  color: #fff7ed;
  background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
}

.grade-a {
  color: #ecfeff;
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
}

.grade-b {
  color: #f3f4f6;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.grade-c {
  color: #f0fdf4;
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

.grade-d {
  color: #fff1f2;
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
}

.grade-default {
  color: #e2e8f0;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.heroGross {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--panel-soft-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.heroGrossLabel {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
}

.heroGrossValue {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.1;
}

.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--panel-soft-2-bg);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--subtle);
  font-size: 13px;
  font-weight: 700;
}

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

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

.topMetricCard {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel-soft-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.topMetricCard .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.topMetricCard .value {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

.itemCard {
  border-radius: 20px;
  padding: 18px;
  background: var(--panel-soft-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.compareItemCard {
  position: relative;
  overflow: hidden;
}

.itemCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.itemTitle {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.itemMeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.winnerHero {
  margin: 14px 0 18px;
  padding: 20px 24px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(2, 6, 23, 0.78) 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
}

.winnerHeroLabel {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--muted);
}

.winnerHeroName {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
}

.winnerHero.positive .winnerHeroName {
  color: #7dd3fc;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.18);
}

.winnerHero.negative .winnerHeroName {
  color: #fca5a5;
  text-shadow: 0 0 18px rgba(239, 68, 68, 0.18);
}

.winnerHero.neutral .winnerHeroName {
  color: #e2e8f0;
}

.itemMetrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.itemMetric {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: var(--btn-ghost-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.itemMetric.full {
  grid-column: 1 / -1;
}

.itemMetric .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.45;
}

.itemMetric .value {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.value.positive,
.positive {
  color: #7dd3fc;
}

.value.negative,
.negative {
  color: #fca5a5;
}

.value.neutral,
.neutral {
  color: #e2e8f0;
}

.listPlain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.listPlain li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.listPlain li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.listPlain li:first-child {
  padding-top: 0;
}

.pillPositive,
.pillNegative {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.pillPositive {
  color: var(--badge-text);
  background: rgba(2, 132, 199, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.pillNegative {
  color: var(--danger-text-soft);
  background: rgba(185, 28, 28, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.22);
}

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

.itemRankMain {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.itemRankName {
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.35;
}

.itemRankMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

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

.itemRankLine {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.itemRankNameWide {
  min-width: 0;
  max-width: 220px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itemRankStat {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.itemRankStatLabel {
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  white-space: nowrap;
}

.itemRankStatValue {
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.itemRatePillLarge {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}

.tableWrap {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: var(--table-wrap-bg);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.table th,
.table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head-bg);
  color: var(--subtle);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.table td {
  color: var(--text);
  font-size: 14px;
  background: var(--table-cell-bg);
}

.table tbody tr:hover td {
  background: var(--table-row-hover-bg);
}

.table td.center,
.table th.center,
.center {
  text-align: center;
}

.table td.right,
.table th.right,
.right {
  text-align: right;
}

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

tr[data-href]:hover td {
  background: var(--table-link-hover-bg);
}

.peopleTable th,
.peopleTable td {
  text-align: center;
  vertical-align: middle;
}

.peopleTable td {
  font-variant-numeric: tabular-nums;
}

.peopleTable td .btn {
  margin: 0 auto;
}

.peopleTable .miniGradeBadge {
  margin: 0 auto;
}

.peopleTable tbody td {
  text-align: center !important;
}

.peopleTable thead th {
  text-align: center !important;
}

.chartWrap {
  position: relative;
  width: 100%;
  height: 320px;
  margin-top: 6px;
}

.emptyState {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  border-radius: 18px;
  background: var(--empty-bg);
  border: 1px dashed rgba(148, 163, 184, 0.16);
}

.historyWideTable {
  min-width: 1800px;
}

.historyWideTable th,
.historyWideTable td {
  white-space: nowrap;
  vertical-align: middle;
}

.historyWideTable th {
  position: sticky;
  top: 0;
  background: var(--table-head-bg);
  z-index: 1;
  text-align: center;
  padding: 12px 10px;
}

.historyWideTable td {
  padding: 12px 10px;
  font-variant-numeric: tabular-nums;
}

.historyWideTable td.center,
.historyWideTable th.center {
  text-align: center;
}

.historyHeadCell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  line-height: 1.2;
  gap: 2px;
}

.historyHeadMain {
  font-size: 12px;
  font-weight: 900;
  color: #e2e8f0;
  text-align: center;
}

.historyHeadSub {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-align: center;
}

.historyWideTable tbody td {
  text-align: center;
}

.historyWideTable tbody td:nth-child(2) {
  text-align: left;
  min-width: 180px;
}

.historyWideTable thead th:nth-child(2) .historyHeadCell {
  align-items: flex-start;
}

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

.metricCard {
  padding: 20px;
  border-radius: 20px;
  background: var(--metric-bg);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
}

.metricCard .label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.metricCard .value {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.metricCard .note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sectionTitleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(148,163,184,0.18), transparent);
  margin: 18px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  font-size: 12px;
  font-weight: 800;
}

.badge.error {
  background: var(--danger-bg-soft);
  border-color: var(--danger-border-soft);
  color: var(--danger-text-soft);
}

.badge.success {
  background: var(--success-bg-soft);
  border-color: var(--success-border-soft);
  color: var(--success-text-soft);
}

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

.quickActionBtn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 108px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--quick-action-bg);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
  transition: .18s ease;
}

.quickActionBtn:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.32);
  background: var(--quick-action-hover-bg);
}

.quickActionLabel {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.quickActionTitle {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
  color: #ffffff;
}

.homePeopleTable {
  table-layout: fixed;
  width: 100%;
}

.homePeopleTable th:nth-child(1),
.homePeopleTable td:nth-child(1) {
  width: 72px;
}

.homePeopleTable th:nth-child(2),
.homePeopleTable td:nth-child(2) {
  width: 140px;
}

.homePeopleTable th:nth-child(3),
.homePeopleTable td:nth-child(3) {
  width: 220px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.homePeopleTable th:nth-child(4),
.homePeopleTable td:nth-child(4) {
  width: 80px;
}

.homePeopleTable th:nth-child(5),
.homePeopleTable td:nth-child(5) {
  width: 120px;
}

.homePeopleTable th:nth-child(6),
.homePeopleTable td:nth-child(6) {
  width: 100px;
}

.footerSpace {
  height: 24px;
}

@media (max-width: 1200px) {
  .metricCards,
  .topMetricGrid,
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 1100px) {
  .compareBoard,
  .g2,
  .g3,
  .formGrid {
    grid-template-columns: 1fr;
  }

  .inlineActions {
    grid-column: auto;
  }

  .personHero {
    flex-direction: column;
    align-items: flex-start;
  }

  .name {
    font-size: 34px;
  }

  .gradeBadge {
    min-width: 76px;
    height: 50px;
    font-size: 24px;
  }

  .winnerHeroName {
    font-size: clamp(32px, 7vw, 52px);
  }

  .itemRankLine {
    gap: 12px;
    flex-wrap: nowrap;
  }

  .itemRankNameWide {
    min-width: 0;
    max-width: 180px;
    font-size: 15px;
  }

  .itemRankStatValue {
    font-size: 15px;
  }

  .itemRatePillLarge {
    min-height: 34px;
    font-size: 12px;
  }
}

@media (max-width: 720px) {
  .container,
  .page,
  .topbarInner {
    width: min(calc(100vw - 24px), 100%);
  }

  .page {
    padding: 20px 0 28px;
  }

  .topbarInner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topNav {
    gap: 14px;
  }

  .topNavLink {
    font-size: 14px;
    padding-bottom: 6px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .actions,
  .topbarActions {
    width: 100%;
  }

  .actions .btn,
  .topbarActions .btn {
    flex: 1 1 auto;
  }

  .card,
  .compareTopCard {
    padding: 16px;
    border-radius: 18px;
  }

  .name {
    font-size: 28px;
  }

  .topMetricGrid,
  .topMetricGridCompact,
  .metricCards,
  .quickActionGrid,
  .itemMetrics {
    grid-template-columns: 1fr;
  }

  .quickActionBtn {
    min-height: 88px;
    padding: 16px 18px;
  }

  .quickActionTitle {
    font-size: 22px;
  }

  .table {
    min-width: 640px;
  }

  .historyWideTable {
    min-width: 1600px;
  }

  .historyHeadMain {
    font-size: 11px;
  }

  .historyHeadSub {
    font-size: 10px;
  }

  .winnerHero {
    padding: 16px 18px;
  }

  .winnerHeroName {
    font-size: clamp(28px, 8vw, 42px);
  }

  .chartWrap {
    height: 280px;
  }

  .itemRankRowWide {
    align-items: center;
    gap: 10px;
  }

  .itemRankLine {
    width: auto;
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .itemRankNameWide {
    min-width: 0;
    max-width: 120px;
    font-size: 14px;
  }

  .itemRankStatValue {
    font-size: 14px;
  }

  .itemRatePillLarge {
    align-self: center;
    min-height: 32px;
    font-size: 11px;
    padding: 0 12px;
  }
}

/* Home ranking tight layout */
.homeTopGrid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;}
.homeCompactCard{min-width:0;overflow:hidden;padding:12px 12px 10px !important;height:100%;}
.homeCompactCard .toolbar{gap:8px;align-items:flex-start;margin-bottom:6px;}
.homeCompactCard .toolbar .actions{flex-shrink:0;margin-left:6px;}
.homeCompactCard .toolbar h3{font-size:22px;line-height:1.1;}
.homeCompactCard .toolbar .subline{font-size:12px;line-height:1.2;}
.homeCompactCard .btn.btnSm{padding:4px 8px;min-height:auto;font-size:11px;line-height:1.1;white-space:nowrap;}
.homeNoScroll{overflow:hidden;}
.homeCompactTable{width:100%;table-layout:fixed;margin:0;}
.homeCompactTable th,
.homeCompactTable td{padding:8px 4px;font-size:12px;line-height:1.15;}
.homeCompactTable th{white-space:nowrap;font-size:11px;letter-spacing:0;}
.homeCompactTable td{vertical-align:middle;}
.homeCompactTable .textCell{padding-left:3px;padding-right:3px;line-height:1.15;word-break:break-all;overflow-wrap:anywhere;}
.homeCompactTable .numCell,
.homeCompactTable .center,
.homeCompactTable .right{white-space:nowrap;padding-left:2px;padding-right:2px;}
.homeCompactTable a{color:inherit;text-decoration:none;}
.homeCompactTable a:hover{text-decoration:underline;}
.homePeopleTable th,
.homePeopleTable td{padding:6px 3px;font-size:11px;line-height:1.05;}
.homePeopleTable th:first-child,
.homePeopleTable td:first-child{padding-left:0;padding-right:2px;}
.homePeopleTable .textCell{padding-left:2px;padding-right:2px;}
.storeTightTable{width:100%;table-layout:fixed;border-collapse:collapse;}
.storeTightTable th,
.storeTightTable td{padding:4px 0 !important;font-size:10px !important;line-height:1.0 !important;vertical-align:middle;}
.storeTightTable thead th{font-size:10px !important;letter-spacing:-0.02em;white-space:nowrap;}
.storeTightTable th:first-child,
.storeTightTable td:first-child{padding-left:0 !important;}
.storeTightTable .textCell{padding-left:0 !important;padding-right:2px !important;word-break:break-all;overflow-wrap:anywhere;}
.storeTightTable .numCell{padding-left:0 !important;padding-right:0 !important;white-space:nowrap;}
.storeTightTable th:nth-child(2),
.storeTightTable td:nth-child(2),
.storeTightTable th:nth-child(3),
.storeTightTable td:nth-child(3){text-align:right !important;padding-left:0 !important;padding-right:0 !important;}
.storeTightTable th:nth-child(4),
.storeTightTable td:nth-child(4){text-align:center !important;padding-left:0 !important;padding-right:0 !important;}
.storeTightTable col:nth-child(1){width:40%;}
.storeTightTable col:nth-child(2){width:17%;}
.storeTightTable col:nth-child(3){width:27%;}
.storeTightTable col:nth-child(4){width:16%;}

/* person detail item monthly trend accordion */
.itemMonthlyTrendGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.itemTrendAccordion {
  padding: 18px 20px;
}

.itemTrendHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.itemTrendTitle {
  margin: 0;
  font-size: clamp(26px, 2.2vw, 32px);
  line-height: 1.05;
}

.itemTrendToggle {
  min-width: 136px;
}

.itemTrendToggle[aria-expanded="true"] {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(56, 189, 248, 0.28);
}

.itemTrendPanel {
  margin-top: 12px;
}

.itemTrendChartWrap {
  height: 320px;
  position: relative;
}

@media (max-width: 1100px) {
  .itemMonthlyTrendGrid {
    grid-template-columns: 1fr;
  }
}

/* person detail inline item trend toggle */
.itemTrendCard {
  display: flex;
  flex-direction: column;
}

.itemTrendInlineActions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.itemTrendCard .itemTrendPanel {
  margin-top: 12px;
}

.itemTrendCard .itemTrendChartWrap {
  height: 320px;
  position: relative;
}


/* store detail visual tuning */
.storeStrengthList {
  list-style: none;
  margin: 0;
  padding: 0;
}

.storeStrengthRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.storeStrengthRow:first-child {
  padding-top: 0;
}

.storeStrengthRow:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.storeStrengthMain {
  min-width: 0;
  flex: 1;
}

.storeStrengthName {
  color: #e5eefc;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.storeStrengthMeta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.storeStrengthRate {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.storeStrengthRate.is-positive {
  color: #bfeaff;
  background: rgba(2, 132, 199, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.storeStrengthRate.is-negative {
  color: var(--danger-text-soft);
  background: rgba(127, 29, 29, 0.26);
  border: 1px solid rgba(239, 68, 68, 0.18);
}


.storeBreakdownRingLabel {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--panel-soft-3-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.storeBreakdownChartCard {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(2, 6, 23, 0.42) 100%);
}

.storeBreakdownChartCard::after {
  content: '';
  position: absolute;
  inset: auto -40px -80px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.10) 0%, rgba(56, 189, 248, 0) 72%);
  pointer-events: none;
}

.storeBreakdownChartWrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.storeBreakdownCenter {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 148px;
  min-height: 148px;
  padding: 16px 14px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 50% 35%, rgba(30, 41, 59, 0.94) 0%, rgba(15, 23, 42, 0.96) 58%, rgba(2, 6, 23, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 8px 24px rgba(2, 6, 23, 0.36);
  pointer-events: none;
}

.storeBreakdownCenterLabel {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.storeBreakdownCenterValue {
  margin-top: 6px;
  color: #f8fafc;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.storeBreakdownCenterSub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}

.storeBreakdownAchievementRow {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
}

.storeBreakdownAchievementLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.storeBreakdownAchievementValue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: var(--panel-soft-3-bg);
  color: #e2e8f0;
}

.storeBreakdownAchievementValue.is-missed {
  color: var(--danger-text-soft);
  background: rgba(127, 29, 29, 0.30);
  border-color: rgba(239, 68, 68, 0.22);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.12);
}

.storeBreakdownAchievementValue.is-achieved {
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.30);
  border-color: rgba(74, 222, 128, 0.22);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.12);
}

.storeBreakdownAchievementValue.is-over {
  color: #f0fdf4;
  background: rgba(20, 83, 45, 0.38);
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.18);
}

.storeBreakdownGrid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.storeBreakdownChartCard {
  border-radius: 20px;
  padding: 18px;
  background: var(--panel-soft-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.storeBreakdownChartWrap {
  position: relative;
  height: 320px;
}

.storeBreakdownLegend {
  display: grid;
  gap: 12px;
}

.storeBreakdownLegendRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--panel-soft-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.storeBreakdownSwatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.storeBreakdownLabel {
  color: #e5eefc;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.storeBreakdownLegendValueWrap {
  text-align: right;
  flex: 0 0 auto;
}

.storeBreakdownLegendValue {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.05;
}

.storeBreakdownLegendRatio {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .storeBreakdownGrid {
    grid-template-columns: 1fr;
  }

  .storeStrengthName {
    font-size: 22px;
  }
}

@media (max-width: 720px) {
  .storeStrengthRow {
    align-items: flex-start;
  }

  .storeStrengthRate {
    min-width: 76px;
    min-height: 38px;
    font-size: 14px;
  }

  .storeBreakdownChartWrap {
    height: 280px;
  }
}


/* breakdown v2: single-column stacked layout + dual outer rings + external hover detail */
.storeBreakdownGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.storeBreakdownChartCard {
  border-radius: 22px;
  padding: 18px 18px 16px;
}

.storeBreakdownHeaderRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.storeBreakdownChartWrap {
  position: relative;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow: visible;
}

.storeBreakdownCanvasWrap {
  position: relative;
  width: min(100%, 430px);
  height: 360px;
  margin: 0 auto;
}

.storeBreakdownHoverCard {
  width: min(100%, 460px);
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(2, 6, 23, 0.62) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 28px rgba(2, 6, 23, 0.28);
}

.storeBreakdownHoverLabel {
  color: #e5eefc;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

.storeBreakdownHoverValue {
  margin-top: 6px;
  color: #f8fafc;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.storeBreakdownHoverMeta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.storeBreakdownRingStats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.storeBreakdownRingStat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--panel-soft-bg);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.storeBreakdownRingStatLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.storeBreakdownRingStatValue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: var(--panel-soft-3-bg);
  color: #e2e8f0;
}

.storeBreakdownRingStatValue.is-missed {
  color: var(--danger-text-soft);
  background: rgba(127, 29, 29, 0.30);
  border-color: rgba(239, 68, 68, 0.22);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.12);
}

.storeBreakdownRingStatValue.is-achieved {
  color: #dcfce7;
  background: rgba(20, 83, 45, 0.30);
  border-color: rgba(74, 222, 128, 0.22);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.12);
}

.storeBreakdownRingStatValue.is-over {
  color: #f0fdf4;
  background: rgba(20, 83, 45, 0.38);
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.18);
}


.storeBreakdownAccordion {
  margin-top: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(2, 6, 23, 0.56) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 12px 28px rgba(2, 6, 23, 0.22);
  overflow: hidden;
}

.storeBreakdownAccordionSummary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: #e5eefc;
  font-size: 15px;
  font-weight: 900;
}

.storeBreakdownAccordionSummary::-webkit-details-marker {
  display: none;
}

.storeBreakdownAccordionSummary::after {
  content: '＋';
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 18px;
  line-height: 1;
}

.storeBreakdownAccordion[open] .storeBreakdownAccordionSummary::after {
  content: '－';
}

.storeBreakdownAccordionHint {
  margin-left: auto;
  padding-right: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.storeBreakdownAccordionBody {
  padding: 0 14px 14px;
}

.storeBreakdownAccordion .storeBreakdownLegend {
  margin-top: 0;
}

@media (max-width: 900px) {
  .storeBreakdownCanvasWrap {
    width: min(100%, 360px);
    height: 320px;
  }

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

@media (max-width: 720px) {
  .storeBreakdownChartCard {
    padding: 16px 14px 14px;
  }

  .storeBreakdownCanvasWrap {
    width: min(100%, 320px);
    height: 300px;
  }

  .storeBreakdownHoverCard {
    padding: 12px 14px;
  }
}


/* monthly trend detail cards */
.monthlyTrendSummaryGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.monthlyTrendSummaryCard {
  padding: 18px;
}

.monthlyTrendSummaryHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.monthlyTrendSummaryTitle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.monthlyTrendSummaryName {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.08;
  color: #e5eefc;
}

.monthlyTrendSummaryMeta {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.monthlyTrendSummaryMeta .itemMetric {
  min-height: 86px;
}

.monthlyTrendSummaryPanel {
  display: none;
  margin-top: 16px;
}

.monthlyTrendSummaryPanel.is-open {
  display: block;
}

.monthlyTrendSummaryChartWrap {
  height: 320px;
  position: relative;
}

@media (max-width: 720px) {
  .monthlyTrendSummaryName {
    font-size: 19px;
  }

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

  .monthlyTrendSummaryChartWrap {
    height: 280px;
  }
}



.itemCardActionRow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monthlyTrendSummaryCard.is-linked-focus {
  border-color: rgba(56, 189, 248, 0.56);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.16), 0 0 20px rgba(56, 189, 248, 0.22);
}

@media (max-width: 720px) {
  .itemCardActionRow {
    width: 100%;
    justify-content: flex-start;
  }
}


.itemCardInlinePanel {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.itemCardInlinePanelLabel {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.emptyState.compact {
  padding: 16px 12px;
}


/* compact month-only filters for stores / blocks */
.compactFilterCard {
  padding: 14px 16px;
}

.compactMonthFilter {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.compactMonthField {
  min-width: 180px;
  max-width: 220px;
  margin: 0;
}

.compactMonthField label {
  margin-bottom: 6px;
}

.compactMonthField select {
  min-width: 180px;
}

.compactMonthActions {
  margin: 0;
  align-self: end;
}

.compactMonthActions .btn {
  min-width: 88px;
}

@media (max-width: 720px) {
  .compactMonthFilter {
    align-items: stretch;
  }

  .compactMonthField,
  .compactMonthField select,
  .compactMonthActions,
  .compactMonthActions .btn {
    width: 100%;
    max-width: none;
  }
}


a, button, input, select, textarea, .card, .topbar, .table td, .table th, .badge, .btn {
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.topNavLink {
  color: var(--subtle);
}

.topNavLink:hover,
.topNavLink.active {
  color: var(--text);
}

.themeToggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--theme-toggle-border);
  background: var(--theme-toggle-bg);
  color: var(--theme-toggle-text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.themeToggle:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.themeToggleIcon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: white;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.22);
}

.themeToggleLabel {
  white-space: nowrap;
}

html[data-theme="light"] .topbar {
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .topbarTitle .mark {
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
}

html[data-theme="light"] .card,
html[data-theme="light"] .compareTopCard,
html[data-theme="light"] .metricCard,
html[data-theme="light"] .quickActionBtn,
html[data-theme="light"] .winnerHero,
html[data-theme="light"] .itemCard,
html[data-theme="light"] .topMetricCard,
html[data-theme="light"] .itemMetric,
html[data-theme="light"] .heroGross,
html[data-theme="light"] .chip {
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.72);
}

html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

html[data-theme="light"] .tableWrap {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

html[data-theme="light"] .historyHeadMain,
html[data-theme="light"] .itemRankName,
html[data-theme="light"] .itemRankNameWide,
html[data-theme="light"] .itemRankStatValue,
html[data-theme="light"] .winnerHero.neutral .winnerHeroName {
  color: var(--text);
}

html[data-theme="light"] .itemRankMeta,
html[data-theme="light"] .itemRankStatLabel,
html[data-theme="light"] .historyHeadSub {
  color: var(--muted);
}

html[data-theme="light"] .subline,
html[data-theme="light"] .muted,
html[data-theme="light"] .metricCard .note,
html[data-theme="light"] .heroGrossLabel,
html[data-theme="light"] .itemMeta,
html[data-theme="light"] .winnerHeroLabel,
html[data-theme="light"] .mobileDataMeta,
html[data-theme="light"] .mobileKpiLabel,
html[data-theme="light"] .userCellMeta,
html[data-theme="light"] .statusMeta {
  color: var(--muted);
}

html[data-theme="light"] .field label,
html[data-theme="light"] .compactMonthField label,
html[data-theme="light"] .adminStatLabel {
  color: var(--subtle);
}

html[data-theme="light"] .table th {
  color: var(--subtle);
}

html[data-theme="light"] .table td,
html[data-theme="light"] .btnGhost {
  color: var(--text);
}

html[data-theme="light"] .emptyState {
  color: var(--subtle);
}

@media (max-width: 900px) {
  .topbarInner {
    align-items: flex-start;
    padding: 12px 0;
  }

  .topbarActions {
    width: 100%;
    justify-content: space-between;
  }

  .topNav {
    gap: 14px;
  }

  .themeToggle {
    min-height: 38px;
    padding: 0 12px;
  }
}

/* Mobile layout additions */
.mobileOnly { display: none !important; }
.desktopOnly { display: block !important; }

.mobileCardList {
  display: grid;
  gap: 16px;
}

.mobileDataCard {
  padding: 16px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
}

.mobileDataHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mobileDataTitle {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--text);
  word-break: break-word;
}

.mobileDataMeta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.28;
}

.mobileRankBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.20);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mobileKpiGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 5px;
}

.mobileKpiItem {
  padding: 8px 10px 7px;
  border-radius: 12px;
  background: var(--panel-soft-bg);
  border: 1px solid var(--border);
}

.mobileKpiLabel {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.mobileKpiValue {
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.mobileCardActions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.mobileCardActions .btn {
  flex: 1 1 auto;
}


.mobileStoreCard,
.mobileBlockCard {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
}

.mobileStoreCard .mobileDataTitle,
.mobileBlockCard .mobileDataTitle,
.mobileStoreCard .mobileKpiValue,
.mobileBlockCard .mobileKpiValue {
  color: var(--text);
}

.mobileStoreCard .mobileDataMeta,
.mobileBlockCard .mobileDataMeta,
.mobileStoreCard .mobileKpiLabel,
.mobileBlockCard .mobileKpiLabel {
  color: var(--muted);
}

.mobileStoreCard .mobileKpiItem,
.mobileBlockCard .mobileKpiItem {
  background: var(--panel-soft-bg);
  border: 1px solid var(--border);
}

.mobileStoreCard .mobileRankBadge,
.mobileBlockCard .mobileRankBadge {
  background: linear-gradient(135deg, rgba(14,165,233,0.96), rgba(37,99,235,0.96));
  border: 1px solid rgba(125, 157, 201, 0.18);
  color: #f8fafc;
}


.peopleRankBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14,165,233,0.96), rgba(37,99,235,0.96));
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.22);
  white-space: nowrap;
}

.peopleRankBadgeMobile {
  min-width: 72px;
  min-height: 40px;
  font-size: 15px;
}

.peopleGradeBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(2,6,23,0.24);
}

.peopleGradeBadge.gradeS {
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(34,197,94,0.88), rgba(14,165,233,0.88));
}

.peopleGradeBadge.gradeA {
  color: #f0fdf4;
  background: linear-gradient(135deg, rgba(34,197,94,0.82), rgba(21,128,61,0.9));
}

.peopleGradeBadge.gradeB {
  color: #fffbeb;
  background: linear-gradient(135deg, rgba(245,158,11,0.9), rgba(217,119,6,0.92));
}

.peopleGradeBadge.gradeC {
  color: #fff7ed;
  background: linear-gradient(135deg, rgba(249,115,22,0.9), rgba(234,88,12,0.92));
}

.peopleGradeBadge.gradeD {
  color: #fef2f2;
  background: linear-gradient(135deg, rgba(239,68,68,0.9), rgba(190,24,93,0.92));
}

.peopleGradeBadge.gradeDefault {
  color: #e2e8f0;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.peopleNameCell {
  font-weight: 800;
}

.mobilePeopleCard {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
}

.peopleCardHead {
  margin-bottom: 8px;
}

.peopleCardMain {
  min-width: 0;
}

.peopleCardIdentity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.peopleGradeBadgeCompact {
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  flex: 0 0 auto;
}

.peopleCardBadgeRow {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.mobileKpiItemFull {
  grid-column: 1 / -1;
  margin-bottom: 5px;
}

.peopleGoalCard {
  background: var(--panel-soft-bg);
}

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

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

.peopleTable .peopleRankBadge,
.peopleTable .peopleGradeBadge {
  margin: 0 auto;
}

html[data-theme="light"] .mobilePeopleCard {
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.72);
}


html[data-theme="light"] .mobileDataCard,
html[data-theme="light"] .mobileStoreCard,
html[data-theme="light"] .mobileBlockCard {
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.72);
}

html[data-theme="light"] .mobileRankBadge,
html[data-theme="light"] .mobileStoreCard .mobileRankBadge,
html[data-theme="light"] .mobileBlockCard .mobileRankBadge {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: #1d4ed8;
}

html[data-theme="light"] .mobileKpiItem,
html[data-theme="light"] .mobileStoreCard .mobileKpiItem,
html[data-theme="light"] .mobileBlockCard .mobileKpiItem,
html[data-theme="light"] .mobileSectionChip {
  background: var(--panel-soft-bg);
  border-color: var(--border);
}

.mobileSectionNav {
  display: none;
}

.mobileSectionNavInner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobileSectionNavInner::-webkit-scrollbar {
  display: none;
}

.mobileSectionChip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--panel-soft-bg);
  border: 1px solid var(--border);
  color: var(--subtle);
  font-size: 12px;
  font-weight: 800;
}

.mobileHomeActions {
  display: none;
}

.mobileDetailCardCompact .materialRow {
  padding: 12px 0;
}

.mobileDetailCardCompact .materialName {
  font-size: 15px;
}

.mobileDetailCardCompact .ratePill {
  min-width: 68px;
  padding: 7px 10px;
}

@media (max-width: 720px) {
  .desktopOnly {
    display: none !important;
  }

  .mobileOnly {
    display: block !important;
  }

  .topbar {
    position: sticky;
    top: 0;
  }

  .topbarInner {
    gap: 12px;
  }

  .topbarActions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .topNav {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .topNav::-webkit-scrollbar {
    display: none;
  }

  .topNavLink {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .themeToggle {
    flex: 0 0 auto;
    align-self: auto;
  }

  .homeHeroActions {
    display: none;
  }

  .mobileHomeActions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }

  .mobileHomeActions .btn {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
  }

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

  .quickActionGrid.homeQuickActionGrid .quickActionBtn {
    min-height: 78px;
    padding: 14px 14px;
  }

  .quickActionGrid.homeQuickActionGrid .quickActionTitle {
    font-size: 18px;
  }

  .listPageActions,
  .personPageActions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .listPageActions .btn,
  .personPageActions .btn {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    font-size: 13px;
  }

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

  .compactMonthField,
  .compactMonthActions {
    grid-column: 1 / -1;
  }

  .compactMonthActions .btn {
    width: 100%;
  }

  .mobileCardList + .mobileCardList {
    margin-top: 12px;
  }

  .mobileSectionNav {
    display: block;
    margin: -4px 0 16px;
  }

  .tableWrap.mobileTableSoft {
    border-radius: 14px;
  }

  .personMonthSwitchForm {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .personMonthSwitchForm select {
    min-width: 0 !important;
    width: 100%;
  }

  .personMonthSwitchLabel {
    font-size: 14px;
  }


  .peopleRankBadgeMobile {
    min-width: 68px;
    min-height: 38px;
    font-size: 14px;
  }

  .peopleGradeBadge {
    min-width: 42px;
    height: 36px;
    font-size: 14px;
  }

  .peopleGradeBadgeCompact {
    min-width: 36px;
    height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }

  .mobilePeopleCard .mobileCardActions {
    margin-top: 10px;
  }

  .mobilePeopleCard .mobileDataHead {
    margin-bottom: 8px;
  }

  .mobilePeopleCard .mobileDataMeta {
    line-height: 1.35;
  }

  .mobileKpiItemFull {
    margin-bottom: 5px;
  }

  .peopleKpiGrid,
  .personDetailPage .topMetricGrid,
  .personDetailPage .itemMetrics {
    grid-template-columns: 1fr 1fr;
  }

  .personDetailPage .topMetricCard,
  .personDetailPage .itemMetric {
    padding: 14px;
  }

  .personDetailPage .topMetricCard .value,
  .personDetailPage .itemMetric .value {
    font-size: 20px;
  }
}


/* v10 list/detail refinements */
.mobileStoreCard .mobileDataHead > div,
.mobileBlockCard .mobileDataHead > div,
.peopleCardMain {
  min-width: 0;
}

.mobileStoreCard .mobileDataTitle,
.mobileBlockCard .mobileDataTitle {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  font-size: clamp(15px, 4.3vw, 18px);
}

.peopleCardMain .mobileDataMeta:first-of-type {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobileRankBadge,
.peopleRankBadge {
  min-width: 74px;
  padding: 0 12px;
}

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

.storeDetailPage .detailSplitGrid,
.blockDetailPage .detailSplitGrid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.storeDetailPage .topMetricCard,
.blockDetailPage .topMetricCard,
.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric {
  padding: 14px 14px 12px;
}

.storeDetailPage .topMetricCard .label,
.blockDetailPage .topMetricCard .label,
.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label {
  margin-bottom: 4px;
}

.storeDetailPage .chartWrap,
.blockDetailPage .chartWrap {
  height: 300px;
}

.storeDetailPage .detailCompactTable .table,
.blockDetailPage .detailCompactTable .table {
  min-width: 0;
}

.storeDetailPage .detailCompactTable .table th,
.storeDetailPage .detailCompactTable .table td,
.blockDetailPage .detailCompactTable .table th,
.blockDetailPage .detailCompactTable .table td {
  padding: 10px 8px;
}

.storeDetailPage .detailSublineStrong,
.blockDetailPage .detailSublineStrong {
  color: var(--subtle);
  font-weight: 700;
}

html[data-theme="light"] .storeDetailPage .subline,
html[data-theme="light"] .blockDetailPage .subline,
html[data-theme="light"] .storeDetailPage .table th,
html[data-theme="light"] .blockDetailPage .table th {
  color: var(--subtle);
}

@media (max-width: 720px) {
  .storeDetailPage .topMetricGrid,
  .blockDetailPage .topMetricGrid,
  .storeDetailPage .detailSplitGrid,
  .blockDetailPage .detailSplitGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storeDetailPage .chartWrap,
  .blockDetailPage .chartWrap {
    height: 260px;
  }

  .mobileStoreCard .mobileDataTitle,
  .mobileBlockCard .mobileDataTitle,
  .peopleCardMain .mobileDataMeta:first-of-type {
    font-size: 14px;
  }

  .mobileRankBadge,
  .peopleRankBadge,
  .peopleRankBadgeMobile {
    min-width: 82px;
    font-size: 12px;
  }
}


/* v12 compact personal cards and collapsible history */
.mobilePeopleCardList {
  gap: 18px;
}

.peopleCardMain .mobileDataMeta:first-of-type {
  font-size: clamp(10px, 3vw, 13px);
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.personDetailPage .card,
.personDetailPage .compareTopCard {
  padding: 18px 18px 16px;
}

.personDetailPage .grid,
.personDetailPage .topMetricGrid,
.personDetailPage .itemMetrics {
  gap: 10px;
}

.personDetailPage .topMetricCard,
.personDetailPage .itemCard,
.personDetailPage .itemMetric {
  padding-top: 12px;
  padding-bottom: 10px;
}

.personDetailPage .itemCardHead {
  margin-bottom: 10px;
}

.personDetailPage .topMetricCard .label,
.personDetailPage .itemMetric .label,
.personDetailPage .mobileKpiLabel {
  margin-bottom: 2px;
  line-height: 1.08;
}

.personDetailPage .topMetricCard .value,
.personDetailPage .itemMetric .value,
.personDetailPage .mobileKpiValue {
  line-height: 1.04;
}

.personDetailPage .materialRow {
  padding: 10px 0;
}

.personDetailPage .materialRow:first-child {
  padding-top: 2px;
}

.personDetailPage .materialMeta {
  gap: 6px;
}

.historyToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.historyCollapsePanel[hidden] {
  display: none !important;
}

.historyCollapsePanel {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .mobilePeopleCardList {
    gap: 20px;
  }

  .peopleCardMain .mobileDataMeta:first-of-type {
    font-size: clamp(10px, 2.9vw, 12px);
  }

  .personDetailPage .card,
  .personDetailPage .compareTopCard {
    padding: 14px;
  }

  .personDetailPage .topMetricCard,
  .personDetailPage .itemCard,
  .personDetailPage .itemMetric {
    padding: 10px 10px 8px;
  }

  .personDetailPage .topMetricCard .value,
  .personDetailPage .itemMetric .value {
    font-size: 18px;
  }
}


/* v14 restore chart-area layout to v10 */
.personDetailPage #personTrend.card {
  padding: 22px;
}

@media (max-width: 720px) {
  .personDetailPage #personTrend.card {
    padding: 16px;
  }
}

/* v18 store/block detail readability + 2-column metrics */
.storeDetailPage #itemPerformanceGrid,
.blockDetailPage .itemCardGrid,
.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics,
.storeDetailPage .monthlyTrendSummaryMeta,
.blockDetailPage .monthlyTrendSummaryMeta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
  min-width: 0;
}

html[data-theme="light"] .storeDetailPage .itemTitle,
html[data-theme="light"] .blockDetailPage .itemTitle,
html[data-theme="light"] .storeDetailPage .storeStrengthName,
html[data-theme="light"] .blockDetailPage .storeStrengthName,
html[data-theme="light"] .storeDetailPage .storeBreakdownCenterValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenterValue,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingStatValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingStatValue,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .storeDetailPage .table td a,
html[data-theme="light"] .blockDetailPage .table td a {
  color: var(--text);
}

html[data-theme="light"] .storeDetailPage .itemMeta,
html[data-theme="light"] .blockDetailPage .itemMeta,
html[data-theme="light"] .storeDetailPage .storeStrengthMeta,
html[data-theme="light"] .blockDetailPage .storeStrengthMeta,
html[data-theme="light"] .storeDetailPage .storeBreakdownCenterLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenterLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownCenterSub,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenterSub,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingStatLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingStatLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordionHint,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordionHint,
html[data-theme="light"] .storeDetailPage .storeBreakdownLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownLegendRatio,
html[data-theme="light"] .blockDetailPage .storeBreakdownLegendRatio,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryHead .subline,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryHead .subline,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryPanel .subline,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryPanel .subline {
  color: var(--muted);
}

html[data-theme="light"] .storeDetailPage .storeBreakdownChartCard,
html[data-theme="light"] .blockDetailPage .storeBreakdownChartCard,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverCard,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverCard,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordion,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordion {
  background: var(--panel-soft-bg);
  border-color: var(--border);
}

html[data-theme="light"] .storeDetailPage .storeBreakdownCenter,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenter {
  background: radial-gradient(circle at 50
/* v19 color tuning based on provided style.css reference */
html[data-theme="light"] .storeDetailPage .toolbar h3,
html[data-theme="light"] .blockDetailPage .toolbar h3,
html[data-theme="light"] .storeDetailPage .itemTitle,
html[data-theme="light"] .blockDetailPage .itemTitle,
html[data-theme="light"] .storeDetailPage .storeStrengthName,
html[data-theme="light"] .blockDetailPage .storeStrengthName,
html[data-theme="light"] .storeDetailPage .storeBreakdownCenterValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenterValue,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingStatValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingStatValue,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .storeDetailPage .table td,
html[data-theme="light"] .blockDetailPage .table td,
html[data-theme="light"] .storeDetailPage .table td a,
html[data-theme="light"] .blockDetailPage .table td a {
  color: var(--text);
}

html[data-theme="light"] .storeDetailPage .subline,
html[data-theme="light"] .blockDetailPage .subline,
html[data-theme="light"] .storeDetailPage .itemMeta,
html[data-theme="light"] .blockDetailPage .itemMeta,
html[data-theme="light"] .storeDetailPage .storeStrengthMeta,
html[data-theme="light"] .blockDetailPage .storeStrengthMeta,
html[data-theme="light"] .storeDetailPage .storeBreakdownCenterLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenterLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownCenterSub,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenterSub,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingStatLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingStatLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordionHint,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordionHint,
html[data-theme="light"] .storeDetailPage .storeBreakdownLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownLegendRatio,
html[data-theme="light"] .blockDetailPage .storeBreakdownLegendRatio,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryHead .subline,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryHead .subline,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryPanel .subline,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryPanel .subline,
html[data-theme="light"] .storeDetailPage .itemMetric .label,
html[data-theme="light"] .blockDetailPage .itemMetric .label {
  color: var(--muted);
}

html[data-theme="light"] .storeDetailPage .detailSublineStrong,
html[data-theme="light"] .blockDetailPage .detailSublineStrong,
html[data-theme="light"] .storeDetailPage .table th,
html[data-theme="light"] .blockDetailPage .table th {
  color: var(--subtle);
}

html[data-theme="light"] .storeDetailPage .storeBreakdownChartCard,
html[data-theme="light"] .blockDetailPage .storeBreakdownChartCard,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverCard,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverCard,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordion,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordion,
html[data-theme="light"] .storeDetailPage .itemMetric,
html[data-theme="light"] .blockDetailPage .itemMetric {
  background: var(--panel-soft-bg);
  border-color: var(--border);
}

html[data-theme="light"] .storeDetailPage .storeBreakdownCenter,
html[data-theme="light"] .blockDetailPage .storeBreakdownCenter {
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 58%, rgba(241,245,249,0.99) 100%);
  border-color: rgba(148,163,184,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 24px rgba(148,163,184,0.16);
}


/* v20 store/block detail text + layout aligned to person detail (non-graph only) */
.storeDetailPage .personHeroMain,
.blockDetailPage .personHeroMain {
  min-width: 0;
  flex: 1 1 auto;
}

.storeDetailPage .personSummaryTitleRow,
.blockDetailPage .personSummaryTitleRow {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.storeDetailPage .detailGoalInline,
.blockDetailPage .detailGoalInline {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--subtle);
}

.storeDetailPage .itemCardHead > div,
.blockDetailPage .itemCardHead > div,
.storeDetailPage .materialMain,
.blockDetailPage .materialMain {
  min-width: 0;
}

.storeDetailPage .itemCard,
.blockDetailPage .itemCard,
.storeDetailPage .monthlyTrendSummaryCard,
.blockDetailPage .monthlyTrendSummaryCard {
  border-radius: 20px;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead,
.storeDetailPage .monthlyTrendSummaryHead,
.blockDetailPage .monthlyTrendSummaryHead {
  margin-bottom: 14px;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle,
.storeDetailPage .monthlyTrendSummaryName,
.blockDetailPage .monthlyTrendSummaryName {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  color: var(--text);
}

.storeDetailPage .itemMeta,
.blockDetailPage .itemMeta,
.storeDetailPage .monthlyTrendSummaryHead .subline,
.blockDetailPage .monthlyTrendSummaryHead .subline,
.storeDetailPage .itemCardInlinePanelLabel,
.blockDetailPage .itemCardInlinePanelLabel {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics,
.storeDetailPage .monthlyTrendSummaryMeta,
.blockDetailPage .monthlyTrendSummaryMeta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
  padding: 14px 14px 12px;
  border-radius: 16px;
  min-width: 0;
}

.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.45;
}

.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.storeDetailPage .itemTrendInlineActions,
.blockDetailPage .itemCardActionRow {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .storeDetailPage .personSummaryTitleRow,
  .blockDetailPage .personSummaryTitleRow {
    gap: 10px;
  }

  .storeDetailPage .detailGoalInline,
  .blockDetailPage .detailGoalInline {
    font-size: 14px;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle,
  .storeDetailPage .monthlyTrendSummaryName,
  .blockDetailPage .monthlyTrendSummaryName {
    font-size: 18px;
  }

  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics,
  .storeDetailPage .monthlyTrendSummaryMeta,
  .blockDetailPage .monthlyTrendSummaryMeta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .storeDetailPage .itemMetric .value,
  .blockDetailPage .itemMetric .value,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value {
    font-size: 20px;
  }
}

/* v21 mobile-first layout for store/block detail (non-graph only) */
@media (max-width: 720px) {
  .storeDetailPage .page,
  .blockDetailPage .page {
    padding-top: 20px;
  }

  .storeDetailPage .toolbar,
  .blockDetailPage .toolbar {
    gap: 10px;
    margin-bottom: 14px;
  }

  .storeDetailPage .personHero,
  .blockDetailPage .personHero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .storeDetailPage .chips,
  .blockDetailPage .chips {
    width: 100%;
    gap: 8px;
  }

  .storeDetailPage .chips .chip,
  .blockDetailPage .chips .chip {
    min-height: 32px;
    font-size: 12px;
  }

  .storeDetailPage .topMetricGrid,
  .blockDetailPage .topMetricGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .storeDetailPage .topMetricCard,
  .blockDetailPage .topMetricCard,
  .storeDetailPage .itemCard,
  .blockDetailPage .itemCard,
  .storeDetailPage .monthlyTrendSummaryCard,
  .blockDetailPage .monthlyTrendSummaryCard,
  .storeDetailPage .detailSplitGrid > .card,
  .blockDetailPage .detailSplitGrid > .card {
    padding: 14px;
    border-radius: 18px;
  }

  .storeDetailPage .topMetricCard .label,
  .blockDetailPage .topMetricCard .label,
  .storeDetailPage .itemMetric .label,
  .blockDetailPage .itemMetric .label,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label {
    margin-bottom: 3px;
    line-height: 1.15;
  }

  .storeDetailPage .topMetricCard .value,
  .blockDetailPage .topMetricCard .value {
    font-size: 20px;
    line-height: 1.05;
  }

  .storeDetailPage #itemPerformanceGrid,
  .blockDetailPage .itemCardGrid,
  .storeDetailPage .monthlyTrendSummaryGrid,
  .blockDetailPage .monthlyTrendSummaryGrid,
  .storeDetailPage .detailSplitGrid,
  .blockDetailPage .detailSplitGrid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .storeDetailPage .itemCardHead,
  .blockDetailPage .itemCardHead,
  .storeDetailPage .monthlyTrendSummaryHead,
  .blockDetailPage .monthlyTrendSummaryHead {
    gap: 10px;
    margin-bottom: 10px;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle,
  .storeDetailPage .monthlyTrendSummaryName,
  .blockDetailPage .monthlyTrendSummaryName {
    font-size: 18px;
    line-height: 1.15;
  }

  .storeDetailPage .itemMeta,
  .blockDetailPage .itemMeta,
  .storeDetailPage .monthlyTrendSummaryHead .subline,
  .blockDetailPage .monthlyTrendSummaryHead .subline,
  .storeDetailPage .itemCardInlinePanelLabel,
  .blockDetailPage .itemCardInlinePanelLabel {
    font-size: 11px;
    line-height: 1.3;
  }

  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics,
  .storeDetailPage .monthlyTrendSummaryMeta,
  .blockDetailPage .monthlyTrendSummaryMeta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
    padding: 10px 10px 8px;
  }

  .storeDetailPage .itemMetric .value,
  .blockDetailPage .itemMetric .value,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value {
    font-size: 18px;
    line-height: 1.04;
  }

  .storeDetailPage .itemTrendInlineActions,
  .blockDetailPage .itemCardActionRow {
    justify-content: stretch;
    gap: 8px;
    flex-wrap: wrap;
  }

  .storeDetailPage .itemTrendInlineActions .btn,
  .blockDetailPage .itemCardActionRow .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .storeDetailPage .detailCompactTable .table,
  .blockDetailPage .detailCompactTable .table {
    min-width: 560px;
  }

  .storeDetailPage .detailCompactTable .table th,
  .storeDetailPage .detailCompactTable .table td,
  .blockDetailPage .detailCompactTable .table th,
  .blockDetailPage .detailCompactTable .table td {
    padding: 8px 6px;
    font-size: 12px;
    line-height: 1.15;
  }

  .storeDetailPage .storeBreakdownAccordionSummary,
  .blockDetailPage .storeBreakdownAccordionSummary {
    gap: 8px;
    padding: 12px 14px;
  }
}

/* v22 mobile: each card inner layout single column */
@media (max-width: 720px) {
  .storeDetailPage .topMetricGrid,
  .blockDetailPage .topMetricGrid,
  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics,
  .storeDetailPage .monthlyTrendSummaryMeta,
  .blockDetailPage .monthlyTrendSummaryMeta {
    grid-template-columns: 1fr !important;
  }

  .storeDetailPage .itemTrendInlineActions .btn,
  .blockDetailPage .itemCardActionRow .btn {
    flex: 1 1 100%;
  }
}

/* v23 fix: force single-column card layout on mobile/tablet widths */
@media (max-width: 900px) {
  .storeDetailPage #itemPerformanceGrid,
  .blockDetailPage .itemCardGrid,
  .storeDetailPage .monthlyTrendSummaryGrid,
  .blockDetailPage .monthlyTrendSummaryGrid,
  .storeDetailPage .detailSplitGrid,
  .blockDetailPage .detailSplitGrid,
  .storeDetailPage .topMetricGrid,
  .blockDetailPage .topMetricGrid,
  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics,
  .storeDetailPage .monthlyTrendSummaryMeta,
  .blockDetailPage .monthlyTrendSummaryMeta {
    grid-template-columns: 1fr !important;
  }

  .storeDetailPage .itemTrendInlineActions,
  .blockDetailPage .itemCardActionRow {
    flex-wrap: wrap;
    gap: 8px;
  }

  .storeDetailPage .itemTrendInlineActions .btn,
  .blockDetailPage .itemCardActionRow .btn,
  .storeDetailPage .chips .chip,
  .blockDetailPage .chips .chip {
    flex: 1 1 100%;
  }
}


/* v24 hard fix: force one-column cards and inner metrics on store/block detail mobile-like layouts */
.storeDetailPage #itemPerformanceGrid,
.blockDetailPage .itemCardGrid,
.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics,
.storeDetailPage .monthlyTrendSummaryMeta,
.blockDetailPage .monthlyTrendSummaryMeta,
.storeDetailPage .itemCardActionRow,
.blockDetailPage .itemCardActionRow {
  min-width: 0;
}

@media (max-width: 1200px) {
  .storeDetailPage #itemPerformanceGrid,
  .blockDetailPage .itemCardGrid,
  .storeDetailPage .monthlyTrendSummaryGrid,
  .blockDetailPage .monthlyTrendSummaryGrid,
  .storeDetailPage .detailSplitGrid,
  .blockDetailPage .detailSplitGrid,
  .storeDetailPage .topMetricGrid,
  .blockDetailPage .topMetricGrid,
  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics,
  .storeDetailPage .monthlyTrendSummaryMeta,
  .blockDetailPage .monthlyTrendSummaryMeta {
    grid-template-columns: 1fr !important;
  }

  .storeDetailPage .itemCardActionRow,
  .blockDetailPage .itemCardActionRow,
  .storeDetailPage .itemTrendInlineActions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .storeDetailPage .itemCardActionRow .btn,
  .blockDetailPage .itemCardActionRow .btn,
  .storeDetailPage .itemTrendInlineActions .btn {
    width: 100%;
    flex: 1 1 100%;
  }
}


/* v25 mobile polish: horizontal action buttons, stronger text contrast, tighter vertical spacing */
html[data-theme="light"] .storeDetailPage .subline,
html[data-theme="light"] .blockDetailPage .subline,
html[data-theme="light"] .storeDetailPage .itemMeta,
html[data-theme="light"] .blockDetailPage .itemMeta,
html[data-theme="light"] .storeDetailPage .storeStrengthMeta,
html[data-theme="light"] .blockDetailPage .storeStrengthMeta,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryHead .subline,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryHead .subline,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryPanel .subline,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryPanel .subline,
html[data-theme="light"] .storeDetailPage .itemCardInlinePanelLabel,
html[data-theme="light"] .blockDetailPage .itemCardInlinePanelLabel,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .storeDetailPage .detailCompactTable .table th,
html[data-theme="light"] .blockDetailPage .detailCompactTable .table th,
html[data-theme="light"] .storeDetailPage .detailCompactTable .table td,
html[data-theme="light"] .blockDetailPage .detailCompactTable .table td,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordionHint,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordionHint {
  color: var(--subtle) !important;
}

html[data-theme="light"] .storeDetailPage .itemTitle,
html[data-theme="light"] .blockDetailPage .itemTitle,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .storeDetailPage .storeStrengthName,
html[data-theme="light"] .blockDetailPage .storeStrengthName,
html[data-theme="light"] .storeDetailPage .detailCompactTable a,
html[data-theme="light"] .blockDetailPage .detailCompactTable a,
html[data-theme="light"] .storeDetailPage .topMetricCard .value,
html[data-theme="light"] .blockDetailPage .topMetricCard .value,
html[data-theme="light"] .storeDetailPage .itemMetric .value,
html[data-theme="light"] .blockDetailPage .itemMetric .value,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordionLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordionLabel {
  color: var(--text) !important;
}

@media (max-width: 1200px) {
  .storeDetailPage .topMetricCard,
  .blockDetailPage .topMetricCard,
  .storeDetailPage .itemCard,
  .blockDetailPage .itemCard,
  .storeDetailPage .monthlyTrendSummaryCard,
  .blockDetailPage .monthlyTrendSummaryCard,
  .storeDetailPage .detailSplitGrid > .card,
  .blockDetailPage .detailSplitGrid > .card {
    padding: 12px 12px 10px !important;
    border-radius: 16px;
  }

  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric,
  .storeDetailPage .topMetricCard,
  .blockDetailPage .topMetricCard {
    padding-top: 9px !important;
    padding-bottom: 8px !important;
  }

  .storeDetailPage .itemCardHead,
  .blockDetailPage .itemCardHead,
  .storeDetailPage .monthlyTrendSummaryHead,
  .blockDetailPage .monthlyTrendSummaryHead {
    margin-bottom: 8px !important;
    gap: 8px !important;
  }

  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics,
  .storeDetailPage .monthlyTrendSummaryMeta,
  .blockDetailPage .monthlyTrendSummaryMeta {
    gap: 6px !important;
  }

  .storeDetailPage .storeStrengthRow,
  .blockDetailPage .storeStrengthRow,
  .storeDetailPage .listPlain li,
  .blockDetailPage .listPlain li {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .storeDetailPage .itemCardActionRow,
  .blockDetailPage .itemCardActionRow,
  .storeDetailPage .itemTrendInlineActions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100%;
  }

  .storeDetailPage .itemCardActionRow .btn,
  .blockDetailPage .itemCardActionRow .btn,
  .storeDetailPage .itemTrendInlineActions .btn {
    width: 100% !important;
    min-width: 0;
    flex: none !important;
  }
}

@media (max-width: 720px) {
  .storeDetailPage .topMetricGrid,
  .blockDetailPage .topMetricGrid,
  .storeDetailPage #itemPerformanceGrid,
  .blockDetailPage .itemCardGrid,
  .storeDetailPage .monthlyTrendSummaryGrid,
  .blockDetailPage .monthlyTrendSummaryGrid,
  .storeDetailPage .detailSplitGrid,
  .blockDetailPage .detailSplitGrid {
    gap: 10px !important;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle,
  .storeDetailPage .monthlyTrendSummaryName,
  .blockDetailPage .monthlyTrendSummaryName {
    line-height: 1.08;
  }

  .storeDetailPage .itemMetric .label,
  .blockDetailPage .itemMetric .label,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
  .storeDetailPage .topMetricCard .label,
  .blockDetailPage .topMetricCard .label {
    margin-bottom: 2px !important;
  }

  .storeDetailPage .itemCardActionRow,
  .blockDetailPage .itemCardActionRow,
  .storeDetailPage .itemTrendInlineActions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* v26 remove inline detail-card layout/text styles from store/block templates */
.storeDetailPage #itemPerformanceGrid,
.blockDetailPage .itemCardGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.storeDetailPage .itemCardTitleRow,
.blockDetailPage .itemCardTitleRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.storeDetailPage .itemCardSwatch,
.blockDetailPage .itemCardSwatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.storeDetailPage .itemGoalMeta,
.blockDetailPage .itemGoalMeta {
  font-size: 14px;
  font-weight: 700;
}

.storeDetailPage .itemSectionMeta,
.blockDetailPage .itemSectionMeta {
  font-size: 12px;
  margin-top: 4px;
}

.storeDetailPage .itemMetricsStack,
.blockDetailPage .itemMetricsStack {
  margin-top: 12px;
}

.storeDetailPage .itemCardSubline,
.blockDetailPage .itemCardSubline {
  margin-top: 4px;
}

.storeDetailPage .monthlyTrendChartSubline,
.blockDetailPage .monthlyTrendChartSubline {
  margin: 0 0 6px 0;
}

html[data-theme="light"] .storeDetailPage .itemTitle,
html[data-theme="light"] .blockDetailPage .itemTitle,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryName,
html[data-theme="light"] .storeDetailPage .storeStrengthName,
html[data-theme="light"] .blockDetailPage .storeStrengthName,
html[data-theme="light"] .storeDetailPage .detailCompactTable a,
html[data-theme="light"] .blockDetailPage .detailCompactTable a,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverValue,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordionLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordionLabel,
html[data-theme="light"] .storeDetailPage .topMetricCard .value,
html[data-theme="light"] .blockDetailPage .topMetricCard .value,
html[data-theme="light"] .storeDetailPage .itemMetric .value,
html[data-theme="light"] .blockDetailPage .itemMetric .value,
html[data-theme="light"] .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
html[data-theme="light"] .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value {
  color: var(--text) !important;
}

html[data-theme="light"] .storeDetailPage .subline,
html[data-theme="light"] .blockDetailPage .subline,
html[data-theme="light"] .storeDetailPage .itemMeta,
html[data-theme="light"] .blockDetailPage .itemMeta,
html[data-theme="light"] .storeDetailPage .storeStrengthMeta,
html[data-theme="light"] .blockDetailPage .storeStrengthMeta,
html[data-theme="light"] .storeDetailPage .detailCompactTable .table th,
html[data-theme="light"] .blockDetailPage .detailCompactTable .table th,
html[data-theme="light"] .storeDetailPage .detailCompactTable .table td,
html[data-theme="light"] .blockDetailPage .detailCompactTable .table td,
html[data-theme="light"] .storeDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .blockDetailPage .storeBreakdownHoverMeta,
html[data-theme="light"] .storeDetailPage .storeBreakdownAccordionHint,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordionHint,
html[data-theme="light"] .storeDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownRingLabel,
html[data-theme="light"] .storeDetailPage .itemGoalMeta,
html[data-theme="light"] .blockDetailPage .itemGoalMeta {
  color: var(--subtle) !important;
}

@media (max-width: 1200px) {
  .storeDetailPage .topMetricCard,
  .blockDetailPage .topMetricCard,
  .storeDetailPage .itemCard,
  .blockDetailPage .itemCard,
  .storeDetailPage .monthlyTrendSummaryCard,
  .blockDetailPage .monthlyTrendSummaryCard,
  .storeDetailPage .detailSplitGrid > .card,
  .blockDetailPage .detailSplitGrid > .card {
    padding: 12px 12px 10px !important;
    border-radius: 16px;
  }

  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric,
  .storeDetailPage .topMetricCard,
  .blockDetailPage .topMetricCard {
    padding: 9px 10px 8px !important;
  }

  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics,
  .storeDetailPage .monthlyTrendSummaryMeta,
  .blockDetailPage .monthlyTrendSummaryMeta {
    gap: 6px !important;
  }

  .storeDetailPage .itemCardActionRow,
  .blockDetailPage .itemCardActionRow,
  .storeDetailPage .itemTrendInlineActions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
    align-items: stretch;
  }

  .storeDetailPage .itemCardActionRow .btn,
  .blockDetailPage .itemCardActionRow .btn,
  .storeDetailPage .itemTrendInlineActions .btn {
    width: 100% !important;
    min-width: 0;
    flex: none !important;
  }
}

@media (max-width: 720px) {
  .storeDetailPage #itemPerformanceGrid,
  .blockDetailPage .itemCardGrid,
  .storeDetailPage .monthlyTrendSummaryGrid,
  .blockDetailPage .monthlyTrendSummaryGrid,
  .storeDetailPage .detailSplitGrid,
  .blockDetailPage .detailSplitGrid,
  .storeDetailPage .topMetricGrid,
  .blockDetailPage .topMetricGrid {
    gap: 10px !important;
  }

  .storeDetailPage .itemCardActionRow,
  .blockDetailPage .itemCardActionRow,
  .storeDetailPage .itemTrendInlineActions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* v27 item-card relayout: title + goal on one row, buttons below metrics, remove extra helper texts */
.storeDetailPage .itemCardTitleMain,
.blockDetailPage .itemCardTitleMain {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.storeDetailPage .itemCardHead .itemTitle,
.blockDetailPage .itemCardHead .itemTitle {
  min-width: 0;
}

.storeDetailPage .itemGoalMeta,
.blockDetailPage .itemGoalMeta {
  margin-left: auto;
  white-space: nowrap;
}

.storeDetailPage .itemMetricsStack,
.blockDetailPage .itemMetricsStack {
  margin-top: 0;
}

.storeDetailPage .itemCardActionRowBottom,
.blockDetailPage .itemCardActionRowBottom,
.storeDetailPage .itemTrendInlineActions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100%;
  margin-top: 10px;
  align-items: stretch;
}

.storeDetailPage .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardActionRowBottom .btn,
.storeDetailPage .itemTrendInlineActions .btn {
  width: 100% !important;
  min-width: 0;
  flex: none !important;
}

@media (max-width: 720px) {
  .storeDetailPage .itemCardHead,
  .blockDetailPage .itemCardHead {
    gap: 8px;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle {
    font-size: 18px;
    line-height: 1.08;
  }

  .storeDetailPage .itemGoalMeta,
  .blockDetailPage .itemGoalMeta {
    font-size: 13px;
  }
}


/* v28 tighten action buttons and item metric vertical spacing for store/block detail */
.storeDetailPage .itemCardActionRowBottom,
.blockDetailPage .itemCardActionRowBottom,
.storeDetailPage .itemTrendInlineActions {
  margin-top: 8px !important;
  gap: 6px !important;
}

.storeDetailPage .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardActionRowBottom .btn,
.storeDetailPage .itemTrendInlineActions .btn {
  min-height: 34px !important;
  padding: 6px 10px !important;
  line-height: 1.1 !important;
  font-size: 12px !important;
  border-radius: 12px !important;
}

.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics,
.storeDetailPage .monthlyTrendSummaryMeta,
.blockDetailPage .monthlyTrendSummaryMeta {
  row-gap: 5px !important;
  column-gap: 6px !important;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
  padding-top: 7px !important;
  padding-bottom: 6px !important;
}

.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
.storeDetailPage .topMetricCard .label,
.blockDetailPage .topMetricCard .label {
  margin-bottom: 1px !important;
  line-height: 1.1 !important;
}

.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value {
  line-height: 1.0 !important;
}

@media (max-width: 720px) {
  .storeDetailPage .itemCardActionRowBottom,
  .blockDetailPage .itemCardActionRowBottom,
  .storeDetailPage .itemTrendInlineActions {
    margin-top: 7px !important;
    gap: 6px !important;
  }

  .storeDetailPage .itemCardActionRowBottom .btn,
  .blockDetailPage .itemCardActionRowBottom .btn,
  .storeDetailPage .itemTrendInlineActions .btn {
    min-height: 32px !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
    border-radius: 11px !important;
  }

  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
    padding-top: 6px !important;
    padding-bottom: 5px !important;
  }

  .storeDetailPage .itemMetric .label,
  .blockDetailPage .itemMetric .label,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
  .storeDetailPage .topMetricCard .label,
  .blockDetailPage .topMetricCard .label {
    font-size: 10px !important;
  }
}


/* v29: compact gross card only + align store/block card typography/box sizing to person detail */
.storeDetailPage .itemCard,
.blockDetailPage .itemCard {
  padding: 14px !important;
  border-radius: 18px;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  margin-bottom: 10px;
  gap: 10px;
  align-items: center;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle,
.storeDetailPage .monthlyTrendSummaryName,
.blockDetailPage .monthlyTrendSummaryName {
  font-size: 20px;
  line-height: 1.12;
}

.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label {
  font-size: 12px;
  margin-bottom: 2px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value {
  font-size: 18px !important;
  line-height: 1.04 !important;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
  padding: 10px 10px 8px !important;
  border-radius: 16px;
}

.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics,
.storeDetailPage .monthlyTrendSummaryMeta,
.blockDetailPage .monthlyTrendSummaryMeta {
  gap: 8px !important;
}

.storeDetailPage .itemGoalMeta,
.blockDetailPage .itemGoalMeta {
  font-size: 12px;
}

/* compact only for 粗利 card */
.storeDetailPage .itemCardCompactGross,
.blockDetailPage .itemCardCompactGross {
  padding: 12px !important;
  border-radius: 16px;
}

.storeDetailPage .itemCardCompactGross .itemCardHead,
.blockDetailPage .itemCardCompactGross .itemCardHead {
  margin-bottom: 8px;
  gap: 8px;
}

.storeDetailPage .itemCardCompactGross .itemTitle,
.blockDetailPage .itemCardCompactGross .itemTitle {
  font-size: 18px !important;
  line-height: 1.04 !important;
}

.storeDetailPage .itemCardCompactGross .itemGoalMeta,
.blockDetailPage .itemCardCompactGross .itemGoalMeta {
  font-size: 11px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetrics,
.blockDetailPage .itemCardCompactGross .itemMetrics {
  row-gap: 5px !important;
  column-gap: 6px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric,
.blockDetailPage .itemCardCompactGross .itemMetric {
  padding: 7px 8px 6px !important;
  border-radius: 14px;
}

.storeDetailPage .itemCardCompactGross .itemMetric .label,
.blockDetailPage .itemCardCompactGross .itemMetric .label {
  font-size: 10px !important;
  margin-bottom: 1px !important;
  line-height: 1.05 !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric .value,
.blockDetailPage .itemCardCompactGross .itemMetric .value {
  font-size: 17px !important;
  line-height: 1.0 !important;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom {
  margin-top: 6px !important;
  gap: 6px !important;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn {
  min-height: 30px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  border-radius: 11px !important;
}

@media (max-width: 720px) {
  .storeDetailPage .itemCard,
  .blockDetailPage .itemCard {
    padding: 14px !important;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle,
  .storeDetailPage .monthlyTrendSummaryName,
  .blockDetailPage .monthlyTrendSummaryName {
    font-size: 18px !important;
    line-height: 1.08 !important;
  }

  .storeDetailPage .itemGoalMeta,
  .blockDetailPage .itemGoalMeta {
    font-size: 12px !important;
  }

  .storeDetailPage .itemCardCompactGross,
  .blockDetailPage .itemCardCompactGross {
    padding: 10px !important;
  }

  .storeDetailPage .itemCardCompactGross .itemTitle,
  .blockDetailPage .itemCardCompactGross .itemTitle {
    font-size: 17px !important;
  }

  .storeDetailPage .itemCardCompactGross .itemMetric,
  .blockDetailPage .itemCardCompactGross .itemMetric {
    padding: 6px 7px 5px !important;
  }

  .storeDetailPage .itemCardCompactGross .itemMetric .value,
  .blockDetailPage .itemCardCompactGross .itemMetric .value {
    font-size: 16px !important;
  }

  .storeDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn,
  .blockDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn {
    min-height: 28px !important;
    padding: 4px 7px !important;
    font-size: 10px !important;
  }
}


/* v30 align store/block to reference mobile card layout without changing source data */
.storeDetailPage .detailReferenceCard,
.blockDetailPage .detailReferenceCard {
  padding: 18px !important;
  border-radius: 22px;
}

.storeDetailPage .detailReferenceHead,
.blockDetailPage .detailReferenceHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.storeDetailPage .detailReferenceMain,
.blockDetailPage .detailReferenceMain {
  min-width: 0;
  flex: 1 1 auto;
}

.storeDetailPage .detailReferenceNameRow,
.blockDetailPage .detailReferenceNameRow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.storeDetailPage .detailReferenceName,
.blockDetailPage .detailReferenceName {
  font-size: clamp(28px, 6vw, 34px);
  line-height: 1.04;
}

.storeDetailPage .detailReferenceMeta,
.blockDetailPage .detailReferenceMeta {
  margin-top: 6px;
  line-height: 1.3;
}

.storeDetailPage .detailReferenceChips,
.blockDetailPage .detailReferenceChips {
  justify-content: flex-end;
  gap: 10px;
}

.storeDetailPage .detailReferenceGoalCard,
.blockDetailPage .detailReferenceGoalCard {
  padding: 12px 14px 10px;
  border-radius: 16px;
  background: var(--panel-soft-bg);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.storeDetailPage .detailReferenceGoalCard .label,
.blockDetailPage .detailReferenceGoalCard .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.08;
}

.storeDetailPage .detailReferenceGoalCard .value,
.blockDetailPage .detailReferenceGoalCard .value {
  font-size: 18px;
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.storeDetailPage .detailReferenceMetrics,
.blockDetailPage .detailReferenceMetrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard,
.blockDetailPage .detailReferenceMetrics .topMetricCard {
  padding: 10px 10px 8px !important;
  border-radius: 16px;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard .label,
.blockDetailPage .detailReferenceMetrics .topMetricCard .label {
  font-size: 12px;
  margin-bottom: 2px;
  line-height: 1.08;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard .value,
.blockDetailPage .detailReferenceMetrics .topMetricCard .value {
  font-size: 18px;
  line-height: 1.04;
}

.storeDetailPage .itemCard,
.blockDetailPage .itemCard {
  padding: 16px !important;
  border-radius: 20px;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  align-items: center;
  margin-bottom: 10px;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle {
  font-size: 18px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .itemGoalMeta,
.blockDetailPage .itemGoalMeta {
  font-size: 12px !important;
}

.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics {
  gap: 10px !important;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric {
  padding: 10px 10px 8px !important;
  border-radius: 16px;
}

.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label {
  font-size: 12px !important;
  margin-bottom: 2px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value {
  font-size: 18px !important;
  line-height: 1.04 !important;
}

.storeDetailPage .itemCardActionRowBottom,
.blockDetailPage .itemCardActionRowBottom {
  display: flex !important;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px !important;
  width: 100%;
  margin-top: 8px !important;
}

.storeDetailPage .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardActionRowBottom .btn {
  width: auto !important;
  flex: 0 0 auto !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  border-radius: 12px !important;
}

.storeDetailPage .itemCardCompactGross,
.blockDetailPage .itemCardCompactGross {
  padding: 14px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric,
.blockDetailPage .itemCardCompactGross .itemMetric {
  padding: 9px 9px 7px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric .value,
.blockDetailPage .itemCardCompactGross .itemMetric .value {
  font-size: 17px !important;
}

@media (max-width: 720px) {
  .storeDetailPage .detailReferenceCard,
  .blockDetailPage .detailReferenceCard,
  .storeDetailPage .itemCard,
  .blockDetailPage .itemCard {
    padding: 14px !important;
  }

  .storeDetailPage .detailReferenceHead,
  .blockDetailPage .detailReferenceHead {
    gap: 10px;
    margin-bottom: 12px;
  }

  .storeDetailPage .detailReferenceChips,
  .blockDetailPage .detailReferenceChips {
    width: 100%;
    justify-content: flex-start;
  }

  .storeDetailPage .detailReferenceGoalCard,
  .blockDetailPage .detailReferenceGoalCard,
  .storeDetailPage .detailReferenceMetrics .topMetricCard,
  .blockDetailPage .detailReferenceMetrics .topMetricCard,
  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric {
    padding: 10px 10px 8px !important;
  }

  .storeDetailPage .itemCardActionRowBottom,
  .blockDetailPage .itemCardActionRowBottom {
    justify-content: flex-end;
    gap: 6px !important;
  }

  .storeDetailPage .itemCardActionRowBottom .btn,
  .blockDetailPage .itemCardActionRowBottom .btn {
    min-height: 30px !important;
    padding: 4px 9px !important;
    font-size: 10px !important;
  }
}


/* v31: push action buttons further to bottom-right and tighten item-card vertical spacing */
.storeDetailPage .itemCard,
.blockDetailPage .itemCard {
  padding: 13px !important;
  border-radius: 18px;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  margin-bottom: 8px !important;
  gap: 8px !important;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle {
  line-height: 1.04 !important;
}

.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics {
  row-gap: 7px !important;
  column-gap: 8px !important;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric {
  padding: 8px 9px 7px !important;
  border-radius: 15px;
}

.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label {
  margin-bottom: 1px !important;
  line-height: 1.04 !important;
}

.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value {
  line-height: 1.02 !important;
}

.storeDetailPage .itemCardActionRowBottom,
.blockDetailPage .itemCardActionRowBottom {
  display: flex !important;
  width: 100%;
  justify-content: flex-end !important;
  align-items: center !important;
  align-self: flex-end;
  margin-top: 6px !important;
  margin-left: auto;
  gap: 6px !important;
}

.storeDetailPage .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardActionRowBottom .btn {
  min-height: 29px !important;
  padding: 4px 9px !important;
  font-size: 10px !important;
  border-radius: 11px !important;
}

/* gross card remains slightly more compact than others */
.storeDetailPage .itemCardCompactGross,
.blockDetailPage .itemCardCompactGross {
  padding: 11px !important;
  border-radius: 16px;
}

.storeDetailPage .itemCardCompactGross .itemCardHead,
.blockDetailPage .itemCardCompactGross .itemCardHead {
  margin-bottom: 7px !important;
  gap: 7px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetrics,
.blockDetailPage .itemCardCompactGross .itemMetrics {
  row-gap: 5px !important;
  column-gap: 6px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric,
.blockDetailPage .itemCardCompactGross .itemMetric {
  padding: 6px 7px 5px !important;
  border-radius: 13px;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom {
  margin-top: 5px !important;
  gap: 5px !important;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn {
  min-height: 27px !important;
  padding: 3px 8px !important;
  font-size: 10px !important;
}

@media (max-width: 720px) {
  .storeDetailPage .itemCard,
  .blockDetailPage .itemCard {
    padding: 12px !important;
  }

  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics {
    row-gap: 6px !important;
    column-gap: 7px !important;
  }

  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric {
    padding: 7px 8px 6px !important;
  }

  .storeDetailPage .itemCardActionRowBottom,
  .blockDetailPage .itemCardActionRowBottom {
    margin-top: 5px !important;
    gap: 5px !important;
  }

  .storeDetailPage .itemCardActionRowBottom .btn,
  .blockDetailPage .itemCardActionRowBottom .btn {
    min-height: 28px !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
  }

  .storeDetailPage .itemCardCompactGross,
  .blockDetailPage .itemCardCompactGross {
    padding: 10px !important;
  }

  .storeDetailPage .itemCardCompactGross .itemMetric,
  .blockDetailPage .itemCardCompactGross .itemMetric {
    padding: 5px 6px 4px !important;
  }

  .storeDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn,
  .blockDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn {
    min-height: 26px !important;
    padding: 3px 7px !important;
  }
}


/* v32: add month selector, match typography to person detail, lower metric box height, right-align buttons */
.storeDetailPage .detailMonthCard,
.blockDetailPage .detailMonthCard {
  padding: 14px 16px !important;
}

.storeDetailPage .detailMonthSwitchForm,
.blockDetailPage .detailMonthSwitchForm {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.storeDetailPage .detailMonthSwitchLabel,
.blockDetailPage .detailMonthSwitchLabel {
  display: block;
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.08;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard,
.blockDetailPage .detailReferenceMetrics .topMetricCard,
.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
  padding: 10px 10px 8px !important;
  border-radius: 16px;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard .label,
.blockDetailPage .detailReferenceMetrics .topMetricCard .label,
.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label {
  font-size: 12px !important;
  margin-bottom: 2px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard .value,
.blockDetailPage .detailReferenceMetrics .topMetricCard .value,
.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
.storeDetailPage .detailReferenceGoalCard .value,
.blockDetailPage .detailReferenceGoalCard .value {
  font-size: 18px !important;
  line-height: 1.04 !important;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle,
.storeDetailPage .monthlyTrendSummaryName,
.blockDetailPage .monthlyTrendSummaryName {
  font-size: 20px !important;
  line-height: 1.12 !important;
}

.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics,
.storeDetailPage .monthlyTrendSummaryMeta,
.blockDetailPage .monthlyTrendSummaryMeta {
  row-gap: 6px !important;
  column-gap: 8px !important;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric {
  padding: 7px 8px 6px !important;
}

.storeDetailPage .itemCard,
.blockDetailPage .itemCard {
  padding: 12px !important;
  border-radius: 18px;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  margin-bottom: 7px !important;
  gap: 8px !important;
}

.storeDetailPage .itemCardActionRowBottom,
.blockDetailPage .itemCardActionRowBottom {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100%;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-wrap: wrap;
  margin: 5px 0 0 auto !important;
  gap: 5px !important;
}

.storeDetailPage .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardActionRowBottom .btn {
  width: auto !important;
  flex: 0 0 auto !important;
  min-height: 28px !important;
  padding: 3px 8px !important;
  font-size: 10px !important;
  border-radius: 11px !important;
}

.storeDetailPage .itemCardCompactGross,
.blockDetailPage .itemCardCompactGross {
  padding: 10px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric,
.blockDetailPage .itemCardCompactGross .itemMetric {
  padding: 5px 6px 4px !important;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom {
  margin-top: 4px !important;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn {
  min-height: 26px !important;
  padding: 3px 7px !important;
}

@media (max-width: 720px) {
  .storeDetailPage .detailMonthSwitchForm,
  .blockDetailPage .detailMonthSwitchForm {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .storeDetailPage .detailMonthSwitchForm .compactMonthField,
  .blockDetailPage .detailMonthSwitchForm .compactMonthField,
  .storeDetailPage .detailMonthSwitchForm select,
  .blockDetailPage .detailMonthSwitchForm select,
  .storeDetailPage .detailMonthSwitchForm .compactMonthActions,
  .blockDetailPage .detailMonthSwitchForm .compactMonthActions,
  .storeDetailPage .detailMonthSwitchForm .compactMonthActions .btn,
  .blockDetailPage .detailMonthSwitchForm .compactMonthActions .btn {
    width: 100%;
    max-width: none;
    min-width: 0 !important;
  }

  .storeDetailPage .detailMonthSwitchLabel,
  .blockDetailPage .detailMonthSwitchLabel {
    font-size: 14px;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle,
  .storeDetailPage .monthlyTrendSummaryName,
  .blockDetailPage .monthlyTrendSummaryName {
    font-size: 18px !important;
    line-height: 1.08 !important;
  }

  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric,
  .storeDetailPage .detailReferenceMetrics .topMetricCard,
  .blockDetailPage .detailReferenceMetrics .topMetricCard {
    padding: 7px 8px 6px !important;
  }

  .storeDetailPage .itemMetric .value,
  .blockDetailPage .itemMetric .value,
  .storeDetailPage .detailReferenceMetrics .topMetricCard .value,
  .blockDetailPage .detailReferenceMetrics .topMetricCard .value,
  .storeDetailPage .detailReferenceGoalCard .value,
  .blockDetailPage .detailReferenceGoalCard .value {
    font-size: 18px !important;
  }

  .storeDetailPage .itemCardActionRowBottom,
  .blockDetailPage .itemCardActionRowBottom {
    gap: 5px !important;
    margin-top: 4px !important;
  }
}


/* v33: match person detail typography and hard-fix right-aligned action buttons */
.storeDetailPage .itemCard,
.blockDetailPage .itemCard {
  display: flex;
  flex-direction: column;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard,
.blockDetailPage .detailReferenceMetrics .topMetricCard,
.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric {
  padding: 10px 10px 8px !important;
  border-radius: 16px;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard .label,
.blockDetailPage .detailReferenceMetrics .topMetricCard .label,
.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .label,
.storeDetailPage .detailReferenceGoalCard .label,
.blockDetailPage .detailReferenceGoalCard .label,
.storeDetailPage .itemMeta,
.blockDetailPage .itemMeta {
  font-size: 12px !important;
  margin-bottom: 2px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .detailReferenceMetrics .topMetricCard .value,
.blockDetailPage .detailReferenceMetrics .topMetricCard .value,
.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value,
.storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
.blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
.storeDetailPage .detailReferenceGoalCard .value,
.blockDetailPage .detailReferenceGoalCard .value {
  font-size: 18px !important;
  line-height: 1.04 !important;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle,
.storeDetailPage .monthlyTrendSummaryName,
.blockDetailPage .monthlyTrendSummaryName {
  font-size: 18px !important;
  line-height: 1.08 !important;
  font-weight: 900;
}

.storeDetailPage .itemGoalMeta,
.blockDetailPage .itemGoalMeta {
  font-size: 12px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  margin-bottom: 10px !important;
}

.storeDetailPage .itemCardActionRowBottom,
.blockDetailPage .itemCardActionRowBottom {
  display: flex !important;
  width: max-content !important;
  max-width: 100%;
  justify-content: flex-end !important;
  align-items: center !important;
  align-self: flex-end !important;
  margin: 5px 0 0 auto !important;
  gap: 5px !important;
  flex-wrap: nowrap !important;
}

.storeDetailPage .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardActionRowBottom .btn {
  width: auto !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  white-space: nowrap;
}

@media (min-width: 721px) {
  .storeDetailPage .detailReferenceMetrics .topMetricCard .value,
  .blockDetailPage .detailReferenceMetrics .topMetricCard .value,
  .storeDetailPage .itemMetric .value,
  .blockDetailPage .itemMetric .value,
  .storeDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
  .blockDetailPage .monthlyTrendSummaryMeta .itemMetric .value,
  .storeDetailPage .detailReferenceGoalCard .value,
  .blockDetailPage .detailReferenceGoalCard .value {
    font-size: 20px !important;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle,
  .storeDetailPage .monthlyTrendSummaryName,
  .blockDetailPage .monthlyTrendSummaryName {
    font-size: 20px !important;
    line-height: 1.12 !important;
  }
}

@media (max-width: 720px) {
  .storeDetailPage .itemCardActionRowBottom,
  .blockDetailPage .itemCardActionRowBottom {
    display: flex !important;
    width: max-content !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    flex-wrap: nowrap !important;
  }

  .storeDetailPage .itemCardActionRowBottom .btn,
  .blockDetailPage .itemCardActionRowBottom .btn {
    width: auto !important;
    flex: 0 0 auto !important;
  }
}


/* v36 store/block item cards match person-detail look while keeping 2-button actions */
.storeDetailPage .itemCard.itemTrendCard,
.blockDetailPage .itemCard.itemTrendCard,
.storeDetailPage .itemCard,
.blockDetailPage .itemCard {
  display: flex;
  flex-direction: column;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  align-items: flex-start !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

.storeDetailPage .itemCardTitleMain,
.blockDetailPage .itemCardTitleMain {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle {
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  min-width: 0;
}

.storeDetailPage .itemGoalMeta,
.blockDetailPage .itemGoalMeta {
  margin-top: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  color: var(--subtle) !important;
  white-space: nowrap;
}

.storeDetailPage .itemMetrics,
.blockDetailPage .itemMetrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
  margin-top: 0 !important;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric {
  padding: 12px 12px 10px !important;
  border-radius: 16px !important;
  min-width: 0;
}

.storeDetailPage .itemMetric .label,
.blockDetailPage .itemMetric .label {
  font-size: 12px !important;
  font-weight: 700 !important;
  margin-bottom: 2px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .itemMetric .value,
.blockDetailPage .itemMetric .value {
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1.04 !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.storeDetailPage .itemCardActionRowBottom,
.blockDetailPage .itemCardActionRowBottom {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 12px !important;
  margin-left: auto !important;
  width: 100% !important;
  flex-wrap: wrap !important;
}

.storeDetailPage .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardActionRowBottom .btn {
  width: auto !important;
  min-width: 0 !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  border-radius: 12px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.storeDetailPage .itemCardCompactGross,
.blockDetailPage .itemCardCompactGross {
  padding: 14px !important;
  border-radius: 18px !important;
}

.storeDetailPage .itemCardCompactGross .itemCardHead,
.blockDetailPage .itemCardCompactGross .itemCardHead {
  margin-bottom: 10px !important;
  gap: 12px !important;
}

.storeDetailPage .itemCardCompactGross .itemTitle,
.blockDetailPage .itemCardCompactGross .itemTitle {
  font-size: 20px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .itemCardCompactGross .itemGoalMeta,
.blockDetailPage .itemCardCompactGross .itemGoalMeta {
  font-size: 13px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetrics,
.blockDetailPage .itemCardCompactGross .itemMetrics {
  gap: 10px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric,
.blockDetailPage .itemCardCompactGross .itemMetric {
  padding: 12px 12px 10px !important;
  border-radius: 16px !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric .label,
.blockDetailPage .itemCardCompactGross .itemMetric .label {
  font-size: 12px !important;
  margin-bottom: 2px !important;
  line-height: 1.08 !important;
}

.storeDetailPage .itemCardCompactGross .itemMetric .value,
.blockDetailPage .itemCardCompactGross .itemMetric .value {
  font-size: 18px !important;
  line-height: 1.04 !important;
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom {
  margin-top: 12px !important;
  gap: 8px !important;
}

.storeDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn,
.blockDetailPage .itemCardCompactGross .itemCardActionRowBottom .btn {
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  border-radius: 12px !important;
}

@media (max-width: 720px) {
  .storeDetailPage .itemCard,
  .blockDetailPage .itemCard {
    padding: 10px 10px 8px !important;
    border-radius: 18px !important;
  }

  .storeDetailPage .itemCardHead,
  .blockDetailPage .itemCardHead {
    gap: 10px !important;
    margin-bottom: 10px !important;
  }

  .storeDetailPage .itemTitle,
  .blockDetailPage .itemTitle {
    font-size: clamp(15px, 4.3vw, 18px) !important;
    line-height: 1.08 !important;
  }

  .storeDetailPage .itemGoalMeta,
  .blockDetailPage .itemGoalMeta {
    font-size: 12px !important;
  }

  .storeDetailPage .itemMetrics,
  .blockDetailPage .itemMetrics {
    gap: 10px !important;
  }

  .storeDetailPage .itemMetric,
  .blockDetailPage .itemMetric {
    padding: 10px 10px 8px !important;
  }

  .storeDetailPage .itemMetric .value,
  .blockDetailPage .itemMetric .value,
  .storeDetailPage .itemCardCompactGross .itemMetric .value,
  .blockDetailPage .itemCardCompactGross .itemMetric .value {
    font-size: 18px !important;
  }

  .storeDetailPage .itemCardActionRowBottom,
  .blockDetailPage .itemCardActionRowBottom {
    margin-top: 10px !important;
    gap: 8px !important;
  }

  .storeDetailPage .itemCardActionRowBottom .btn,
  .blockDetailPage .itemCardActionRowBottom .btn {
    min-height: 32px !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
}

@media (min-width: 721px) {
  .storeDetailPage .itemMetric .value,
  .blockDetailPage .itemMetric .value,
  .storeDetailPage .itemCardCompactGross .itemMetric .value,
  .blockDetailPage .itemCardCompactGross .itemMetric .value {
    font-size: 20px !important;
  }
}


/* v37 pinpoint fix: keep title/goal on one row and prevent large amounts from wrapping */
.storeDetailPage .itemCardTitleMain,
.blockDetailPage .itemCardTitleMain {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  flex-wrap: nowrap !important;
}

.storeDetailPage .itemCardTitleLead,
.blockDetailPage .itemCardTitleLead {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.storeDetailPage .itemCardHead,
.blockDetailPage .itemCardHead {
  display: block !important;
  margin-bottom: 10px !important;
}

.storeDetailPage .itemTitle,
.blockDetailPage .itemTitle {
  min-width: 0;
  flex: 0 1 auto;
}

.storeDetailPage .itemGoalMeta,
.blockDetailPage .itemGoalMeta {
  margin-left: 0 !important;
  flex: 0 0 auto;
  white-space: nowrap !important;
}

.storeDetailPage .itemMetric,
.blockDetailPage .itemMetric,
.storeDetailPage .itemCardCompactGross .itemMetric,
.blockDetailPage .itemCardCompactGross .itemMetric {
  min-width: 0;
}

.storeDetailPage .metricAmount .value,
.blockDetailPage .metricAmount .value {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  letter-spacing: -0.035em !important;
  font-variant-numeric: tabular-nums;
}

.storeDetailPage .metricRate .value,
.blockDetailPage .metricRate .value {
  white-space: nowrap !important;
}

.storeDetailPage .itemCardCompactGross .metricAmount .value,
.blockDetailPage .itemCardCompactGross .metricAmount .value {
  font-size: 16px !important;
  line-height: 1.02 !important;
}

@media (max-width: 720px) {
  .storeDetailPage .metricAmount .value,
  .blockDetailPage .metricAmount .value {
    font-size: 16px !important;
    line-height: 1.02 !important;
  }

  .storeDetailPage .metricRate .value,
  .blockDetailPage .metricRate .value {
    font-size: 18px !important;
  }

  .storeDetailPage .itemCardCompactGross .metricAmount .value,
  .blockDetailPage .itemCardCompactGross .metricAmount .value {
    font-size: 15px !important;
  }
}

@media (min-width: 721px) {
  .storeDetailPage .metricAmount .value,
  .blockDetailPage .metricAmount .value {
    font-size: 18px !important;
  }

  .storeDetailPage .metricRate .value,
  .blockDetailPage .metricRate .value {
    font-size: 20px !important;
  }

  .storeDetailPage .itemCardCompactGross .metricAmount .value,
  .blockDetailPage .itemCardCompactGross .metricAmount .value {
    font-size: 17px !important;
  }
}


/* v39 mobile breakdown tuning: stronger label color + tighter legend rows */
.storeDetailPage .storeBreakdownAccordionSummary > span:first-child,
.blockDetailPage .storeBreakdownAccordionSummary > span:first-child {
  color: var(--text) !important;
}

.storeDetailPage .storeBreakdownLegend,
.blockDetailPage .storeBreakdownLegend {
  gap: 8px !important;
}

.storeDetailPage .storeBreakdownLegendRow,
.blockDetailPage .storeBreakdownLegendRow {
  gap: 12px !important;
  padding: 10px 14px !important;
  border-radius: 16px !important;
}

.storeDetailPage .storeBreakdownLegendMain,
.blockDetailPage .storeBreakdownLegendMain {
  gap: 9px !important;
}

.storeDetailPage .storeBreakdownLabel,
.blockDetailPage .storeBreakdownLabel {
  font-size: 14px !important;
  line-height: 1.12 !important;
  color: var(--text) !important;
}

.storeDetailPage .storeBreakdownLegendValue,
.blockDetailPage .storeBreakdownLegendValue {
  font-size: 18px !important;
  line-height: 1.02 !important;
}

.storeDetailPage .storeBreakdownLegendRatio,
.blockDetailPage .storeBreakdownLegendRatio {
  margin-top: 2px !important;
  font-size: 11px !important;
  line-height: 1.05 !important;
}

@media (max-width: 720px) {
  .storeDetailPage .storeBreakdownAccordionSummary,
  .blockDetailPage .storeBreakdownAccordionSummary {
    padding: 11px 14px !important;
    font-size: 14px !important;
  }

  .storeDetailPage .storeBreakdownAccordionHint,
  .blockDetailPage .storeBreakdownAccordionHint {
    font-size: 11px !important;
  }

  .storeDetailPage .storeBreakdownLegend,
  .blockDetailPage .storeBreakdownLegend {
    gap: 8px !important;
  }

  .storeDetailPage .storeBreakdownLegendRow,
  .blockDetailPage .storeBreakdownLegendRow {
    gap: 10px !important;
    padding: 9px 12px !important;
    border-radius: 15px !important;
  }

  .storeDetailPage .storeBreakdownSwatch,
  .blockDetailPage .storeBreakdownSwatch {
    width: 11px !important;
    height: 11px !important;
  }

  .storeDetailPage .storeBreakdownLabel,
  .blockDetailPage .storeBreakdownLabel {
    font-size: 13px !important;
    line-height: 1.08 !important;
  }

  .storeDetailPage .storeBreakdownLegendValue,
  .blockDetailPage .storeBreakdownLegendValue {
    font-size: 16px !important;
  }

  .storeDetailPage .storeBreakdownLegendRatio,
  .blockDetailPage .storeBreakdownLegendRatio {
    margin-top: 1px !important;
    font-size: 10px !important;
  }
}

html[data-theme="light"] .storeDetailPage .storeBreakdownAccordionSummary > span:first-child,
html[data-theme="light"] .blockDetailPage .storeBreakdownAccordionSummary > span:first-child,
html[data-theme="light"] .storeDetailPage .storeBreakdownLabel,
html[data-theme="light"] .blockDetailPage .storeBreakdownLabel {
  color: var(--text) !important;
}


/* v41 breakdown theme split: separate text tuning for dark and light */
.storeDetailPage,
.blockDetailPage {
  --breakdown-title-color: #eaf2ff;
  --breakdown-label-color: #d8e4f3;
  --breakdown-hint-color: #9fb0c7;
  --breakdown-value-color: #f8fbff;
  --breakdown-ratio-color: #9fb0c7;
}

html[data-theme="light"] .storeDetailPage,
html[data-theme="light"] .blockDetailPage {
  --breakdown-title-color: #0f172a;
  --breakdown-label-color: #334155;
  --breakdown-hint-color: #64748b;
  --breakdown-value-color: #0f172a;
  --breakdown-ratio-color: #64748b;
}


/* v42 theme colors for person page and charts */
.personDetailPage,
.storeDetailPage,
.blockDetailPage {
  --chart-legend: #eaf2ff;
  --chart-x-ticks: #cbd5e1;
  --chart-y-ticks: #7dd3fc;
  --chart-y1-ticks: #e5e7eb;
  --chart-grid: rgba(148, 163, 184, 0.12);
  --chart-line: #f8fafc;
  --chart-bar-fill: rgba(56, 189, 248, 0.42);
  --chart-bar-stroke: rgba(56, 189, 248, 0.95);
  --chart-donut-track-fill: rgba(51, 65, 85, 0.26);
  --chart-donut-track-stroke: rgba(51, 65, 85, 0.16);
  --chart-breakdown-border: rgba(15, 23, 42, 0.92);
}

.personDetailPage {
  --person-good-bg: rgba(14, 116, 144, .24);
  --person-good-border: rgba(56, 189, 248, .18);
  --person-good-text: #7dd3fc;
  --person-weak-bg: rgba(127, 29, 29, .22);
  --person-weak-border: rgba(248, 113, 113, .14);
  --person-weak-text: #fca5a5;
}

html[data-theme="light"] .personDetailPage,
html[data-theme="light"] .storeDetailPage,
html[data-theme="light"] .blockDetailPage {
  --chart-legend: #334155;
  --chart-x-ticks: #64748b;
  --chart-y-ticks: #0284c7;
  --chart-y1-ticks: #475569;
  --chart-grid: rgba(148, 163, 184, 0.18);
  --chart-line: #334155;
  --chart-bar-fill: rgba(14, 165, 233, 0.28);
  --chart-bar-stroke: rgba(2, 132, 199, 0.92);
  --chart-donut-track-fill: rgba(148, 163, 184, 0.18);
  --chart-donut-track-stroke: rgba(148, 163, 184, 0.12);
  --chart-breakdown-border: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .personDetailPage {
  --person-good-bg: rgba(37, 99, 235, 0.10);
  --person-good-border: rgba(37, 99, 235, 0.18);
  --person-good-text: #1d4ed8;
  --person-weak-bg: rgba(220, 38, 38, 0.10);
  --person-weak-border: rgba(220, 38, 38, 0.18);
  --person-weak-text: #b91c1c;
}
