:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-muted: #faf8ff;
  --ink: #25324b;
  --muted: #6f7890;
  --line: #e6e2f5;
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --warn: #b45309;
  --bad: #ff4d4f;
  --good: #16a34a;
  --neutral: #64748b;
  --shadow: 0 12px 28px rgba(37, 47, 75, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: #ffffff;
  color: var(--ink);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--accent-strong);
  font-weight: 800;
}

.brand small,
.boundary-note span,
.eyebrow,
.muted {
  color: var(--muted);
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.segmented button,
.filter-button,
.secondary-button,
.icon-button,
.export-button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.nav-item {
  min-height: 44px;
  padding: 0 14px;
  text-align: left;
  color: #3e4a63;
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  background: var(--panel-muted);
  color: var(--accent-strong);
  border-color: var(--line);
}

.boundary-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  display: grid;
  gap: 6px;
  line-height: 1.5;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar,
.filters,
.status-bar,
.panel,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.title-area {
  min-width: 0;
}

.ai-summary-slot {
  margin-top: 0;
}

.ai-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.ai-summary-card span,
.interface-status {
  color: var(--muted);
  font-size: 12px;
}

.ai-summary-card strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.ai-summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.ai-summary-card.ai-analysis-card {
  display: grid;
  align-items: stretch;
  justify-content: stretch;
  gap: 10px;
}

.ai-analysis-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.ai-analysis-heading > div {
  min-width: 0;
}

.ai-analysis-sections {
  position: relative;
  display: grid;
  gap: 10px;
}

.ai-analysis-sections.collapsed {
  max-height: 96px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}

.ai-analysis-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #d9e3ff;
  border-radius: 8px;
  background: #f8fbff;
}

.ai-analysis-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  background: #e8efff;
  color: #2451d6;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-analysis-row p {
  margin: 0;
  color: #3e4a63;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.ai-analysis-toggle {
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid #9aaeff;
  border-radius: 8px;
  padding: 0 12px;
  background: #eef3ff;
  color: #2451d6;
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
}

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

h1 {
  margin-bottom: 0;
  font-size: 26px;
}

h2 {
  font-size: 19px;
  margin-bottom: 14px;
}

h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

.toolbar,
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.segmented {
  display: flex;
  background: var(--panel-muted);
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
}

.shop-controls {
  min-height: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-controls > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.shop-pill {
  min-height: 34px;
  border: 1px solid #c9d7ff;
  border-radius: 8px;
  padding: 0 11px;
  background: #ffffff;
  color: #3156c7;
  cursor: pointer;
  white-space: nowrap;
}

.shop-pill.active,
.shop-pill:hover {
  background: #eef3ff;
  border-color: #8ea5ff;
  color: #2140a7;
}

.segmented button,
.filter-button,
.secondary-button,
.icon-button,
.export-button {
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
}

.segmented button.active,
.filter-button.active,
.export-button {
  background: var(--accent);
  color: #ffffff;
}

.export-button {
  border-color: var(--accent);
}

.secondary-button {
  border-color: var(--line);
  background: #ffffff;
}

.secondary-button:hover,
.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.filters {
  margin-top: 14px;
  padding: 12px;
}

.range-summary {
  display: grid;
  align-items: center;
}

.range-control-group {
  width: 100%;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.range-control-group > span {
  color: var(--muted);
  font-size: 13px;
}

.range-control-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.range-period-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.range-current {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.range-pill,
.range-extension {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  line-height: 1.4;
  background: #ffffff;
  color: #3e4a63;
}

.range-pill.active,
.range-pill:hover {
  border-color: #9aaeff;
  background: #eef3ff;
  color: #2451d6;
}

.range-pill.disabled {
  border: 1px dashed var(--line);
  color: var(--muted);
  background: #fdfcff;
  cursor: not-allowed;
}

.range-extension {
  border: 1px dashed var(--line);
  color: var(--muted);
  background: #fdfcff;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.filters input,
.product-picker select,
.product-picker input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
}

.status-bar {
  margin-top: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.status-bar[hidden] {
  display: none;
}

.status-item {
  display: grid;
  gap: 3px;
}

.status-item span {
  color: var(--muted);
  font-size: 12px;
}

.status-item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.content {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.dashboard-loading-indicator {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 80;
  padding: 9px 14px;
  border: 1px solid #9aaeff;
  border-radius: 999px;
  background: #eef3ff;
  color: #2451d6;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-loading-indicator[hidden] {
  display: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.product-data-section {
  display: grid;
  gap: 14px;
  border-color: #dce5f7;
}

.station-inside-data {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.station-outside-data {
  border-color: #bcd8ca;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf8 100%);
}

.ad-traffic-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ad-traffic-group-tab {
  padding: 8px 14px;
  border: 1px solid #b8c5d9;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ad-traffic-group-tab.active {
  border-color: #2d7a59;
  background: #e9f7ef;
  color: #17583e;
}

.ad-traffic-group-tab:focus-visible {
  outline: 3px solid rgba(45, 122, 89, 0.2);
  outline-offset: 2px;
}

.ad-traffic-single-group {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e9f7ef;
  color: #17583e;
  font-size: 13px;
  font-weight: 800;
}

.ad-traffic-status {
  color: var(--muted);
  font-size: 13px;
}

.ad-traffic-status.ready {
  color: #25704e;
}

.ad-traffic-status.warn {
  color: var(--warn);
}

.metric-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.metric-card > div {
  min-width: 0;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--warn);
  line-height: 1.4;
}

.metric-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--accent-strong);
  font-size: 16px;
}

.metric-icon.green {
  background: #ecfdf3;
  color: var(--good);
}

.metric-icon.red {
  background: #fff1f2;
  color: var(--bad);
}

.metric-icon.orange {
  background: #fff7ed;
  color: var(--warn);
}

.overview-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(320px, 0.8fr);
  grid-template-areas:
    "trend trend trend"
    "insights insights insights"
    "risk risk risk"
    "sentiment negative positive"
    "search search search"
    "examples examples examples"
    "negative-examples negative-examples negative-examples";
  gap: 18px;
  align-items: stretch;
}

.overview-area-trend {
  grid-area: trend;
}

.overview-area-insights {
  grid-area: insights;
}

.overview-area-sentiment {
  grid-area: sentiment;
}

.overview-area-positive {
  grid-area: positive;
}

.overview-area-negative {
  grid-area: negative;
}

.overview-area-search {
  grid-area: search;
}

.overview-area-risk {
  grid-area: risk;
}

.overview-area-examples {
  grid-area: examples;
}

.overview-area-negative-examples {
  grid-area: negative-examples;
}

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

.placeholder-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-style: dashed;
}

.placeholder-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.placeholder-panel h2 {
  margin-bottom: 8px;
}

.interface-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfcff;
}

.search-term-panel {
  min-width: 0;
  overflow: visible;
}

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

.search-term-header h2 {
  margin-bottom: 0;
}

.search-term-period-picker {
  position: relative;
  flex: 0 0 auto;
}

.search-term-period-picker .profile-segmented button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.search-term-period-picker .profile-segmented button small {
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.72;
}

.search-term-month-panel {
  top: 46px;
  right: 0;
  z-index: 40;
}

.search-term-month-panel .profile-month-option {
  display: grid;
  place-content: center;
  gap: 2px;
}

.search-term-month-panel .profile-month-option small {
  color: #9aa3b7;
  font-size: 10px;
}

.search-term-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.search-term-tabs button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #3e4a63;
  cursor: pointer;
}

