:root {
  --bg: #070a0f;
  --panel: #0e131c;
  --panel-2: #141b27;
  --border: #273142;
  --text: #f5f8fc;
  --sub: #b5c0cf;
  --muted: #758297;
  --accent: #62a8ff;
  --accent-2: #f5a742;
  --up: #27c499;
  --down: #e66767;
  --violet: #b18cff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--bg);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -5%, rgba(98, 168, 255, 0.13), transparent 32rem),
    radial-gradient(circle at 90% 18%, rgba(39, 196, 153, 0.06), transparent 28rem),
    linear-gradient(180deg, rgba(20, 27, 39, 0.48), rgba(7, 10, 15, 0) 22rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Malgun Gothic", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(42, 47, 61, 0.85);
  background: rgba(11, 13, 18, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner,
.page-shell,
.site-footer {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding-inline: 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.brand-line,
.header-actions,
.live-indicator {
  display: flex;
  align-items: center;
}

.brand-line {
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(255, 36, 66, 0.4);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 36, 66, 0.15), rgba(212, 8, 19, 0.05));
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.brand-mark:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(255, 36, 66, 0.7);
  box-shadow: 0 6px 22px rgba(229, 9, 20, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.brand-mark svg {
  display: block;
}

.header-actions {
  gap: 14px;
}

.live-indicator {
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 4px rgba(39, 196, 153, 0.12);
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  margin: 0;
  font-size: 15px;
}

.subtitle,
.snapshot-note,
.result-status,
.site-footer {
  color: var(--sub);
}

.subtitle {
  margin: 8px 0 0;
  font-size: 14px;
}

.view-tabs,
.market-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.market-tabs {
  margin-bottom: 14px;
}

.tab-button,
.ghost-button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--sub);
  white-space: nowrap;
}

.tab-button {
  min-height: 36px;
  padding: 8px 14px;
}

.tab-button[aria-selected="true"] {
  border-color: rgba(57, 135, 229, 0.9);
  background: var(--accent);
  color: #fff;
}

.page-shell {
  display: grid;
  gap: 18px;
  padding-top: 18px;
  padding-bottom: 22px;
}

[hidden] {
  display: none !important;
}

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(14, 19, 28, 0.96);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}

.stats-intro {
  position: relative;
  overflow: hidden;
  border-color: rgba(98, 168, 255, 0.42);
  background:
    linear-gradient(115deg, rgba(98, 168, 255, 0.09), transparent 36%),
    rgba(14, 19, 28, 0.98);
}

.stats-intro::after {
  position: absolute;
  top: -80px;
  right: -50px;
  width: 260px;
  height: 180px;
  border: 1px solid rgba(98, 168, 255, 0.12);
  border-radius: 50%;
  content: "";
  transform: rotate(-12deg);
  pointer-events: none;
}

.hero-note {
  max-width: 920px;
}

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

.snapshot-note,
.result-status {
  margin: 0;
  font-size: 13px;
  text-align: right;
}

.section-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.stats-view,
.stats-dashboard,
.validation-view,
.validation-dashboard,
.validation-detail,
.settings-view {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.metric-definition {
  border-left: 3px solid var(--accent-2);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  background: rgba(245, 167, 66, 0.07);
  color: var(--sub);
}

.metric-definition strong {
  color: #f6c87d;
}

.settings-intro {
  border-color: rgba(39, 196, 153, 0.45);
}

.settings-intro code {
  color: #78ddbf;
}

.settings-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.settings-provider-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel-2);
}

.settings-provider-card legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.settings-provider-card > p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 10px;
}

.settings-provider-card .connector-dot.is-ready {
  background: var(--up);
  box-shadow: 0 0 0 4px rgba(39, 196, 153, 0.11);
}

.settings-field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.settings-field > input {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: #0b1018;
  padding: 9px 10px;
  color: var(--text);
}

.settings-field > input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(98, 168, 255, 0.11);
}

.clear-setting {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--down);
  font-size: 9px;
  font-weight: 650;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.primary-button {
  min-height: 40px;
  border: 1px solid rgba(98, 168, 255, 0.75);
  border-radius: 8px;
  background: var(--accent);
  padding: 9px 16px;
  color: #fff;
  font-weight: 800;
}

.settings-actions p,
.analysis-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.manual-deploy-panel { border-color: rgba(98, 168, 255, 0.36); }

.deploy-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.deploy-step-list span {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  color: var(--sub);
  font-size: 11px;
  text-align: center;
}

.manual-deploy-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}

.manual-deploy-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.deploy-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0d131d;
  padding: 11px 13px;
}

.deploy-progress-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--muted);
}

.deploy-progress p { display: grid; gap: 3px; margin: 0; }
.deploy-progress strong { color: var(--text); font-size: 12px; }
.deploy-progress small { color: var(--muted); font-size: 10px; }
.deploy-progress[data-state="running"] { border-color: rgba(98, 168, 255, 0.45); background: rgba(57, 135, 229, 0.08); }
.deploy-progress[data-state="running"] .deploy-progress-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(98, 168, 255, 0.12); animation: deploy-pulse 1.2s ease-in-out infinite; }
.deploy-progress[data-state="success"] { border-color: rgba(39, 196, 153, 0.4); }
.deploy-progress[data-state="success"] .deploy-progress-dot { background: var(--up); box-shadow: 0 0 0 4px rgba(39, 196, 153, 0.1); }
.deploy-progress[data-state="failed"] { border-color: rgba(245, 167, 66, 0.45); }
.deploy-progress[data-state="failed"] .deploy-progress-dot { background: var(--accent-2); }

@keyframes deploy-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

.ai-analysis-panel .ghost-button {
  min-height: 38px;
  padding: 8px 13px;
}

.ai-analysis-panel button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.analysis-output {
  max-height: 560px;
  overflow: auto;
  margin: 14px 0 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1018;
  padding: 16px;
  color: var(--sub);
  font: 12px/1.7 -apple-system, BlinkMacSystemFont, "Pretendard", "Malgun Gothic", sans-serif;
  white-space: pre-wrap;
}

.validation-intro {
  border-color: rgba(57, 135, 229, 0.5);
}

.validation-intro .stats-grid {
  margin-top: 14px;
}

.decision-kpi {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(25, 34, 48, 0.96), rgba(16, 23, 34, 0.96));
  padding: 17px;
}

.decision-kpi::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--border);
  content: "";
}

.decision-kpi.tone-warning::before { background: var(--accent-2); }
.decision-kpi.tone-positive::before { background: var(--up); }
.decision-kpi.tone-signal::before { background: var(--accent); }
.decision-kpi.tone-danger::before { background: #ff7474; }
.decision-kpi-step { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: 0.07em; }
.decision-kpi > strong { display: block; margin-top: 9px; font-size: clamp(21px, 2.4vw, 29px); letter-spacing: -0.04em; }
.decision-kpi p { margin: 8px 0 0; color: var(--sub); font-size: 11px; }
.decision-kpi small { display: block; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.decision-path {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(180px, 1fr) auto minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(98, 168, 255, 0.34);
  border-radius: 12px;
  background: linear-gradient(115deg, rgba(57, 135, 229, 0.1), rgba(16, 23, 34, 0.94) 48%);
  padding: 14px;
}

.decision-path-title { display: grid; gap: 3px; }
.decision-path-title span { color: var(--accent); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.decision-path-title strong { font-size: 14px; }
.decision-path > i { color: var(--muted); font-style: normal; }
.decision-path-step { display: flex; align-items: center; gap: 9px; min-width: 0; }
.decision-path-step b { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid rgba(98, 168, 255, 0.36); border-radius: 9px; color: var(--accent); font-size: 12px; }
.decision-path-step p { display: grid; gap: 3px; min-width: 0; margin: 0; }
.decision-path-step strong { font-size: 12px; }
.decision-path-step small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.decision-path-step.is-fact b { border-color: rgba(39, 196, 153, 0.38); color: var(--up); }
.decision-path-step.is-action b { border-color: rgba(245, 167, 66, 0.42); color: var(--accent-2); }

.validation-panel {
  overflow: hidden;
}

.validation-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.validation-table {
  min-width: 920px;
  border-collapse: collapse;
  background: var(--panel-2);
}

.validation-table th,
.validation-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.validation-table th {
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
}

.validation-table td strong,
.validation-table td small {
  display: block;
}

.validation-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.status-badge,
.evidence-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-pass,
.tier-a {
  border-color: rgba(12, 163, 12, 0.5);
  background: rgba(12, 163, 12, 0.12);
  color: #7ee58a;
}

.status-warn,
.tier-c {
  border-color: rgba(201, 133, 0, 0.55);
  background: rgba(201, 133, 0, 0.13);
  color: #f4c76b;
}

.status-block {
  border-color: rgba(230, 103, 103, 0.6);
  background: rgba(230, 103, 103, 0.13);
  color: #ff9797;
}

.tier-b {
  border-color: rgba(57, 135, 229, 0.6);
  background: rgba(57, 135, 229, 0.13);
  color: #8dc1ff;
}

.reconciliation-grid,
.catalog-crosscheck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

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

.reconciliation-card,
.catalog-check-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.reconciliation-card h3,
.catalog-check-card h3 {
  margin-bottom: 10px;
}

.reconciliation-card p,
.catalog-check-card p {
  margin: 7px 0 0;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
}

.catalog-check-card p strong {
  color: var(--text);
  font-size: 22px;
}

.catalog-check-card small,
.reconciliation-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.warning-card {
  border-color: rgba(201, 133, 0, 0.5);
  background: rgba(201, 133, 0, 0.08);
}

.market-action-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.market-action-list > div {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(201, 133, 0, 0.4);
  border-radius: 8px;
  background: rgba(201, 133, 0, 0.08);
  padding: 12px;
  color: var(--sub);
  font-size: 12px;
}

.market-action-list p {
  margin: 0;
}

.decision-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(57, 135, 229, 0.5);
  border-radius: 8px;
  background: rgba(57, 135, 229, 0.09);
  padding: 14px;
}

.decision-callout div {
  display: grid;
  gap: 3px;
}

.decision-callout span,
.decision-callout p {
  margin: 0;
  color: var(--sub);
  font-size: 12px;
}

.decision-callout strong {
  font-size: 20px;
}

.caveat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.55;
}

.caveat-list > div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  padding: 11px;
}

