/* 実況の記録 v2 追加スタイル
   既存の records.css の後に読み込む。新規クラスは rx- 接頭辞で衝突を避ける。
   カテゴリ色は既存の .rec-theme-* が定義する --genre-accent / --genre-text を利用する。 */

.rec-wrap, .rx-scope {
  --rx-ink: #1e293b;
  --rx-muted: #64748b;
  --rx-line: #e2e8f0;
  --rx-soft: #f8fafc;
  --rx-brand: #4f46e5;
  --rx-vertical: #047857;
  --rx-vertical-bg: #ecfdf5;
  --rx-live: #1d4ed8;
  --rx-live-bg: #eff6ff;
  --rx-gold: #b45309;
  --rx-gold-bg: #fef3c7;
}

/* ---------- 共通 ---------- */
.rx-section { margin: 28px 0; }
.rx-section-head { margin-bottom: 12px; }
.rx-h2 { font-size: 1.125rem; font-weight: 800; color: var(--rx-ink); margin: 0; line-height: 1.4; }
.rx-h3 { font-size: .875rem; font-weight: 700; color: var(--rx-ink); margin: 18px 0 8px; }
.rx-muted { color: var(--rx-muted); font-size: .8125rem; line-height: 1.7; margin: 4px 0 0; }

.rx-intro { margin: 4px 0 8px; max-width: 46em; }
.rx-intro p { color: #334155; font-size: .9375rem; line-height: 1.8; margin: 0; }
.rx-intro a, .rx-about a { color: var(--rx-brand); text-decoration: underline; text-underline-offset: 2px; }

.rx-genre-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--rx-line); background: #fff;
  color: var(--genre-text, var(--rx-ink)); font-size: .78rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}
.rx-genre-chip i { color: var(--genre-accent, var(--rx-brand)); font-size: .75rem; }
.rx-genre-chip small { color: var(--rx-muted); font-weight: 500; margin-left: 2px; }
a.rx-genre-chip:hover { border-color: var(--genre-accent, var(--rx-brand)); }

.rx-chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.rx-format { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: .72rem; font-weight: 700; }
.rx-format-vertical { color: var(--rx-vertical); background: var(--rx-vertical-bg); }
.rx-format-live { color: var(--rx-live); background: var(--rx-live-bg); }

.rx-showmore { margin-top: 8px; }
.rx-showmore > summary {
  cursor: pointer; color: var(--rx-brand); font-size: .8125rem; font-weight: 700;
  padding: 8px 0; list-style: none;
}
.rx-showmore > summary::-webkit-details-marker { display: none; }
.rx-showmore > summary::before { content: "＋ "; }
.rx-showmore[open] > summary::before { content: "－ "; }

.rec-wrap a:focus-visible, .rec-wrap summary:focus-visible {
  outline: 2px solid var(--rx-brand); outline-offset: 2px; border-radius: 4px;
}

/* ---------- ヘッダーのブランド表示（layout.html のヘッダー内） ---------- */
.rx-header-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.rx-header-brand i { color: #d97706; font-size: .95em; }
.rx-header-brand-sub { color: #4f46e5; }
.rx-header-brand:hover .rx-header-brand-sub { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- ヒーロー ---------- */
.rx-hero {
  position: relative; overflow: hidden;
  margin: 0 0 8px; padding: 28px 28px 24px; border-radius: 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(251, 191, 36, .22), transparent 38%),
    radial-gradient(circle at 8% 110%, rgba(99, 102, 241, .16), transparent 45%),
    linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  border: 1px solid #e0e7ff;
}
.rx-hero-deco {
  position: absolute; right: 22px; top: 14px; font-size: 92px; line-height: 1;
  color: rgba(217, 119, 6, .1); pointer-events: none;
}
.rx-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; background: #fef3c7; color: #92400e;
  font-size: .75rem; font-weight: 800; letter-spacing: .02em;
}
.rx-hero-title { margin: 12px 0 0; font-size: 1.75rem; font-weight: 900; line-height: 1.35; color: var(--rx-ink); position: relative; }
.rx-hero-lead { margin: 10px 0 0; max-width: 44em; color: #334155; font-size: .9375rem; line-height: 1.85; position: relative; }
.rx-hero-lead strong { color: var(--rx-ink); }
.rx-hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; position: relative; }
.rx-hero-stats > div { padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,.85); border: 1px solid #e0e7ff; min-width: 9.5rem; }
.rx-hero-stats dt { font-size: .72rem; color: var(--rx-muted); font-weight: 700; }
.rx-hero-stats dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 900; color: var(--rx-brand); font-variant-numeric: tabular-nums; line-height: 1.2; }
.rx-hero-stats dd small { font-size: .8rem; margin-left: 2px; color: var(--rx-muted); font-weight: 700; }
.rx-hero-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--rx-brand); font-weight: 800; font-size: .875rem; text-decoration: none; position: relative; }
.rx-hero-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.rx-br-sm { display: none; }

