:root {
  color-scheme: dark;
  --bg: #0c0f12;
  --surface: #11161a;
  --surface-strong: #161c21;
  --surface-muted: #0f1316;
  --line: #293138;
  --line-strong: #3a454d;
  --text: #f1f4f5;
  --text-soft: #b2bbc1;
  --text-muted: #78838b;
  --ticker: #70cfff;
  --positive: #35c781;
  --positive-soft: #173d2c;
  --neutral: #89939a;
  --neutral-soft: #30383d;
  --negative: #ff6961;
  --negative-soft: #492624;
  --amber: #f4b85e;
  --amber-soft: #44351e;
  --focus: #9bdaff;
  --radius: 6px;
  --shadow: 0 18px 50px rgb(0 0 0 / 28%);
  font-family: Inter, Pretendard, "Noto Sans KR", "Segoe UI", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
tr[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.app-shell {
  width: min(1680px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-block {
  min-width: 0;
}

.brand-kicker {
  margin: 0 0 5px;
  color: var(--text-muted);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

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

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

h1 {
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 29px;
  font-weight: 760;
  line-height: 1.15;
}

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

.status-badge,
.market-badge,
.judgment-badge,
.risk-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}

.status-live {
  border-color: #2c815b;
  color: #72dda8;
  background: #123123;
}

.status-preview {
  border-color: #806232;
  color: var(--amber);
  background: var(--amber-soft);
}

.update-block {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgb(244 184 94 / 12%);
}

.connection-dot.is-live {
  background: var(--positive);
  box-shadow: 0 0 0 4px rgb(53 199 129 / 12%);
}

.micro-label,
.control-label,
.metric-label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
}

#updated-at {
  display: block;
  min-width: 148px;
  color: var(--text-soft);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-soft);
  background: var(--surface-strong);
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover {
  border-color: #5e6c75;
  color: #ffffff;
}

.icon-button.is-loading {
  animation: rotate 0.8s linear infinite;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.controlbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented {
  height: 34px;
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface-muted);
}

.segmented button {
  min-width: 64px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 12px;
  color: var(--text-muted);
  background: transparent;
  font-size: 12px;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.segmented button.is-active {
  color: #ffffff;
  background: #2b343a;
  box-shadow: inset 0 -2px 0 var(--ticker);
}

.search-field {
  width: min(360px, 100%);
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0 11px;
  color: var(--text-muted);
  background: var(--surface-muted);
}

.search-field:focus-within {
  border-color: var(--focus);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
}

.search-field input::placeholder {
  color: #66717a;
}

.limit-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.limit-field select {
  width: 78px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0 8px;
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 12px;
}

.metric-strip {
  min-height: 112px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.metric-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
  padding: 18px 22px;
}

.metric-cell:first-child {
  padding-left: 0;
}

.metric-cell:last-child {
  border-right: 0;
}

.metric-cell strong {
  min-height: 36px;
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 25px;
  font-weight: 700;
  line-height: 36px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-note {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  border-bottom: 1px solid var(--line);
}

.radar-section {
  min-width: 0;
  overflow-x: hidden;
  padding: 28px 24px 32px 0;
}

.detail-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 28px 0 32px 24px;
}

.section-heading {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.section-index {
  color: var(--ticker);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 720;
  line-height: 1.35;
}

.section-count {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.table-frame {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

table {
  width: 100%;
  min-width: 990px;
  border-collapse: collapse;
  table-layout: fixed;
}

.col-rank { width: 42px; }
.col-ticker { width: 174px; }
.col-mentions { width: 68px; }
.col-trend { width: 68px; }
.col-sentiment { width: 170px; }
.col-price { width: 120px; }
.col-judgment { width: 104px; }
.col-keyword { width: 210px; }
.col-open { width: 34px; }

thead {
  background: var(--surface-strong);
}

th {
  height: 42px;
  border-bottom: 1px solid var(--line-strong);
  padding: 0 10px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

td {
  height: 72px;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  vertical-align: middle;
}

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

tbody tr[data-ticker] {
  cursor: pointer;
  transition: background-color 120ms ease;
}

tbody tr[data-ticker]:hover,
tbody tr[data-ticker].is-selected {
  background: #182027;
}

tbody tr[data-ticker].is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--ticker);
}

.rank-number {
  color: #66727a;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.ticker-cell {
  min-width: 0;
}

.ticker-symbol {
  display: block;
  overflow: hidden;
  color: var(--ticker);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  font-weight: 760;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-name {
  display: block;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-inline {
  margin-left: 5px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
}

.mention-value,
.price-main,
.trend-value {
  display: block;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
}

.mention-value {
  color: #ffffff;
  font-size: 15px;
}

.mention-share,
.price-sub,
.trend-sub {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
}

.trend-value {
  font-size: 13px;
}

.trend-hot { color: var(--amber); }
.trend-cool { color: #81b8dc; }
.trend-flat { color: var(--text-soft); }

.sentiment-wrap {
  width: 100%;
}

.sentiment-track {
  width: 100%;
  height: 12px;
  display: flex;
  overflow: hidden;
  border: 1px solid #303940;
  border-radius: 2px;
  background: #0b0e10;
}

.sentiment-segment {
  height: 100%;
  min-width: 0;
}

.sentiment-positive { background: var(--positive); }
.sentiment-neutral { background: var(--neutral); }
.sentiment-negative { background: var(--negative); }

.sentiment-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 5px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.sentiment-labels span:nth-child(1) { color: var(--positive); text-align: left; }
.sentiment-labels span:nth-child(2) { color: var(--neutral); text-align: center; }
.sentiment-labels span:nth-child(3) { color: var(--negative); text-align: right; }

.price-main {
  font-size: 13px;
}

.price-up { color: var(--positive); }
.price-down { color: var(--negative); }
.price-flat { color: var(--text-soft); }
.price-missing { color: var(--text-muted); }

.judgment-badge {
  width: 100%;
  max-width: 100px;
  overflow: hidden;
  border-color: var(--line-strong);
  color: var(--text-soft);
  background: var(--surface-strong);
  text-overflow: ellipsis;
}

.judgment-aligned-positive {
  border-color: #2b7351;
  color: #75dca9;
  background: var(--positive-soft);
}

.judgment-aligned-negative,
.judgment-mismatch {
  border-color: #8c403c;
  color: #ff918b;
  background: var(--negative-soft);
}

.judgment-mixed {
  border-color: #5a646a;
  color: #c1c8cc;
  background: var(--neutral-soft);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 46px;
  overflow: hidden;
}

.keyword-chip {
  max-width: 104px;
  overflow: hidden;
  border: 1px solid #3a454d;
  border-radius: 3px;
  padding: 2px 6px;
  color: #b9c4ca;
  background: #171d21;
  font-size: 9px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-open {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 3px;
  color: var(--text-muted);
  background: transparent;
  font-size: 20px;
}

tr:hover .row-open,
tr.is-selected .row-open {
  color: var(--ticker);
  background: #23313a;
}

.loading-row td,
.empty-row td {
  height: 180px;
  color: var(--text-muted);
  text-align: center;
}

.detail-content {
  min-height: 462px;
}

.empty-message {
  display: grid;
  min-height: 320px;
  place-items: center;
  color: var(--text-muted);
  font-size: 12px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-symbol {
  margin: 0;
  color: var(--ticker);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 24px;
  font-weight: 760;
  line-height: 1.15;
}

.detail-name {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.risk-badge.risk-high {
  border-color: #8c403c;
  color: #ff918b;
  background: var(--negative-soft);
}

.risk-badge.risk-medium {
  border-color: #806232;
  color: var(--amber);
  background: var(--amber-soft);
}

.risk-badge.risk-low {
  border-color: #2b7351;
  color: #75dca9;
  background: var(--positive-soft);
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.detail-stat {
  min-width: 0;
  padding: 12px 8px 12px 0;
}

.detail-stat:nth-child(even) {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.detail-stat:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.detail-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
}

.detail-stat strong {
  display: block;
  min-height: 34px;
  margin-top: 2px;
  color: var(--text);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}

.detail-block {
  margin-top: 20px;
}

.detail-block h3,
.distribution-column h3 {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.daily-chart {
  height: 116px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border-bottom: 1px solid var(--line-strong);
  padding: 8px 2px 0;
}

.daily-column {
  min-width: 0;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.daily-value {
  color: var(--text-muted);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.daily-bar {
  width: min(18px, 65%);
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--ticker);
  opacity: 0.82;
}

.daily-date {
  color: #66717a;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  white-space: nowrap;
}

.source-row,
.distribution-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.85fr) minmax(80px, 2fr) 48px;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.source-row span:first-child,
.distribution-row span:first-child {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-track {
  height: 5px;
  overflow: hidden;
  border-radius: 2px;
  background: #252d32;
}

.share-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--ticker);
}

.source-row strong,
.distribution-row strong {
  color: var(--text-muted);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.plain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  border-left: 2px solid var(--line-strong);
  padding: 2px 6px;
  color: var(--text-soft);
  font-size: 10px;
}

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

.risk-list li {
  min-height: 25px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 10px;
}

.risk-list li::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.method-note {
  max-width: 900px;
  margin: -8px 0 14px;
  padding-left: 34px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.65;
}

.distribution-section {
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--line);
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.distribution-column {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 18px 20px;
}

.distribution-column:last-child {
  border-right: 0;
}

.source-status-section {
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--line);
}

.collector-catalog {
  border-top: 1px solid var(--line);
}

.collector-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(190px, 0.75fr) minmax(260px, 1.5fr) minmax(180px, 0.65fr);
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
}

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

.collector-identity strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.collector-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--neutral);
}

.collector-dot.collector-success {
  background: var(--positive);
  box-shadow: 0 0 0 3px rgb(53 199 129 / 12%);
}

.collector-dot.collector-partial,
.collector-dot.collector-waiting {
  background: var(--amber);
}

.collector-dot.collector-failed {
  background: var(--negative);
}

.collector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.collector-tags span {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: 8px;
  font-weight: 700;
}

.collector-row > p {
  min-width: 0;
  margin: 0;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.6;
}

.collector-state {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.collector-state strong {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 650;
}

.collector-state small {
  max-width: 230px;
  color: var(--text-muted);
  font-size: 8px;
  line-height: 1.45;
}

.collector-status {
  color: var(--neutral);
  font-size: 9px;
  font-weight: 800;
}

.collector-status.collector-success {
  color: var(--positive);
}

.collector-status.collector-partial,
.collector-status.collector-waiting {
  color: var(--amber);
}

.collector-status.collector-failed {
  color: var(--negative);
}

.distribution-list:empty::after {
  color: var(--text-muted);
  font-size: 11px;
  content: "표시할 자료가 없습니다.";
}

footer {
  min-height: 82px;
  display: flex;
  align-items: center;
}

footer p {
  margin: 0;
  color: #68747c;
  font-size: 10px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 40px));
  transform: translateY(16px);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 11px 14px;
  color: var(--text-soft);
  background: #171e23;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 11px;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

@media (max-width: 1180px) {
  .radar-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .detail-panel {
    padding-left: 18px;
  }

  .radar-section {
    padding-right: 18px;
  }
}

@media (max-width: 960px) {
  .controlbar {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .search-field {
    order: 3;
    width: calc(100% - 96px);
    margin-left: 0;
  }

  .limit-field {
    order: 4;
    margin-left: auto;
  }

  .radar-layout {
    display: block;
  }

  .radar-section {
    padding-right: 0;
  }

  .detail-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 28px 0 32px;
  }

  .detail-content {
    min-height: 0;
  }

  .detail-content:not(:has(.empty-message)) {
    display: grid;
    grid-template-columns: minmax(250px, 0.8fr) minmax(340px, 1.2fr);
    gap: 24px;
  }

  .detail-content:not(:has(.empty-message)) .detail-title-row,
  .detail-content:not(:has(.empty-message)) .detail-stat-grid {
    grid-column: 1;
  }

  .detail-content:not(:has(.empty-message)) .detail-block {
    grid-column: 2;
    margin-top: 0;
  }

  .detail-content:not(:has(.empty-message)) .detail-block:nth-of-type(n + 3) {
    margin-top: 18px;
  }

  .collector-row {
    grid-template-columns: minmax(170px, 0.7fr) minmax(240px, 1.3fr) minmax(165px, 0.65fr);
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0 14px;
  }

  .topbar {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
  }

  .update-block {
    width: 100%;
  }

  .icon-button {
    margin-left: auto;
  }

  h1 {
    font-size: 25px;
  }

  .controlbar {
    gap: 12px;
  }

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

  .segmented {
    flex: 1;
  }

  .segmented button {
    flex: 1;
    min-width: 0;
    padding: 0 8px;
  }

  .search-field {
    width: calc(100% - 90px);
  }

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

  .metric-cell {
    min-height: 98px;
    border-bottom: 1px solid var(--line);
    padding: 14px;
  }

  .metric-cell:first-child {
    padding-left: 0;
  }

  .metric-cell:nth-child(2) {
    border-right: 0;
  }

  .metric-cell:nth-child(3),
  .metric-cell:nth-child(4) {
    border-bottom: 0;
  }

  .metric-cell:nth-child(3) {
    padding-left: 0;
  }

  .metric-cell strong {
    font-size: 21px;
  }

  .radar-section,
  .detail-panel,
  .distribution-section,
  .source-status-section {
    padding-top: 22px;
  }

  .method-note {
    margin-top: -6px;
    padding-left: 0;
  }

  .table-frame {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  tbody {
    width: 100%;
    min-width: 0;
    display: block;
  }

  colgroup,
  thead {
    display: none;
  }

  tbody tr[data-ticker] {
    width: 100%;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 74px 30px;
    grid-template-areas:
      "rank ticker mentions open"
      "rank ticker trend open"
      "sentiment sentiment sentiment sentiment"
      "price price judgment judgment"
      "keywords keywords keywords keywords";
    gap: 4px 8px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 10px;
    background: var(--surface-muted);
  }

  tbody tr[data-ticker].is-selected {
    border-color: #3a657b;
    box-shadow: inset 3px 0 0 var(--ticker);
  }

  tbody tr[data-ticker] td {
    width: auto;
    height: auto;
    min-width: 0;
    display: block;
    border: 0;
    padding: 2px 0;
  }

  tbody tr[data-ticker] td:nth-child(1) { grid-area: rank; padding-top: 3px; }
  tbody tr[data-ticker] td:nth-child(2) { grid-area: ticker; }
  tbody tr[data-ticker] td:nth-child(3) { grid-area: mentions; text-align: right; }
  tbody tr[data-ticker] td:nth-child(4) { grid-area: trend; text-align: right; }
  tbody tr[data-ticker] td:nth-child(5) { grid-area: sentiment; padding-top: 9px; }
  tbody tr[data-ticker] td:nth-child(6) { grid-area: price; padding-top: 8px; }
  tbody tr[data-ticker] td:nth-child(7) { grid-area: judgment; align-self: center; padding-top: 8px; text-align: right; }
  tbody tr[data-ticker] td:nth-child(8) { grid-area: keywords; padding-top: 7px; }
  tbody tr[data-ticker] td:nth-child(9) { grid-area: open; }

  tbody tr[data-ticker] td:nth-child(4)::before,
  tbody tr[data-ticker] td:nth-child(5)::before,
  tbody tr[data-ticker] td:nth-child(6)::before {
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 700;
  }

  tbody tr[data-ticker] td:nth-child(4)::before { content: "12시간"; }
  tbody tr[data-ticker] td:nth-child(5)::before { content: "긍정 · 중립 · 부정"; }
  tbody tr[data-ticker] td:nth-child(6)::before { content: "기간 가격"; }

  .ticker-symbol {
    font-size: 14px;
  }

  .sentiment-track {
    height: 10px;
  }

  .sentiment-labels {
    margin-top: 3px;
  }

  .judgment-badge {
    width: auto;
    min-width: 86px;
  }

  .keyword-list {
    max-height: 42px;
  }

  .row-open {
    display: block;
    margin-left: auto;
  }

  .loading-row,
  .empty-row {
    display: block;
  }

  .loading-row td,
  .empty-row td {
    width: 100%;
    height: 140px;
    display: grid;
    place-items: center;
  }

  .detail-content:not(:has(.empty-message)) {
    display: block;
  }

  .detail-content:not(:has(.empty-message)) .detail-block {
    margin-top: 20px;
  }

  .distribution-grid {
    display: block;
  }

  .distribution-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }

  .distribution-column:last-child {
    border-bottom: 0;
  }

  .collector-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity state"
      "description description";
    gap: 9px 14px;
    padding: 14px 0;
  }

  .collector-identity {
    grid-area: identity;
  }

  .collector-row > p {
    grid-area: description;
  }

  .collector-state {
    grid-area: state;
  }

  .collector-state small {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-count {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
