﻿:root {
  --bg: #eef5ff;
  --bg-soft: #f7fbff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --panel-alt: #ecf4ff;
  --text: #10325d;
  --text-soft: #5f7da0;
  --primary: #2d6cdf;
  --primary-strong: #184da9;
  --secondary: #78b6ff;
  --accent: #91d3ff;
  --success: #17a26b;
  --warning: #f59f3a;
  --danger: #d95f72;
  --border: rgba(72, 127, 201, 0.16);
  --shadow: 0 24px 60px rgba(23, 67, 128, 0.12);
  --shadow-soft: 0 12px 28px rgba(45, 108, 223, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(120, 182, 255, 0.36), transparent 28%),
    radial-gradient(circle at top right, rgba(145, 211, 255, 0.3), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #edf5ff 58%, #e9f1fb 100%);
}

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

.eyebrow,
.section-eyebrow,
.card-eyebrow,
.sidebar-card-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.page-title,
.section-header h2,
.sidebar-card-title,
.metric-value,
.category-card h3 {
  margin: 0;
}

.nav-item,
.subnav-item,
.filter-chip,
.toggle-btn,
.refresh-btn {
  border: 0;
  cursor: pointer;
}

.nav-item.active,
.nav-item:hover,
.subnav-item.active,
.subnav-item:hover,
.filter-chip.active,
.toggle-btn.active {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.12), rgba(120, 182, 255, 0.22));
}

.main-panel {
  min-height: 100vh;
  padding: 28px;
}

.dashboard-page {
  display: grid;
  gap: 22px;
}

.trend-stack {
  display: grid;
  gap: 22px;
}

.trend-card-group {
  display: grid;
  gap: 18px;
}

.trend-card-stack {
  display: grid;
  gap: 18px;
}

.trend-card-item + .trend-card-item {
  padding-top: 18px;
  border-top: 1px solid rgba(88, 140, 214, 0.14);
}

.trend-card-item-header {
  margin-bottom: 14px;
}

.trend-card-item-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.overview-trend-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}

.overview-trend-title-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.overview-trend-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.overview-trend-toolbar-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.overview-trend-control-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.overview-trend-control-stack-top {
  align-self: flex-start;
}

.overview-trend-range-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.92);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 400;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.08);
}

.overview-trend-metric-group {
  min-width: 140px;
}

.overview-trend-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
  max-width: 760px;
}

.overview-trend-note-inline {
  margin-top: 10px;
  padding-right: 16px;
}

.overview-trend-dropdown {
  position: relative;
}

.overview-trend-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: fit-content;
  min-width: 0;
  max-width: min(28vw, 260px);
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(72, 127, 201, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(237, 245, 255, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  color: var(--text);
  text-align: left;
  font-weight: 400;
  font-size: 16px;
}

.overview-trend-dropdown-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 400;
}

.overview-trend-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1100;
  width: fit-content;
  min-width: 238px;
  max-width: min(72vw, 268px);
  padding: 8px 10px;
  max-height: 275px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  border: 1px solid rgba(88, 140, 214, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(23, 67, 128, 0.12);
}

.overview-trend-dropdown-group + .overview-trend-dropdown-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(88, 140, 214, 0.12);
}

.overview-trend-dropdown-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.overview-trend-dropdown-group-label {
  color: var(--text-soft);
  font-size: 14px;
}

.overview-trend-select-all-btn {
  min-height: 20px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.92);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.overview-trend-dropdown-group-list {
  display: grid;
  gap: 2px;
}

.overview-trend-dropdown-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
  line-height: 1.05;
}

.overview-trend-dropdown-option.is-active {
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.18), rgba(120, 182, 255, 0.28));
}

.overview-trend-category-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--trend-series-color, rgba(95, 125, 160, 0.45));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--trend-series-color, rgba(95, 125, 160, 0.45)) 50%, white);
}

.overview-trend-dropdown-option.is-active .overview-trend-category-dot {
  background: var(--trend-series-color, var(--primary-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--trend-series-color, rgba(45, 108, 223, 0.24)) 18%, transparent);
}

.overview-trend-chart-host {
  height: 400px;
  min-height: 400px;
  margin-top: -10px;
}

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

.overview-rank-section {
  display: grid;
  gap: 18px;
}

.overview-rank-grid-level1 {
  grid-template-columns: minmax(0, 1fr);
}

.overview-rank-level2-shell {
  display: grid;
  gap: 12px;
}

.overview-rank-card {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(88, 140, 214, 0.15);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 245, 255, 0.9));
}

.overview-rank-card h3 {
  margin: 8px 0 0;
  font-size: 20px;
}

.overview-rank-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.overview-rank-eyebrow-main {
  flex: 0 0 auto;
}

.overview-rank-eyebrow-compare {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: #7d92b0;
}