/* 既存の .rec-hero（カテゴリ・一覧ページ）の見出しを h1 にしたぶんの見た目合わせ */
.rec-hero h1 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 900; line-height: 1.4; color: inherit; }

/* ---------- タブ（セグメント） ---------- */
.rx-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.rx-tabs > label {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; font-size: .875rem; font-weight: 800;
  color: var(--rx-muted); background: #fff; border: 1px solid var(--rx-line);
  transition: background-color .15s, color .15s, border-color .15s;
}
.rx-tabs > label small { font-weight: 600; opacity: .8; }
.rx-tabs > label:hover { border-color: #c7d2fe; color: var(--rx-ink); }
.rx-tabs > input:checked + label { color: #fff; background: var(--rx-ink); border-color: var(--rx-ink); }
.rx-tabs > input:focus-visible + label { outline: 2px solid var(--rx-brand); outline-offset: 2px; }
.rx-tab-panel { display: none; flex-basis: 100%; padding-top: 14px; }
#rx-tab-vertical:checked ~ .rx-panel-vertical,
#rx-tab-live:checked ~ .rx-panel-live { display: block; }

/* ---------- アイコン ---------- */
.rx-avatar { flex: none; border-radius: 50%; object-fit: cover; background: var(--rx-soft); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--rx-line); }
.rx-avatar-lg { width: 64px; height: 64px; }
.rx-avatar-sm { width: 40px; height: 40px; }
.rx-avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; background: var(--genre-accent, var(--rx-brand));
}
.rx-avatar-lg.rx-avatar-fallback { font-size: 1.5rem; }
.rx-avatar-sm.rx-avatar-fallback { font-size: 1rem; }

