/*
Theme Name: GameCrimson Child
Theme URI: https://gamecrimson.com
Description: SWELL 子テーマ — GameCrimson 独自レイアウト（YouTube 寄りフレームレス + On Fire ヒーロー枠 + ジャンルチップバー）
Author: totomaru
Author URI: https://gamecrimson.com
Template: swell
Version: 0.1.0
Text Domain: gamecrimson-child
*/

:root {
  --color-accent: #a01828;
  --color-accent-light: #d83a4a;
  --color-accent-deep: #5a1820;
  --color-flame-orange: #ffa641;
  --color-bg: #fafafa;
  --color-card: #ffffff;
  --color-text: #1a1a1a;
  --color-meta: #666666;
  --color-border: #e6e6e6;
  --color-chip-bg: #f1f1f1;
  --color-chip-active: #1a1a1a;
  --container: 1140px;
  --gap-pc: 32px;
  --gap-sp: 24px;
}

* { box-sizing: border-box; }

html { border-top: 3px solid var(--color-accent); }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Noto Sans JP", "Helvetica Neue", Helvetica, Arial,
    "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3",
    Meiryo, "メイリオ", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 599px) {
  .container { padding: 0 14px; }
}

/* === Header === */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 14px 0;
}

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  flex-shrink: 0;
}
.site-tagline {
  margin: 0;
  padding-left: 34px;
  font-size: 12px;
  font-weight: 400;
  color: #666;
  line-height: 1.4;
  letter-spacing: 0;
}
@media (max-width: 599px) {
  .site-tagline { font-size: 10.5px; line-height: 1.35; padding-left: 4px; }
}
.logo-flame {
  width: 28px;
  height: 30px;
  flex-shrink: 0;
  transform: translateY(-1px);
  filter: drop-shadow(0 2px 6px rgba(160, 24, 40, 0.35))
          drop-shadow(0 0 12px rgba(255, 100, 50, 0.22));
}
@media (max-width: 599px) {
  .site-logo { font-size: 24px; gap: 5px; }
  .logo-flame { width: 28px; height: 30px; }
}
.logo-text-wrap { color: var(--color-text); }
.logo-text-wrap .crimson {
  background: linear-gradient(90deg,
    var(--color-flame-orange) 0%,
    #ff3a4a 45%,
    var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 900;
  filter: drop-shadow(0 1px 3px rgba(160, 24, 40, 0.3));
}

.search-form {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: #fff;
}
.search-form:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(160, 24, 40, 0.08);
}
.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 18px;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--color-text);
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: #a8a8a8; }
.search-button {
  border: 0;
  background: #f7f7f7;
  padding: 0 22px;
  cursor: pointer;
  border-left: 1px solid var(--color-border);
  transition: background .15s ease;
}
.search-button:hover { background: #ececec; }
.search-button svg {
  width: 18px;
  height: 18px;
  fill: var(--color-meta);
  display: block;
}

.site-nav > ul {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
}
.site-nav a {
  font-size: 14px;
  font-weight: 600;
  transition: color .2s ease;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--color-accent); }