.overview-rank-eyebrow-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-rank-card-link {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.overview-rank-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(45, 108, 223, 0.12);
  border-color: rgba(88, 140, 214, 0.24);
}

.overview-rank-number {
  margin-top: 18px;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 800;
  line-height: 1;
  color: var(--primary-strong);
}

.overview-rank-number-top100-miss {
  font-size: 22px;
}

.overview-rank-copy,
.overview-rank-footnote {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.overview-rank-copy .delta-up,
.overview-rank-copy .delta-down {
  font-weight: 700;
}

.panel-title-meta {
  display: inline-grid;
  gap: 4px;
  margin-left: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  vertical-align: middle;
}

.ai-summary-meta {
  font-weight: 400;
}

.panel-title-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.panel-title-meta-label {
  color: #6d84a7;
  font-weight: 700;
}

.panel-title-meta-compare {
  color: #a3b2c6;
}

.overview-rank-footnote {
  font-size: 12px;
}

.overview-rank-card-hover.is-active {
  box-shadow: 0 14px 34px rgba(45, 108, 223, 0.12);
  border-color: rgba(88, 140, 214, 0.24);
}

.overview-rank-expand-area {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 220ms ease, opacity 180ms ease;
}

.overview-rank-level2-shell.has-active-panel .overview-rank-expand-area {
  max-height: 420px;
  opacity: 1;
}

.overview-rank-inline-panel {
  display: none;
  padding: 16px;
  border: 1px solid rgba(88, 140, 214, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(23, 67, 128, 0.12);
}

.overview-rank-inline-panel.is-active {
  display: block;
}

.overview-rank-hover-title {
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

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

.overview-rank-mini-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(88, 140, 214, 0.14);
  background: rgba(244, 249, 255, 0.92);
}

.overview-rank-mini-card h4 {
  margin: 8px 0 0;
  font-size: 18px;
}

.overview-rank-mini-number {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-strong);
}

.hero-panel,
.card,
.chart-card,
.input-card,
.table-card,
.landscape-card,
.spotlight-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 246, 255, 0.96)),
    linear-gradient(120deg, rgba(120, 182, 255, 0.16), rgba(145, 211, 255, 0.16));
  z-index: 80;
}

.page-header-panel {
  position: relative;
  overflow: visible;
  display: grid;
  gap: 16px;
  z-index: 90;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-entry-group,
.summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-format-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.08);
}

.summary-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.summary-title-row h2 {
  margin: 0;
}

.summary-subsection-heading {
  margin: 6px 0 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-editor-shell + .summary-subsection-heading {
  margin-top: 18px;
}

.summary-subsection-copy {
  margin: 0 0 8px;
  padding-left: 1em;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  font-weight: 700;
}

.summary-version-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.08);
}

.summary-version-btn {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.summary-version-btn.is-active {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.92), rgba(120, 182, 255, 0.92));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(45, 108, 223, 0.16);
}

.summary-version-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.summary-format-btn {
  min-width: 34px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.08);
}

.summary-format-btn.color-black {
  color: #111111;
}

.summary-format-btn.color-gray {
  color: #5b6574;
}

.summary-format-btn.color-green {
  color: #17a26b;
}

.summary-format-btn.color-red {
  color: #d95f72;
}

.summary-format-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.96);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.1);
}

.admin-status-badge.is-admin {
  background: rgba(23, 162, 107, 0.12);
  color: var(--success);
  box-shadow: inset 0 0 0 1px rgba(23, 162, 107, 0.18);
}

.admin-entry-btn,
.summary-save-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-entry-btn.is-secondary {
  background: rgba(236, 244, 255, 0.96);
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.1);
}

.summary-save-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.page-title {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
  margin-top: 6px;
}

.page-subtitle,
.panel-description,
.input-hint,
.table-note,
.spotlight-summary,
.landscape-copy {
  color: var(--text-soft);
  line-height: 1.7;
}

.refresh-btn {
  padding: 12px 16px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #6db7ff);
  box-shadow: var(--shadow-soft);
}

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

.metric-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(118, 172, 238, 0.18);
}

.metric-label {
  color: var(--text-soft);
  font-size: 13px;
}

.metric-value {
  margin-top: 10px;
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 800;
}

.metric-footnote {
  margin-top: 8px;
  font-size: 12px;
  color: var(--primary-strong);
}

.filter-bar {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 12px;
  padding-top: 4px;
}

.floating-toolbar-shell {
  position: fixed;
  top: 8px;
  left: 0;
  z-index: 1200;
  width: 0;
  opacity: 0;
  max-height: 0;
  pointer-events: none;
  overflow: visible;
  transform: translateY(-12px);
  transition: opacity 180ms ease, transform 180ms ease, max-height 180ms ease, margin-bottom 180ms ease;
}