.search-term-tabs button.active,
.search-term-tabs button:hover {
  border-color: #9aaeff;
  background: #eef3ff;
  color: #2451d6;
}

.search-term-tabs span {
  color: var(--muted);
  font-size: 12px;
}

.search-term-table-wrap {
  max-width: 100%;
  max-height: 540px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-term-table {
  min-width: 1120px;
  background: #ffffff;
  font-size: 13px;
}

.search-term-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8faff;
  color: #5f6980;
}

.search-term-table th,
.search-term-table td {
  padding: 10px 12px;
}

.search-term-table tbody tr:hover {
  background: #f8fbff;
}

.search-term-sort-button {
  width: 100%;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.search-term-sort-button:hover,
.search-term-sort-button.active {
  color: #2451d6;
}

.search-term-sort-icons {
  display: inline-grid;
  gap: 0;
  color: #a8b0c2;
  font-size: 9px;
  line-height: 8px;
}

.search-term-sort-icons span {
  height: 8px;
}

.search-term-sort-icons span.active {
  color: #2451d6;
}

.search-term-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.search-term-page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.search-term-page-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
  color: #3e4a63;
  cursor: pointer;
}

.search-term-page-actions button:hover:not(:disabled) {
  border-color: #9aaeff;
  background: #eef3ff;
  color: #2451d6;
}

.search-term-page-actions button:disabled {
  color: #a8b0c2;
  cursor: not-allowed;
}

.search-term-page-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-term-page-actions input {
  width: 58px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  color: var(--ink);
}

.rank-cell {
  width: 54px;
  color: var(--muted);
  font-weight: 700;
}

.term-cell {
  min-width: 180px;
}

.term-cell strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.term-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.search-term-category-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #dce5ff;
  border-radius: 6px;
  padding: 0 8px;
  background: #f3f7ff;
  color: #2451d6;
  font-weight: 700;
  white-space: nowrap;
}

.table-metric {
  display: grid;
  gap: 3px;
}

.table-metric strong {
  color: var(--ink);
  font-weight: 800;
}

.metric-delta {
  font-size: 12px;
  font-weight: 700;
}

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

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

.metric-delta.flat {
  color: var(--muted);
}

.exposed-products {
  min-width: 220px;
  display: grid;
  gap: 5px;
}

.exposed-products span {
  max-width: 260px;
  overflow: hidden;
  color: #3e4a63;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.product-summary-panel {
  display: grid;
  gap: 14px;
  overflow-x: auto;
}

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

.product-summary-metrics article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fdfcff;
}

.product-summary-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.product-summary-metrics strong {
  display: block;
  max-width: 100%;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.product-summary-table td:first-child {
  color: var(--muted);
  font-weight: 700;
}

.product-review-rate-note {
  display: block;
  max-width: 170px;
  margin-top: 4px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}

.chart-wrap {
  min-width: 0;
}

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

.chart-header strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.chart-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.line-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 10px;
}

.chart-density-note {
  margin: 8px 0 -2px;
  color: #7b8798;
  font-size: 12px;
  line-height: 1.5;
}

.chart-grid-line {
  stroke: #eef2f7;
  stroke-width: 1;
}

.chart-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line.muted {
  opacity: 0.72;
}

.chart-line.primary {
  stroke-width: 2.2;
}

.chart-line.gmv.primary {
  stroke-width: 2.2;
}

.chart-line.order,
.chart-dot.order,
.legend-dot.order {
  stroke: #4f46e5;
  background: #4f46e5;
}

.chart-line.sales,
.chart-dot.sales,
.legend-dot.sales {
  stroke: #2563eb;
  background: #2563eb;
}

.chart-line.customer,
.chart-dot.customer,
.legend-dot.customer {
  stroke: #9333ea;
  background: #9333ea;
}