.nav-dropdown { position: relative; }
.nav-dropdown > a::after {
  content: "▾";
  font-size: 9px;
  margin-left: 4px;
  color: var(--color-meta);
}
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  min-width: 200px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility .15s ease;
  z-index: 60;
}
.nav-dropdown:hover .dropdown,
.nav-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; }
.dropdown li a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background .15s ease, color .15s ease;
}
.dropdown li a:hover { background: #f6f6f6; color: var(--color-accent); }

/* 検索アイコンボタン / ハンバーガー (PC では非表示、SP・タブレットで表示)
   GameSpark 風: アイコン下に「search」「menu」ラベル付き */
.search-icon-btn,
.hamburger-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  padding: 4px 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--color-text);
}
.search-icon-btn:active,
.hamburger-btn:active {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}
.search-icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.hamburger-btn .bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
  height: 22px;
}
.hamburger-btn .bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}
.hamburger-btn[aria-expanded="true"] .bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn[aria-expanded="true"] .bars span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn[aria-expanded="true"] .bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.btn-label {
  display: block;
  font-size: 10px;
  line-height: 1;
  color: var(--color-meta);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

@media (max-width: 1023px) {
  .header-inner { grid-template-columns: 1fr auto auto; gap: 8px; }
  .site-nav { display: none; }
  .search-icon-btn { display: flex; }
  .hamburger-btn { display: flex; }
  /* SP では検索フォームインラインを隠して、ボタンクリックで下部パネル展開 */
  .search-form { display: none; }
  .search-form.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    background: #fff;
    z-index: 60;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--color-border);
    overflow: visible;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }
  .search-form.is-open .search-input {
    border: 1px solid var(--color-border);
    border-radius: 999px 0 0 999px;
    padding: 12px 18px;
    font-size: 16px;
  }
  .search-form.is-open .search-button {
    border: 1px solid var(--color-border);
    border-left: 0;
    border-radius: 0 999px 999px 0;
    padding: 0 22px;
  }
  /* モバイルメニュー: 開いた時はヘッダー直下に overlay */
  .site-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 60;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-top: 1px solid var(--color-border);
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }
  .site-nav.is-open > ul {
    flex-direction: column;
    gap: 0;
    padding: 0 24px;
    align-items: stretch;
  }
  .site-nav.is-open > ul > li {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
  }
  .site-nav.is-open > ul > li:last-child {
    border-bottom: none;
  }
  .site-nav.is-open > ul > li > a {
    display: block;
    font-size: 16px;
    font-weight: 600;
  }
  /* ハード別ドロップダウンをモバイルでは常時展開 */
  .site-nav.is-open .nav-dropdown > a { pointer-events: none; }
  .site-nav.is-open .nav-dropdown > a::after { content: ""; }
  .site-nav.is-open .nav-dropdown .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 12px 0 0 16px;
    margin: 0;
    min-width: 0;
  }
  .site-nav.is-open .nav-dropdown .dropdown li a {
    padding: 8px 0;
    font-size: 14px;
    color: var(--color-meta);
    font-weight: 500;
  }
}

/* === Filter chip bar === */
.filter-bars-wrap {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 65px;
  z-index: 40;
}
.filter-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}
.filter-row::-webkit-scrollbar { display: none; }

/* PC（1024px 以上）では padding / font / gap を圧縮して全 12 項目を 1 行に収める。
   container 実効幅 = 1140 - 24*2 = 1092px に対して、最も文字数の多い「シミュレーション」「オープンワールド」(8字) でも
   font 11px * 8 + padding 7*2 + border 1*2 = 約 104px。12 chips * 92px(平均) + 11 gaps * 4px = 1148px → ギリギリ収まる。 */
@media (min-width: 1024px) {
  .filter-row {
    flex-wrap: wrap;       /* container はみ出し時の安全網。通常は 1 行に収まる */
    overflow-x: visible;
    gap: 4px;
    row-gap: 6px;
    justify-content: flex-start;
  }
  .chip {
    flex-shrink: 1;
    font-size: 11px;
    padding: 4px 8px;
    letter-spacing: 0;
  }
}