.floating-toolbar-shell.is-visible {
  opacity: 1;
  max-height: 220px;
  margin-bottom: 12px;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-toolbar-card {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 1px solid rgba(72, 127, 201, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(23, 67, 128, 0.18);
  backdrop-filter: blur(18px);
  overflow: visible;
}

.floating-toolbar-title {
  align-self: center;
  padding: 2px 6px 0 2px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-strong);
  white-space: nowrap;
  line-height: 1;
}

.floating-toolbar-title-subline {
  display: inline-block;
  margin-top: 2px;
}

.floating-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(108px, 120px) minmax(108px, 120px) max-content minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 8px 10px;
  align-items: start;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
}

.floating-toolbar-grid-has-category {
  grid-template-columns: minmax(108px, 120px) minmax(108px, 120px) max-content minmax(200px, 1fr) minmax(200px, 1fr) minmax(132px, 168px);
}

.floating-toolbar-cell,
.floating-toolbar-range-group {
  min-width: 0;
}

.floating-toolbar-cell-fixed {
  width: 100%;
}

.floating-toolbar-cell-compare {
  width: fit-content;
}

.floating-toolbar-cell-range {
  width: 100%;
}

.floating-toolbar-label {
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-soft);
  white-space: nowrap;
}

.floating-toolbar-label-empty {
  visibility: hidden;
}

.filter-select-floating {
  height: 32px;
  padding: 0 6px;
  font-size: 10px;
}

.floating-compare-pill {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.floating-range-row.is-disabled,
.floating-toolbar-cell.is-disabled {
  opacity: 0.18;
  filter: saturate(0.45);
}

.floating-range-row.is-disabled .date-range-shell,
.floating-toolbar-cell.is-disabled .toggle-group {
  pointer-events: none;
}

.floating-toolbar-category-slot .category-dropdown-panel {
  min-width: 198px;
  width: max-content;
  max-width: 238px;
}

.floating-toolbar-category-slot .category-dropdown,
.floating-toolbar-category-slot .category-dropdown-trigger {
  width: 100%;
}

.floating-toolbar-cell-fixed .category-dropdown,
.floating-toolbar-cell-fixed .category-dropdown-trigger {
  width: 100%;
}

.floating-date-range-shell .date-range-display {
  height: 34px;
  padding: 0 8px;
  font-size: 11px;
}

.floating-reference-row .floating-date-range-shell .date-range-display {
  background: rgba(236, 240, 246, 0.96);
}

.floating-range-row .floating-toolbar-label:empty {
  display: block;
  height: 0;
  margin: 0 0 3px;
}

.floating-date-range-shell .date-range-segment,
.floating-date-range-shell .date-range-divider,
.floating-date-range-shell .date-range-days {
  font-size: 11px;
}

.floating-toggle-group {
  min-height: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.floating-toggle-group .toggle-btn {
  min-height: 32px;
  padding: 0 6px;
  font-size: 10px;
  white-space: nowrap;
}

.floating-toggle-group,
.overview-trend-metric-group {
  gap: 0;
  padding: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(234, 242, 252, 0.98), rgba(223, 234, 248, 0.94));
  box-shadow: inset 0 0 0 1px rgba(160, 182, 210, 0.34);
}

.floating-toggle-group .toggle-btn,
.overview-trend-metric-group .toggle-btn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: #6a7b92;
  font-size: 14px;
  font-weight: 400;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.floating-toggle-group .toggle-btn.active,
.overview-trend-metric-group .toggle-btn.active {
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 242, 255, 0.98));
  box-shadow:
    0 3px 10px rgba(58, 109, 184, 0.14),
    inset 0 0 0 1px rgba(45, 108, 223, 0.18);
}

.floating-toggle-group .toggle-btn:not(.active):hover,
.overview-trend-metric-group .toggle-btn:not(.active):hover {
  color: var(--text-main);
}

