/* SeekPC — v2「こんなときから選ぶ」 2026-09-04
   正本: docs/DESIGN.md v2。**このファイルが文書と食い違ったら文書が勝つ。**
   影・グラデーション・ネオン・ぼかし・パーティクルを使わない。角丸は 8px と 9999px の2種類だけ。 */

:root {
  --bg: #101012;
  --surface-1: #17171a;
  --surface-2: #1f1f23;
  --surface-3: #2a2a30;
  --line: rgba(236, 238, 243, .08);
  --line-strong: rgba(236, 238, 243, .16);
  --ink: #eceef3;
  --ink-2: #a8abb5;
  --ink-3: #9095a0;
  --ink-4: #4b4e57;
  --accent: #f0873c;
  --live: #ff453a;
  --player-bg: #000;

  --font-latin: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", 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: 20px; --text-title: 24px; --text-headline: 32px; --text-page: 40px;

  --gap-xs: 4px; --gap-sm: 8px; --gap-md: 12px; --gap-lg: 16px; --gap-xl: 24px; --section: 48px;
  --max: 1320px; --hd: 56px; --row: 56px; --panel: 380px;
  --r: 8px; --rp: 9999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-latin), var(--font-ja); font-size: var(--text-body); line-height: 1.75;
  font-feature-settings: "tnum" 1;
  overflow-x: hidden;
}
:lang(ja), [lang="ja"] { font-family: var(--font-ja), var(--font-latin); }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r); }

/* 言語切替: data-l で JA/EN を出し分ける（1つの HTML に両方の語を持つ） */
html[lang="ja"] [data-l="en"], html[lang="en"] [data-l="ja"] { display: none; }