.chip {
  flex-shrink: 0;
  background: var(--color-chip-bg);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
  display: inline-block;
}
.chip:hover { background: #e3e3e3; }
.chip.active {
  background: var(--color-chip-active);
  color: #fff;
}
.chip.active:hover { background: #000; }

/* === Ad slot === */
.ad-slot {
  background: #f3f3f3;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.ad-slot::before {
  content: "AD";
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #999;
  background: rgba(255,255,255,0.85);
  padding: 1px 6px;
  border-radius: 2px;
}
.ad-slot .ad-label {
  font-size: 12px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.ad-slot .ad-size {
  font-size: 11px;
  color: #c0c0c0;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* In-grid ad (full-width row, 細バナー) */
.ad-in-grid {
  grid-column: 1 / -1;
  height: 90px;
  margin: 8px 0;
}
@media (max-width: 767px) {
  .ad-in-grid { height: 100px; }
}

/* On Fire 直後の大型広告 */
.ad-after-hero {
  height: 200px;
  margin: 28px auto 0;
}
@media (max-width: 767px) {
  .ad-after-hero { height: 280px; }
}

/* On Fire セクションはタブレットでも 3 列維持 */
.on-fire-section .card-grid {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 599px) {
  .on-fire-section .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Pre-footer ad */
.ad-pre-footer {
  margin: 0 auto 60px;
  height: 250px;
  max-width: 1232px;
}

/* 旧 ad-skyscraper（fixed 追従）は廃止、サイドバーに統合 */
.ad-skyscraper { display: none; }

@media (max-width: 1199px) {
  .pc-only { display: none !important; }
}
@media (min-width: 1200px) {
  .narrow-only { display: none !important; }
}

/* === Section title === */
.section-title-wrap {
  padding: 32px 0 18px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1;
}
.section-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-meta);
  text-transform: uppercase;
}
.filter-status {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-meta);
  font-variant-numeric: tabular-nums;
}
.filter-status .count { color: var(--color-text); font-weight: 700; }

/* === Card grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-pc) 20px;
  padding-bottom: 40px;
  min-height: 200px;
}
@media (max-width: 1199px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--gap-sp) 16px; }
}
@media (max-width: 599px) {
  .card-grid { grid-template-columns: 1fr; gap: 16px; }
  /* スマホでは最新記事リストを横長レイアウト */
  main > .container .card {
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
  }
  main > .container .card-thumb {
    flex-shrink: 0;
    width: 38%;
    border-radius: 6px;
  }
  main > .container .card-body {
    flex: 1 1 auto;
    padding: 0;
    min-width: 0;
  }
  main > .container .card-title {
    font-size: 14px;
    margin-bottom: 6px;
    -webkit-line-clamp: 3;
  }
  main > .container .card-meta {
    font-size: 11px;
    gap: 4px 6px;
  }
  main > .container .meta-cat {
    font-size: 10px;
    padding: 2px 6px;
  }
  main > .container .meta-date {
    margin-left: 0;
    width: 100%;
    margin-top: 2px;
  }
}

.card {
  background: transparent;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  transition: opacity .2s ease;
}
.card.hidden { display: none !important; }

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #d8d8d8;
  overflow: hidden;
  border-radius: 8px;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.card:hover .card-thumb img { transform: scale(1.02); }

/* ファン声件数バッジ: 炎の中に数字を内包するデザイン
   _gc_voice_count meta から描画、コメント数誤認を避けるため炎シェイプそのものを
   バッジ形状にして、ブランド固有の視覚シグナルとする。MAX 99+ 表示、0 件は非表示。 */
.card-voice-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 35px;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(160, 24, 40, 0.5))
          drop-shadow(0 0 6px rgba(255, 120, 50, 0.22));
}
.card-voice-badge .badge-flame {
  width: 100%;
  height: 100%;
  display: block;
}
.card-voice-badge .voice-num {
  position: absolute;
  top: 64%;
  left: 53%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.55),
               0 0 3px rgba(160, 24, 40, 0.5);
  font-feature-settings: "tnum";
}
@media (max-width: 599px) {
  .card-voice-badge {
    width: 28px;
    height: 31px;
    top: 5px;
    right: 5px;
  }
  .card-voice-badge .voice-num { font-size: 10px; }
}

/* On Fire セクション専用: ファン声が多い記事なのでバッジを大型化 */
.card-voice-badge--fire {
  width: 56px;
  height: 62px;
  top: 10px;
  right: 10px;
  filter: drop-shadow(0 3px 8px rgba(160, 24, 40, 0.55))
          drop-shadow(0 0 14px rgba(255, 120, 50, 0.35));
}
.card-voice-badge--fire .voice-num {
  font-size: 19px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6),
               0 0 6px rgba(160, 24, 40, 0.5);
}
@media (max-width: 599px) {
  .card-voice-badge--fire {
    width: 46px;
    height: 51px;
    top: 8px;
    right: 8px;
  }
  .card-voice-badge--fire .voice-num { font-size: 16px; }
}

/* 単一記事ページ: <section class="article-voices"> 内 h2 に inline で
   ファン声バッジを統合 (案 A)。pill 背景なし、小型炎+数字のみ。
   見出しテキスト右側に寄り添う配置で、独立要素感を解消。 */
.article-voices > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.article-voices-heading-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.article-voices-heading-badge .badge-flame-wrap {
  position: relative;
  width: 30px;
  height: 33px;
  display: inline-block;
  filter: drop-shadow(0 1px 3px rgba(160, 24, 40, 0.45))
          drop-shadow(0 0 6px rgba(255, 120, 50, 0.2));
}
.article-voices-heading-badge .badge-flame {
  width: 100%;
  height: 100%;
  display: block;
}
.article-voices-heading-badge .voice-num {
  position: absolute;
  top: 64%;
  left: 53%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.55),
               0 0 3px rgba(160, 24, 40, 0.5);
  font-feature-settings: "tnum";
}
@media (max-width: 599px) {
  .article-voices-heading-badge .badge-flame-wrap { width: 26px; height: 29px; }
  .article-voices-heading-badge .voice-num { font-size: 10px; }
}