.filter-toolbar {
  display: grid;
  grid-template-columns: max-content max-content max-content 264px 264px;
  gap: 12px;
  padding: 14px;
  position: relative;
  z-index: 40;
  border: 1px solid rgba(72, 127, 201, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(45, 108, 223, 0.08);
}

.filter-toolbar-single {
  grid-template-columns: max-content max-content max-content 264px 264px;
}

.filter-toolbar-has-category {
  grid-template-columns: max-content max-content max-content 264px 264px max-content;
}

.filter-toolbar-item {
  min-width: 0;
}

.filter-toolbar-item-fixed {
  width: fit-content;
  min-width: 124px;
}

.filter-toolbar-item-compare {
  width: fit-content;
}

.filter-toolbar-item-range {
  width: 264px;
}

.filter-toolbar-item-category {
  width: fit-content;
  min-width: 144px;
  max-width: 180px;
}

.filter-toolbar-main-disabled .filter-toolbar-item.is-temporarily-disabled {
  opacity: 0.6;
  filter: saturate(0.3) brightness(0.94);
}

.filter-toolbar-main-disabled .filter-toolbar-item.is-temporarily-disabled,
.filter-toolbar-main-disabled .filter-toolbar-item.is-temporarily-disabled * {
  pointer-events: none;
}

.filter-toolbar-main-disabled .filter-toolbar-item.is-temporarily-disabled .category-dropdown-trigger,
.filter-toolbar-main-disabled .filter-toolbar-item.is-temporarily-disabled .date-range-display,
.filter-toolbar-main-disabled .filter-toolbar-item.is-temporarily-disabled .compare-pill-group {
  background: rgba(232, 237, 244, 0.96);
  box-shadow: inset 0 0 0 1px rgba(176, 186, 201, 0.24);
}

.floating-toolbar-card-main-disabled .floating-toolbar-cell.is-temporarily-disabled {
  opacity: 0.58;
  filter: saturate(0.28) brightness(0.94);
}

.floating-toolbar-card-main-disabled .floating-toolbar-cell.is-temporarily-disabled,
.floating-toolbar-card-main-disabled .floating-toolbar-cell.is-temporarily-disabled * {
  pointer-events: none;
}

.floating-toolbar-card-main-disabled .floating-toolbar-cell.is-temporarily-disabled .category-dropdown-trigger,
.floating-toolbar-card-main-disabled .floating-toolbar-cell.is-temporarily-disabled .date-range-display,
.floating-toolbar-card-main-disabled .floating-toolbar-cell.is-temporarily-disabled .compare-pill-group {
  background: rgba(232, 237, 244, 0.96);
  box-shadow: inset 0 0 0 1px rgba(176, 186, 201, 0.24);
}

.compare-reference-col .date-range-display {
  background: rgba(236, 240, 246, 0.96);
}

.compare-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(228, 238, 251, 0.98), rgba(214, 228, 246, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(160, 182, 210, 0.34),
    0 8px 18px rgba(45, 108, 223, 0.08);
}

.compare-pill-group-floating {
  gap: 6px;
  padding: 3px;
}

.compare-pill {
  width: auto;
  min-width: 56px;
  padding: 0 18px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.compare-pill.active {
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 242, 255, 0.98));
  box-shadow:
    0 4px 12px rgba(58, 109, 184, 0.16),
    inset 0 0 0 1px rgba(45, 108, 223, 0.18);
}

.compare-pill:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  color: #8fa3bf;
  background: rgba(236, 240, 246, 0.9);
  box-shadow: none;
}

.compare-pill:not(.active) {
  opacity: 0.78;
}

.compare-pill:not(.active):hover {
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.66);
}

.filter-block {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
}

.filter-block-category {
  position: relative;
}

.filter-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-soft);
}

.filter-select {
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(248, 251, 255, 0.92);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  min-width: 0;
}

.category-dropdown {
  position: relative;
}

.category-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(237, 245, 255, 0.92));
  color: var(--text);
  text-align: left;
}

.category-dropdown-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.category-dropdown-caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #7a96bb;
}

.category-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 999;
  min-width: 220px;
  width: max-content;
  max-width: 280px;
  padding: 10px 10px;
  border: 1px solid rgba(88, 140, 214, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(23, 67, 128, 0.12);
}

.category-dropdown-category .category-dropdown-panel {
  min-width: 180px;
  width: 180px;
  max-width: 180px;
}

.floating-toolbar-shell .category-dropdown-panel {
  z-index: 1400;
}

.category-dropdown-group + .category-dropdown-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(88, 140, 214, 0.12);
}

.category-dropdown-group-label {
  margin: 0 8px 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.category-dropdown-group-list {
  display: grid;
  gap: 2px;
}

.category-dropdown-option {
  width: 100%;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 400;
}

.category-dropdown-option.active,
.category-dropdown-option:hover {
  background: linear-gradient(180deg, rgba(210, 227, 247, 0.98), rgba(196, 219, 244, 0.98));
}

.date-range-text {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--primary-strong);
  white-space: nowrap;
}

.filter-block-date-range {
  min-width: 0;
}

.date-range-shell {
  position: relative;
}

.date-range-shell.is-disabled {
  pointer-events: none;
}

.date-range-display {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(248, 251, 255, 0.92);
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.date-range-display.is-static {
  cursor: default;
}

.date-range-segment {
  flex: 1 1 0;
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-range-divider {
  color: var(--text-soft);
  font-size: 12px;
  flex: 0 0 auto;
}

.date-range-icon-btn {
  display: none;
}

.date-range-days {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 11px;
  white-space: nowrap;
}

.date-range-inputs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.date-range-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  background: transparent;
  color: transparent;
  opacity: 0;
}

.range-picker-popover {
  position: absolute;
  z-index: 9999;
  width: min(540px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(72, 127, 201, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(23, 67, 128, 0.18);
  backdrop-filter: blur(16px);
}

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

.range-picker-copy,
.range-picker-current {
  font-size: 12px;
  color: var(--text-soft);
}

.range-picker-calendars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.range-picker-month-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.range-picker-month-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.96);
  color: var(--primary-strong);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.12);
}

