/* kickrank — 明るい表示を基準に、暗い表示は同じ役割の色を段ごとに選び直している */
:root {
  color-scheme: light;
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-2: #f0f2ec;
  --surface-3: #e6e9e1;
  --border: #e1e4dc;
  --border-strong: #cdd2c6;
  --grid: #eceee8;
  --text: #0d0f0b;
  --text-2: #4f524a;
  --muted: #777a71;
  --accent: #157f00;            /* 文字に使う緑（白地で 4.5:1 以上） */
  --brand: #53fc18;             /* Kick の緑。面にだけ使う */
  --brand-ink: #0a2e00;
  --live: #e5484d;
  --up: #16803a;
  --down: #c9373c;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --gold: #f2b705; --silver: #aab3bd; --bronze: #c9824a;
  --shadow: 0 1px 2px rgb(15 20 10 / .05), 0 4px 16px rgb(15 20 10 / .05);
  --shadow-lg: 0 10px 30px rgb(15 20 10 / .12);
  --r: 14px;
  --r-sm: 10px;
  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0b0c; --surface: #131518; --surface-2: #1a1d21; --surface-3: #23272c;
    --border: #23272c; --border-strong: #32373e; --grid: #1f2328;
    --text: #f1f2ee; --text-2: #b9bcb3; --muted: #868a81;
    --accent: #53fc18; --live: #ff6369; --up: #4ad66d; --down: #ff6b6b;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 12px 34px rgb(0 0 0 / .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b0c; --surface: #131518; --surface-2: #1a1d21; --surface-3: #23272c;
  --border: #23272c; --border-strong: #32373e; --grid: #1f2328;
  --text: #f1f2ee; --text-2: #b9bcb3; --muted: #868a81;
  --accent: #53fc18; --live: #ff6369; --up: #4ad66d; --down: #ff6b6b;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 12px 34px rgb(0 0 0 / .55);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); font-feature-settings: "palt" 1; }
a { color: inherit; }
img { display: block; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--series-1); outline-offset: 2px; }
.num, td.num, th.num, .value, .tile .value { font-variant-numeric: tabular-nums; }

/* ---------- ヘッダー ---------- */
header.site { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; gap: 18px; min-height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #000; font-weight: 900; font-size: 18px; font-family: "Inter", sans-serif; }
.word { font-weight: 800; font-size: 20px; letter-spacing: -.03em; font-family: "Inter", sans-serif; }
.jp { font-size: 10px; font-weight: 800; letter-spacing: .06em; color: var(--brand-ink); background: var(--brand); padding: 1px 5px; border-radius: 4px; }
:root[data-theme="dark"] .jp { color: #000; }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--text); color: var(--surface); }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.updated { color: var(--muted); font-size: 12px; white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn span::before { font-size: 16px; line-height: 1; }
#theme[data-mode="system"] span::before { content: "◐"; }
#theme[data-mode="light"] span::before { content: "☀"; }
#theme[data-mode="dark"] span::before { content: "☾"; }
@media (max-width: 1080px) { .updated { display: none; } }
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; gap: 8px 12px; padding-top: 10px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 2px; }
  .head-right { flex: 1; justify-content: flex-end; }
  #search-slot { flex: 1; max-width: 360px; }
}