/* アイキャッチが無い場合のフォールバック表示 */
.card-thumb.no-thumb::after {
  content: "GameCrimson";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a0d12 0%, #5a1820 100%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.card-body {
  padding: 12px 4px 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.card-meta {
  font-size: 12px;
  color: var(--color-meta);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
}
.meta-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  padding: 2px 8px;
  border-radius: 2px;
  line-height: 1.5;
}
.meta-cat.news    { background: var(--color-accent); }
.meta-cat.review  { background: var(--color-accent); }
/* ゲームタイトル pill（黒系で紅メインから差別化） */
.meta-title {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: #1a1a1a;
  padding: 2px 8px;
  border-radius: 2px;
  line-height: 1.5;
  white-space: nowrap;
}
a.meta-title { transition: opacity .15s ease; }
a.meta-title:hover { opacity: 0.8; }

/* meta-phase: ニュースライフサイクル pill (記事タイトル直上) */
.meta-phase {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 2px 8px;
  border-radius: 2px;
  line-height: 1.5;
  white-space: nowrap;
  background: #555;
}
a.meta-phase { transition: opacity .15s ease; text-decoration: none; }
a.meta-phase:hover { opacity: 0.8; }
.meta-phase-reveal      { background: #7c4dff; }  /* 発表: 紫 */
.meta-phase-promo       { background: #1976d2; }  /* プロモーション: 青 */
.meta-phase-launch      { background: #d32f2f; }  /* 発売直後: 赤 */
.meta-phase-established { background: #388e3c; }  /* 評価定着: 緑 */
.meta-phase-revival     { background: #f57c00; }  /* 再活性: 橙 */

.meta-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--color-accent-deep);
  padding: 2px 8px;
  border-radius: 2px;
  line-height: 1.5;
}
.meta-date {
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--color-meta);
  font-size: 14px;
}
.empty-msg.hidden { display: none; }

/* === On Fire section === */
.on-fire-section {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(160, 24, 40, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(216, 58, 74, 0.18) 0%, transparent 60%),
    #1c0810;
  padding: 36px 0 28px;
  margin-bottom: 8px;
  color: #fff;
}
.on-fire-section .section-title-wrap {
  padding: 0 0 22px;
}
.on-fire-section .card-grid {
  padding-bottom: 0;
  min-height: 0;
}
.on-fire-title {
  background: linear-gradient(90deg, #ffd97d 0%, #ff9c2e 45%, #ff5a1a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.on-fire-section .card { color: #fff; }
.on-fire-section .card-title { color: #fff; }
.on-fire-section .card-thumb {
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}
.on-fire-section .card-meta {
  color: rgba(255, 255, 255, 0.55);
}
.on-fire-section .meta-tag {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}
.on-fire-section .card:hover .card-thumb {
  outline-color: rgba(255, 154, 60, 0.5);
}
.thumb-flame {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 32px;
  z-index: 2;
  filter:
    drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 6px rgba(255, 130, 50, 0.45));
  pointer-events: none;
}

/* === Pagination === */
.pagination-wrap {
  padding: 32px 0 48px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  border-radius: 4px;
  transition: background .15s ease, color .15s ease;
}
.pagination a:hover {
  background: #f1f1f1;
  color: var(--color-accent);
}
.pagination .current {
  background: var(--color-accent);
  color: #fff;
}
.pagination .dots {
  color: var(--color-meta);
  cursor: default;
}
.pagination .nav-prev,
.pagination .nav-next {
  color: var(--color-meta);
  font-weight: 500;
}

/* WP の paginate_links() 出力に合わせるための調整 */
.pagination .page-numbers.dots,
.pagination .page-numbers.current,
.pagination .page-numbers {
  /* paginate_links() は span/a に page-numbers クラスを付ける */
}
.pagination .page-numbers.current {
  background: var(--color-accent);
  color: #fff;
}
.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  color: var(--color-meta);
  font-weight: 500;
}

/* === Single article (記事ページ 2 カラム: メインカラム + サイドバー) === */
.single-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  max-width: var(--container);
  margin: 32px auto;
  padding: 0 24px;
}
@media (max-width: 1099px) {
  .single-page-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
@media (max-width: 767px) {
  .single-page-layout {
    padding: 0;
    margin: 0;
    gap: 0;
    max-width: 100%;
  }
}

.single-article {
  background: #fff;
  margin: 0;
  padding: 40px 36px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  min-width: 0; /* grid 内 overflow 防止 */
}
@media (max-width: 767px) {
  .single-article { padding: 20px 14px; margin: 0; border-radius: 0; box-shadow: none; }
}

/* サイドバー */
.single-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sidebar-block {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sidebar-block .block-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-meta);
  text-transform: uppercase;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

/* 人気記事リスト */
.sidebar-block.popular-posts ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: popular;
}
.sidebar-block.popular-posts li {
  counter-increment: popular;
  position: relative;
  padding: 10px 0 10px 32px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  line-height: 1.55;
}
.sidebar-block.popular-posts li:last-child { border-bottom: none; }
.sidebar-block.popular-posts li::before {
  content: counter(popular);
  position: absolute;
  left: 0;
  top: 10px;
  width: 22px;
  height: 22px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sidebar-block.popular-posts a {
  color: var(--color-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color .15s ease;
}
.sidebar-block.popular-posts a:hover { color: var(--color-accent); }

/* ジャンルクラウド */
.sidebar-block.genre-cloud .genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sidebar-block.genre-cloud .genre-list a {
  display: inline-block;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  background: #f3f3f3;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.sidebar-block.genre-cloud .genre-list a:hover {
  background: var(--color-accent);
  color: #fff;
}

/* サイドバー内の広告ブロック（300×250 固定） */
.sidebar-block.ad-block {
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.sidebar-block.ad-block .ad-slot {
  height: 250px;
  width: 300px;
  margin: 0 auto;
}
/* スマホ表示はコンテナ詰め（重複定義の上書き、上の @media 767px と統一） */
@media (max-width: 767px) {
  .single-article { padding: 20px 14px; margin: 0; border-radius: 0; box-shadow: none; }
  /* SWELL 親コンテナの左右 padding を個別投稿ページのみで削除 */
  body.single .l-mainContent,
  body.single .l-mainContent__inner,
  body.single .l-content,
  body.single .p-mainContents,
  body.single main.l-content > .l-mainContent {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.single .l-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }
}
.single-article .article-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}
.single-article .article-meta {
  font-size: 12px;
  color: var(--color-meta);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.single-article .article-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0;
}
@media (max-width: 767px) {
  .single-article .article-title { font-size: 22px; }
}

/* 副題（excerpt、IGN Japan 風） */
.single-article .article-subtitle {
  margin: 14px 0 0;
  padding: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.65;
  color: #555;
}
@media (max-width: 767px) {
  .single-article .article-subtitle { font-size: 15px; }
}
.single-article .article-thumb {
  margin: 0 0 28px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #d8d8d8;
}
.single-article .article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.single-article .article-body {
  font-size: 17px;
  line-height: 1.85;
}
.single-article .article-body p { margin: 0 0 1.4em; }
/* 見出し装飾（ファミ通スタイル: 全幅の薄グレー細線 + 左端のみ短い紅帯）*/
.single-article .article-body h2 {
  position: relative;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.45;
  margin: 2.6em 0 1.1em;
  padding: 0 0 14px;
  border-bottom: 1px solid #d8d8d8;
}
.single-article .article-body h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
}
.single-article .article-body h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  margin: 1.8em 0 0.6em;
  padding-left: 14px;
  border-left: 3px solid var(--color-accent);
}
.single-article .article-body a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.single-article .article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1em 0;
}
.single-article .article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.single-article .article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* === Article body components (v5 template) === */

/* deck（リード文、紅帯付きのボックス） */
.single-article .article-body .article-deck {
  margin: 0 0 32px;
  padding: 18px 22px;
  background: #fdf6f7;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 4px 4px 0;
}
.single-article .article-body .article-deck p {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 500;
  color: #2a1a1c;
}

/* summary（要点リスト、素朴な区切り + 中点は Crimson 炎アイコン） */
.single-article .article-body .article-summary {
  margin: 32px 0;
}
.single-article .article-body .article-summary ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.single-article .article-body .article-summary li {
  position: relative;
  padding: 10px 0 10px 30px;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  line-height: 1.75;
}
.single-article .article-body .article-summary li:last-child {
  border-bottom: none;
}
/* summary 末尾の公式アナウンスリンク（メディア寄り、テキスト主体） */
.single-article .article-body .article-summary .summary-source {
  margin: 20px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-meta);
  line-height: 1.55;
  font-weight: 500;
}
.single-article .article-body .article-summary .summary-source a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 1px;
  transition: opacity 0.15s ease;
}
.single-article .article-body .article-summary .summary-source a:hover {
  opacity: 0.6;
}
/* 中点 = ロゴと同じ SVG 炎、CSS mask で紅色制御 */
.single-article .article-body .article-summary li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 16px;
  height: 18px;
  background-color: var(--color-accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36'><path d='M16 1.5 C 13 5, 10.5 8, 10 12 C 9 11, 7.5 10, 6 9 C 7 12, 5.5 14.5, 4.5 17 C 3.5 20, 4 24, 6 27 C 8.5 31, 13 34, 16 34 C 19 34, 23.5 31, 26 27 C 28 24, 28.5 20, 27.5 17 C 26.5 14.5, 25 12, 26 9 C 24.5 10, 23 11, 22 12 C 21.5 8, 19 5, 16 1.5 Z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 36'><path d='M16 1.5 C 13 5, 10.5 8, 10 12 C 9 11, 7.5 10, 6 9 C 7 12, 5.5 14.5, 4.5 17 C 3.5 20, 4 24, 6 27 C 8.5 31, 13 34, 16 34 C 19 34, 23.5 31, 26 27 C 28 24, 28.5 20, 27.5 17 C 26.5 14.5, 25 12, 26 9 C 24.5 10, 23 11, 22 12 C 21.5 8, 19 5, 16 1.5 Z'/></svg>") no-repeat center / contain;
}