.range-picker-month-btn:hover {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.14), rgba(120, 182, 255, 0.26));
}

.range-calendar-month {
  padding: 8px;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
}

.range-calendar-title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.range-calendar-weekdays,
.range-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.range-calendar-weekdays {
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-soft);
}

.range-day {
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.range-day.is-muted {
  color: #9ab0cd;
}

.range-day.is-no-data {
  color: #bccce1;
  opacity: 0.4;
}

.range-day.is-in-range {
  background: rgba(120, 182, 255, 0.16);
}

.range-day.is-selected {
  color: var(--primary-strong);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.2), rgba(120, 182, 255, 0.32));
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.18);
}

.range-day.is-pending-start,
.range-day.is-selected:focus-visible,
.range-day.is-selected:hover {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.24), rgba(120, 182, 255, 0.42));
  box-shadow:
    inset 0 0 0 1px rgba(45, 108, 223, 0.22),
    0 6px 12px rgba(45, 108, 223, 0.16);
}

.range-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.range-picker-action {
  min-width: 68px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .range-picker-calendars {
    grid-template-columns: 1fr;
  }
}

.range-picker-action.ghost {
  color: var(--text-soft);
  background: rgba(236, 244, 255, 0.92);
}


.overview-grid,
.daily-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
}

.stack-grid {
  display: grid;
  gap: 22px;
}

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

.card,
.chart-card,
.input-card,
.table-card,
.landscape-card,
.spotlight-card {
  padding: 22px;
}

.input-card {
  min-height: 200px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.input-card > .section-header {
  margin-bottom: 6px;
}

.summary-expand-btn {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.96);
  color: var(--primary-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.1);
}

.summary-expand-btn:hover {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.12), rgba(120, 182, 255, 0.24));
}

.summary-save-btn:hover,
.admin-entry-btn:hover {
  filter: brightness(1.03);
}

.insight-editor-shell {
  height: auto;
  resize: none;
  overflow: hidden;
}

.insight-input {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfdff, #f3f8ff);
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.insight-input-rich {
  overflow: hidden;
  resize: none;
  white-space: normal;
  outline: none;
}

.insight-input-rich.is-readonly {
  cursor: default;
}

.insight-input-rich.is-editable {
  cursor: text;
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.18);
}

.insight-line {
  line-height: 1.8;
}

.insight-line .insight-marker,
.insight-line .insight-content {
  display: inline-block;
  vertical-align: top;
}

.insight-line .insight-marker {
  width: 16px;
}

.insight-line.is-summary-heading {
  padding-left: 0;
  font-weight: 700;
}