.chart-line.review,
.chart-dot.review,
.legend-dot.review {
  stroke: #f59e0b;
  background: #f59e0b;
}

.chart-line.rate,
.chart-dot.rate,
.legend-dot.rate {
  stroke: #16a34a;
  background: #16a34a;
}

.chart-line.gmv,
.chart-dot.gmv,
.legend-dot.gmv {
  stroke: #0f766e;
  background: #0f766e;
}

.chart-area.gmv {
  fill: #0f766e;
  opacity: 0.08;
}

.chart-dot {
  fill: #ffffff;
  stroke-width: 1.7;
}

.chart-dot.muted {
  opacity: 0.62;
}

.chart-dot.primary {
  stroke-width: 2.4;
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

.chart-hover-group {
  outline: none;
}

.chart-hover-zone {
  fill: transparent;
  pointer-events: all;
  cursor: crosshair;
}

.chart-hover-line {
  opacity: 0;
  stroke: #475569;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.chart-hover-group:hover .chart-hover-line,
.chart-hover-group:focus .chart-hover-line,
.chart-hover-group:hover .chart-tooltip,
.chart-hover-group:focus .chart-tooltip {
  opacity: 1;
}

.chart-tooltip-box {
  fill: #ffffff;
  stroke: var(--line);
  stroke-width: 1;
  filter: drop-shadow(0 12px 20px rgba(37, 47, 75, 0.12));
}

.chart-tooltip-title {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.chart-tooltip-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-tooltip-value {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.chart-tooltip-value.gmv {
  fill: #0f766e;
}

.chart-tooltip-dot.gmv {
  fill: #0f766e;
}

.chart-tooltip-dot.order {
  fill: #4f46e5;
}

.chart-tooltip-value.sales {
  fill: #2563eb;
}

.chart-tooltip-dot.sales {
  fill: #2563eb;
}

.chart-tooltip-value.customer,
.chart-tooltip-dot.customer {
  fill: #9333ea;
}

.chart-tooltip-dot.review {
  fill: #f59e0b;
}

.chart-tooltip-dot.rate {
  fill: #16a34a;
}

.chart-legend,
.chart-metric-toggle,
.chart-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-legend {
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.chart-metric-toggle {
  justify-content: flex-end;
  gap: 0;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.legend-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  font-weight: 700;
}

button.legend-chip {
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.chart-metric-toggle .legend-chip {
  min-height: 34px;
  border: 0;
  border-left: 1px solid #dbe3ef;
  border-radius: 0;
  color: #334155;
  padding: 6px 16px;
}

.chart-metric-toggle .legend-chip:first-child {
  border-left: 0;
}

.chart-metric-toggle .legend-chip.active {
  background: #eefafa;
  color: #0f766e;
}

.legend-chip.gmv {
  border-color: rgba(15, 118, 110, 0.24);
  color: #0f766e;
}

.chart-summary {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid #edf0f5;
}

.chart-summary strong {
  color: var(--ink);
}

.insight-list {
  margin: 0;
  padding-left: 18px;
  color: #3e4a63;
  line-height: 1.9;
}

.overview-area-insights .insight-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.overview-area-insights .insight-list li {
  padding: 14px 16px;
  border: 1px solid #e7ecf3;
  border-radius: 10px;
  background: #f8fafc;
  line-height: 1.65;
}

.overview-risk-heading {
  margin-bottom: 14px;
}

.overview-risk-heading h2 {
  margin-bottom: 0;
}

.overview-risk-heading > span,
.risk-note-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.risk-note {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  color: var(--ink);
  line-height: 1.6;
}

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

.risk-note-heading h3 {
  margin: 0;
}

.risk-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-items: start;
}

.risk-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid #f1ddcb;
  border-radius: 12px;
  background: #fffaf5;
}

.risk-group-review {
  border-color: #f2d5d7;
  background: #fff8f8;
}

.risk-group-roi {
  border-color: #f1ddc1;
  background: #fffaf2;
}

.risk-group-gmv {
  border-color: #dce6ef;
  background: #f7fafc;
}

.risk-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.risk-group-heading > div {
  min-width: 0;
}

.risk-group-heading strong {
  display: block;
  color: #3e4a63;
}

.risk-group-heading span:not(.risk-group-icon) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.risk-group-icon {
  display: grid;
  flex: 0 0 auto;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  place-items: center;
  border-radius: 9px;
  background: #ffffff;
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
}

.risk-group p {
  margin: 0;
  color: #8d4b18;
  line-height: 1.65;
}

.risk-note-list {
  margin: 0;
  padding-left: 18px;
  color: #8d4b18;
}

.risk-note-list li + li {
  margin-top: 8px;
}

.risk-note-empty {
  padding: 16px;
  border-radius: 10px;
  background: #f6faf8;
  color: var(--good);
}

.donut-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.donut-layout .bar-row {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}

.donut-layout .bar-row strong {
  min-width: 34px;
  text-align: right;
}

.donut-chart {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.donut-chart > div {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
}

.donut-chart strong {
  color: var(--ink);
  font-size: 24px;
}

.keyword-cloud {
  min-height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 10px 16px;
  flex-wrap: wrap;
  text-align: center;
}

.keyword-cloud.positive {
  color: var(--good);
}

.keyword-cloud.negative {
  color: var(--bad);
}

.keyword-cloud span {
  font-weight: 700;
  line-height: 1.1;
}

.risk-product-table td:first-child {
  font-weight: 700;
}

.bad-text {
  color: var(--bad);
  font-weight: 700;
}

.issue-tag {
  display: inline-flex;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fff1f2;
  color: var(--bad);
  font-size: 12px;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.product-trend-layout {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  padding: 18px;
  min-width: 0;
}

.sentiment-bars,
.trend {
  display: grid;
  gap: 10px;
}

.bar-row,
.trend-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
}

.trend-row small {
  grid-column: 2 / -1;
  color: var(--muted);
}

.bar-track {
  height: 10px;
  background: var(--panel-muted);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.bar-fill.good {
  background: var(--good);
}

.bar-fill.bad {
  background: var(--bad);
}

.keyword-list,
.missing-list,
.example-list,
.doc-grid,
.profile-grid,
.data-center-grid,
.data-center-content {
  display: grid;
  gap: 10px;
}

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

.data-center-content > * {
  min-width: 0;
}

.data-center-content table {
  table-layout: fixed;
}

.data-center-content th,
.data-center-content td {
  overflow-wrap: anywhere;
}

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

.profile-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fdfcff;
}

.reference-block {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-muted);
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.profile-row:last-child {
  border-bottom: 0;
}

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

.profile-row.detail small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.profile-page-hero {
  display: grid;
  gap: 16px;
}

.profile-control-stack {
  display: grid;
  gap: 12px;
}

.profile-control-group {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.profile-control-group > span {
  color: var(--muted);
  font-size: 13px;
}

.profile-control-body {
  min-width: 0;
  display: grid;
  gap: 8px;
  position: relative;
}

.profile-control-note {
  color: var(--muted);
  font-size: 12px;
}

.profile-product-selector {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.profile-product-control-stack {
  display: grid;
  gap: 20px;
  margin: 18px 0 26px;
}

.profile-product-control-stack .profile-product-selector {
  margin: 0;
}

.profile-product-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.profile-product-field > span {
  color: var(--muted);
  font-size: 13px;
}

.profile-product-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
}

.profile-product-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.profile-product-pagination button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
  color: #3e4a63;
  cursor: pointer;
}

.profile-product-pagination button:disabled {
  color: #aeb5c2;
  cursor: not-allowed;
}

.profile-product-audience-block {
  background: #ffffff;
}

.profile-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-segmented button,
.profile-period-button,
.profile-date-select,
.profile-month-select,
.profile-month-panel-header button,
.profile-month-option,
.profile-week-option {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #3e4a63;
  cursor: pointer;
}

.profile-segmented button.active,
.profile-segmented button:hover,
.profile-period-button.active,
.profile-period-button:hover,
.profile-date-select:hover,
.profile-month-select[aria-expanded="true"],
.profile-month-select:hover,
.profile-month-option.selected,
.profile-month-option:not(:disabled):hover,
.profile-week-option.selected,
.profile-week-option:hover {
  border-color: #9aaeff;
  background: #eef3ff;
  color: #2451d6;
}

.profile-period-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-jd-picker .profile-control-body {
  position: relative;
}

.profile-jd-picker-toggle {
  min-height: 42px;
  min-width: min(420px, 100%);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px 0 16px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.profile-jd-picker-toggle::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #3f4758;
  border-radius: 3px;
  box-shadow: inset 0 4px 0 rgba(63, 71, 88, 0.16);
  flex: 0 0 auto;
}

.profile-jd-picker-toggle[aria-expanded="true"],
.profile-jd-picker-toggle:hover {
  border-color: #9aaeff;
  background: #f8faff;
}

.profile-jd-picker-panel {
  position: absolute;
  top: 50px;
  left: 0;
  z-index: 30;
  width: min(620px, calc(100vw - 48px));
  min-height: 380px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 42px rgba(37, 47, 75, 0.18);
  overflow: hidden;
}

.profile-jd-picker-panel.compact {
  width: min(470px, calc(100vw - 48px));
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
}

.profile-jd-calendar-empty {
  margin: 12px 18px 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #f7f8fb;
  color: #7b8798;
  font-size: 12px;
  text-align: center;
}

.profile-jd-time-controls .profile-period-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.profile-jd-time-controls .profile-period-button small {
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.72;
}

.profile-jd-picker-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f5f6f9;
  padding: 16px 0;
}

.profile-jd-picker-sidebar button {
  min-height: 54px;
  border: 0;
  border-radius: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.profile-jd-picker-sidebar button.active {
  color: #1f5bea;
  background: #ffffff;
}

.profile-jd-picker-sidebar button:hover {
  color: #2451d6;
  background: #ffffff;
}

.profile-jd-picker-main {
  padding: 16px 22px 20px;
}

.profile-jd-calendar {
  display: grid;
  gap: 16px;
}

.profile-jd-calendar-header {
  display: grid;
  grid-template-columns: 36px 36px minmax(0, 1fr) 36px 36px;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.profile-jd-calendar-header.month {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.profile-jd-calendar-header strong {
  font-size: 20px;
  color: var(--ink);
}

.profile-jd-calendar-header button {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #4d5566;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.profile-jd-calendar-header button:disabled {
  color: #c5cad5;
  cursor: not-allowed;
}

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

.profile-jd-calendar-weekdays span {
  min-height: 30px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.profile-jd-calendar-day {
  min-width: 0;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #4f5869;
  cursor: pointer;
  font-size: 16px;
}

.profile-jd-calendar-day:hover {
  background: #eef3ff;
  color: #2451d6;
}

.profile-jd-calendar-day.selected {
  background: #1f5bea;
  color: #ffffff;
  font-weight: 700;
}

.profile-jd-calendar-day.week-start.selected {
  background: #dfe7ff;
  color: #1f5bea;
}

.profile-jd-calendar-day.outside {
  color: #a3a9b5;
}

.profile-jd-calendar-day.muted {
  background: #f4f5f7;
  color: #b2b7c2;
  cursor: not-allowed;
}

.profile-jd-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 32px;
  padding: 8px 14px 4px;
}

.profile-jd-month-cell {
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #4f5869;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

.profile-jd-month-cell.selected {
  background: #1f5bea;
  color: #ffffff;
}

.profile-jd-month-cell:disabled {
  color: #b9bec8;
  cursor: not-allowed;
}

.profile-month-select {
  min-width: 122px;
  min-height: 44px;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  color: #596174;
}

.profile-month-select[aria-expanded="true"],
.profile-month-select:hover,
.profile-month-select:focus-visible {
  border-color: var(--line);
  background: #ffffff;
  color: #596174;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 47, 75, 0.08);
}

.profile-month-select::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.5px solid #929aaa;
  border-bottom: 1.5px solid #929aaa;
  transform: translateY(-2px) rotate(45deg);
  flex: 0 0 auto;
}

.profile-month-select[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

.profile-date-select {
  min-width: 132px;
  appearance: none;
}

.profile-week-picker {
  position: relative;
}

.profile-month-panel {
  position: absolute;
  top: 44px;
  right: 0;
  z-index: 20;
  width: min(320px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(37, 47, 75, 0.14);
  overflow: hidden;
}

.profile-month-panel .profile-month-option.selected,
.profile-month-panel .profile-month-option:not(:disabled):hover {
  border-color: transparent;
  background: #f8f6ff;
  color: var(--accent-strong);
}

.profile-week-panel {
  position: absolute;
  top: 44px;
  right: 0;
  z-index: 20;
  width: min(360px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(37, 47, 75, 0.16);
  overflow: hidden;
}

.profile-month-panel-header {
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 0 10px;
  text-align: center;
}

.profile-month-panel-header strong {
  font-size: 15px;
}

.profile-month-panel-header button {
  min-height: 32px;
  padding: 0;
  border-color: transparent;
  color: #9aa3b7;
}

.profile-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.profile-week-grid {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.profile-month-option {
  width: 100%;
  border-color: transparent;
}

.profile-month-inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-week-option {
  width: 100%;
  min-height: 48px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-color: transparent;
  text-align: left;
}

.profile-week-option strong {
  font-size: 13px;
}

.profile-week-option span {
  color: var(--muted);
  font-size: 12px;
}

.profile-month-option:disabled,
.profile-month-panel-header button:disabled {
  cursor: not-allowed;
  color: #c1c6d2;
  background: #f4f5f8;
}

.profile-feature-grid {
  display: grid;
  gap: 12px;
}

.profile-feature-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfcff;
  padding: 14px;
}

.profile-feature-card span {
  color: var(--muted);
  font-size: 13px;
}

.profile-feature-card strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.profile-feature-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.profile-feature-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.profile-snapshot-chart-grid {
  margin-top: 10px;
}

.profile-ai-analysis {
  padding-top: 16px;
  padding-bottom: 16px;
}

.profile-ai-analysis p {
  margin: 0;
  color: #3e4a63;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.profile-ai-analysis strong {
  color: var(--accent-strong);
  font-weight: 800;
}

.profile-ai-analysis .ai-analysis-sections {
  color: #3e4a63;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.table-scroll table {
  min-width: 720px;
}

.profile-point-note {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #3e4a63;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.profile-point-label {
  color: var(--accent-strong);
  font-weight: 800;
}

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

.audience-chart-grid {
  margin-top: 12px;
}

.persona-chart-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.profile-empty-chart-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.persona-chart-heading {
  min-height: 44px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.persona-chart-heading h3 {
  margin-bottom: 0;
}

.persona-chart-heading strong {
  color: #2563eb;
  font-size: 13px;
  white-space: nowrap;
}

.persona-chart {
  min-height: 170px;
}

.profile-empty-chart {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--muted);
  text-align: center;
}

.profile-empty-canvas-panel .profile-empty-chart {
  min-height: 320px;
}

.profile-empty-no-data-icon {
  width: min(180px, 62%);
  max-height: 118px;
  object-fit: contain;
  display: block;
}

.profile-empty-chart p {
  position: relative;
  z-index: 1;
  margin: 0;
}

.profile-empty-chart p {
  max-width: 240px;
  line-height: 1.55;
}

.persona-donut-layout {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.persona-donut-chart {
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.persona-donut-chart > div {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.persona-donut-chart strong {
  color: var(--ink);
  font-size: 22px;
}

.persona-legend {
  display: grid;
  gap: 8px;
  color: #3e4a63;
  font-size: 13px;
}

.persona-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.persona-legend i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.persona-horizontal-chart {
  display: grid;
  gap: 11px;
}

.persona-horizontal-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
  color: #3e4a63;
  font-size: 13px;
}

.persona-horizontal-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-horizontal-row strong {
  text-align: right;
  color: var(--ink);
}

.persona-horizontal-row small {
  grid-column: 2 / -1;
  color: var(--muted);
}

.persona-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f2f5fb;
}

.persona-fill {
  height: 100%;
  border-radius: inherit;
}

.persona-ranking-list {
  margin: 0;
  padding: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  list-style: none;
}

.persona-ranking-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f8faff;
}

.persona-ranking-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-ranking-position {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8efff;
  color: #2451d6;
  font-size: 12px;
  font-weight: 800;
}

.persona-tags-list {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.persona-tags-item {
  display: block;
  padding: 0;
  color: var(--accent-strong);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.35;
}

.persona-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.persona-column-chart {
  min-height: 190px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-bottom: 1px solid var(--line);
}

.persona-column-item {
  min-width: 0;
  height: 170px;
  display: grid;
  grid-template-rows: 24px minmax(90px, 1fr) 34px;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.persona-column-item strong {
  color: var(--ink);
  font-size: 12px;
}

.persona-column-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.persona-column-track {
  width: 10px;
  height: 100%;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 999px;
  background: #f2f5fb;
}

.persona-column-track > div {
  width: 100%;
  border-radius: inherit;
}

.keywords {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.keyword {
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-tag {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--ink);
}

.example,
.missing,
.doc-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fdfcff;
  line-height: 1.55;
}

.cross-platform-review-list {
  grid-template-columns: 1fr;
}

.cross-platform-review-example {
  display: grid;
  gap: 8px;
}

.cross-platform-review-example p {
  margin: 0;
}

.cross-platform-review-source,
.cross-platform-review-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.cross-platform-review-meta {
  color: var(--muted);
  font-size: 12px;
}

.missing {
  color: var(--warn);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.product-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.product-picker select {
  width: min(100%, 620px);
  max-width: 100%;
}

.styled-select-native {
  display: none !important;
}

.styled-select {
  position: relative;
  width: min(100%, 620px);
  max-width: 100%;
  min-width: 0;
}

.profile-product-field .styled-select {
  width: 100%;
}

.styled-select.open {
  z-index: 60;
}

.styled-select-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 2px solid var(--line);
  border-radius: 11px;
  padding: 8px 16px;
  background: #ffffff;
  color: #596174;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.styled-select-trigger:hover,
.styled-select-trigger:focus-visible,
.styled-select.open .styled-select-trigger {
  border-color: var(--line);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 47, 75, 0.08);
}

.styled-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.styled-select-trigger::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid #929aaa;
  border-bottom: 1.5px solid #929aaa;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.16s ease;
}

.styled-select.open .styled-select-trigger::after {
  transform: translateY(2px) rotate(225deg);
}

.styled-select-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(37, 47, 75, 0.14);
  overflow: hidden;
  padding: 0;
}

.styled-select-popover[hidden] {
  display: none;
}

.styled-select-search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfaff;
}

.styled-select-search {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.styled-select-search:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(111, 76, 255, 0.11);
}

.styled-select-list {
  max-height: min(350px, 48vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.styled-select.searchable .styled-select-list {
  max-height: min(310px, calc(48vh - 62px));
}

.styled-select-option {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 0;
  padding: 10px 18px;
  background: #ffffff;
  color: #545b68;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.styled-select-option.selected,
.styled-select-option.active,
.styled-select-option:hover:not(:disabled) {
  background: #f8f6ff;
  color: var(--accent-strong);
}

.styled-select-option.selected {
  font-weight: 700;
}

.styled-select-option:disabled {
  color: #a4aab7;
  cursor: not-allowed;
}

.styled-select-option[hidden] {
  display: none;
}

.styled-select-empty {
  padding: 20px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.styled-select-empty[hidden] {
  display: none;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  display: grid;
  gap: 8px;
}

.empty strong {
  color: var(--ink);
}

.empty.compact {
  padding: 12px;
}

.ai-assistant-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: grid;
  justify-items: end;
  gap: 12px;
  pointer-events: none;
}

.ai-assistant-widget.dragging {
  transition: none;
}

.ai-assistant-widget > * {
  pointer-events: auto;
}

.ai-assistant-fab {
  width: 82px;
  height: 82px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(124, 58, 237, 0.36);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(84, 54, 160, 0.26);
  cursor: pointer;
}

.ai-assistant-fab img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 40%;
}

.ai-assistant-panel {
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 132px));
  max-height: calc(100vh - 132px);
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(37, 47, 75, 0.2);
}

.ai-assistant-widget.expanded .ai-assistant-panel {
  width: min(820px, calc(100vw - 32px));
  height: min(80vh, calc(100vh - 72px));
  max-height: calc(100vh - 72px);
}

.ai-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #fbf9ff 0%, #ffffff 100%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.ai-assistant-widget.dragging .ai-assistant-header {
  cursor: grabbing;
}

.ai-assistant-page-dragging,
.ai-assistant-page-dragging * {
  user-select: none !important;
}

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

.ai-assistant-title img {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 40%;
}

.ai-assistant-title strong,
.ai-assistant-title span {
  display: block;
}

.ai-assistant-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.ai-assistant-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.ai-assistant-header-actions .icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 50%;
  background: #ffffff;
  color: #6d28d9;
  box-shadow: 0 8px 18px rgba(84, 54, 160, 0.12);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.ai-assistant-header-actions .icon-button:hover {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.24);
  transform: translateY(-1px);
}

.ai-assistant-header-actions .icon-button:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.26);
  outline-offset: 2px;
}

.ai-assistant-header-actions .icon-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.ai-assistant-history {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  padding: 14px;
  background: #f8f6ff;
}

.ai-message {
  min-width: 0;
  max-width: 88%;
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  line-height: 1.55;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ai-message > * {
  min-width: 0;
  max-width: 100%;
}

.ai-message.user {
  justify-self: end;
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.ai-message p,
.ai-message ul {
  margin: 0;
}

.ai-message-body {
  margin: 0;
  white-space: pre-line;
}

.ai-message ul {
  padding-left: 18px;
  color: var(--muted);
}

.ai-answer-sections {
  display: grid;
  gap: 10px;
}

.ai-answer-section {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid #ebe6ff;
  border-radius: 8px;
  background: #ffffff;
}

.ai-answer-section.advice {
  border-color: rgba(124, 79, 255, 0.32);
  background: #f7f3ff;
}

.ai-answer-section-title {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.ai-answer-section-content {
  color: #312a44;
  line-height: 1.7;
  white-space: pre-line;
}

.ai-answer-points {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
  color: #312a44;
}

.ai-answer-points li {
  padding-left: 2px;
  line-height: 1.55;
}

.ai-message-status {
  color: var(--muted);
  font-size: 12px;
}

.ai-message.user .ai-message-status {
  color: rgba(255, 255, 255, 0.76);
}

.ai-assistant-questions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.ai-assistant-questions button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  background: var(--panel-muted);
  cursor: pointer;
  font-size: 12px;
}

.ai-assistant-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.ai-assistant-input textarea {
  width: 100%;
  min-height: 42px;
  max-height: 112px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #ffffff;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 47, 75, 0.38);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 54px rgba(37, 47, 75, 0.18);
  padding: 20px;
}

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

.data-update-modal .modal-backdrop {
  background: rgba(34, 40, 64, 0.44);
  backdrop-filter: blur(1px);
}

.data-update-panel {
  width: min(620px, 100%);
  max-height: min(620px, 92vh);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(25, 28, 48, 0.24);
}

.data-update-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 18px;
}

.data-update-header h2 {
  margin: 0;
  font-size: 22px;
}

.data-update-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.data-update-login-action {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #c9b8fb;
  border-radius: 7px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}

.data-update-login-action:hover {
  background: #f6f2ff;
}

.data-update-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.data-update-login-notice {
  margin: 0 24px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8e8;
  color: #9a5c00;
  font-size: 13px;
}

.data-update-list {
  display: grid;
  padding: 0 24px;
}

.data-update-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.data-update-store {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.data-update-store strong {
  font-size: 16px;
}

.data-update-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.data-update-status::before {
  content: '';
  width: 7px;
  height: 7px;
  display: inline-block;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: #94a3b8;
}

.data-update-status.ready::before {
  background: #16a34a;
}

.data-update-action {
  min-width: 188px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}

.data-update-action:hover:not(:disabled) {
  background: #f6f2ff;
}

.data-update-action:disabled {
  border-color: var(--line);
  background: var(--panel-muted);
  color: #94a3b8;
  cursor: not-allowed;
}

.data-update-progress {
  grid-column: 1 / -1;
  margin: -2px 0 14px;
  padding: 13px 14px;
  border: 1px solid #e5def8;
  border-radius: 10px;
  background: #fbfaff;
}

.data-update-progress > p {
  margin: 0 0 12px;
  color: #495268;
  font-size: 13px;
  font-weight: 600;
}

.data-update-progress ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-update-step {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 2px 7px;
  align-items: center;
  color: #8b93a5;
}

.data-update-step-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d7dbe5;
}

.data-update-step strong {
  font-size: 12px;
}

.data-update-step small {
  grid-column: 2;
  font-size: 11px;
}

.data-update-step.active,
.data-update-step.ready {
  color: #6d49d8;
}

.data-update-step.active .data-update-step-dot,
.data-update-step.ready .data-update-step-dot {
  background: #8b5cf6;
}

.data-update-step.done {
  color: #16834a;
}

.data-update-step.done .data-update-step-dot {
  background: #22a861;
}

.data-update-step.blocked {
  color: #b35b00;
}

.data-update-step.blocked .data-update-step-dot {
  background: #f59e0b;
}

.data-update-row.disabled strong,
.data-update-row.disabled .data-update-status {
  color: #94a3b8;
}

.tmall-upload-modal {
  z-index: 30;
}

.tmall-upload-modal .modal-backdrop {
  background: rgba(38, 33, 58, 0.58);
  backdrop-filter: blur(6px);
}

.tmall-upload-panel {
  width: min(812px, calc(100vw - 40px));
  padding: 0;
  overflow: hidden;
}

.tmall-upload-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.tmall-upload-header p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.tmall-upload-header h2 {
  margin: 0;
  color: #20283a;
  font-size: 24px;
}

.tmall-upload-frame {
  display: block;
  width: 100%;
  height: min(548px, calc(100vh - 190px));
  border: 0;
  background: #fff;
}

@media (max-width: 560px) {
  .data-update-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 0;
  }

  .data-update-action {
    width: 100%;
  }

  .data-update-progress ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tmall-upload-panel {
    width: calc(100vw - 24px);
  }

  .tmall-upload-header {
    padding: 18px;
  }

  .tmall-upload-frame {
    height: calc(100vh - 122px);
  }
}

.data-fetch-workbench {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
}

.data-fetch-intro {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.data-fetch-intro h3 {
  margin: 2px 0 6px;
  font-size: 24px;
}

.data-fetch-intro p {
  margin: 0;
  color: var(--muted);
}

.login-platform-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 4px;
  padding: 4px;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.login-platform-tabs button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.login-platform-tabs button.active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.18);
}

.data-fetch-shop-controls {
  width: 100%;
  padding-top: 6px;
}

.login-workbench-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.login-pane,
.platform-status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.login-pane {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.login-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-pane-header span,
.platform-status-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.login-pane-header strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--neutral);
  font-size: 12px;
}

.status-pill.warn {
  background: #fff7ed;
  color: #c2410c;
}

.status-pill.priority {
  color: #9f3a12;
  background: #fff1e8;
  border: 1px solid #ffc7a8;
}

.status-pill.priority.main {
  color: #8a2d0b;
  background: #ffe3d1;
  border-color: #ffad7a;
  font-weight: 700;
}

.login-warning-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
}

.login-warning-banner strong {
  white-space: nowrap;
}

.login-warning-banner span {
  color: #9a3412;
  font-size: 13px;
}

.login-version-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.login-version-strip strong {
  color: var(--accent-strong);
  font-size: 15px;
}

.login-version-strip button {
  margin-left: auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--accent-strong);
  cursor: pointer;
}

.login-status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-status-strip span {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-muted);
  color: #4b5563;
  font-size: 13px;
}