/* article-video（トレーラー、article-summary の直下）
   サムネ画像 + クリックで YouTube に遷移する形式をデフォルトとする。
   理由: iframe 埋め込みは年齢制限動画（バイオ、CoD 等の M/18+ コンテンツ）で再生不可、
   サムネ+リンク方式なら全パターンに対応 + ページ速度も改善 + AdSense 親和性も高い。
   iframe 形式が必要な場合（既存記事の後方互換）も同じ枠で表示できるよう iframe ルールも残す。 */
.single-article .article-body .article-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 32px 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.single-article .article-body .article-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.single-article .article-body .article-video a {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
}
.single-article .article-body .article-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.single-article .article-body .article-video a:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}
.single-article .article-body .article-video .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  pointer-events: none;
  transition: background 0.2s ease;
}
.single-article .article-body .article-video a:hover .play-icon {
  background: rgba(204, 0, 0, 0.85);
}

/* ボイスカードの src ピルは出さない（記事末尾の article-source で集約） */
.single-article .article-body .voice .src { display: none !important; }

/* voices（sentiment ブロック単位の大カード方式）
   構造:
     <section class="article-voices">
       <h2>ファンの声</h2>
       <div class="sentiment-block sentiment-pos">
         <h3 class="sentiment-label">ポジティブ</h3>
         <div class="voice">...</div>
         <div class="voice">...</div>
       </div>
       <div class="sentiment-block sentiment-neu">...</div>
       <div class="sentiment-block sentiment-neg">...</div>
     </section>
*/
.single-article .article-body .article-voices {
  margin: 32px 0;
}
.single-article .article-body .article-voices .sentiment-block {
  position: relative;
  margin: 0 0 16px;
  padding: 18px 22px;
  border-radius: 6px;
  background: #fff;
}
/* 左ボーダーは廃止、緑・灰・赤の信号色を Crimson と調和する彩度で（B: セージ系） */
.single-article .article-body .article-voices .sentiment-pos { background: #eef6eb; } /* 薄ペールミント */
.single-article .article-body .article-voices .sentiment-neu { background: #f1f1f1; } /* 薄グレー */
.single-article .article-body .article-voices .sentiment-neg { background: #fbeef0; } /* 薄ペールピンク（ユーザー画像基準） */

/* sentiment-label は廃止（クレームリスク回避）。CSS は残骸として無効化 */
.single-article .article-body .article-voices .sentiment-label {
  display: none;
}

/* voice（個別コメント、sentiment ブロック内） */
.single-article .article-body .article-voices .voice {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 4px 14px;
  padding: 14px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}
.single-article .article-body .article-voices .voice:first-of-type {
  border-top: none;
  padding-top: 4px;
}
.single-article .article-body .article-voices .voice .ja {
  margin: 0;
  grid-column: 1;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
}
.single-article .article-body .article-voices .voice .orig {
  margin: 2px 0 0;
  grid-column: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-meta);
  font-style: italic;
}

/* src ピル（ソース表記、目立たない地味な小ボタン） */
.single-article .article-body .article-voices .voice .src {
  grid-column: 2;
  align-self: start;
  display: inline-block;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-meta);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  white-space: nowrap;
  margin-top: 4px;
  line-height: 1.65;
}
/* 各ソースの独自色は廃止、すべて統一表記 */

@media (max-width: 599px) {
  .single-article .article-body .article-voices .voice {
    grid-template-columns: 1fr;
  }
  .single-article .article-body .article-voices .voice .src {
    grid-column: 1;
    justify-self: start;
    margin-top: 8px;
  }
}

/* voice トグル: 既定 20 件表示、ボタンクリックで残り全表示 (game-write-article §6.3-bis)
 * 拡張 voice はボタンの下に .voice-extension ブロックとして配置されている。
 * ボタンクリックで .article-voices.is-expanded を付け、CSS で .voice-extension を表示する。
 * トグル不可 (再格納はしない、ボタンは消える)。
 *
 * 旧 .voice-hidden 方式 (sentiment-block 内に隠していた) は廃止。理由:
 *   ボタンより上に隠しコンテンツがあると、展開時に scroll-anchoring が効いて
 *   ユーザーの視点が closing/footer 側に取り残される事故があった (2026-05-27)。
 *   ボタンの下に extension ブロックを置けば、追加コンテンツは下方向に出るだけなので
 *   視点が自然に維持される。
 */
.single-article .article-body .article-voices .sentiment-block.voice-extension {
  display: none;
}
.single-article .article-body .article-voices.is-expanded .sentiment-block.voice-extension {
  /* 通常の sentiment-block と同じ block 表示に戻す */
  display: block;
}

.single-article .article-body .voice-toggle {
  display: block;
  width: 100%;
  margin: 16px 0 8px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  text-align: center;
}
.single-article .article-body .voice-toggle:hover {
  background: #f7f4ef;
  border-color: var(--color-text);
}
.single-article .article-body .voice-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
@media (max-width: 599px) {
  .single-article .article-body .voice-toggle {
    font-size: 13px;
    padding: 11px 14px;
  }
}

/* closing（編集者の総括） */
.single-article .article-body .article-closing {
  margin: 36px 0 24px;
}
.single-article .article-body .article-closing p {
  font-size: 15.5px;
  line-height: 1.85;
  margin: 0 0 1.2em;
}

/* source（情報源、地味に控えめ表示） */
.single-article .article-body .article-source {
  margin: 32px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--color-border);
  background: transparent;
  font-size: 11.5px;
  color: var(--color-meta);
  line-height: 1.55;
}
.single-article .article-body .article-source p { margin: 0; }