.insight-line.is-indent-level1 {
  padding-left: 18px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.insight-line.is-indent-level1 .insight-marker {
  width: auto;
  flex: 0 0 auto;
  font-size: 1em;
  line-height: 1.5;
}

.insight-line.is-indent-level1 .insight-content {
  flex: 1;
  min-width: 0;
}

.insight-line.is-indent-level2 {
  padding-left: 52px;
  display: flex;
  align-items: flex-start;
  gap: 23px;
}

.insight-line.is-indent-level2 .insight-marker {
  width: 10px;
  flex: 0 0 auto;
  font-size: 0.92em;
  line-height: 1.65;
}

.insight-line.is-indent-level3 {
  padding-left: 87px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.insight-line.is-indent-competitor {
  padding-left: 32px;
  display: flex;
  align-items: flex-start;
  gap: 23px;
  margin-left: 0;
}

.insight-line.is-indent-competitor .insight-marker {
  width: auto;
  flex: 0 0 auto;
  font-size: 0.96em;
  line-height: 1.5;
}

.insight-line.is-indent-competitor .insight-content {
  flex: 1;
  min-width: 0;
}

.insight-line.is-indent-level2 .insight-content {
  flex: 1;
}

.insight-line.is-indent-level3 .insight-marker {
  width: auto;
  flex: 0 0 auto;
}

.insight-line.is-indent-level3 .insight-content {
  flex: 1;
  min-width: 0;
}

.insight-line .delta-up,
.insight-line .delta-down {
  font-weight: 700;
}

.summary-rank-strong {
  font-weight: 700;
  color: var(--text);
}

.summary-rank-change {
  font-weight: 700;
  color: var(--text);
}

.summary-rank-change.is-up {
  color: var(--success);
}

.summary-rank-change.is-down {
  color: var(--danger);
}

.summary-rank-change.is-neutral:not([style*="color"]) {
  color: #5b6574;
}

.summary-compare-range {
  color: #88a0bd;
}

.summary-indent {
  display: inline-block;
  width: 1.5em;
}

.summary-prefix-placeholder {
  display: inline-block;
  visibility: hidden;
  white-space: nowrap;
}

.insight-line-spacer {
  min-height: 14px;
}

.ai-summary-helper {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.overview-ai-competitor-shell {
  margin-top: 4px;
}

.overview-ai-competitor-scroll {
  grid-auto-columns: min(340px, calc((100% - 28px) / 3));
}

.overview-ai-competitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.overview-ai-competitor-grid-empty {
  grid-template-columns: minmax(0, 1fr);
}

.spotlight-empty.overview-ai-competitor-empty-card {
  place-items: start;
  min-height: 84px;
  padding: 16px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  text-align: left;
}

.overview-ai-competitor-empty-line {
  width: 100%;
}

.overview-ai-competitor-card {
  display: grid;
  align-content: start;
  align-items: start;
  justify-content: stretch;
  min-height: 118px;
  gap: 1px;
  padding: 14px 16px;
}

.overview-ai-competitor-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 10px;
  min-width: 0;
  min-height: 0;
}

.overview-ai-competitor-main {
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.overview-ai-competitor-copy {
  min-width: 0;
}

.overview-ai-competitor-copy .spotlight-brand {
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1;
  max-width: none;
  font-size: 16px;
  min-height: 20px;
}

.overview-ai-competitor-meta {
  display: flex;
  align-items: center;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 0;
  transform: translateY(-1px);
}

.overview-ai-competitor-rank-pack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.overview-ai-competitor-rank {
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  color: var(--primary-strong);
}

.overview-ai-competitor-delta {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  color: var(--text-soft);
}

.overview-ai-competitor-driver {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
  font-weight: 400;
  word-break: break-word;
  padding-left: 0;
  grid-column: 1 / -1;
}

@media (max-width: 1440px) {
  .overview-ai-competitor-scroll {
    grid-auto-columns: calc((100% - 28px) / 3);
  }

  .overview-ai-competitor-card {
    padding: 12px 14px;
  }

  .overview-ai-competitor-copy .spotlight-brand {
    font-size: 16px;
  }
}

.spotlight-item.overview-ai-competitor-card {
  display: grid;
  justify-content: stretch;
  align-items: start;
}

.overview-ai-competitor-delta.is-muted {
  font-weight: 400;
  color: var(--text-soft);
  font-size: inherit;
  line-height: inherit;
}

.admin-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 50, 93, 0.32);
  backdrop-filter: blur(8px);
}

.admin-login-dialog {
  width: min(440px, 100%);
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(23, 67, 128, 0.22);
}

.admin-login-head,
.admin-login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-login-head h3 {
  margin: 6px 0 0;
  font-size: 22px;
}

.admin-login-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.96);
  color: var(--primary-strong);
  font-size: 20px;
  cursor: pointer;
}

.admin-login-body {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.admin-login-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.admin-login-field input {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--text);
}

.admin-login-tip {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.table-card table,
.cumulative-brand-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th,
.table-card td,
.cumulative-brand-card th,
.cumulative-brand-card td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(88, 140, 214, 0.12);
  text-align: left;
  font-size: 14px;
}

.table-card th,
.cumulative-brand-card th {
  color: var(--text-soft);
  font-weight: 600;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--primary-strong);
  background: rgba(45, 108, 223, 0.12);
  font-weight: 800;
}

.chart-host {
  width: 100%;
  min-height: 340px;
}

.chart-host-lg {
  min-height: 420px;
}

.chart-host-trend {
  min-height: 210px;
}

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

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

.cumulative-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.cumulative-detail-row-embedded {
  margin-bottom: 18px;
}

.cumulative-detail-wide-card {
  width: 100%;
  min-height: 220px;
}

.cumulative-brand-card {
  display: grid;
  gap: 0;
}

.cumulative-dual-card {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.cumulative-subpanel {
  padding: 18px 18px 16px;
  border: 1px solid rgba(88, 140, 214, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.46);
  min-width: 0;
}

.cumulative-competitor-panel .section-header,
.cumulative-brand-panel .section-header {
  margin-bottom: 16px;
}

.top-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
  align-items: center;
}

.top-brand-card {
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(88, 140, 214, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.9));
}

.top-brand-card-rank-1 {
  padding-top: 24px;
  padding-bottom: 20px;
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(23, 67, 128, 0.12);
}

.top-brand-card-rank-2,
.top-brand-card-rank-3 {
  opacity: 0.94;
}

.top-brand-rank-copy {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 20px;
}

.top-brand-crown {
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(23, 67, 128, 0.12));
}

.top-brand-crown-rank-1 {
  color: #d4a63a;
}

.top-brand-crown-rank-2 {
  color: #98a8c1;
}

.top-brand-crown-rank-3 {
  color: #c48758;
}

.top-brand-rank {
  margin-top: 2px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  color: var(--text);
}

.top-brand-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.top-brand-logo-wrap {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(88, 140, 214, 0.1);
  overflow: hidden;
  flex: 0 0 auto;
}

