:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #697386;
  --line: #e7eaf0;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --blue: #5967df;
  --teal: #20a68b;
  --orange: #f0a344;
  --red: #c64b56;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
.page { max-width: 1440px; margin: 0 auto; padding: 36px 28px 56px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; }
.subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.updated { color: var(--muted); font-size: 12px; text-align: right; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 16px rgba(32, 45, 77, .035); }
.controls { display: flex; align-items: flex-end; gap: 18px; padding: 18px 20px; margin-bottom: 16px; }
.control-copy { display: grid; gap: 5px; margin-right: auto; }
.control-label, label { color: var(--muted); font-size: 12px; font-weight: 650; }
.control-copy strong { font-size: 17px; color: var(--ink); }
label { display: grid; gap: 7px; }
select, input { min-width: 145px; height: 40px; padding: 0 12px; border: 1px solid #d8deea; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.coverage { align-self: center; margin: 18px 0 0 auto; color: var(--muted); font-size: 11px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { min-height: 142px; padding: 18px 20px; display: flex; flex-direction: column; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi strong { margin: 11px 0 8px; font-size: clamp(22px, 2.4vw, 31px); letter-spacing: -.035em; white-space: nowrap; }
.kpi small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.kpi .kpi-note { font-size: 12px; font-weight: 750; }
.up { color: var(--teal) !important; }
.down { color: var(--red) !important; }
.flat { color: var(--muted) !important; }
.chart-card, .table-card, .genre-section { margin-bottom: 16px; padding: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.organic-dot { background: var(--teal); }
.paid-dot { background: var(--blue); }
.trend-chart { min-height: 185px; display: flex; align-items: flex-end; gap: 5px; overflow-x: auto; padding: 10px 0 0; }
.bar-column { flex: 1 0 24px; min-width: 24px; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar-value { height: 16px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.bar-stack { width: min(70%, 30px); min-height: 0; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 2px 2px; overflow: hidden; }
.bar-organic { background: var(--teal); }
.bar-paid { background: var(--blue); }
.bar-label { height: 18px; margin-top: 6px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1000px; }
th { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; text-align: left; white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid #f0f1f5; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.number { text-align: right; white-space: nowrap; }
.strong { font-weight: 800; color: var(--ink); }
.work-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.poster, .poster-placeholder { width: 34px; height: 44px; flex: 0 0 34px; border-radius: 5px; object-fit: cover; background: #edf0f6; }
.poster-placeholder { display: grid; place-items: center; color: #8790a2; font-size: 9px; }
.work-title { max-width: 260px; font-weight: 700; white-space: normal; }
.work-id { margin-top: 4px; color: #9aa2b1; font-size: 9px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 20px; background: #f0f2fa; color: #5f6880; font-size: 10px; }
.revenue-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.empty-cell { height: 90px; color: var(--muted); text-align: center; }
.genre-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.genre-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfe; }
.genre-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.genre-heading h3 { margin: 0; font-size: 13px; }
.genre-heading span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.genre-card ol { display: grid; gap: 9px; margin: 11px 0 0; padding-left: 20px; }
.genre-card li { padding-left: 3px; color: var(--muted); font-size: 11px; }
.genre-card li span { display: inline-block; max-width: 75%; color: var(--ink); vertical-align: top; }
.genre-card li strong { float: right; color: var(--ink); font-size: 10px; }
.empty { width: 100%; padding: 35px 12px; color: var(--muted); font-size: 12px; text-align: center; }
footer { padding: 4px 2px; color: var(--muted); font-size: 10px; line-height: 1.7; }
footer p { margin: 3px 0; }
@media (max-width: 900px) {
  .page { padding: 24px 16px 40px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls { flex-wrap: wrap; }
  .coverage { width: 100%; margin: 0; }
}
@media (max-width: 560px) {
  .hero { align-items: flex-start; flex-direction: column; gap: 12px; }
  .updated { text-align: left; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { min-height: 125px; padding: 14px; }
  .kpi strong { font-size: 21px; }
  .genre-grid { grid-template-columns: 1fr; }
  .chart-card, .table-card, .genre-section { padding: 15px; }
  .controls { align-items: stretch; gap: 12px; padding: 15px; }
  .control-copy { width: 100%; }
  label { flex: 1; }
  select, input { width: 100%; min-width: 0; }
}