/* ── Header ───────────────────────────────────────────── */
.hd {
  position: sticky; top: 0; z-index: 40; height: var(--hd);
  display: flex; align-items: center; gap: var(--gap-lg);
  padding: 0 var(--gap-lg); background: var(--bg); border-bottom: 1px solid var(--line);
}
.hd__mark { font-family: var(--font-latin); font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.hd__tag { color: var(--ink-3); font-size: var(--text-label); white-space: nowrap; }
.hd__nav { margin-left: auto; display: flex; align-items: center; gap: var(--gap-lg); }
.hd__nav a { color: var(--ink-2); font-size: var(--text-body-sm); white-space: nowrap; }
.hd__nav a:hover { color: var(--ink); }
.hd__nav a[aria-current="page"] { color: var(--ink); }
.lang { display: flex; gap: var(--gap-xs); }
.lang a {
  padding: 2px 10px; border-radius: var(--rp); font-size: var(--text-caption);
  background: var(--surface-2); color: var(--ink-2);
}
.lang a[aria-current="true"] { background: var(--ink); color: var(--bg); }

/* ── Layout ───────────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: var(--gap-xl) var(--gap-lg) var(--section); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel); gap: var(--gap-xl); align-items: start; }

/* ── Player ───────────────────────────────────────────── */
.stage { position: relative; min-width: 0; }
.viewport {
  position: relative; aspect-ratio: 16 / 9; background: var(--player-bg);
  border-radius: var(--r); overflow: hidden;
}
.viewport iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* 幕は「覆う」だけ。動画要素を隠さない（G1-1 / LSN-0239） */
.viewport::after {
  content: ""; position: absolute; inset: 0; background: var(--player-bg);
  opacity: 0; pointer-events: none; transition: opacity 150ms ease;
}
.viewport[data-curtain="on"]::after { opacity: 1; }

.now {
  display: flex; align-items: center; gap: var(--gap-md); min-height: var(--row);
  padding: var(--gap-sm) 0; border-bottom: 1px solid var(--line);
}
.now__label { font-size: var(--text-caption); color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.now__label::before { content: ""; width: 6px; height: 6px; border-radius: var(--rp); background: var(--ink-2); }
.now[data-state="live"] .now__label { color: var(--live); }
.now[data-state="live"] .now__label::before { background: var(--live); }
.now[data-state="tap"] .now__label { color: var(--ink); }
.now[data-state="tap"] .now__label::before { background: var(--ink); }
.now[data-state="error"] .now__label, .now[data-state="tuning"] .now__label,
.now[data-state="external"] .now__label { color: var(--ink-3); }
.now[data-state="error"] .now__label::before, .now[data-state="tuning"] .now__label::before,
.now[data-state="external"] .now__label::before { background: var(--ink-3); }
.now__name { font-weight: 600; white-space: nowrap; }
.now__title { color: var(--ink-2); font-size: var(--text-body-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.now__official { margin-left: auto; color: var(--ink-2); font-size: var(--text-label); white-space: nowrap; }
.now__official:hover { color: var(--ink); text-decoration: underline; }
.now__msg { margin: var(--gap-sm) 0 0; color: var(--ink-3); font-size: var(--text-body-sm); }

.info { padding: var(--gap-lg) 0; border-bottom: 1px solid var(--line); }
.info__hd { display: flex; align-items: center; gap: var(--gap-md); }
.info__name { font-size: var(--text-title-sm); font-weight: 600; }
.info__meta { color: var(--ink-3); font-size: var(--text-caption); }
.info__note { color: var(--ink-3); font-size: var(--text-body-sm); margin: var(--gap-sm) 0 0; }
.info__modes { display: flex; flex-wrap: wrap; gap: var(--gap-sm); margin-top: var(--gap-md); }
.info__foot { display: flex; flex-wrap: wrap; gap: var(--gap-md); margin-top: var(--gap-md); font-size: var(--text-label); }
.info__foot a { color: var(--accent); }
.info__foot a:hover { text-decoration: underline; }
.info__foot a.is-quiet, .info__foot span { color: var(--ink-3); }
.info__toggle { display: none; }

/* ── Browser panel ────────────────────────────────────── */
.browser {
  min-width: 0;
  background: var(--surface-1); border-radius: var(--r); padding: var(--gap-lg);
  position: sticky; top: calc(var(--hd) + var(--gap-lg));
  max-height: calc(100vh - var(--hd) - var(--gap-xl)); display: flex; flex-direction: column;
}
.browser__hd { font-size: var(--text-label); color: var(--ink-2); margin: 0 0 var(--gap-md); }
.browser__lbl { font-size: var(--text-caption); color: var(--ink-3); margin: var(--gap-lg) 0 var(--gap-sm); letter-spacing: .02em; }
.browser__empty { color: var(--ink-3); font-size: var(--text-body-sm); padding: var(--gap-lg) 0; }
.q {
  width: 100%; height: 40px; padding: 0 var(--gap-lg); border-radius: var(--rp);
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); font: inherit; font-size: var(--text-body-sm);
}
.q::placeholder { color: var(--ink-3); }
.q:focus { border-color: var(--line-strong); outline: 2px solid var(--accent); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: var(--gap-sm); min-width: 0; }
.chip { max-width: 100%; }
.chip > span[data-l] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: var(--rp); background: var(--surface-2); color: var(--ink-2);
  font-size: var(--text-caption); transition: background-color 150ms ease, color 150ms ease;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip .n { color: var(--ink-3); font-family: var(--font-latin); }
.chip[aria-pressed="true"] .n { color: var(--ink-4); }
.chip--meta { height: 22px; padding: 0 10px; cursor: default; }
.chip--live { color: var(--live); border: 1px solid var(--live); background: none; }
.chip--plat { color: var(--ink-3); }

.mode-note { color: var(--ink-3); font-size: var(--text-body-sm); margin: var(--gap-sm) 0 0; }

/* この状況の読みもの */
.reads { margin-top: var(--gap-lg); padding: var(--gap-md); background: var(--bg); border-radius: var(--r); }
.reads__hd { font-size: var(--text-caption); color: var(--ink-3); margin: 0 0 var(--gap-sm); }
.reads a { display: block; padding: 6px 0; font-size: var(--text-body-sm); color: var(--ink-2); }
.reads a:hover { color: var(--ink); }
.reads__more { color: var(--accent) !important; font-size: var(--text-caption) !important; }

.list { margin-top: var(--gap-lg); flex: 1; min-height: 240px; overflow-y: auto; }
.grp {
  display: flex; align-items: center; gap: var(--gap-sm);
  padding: var(--gap-lg) 0 var(--gap-sm); font-size: var(--text-caption); color: var(--ink-3);
  position: sticky; top: 0; background: var(--surface-1);
}
.grp .n { font-family: var(--font-latin); }
.row {
  display: flex; align-items: center; gap: var(--gap-md); min-height: var(--row);
  padding: var(--gap-sm) var(--gap-md); margin: 0 calc(var(--gap-md) * -1);
  border-left: 2px solid transparent; transition: background-color 150ms ease;
}
.row:hover { background: var(--surface-2); }
.row[aria-selected="true"] { background: var(--surface-3); border-left-color: var(--accent); }
.row { min-width: 0; }
.row__body { min-width: 0; flex: 1; }
.row__name { display: block; font-size: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { display: block; font-size: var(--text-caption); color: var(--ink-3); line-height: 1.4; }
.row.is-dormant .row__name { color: var(--ink-3); }
.row__tag { flex-shrink: 0; }

/* ── Avatar ───────────────────────────────────────────── */
.av {
  position: relative; flex-shrink: 0; display: inline-grid; place-items: center;
  border-radius: var(--rp); background: var(--surface-2); overflow: hidden;
}
.av--24 { width: 24px; height: 24px; }
.av--36 { width: 36px; height: 36px; }
.av--48 { width: 48px; height: 48px; }
.av__i { font-family: var(--font-latin); font-weight: 600; color: var(--ink-2); font-size: 12px; line-height: 1; }
.av--48 .av__i { font-size: 16px; }
.av--24 .av__i { font-size: 10px; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av img.is-broken { display: none; }

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

/* ── Footer ───────────────────────────────────────────── */
.ft { border-top: 1px solid var(--line); padding: var(--gap-xl) var(--gap-lg); }
.ft__in { max-width: var(--max); margin: 0 auto; }
.ft__links { display: flex; flex-wrap: wrap; gap: var(--gap-xl); font-size: var(--text-body-sm); }
.ft__links a { color: var(--ink-2); }
.ft__links a:hover { color: var(--ink); }
.ft__note { color: var(--ink-3); font-size: var(--text-caption); margin: var(--gap-lg) 0 0; }

/* ── 下層ページ（/channels/ /about/） ─────────────────── */
.page { max-width: 900px; margin: 0 auto; padding: var(--section) var(--gap-lg); }
.page h1 { font-size: var(--text-page); line-height: 1.2; font-weight: 600; margin: 0 0 var(--gap-lg); }
.page h2 { font-size: var(--text-title); line-height: 1.4; font-weight: 600; margin: var(--section) 0 var(--gap-md); }
.page h3 { font-size: var(--text-title-sm); font-weight: 600; margin: var(--gap-xl) 0 var(--gap-sm); }
.page p, .page li { color: var(--ink-2); }
.page a:not(.chip):not(.btn) { color: var(--accent); }
.page a:not(.chip):not(.btn):hover { text-decoration: underline; }
.lede { font-size: var(--text-body-lg); color: var(--ink-2); }

.section__hd { display: flex; align-items: baseline; gap: var(--gap-sm); margin: var(--section) 0 var(--gap-md); }
.section__hd h2 { margin: 0; font-size: var(--text-title-sm); }
.section__hd .n { color: var(--ink-3); font-size: var(--text-caption); font-family: var(--font-latin); }
.crow { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--gap-md); padding: var(--gap-lg) 0; border-top: 1px solid var(--line); }
.crow__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--gap-sm); }
.crow__name { font-size: var(--text-body-lg); font-weight: 500; color: var(--ink) !important; }
.crow__name:hover { text-decoration: underline; }
.crow__meta { color: var(--ink-3); font-size: var(--text-caption); }
.crow__why { grid-column: 2; color: var(--ink-2); font-size: var(--text-body-sm); }
.crow__sub { display: block; color: var(--ink-3); font-size: var(--text-caption); margin-top: var(--gap-xs); }
.crow__foot { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--gap-md); font-size: var(--text-label); margin-top: var(--gap-sm); }
.crow.is-dormant .crow__name { color: var(--ink-3) !important; }

.callout { background: var(--surface-1); border-radius: var(--r); padding: var(--gap-lg); margin: var(--gap-xl) 0; }
.callout p { margin: 0; font-size: var(--text-body-sm); }

/* ── SP ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --hd: 52px; }
  .hd__tag { display: none; }
  .hd { gap: var(--gap-md); padding: 0 var(--gap-md); }
  /* ⚠ flex の子は min-width:auto。0 を与えないと overflow-x:auto が効かない。
     ただし**内部スクロールに頼らない**（触れる手がかりが無く、JA/EN に届かない）。
     副次リンクは畳んで、ヘッダーを 390px に実際に収める。5本すべてフッターにある。 */
  .hd { gap: var(--gap-sm); }
  .hd__nav { gap: var(--gap-md); min-width: 0; }
  .hd__nav a.is-wide { display: none; }
  .wrap { padding: 0 0 var(--section); }
  .two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage { position: sticky; top: var(--hd); z-index: 30; background: var(--bg); }
  .viewport { border-radius: 0; }
  .now, .info { padding-left: var(--gap-md); padding-right: var(--gap-md); }
  /* Channel Info は SP では既定で畳む（DESIGN.md §Browser Panel の積み上げ規則） */
  .info__toggle {
    display: flex; align-items: center; gap: 6px; width: 100%; padding: var(--gap-sm) 0;
    color: var(--ink-2); font-size: var(--text-body-sm);
  }
  .info__body { display: none; }
  .info.is-open .info__body { display: block; }
  .browser { border-radius: 0; padding: var(--gap-lg) var(--gap-md); position: static; max-height: none; display: block; }
  /* SP ではチップを**1行の横スクロール**にする（DESIGN.md §Browser Panel）。
     折り返すと10個で 162〜215px を食い、一覧の1行目が画面の外へ出る（実測 858px）。 */
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px;
    /* ⚠ 負の横マージンで端まで届かせない。documentElement の scrollWidth を押し広げ、
       body{overflow-x:hidden} では抑えられない横スクロールが出る（2026-09-04 実測 462>390）。 */
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .browser__lbl { margin-top: var(--gap-md); }
  .list { max-height: none; overflow: visible; min-height: 0; }
  .grp { top: calc(var(--hd) + 56vw); }
  .page { padding: var(--gap-xl) var(--gap-md); }
  .page h1 { font-size: var(--text-headline); }
  .crow { grid-template-columns: 40px minmax(0, 1fr); }
}
/* 「話題」は既定で畳む（PC も SP も）。開くまで一覧が画面の中に残る。 */
.cats-wrap { display: none; }
.cats-wrap.is-open { display: block; }
.cats-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: var(--gap-md) 0 0; color: var(--ink-2); font-size: var(--text-body-sm);
}
.cats-toggle::after { content: "▾"; color: var(--ink-3); }
.cats-toggle[aria-expanded="true"]::after { content: "▴"; }
.browser__scroll { overflow-y: auto; flex-shrink: 0; max-height: 46vh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