.top-brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.top-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
  text-align: center;
}

.top-brand-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.top-brand-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.92);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
}

.top-brand-tag.is-up {
  background: rgba(226, 246, 238, 0.96);
  color: var(--success);
}

.top-brand-tag.is-down {
  background: rgba(255, 236, 239, 0.96);
  color: var(--danger);
}

.cumulative-brand-table-wrap {
  margin-top: 4px;
  padding: 10px 12px 4px;
  border: 1px solid rgba(88, 140, 214, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.9), rgba(239, 246, 255, 0.74));
  max-height: 560px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.cumulative-brand-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  table-layout: auto;
}

.cumulative-col-rank {
  width: 72px;
}

.cumulative-col-brand {
  width: 220px;
}

.cumulative-col-sales {
  width: 340px;
}

.cumulative-col-compact {
  width: 88px;
}

.cumulative-brand-table thead th {
  padding: 0 10px 6px;
  border-bottom: 0;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(248, 251, 255, 0.9);
}

.sales-header-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.brand-panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.coverage-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.94);
  border: 1px solid rgba(88, 140, 214, 0.16);
}

.coverage-toggle-btn {
  min-width: 54px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.coverage-toggle-btn.active {
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.92), rgba(120, 182, 255, 0.92));
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(45, 108, 223, 0.18);
}

.icon-action-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(88, 140, 214, 0.16);
  border-radius: 12px;
  background: rgba(236, 244, 255, 0.92);
  color: var(--primary-strong);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.icon-action-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.14), rgba(120, 182, 255, 0.22));
  border-color: rgba(45, 108, 223, 0.28);
  box-shadow: 0 10px 24px rgba(45, 108, 223, 0.14);
}

.sales-visibility-btn {
  width: 28px;
  height: 22px;
  border: 1px solid rgba(88, 140, 214, 0.16);
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.92);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.sales-visibility-btn.is-active {
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.18), rgba(120, 182, 255, 0.26));
}

.cumulative-brand-table tbody td {
  padding: 8px 10px;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  vertical-align: middle;
  text-align: center;
}

.cumulative-brand-table tbody td:first-child {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.cumulative-brand-table tbody td:last-child {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

.cumulative-brand-table tbody tr {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cumulative-brand-table tbody tr:hover td {
  background: rgba(236, 244, 255, 0.98);
}

.cumulative-brand-table tbody tr:hover {
  transform: translateY(-1px);
}

.cumulative-brand-table tbody tr.cumulative-brand-row-mlb td {
  background: linear-gradient(180deg, rgba(214, 231, 255, 0.98), rgba(199, 222, 252, 0.98));
  font-weight: 700;
}

.cumulative-brand-table tbody tr.cumulative-brand-row-standout td {
  background: linear-gradient(180deg, rgba(236, 250, 241, 0.98), rgba(226, 245, 232, 0.98));
}

.cumulative-brand-table tbody tr.cumulative-brand-row-mlb .rank-badge {
  background: rgba(45, 108, 223, 0.2);
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.12);
}

.cumulative-brand-table tbody tr.cumulative-brand-row-standout .rank-badge {
  background: rgba(23, 162, 107, 0.14);
  color: #11724d;
  box-shadow: inset 0 0 0 1px rgba(23, 162, 107, 0.12);
}

.brand-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.brand-cell-logo {
  display: block;
  width: auto;
  height: 14px;
  max-width: 22px;
  object-fit: contain;
  flex: 0 0 auto;
  background: transparent;
  mix-blend-mode: multiply;
}

.brand-cell-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-cell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 22px;
}

.sales-cell-value {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 1;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.62));
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(23, 67, 128, 0.08);
  white-space: nowrap;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  font-size: 13px;
}

.sales-cell.has-value-visible .sales-cell-value {
  opacity: 1;
}

.sales-cell-bar-track {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(222, 233, 247, 0.9), rgba(212, 226, 245, 0.96));
  overflow: hidden;
}

.sales-cell-bar-fill {
  height: 100%;
  min-width: 10px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(120, 182, 255, 0.92), rgba(45, 108, 223, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.cumulative-brand-table tbody tr.cumulative-brand-row-mlb .sales-cell-bar-fill {
  background: linear-gradient(90deg, rgba(78, 139, 238, 0.95), rgba(24, 77, 169, 0.95));
}

.cumulative-competitor-header {
  margin-top: 0;
}

.category-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(88, 140, 214, 0.15);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 245, 255, 0.88));
}

.category-card h3 {
  font-size: 18px;
}

.category-card-xl {
  padding: 24px;
  min-height: 220px;
}

.category-kpi {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.category-kpi strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 19px;
}

.spotlight-list {
  display: grid;
  gap: 14px;
}

.spotlight-row {
  display: grid;
  gap: 10px;
}

