/*
  ja-font-weights.css
  日本語ページ（html[lang="ja"]）向け：フォントウェイトを抑えて漢字のつぶれを軽減。
  Sawarabi Gothic は 400 のみのため、600/700/800 は synthetic bold になりやすい。
  読み込みは全ページで行い、lang="ja" のときのみ適用。最終読み込みで他CSSを上書き。
*/

/* 日本語時は全体でスムージングを有効に */
html[lang="ja"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === 見出し・カードタイトル（800/900 → 500、つぶれ防止・強調しすぎない） === */
html[lang="ja"] .card-block__title,
html[lang="ja"] .ai-comment-header,
html[lang="ja"] .index-recent-card-heading {
  font-weight: 500;
}

html[lang="ja"] .index-season-card__year {
  font-weight: 600;
}

html[lang="ja"] .container-header,
html[lang="ja"] .page-title,
html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3 {
  font-weight: 600;
}

/* 試合詳細のページタイトルは他ページの見出しに合わせ細めに */
html[lang="ja"] body[data-page="match"] .page-title,
html[lang="ja"] body[data-page="match"] h1.page-title {
  font-weight: 500;
}

/* 関連選手見出し・関連選手名・主な比較ポイント見出し・モーダルタイトル：500でつぶれ防止 */
html[lang="ja"] .related-heading,
html[lang="ja"] .related-card .name,
html[lang="ja"] .advantage-summary__title,
html[lang="ja"] .modal__title {
  font-weight: 500;
}

/* ラベル・AI見出し（監督、主なフォーメーション、試合の監督）：500でつぶれ防止 */
html[lang="ja"] .stat-label,
html[lang="ja"] .ai-comment-title,
html[lang="ja"] .lineup-coach__label {
  font-weight: 500;
}

/* カード内セクション見出し（元600→500でさらに軽く） */
html[lang="ja"] .section-title,
html[lang="ja"] .chart-title {
  font-weight: 500;
}

/* 静的ページ（ガイド・プライバシー・about等）のh1・h2見出し：強調を外してつぶれ防止 */
html[lang="ja"] body.static-page h1,
html[lang="ja"] body.static-page .container-section h2 {
  font-weight: 500;
}

/* サイトマップのリンク見出し（h3）：フォントサイズは static-pages.css で統一、強調なし */
html[lang="ja"] body.static-page .sitemap-item h3,
html[lang="ja"] body.static-page .sitemap-item h3 a {
  font-weight: 400;
}

/* オーバービューカード内（勝敗詳細・得失点差・無失点試合）：強調を抑えてつぶれ防止 */
html[lang="ja"] .overview-card .overview-card__title,
html[lang="ja"] .overview-card .overview-card__total,
html[lang="ja"] .overview-card .overview-card__diff,
html[lang="ja"] .overview-card .overview-card__summary,
html[lang="ja"] .overview-card .overview-card__split,
html[lang="ja"] .overview-card .overview-card__pct,
html[lang="ja"] .overview-card .stat-win,
html[lang="ja"] .overview-card .stat-loss,
html[lang="ja"] .overview-card .stat-goals-for,
html[lang="ja"] .overview-card .stat-goals-against,
html[lang="ja"] .overview-card .stat-diff {
  font-weight: 500;
}

/* === 数値・ラベル・ボタン（700/800/900 → 600、オーバービュー外） === */
html[lang="ja"] .stat-diff,
html[lang="ja"] .stat-win,
html[lang="ja"] .stat-loss,
html[lang="ja"] .stat-goals-for,
html[lang="ja"] .stat-goals-against,
html[lang="ja"] .form-chip,
html[lang="ja"] .page-header .season-label,
html[lang="ja"] .page-header .rank {
  font-weight: 600;
}

html[lang="ja"] .overview-card__value {
  font-weight: 600;
}

/* === ボタン・フォーム（続きを表示、選手一覧/試合一覧、選手変更等）：500でつぶれ防止 === */
html[lang="ja"] .btn,
html[lang="ja"] .common-button,
html[lang="ja"] button,
html[lang="ja"] .index-top-form button,
html[lang="ja"] .index-top-form label,
html[lang="ja"] .collapsible-card__toggle,
html[lang="ja"] .collapsible-card__label,
html[lang="ja"] .glass-tab,
html[lang="ja"] .error-button {
  font-weight: 500;
}

/* compareのプルダウン選択肢表示（未選択・選手名等）・フォームselect内テキスト */
html[lang="ja"] .compare-selection-value,
html[lang="ja"] .compare-selection-item,
html[lang="ja"] select,
html[lang="ja"] .compare-filter select,
html[lang="ja"] .form-control {
  font-weight: 500;
}

/* === 静的ページ・ヒーロー（静的ページのh1は上で500に統一） === */
html[lang="ja"] .hero-title {
  font-weight: 600;
}

/* === エラー表示（読み込みエラー文言等） === */
html[lang="ja"] .data-error,
html[lang="ja"] .error-title,
html[lang="ja"] .error-message,
html[lang="ja"] .ai-comment-error,
html[lang="ja"] .ai-comment-placeholder {
  font-weight: 500;
}

/* === 本文中の strong / b（プロフィールラベルは500でつぶれ防止） === */
html[lang="ja"] strong,
html[lang="ja"] b {
  font-weight: 600;
}

html[lang="ja"] .player-info-details strong {
  font-weight: 500;
}

/* === ヘッダー === */
html[lang="ja"] .header-title,
html[lang="ja"] .nav-link,
html[lang="ja"] .header-dropdown__label,
html[lang="ja"] .header-dropdown__item--current {
  font-weight: 600;
}

/* === テーブル（ヘッダー・強調セル）：日本語は500で他見出しと統一 === */
html[lang="ja"] th,
html[lang="ja"] .summary-table .goal-difference,
html[lang="ja"] .team-summary-row__label,
html[lang="ja"] .halftime-winrate-row__label,
html[lang="ja"] .halftime-winrate-header__item,
html[lang="ja"] .standings-table th,
html[lang="ja"] .table-header-cell,
html[lang="ja"] #standings-container .col-compact:last-child,
html[lang="ja"] .table-scroll-wrapper .match-table thead th,
html[lang="ja"] .table-scroll-wrapper .sticky-match-table thead th {
  font-weight: 500;
}

/* === UI・フィルター・比較（compareのラベル等は500でつぶれ防止） === */
html[lang="ja"] .filter-title,
html[lang="ja"] .compare-filter .filter-title,
html[lang="ja"] .page-subtitle,
html[lang="ja"] .compare-metric-value,
html[lang="ja"] .compare-metric-label,
html[lang="ja"] .compare-position__value,
html[lang="ja"] .is-better,
html[lang="ja"] .advantage-summary__item {
  font-weight: 500;
}

/* === 試合・選手・スタッツ（ランキング見出し・選手名・スタッツ詳細見出し・経歴リンクは500で統一） === */
html[lang="ja"] .match-score-value,
html[lang="ja"] .score-period-value,
html[lang="ja"] .formation-card__team,
html[lang="ja"] .lineup-section-title,
html[lang="ja"] .match-lineup-cell--number,
html[lang="ja"] .match-info-list__value,
html[lang="ja"] .event-player-name,
html[lang="ja"] .match-stat-value,
html[lang="ja"] .player-header-grid .page-title {
  font-weight: 600;
}

html[lang="ja"] .player-stats-ranking-cell--player,
html[lang="ja"] .player-stats-ranking-header,
html[lang="ja"] .player-stats-detail th,
html[lang="ja"] .player-stats-detail-header__item,
html[lang="ja"] .career-club-link {
  font-weight: 500;
}

/* === チームサマリー・ハーフタイム勝率 === */
html[lang="ja"] .team-summary-row__value,
html[lang="ja"] .halftime-winrate-row__value {
  font-weight: 600;
}

/* スムージングをあてたい要素（各セレクタは1回のみ） */
html[lang="ja"] .card-block__title,
html[lang="ja"] .index-recent-card-heading,
html[lang="ja"] .section-title,
html[lang="ja"] .chart-title,
html[lang="ja"] .container-header,
html[lang="ja"] .ai-comment-title,
html[lang="ja"] .ai-comment-header,
html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3,
html[lang="ja"] .stat-label,
html[lang="ja"] .collapsible-card__label,
html[lang="ja"] .compare-selection-value {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