/* SWELL 親の自動目次を非表示（子テーマ独自 TOC を使うため） */
.single-article .p-toc { display: none !important; }

/* 独自目次（記事本文先頭に挿入される） */
.single-article .article-toc {
  margin: 0 0 32px;
  padding: 18px 24px;
  background: #faf7f0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.single-article .article-toc .toc-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-meta);
  text-transform: uppercase;
  margin: 0 0 10px;
}
.single-article .article-toc ol {
  margin: 0;
  padding: 0 0 0 22px;
  font-size: 14px;
  line-height: 1.85;
}
.single-article .article-toc ol li {
  color: var(--color-text);
}
.single-article .article-toc ol li::marker {
  color: var(--color-accent);
  font-weight: 700;
}
.single-article .article-toc a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.single-article .article-toc a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* article 内広告枠 */
.single-article .ad-in-article-top,
.single-article .ad-in-article-mid,
.single-article .ad-in-article-bottom {
  height: 200px;
  margin: 24px auto;
}
@media (max-width: 767px) {
  .single-article .ad-in-article-top,
  .single-article .ad-in-article-mid,
  .single-article .ad-in-article-bottom {
    height: 250px;
  }
}

/* === Footer === */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: 36px 0;
  font-size: 13px;
  color: var(--color-meta);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-nav ul {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a:hover { color: var(--color-accent); }
