/* SAKAOTA — v2（2026-09-02）。正本: docs/DESIGN.md v2。CSS がこの文書と食い違ったら文書が勝つ。
   規則: 無彩色4段の段差 / アクセント1色（Pitch）/ 赤は LIVE だけ / 書体2つ / 影ゼロ / 角丸 8px と丸だけ */
:root {
  --bg: #0a0c0b;
  --surface-1: #111514;
  --surface-2: #181d1b;
  --surface-3: #212926;
  --line: rgba(238, 243, 240, .08);
  --line-strong: rgba(238, 243, 240, .14);
  --ink: #eef3f0;
  --ink-2: #b3bdb7;
  --ink-3: #86928b;
  --ink-4: #525c57;
  --accent: #4fd97f;
  --live: #ff4d42;
  --player-bg: #000;
  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font: var(--font-latin), var(--font-ja);
  --text-caption: 12px; --text-label: 13px; --text-body-sm: 14px; --text-body: 15px; --text-body-lg: 17px;
  --text-title-sm: 18px; --text-title: 22px; --text-headline: 28px; --text-page: 32px;
  --r: 8px; --pill: 9999px;
  --hd: 56px; --max: 1280px; --pad: 24px;
  --ease: 150ms ease;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 var(--text-body)/1.7 var(--font); font-feature-settings: "tnum"; background: var(--bg); color: var(--ink); min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: var(--r); z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* 言語切替: <html lang="en"> のときだけ EN を見せる。JS 無しでは日本語だけが出る */
[data-l="en"] { display: none; }
html[lang="en"] [data-l="en"] { display: initial; }
html[lang="en"] [data-l="ja"] { display: none; }
html[lang="en"] p[data-l="en"], html[lang="en"] div[data-l="en"], html[lang="en"] li[data-l="en"] { display: block; }

/* ── Header ─────────────────────────────────────────── */
.hd { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.hd__in { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); height: var(--hd); display: flex; align-items: center; gap: 16px; }
.brand { font: 600 18px/1 var(--font-latin); letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.hd__tag { margin: 0; font-size: var(--text-label); font-weight: 400; color: var(--ink-3); line-height: 1.3; }
.nav { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
.nav a { color: var(--ink-2); white-space: nowrap; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover { color: var(--ink); text-decoration: none; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--pill); overflow: hidden; }
.lang button { background: none; border: 0; padding: 5px 10px; font-size: 12px; color: var(--ink-3); cursor: pointer; line-height: 1; min-height: 28px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.menu { display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--r); width: 40px; height: 40px; cursor: pointer; font-size: 18px; line-height: 1; }
.drawer { display: none; }
.drawer[data-open="true"] { display: block; }
.drawer ul { list-style: none; margin: 0; padding: 8px var(--pad); border-bottom: 1px solid var(--line); background: var(--bg); }
.drawer li a { display: block; padding: 12px 0; color: var(--ink-2); font-size: 15px; border-bottom: 1px solid var(--line); }
.drawer li:last-child a { border-bottom: 0; }

/* ── Home grid ──────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.home__grid { max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }

/* Player stage */
.viewport { position: relative; aspect-ratio: 16 / 9; background: var(--player-bg); border-radius: var(--r); overflow: hidden; }
.viewport iframe, .viewport #player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewport .plate__idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; color: var(--ink-2); font-size: var(--text-body-sm); }
.viewport .plate__idle p { margin: 0; max-width: 34em; }

/* Now playing bar */
.now { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: var(--text-label); }
.now__state { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); white-space: nowrap; }
.now .dot { width: 8px; height: 8px; border-radius: var(--pill); background: var(--ink-3); flex: none; }
.now[data-state="latest"] .dot { background: var(--ink-2); }
.now[data-state="latest"] .now__state { color: var(--ink-2); }
.now[data-state="live"] .dot { background: var(--live); animation: blink 2s ease-in-out infinite; }
.now[data-state="live"] .now__state { color: var(--live); font-weight: 600; }
@keyframes blink { 50% { opacity: .35; } }
.now__name { font-weight: 600; font-size: var(--text-body); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.now__meta { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.nb { white-space: nowrap; }
.now__official { margin-left: auto; white-space: nowrap; }
.now__official .short { display: none; }
.now__msg { margin: 8px 4px 0; font-size: var(--text-body-sm); color: var(--ink-2); }

/* Channel info */
.info { display: flex; gap: 16px; padding: 20px 4px 24px; align-items: flex-start; }
.info__body { min-width: 0; }
.info__name { font-size: var(--text-title-sm); font-weight: 600; line-height: 1.35; }
.info__meta { font-size: var(--text-caption); color: var(--ink-3); margin-top: 4px; }
.info__note { font-size: var(--text-body-sm); color: var(--ink-2); margin: 8px 0 0; }
.info__foot { font-size: var(--text-label); margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; }
.info__foot .muted { color: var(--ink-3); }

/* Avatar */
.av { position: relative; display: inline-block; flex: none; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av__i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 600 .42em/1 var(--font-latin); color: var(--ink-2); }
.av--24 { width: 24px; height: 24px; font-size: 24px; }
.av--36 { width: 36px; height: 36px; font-size: 36px; }
.av--48 { width: 48px; height: 48px; font-size: 48px; }

/* Browser panel */
.browser { background: var(--surface-1); border-radius: var(--r); display: flex; flex-direction: column; max-height: calc(100vh - var(--hd) - 48px); position: sticky; top: calc(var(--hd) + 24px); overflow: hidden; }
.browser__top { padding: 12px 12px 0; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search::before { content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid var(--ink-3); border-radius: 50%; box-sizing: border-box; }
.search::after { content: ""; position: absolute; left: 24px; top: 50%; width: 2px; height: 6px; margin-top: 3px; background: var(--ink-3); transform: rotate(-45deg); }
.input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface-1); color: var(--ink); padding: 0 14px 0 38px; font: inherit; font-size: var(--text-body-sm); }
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--line-strong); }
.cats-wrap { display: flex; align-items: flex-start; gap: 6px; }
.cats { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding: 12px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cats.cats--wrap { flex-wrap: wrap; overflow: visible; }
.cats__more { flex: none; margin-top: 12px; width: 30px; height: 30px; border-radius: var(--pill); border: 1px solid var(--line-strong); background: none; color: var(--ink-2); cursor: pointer; font-size: 12px; line-height: 1; }
.cats__more[aria-expanded="true"] { background: var(--surface-3); color: var(--ink); }
.cats::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--pill); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-label); white-space: nowrap; border: 0; cursor: pointer; transition: background var(--ease), color var(--ease); }
.chip:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.cat-lede { margin: 0; padding: 0 2px 12px; font-size: var(--text-caption); color: var(--ink-3); line-height: 1.6; display: flex; gap: 12px; align-items: baseline; }
.cat-lede span { flex: 1 1 auto; min-width: 0; }
.cat-lede a { flex: none; }
.browser__list { overflow-y: auto; flex: 1 1 auto; }
.browser__list ul, .rows { list-style: none; margin: 0; padding: 0; }
.group { margin: 0; padding: 12px 16px 4px; font-size: var(--text-caption); color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 14px; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; color: var(--ink); cursor: pointer; text-decoration: none; transition: background var(--ease); }
.row:hover { background: var(--surface-2); text-decoration: none; }
.row[aria-current="true"] { background: var(--surface-3); border-left-color: var(--accent); }
.row__body { min-width: 0; flex: 1 1 auto; }
.row__name { display: block; font-size: var(--text-body); font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { display: block; font-size: var(--text-caption); color: var(--ink-3); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__subs { flex: none; margin-left: auto; font-size: var(--text-caption); color: var(--ink-3); white-space: nowrap; text-align: right; font-feature-settings: "tnum"; }
.row--dormant .row__name { color: var(--ink-3); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--pill); font-size: var(--text-caption); background: var(--surface-2); color: var(--ink-2); flex: none; }
.tag--live { background: none; border: 1px solid var(--live); color: var(--live); }
.browser__foot { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: var(--text-label); }
.browser__empty { padding: 24px 16px; color: var(--ink-2); font-size: var(--text-body-sm); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); font-size: var(--text-body); font-weight: 500; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { text-decoration: none; opacity: .92; }
.btn--ghost { background: none; border-color: var(--line-strong); color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }

/* Trust strip */
.trust { max-width: var(--max); margin: 32px auto 0; padding: 32px var(--pad) 8px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trust h2 { margin: 0 0 6px; font-size: var(--text-title-sm); font-weight: 600; }
.trust p { margin: 0; font-size: var(--text-body-sm); color: var(--ink-2); }

/* Footer */
.ft { margin-top: 48px; border-top: 1px solid var(--line); font-size: var(--text-label); color: var(--ink-3); }
.ft__in { max-width: var(--max); margin: 0 auto; padding: 32px var(--pad) 16px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.ft__col p { margin: 6px 0 0; }
.ft__col a { display: block; color: var(--ink-2); margin: 0 0 6px; }
.ft .brand { font-size: 15px; }
.ft__bottom { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ── Sub pages ──────────────────────────────────────── */
.page { max-width: var(--max); margin: 0 auto; padding: 32px var(--pad) 0; min-width: 0; }
.page h2 small a { display: inline; }
.page__hd { max-width: 760px; }
.page h1 { font-size: var(--text-page); line-height: 1.2; margin: 0 0 8px; font-weight: 700; }
.page h1.headline { font-size: var(--text-headline); line-height: 1.25; }
.page .lede { font-size: var(--text-body-lg); color: var(--ink-2); margin: 0 0 12px; }
.page .note { font-size: var(--text-body); color: var(--ink-2); margin: 0 0 24px; }
.page h2 { font-size: var(--text-title); font-weight: 600; margin: 40px 0 6px; line-height: 1.3; }
.page h2 small { font-size: var(--text-caption); color: var(--ink-3); font-weight: 400; margin-left: 8px; }
.cat-list { max-width: 760px; }
.cat-list .rows { border-top: 1px solid var(--line); }
.cat-list .row { border-bottom: 1px solid var(--line); padding-left: 12px; border-left: 0; }
.cat-list .row__right { flex: none; display: flex; align-items: center; gap: 12px; font-size: var(--text-label); }
.cat-list .row__right .muted { color: var(--ink-3); }
.cat-list .row__right a { white-space: nowrap; }
.cat-list .row__right a.watch { color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--pill); padding: 4px 10px; }
.cat-list .row__right a.watch:hover { background: var(--surface-2); text-decoration: none; }
.morecats { margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.morecats .chip { height: 32px; }

/* /channels/ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.filters select, .filters .input { height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface-1); color: var(--ink); font: inherit; font-size: var(--text-body-sm); padding: 0 10px; min-width: 0; }
.filters .input { border-radius: var(--pill); padding-left: 14px; width: 220px; max-width: 100%; }
.filters select { max-width: 100%; }
.filters .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
.tbl th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: var(--text-caption); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td.c-n { font-weight: 500; }
.tbl td.c-n .av { margin-right: 10px; }
.tbl td.c-num { text-align: right; white-space: nowrap; color: var(--ink-2); }
.tbl td.c-m, .tbl td.c-l { color: var(--ink-2); }
.tbl td.c-a { white-space: nowrap; }
.tbl-wrap { overflow-x: auto; max-width: 100%; }
.tbl { min-width: 860px; }
.tbl .c-n .who { display: inline-flex; align-items: center; gap: 0; }
.tbl tr.dormant td.c-n { color: var(--ink-3); }

/* prose (about) */
.prose { max-width: 720px; font-size: var(--text-body); color: var(--ink-2); }
.prose h2 { color: var(--ink); font-size: var(--text-title); margin: 40px 0 8px; }
.prose h3 { color: var(--ink); font-size: var(--text-title-sm); margin: 24px 0 4px; }
.prose p, .prose li { margin: 8px 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: var(--font-latin); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .95em; }
.prose table { border-collapse: collapse; font-size: var(--text-body-sm); }
.prose th, .prose td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink-3); font-weight: 500; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .home__grid { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 959px) {
  :root { --hd: 52px; --pad: 16px; }
  .hd__in { flex-wrap: nowrap; height: auto; min-height: var(--hd); padding-top: 8px; padding-bottom: 8px; gap: 12px; }
  .hd__brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .hd__tag { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav { display: none; }
  .menu { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; flex: none; }
  .lang { flex: none; }
  .home__grid { display: block; padding: 0; }
  .stage__sticky { position: sticky; top: var(--hd); z-index: 20; background: var(--bg); }
  .viewport { border-radius: 0; }
  .now { padding: 8px var(--pad); flex-wrap: nowrap; }
  .now__official .long { display: none; }
  .now__official .short { display: inline; }
  .now__meta { display: none; }
  .now__msg { margin: 8px var(--pad) 0; }
  .info { padding: 12px var(--pad) 16px; }
  .info .av--48 { width: 40px; height: 40px; font-size: 40px; }
  .browser { position: static; max-height: none; border-radius: 0; overflow: visible; }
  .browser__top { padding: 12px var(--pad) 0; position: relative; }
  .browser__list { overflow: visible; }
  .row { padding-left: calc(var(--pad) - 2px); padding-right: var(--pad); }
  .group { padding-left: var(--pad); }
  .trust { grid-template-columns: 1fr; gap: 20px; }
  .ft__in { grid-template-columns: 1fr; }
}
@media (max-width: 959px) and (orientation: landscape) and (max-height: 500px) {
  .stage__sticky { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── 追補（ヘッダーの束・カテゴリページの行） ───────────── */
.hd__brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hd__tools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: 8px; }
.cat-list li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-right: 8px; }
.cat-list li .row { border: 0; flex: 1 1 auto; min-width: 0; padding-left: 8px; }
.cat-list li .row:hover { border-radius: var(--r); }
@media (max-width: 959px) {
  .hd { position: static; }
  .hd__brand { flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
  .hd__tag { max-width: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
  /* プレーヤーは一覧をたどる間も上に残す: .stage の箱を外して .home__grid 全体を sticky の親にする */
  .home[data-page] .stage, .home .stage { display: contents; }
  .stage__sticky { top: 0; }
  .cat-list li { padding-right: 0; }
  .cat-list .row__right .muted { display: none; }
  .cat-list .row__subs { display: none; }
}

/* ── 読みもの（記事の一覧） ─────────────────────────── */
.arts { list-style: none; margin: 0; padding: 0; }
.art { border-top: 1px solid var(--line); padding: 20px 0; }
.art__date { margin: 0 0 4px; font-size: var(--text-caption); color: var(--ink-3); }
.art__t { margin: 0 0 6px; font-size: var(--text-title-sm); font-weight: 600; line-height: 1.35; }
.art__t a { color: var(--ink); }
.art__l { margin: 0; font-size: var(--text-body-sm); color: var(--ink-2); }
