/* StarSeek — トークンと共通クローム
   正本: docs/DESIGN.md v3。色・書体・部品の規則はそちらが決める。ここはその実装。
   旧トップと記事14本の配色をそのまま引き継いでいる（同じ夜の、別の部屋）。 */

:root {
  /* サーフェス（DESIGN.md §3.1） */
  --bg: #080B18;
  --bg-deep: #05070F;
  --surface-1: #0E1227;
  --surface-2: #151A33;
  --line: rgba(143, 183, 255, .13);
  --line-soft: rgba(143, 183, 255, .07);
  --line-strong: rgba(143, 183, 255, .24);

  /* 文字（§3.2） */
  --ink: #ECEAF4;
  --ink-2: #C7CCE0;
  --muted: #A7AEC8;
  --dim: #6E7596;
  --faint: #39415F;

  /* ブランド（§3.3） */
  --accent: #E9B873;
  --link: #93B8F2;
  --deep: #B48BFF;

  /* 状態（§3.4）— 彩度は状態にだけ */
  --live: #FF4A3D;
  --latest: var(--accent);
  --waiting: #6E7596;

  --maxw: 1180px;
  --radius: 2px;
  --header-h: 60px;

  --f-display: 'Fraunces', Georgia, serif;
  --f-mincho: 'Zen Old Mincho', 'Hiragino Mincho ProN', serif;
  --f-body: 'Hanken Grotesk', 'Zen Kaku Gothic New', system-ui, -apple-system, sans-serif;
  --f-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

::selection { background: rgba(233, 184, 115, .28); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #1b2240; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2a3358; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

/* マイクロラベル（計器の文字）— DESIGN.md §4 */
.micro {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── 星の背景（省電力・reduced-motion で止まる） ───────────────────── */
.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block;
}
.bg-grad {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #0A0F22 0%, #080B18 38%, #070A14 72%, #05070F 100%);
}

/* ── ヘッダー ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(8, 11, 24, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  padding: 0 clamp(18px, 4vw, 40px);
  display: flex; align-items: center; gap: clamp(12px, 2vw, 26px);
}
.brand { display: flex; align-items: baseline; gap: 9px; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 19px; color: var(--ink); letter-spacing: .005em; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-tag { font-size: 11px; color: var(--dim); white-space: nowrap; }
.nav { display: flex; gap: clamp(8px, 1.4vw, 20px); margin-left: auto; }
.nav a { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 10px; flex: none; }

.lang-toggle { display: flex; font-family: var(--f-mono); font-size: 11px; }
.lang-toggle button {
  background: none; border: none; cursor: pointer; padding: 5px 7px;
  font-family: inherit; font-size: inherit; letter-spacing: .06em; color: var(--dim);
}
.lang-toggle button[aria-pressed="true"] { color: var(--accent); }

.hd-count {
  display: flex; align-items: baseline; gap: 4px;
  font-family: var(--f-mono); font-size: 11px; color: var(--dim);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 8px;
}
.hd-count .num { color: var(--accent); font-size: 12px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--ink); border-radius: var(--radius); width: 34px; height: 32px;
  cursor: pointer; font-size: 15px; line-height: 1;
}
.nav-drawer { display: none; }
.nav-drawer[data-open="true"] {
  display: block; position: sticky; top: var(--header-h); z-index: 55;
  background: var(--surface-1); border-bottom: 1px solid var(--line);
}
.nav-drawer ul { list-style: none; margin: 0; padding: 8px clamp(18px, 4vw, 40px) 14px; }
.nav-drawer li a { display: block; padding: 11px 0; color: var(--ink-2); font-size: 14px; border-bottom: 1px solid var(--line-soft); }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .brand-tag { display: none; }
}

/* ── 見出し ──────────────────────────────────────────────── */
.h-eyebrow { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); }
.h-1 { font-family: var(--f-display); font-weight: 900; font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.06; letter-spacing: -.012em; margin: 14px 0 0; text-wrap: balance; }
.h-2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.16; margin: 0; }
.h-3 { font-family: var(--f-mincho); font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.3; margin: 0; }
.lead { color: var(--muted); font-size: clamp(.98rem, 1.4vw, 1.08rem); max-width: 62ch; }

/* ── チップ（状態）— 同時に2つまで（DESIGN.md §6） ─────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: var(--radius); font-size: 10.5px; line-height: 1; white-space: nowrap;
  border: 1px solid var(--line); color: var(--dim); font-family: var(--f-body);
}
.chip--anchor { color: var(--accent); border-color: rgba(233, 184, 115, .34); }
.chip--dormant { color: var(--dim); }
.chip--music { color: var(--live); border-color: rgba(255, 74, 61, .3); }
.chip--live { color: var(--live); border-color: rgba(255, 74, 61, .4); }

/* ── ボタン ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius);
  border: 1px solid rgba(233, 184, 115, .45); color: var(--accent);
  background: none; cursor: pointer; font: inherit; font-size: 13.5px;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn--quiet { border-color: var(--line); color: var(--muted); }
.btn--quiet:hover { background: none; color: var(--accent); border-color: var(--line-strong); }

/* ── フッター ────────────────────────────────────────────── */
.site-footer {
  margin-top: clamp(56px, 9vh, 100px);
  border-top: 1px solid var(--line-soft);
  background: var(--bg-deep);
  padding: clamp(34px, 6vh, 56px) 0 30px;
  position: relative; z-index: 10;
}
.site-footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
.site-footer .col { display: flex; flex-direction: column; gap: 7px; }
.site-footer .col .h { font-family: var(--f-mono); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.site-footer .col a { font-size: 13px; color: var(--muted); }
.site-footer .col a:hover { color: var(--accent); }
.site-footer .lead { font-size: 12.5px; color: var(--dim); line-height: 1.66; }
.site-footer .bottom {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
  font-size: 11.5px; color: var(--faint);
}
.site-footer .bottom .mono { font-family: var(--f-mono); }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; gap: 22px; } }

/* ── 言語切替（静的な二言語ページ用） ──────────────────────────── */
[data-l="en"] { display: none; }
html[lang="en"] [data-l="ja"] { display: none; }
html[lang="en"] [data-l="en"] { display: revert; }

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