.caveat-list > div > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(245, 167, 66, 0.13);
  color: #f6c87d;
  font-weight: 850;
}

.caveat-list p { display: grid; gap: 2px; margin: 0; }
.caveat-list p strong { color: #f6c87d; font-size: 10px; }

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

.freshness-strip > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  padding: 11px 13px;
}

.freshness-strip p { display: grid; gap: 2px; min-width: 0; margin: 0; }
.freshness-strip strong { color: var(--text); font-size: 12px; }
.freshness-strip small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.freshness-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--muted); }
.freshness-dot.is-live { background: var(--up); box-shadow: 0 0 0 4px rgba(39, 196, 153, 0.1); }
.freshness-dot.is-caution { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(245, 167, 66, 0.1); }

.latest-disclosure-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.peer-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(560px, 1.22fr);
  gap: 16px;
  margin-top: 14px;
}

.peer-bars {
  display: grid;
  align-content: start;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 14px;
}

.peer-bar-row {
  display: grid;
  grid-template-columns: 112px minmax(90px, 1fr) 72px;
  align-items: center;
  gap: 9px;
}

.peer-bar-row > div { display: grid; gap: 2px; min-width: 0; }
.peer-bar-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.peer-bar-row small { color: var(--muted); font-size: 9px; }
.peer-bar-row > b { color: var(--sub); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.peer-bar-track { height: 10px; overflow: hidden; border-radius: 999px; background: rgba(129, 148, 177, 0.12); }
.peer-bar-track i { display: block; height: 100%; border: 1px solid rgba(129, 148, 177, 0.4); border-radius: inherit; background: rgba(129, 148, 177, 0.48); }
.peer-bar-row.is-target strong,
.peer-bar-row.is-target > b { color: #f6c87d; }
.peer-bar-row.is-target .peer-bar-track i { border-color: #d8993d; background: #d8993d; box-shadow: 0 0 14px rgba(216, 153, 61, 0.18); }

.peer-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.peer-table { width: 100%; min-width: 660px; border-collapse: collapse; background: var(--panel-2); }
.peer-table th,
.peer-table td { border-bottom: 1px solid var(--border); padding: 10px 11px; color: var(--sub); font-size: 10px; text-align: left; white-space: nowrap; }
.peer-table th { color: var(--muted); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; }
.peer-table td:nth-child(2) { white-space: normal; }
.peer-table td strong,
.peer-table td small { display: block; }
.peer-table td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.peer-table tr.is-target td { background: rgba(245, 167, 66, 0.06); }
.peer-table tr.is-target td:first-child { box-shadow: inset 3px 0 #d8993d; }
.peer-readthrough { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin-top: 12px; border-left: 2px solid var(--accent-2); padding-left: 11px; }
.peer-readthrough strong { color: #f6c87d; font-size: 11px; }
.peer-readthrough p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.latest-disclosure-list a {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(90px, auto);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px 12px;
  color: var(--sub);
  font-size: 11px;
  text-decoration: none;
}

.latest-disclosure-list a:hover { border-color: var(--accent); }
.latest-disclosure-list a strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.latest-disclosure-list a small { color: var(--muted); text-align: right; }
.empty-inline { margin: 0; color: var(--muted); font-size: 11px; }

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

.source-ledger a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
}

.source-ledger a:hover {
  border-color: var(--accent);
}

.source-ledger strong,
.source-ledger small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-ledger small {
  color: var(--muted);
}

.compact-heading {
  margin-bottom: 8px;
}

.mini-grid {
  margin: 12px 0;
}

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

.catalog-kpi-grid {
  margin: 14px 0;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 1280px) {
  .catalog-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .catalog-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.business-scope-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  border: 1px solid rgba(98, 168, 255, 0.22);
  border-radius: 11px 11px 0 0;
  background: linear-gradient(135deg, rgba(57, 135, 229, 0.1), rgba(34, 184, 167, 0.035));
  padding: 12px 13px 10px;
}

.business-scope-bar > div { display: grid; gap: 3px; }
.business-scope-bar > div strong { font-size: 12px; }
.business-scope-bar > div span { color: var(--muted); font-size: 10px; }
.business-scope-bar .market-tabs { margin: 0; }
.business-scope-bar .tab-button { min-height: 32px; padding: 6px 10px; }
.business-scope-bar .tab-button small {
  min-width: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 6px;
  color: var(--muted);
  font-size: 8px;
}
.business-scope-bar .tab-button[aria-selected="true"] small { background: rgba(255, 255, 255, 0.18); color: #fff; }

.market-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid rgba(98, 168, 255, 0.22);
  border-top: 0;
  background: rgba(7, 10, 15, 0.38);
  padding: 12px;
}

.market-kpi-grid .stat-card { padding: 13px; }
.market-kpi-grid .stat-value { font-size: clamp(16px, 1.5vw, 23px); }
.market-data-definition {
  margin: 0;
  border: 1px solid rgba(98, 168, 255, 0.22);
  border-top: 0;
  border-radius: 0 0 11px 11px;
  background: rgba(57, 135, 229, 0.06);
  padding: 9px 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.market-data-definition strong { color: #8dbfff; }

.stat-card,
.chart-card,
.coverage-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  background: linear-gradient(145deg, rgba(17, 24, 36, 0.95), rgba(12, 17, 26, 0.95));
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(98, 168, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.stat-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3.5px;
  background: var(--border);
  content: "";
}

.stat-card.tone-signal::before { background: var(--accent); }
.stat-card.tone-signal { border-color: rgba(98, 168, 255, 0.22); background: linear-gradient(145deg, rgba(57, 135, 229, 0.08), rgba(12, 17, 26, 0.95)); }
.stat-card.tone-positive::before { background: var(--up); }
.stat-card.tone-positive { border-color: rgba(39, 196, 153, 0.22); background: linear-gradient(145deg, rgba(39, 196, 153, 0.07), rgba(12, 17, 26, 0.95)); }
.stat-card.tone-warning::before { background: var(--accent-2); }
.stat-card.tone-warning { border-color: rgba(245, 167, 66, 0.22); background: linear-gradient(145deg, rgba(245, 167, 66, 0.07), rgba(12, 17, 26, 0.95)); }
.stat-card.tone-neutral::before { background: #5a6a80; }

.stat-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.stat-value {
  display: block;
  margin-top: 7px;
  font-size: clamp(22px, 2.5vw, 29px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.stat-help {
  margin: 7px 0 0;
  color: var(--sub);
  font-size: 11px;
  line-height: 1.4;
}
  color: var(--sub);
  font-size: 12px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 10px;
  margin-top: 10px;
}

.chart-card,
.coverage-card {
  padding: 17px;
}

.signal-section {
  padding: 20px;
}

.signal-section > .panel-heading {
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(39, 49, 66, 0.75);
  padding-bottom: 13px;
}

.data-pill,
.sample-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: rgba(255,255,255,0.025);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.data-pill.warning { border-color: rgba(245, 167, 66, 0.35); color: #f6c87d; }
.data-pill.positive { border-color: rgba(39, 196, 153, 0.35); color: #78ddbf; }

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

.chart-grid > .chart-card { grid-column: span 6; }
.chart-grid > .span-7 { grid-column: span 7; }
.chart-grid > .span-5 { grid-column: span 5; }
.chart-grid > .full-span { grid-column: 1 / -1; }

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

.chart-card {
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.chart-card:hover {
  border-color: rgba(98, 168, 255, 0.38);
  background: #161e2b;
}

.chart-heading .stat-help {
  margin-top: 5px;
}

.chart-big-number {
  color: #78ddbf;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.character-rank-card {
  position: relative;
  align-self: start;
  overflow: visible;
}

.character-rank-card.is-expanded { grid-column: 1 / -1; }

.rank-heading-actions { display: flex; align-items: center; gap: 7px; }

.leaderboard-market-switch-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 0 2px;
}

.leaderboard-market-switch-heading > div { display: grid; gap: 3px; }
.leaderboard-market-switch-heading strong { display: flex; align-items: center; gap: 6px; color: #eef6ff; font-size: 12px; }
.leaderboard-market-switch-heading span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.leaderboard-market-switch-heading b {
  flex: 0 0 auto;
  border: 1px solid rgba(98, 168, 255, 0.34);
  border-radius: 999px;
  background: rgba(57, 135, 229, 0.1);
  padding: 4px 8px;
  color: #8fc3ff;
  font-size: 8px;
}

.leaderboard-market-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  border: 1px solid rgba(98, 168, 255, 0.32);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(15, 29, 48, 0.82), rgba(7, 10, 15, 0.58));
  padding: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.leaderboard-market-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 6px;
  min-height: 36px;
  border: 1px solid rgba(98, 168, 255, 0.13);
  border-radius: 8px;
  background: rgba(12, 20, 32, 0.72);
  color: #a8b8ca;
  font-size: 10.5px;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.leaderboard-market-tabs button:hover,
.leaderboard-market-tabs button:focus-visible { border-color: rgba(98, 168, 255, 0.7); background: rgba(57, 135, 229, 0.13); color: #fff; outline: none; transform: translateY(-1px); }
.leaderboard-market-tabs button[aria-pressed="true"] { border-color: #62a8ff; background: linear-gradient(135deg, #3987e5, #2c6fca); color: #fff; box-shadow: 0 5px 16px rgba(57, 135, 229, 0.34), inset 0 1px 0 rgba(255,255,255,0.2); }
.leaderboard-market-tabs button i { font-size: 14px; font-style: normal; line-height: 1; filter: saturate(0.88); }
.leaderboard-market-tabs button[aria-pressed="true"] i { filter: none; }
.leaderboard-market-tabs small { border-radius: 999px; background: rgba(255,255,255,0.08); padding: 2px 6px; color: inherit; font-size: 8px; font-variant-numeric: tabular-nums; }
.leaderboard-market-tabs button[aria-pressed="true"] small { background: rgba(255,255,255,0.2); }

.rank-expand-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  border: 1px solid rgba(98, 168, 255, 0.38);
  border-radius: 999px;
  background: rgba(57, 135, 229, 0.1);
  padding: 5px 9px 5px 11px;
  color: var(--sub);
  font-size: 9px;
}

.rank-expand-button:hover,
.rank-expand-button:focus-visible { border-color: var(--accent); background: rgba(57, 135, 229, 0.18); color: #fff; }
.rank-expand-button b { font-weight: 850; }
.rank-expand-button span { border-radius: 999px; background: rgba(255, 255, 255, 0.08); padding: 3px 6px; color: var(--accent); font-variant-numeric: tabular-nums; }

.leaderboard-layout { min-width: 0; }
.character-rank-card.is-expanded .leaderboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: 14px;
  margin-top: 14px;
}
.character-rank-card.is-expanded .character-rank-grid { margin-top: 0; }

.full-rank-panel { min-width: 0; overflow: hidden; border: 1px solid rgba(98, 168, 255, 0.3); border-radius: 11px; background: #0b111a; }
.full-rank-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); background: linear-gradient(110deg, rgba(57, 135, 229, 0.13), transparent 68%); padding: 12px; }
.full-rank-header > div { display: grid; gap: 3px; }
.full-rank-header strong { font-size: 13px; }
.full-rank-header small,
.full-rank-header > span { color: var(--muted); font-size: 9px; }
.full-rank-list { max-height: 506px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: rgba(98, 168, 255, 0.45) transparent; }
.full-rank-row { display: grid; grid-template-columns: 30px 38px minmax(0, 1fr) auto; align-items: center; width: 100%; gap: 9px; border: 0; border-bottom: 1px solid rgba(39, 49, 66, 0.68); background: transparent; padding: 8px 11px; color: var(--text); text-align: left; }
.full-rank-row:hover,
.full-rank-row:focus-visible { background: rgba(98, 168, 255, 0.08); outline: none; }
.full-rank-row .thumb,
.full-rank-row .thumb-fallback { width: 38px; height: 38px; flex-basis: 38px; }
.full-rank-number { color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; }
.full-rank-number.is-top-1 { color: #f6c35f; }
.full-rank-number.is-top-2 { color: #c6d0dc; }
.full-rank-number.is-top-3 { color: #df976d; }
.full-rank-identity,
.full-rank-metric { display: grid; min-width: 0; gap: 3px; }
.full-rank-identity strong,
.full-rank-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.full-rank-identity strong { font-size: 11px; }
.full-rank-identity small { color: var(--muted); font-size: 9px; }
.full-rank-metric { justify-items: end; }
.full-rank-metric strong { color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; }
.full-rank-metric small { color: #f6c87d; font-size: 8px; white-space: nowrap; }
.full-rank-caveat { margin: 0; border-top: 1px solid var(--border); padding: 9px 11px; color: var(--muted); font-size: 9px; }

.revenue-range-card { align-self: start; }

.character-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.character-rank-item {
  position: relative;
  display: grid;
  grid-template-rows: 112px auto auto auto;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: #0d131d;
  padding: 7px;
  color: var(--text);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.character-rank-item:hover,
.character-rank-item:focus-visible {
  z-index: 4;
  border-color: var(--accent);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.36);
  transform: translateY(-3px);
}

.character-rank-item.rank-1 { border-color: rgba(245, 167, 66, 0.68); }
.character-rank-item.rank-2 { border-color: rgba(181, 192, 207, 0.48); }
.character-rank-item.rank-3 { border-color: rgba(216, 138, 92, 0.48); }

.rank-number {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 10, 15, 0.88);
  color: var(--sub);
  font-size: 10px;
  font-weight: 900;
}

.rank-1 .rank-number { background: var(--accent-2); color: #161006; }
.rank-2 .rank-number { background: #b5c0cf; color: #111722; }
.rank-3 .rank-number { background: #d88a5c; color: #1a0e08; }

.rank-image-frame {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 28%, rgba(98, 168, 255, 0.14), transparent 58%),
    #101722;
}

.rank-image-frame .rank-image,
.rank-fallback {
  width: 100%;
  height: 100%;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.rank-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 28px;
  font-weight: 900;
}

.rank-name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-primary {
  color: var(--accent);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

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

.rank-traffic > span,
.rank-revenue {
  display: grid;
  min-width: 0;
  gap: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 5px 6px;
}

.rank-traffic small,
.rank-revenue small { color: var(--muted); font-size: 8px; }
.rank-traffic strong { overflow: hidden; color: var(--sub); font-size: 10px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; }
.rank-revenue { grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: rgba(245, 167, 66, 0.1); }
.rank-revenue strong { color: #f6c87d; font-size: 11px; font-variant-numeric: tabular-nums; }
.rank-revenue.is-share { background: rgba(34, 184, 167, 0.09); }
.rank-revenue.is-share strong { color: #63d9c8; }

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

.rank-metric-item {
  display: grid;
  min-width: 0;
  gap: 2px;
  border-radius: 6px;
  background: rgba(34, 184, 167, 0.09);
  padding: 4px 6px;
}

.rank-metric-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-metric-item strong {
  overflow: hidden;
  color: #63d9c8;
  font-size: 10.5px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-metric-item.is-revenue {
  background: rgba(245, 167, 66, 0.1);
}

.rank-metric-item.is-revenue strong {
  color: #f6c87d;
}

.rank-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 10;
  display: grid;
  width: min(260px, 82vw);
  gap: 5px;
  border: 1px solid rgba(98, 168, 255, 0.55);
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.52);
  padding: 13px;
  opacity: 0;
  color: var(--sub);
  font-size: 10px;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.rank-tooltip strong { color: var(--text); font-size: 14px; }
.rank-tooltip small { margin-top: 3px; color: #f6c87d; }
.character-rank-item:hover .rank-tooltip,
.character-rank-item:focus-visible .rank-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.character-rank-item:nth-child(3n + 1) .rank-tooltip {
  left: 0;
  transform: translate(0, 8px);
}

.character-rank-item:nth-child(3n + 1):hover .rank-tooltip,
.character-rank-item:nth-child(3n + 1):focus-visible .rank-tooltip {
  transform: translate(0, 0);
}

.character-rank-item:nth-child(3n) .rank-tooltip {
  right: 0;
  left: auto;
  transform: translate(0, 8px);
}

.character-rank-item:nth-child(3n):hover .rank-tooltip,
.character-rank-item:nth-child(3n):focus-visible .rank-tooltip {
  transform: translate(0, 0);
}

.journey-summary,
.chart-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.journey-summary > div,
.chart-readout > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(39, 49, 66, 0.8);
  border-radius: 8px;
  background: #0d131d;
  padding: 10px;
}

.journey-summary span,
.chart-readout span {
  color: var(--muted);
  font-size: 9px;
}

.journey-summary strong,
.chart-readout strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-readout strong.is-up { color: #78ddbf; }
.chart-readout strong.is-down { color: #f6c87d; }

.journey-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps), minmax(0, 1fr));
  gap: 0;
  margin: 25px 4px 8px;
}

.journey-steps::before {
  position: absolute;
  top: 29px;
  right: 8%;
  left: 8%;
  height: 3px;
  border-radius: 3px;
  background: var(--journey-color);
  opacity: 0.38;
  content: "";
}

.journey-step {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
}

.journey-step i {
  display: block;
  width: 13px;
  height: 13px;
  border: 3px solid var(--panel-2);
  border-radius: 50%;
  background: var(--journey-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--journey-color) 38%, transparent);
}

.journey-step strong {
  color: var(--sub);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.journey-step.is-latest i {
  width: 18px;
  height: 18px;
  border-width: 4px;
}

.journey-step.is-latest strong { color: var(--text); font-size: 12px; }

.snapshot-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
}

.snapshot-value {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0d131d;
  padding: 14px;
}

.snapshot-value span,
.snapshot-change small {
  color: var(--muted);
  font-size: 10px;
}

.snapshot-value strong {
  color: var(--sub);
  font-size: clamp(20px, 2vw, 27px);
  font-variant-numeric: tabular-nums;
}

.snapshot-value.is-current {
  border-color: color-mix(in srgb, var(--journey-color) 55%, var(--border));
  background: color-mix(in srgb, var(--journey-color) 8%, #0d131d);
}

.snapshot-value.is-current strong { color: var(--text); }

.snapshot-change {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 88px;
  color: var(--journey-color);
  text-align: center;
}

.snapshot-change > span { font-size: 30px; line-height: 1; }
.snapshot-change strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.snapshot-change small { color: var(--journey-color); }

.snapshot-milestones {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.snapshot-milestone {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-top: 2px solid rgba(117, 137, 166, 0.22);
  padding: 7px 4px 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.snapshot-milestone strong {
  overflow: hidden;
  color: var(--sub);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.snapshot-milestone.is-latest { border-color: var(--journey-color); }
.snapshot-milestone.is-latest strong { color: var(--text); }

.period-comparison-card { min-width: 0; }

.period-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.period-hero > div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0d131d;
  padding: 11px;
}

.period-hero span { color: var(--muted); font-size: 9px; }
.period-hero strong { color: var(--text); font-size: 17px; font-variant-numeric: tabular-nums; }
.period-change strong.is-lower,
.period-change.is-lower strong { color: #f6c87d; }
.period-change.is-higher strong { color: var(--comparison-color); }
.period-change small { color: var(--sub); font-size: 9px; }

.period-list {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.period-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(66px, auto) 54px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.period-label { color: var(--sub); font-size: 10px; font-variant-numeric: tabular-nums; }
.period-track { height: 9px; overflow: hidden; border-radius: 999px; background: #202936; }
.period-track i { display: block; height: 100%; border-radius: inherit; background: var(--comparison-color); }
.period-row strong { color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.period-row small { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; }
.period-row small.is-higher { color: var(--comparison-color); }
.period-row small.is-lower { color: #f6c87d; }

.settings-connection-panel { border-color: rgba(98, 168, 255, 0.34); }
.validation-detail { margin-top: 0; }

.chart-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

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

.bar-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(6rem, 0.34fr) minmax(0, 1fr) minmax(5rem, auto);
  align-items: center;
  gap: 10px;
  color: var(--sub);
  font-size: 13px;
}

.bar-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.bar-label strong,
.bar-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-label strong { color: var(--text); }
.bar-label small { color: var(--muted); font-size: 10px; }
.bar-value { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }

.bar-track {
  min-width: 0;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: var(--accent);
}

.chart-tail,
.footnote {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(39, 49, 66, 0.75);
  color: var(--muted);
  font-size: 10px;
}

.band-list,
.stacked-list,
.genre-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.revenue-headline {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.3fr);
  gap: 10px;
  margin-top: 14px;
}

.revenue-headline > div:first-child {
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(98, 168, 255, 0.45);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(57, 135, 229, 0.16), rgba(16, 26, 42, 0.85));
  box-shadow: 0 4px 18px rgba(57, 135, 229, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
}

.revenue-headline > div:first-child span { color: var(--accent); font-size: 11px; font-weight: 750; }
.revenue-headline > div:first-child small { color: var(--muted); font-size: 9.5px; }
.revenue-headline > div:first-child strong { color: #fff; font-size: clamp(26px, 2.5vw, 34px); font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

.revenue-range-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.revenue-range-summary > span {
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(13, 19, 29, 0.85);
  padding: 11px 12px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.revenue-range-summary > span:hover {
  transform: translateY(-1px);
  border-color: rgba(98, 168, 255, 0.4);
}

.revenue-range-summary > span.is-focus {
  border-color: rgba(98, 168, 255, 0.6);
  background: linear-gradient(145deg, rgba(57, 135, 229, 0.14), rgba(13, 19, 29, 0.95));
  box-shadow: 0 4px 14px rgba(57, 135, 229, 0.15);
}

.revenue-range-summary small { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.revenue-range-summary strong { color: var(--text); font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.revenue-range-summary > span.is-focus strong { color: #8ec3ff; }

.revenue-day-list { gap: 8px; margin-top: 14px; }
.revenue-day-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  border: 1px solid rgba(42, 53, 72, 0.7);
  border-radius: 10px;
  background: rgba(14, 20, 30, 0.65);
  padding: 10px 13px;
  transition: background 160ms ease, border-color 160ms ease;
}
.revenue-day-row:hover {
  border-color: rgba(98, 168, 255, 0.35);
  background: rgba(18, 26, 39, 0.85);
}
.revenue-date {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.revenue-day-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.revenue-day-values > span,
.revenue-day-values > strong { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; min-width: 0; color: var(--sub); font-size: 11px; font-variant-numeric: tabular-nums; }
.revenue-day-values > strong { color: #8ec3ff; font-weight: 800; }
.revenue-day-values small { color: var(--muted); font-size: 8.5px; font-weight: 700; }
.revenue-day-row .band-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.revenue-day-row .band-fill {
  border-radius: 999px;
  border: 1px solid rgba(98, 168, 255, 0.7);
  background: linear-gradient(90deg, rgba(57, 135, 229, 0.5), rgba(98, 168, 255, 0.75));
}
.revenue-day-row .band-marker {
  width: 2.5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

.benchmark-key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  border: 1px solid rgba(230, 103, 103, 0.25);
  border-radius: 8px;
  background: rgba(230, 103, 103, 0.05);
  padding: 8px 12px;
  font-size: 10.5px;
}
.benchmark-key span {
  width: 14px;
  border-top: 2px dashed #e66767;
}
.benchmark-key strong { color: #ff9b9b; font-weight: 750; }
.benchmark-key small { width: 100%; padding-left: 21px; color: var(--muted); font-size: 9px; }

.revenue-confidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.revenue-confidence-grid > div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(13, 19, 29, 0.85);
  padding: 10px 12px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.revenue-confidence-grid > div:hover {
  transform: translateY(-1px);
  border-color: rgba(98, 168, 255, 0.35);
}

.revenue-confidence-grid span { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.revenue-confidence-grid strong { color: var(--text); font-size: 15px; font-weight: 850; font-variant-numeric: tabular-nums; }
.revenue-confidence-grid small { color: var(--muted); font-size: 9px; }

.revenue-confidence-grid > .is-caution {
  border-color: rgba(245, 167, 66, 0.35);
  background: rgba(245, 167, 66, 0.06);
}

.revenue-confidence-grid > .is-caution strong { color: #f6c87d; }

.metric-definition {
  border-left: 3px solid var(--accent-2);
  background: rgba(245, 167, 66, 0.06);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
}

.composition-summary,
.daily-growth-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.composition-summary > div,
.daily-growth-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0d131d;
  padding: 10px 12px;
}

.composition-summary > .composition-primary { border-color: rgba(57, 135, 229, 0.5); background: rgba(57, 135, 229, 0.09); }
.composition-summary span,
.daily-growth-summary span { color: var(--muted); font-size: 9px; }
.composition-summary strong,
.daily-growth-summary strong { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.composition-summary small { color: var(--sub); font-size: 9px; }
.market-composition-card .composition-track { margin-top: 12px; }

.stacked-values { display: grid; gap: 2px; text-align: right; }
.stacked-values small { color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.band-row,
.stacked-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(5.5rem, auto);
  align-items: center;
  gap: 10px;
  color: var(--sub);
  font-size: 12px;
}

.band-row strong,
.stacked-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.band-track,
.stacked-track,
.genre-bar-track {
  position: relative;
  min-width: 0;
  height: 14px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.055);
}

.band-fill,
.band-marker,
.band-benchmark {
  position: absolute;
  top: 0;
  bottom: 0;
}

.band-fill {
  border: 1px solid rgba(98, 168, 255, 0.62);
  background: rgba(98, 168, 255, 0.25);
}

.band-marker {
  width: 2px;
  background: var(--text);
}

.band-benchmark {
  width: 2px;
  border-left: 2px dashed var(--down);
}

.benchmark-key {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10px;
}

.benchmark-key span {
  width: 16px;
  border-top: 2px dashed var(--down);
}

.stacked-track {
  display: flex;
  gap: 1px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  color: var(--sub);
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 10px;
}

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

.grid-line {
  stroke: rgba(117, 130, 151, 0.2);
  stroke-width: 1;
}

.axis-line {
  stroke: rgba(195, 194, 183, 0.35);
  stroke-width: 1;
}

.axis-text {
  fill: var(--muted);
  font-size: 11px;
}

.genre-row {
  display: grid;
  grid-template-columns: minmax(5rem, 0.22fr) minmax(0, 1fr) minmax(8rem, auto);
  align-items: center;
  gap: 10px;
  color: var(--sub);
  font-size: 12px;
}

.genre-row strong {
  color: var(--text);
}

.genre-row strong small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.genre-bar-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
}

.column-chart {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(34px, 1fr));
  align-items: end;
  gap: 9px;
  height: 165px;
  margin-top: 16px;
  padding-top: 22px;
  border-bottom: 1px solid rgba(117, 130, 151, 0.25);
}

.column-item {
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr) 20px;
  align-items: end;
  gap: 5px;
  height: 100%;
  min-width: 0;
  text-align: center;
}

button.column-item.is-clickable {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  padding: 0;
  cursor: pointer;
  transition: all 150ms ease;
  font: inherit;
}

button.column-item.is-clickable:hover {
  background: rgba(57, 135, 229, 0.08);
  border-color: rgba(98, 168, 255, 0.3);
}

button.column-item.is-clickable:hover .column-track {
  background: rgba(57, 135, 229, 0.12);
}

button.column-item.is-selected {
  background: rgba(57, 135, 229, 0.14);
  border-color: rgba(98, 168, 255, 0.6);
}

button.column-item.is-selected strong {
  color: #62a8ff;
  font-weight: 800;
}

button.column-item.is-selected .column-track {
  background: rgba(57, 135, 229, 0.22);
}

button.column-item.is-selected .column-track i {
  box-shadow: 0 0 10px rgba(57, 135, 229, 0.6);
}

.column-item strong,
.column-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-track {
  display: flex;
  align-items: end;
  justify-content: center;
  height: 100%;
  border-radius: 5px 5px 0 0;
  background: rgba(255,255,255,0.025);
}

.column-track i {
  display: block;
  width: min(34px, 72%);
  min-height: 4px;
  border-radius: 4px 4px 0 0;
}

.composition-track {
  display: flex;
  height: 34px;
  overflow: hidden;
  gap: 2px;
  margin-top: 22px;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
}

.composition-track span { min-width: 2px; }

.market-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.market-metric-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.market-metric-grid span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.market-metric-grid span i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.market-metric-grid strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.market-metric-grid small { color: var(--muted); font-size: 10px; }

.trend-summary {
  display: flex;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(39, 49, 66, 0.75);
}

.trend-summary span {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 6px;
  color: var(--sub);
  font-size: 10px;
}

.trend-summary i { width: 8px; height: 8px; border-radius: 50%; }
.trend-summary strong { color: #78ddbf; }
.trend-summary small { color: var(--muted); }

.scenario-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 12px;
}

.scenario-kpis {
  grid-template-columns: minmax(0, 1fr);
  align-content: stretch;
  margin: 0;
}

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

.integration-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--panel-2);
}

.integration-card small {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
}

.connector-dot {
  grid-row: 1 / 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.integration-card.is-ready .connector-dot {
  background: var(--up);
  box-shadow: 0 0 0 4px rgba(39, 196, 153, 0.11);
}

@media (max-width: 980px) {
  .live-indicator { display: none; }
  .chart-grid > .chart-card,
  .chart-grid > .span-7,
  .chart-grid > .span-5 { grid-column: 1 / -1; }
  .scenario-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .freshness-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .character-rank-card.is-expanded .leaderboard-layout { grid-template-columns: minmax(0, 1fr); }
  .full-rank-list { max-height: 430px; }
}

@media (max-width: 720px) {
  .header-actions { align-items: stretch; flex-direction: column; gap: 8px; }
  .signal-section { padding: 15px; }
  .market-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .integration-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-provider-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .bar-row { grid-template-columns: minmax(5.8rem, 0.42fr) minmax(0, 1fr); }
  .bar-value { grid-column: 2; font-size: 11px; text-align: left; }
  .column-chart { height: 180px; gap: 5px; }
  .character-rank-grid {
    grid-template-columns: none;
    grid-auto-columns: 132px;
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 2px 2px 9px;
    scroll-snap-type: inline mandatory;
  }
  .character-rank-item { scroll-snap-align: start; }
  .rank-heading-actions { align-items: end; flex-direction: column; }
  .rank-expand-button b { font-size: 0; }
  .rank-expand-button b::after { font-size: 9px; content: "전체 순위"; }
  .rank-tooltip { display: none; }
  .journey-summary,
  .chart-readout { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .journey-summary > div,
  .chart-readout > div { padding: 8px; }
  .journey-summary strong,
  .chart-readout strong { font-size: 13px; }
  .journey-step strong { font-size: 8px; }
  .snapshot-flow { grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr); gap: 5px; }
  .snapshot-value { padding: 10px; }
  .snapshot-change { min-width: 0; }
  .snapshot-change > span { font-size: 23px; }
  .snapshot-value strong { font-size: 18px; }
  .snapshot-milestones { overflow-x: auto; grid-auto-columns: 76px; grid-template-columns: none; grid-auto-flow: column; }
  .period-hero { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .period-hero > div { padding: 8px; }
  .period-hero strong { font-size: 13px; }
  .period-row { grid-template-columns: 36px minmax(0, 1fr) minmax(58px, auto) 46px; gap: 5px; }
  .band-row,
  .stacked-row { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .band-row strong,
  .stacked-row strong { grid-column: 2; text-align: left; }
  .chart-big-number { font-size: 14px; }
  .revenue-headline { grid-template-columns: minmax(0, 1fr); }
  .composition-summary,
  .daily-growth-summary { grid-template-columns: minmax(0, 1fr); }
  .revenue-day-values { gap: 5px; }
  .revenue-day-values > span,
  .revenue-day-values > strong { display: grid; gap: 2px; }
  .stacked-values { grid-column: 2; text-align: left; }
  .latest-disclosure-list a { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .latest-disclosure-list a small { text-align: left; }
  .deploy-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-deploy-actions { align-items: stretch; flex-direction: column; }
}

.coverage-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.coverage-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(42, 47, 61, 0.7);
  padding-bottom: 8px;
  color: var(--sub);
  font-size: 13px;
}

.coverage-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.coverage-list strong {
  color: var(--text);
}

.browser-heading {
  align-items: end;
}

.character-browser-heading { align-items: stretch; margin-bottom: 14px; }
.character-browser-title > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.catalog-freshness { display: flex; align-items: center; min-width: 250px; gap: 10px; border: 1px solid rgba(39, 196, 153, 0.3); border-radius: 11px; background: rgba(39, 196, 153, 0.06); padding: 10px 12px; }
.catalog-freshness p { display: grid; gap: 2px; margin: 0; }
.catalog-freshness small { color: #78ddbf; font-size: 9px; font-weight: 850; }
.catalog-freshness strong { font-size: 12px; }
.catalog-freshness span:last-child { color: var(--muted); font-size: 9px; }

.catalog-scope-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 11px; background: #0b111a; padding: 9px 10px 7px 13px; }
.catalog-scope-bar > div { display: grid; flex: 0 0 auto; gap: 2px; }
.catalog-scope-bar > div strong { font-size: 11px; }
.catalog-scope-bar > div span { color: var(--muted); font-size: 9px; }
.catalog-scope-bar .market-tabs { margin: 0; }
.market-tabs .tab-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.market-tabs .tab-button i {
  font-size: 13px;
  font-style: normal;
  line-height: 1;
  filter: saturate(0.9);
}
.market-tabs .tab-button:hover,
.market-tabs .tab-button:focus-visible {
  border-color: rgba(98, 168, 255, 0.65);
  background: rgba(57, 135, 229, 0.12);
  color: #fff;
  transform: translateY(-1px);
}
.market-tabs .tab-button[aria-selected="true"] {
  border-color: #62a8ff;
  background: linear-gradient(135deg, #3987e5, #2c6fca);
  color: #fff;
  box-shadow: 0 4px 12px rgba(57, 135, 229, 0.28);
}
.market-tabs .tab-button[aria-selected="true"] i {
  filter: none;
}
.market-tabs .tab-button small {
  min-width: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  color: var(--muted);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
}
.market-tabs .tab-button[aria-selected="true"] small {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.42fr) minmax(150px, 0.32fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(16, 19, 27, 0.7);
  padding: 11px;
}

.toolbar-status { display: flex; align-items: center; justify-content: flex-end; min-height: 40px; gap: 9px; }
.toolbar-status .result-status { white-space: nowrap; font-size: 10px; }
.toolbar-reset { min-height: 40px; }

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(98, 168, 255, 0.2);
  border-radius: 8px;
  background: rgba(11, 16, 25, 0.85);
  color: var(--text);
  padding: 9px 12px;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus,
.field select:focus,
.tab-button:focus-visible,
.ghost-button:focus-visible,
.row-button:focus-visible,
.card-button:focus-visible,
.dialog-close:focus-visible {
  border-color: var(--accent);
  background: rgba(14, 21, 33, 0.95);
  box-shadow: 0 0 0 3px rgba(98, 168, 255, 0.25);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
}

table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  font-size: 13px;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

th,
td {
  border-bottom: 1px solid rgba(42, 47, 61, 0.72);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #10151f;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.column-label {
  display: grid;
  gap: 2px;
}

.column-label small {
  color: #78ddbf;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

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

.character-cell {
  min-width: 220px;
}

.character-identity,
.dialog-hero,
.locale-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.thumb,
.thumb-fallback {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  background: #0f1118;
  object-fit: cover;
}

.thumb-full {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #0c0e15;
}

.thumb-fallback {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 800;
}

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

.name-stack strong {
  display: block;
  color: var(--text);
}

.name-stack span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.row-button,
.card-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.row-button {
  padding: 0;
}

.metric {
  color: var(--sub);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.activity-delta {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
}

.activity-delta.is-up { color: #3bd6a8; background: rgba(39, 196, 153, 0.08); }
.activity-delta.is-down { color: #ff7d7d; background: rgba(255, 91, 91, 0.08); }
.activity-delta.is-flat { color: var(--muted); }
.activity-unavailable { color: #59677c; }

.dual-delta-cell {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.delta-badge small {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.delta-badge.live-delta .activity-delta {
  border-color: rgba(39, 196, 153, 0.35);
  background: rgba(39, 196, 153, 0.09);
  color: #3bd6a8;
  padding: 2px 6px;
  font-size: 11px;
}

.delta-badge.daily-delta .activity-delta {
  border-color: rgba(98, 168, 255, 0.35);
  background: rgba(57, 135, 229, 0.1);
  color: #7bb5ff;
  padding: 2px 6px;
  font-size: 11px;
}

.delta-badge.daily-delta small {
  background: rgba(57, 135, 229, 0.2);
  color: #8ec3ff;
}

.delta-badge.live-delta small {
  background: rgba(39, 196, 153, 0.18);
  color: #78ddbf;
}
.collection-date { display: grid; gap: 3px; }
.collection-date strong { color: var(--sub); font-size: 12px; }
.collection-date small { color: var(--muted); font-size: 9px; }

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(42, 47, 61, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--sub);
  padding: 3px 8px;
  font-size: 12px;
}

.pill.active {
  border-color: var(--pill-accent, rgba(57, 135, 229, 0.75));
  color: #fff;
}

.card-list {
  display: none;
  gap: 10px;
}

.character-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.card-button {
  padding: 12px;
}

.card-main {
  display: flex;
  gap: 12px;
  min-width: 0;
}

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

.card-meta span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.card-meta strong {
  color: var(--sub);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.card-meta .activity-delta { width: fit-content; min-height: 22px; padding: 2px 7px; font-size: 11px; }
.card-collection { display: block; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 9px; color: var(--muted); font-size: 10px; }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 28px 16px;
  color: var(--sub);
}

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

.ghost-button {
  min-height: 36px;
  padding: 8px 12px;
}

.character-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: 86vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 20px;
  box-shadow: var(--shadow);
}

.character-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.dialog-close {
  position: sticky;
  top: 0;
  float: right;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.dialog-hero {
  align-items: start;
  padding-right: 38px;
}

.dialog-image-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(380px, 100%);
  height: min(640px, 70vh);
  border-radius: 12px;
  overflow: hidden;
  background: #0c0e15;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.dialog-image-frame .thumb-full,
.dialog-image-frame .thumb-fallback {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
}

.dialog-image-frame img.thumb-full {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.character-motion-shell,
.character-motion,
.motion-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.character-motion {
  z-index: 2;
  display: block;
  background: #080b11;
  object-fit: contain;
}

.motion-fallback {
  z-index: 1;
  display: none;
}

.character-motion-shell.is-fallback .character-motion {
  display: none;
}

.character-motion-shell.is-fallback .motion-fallback {
  display: block;
}

.motion-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.78);
  padding: 6px 9px;
  color: #eef6ff;
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.motion-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 4px rgba(39, 196, 153, 0.13);
}

.character-motion-shell.is-fallback .motion-badge {
  display: none;
}

.dialog-title-block .dialog-media-note {
  max-width: 300px;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.dialog-title-block {
  min-width: 0;
}

.dialog-title-block h2 {
  font-size: 26px;
}

.dialog-title-block p {
  margin: 8px 0 0;
  color: var(--sub);
}

.dialog-open-link {
  display: inline-flex;
  margin-top: 12px;
}

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

.dialog-metrics div {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  padding: 10px 12px;
}

.dialog-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.dialog-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.dialog-metrics small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.dialog-metrics .is-daily-metric {
  border-color: rgba(98, 168, 255, 0.35);
  background: linear-gradient(135deg, rgba(57, 135, 229, 0.12), rgba(16, 23, 34, 0.9));
}

.dialog-metrics .is-daily-metric span {
  color: #8ec3ff;
}

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

.locale-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.locale-item {
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
}

.locale-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.locale-copy p {
  margin: 4px 0 0;
  color: var(--sub);
  font-size: 13px;
}

.locale-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.locale-link:hover {
  text-decoration: underline;
}

.site-footer {
  padding-top: 4px;
  padding-bottom: 24px;
  font-size: 12px;
}

@media (max-width: 880px) {
  .header-inner {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

  .toolbar-status { justify-content: space-between; }

  .reconciliation-grid,
  .catalog-crosscheck-grid,
  .source-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .decision-path-title { grid-column: 1 / -1; }
  .decision-path > i { display: none; }

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

@media (max-width: 720px) {
  .header-inner,
  .page-shell,
  .site-footer {
    padding-inline: 14px;
  }

  .panel {
    padding: 14px;
  }

  .panel-heading {
    display: grid;
  }

  .character-browser-heading { gap: 11px; }
  .catalog-freshness { width: 100%; min-width: 0; }
  .catalog-scope-bar { align-items: stretch; flex-direction: column; }
  .catalog-scope-bar .market-tabs { width: 100%; }
  .business-scope-bar { align-items: stretch; flex-direction: column; }
  .business-scope-bar .market-tabs { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .business-scope-bar .tab-button { justify-content: center; padding-inline: 7px; }
  .market-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full-rank-row { grid-template-columns: 25px 36px minmax(0, 1fr) auto; gap: 7px; padding-inline: 8px; }

  .snapshot-note,
  .result-status {
    text-align: left;
  }

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

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

  .table-wrap {
    display: none;
  }

  .card-list {
    display: grid;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .reconciliation-grid,
  .catalog-crosscheck-grid,
  .market-action-list,
  .source-ledger,
  .caveat-list,
  .freshness-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .decision-callout,
  .market-action-list > div,
  .source-ledger a {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
  }

  .decision-callout {
    flex-direction: column;
  }

  .decision-path {
    grid-template-columns: minmax(0, 1fr);
  }

  .decision-path-step {
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }

  .peer-bar-row {
    grid-template-columns: 96px minmax(70px, 1fr) 66px;
  }

  .peer-readthrough {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .dialog-hero,
  .locale-item {
    display: grid;
  }

  .dialog-hero {
    padding-right: 0;
  }

  .dialog-image-frame {
    width: 100%;
    height: min(560px, 64vh);
  }

  .dialog-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}
.market-session-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.market-session-strip span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 12, 22, 0.44);
}

.market-session-strip small { color: var(--muted); }
.market-session-strip strong { color: var(--text); }

.chart-readout > div.is-highlight,
.period-hero > div.is-highlight {
  border-color: rgba(245, 167, 66, 0.48);
  background: linear-gradient(135deg, rgba(245, 167, 66, 0.13), rgba(57, 135, 229, 0.04));
}

.chart-readout > div.is-highlight strong,
.period-hero > div.is-highlight strong { color: #ffd58d; }

.metric-context-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  border: 1px solid rgba(98, 168, 255, 0.2);
  border-radius: 8px;
  background: rgba(57, 135, 229, 0.06);
  padding: 9px 10px;
  color: var(--sub);
  font-size: 10px;
}

.metric-context-note strong {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(98, 168, 255, 0.15);
  padding: 3px 7px;
  color: #9bcbff;
  font-size: 9px;
}

.chart-grid-primary > .revenue-range-card,
.chart-grid-primary > .character-rank-card {
  min-height: 552px;
}

.revenue-range-card,
.character-rank-card {
  background-image:
    radial-gradient(circle at 92% 4%, rgba(98, 168, 255, 0.11), transparent 34%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.018), transparent 45%);
}

.revenue-range-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  border-color: rgba(98, 168, 255, 0.34);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 18px 45px rgba(2, 8, 18, 0.15);
}

.character-rank-card { align-self: stretch; }
.character-rank-card.is-expanded { min-height: 0; }

.revenue-confidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.revenue-confidence-grid > div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(98, 168, 255, 0.22);
  border-radius: 9px;
  background: rgba(57, 135, 229, 0.055);
  padding: 10px;
}

.revenue-confidence-grid > div.is-caution {
  border-color: rgba(245, 167, 66, 0.34);
  background: rgba(245, 167, 66, 0.07);
}

.revenue-confidence-grid span,
.revenue-confidence-grid small { color: var(--muted); font-size: 9px; }
.revenue-confidence-grid strong { color: var(--text); font-size: 15px; }
.revenue-confidence-grid .is-caution strong { color: #f6c87d; }

.new-character-supply-card {
  border-color: rgba(245, 167, 66, 0.32);
  background-image: radial-gradient(circle at 12% 0%, rgba(245, 167, 66, 0.1), transparent 32%);
}

.peak-character-block {
  margin-top: 14px;
  border: 1px solid rgba(245, 167, 66, 0.28);
  border-radius: 10px;
  background: rgba(7, 12, 20, 0.58);
  padding: 10px;
}

.peak-character-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.peak-character-heading > div { display: grid; gap: 2px; }
.peak-character-heading strong { font-size: 11px; }
.peak-character-heading small { color: var(--muted); font-size: 9px; }
.peak-character-heading > span { color: #f6c87d; font-size: 9px; white-space: nowrap; }

.peak-character-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.peak-character-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #0d131d;
  padding: 6px;
  color: var(--text);
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.peak-character-card:hover,
.peak-character-card:focus-visible {
  border-color: #f5a742;
  outline: none;
  background: rgba(245, 167, 66, 0.09);
  transform: translateY(-2px);
}

.peak-character-card .thumb,
.peak-character-card .thumb-fallback { width: 46px; height: 52px; border-radius: 7px; }
.peak-character-card > span:last-child { display: grid; min-width: 0; gap: 2px; }
.peak-character-card strong,
.peak-character-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peak-character-card strong { font-size: 11px; }
.peak-character-card small { color: var(--muted); font-size: 8px; }
.peak-character-card b { color: #8fc2ff; font-size: 9px; font-variant-numeric: tabular-nums; }

.market-alert-guide {
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid rgba(245, 167, 66, 0.5);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(231, 79, 95, 0.13), transparent 30%),
    linear-gradient(135deg, rgba(245, 167, 66, 0.08), rgba(8, 14, 23, 0.72));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.market-alert-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(245, 167, 66, 0.25);
  padding: 13px 14px;
}

.market-alert-heading > div { display: grid; gap: 3px; }
.market-alert-heading span:first-child { color: #f6c87d; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.market-alert-heading h3 { font-size: 15px; }

.alert-state {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.alert-state-met { border-color: rgba(231, 79, 95, 0.52); background: rgba(231, 79, 95, 0.13); color: #ff9aa6; }
.alert-state-clear { border-color: rgba(39, 196, 153, 0.45); background: rgba(39, 196, 153, 0.1); color: #78ddbf; }
.alert-state-pending { border-color: rgba(245, 167, 66, 0.45); color: #f6c87d; }

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

.alert-rule-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(9, 15, 24, 0.82);
  padding: 13px;
}
.alert-rule-card.is-halt { border-color: rgba(231, 79, 95, 0.32); }
.alert-rule-card.is-release { border-color: rgba(98, 168, 255, 0.3); }
.alert-rule-step { color: var(--muted); font-size: 9px; font-weight: 800; }
.alert-rule-card > strong { display: block; margin-top: 6px; color: var(--text); font-size: 22px; letter-spacing: -0.03em; }
.alert-rule-card.is-halt > strong { color: #ff9aa6; }
.alert-rule-card.is-release > strong { color: #9bcbff; }
.alert-rule-card p { margin: 8px 0; color: var(--sub); font-size: 10px; line-height: 1.55; }
.alert-rule-card ul { display: grid; gap: 6px; margin: 9px 0 0; padding-left: 17px; color: var(--sub); font-size: 10px; line-height: 1.45; }
.alert-rule-card li::marker { color: #62a8ff; }

.alert-meter { position: relative; height: 8px; margin: 12px 0 7px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.alert-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f5a742, #e74f5f); }
.alert-meter i { position: absolute; top: -3px; width: 2px; height: 14px; background: #fff; box-shadow: 0 0 8px #fff; }
.alert-rule-card > small { color: #ffb0b9; font-size: 9px; }

.alert-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(245, 167, 66, 0.2);
  padding: 11px 13px;
}
.alert-source-row p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.alert-source-row p strong { color: #f6c87d; }
.alert-source-row > div { display: flex; flex: 0 0 auto; gap: 7px; }
.alert-source-row a { border: 1px solid rgba(98, 168, 255, 0.3); border-radius: 999px; padding: 5px 8px; color: #9bcbff; font-size: 9px; text-decoration: none; white-space: nowrap; }
.alert-source-row a:hover { border-color: #62a8ff; background: rgba(57, 135, 229, 0.1); }

@media (max-width: 720px) {
  .market-session-strip,
  .alert-rule-grid,
  .peak-character-list,
  .revenue-confidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .revenue-confidence-grid > div:last-child { grid-column: 1 / -1; }
  .market-alert-heading,
  .alert-source-row { align-items: flex-start; flex-direction: column; }
  .chart-grid-primary > .revenue-range-card,
  .chart-grid-primary > .character-rank-card { min-height: 0; }
}

@media (max-width: 460px) {
  .alert-rule-grid,
  .peak-character-list { grid-template-columns: minmax(0, 1fr); }
  .alert-source-row > div { flex-wrap: wrap; }
}

/* ==========================================================================
   Infographic Presentation Theme & Components (Topco Media Deep Dive)
   ========================================================================== */

.infographic-hero-panel {
  border: 1px solid rgba(98, 168, 255, 0.4);
  border-radius: 14px;
  background: radial-gradient(circle at 18% -10%, rgba(110, 168, 255, 0.2), transparent 40%),
              radial-gradient(circle at 84% 10%, rgba(255, 111, 159, 0.15), transparent 40%),
              linear-gradient(180deg, #07101e 0%, #0d1a2d 100%);
  padding: 22px;
  margin-bottom: 14px;
}

.infographic-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.pill.blue { border-color: #315c9c; color: #a9ccff; background: rgba(15, 30, 52, 0.75); }
.pill.purple { border-color: #694ca0; color: #d7c5ff; background: rgba(30, 20, 52, 0.75); }
.pill.green { border-color: #276d55; color: #9ff1cc; background: rgba(15, 45, 35, 0.75); }
.pill.pink { border-color: #874060; color: #ffb1cb; background: rgba(45, 15, 30, 0.75); }
.pill.gray { border-color: #3b4c63; color: #bcc8da; background: rgba(20, 30, 45, 0.75); }

.infographic-hero-title h2 {
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
}

.grad-text {
  background: linear-gradient(90deg, #7ab0ff, #cf94ff 50%, #ff7ca8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.infographic-hero-title p {
  color: #c5d2e3;
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 900px;
}

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

.infographic-stat {
  background: rgba(15, 30, 52, 0.85);
  border: 1px solid rgba(98, 168, 255, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}

.infographic-stat .k { font-size: 11px; color: var(--muted); font-weight: 700; }
.infographic-stat .v { font-size: clamp(22px, 2.5vw, 28px); font-weight: 950; letter-spacing: -0.03em; line-height: 1.1; }
.infographic-stat .s { font-size: 10px; color: #b6c3d6; }

.green-t { color: #4fdfa4; }
.pink-t { color: #ff6f9f; }
.cyan-t { color: #53d7eb; }
.purple-t { color: #b58cff; }
.amber-t { color: #ffc861; }
.red-t { color: #ff7782; }

.thesis-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 12px;
  margin: 14px 0;
}

.thesis-card {
  min-height: 160px;
  display: grid;
  align-content: start;
  gap: 6px;
  border-radius: 12px;
}

.thesis-card .q { font-size: 10px; font-weight: 850; color: var(--muted); letter-spacing: 0.05em; }
.thesis-num { font-size: 28px; font-weight: 950; letter-spacing: -0.04em; }
.thesis-card strong { font-size: 14px; color: var(--text); line-height: 1.4; }
.thesis-card p { font-size: 11.5px; color: #b9c8dc; line-height: 1.55; margin: 4px 0 0; }

.card {
  background: linear-gradient(180deg, rgba(17, 31, 53, 0.94), rgba(12, 25, 43, 0.94));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.accent-card {
  border-color: rgba(98, 168, 255, 0.4);
  background: linear-gradient(135deg, rgba(20, 41, 73, 0.95), rgba(31, 24, 64, 0.92));
}

.source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  font-size: 10px;
  color: #7f93ae;
}

.src {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
  font-weight: 800;
}

.src.official { color: #9ee9c9; border-color: #2e6e59; background: rgba(30, 80, 60, 0.2); }
.src.research { color: #b9d5ff; border-color: #3c6396; background: rgba(40, 70, 110, 0.2); }
.src.visit { color: #ffe0a2; border-color: #80632d; background: rgba(90, 70, 30, 0.2); }
.src.assumption { color: #d6c4ff; border-color: #654b92; background: rgba(70, 50, 100, 0.2); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.data-table th, .data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(42, 53, 72, 0.7);
  text-align: right;
}

.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { color: var(--muted); background: #101e33; font-size: 10px; font-weight: 800; }
.data-table .pos { color: #4fdfa4; font-weight: 850; }
.data-table .neg { color: #ff7782; font-weight: 850; }
.data-table .is-highlight-row { background: rgba(57, 135, 229, 0.12); }

.callout {
  border-left: 3px solid var(--accent);
  padding: 9px 12px;
  background: rgba(11, 25, 44, 0.85);
  border-radius: 0 10px 10px 0;
  color: #c4d1e3;
  font-size: 11px;
  line-height: 1.55;
}

.callout.green { border-left-color: #4fdfa4; }
.callout.amber { border-left-color: #ffc861; }
.callout.pink { border-left-color: #ff6f9f; }
.callout.purple { border-left-color: #b58cff; }

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

.flow .node {
  position: relative;
  padding: 11px 8px;
  text-align: center;
  border-radius: 10px;
  background: #0a182b;
  border: 1px solid #29405f;
}

.flow .node:not(:last-child):after {
  content: "→";
  position: absolute;
  right: -8px;
  top: 32%;
  z-index: 2;
  color: #748da9;
  font-size: 14px;
  font-weight: 900;
}

.flow .node .n { font-size: 9px; color: #8da3bd; font-weight: 800; }
.flow .node .t { font-weight: 900; margin: 3px 0; font-size: 11.5px; color: var(--text); }
.flow .node .d { font-size: 9px; color: #90a5be; }

.kpi-watch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.watch {
  padding: 10px 12px;
  border-radius: 10px;
  background: #0b192b;
  border: 1px solid var(--border);
  display: grid;
  gap: 2px;
}

.watch .num { font-size: 9px; color: #7991af; font-weight: 800; }
.watch b { font-size: 11.5px; color: var(--text); }
.watch p { font-size: 9.5px; color: var(--muted); margin: 0; }

.bracket {
  border: 1px dashed rgba(59, 86, 125, 0.7);
  background: rgba(12, 26, 45, 0.55);
  padding: 10px;
  border-radius: 10px;
  display: grid;
  gap: 2px;
}

.bracket .mini { font-size: 9px; color: #7d93ae; }

@media (max-width: 980px) {
  .infographic-stat-grid, .kpi-watch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thesis-grid, .grid2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow .node:after { display: none; }
}

/* ==========================================================================
   Character Motion Variation Switcher Styles
   ========================================================================== */

.motion-variation-switcher {
  position: absolute;
  z-index: 4;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.motion-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfddec;
  font-size: 10px;
  font-weight: 750;
  padding: 4px 9px;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
}

.motion-chip:hover {
  background: rgba(57, 135, 229, 0.25);
  border-color: rgba(98, 168, 255, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

.motion-chip.active {
  background: linear-gradient(135deg, rgba(39, 196, 153, 0.4), rgba(57, 135, 229, 0.4));
  border-color: #27c499;
  color: #fff;
  box-shadow: 0 0 10px rgba(39, 196, 153, 0.4);
}

.motion-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.motion-chip.active .motion-chip-dot {
  background: #27c499;
  box-shadow: 0 0 6px #27c499;
}

/* ==========================================================================
   KRX Real-time Dynamic Simulator Toolbar
   ========================================================================== */

.krx-sim-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(13, 23, 38, 0.85);
  border: 1px solid rgba(98, 168, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.sim-label-stack {
  display: grid;
  gap: 2px;
}

.sim-label-stack strong {
  font-size: 13px;
  color: #78ddbf;
}

.sim-label-stack small {
  font-size: 10.5px;
  color: var(--muted);
}

.sim-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sim-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--sub);
  font-size: 11px;
  cursor: pointer;
  transition: all 140ms ease;
}

.sim-chip span {
  font-size: 9.5px;
  color: var(--muted);
}

.sim-chip b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sim-chip:hover {
  background: rgba(57, 135, 229, 0.15);
  border-color: rgba(98, 168, 255, 0.4);
  color: #fff;
}

.sim-chip.active {
  background: linear-gradient(135deg, rgba(39, 196, 153, 0.3), rgba(57, 135, 229, 0.3));
  border-color: #27c499;
  box-shadow: 0 0 10px rgba(39, 196, 153, 0.35);
}

.sim-chip.active b {
  color: #78ddbf;
}

.sim-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sim-price-input {
  width: 100px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #090e17;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  text-align: right;
}

.sim-price-input:focus {
  outline: none;
  border-color: #3987e5;
  box-shadow: 0 0 6px rgba(57, 135, 229, 0.5);
}

.sim-apply-btn {
  padding: 5px 9px;
  border-radius: 6px;
  background: #3987e5;
  border: none;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: background 140ms ease;
}

.sim-apply-btn:hover {
  background: #256bbd;
}

.sim-reset-btn {
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(245, 167, 66, 0.15);
  border: 1px solid rgba(245, 167, 66, 0.4);
  color: #f6c87d;
  font-size: 10.5px;
  cursor: pointer;
  transition: all 140ms ease;
}

.sim-reset-btn:hover {
  background: rgba(245, 167, 66, 0.25);
}

.condition-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  margin-left: 4px;
}

.condition-tag.pass {
  background: rgba(39, 196, 153, 0.2);
  color: #27c499;
  border: 1px solid rgba(39, 196, 153, 0.4);
}

.condition-tag.fail {
  background: rgba(230, 103, 103, 0.2);
  color: #ff9b9b;
  border: 1px solid rgba(230, 103, 103, 0.4);
}