.login-frame {
  min-height: 250px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.login-account-preview {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.login-account-preview strong {
  font-size: 20px;
}

.login-account-preview span,
.login-frame p {
  color: var(--muted);
  font-size: 13px;
}

.official-login-frame {
  min-height: 280px;
  place-items: stretch;
  text-align: left;
}

.official-login-card {
  align-self: stretch;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.official-login-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
}

.official-login-card strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
}

.official-login-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.official-login-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.login-field-placeholder {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
  color: var(--muted);
  font-size: 13px;
}

.official-login-guide {
  grid-column: 1 / -1;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.official-login-guide li {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--panel-muted);
  color: #4b5563;
  font-size: 13px;
}

.login-detail-panel {
  min-width: 0;
}

.login-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.login-detail-card div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.login-detail-card div:last-child {
  border-bottom: 0;
}

.login-detail-card span {
  color: var(--muted);
  font-size: 13px;
}

.login-detail-card strong {
  font-size: 14px;
}

.danger-text {
  color: var(--bad);
}

.platform-status-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.platform-status-card {
  padding: 14px;
}

.platform-status-card.active {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.09);
}

.platform-status-card strong {
  display: block;
  margin-top: 4px;
}

.platform-status-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.data-fetch-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.data-fetch-button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.data-fetch-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.data-fetch-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.data-fetch-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.data-fetch-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