/* ---------- 検索 ---------- */
.search { position: relative; }
.search input { width: 240px; height: 38px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 0 14px 0 36px; outline: none; }
.search input:focus { border-color: var(--border-strong); background: var(--surface); box-shadow: 0 0 0 3px rgb(83 252 24 / .22); }
.search .sr-icon { position: absolute; left: 13px; top: 50%; width: 13px; height: 13px; margin-top: -8px; border: 2px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search .sr-icon::after { content: ""; position: absolute; width: 2px; height: 6px; background: var(--muted); right: -4px; bottom: -5px; transform: rotate(-45deg); border-radius: 1px; }
.head-search input { width: 100%; min-width: 180px; }
@media (min-width: 901px) { .head-search input { width: 240px; } }
.sr-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 280px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); z-index: 30; max-height: 60vh; overflow: auto; }
.sr-list li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.sr-list li.on, .sr-list li:hover { background: var(--surface-2); }
.sr-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-sub { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sr-none { color: var(--muted); font-size: 13px; cursor: default !important; }

/* ---------- 共通の部品 ---------- */
main { padding-top: 24px; padding-bottom: 48px; }
main > * + * { margin-top: 20px; }
.page-head h1 { font-size: 28px; font-weight: 900; letter-spacing: -.02em; margin: 4px 0 6px; line-height: 1.3; }
.page-head .lead { color: var(--text-2); margin: 0; max-width: 760px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.head-link { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
.head-link:hover { text-decoration: underline; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { margin-bottom: 10px; }
.card-head h2 { font-size: 16px; font-weight: 800; margin: 0; line-height: 1.4; }
.card .note, .note { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }
.sub-h { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 16px 0 4px; }
.card-head + div > .sub-h:first-child { margin-top: 4px; }
.empty { color: var(--muted); padding: 36px 12px; text-align: center; margin: 0; }
.error { color: var(--down); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.two-col.wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.two-col > div > * + * { margin-top: 20px; }
/* グリッドの子は既定で中身より細くならない。中の表の幅でスマホの画面が広がったので、縮めてよいことにする */
.two-col > * { min-width: 0; }
@media (max-width: 960px) { .two-col, .two-col.wide-left { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #000; }
.btn.primary:hover { filter: brightness(.95); }
.btn.disabled { opacity: .4; pointer-events: none; }

.av { border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.live-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; color: #fff; background: var(--live); padding: 1px 6px 1px 5px; border-radius: 4px; letter-spacing: .05em; line-height: 1.6; flex: none; }
.live-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

/* タブ（期間） */
.tabs { display: inline-flex; gap: 2px; background: var(--surface-3); padding: 3px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs button { border: 0; background: none; color: var(--text-2); font-weight: 700; font-size: 14px; padding: 6px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
/* 切り替え（並べ方・カテゴリ） */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; padding: 4px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.seg button:hover { border-color: var(--border-strong); color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--surface); border-color: var(--text); }
.catbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg.cats button { font-weight: 500; font-size: 12.5px; }
.cat-more { height: 30px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: 0 10px; font-size: 12.5px; color: var(--text-2); max-width: 220px; }
.rank-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.rank-tools:empty { display: none; }

/* ---------- 数字のタイル ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .tiles, .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px 12px; min-width: 0; box-shadow: var(--shadow); overflow: hidden; }
.tile .label { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.tile .value { font-size: 28px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; margin-top: 2px; font-family: "Inter", "Noto Sans JP", sans-serif; }
.tile .value small { font-size: 14px; font-weight: 700; color: var(--text-2); letter-spacing: 0; }
.tile .sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.tile .spark { position: absolute; right: 12px; top: 14px; opacity: .9; }
@media (max-width: 1100px) { .tile .spark { display: none; } }
.hero .tile:first-child { background: linear-gradient(140deg, rgb(83 252 24 / .16), transparent 55%), var(--surface); }
.spark .line { fill: none; stroke: var(--series-1); stroke-width: 1.6; }
.spark .area { fill: var(--series-1); opacity: .1; }
@media (max-width: 600px) { .tile .value { font-size: 23px; } }

/* ---------- いま盛り上がっている配信 ---------- */
.spot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .spot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .spot-grid { gap: 12px; } }
.spot-card { text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
.spot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pill { position: absolute; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.pill.live { left: 8px; top: 8px; background: var(--live); color: #fff; letter-spacing: .05em; }
.pill.viewers { left: 8px; bottom: 8px; background: rgb(0 0 0 / .72); color: #fff; }
.pill.rank { right: 8px; top: 8px; background: var(--brand); color: #000; }
.spot-meta { display: flex; gap: 10px; padding: 10px 12px 12px; min-width: 0; }
.spot-text { min-width: 0; }
.spot-name { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot-title { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }

/* ---------- 表 ---------- */
.table-block { min-width: 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.card .table-wrap { border: 0; box-shadow: none; border-radius: 0; margin: 0 -20px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); white-space: nowrap; letter-spacing: .02em; }
.card th { background: transparent; }
th button { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; letter-spacing: inherit; }
th button:hover { color: var(--text); }
th[aria-sort] { color: var(--text); }
th[aria-sort] button::after { content: " ↓"; }
th[aria-sort="ascending"] button::after { content: " ↑"; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.num { font-weight: 600; }
td.rank, th.rank { width: 1%; text-align: center; padding-right: 4px; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface-2); }
tr.clickable { cursor: pointer; }
tr.selected { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand); }
.rk { color: var(--muted); font-weight: 600; font-size: 13px; }
.medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 800; color: #1a1400; }
.medal.m1 { background: var(--gold); }
.medal.m2 { background: var(--silver); color: #111; }
.medal.m3 { background: var(--bronze); color: #1a0d00; }
/* 横棒は欄の幅を一定にして、長さで大小が分かるようにする（数字の幅に合わせると大小が見えない） */
.barcell { position: relative; display: inline-flex; justify-content: flex-end; width: 112px; padding: 1px 0; }
.barcell > i { position: absolute; right: 0; top: 50%; height: 24px; margin-top: -12px; background: var(--series-1); opacity: .16; border-radius: 5px; min-width: 3px; }
:root[data-theme="dark"] .barcell > i { opacity: .28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .barcell > i { opacity: .28; } }
@media (max-width: 720px) { .barcell { width: 84px; } }
.barcell > span { position: relative; padding: 0 4px; }
.more { display: block; margin: 12px auto 0; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 18px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--text-2); }
.more:hover { color: var(--text); border-color: var(--border-strong); }
.more[hidden] { display: none; }
@media (max-width: 720px) { .hide-sm { display: none; } th, td { padding: 8px 8px; } }
@media (max-width: 960px) { .hide-md { display: none; } }

.who { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 380px; text-decoration: none; }
.who .names { min-width: 0; display: flex; flex-direction: column; }
.who .name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.who .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who:hover .nm { text-decoration: underline; }
.who .title { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
@media (max-width: 600px) { .who { max-width: 190px; } .who .title { max-width: 150px; } }
.stream-title { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 420px; }
.stream-title .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .stream-title { max-width: 160px; } }
.up { color: var(--up); font-weight: 700; }
.down { color: var(--down); font-weight: 700; }

/* ---------- グラフ ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; font-family: "Inter", sans-serif; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1); opacity: .1; }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .line.s2, .chart .dot.s2 { stroke: var(--series-2); } .chart .dot.s2 { fill: var(--series-2); stroke: var(--surface); }
.chart .line.s3 { stroke: var(--series-3); } .chart .dot.s3 { fill: var(--series-3); stroke: var(--surface); }
.chart .line.s4 { stroke: var(--series-4); } .chart .dot.s4 { fill: var(--series-4); stroke: var(--surface); }
.chart .line.s1 { stroke: var(--series-1); }
.sw { display: inline-block; width: 14px; height: 4px; border-radius: 2px; flex: none; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); } .sw.s3 { background: var(--series-3); } .sw.s4 { background: var(--series-4); }
.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; font-size: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; min-width: 120px; }
.tip b { font-size: 14px; font-variant-numeric: tabular-nums; }
.tip-t { color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row span { flex: 1; }

/* ---------- 配信者ページ ---------- */
.ch-hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow);
  background: radial-gradient(900px 180px at 0% 0%, rgb(83 252 24 / .16), transparent 70%), var(--surface); min-height: 128px; }
.ch-av { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--border-strong); }
.ch-main { min-width: 0; flex: 1; }
.ch-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ch-name h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-status { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.ch-links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 600px) { .ch-hero { padding: 18px; gap: 14px; align-items: flex-start; } .ch-hero .ch-av { width: 60px !important; height: 60px !important; } .ch-name h1 { font-size: 22px; } }
.ssr h1 { font-size: 26px; }

/* ---------- 太客 ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin-bottom: 16px; }
.pod { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; text-align: center; box-shadow: var(--shadow); min-width: 0; }
.pod.p1 { padding: 22px 16px; background: linear-gradient(180deg, rgb(242 183 5 / .16), transparent 70%), var(--surface); }
.pod .medal { width: 32px; height: 32px; font-size: 15px; }
.pod-name { font-weight: 800; font-size: 16px; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-amount { font-weight: 900; font-size: 24px; letter-spacing: -.02em; font-family: "Inter", "Noto Sans JP", sans-serif; }
.pod.p1 .pod-amount { font-size: 30px; }
.pod-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .podium { grid-template-columns: 1fr; } .pod.p1 { order: -1; } }
.fan { display: flex; flex-direction: column; min-width: 0; }
.fan-name { font-weight: 700; word-break: break-all; }
.fan-sub { color: var(--muted); font-size: 12px; }
.note.anon { margin-top: 10px; }

/* ---------- アーカイブ ---------- */
.daynav { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.daynav select { height: 38px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); padding: 0 14px; font-weight: 700; }

/* ---------- 比較 ---------- */
.cmp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cmp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cmp-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 4px 3px 10px; font-weight: 700; font-size: 13px; background: var(--surface-2); }
.cmp-chip a { text-decoration: none; }
.cmp-chip a:hover { text-decoration: underline; }
.cmp-chip .x { border: 0; background: var(--surface-3); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.cmp-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.card > .search { margin-bottom: 12px; }
.card > .search input { width: 100%; max-width: 420px; }

/* ---------- このサイトについて ---------- */
.prose h2 { font-size: 18px; margin: 0 0 8px; }
.prose p { margin: 0 0 10px; color: var(--text-2); }
.deftable th { width: 28%; color: var(--text); font-size: 13.5px; background: transparent; white-space: normal; vertical-align: top; }
.deftable td { color: var(--text-2); }

/* ---------- 読み込み中 ---------- */
.skel-wrap { display: grid; gap: 10px; }
.skel, .skel-tile { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-sm); }
.skel { height: 44px; }
.skel-tile { min-height: 96px; border: 0; }
.ch-hero.skel-tile { min-height: 128px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel, .skel-tile { animation: none; } .spot-card, tbody tr { transition: none; } .spot-card:hover { transform: none; } }

/* ---------- フッター ---------- */
.site-foot { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; margin-top: 24px; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; padding-top: 28px; padding-bottom: 40px; flex-wrap: wrap; }
.foot-in p { margin: 8px 0 0; max-width: 520px; }
.logo.small .mark { width: 24px; height: 24px; font-size: 14px; border-radius: 6px; }
.logo.small .word { font-size: 16px; color: var(--text); }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot-links a { color: var(--text-2); text-decoration: none; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }

/* トップの見出し */
.home-head h1 { font-size: 30px; font-weight: 900; letter-spacing: -.02em; margin: 0; line-height: 1.3; }
.home-head .lead { color: var(--text-2); margin: 4px 0 0; }
@media (max-width: 600px) { .home-head h1 { font-size: 23px; } .home-head .lead { font-size: 13.5px; } }

/* ---------- お気に入り（星） ---------- */
.fav { border: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); padding: 4px; border-radius: 6px; }
.fav:hover { color: var(--gold); background: var(--surface-2); }
.fav[aria-pressed="true"] { color: var(--gold); }
.fav.with-label { font-size: 13px; font-weight: 700; border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 12px; color: var(--text-2); }
.fav.with-label[aria-pressed="true"] { color: #1a1400; background: var(--gold); border-color: var(--gold); }
td.fav-col, th.fav-col { width: 1%; padding-left: 0; padding-right: 0; }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fav-card { display: flex; align-items: flex-start; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.fav-card.is-live { border-color: color-mix(in srgb, var(--live) 45%, var(--border)); }
.fav-main { display: flex; gap: 12px; flex: 1; min-width: 0; text-decoration: none; }
.fav-text { min-width: 0; }
.fav-name { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.fav-sub { color: var(--muted); font-size: 12.5px; }
.fav-title { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r); padding: 12px 16px; font-size: 14px; }

/* ---------- 自己ベスト ---------- */
.who-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.best-badge { flex: none; font-size: 10.5px; font-weight: 800; color: #1a1400; background: var(--gold); padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.best-list { display: flex; flex-wrap: wrap; gap: 8px; }
.best-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px 4px 4px; box-shadow: var(--shadow); }
.best-chip:hover { border-color: var(--gold); }
.best-name { font-weight: 700; font-size: 13.5px; }
.best-val { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ch-best { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.ch-best.on { color: var(--text); font-weight: 700; }

/* ---------- 共有 ---------- */
.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn.small { height: 30px; padding: 0 12px; font-size: 13px; }
.share-dlg { border: 0; border-radius: var(--r); padding: 16px; background: var(--surface); color: var(--text); max-width: min(760px, 94vw); box-shadow: var(--shadow-lg); }
.share-dlg::backdrop { background: rgb(0 0 0 / .6); }
.share-dlg img { width: 100%; height: auto; border-radius: var(--r-sm); }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- 配信者ページの追加 ---------- */
.card-head.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.heat { display: grid; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-row { display: grid; grid-template-columns: 22px repeat(24, minmax(14px, 1fr)); gap: 3px; align-items: center; }
.heat-row .wd, .heat-row .hh { font-size: 11px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.heat .cell, .heat-legend .cell { display: block; height: 18px; border-radius: 3px; background: var(--surface-2); }
.heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11px; color: var(--muted); margin-top: 8px; }
.heat-legend .cell { width: 16px; height: 12px; }
/* 1色の濃淡（量を表す）。0 は面の色 */
.cell.l1 { background: color-mix(in srgb, var(--series-1) 18%, var(--surface-2)); }
.cell.l2 { background: color-mix(in srgb, var(--series-1) 36%, var(--surface-2)); }
.cell.l3 { background: color-mix(in srgb, var(--series-1) 56%, var(--surface-2)); }
.cell.l4 { background: color-mix(in srgb, var(--series-1) 78%, var(--surface-2)); }
.cell.l5 { background: var(--series-1); }
.codes { display: grid; gap: 8px; }
.code-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.code-label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.code-row input { height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); padding: 0 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; min-width: 0; }
@media (max-width: 600px) { .code-row { grid-template-columns: 1fr auto; } .code-label { grid-column: 1 / -1; } }

/* ---------- カテゴリ ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cat-card { position: relative; display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px 18px; box-shadow: var(--shadow); overflow: hidden; }
.cat-card:hover { border-color: var(--border-strong); }
.cat-name { font-weight: 800; font-size: 16px; }
.cat-meta { color: var(--muted); font-size: 12.5px; }
.cat-live { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.cat-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--surface-2); }
.cat-bar > i { display: block; height: 100%; background: var(--brand); }
.back { display: inline-block; font-size: 13px; color: var(--text-2); text-decoration: none; }
.back:hover { text-decoration: underline; }

/* ---------- 統計 ---------- */
.share-bars { display: grid; gap: 6px; }
.share-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 56px; gap: 10px; align-items: center; }
.share-name { font-weight: 600; font-size: 13.5px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-name:hover { text-decoration: underline; }
.share-bar { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.share-bar > i { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.share-val { text-align: right; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .share-row { grid-template-columns: 110px minmax(0, 1fr) 48px; } }

/* ---------- JS が動く前にサーバーが入れる本文 ---------- */
.ssr h2 { font-size: 18px; }
.ssr-list { padding-left: 1.4em; }
.ssr-list li { margin: 2px 0; }
.nav a[data-nav="favorites"] { color: var(--gold); }
.nav a[data-nav="favorites"][aria-current="page"] { color: #1a1400; background: var(--gold); }