.spotlight-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.spotlight-row-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-soft);
}

.spotlight-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 28px) / 3);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}

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

.spotlight-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(248, 251, 255, 0.95), rgba(234, 243, 255, 0.9));
  border: 1px solid rgba(88, 140, 214, 0.12);
  overflow: hidden;
}

.spotlight-item-scroll {
  min-width: 0;
  scroll-snap-align: start;
}

.spotlight-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.spotlight-logo-wrap {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(88, 140, 214, 0.1);
  overflow: hidden;
  flex: 0 0 auto;
}

.spotlight-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: multiply;
}

.spotlight-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(236, 244, 255, 0.96);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.spotlight-brand {
  font-weight: 700;
}

.spotlight-metrics {
  position: relative;
  z-index: 1;
  text-align: right;
}

.spotlight-rank-value {
  font-size: 34px;
  line-height: 1;
  font-weight: 600;
  color: var(--primary-strong);
}

.spotlight-rank-detail {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.spotlight-reason-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.spotlight-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(236, 244, 255, 0.92);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 700;
}

.spotlight-empty {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(88, 140, 214, 0.18);
  background: rgba(248, 251, 255, 0.82);
  color: var(--text-soft);
  font-size: 13px;
}

.delta-up {
  color: var(--success);
}

.delta-new {
  color: var(--success);
}

.delta-down {
  color: var(--danger);
}

.toggle-group {
  display: flex;
  gap: 6px;
}

.toggle-group-compact .toggle-btn {
  min-height: 38px;
}

.toggle-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(236, 244, 255, 0.92);
  font-size: 11px;
  line-height: 1.1;
}

.toggle-btn:disabled {
  cursor: default;
}

.toggle-btn.active {
  color: var(--primary-strong);
  font-weight: 700;
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.2), rgba(120, 182, 255, 0.32));
  box-shadow: inset 0 0 0 1px rgba(45, 108, 223, 0.16);
}

.empty-state {
  padding: 26px;
  border-radius: 18px;
  text-align: center;
  background: rgba(248, 251, 255, 0.92);
  color: var(--text-soft);
}

.noscript-banner {
  margin: 16px 28px 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(217, 95, 114, 0.2);
  background: rgba(255, 245, 246, 0.95);
  color: #8c3142;
}

@media (max-width: 1280px) {
  .hero-metrics,
  .category-card-grid,
  .overview-rank-grid,
  .overview-grid,
  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card-grid-wide,
  .spotlight-grid,
  .top-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .floating-toolbar-card {
    grid-template-columns: 1fr;
  }

  .floating-toolbar-title {
    padding: 0;
    font-size: 22px;
  }

  .floating-toolbar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-self: stretch;
  }

}

@media (max-width: 980px) {
  .overview-trend-chart-host {
    height: 700px;
    min-height: 700px;
  }

  .spotlight-scroll {
    grid-auto-columns: 80%;
  }
  .main-panel {
    padding: 18px;
  }

  .hero-top,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .overview-trend-title-row,
  .overview-trend-toolbar-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .overview-trend-title-inline {
    align-items: flex-start;
  }

  .overview-trend-control-stack {
    justify-items: start;
  }

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

  .floating-toolbar-card,
  .floating-toolbar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .overview-trend-chart-host {
    height: 620px;
    min-height: 620px;
  }
}

@media (max-width: 980px) {
  .spotlight-scroll {
    grid-auto-columns: 80%;
  }
  .floating-toolbar-shell {
    position: static;
    width: 100%;
    opacity: 1;
    max-height: none;
    margin-bottom: 12px;
    pointer-events: auto;
    transform: none;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .spotlight-scroll {
    grid-auto-columns: 100%;
  }
  .hero-metrics,
  .category-card-grid,
  .category-card-grid-wide,
  .overview-rank-grid,
  .overview-grid,
  .daily-grid {
    grid-template-columns: 1fr;
  }

  .filter-toolbar,
  .filter-toolbar-single {
    grid-template-columns: 1fr;
  }

  .top-brand-grid {
    grid-template-columns: 1fr;
  }

  .table-card {
    overflow-x: auto;
  }
}

.export-feedback-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1600;
  min-width: 260px;
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(88, 140, 214, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(23, 67, 128, 0.14);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  backdrop-filter: blur(16px);
}

.export-feedback-toast.is-success {
  border-color: rgba(23, 162, 107, 0.2);
  background: rgba(243, 252, 248, 0.98);
  color: #11724d;
}

.export-feedback-toast.is-error {
  border-color: rgba(217, 95, 114, 0.2);
  background: rgba(255, 244, 246, 0.98);
  color: #a43c4d;
}

.detail-return-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1550;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(45, 108, 223, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 108, 223, 0.94), rgba(120, 182, 255, 0.94));
  box-shadow: 0 18px 36px rgba(23, 67, 128, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.detail-return-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
