:root {
    color-scheme: light dark;
    --paper: light-dark(#fafaf8, #151719);
    --ink: light-dark(#181c20, #f1f2f3);
    --muted: light-dark(#60666c, #a5abb0);
    --line: light-dark(#dcdfe0, #34393d);
    --surface: light-dark(#fff, #1c2023);
    --brand-tvp: #619bad;
    --chart-accent: light-dark(#b37818, #efb852);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
main { max-width: 1140px; margin: auto; padding: 0 38px 28px; }
header { display: flex; align-items: center; padding: 26px 0 22px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; max-width: 100%; text-decoration: none; border-radius: 4px; }
.brand-logo { display: block; width: 286px; max-width: 100%; height: auto; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 29px 0 25px; }
h1 { font-size: 30px; line-height: 1.12; letter-spacing: -1px; margin: 0; font-weight: 750; }
h2 { overflow-wrap: anywhere; }
.leader, .runner, .row { position: relative; }
.program-link { color: var(--brand-tvp); text-decoration: none; text-underline-offset: 3px; }
.program-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.program-link:hover { text-decoration: underline; }
.program-link:focus-visible::after { outline: 2px solid var(--brand-tvp); outline-offset: 3px; }
.date { font-size: 15px; margin: 9px 0 0; color: var(--muted); }
.period { font-size: 12px; color: var(--muted); white-space: nowrap; padding-bottom: 2px; }
.top { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.top-single { grid-template-columns: 1fr; }
.leader { min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.scene { position: relative; min-height: 0; background: var(--line); }
.episode-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.leader .scene { aspect-ratio: 16 / 9; flex: 1 0 auto; }
.image-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-size: 12px; color: var(--ink); }
.logo { width: 58px; height: 58px; box-sizing: border-box; padding: 8px; border-radius: 4px; background: #fff; object-fit: contain; }
.scene .logo { position: absolute; left: 17px; top: 17px; }
.position { position: absolute; right: 17px; top: 17px; font-size: 14px; line-height: 32px; min-width: 32px; text-align: center; background: #f1f2f3; color: #181c20; border-radius: 2px; font-variant-numeric: tabular-nums; }
.leader .position { background: #f5e1a0; color: #2a2516; }
.caption { padding: 19px 20px 20px; }
.channel { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.caption h2 { margin: 0; font-size: 25px; letter-spacing: -.6px; line-height: 1.17; font-weight: 700; }
.leader .caption h2 { font-size: 30px; }
.score { display: flex; gap: 24px; flex-wrap: wrap; align-items: baseline; margin-top: 16px; }
.score strong { font-size: 27px; font-weight: 750; letter-spacing: -1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score .pda strong { font-size: 21px; letter-spacing: -.6px; }
.score small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); letter-spacing: 0; font-weight: 400; }
.pda { padding-left: 22px; border-left: 1px solid var(--line); }
.runners { display: grid; grid-auto-rows: 1fr; gap: 18px; min-width: 0; }
.runner { display: grid; grid-template-columns: 44% minmax(0, 1fr); background: var(--surface); min-width: 0; }
.runner .scene { min-height: 185px; }
.runner .logo { left: 12px; top: 12px; width: 44px; height: 44px; padding: 6px; }
.runner .caption { padding: 19px 17px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.runner .caption h2 { font-size: 20px; letter-spacing: -.3px; }
.runner .score { gap: 10px 12px; margin-top: 17px; }
.runner .score strong { font-size: 23px; letter-spacing: -.65px; }
.runner .score .pda strong { font-size: 18px; }
.runner .pda { padding-left: 0; border-left: 0; }
.audience-chart { margin: 30px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); }
.chart-caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 20px; }
.chart-caption h2 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.chart-caption > span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.chart-viewport { overflow-x: auto; padding: 5px 4px 10px; margin: -5px -4px 0; }
.chart-layout { --plot-height: 200px; --plot-headroom: 28px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; min-width: calc(54px + var(--channel-count) * 56px); }
.chart-axis { position: relative; height: var(--plot-height); margin-top: var(--plot-headroom); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-axis span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.chart-list { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(var(--channel-count), minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; }
.chart-list::before { content: ''; position: absolute; z-index: -1; top: var(--plot-headroom); left: 0; right: 0; height: var(--plot-height); border-top: 1px solid var(--line); background: repeating-linear-gradient(to top, var(--line) 0, var(--line) 1px, transparent 1px, transparent 25%); }
.chart-link { display: flex; flex-direction: column; gap: 12px; color: inherit; text-decoration: none; }
.chart-column { position: relative; display: block; height: calc(var(--plot-height) + var(--plot-headroom)); }
.chart-bar { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60%; max-width: 42px; height: calc(var(--bar-ratio) * var(--plot-height)); background: var(--chart-accent); }
.chart-value { position: absolute; bottom: calc(var(--bar-ratio) * var(--plot-height) + 7px); left: 50%; transform: translateX(-50%); padding: 0 2px; background: var(--paper); text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-channel { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 38px; }
.chart-channel img { display: block; width: 38px; height: 38px; box-sizing: border-box; padding: 4px; border-radius: 4px; background: #fff; object-fit: contain; }
.chart-channel > span { padding: 0 3px; text-align: center; font-size: 11px; line-height: 1.2; overflow-wrap: anywhere; }
.chart-link:hover .chart-value { color: var(--brand-tvp); text-decoration: underline; text-underline-offset: 3px; }
.chart-link:focus-visible { outline: 2px solid var(--brand-tvp); outline-offset: 3px; }
.section-label { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); padding: 28px 0 12px; border-bottom: 1px solid var(--line); }
.list { list-style: none; padding: 0; margin: 0; }
.row { display: grid; grid-template-columns: 29px 199px minmax(0, 1fr) 136px 102px; align-items: center; gap: 17px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rank { font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.thumbnail { width: 138px; aspect-ratio: 16 / 9; position: relative; background: var(--line); }
.thumbnail .logo { position: absolute; left: calc(100% + 17px); top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 6px; border-radius: 3px; }
.row h2 { font-size: 17px; line-height: 1.25; letter-spacing: -.15px; margin: 0; font-weight: 650; }
.row .channel { margin: 0 0 6px; }
.number { text-align: right; white-space: nowrap; }
.number strong { font-size: 20px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.number small { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.number.share strong { font-size: 18px; font-weight: 500; }
.foot { margin: 22px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.foot p { margin: 0; }
.foot a { color: var(--brand-tvp); text-underline-offset: 3px; }
.empty { padding: 32px 0 48px; border-top: 1px solid var(--line); }
.empty h2 { font-size: 22px; line-height: 1.4; margin: 0 0 12px; }
.empty p { color: var(--muted); margin: 0; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1000px) {
    .runner .score { gap: 10px 19px; }
    .runner .pda { padding-left: 16px; border-left: 1px solid var(--line); }
}
@media (max-width: 800px) {
    main { padding: 0 24px 24px; }
    .top { grid-template-columns: 1fr; }
    .leader .scene { aspect-ratio: 16 / 8; }
    .runners { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .runner { display: flex; flex-direction: column; }
    .runner .scene { min-height: 0; aspect-ratio: 16 / 9; }
    .runner .caption { padding: 15px; }
    .runner .score { margin-top: 13px; gap: 10px 19px; }
    .runner .pda { padding-left: 16px; border-left: 1px solid var(--line); }
    .row { grid-template-columns: 22px 162px minmax(0, 1fr) 110px; gap: 8px 12px; }
    .thumbnail { width: 113px; }
    .thumbnail .logo { left: calc(100% + 12px); width: 37px; height: 37px; padding: 5px; }
    .row .rank, .row .thumbnail, .row .program { grid-row: 1 / 3; }
    .number { align-self: end; }
    .number.share { grid-column: 4; grid-row: 2; align-self: start; }
    .number.share small { display: inline; }
    .number.share strong { font-size: 13px; }
    .row h2 { font-size: 15px; }
    .number strong { font-size: 17px; }
    .section-label span:last-child { display: none; }
}
@media (max-width: 560px) {
    main { padding: 0 16px 22px; }
    header { padding: 20px 0 18px; }
    .brand-logo { width: 250px; }
    .intro { display: block; padding: 25px 0 20px; }
    h1 { font-size: 28px; }
    .date { font-size: 14px; }
    .period { display: block; margin-top: 12px; }
    .top { gap: 13px; }
    .leader .scene { aspect-ratio: 16 / 10; }
    .leader .caption { padding: 17px; }
    .leader .caption h2 { font-size: 27px; }
    .runners { grid-template-columns: 1fr; gap: 13px; }
    .runner { display: grid; grid-template-columns: 42% minmax(0, 1fr); }
    .runner .scene { aspect-ratio: auto; min-height: 165px; }
    .runner .caption h2 { font-size: 19px; }
    .runner .score { gap: 10px 11px; }
    .runner .pda { padding-left: 0; border: 0; }
    .runner .score strong { font-size: 21px; }
    .runner .score .pda strong { font-size: 17px; }
    .row { grid-template-columns: 20px 90px minmax(0, 1fr); gap: 6px 10px; padding: 14px 0; }
    .thumbnail { width: 90px; }
    .thumbnail .logo { width: 28px; height: 28px; padding: 3px; left: 4px; top: 4px; transform: none; }
    .row .rank, .row .thumbnail { grid-row: 1 / 4; }
    .row .program { grid-column: 3; grid-row: 1; }
    .row .channel { font-size: 11px; margin-bottom: 4px; }
    .row h2 { font-size: 15px; }
    .row .number { grid-column: 3; grid-row: 2; text-align: left; align-self: start; white-space: normal; }
    .row .number strong { font-size: 16px; white-space: nowrap; }
    .row .number small { display: inline; font-size: 11px; }
    .row .number.share { grid-row: 3; }
    .row .number.share strong { font-size: 12px; }
    .section-label { padding-top: 24px; }
}