.data-fetch-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-muted);
}

.data-fetch-steps span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.data-fetch-steps strong {
  font-size: 13px;
}

.date-range-panel {
  width: min(620px, 100%);
}

.custom-range-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 14px;
}

.custom-range-fields label {
  color: var(--muted);
  font-size: 13px;
}

.custom-range-fields input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
}

.date-range-calendar {
  display: grid;
  gap: 10px;
}

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

.calendar-header {
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
}

.calendar-header strong {
  text-align: center;
}

.calendar-weekdays {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.calendar-day,
.calendar-blank {
  min-width: 0;
  min-height: 38px;
  border-radius: 8px;
}

.calendar-day {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.calendar-day:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.calendar-day.disabled {
  color: #b8c0cf;
  background: #f3f5f9;
  cursor: not-allowed;
}

.calendar-day.in-range {
  background: #eef4ff;
}

.calendar-day.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.range-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--warn);
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.icon-button {
  width: 36px;
  padding: 0;
  background: #ffffff;
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .topbar,
  .topbar-main,
  .ai-summary-card,
  .search-term-header,
  .placeholder-panel,
  .grid-two,
  .data-fetch-intro,
  .login-workbench-layout,
  .overview-dashboard {
    grid-template-columns: 1fr;
    display: grid;
  }

  .search-term-tabs {
    justify-content: flex-start;
  }

  .search-term-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-term-page-actions {
    justify-content: flex-start;
  }

  .overview-dashboard {
    grid-template-areas: none;
  }

  .trend-panel,
  .full-panel,
  .overview-area-trend,
  .overview-area-insights,
  .overview-area-sentiment,
  .overview-area-positive,
  .overview-area-negative,
  .overview-area-search,
  .overview-area-risk,
  .overview-area-examples,
  .overview-area-negative-examples {
    grid-area: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .status-bar,
  .metric-grid,
  .profile-grid,
  .persona-chart-grid,
  .product-summary-metrics,
  .profile-feature-grid,
  .compact-grid,
  .data-center-grid,
  .data-fetch-actions,
  .data-fetch-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-platform-tabs {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .overview-area-insights .insight-list,
  .risk-group-grid {
    grid-template-columns: 1fr;
  }

  .overview-risk-heading,
  .risk-note-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .risk-group {
    padding: 13px;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 14px;
  }

  .section-heading {
    flex-wrap: wrap;
  }

  .status-bar,
  .metric-grid,
  .profile-grid,
  .persona-chart-grid,
  .product-summary-metrics,
  .profile-feature-grid,
  .compact-grid,
  .data-center-grid,
  .data-fetch-actions,
  .data-fetch-steps,
  .login-status-strip {
    grid-template-columns: 1fr;
  }

  .profile-control-group {
    grid-template-columns: 1fr;
  }

  .profile-product-selector {
    grid-template-columns: 1fr;
  }

  .range-control-group {
    grid-template-columns: 1fr;
  }

  .bar-row,
  .trend-row {
    grid-template-columns: 74px minmax(0, 1fr) 72px;
  }

  .ai-assistant-widget {
    right: 14px;
    bottom: 14px;
  }

  .ai-assistant-widget[data-ai-assistant-positioned="true"] {
    left: auto !important;
    top: auto !important;
    right: 14px !important;
    bottom: 14px !important;
  }

  .ai-assistant-fab {
    width: 66px;
    height: 66px;
  }

  .ai-assistant-panel {
    width: calc(100vw - 28px);
    height: min(76vh, calc(100vh - 104px));
    max-height: calc(100vh - 104px);
  }

  .ai-assistant-widget.expanded .ai-assistant-panel {
    width: calc(100vw - 28px);
    height: min(76vh, calc(100vh - 104px));
    max-height: calc(100vh - 104px);
  }

  .ai-assistant-input {
    grid-template-columns: 1fr;
  }

	  .donut-layout {
	    grid-template-columns: 1fr;
	    justify-items: center;
	  }

	  .persona-donut-layout {
	    grid-template-columns: 1fr;
	    justify-items: center;
	  }

	}
/* Stable Zhuge mount; feature styles are provided by the independent service. */
body.zhuge-open .workspace > :not(#zhuge-ai-page), body.zhuge-open #ai-assistant-root { display: none !important; }
.zhuge-page[hidden] { display: none !important; }