/* ---------- 注目カード（上位3件） ---------- */
.rx-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rx-feature {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 16px 16px 14px; border-radius: 14px; background: #fff;
  border: 1px solid var(--rx-line); border-top: 4px solid var(--genre-accent, var(--rx-brand));
  box-shadow: 0 6px 18px -12px rgba(15, 23, 42, .25);
  transition: transform .15s, box-shadow .15s;
}
.rx-feature:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(15, 23, 42, .35); }
.rx-feature-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  color: var(--rx-gold); background: var(--rx-gold-bg); border: 1px solid #fde68a;
}
.rx-feature-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rx-feature-name { font-size: 1.05rem; font-weight: 900; color: var(--rx-ink); text-decoration: none; line-height: 1.4; overflow-wrap: anywhere; }
.rx-feature-name::after { content: ""; position: absolute; inset: 0; border-radius: 14px; } /* カード全体をクリック可能に */
.rx-feature-name:hover { text-decoration: underline; }
.rx-feature-views { display: flex; align-items: baseline; gap: 4px; margin-top: 2px; }
.rx-feature-views strong { font-size: 1.5rem; font-weight: 900; color: var(--rx-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.rx-feature-views span { font-size: .75rem; color: var(--rx-muted); font-weight: 700; }
.rx-feature-subs { font-size: .8rem; color: var(--rx-muted); }
.rx-feature-subs strong { color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-feature-genre {
  position: relative; z-index: 1; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--rx-line);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 800; color: var(--genre-text, var(--rx-ink)); text-decoration: none;
}
.rx-feature-genre i { color: var(--genre-accent, var(--rx-brand)); }
.rx-feature-genre:hover { text-decoration: underline; }

/* ---------- 4位以降のリスト ---------- */
.rx-winners { list-style: none; margin: 14px 0 0; padding: 0; background: #fff; border: 1px solid var(--rx-line); border-radius: 14px; overflow: hidden; }
.rx-showmore .rx-winners { margin-top: 6px; }
.rx-winner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rx-line); }
.rx-winner:last-child { border-bottom: 0; }
.rx-winner:hover { background: #fafaff; }
.rx-winner-pos { flex: 0 0 1.5rem; text-align: right; font-weight: 900; font-size: .9rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.rx-winner-body { min-width: 0; flex: 1; }
.rx-winner-name { display: block; font-weight: 800; font-size: .95rem; color: var(--rx-ink); text-decoration: none; overflow-wrap: anywhere; line-height: 1.45; }
.rx-winner-name:hover { text-decoration: underline; }
.rx-winner-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: .78rem; color: var(--rx-muted); font-variant-numeric: tabular-nums; }
.rx-winner-views { flex: none; text-align: right; line-height: 1.2; }
.rx-winner-views strong { display: block; font-size: 1rem; font-weight: 900; color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-winner-views span { font-size: .7rem; color: var(--rx-muted); }

/* ---------- カテゴリ ---------- */
.rx-families { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.rx-family {
  padding: 16px; border-radius: 14px; background: #fff;
  border: 1px solid var(--rx-line); scroll-margin-top: 16px;
}
.rx-family-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rx-family-icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--genre-accent, var(--rx-brand)); background: color-mix(in srgb, var(--genre-accent, #4f46e5) 12%, #fff);
}
.rx-family-name { margin: 0; font-size: .95rem; font-weight: 900; color: var(--rx-ink); }
.rx-family-count { margin: 1px 0 0; font-size: .72rem; color: var(--rx-muted); }

/* ---------- カテゴリページ：紹介文 ---------- */
.rx-genre-intro {
  margin: 16px 0; padding: 18px 20px; border-radius: 14px; background: #fff;
  border: 1px solid var(--rx-line); border-left: 4px solid var(--genre-accent, var(--rx-brand));
}
.rx-genre-intro .rx-h2 { display: flex; align-items: center; gap: 8px; }
.rx-genre-intro .rx-h2 i { color: var(--genre-accent, var(--rx-brand)); }
.rx-genre-intro p { margin: 10px 0 0; color: #334155; font-size: .9375rem; line-height: 1.9; max-width: 46em; }
.rx-genre-intro-note { padding: 10px 12px; border-radius: 8px; background: var(--rx-soft); font-size: .875rem !important; }
.rx-genre-intro-meta { font-size: .75rem !important; color: var(--rx-muted) !important; }
.rx-genre-intro-meta a { color: inherit; }

/* ---------- このページについて ---------- */
.rx-about {
  margin: 36px 0 8px; padding: 18px 20px; border-radius: 10px;
  background: var(--rx-soft); border: 1px solid var(--rx-line);
}
.rx-about p { color: #475569; font-size: .8125rem; line-height: 1.8; margin: 8px 0 0; max-width: 52em; }
.rx-about strong { color: var(--rx-ink); }

/* ---------- クリエイター：プロフィール ---------- */
.rx-profile {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 22px; margin: 12px 0 8px; border-radius: 12px;
  background: #fff; border: 1px solid var(--rx-line);
}
.rx-profile-avatar { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 50%; object-fit: cover; background: var(--rx-soft); }
.rx-profile-body { min-width: 0; flex: 1; }
.rx-profile-name { font-size: 1.375rem; font-weight: 900; color: var(--rx-ink); margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.rx-profile-summary { margin: 8px 0 0; color: #334155; font-size: .9375rem; line-height: 1.8; }
.rx-profile-growth { margin: 4px 0 0; color: #334155; font-size: .9375rem; line-height: 1.8; }
.rx-profile-summary strong, .rx-profile-growth strong { color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-profile-actions { margin-top: 14px; }

/* ---------- クリエイター：記録タイムライン ---------- */
.rx-records { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rx-line); }
.rx-record { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; padding: 12px 0 12px 16px; position: relative; }
.rx-record::before {
  content: ""; position: absolute; left: -6px; top: 18px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--genre-accent, var(--rx-brand));
}
.rx-record-week { font-size: .8rem; font-weight: 700; color: var(--rx-muted); padding-top: 3px; }
.rx-record-main { min-width: 0; }
.rx-record-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rx-record-rank {
  font-weight: 800; font-size: .8125rem; padding: 1px 8px; border-radius: 4px;
  color: var(--rx-ink); background: var(--rx-soft); border: 1px solid var(--rx-line);
}
.rx-record-rank.rx-rank-1 { color: var(--rx-gold); background: var(--rx-gold-bg); border-color: #fde68a; }
.rx-record-stats {
  display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px;
  font-size: .8rem; color: var(--rx-muted); font-variant-numeric: tabular-nums;
}
.rx-subs-bar { height: 4px; margin-top: 7px; border-radius: 2px; background: var(--rx-line); max-width: 360px; overflow: hidden; }
.rx-subs-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--genre-accent, var(--rx-brand)); }

/* ---------- クリエイター：配信傾向 ---------- */
.rx-games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }
.rx-games li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--rx-line); font-size: .875rem; color: var(--rx-ink);
}
.rx-games small { color: var(--rx-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rx-facts li { padding: 3px 10px; border-radius: 999px; background: var(--rx-soft); border: 1px solid var(--rx-line); font-size: .78rem; color: #334155; }

/* ---------- モバイル ---------- */
@media (max-width: 900px) {
  .rx-features { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rx-hero { padding: 20px 18px; }
  .rx-hero-deco { font-size: 64px; }
  .rx-hero-title { font-size: 1.4rem; }
  .rx-br-sm { display: inline; }
  .rx-hero-stats > div { min-width: 0; flex: 1 1 40%; padding: 8px 12px; }
  .rx-hero-stats dd { font-size: 1.2rem; }
  .rx-header-brand-sub { display: none; }
  .rx-winner { padding: 10px 12px; gap: 10px; }
  .rx-winner-pos { display: none; }
  .rx-profile { padding: 16px; gap: 14px; }
  .rx-profile-avatar { width: 64px; height: 64px; flex-basis: 64px; }
  .rx-profile-name { font-size: 1.2rem; }
  .rx-record { grid-template-columns: 1fr; gap: 4px; }
  }

/* ---------- 説明ページ（/records/about/）・公開終了ページ ---------- */
.rx-doc { max-width: 44em; margin: 12px 0 8px; }
.rx-doc-header { margin: 0 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--rx-line); }
.rx-doc-title { margin: 10px 0 0; font-size: 1.6rem; font-weight: 900; line-height: 1.35; color: var(--rx-ink); }
.rx-doc-section { margin: 0 0 30px; }
.rx-doc p { color: #334155; font-size: .9375rem; line-height: 1.9; margin: 10px 0 0; }
.rx-doc a { color: var(--rx-brand); text-decoration: underline; text-underline-offset: 2px; }
.rx-doc .rx-h3 { margin-top: 20px; }
.rx-doc-back { margin-top: 8px; }

.rx-compare { margin: 18px 0 6px; padding: 14px 16px; border: 1px solid var(--rx-line); border-radius: 10px; background: #fff; }
.rx-compare-row { display: grid; grid-template-columns: 8.5em 1fr 6.5em; align-items: center; gap: 10px; padding: 5px 0; }
.rx-compare-label { font-size: .8125rem; font-weight: 700; color: var(--rx-ink); }
.rx-compare-bar { height: 10px; border-radius: 5px; background: var(--rx-soft); overflow: hidden; }
.rx-compare-bar > span { display: block; height: 100%; min-width: 3px; border-radius: 5px; background: var(--rx-brand); }
.rx-compare-row + .rx-compare-row .rx-compare-bar > span { background: #94a3b8; }
.rx-compare-value { text-align: right; font-size: .8125rem; color: var(--rx-ink); font-variant-numeric: tabular-nums; }
.rx-compare figcaption { margin-top: 8px; font-size: .75rem; color: var(--rx-muted); line-height: 1.6; }
@media (max-width: 640px) {
  .rx-compare-row { grid-template-columns: 1fr auto; }
  .rx-compare-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- 部門（ライジング／ブレイクアウト／ヘッドライナー） ---------- */
.rx-division {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 999px; white-space: nowrap;
  font-size: .75rem; font-weight: 900; letter-spacing: .02em; color: #fff;
  background: #4f46e5;
}
.rx-division-sm { padding: 1px 8px; font-size: .68rem; }
.rx-division-rising    { background: linear-gradient(135deg, #f59e0b 0%, #f43f5e 100%); }
.rx-division-breakout  { background: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%); }
.rx-division-headliner { background: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #f59e0b 100%); }

.rx-hero-division { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.rx-division-rule { font-size: .78rem; font-weight: 700; color: var(--rx-muted); }
.rx-feature-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rx-feature-badges .rx-feature-badge { align-self: auto; }

.rx-division-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.rx-division-list li { display: grid; grid-template-columns: 10.5em 1fr; align-items: center; gap: 6px 12px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--rx-line); }
@media (max-width: 640px) { .rx-division-list li { grid-template-columns: 1fr; } .rx-division-list .rx-division { justify-self: start; } }
.rx-division-list .rx-division { min-width: 9.5em; justify-content: center; }
.rx-division-desc { font-size: .875rem; color: #334155; }
.rx-division-desc strong { color: var(--rx-ink); }
.rx-division-desc small { margin-left: 6px; color: var(--rx-muted); }

/* ---------- 共有ボタン ---------- */
.rx-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rx-share-x {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px; font-size: .85rem; font-weight: 800; text-decoration: none;
  color: #fff; background: #0f172a; border: 1px solid #0f172a;
}
.rx-share-x:hover { background: #1e293b; }

/* ---------- 今週の注目株（トップ） ---------- */
.rx-feature-rising-star { border-top-color: var(--genre-accent, #f59e0b); }
.rx-feature-cta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--rx-line); position: relative; z-index: 1; }
.rx-feature-cta a { font-size: .78rem; font-weight: 800; text-decoration: none; color: var(--genre-text, var(--rx-ink)); display: inline-flex; align-items: center; gap: 5px; }
.rx-feature-cta a:hover { text-decoration: underline; }
.rx-feature-cta i { color: var(--genre-accent, var(--rx-brand)); }
