:root {
  --bg: #ebebeb;
  --surface: #ffffff;
  --surface2: #f4f4f4;
  --accent: #e7000e;
  --accent2: #ff6a00;
  --text: #1a1a1a;
  --muted: #777;
  --border: #e2e2e2;
  --font-display: 'Black Han Sans', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ヘッダー */
header {
  background: #1a1a1a;
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 20px;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -1px;
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}
.logo span { color: var(--accent); }

.source-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* メインレイアウト */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

/* 速報バー */
.breaking-bar {
  grid-column: 1 / -1;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.breaking-label {
  font-weight: 900;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
}
.breaking-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* フィード見出し */
.feed-heading {
  font-family: var(--font-display);
  font-size: 20px;
  border-left: 6px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 16px;
}

/* 俺的ゲーム速報風 カードフィード */
.feed { display: flex; flex-direction: column; gap: 14px; }
.feed-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s, transform 0.15s;
}
.feed-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.12); transform: translateY(-2px); }
.fc-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface2);
}
.fc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a2a2a, #444);
}
.fc-noimg span { color: #fff; font-weight: 700; font-size: 15px; opacity: 0.9; }
.fc-noimg.ign   { background: linear-gradient(135deg, #d4001a, #7a0010); }
.fc-noimg.spark { background: linear-gradient(135deg, #0062cc, #00337a); }
.fc-noimg.fami  { background: linear-gradient(135deg, #c8860a, #7a5200); }
.fc-noimg.gamer { background: linear-gradient(135deg, #1a7a3a, #0d3d1d); }
.fc-body { padding: 14px 16px 14px 0; display: flex; flex-direction: column; gap: 8px; }
.fc-meta { display: flex; align-items: center; gap: 10px; }
.fc-time { font-size: 11px; color: var(--muted); }
.fc-edited { font-size: 10px; font-weight: 700; color: #fff; background: var(--accent2); padding: 2px 7px; border-radius: 3px; }
.fc-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  color: var(--text);
}
.feed-card:hover .fc-title { color: var(--accent); }
.fc-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 記事グリッド */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.news-item {
  background: var(--surface);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 14px;
  align-items: start;
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}
.news-item:hover { background: var(--surface2); }

.news-source-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.5px;
  margin-top: 3px;
}
.news-source-badge.ign    { background: #d4001a; }
.news-source-badge.spark  { background: #0062cc; }
.news-source-badge.fami   { background: #c8860a; }
.news-source-badge.gamer  { background: #1a7a3a; }

.news-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.news-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 3px;
}

/* サイドバー */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.widget {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}
.widget-title {
  background: var(--surface2);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.widget-body { padding: 12px 16px; }

.side-item {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  transition: color 0.12s;
}
.side-item:last-child { border-bottom: none; }
.side-item:hover { color: var(--accent); }

/* ローディング */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.loading::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 16px auto 0;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* フッター */
footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer a { color: var(--muted); }
.footer-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-links a { color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--accent); }

/* 検索ボックス */
.search-box {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  flex: 1;
  max-width: 320px;
}
.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  font-family: var(--font-body);
}
.search-box button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}
.search-box.search-page { max-width: 100%; margin-bottom: 24px; }

/* グローバルメニューバー（俺的ゲーム速報風・全幅） */
.gnav-bar {
  background: #2a2a2a;
  border-bottom: 1px solid #000;
  position: sticky;
  top: 56px;
  z-index: 90;
}
.gnav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gnav::-webkit-scrollbar { display: none; }
.gnav a {
  color: #ddd;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 16px;
  white-space: nowrap;
  border-right: 1px solid #3d3d3d;
  transition: background 0.12s, color 0.12s;
}
.gnav a:first-child { border-left: 1px solid #3d3d3d; }
.gnav a:hover { background: #3d3d3d; color: #fff; }
.gnav a.active { background: var(--accent); color: #fff; }

/* ジャンルナビ */
.genre-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.genre-nav a {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.genre-nav a:hover, .genre-nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ページ見出し */
.page-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 8px 0 6px;
}
.page-lead { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.other-genres { margin-top: 36px; }
.ad-unit { margin: 20px 0; }

/* タグカード */
.tag-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.tag-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tag-card:hover { border-color: var(--accent); }
.tag-card-name { font-weight: 700; color: var(--text); }
.tag-card-count { font-size: 12px; color: var(--muted); }

/* ランキング */
.ranking-list { list-style: none; }
.ranking-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.ranking-num {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--accent);
  min-width: 36px;
  text-align: center;
}
.ranking-item:nth-child(1) .ranking-num,
.ranking-item:nth-child(2) .ranking-num,
.ranking-item:nth-child(3) .ranking-num { color: var(--accent2); }
.ranking-body { display: flex; flex-direction: column; gap: 4px; }
.ranking-name { font-weight: 700; color: var(--text); font-size: 16px; }
.ranking-count { font-size: 12px; color: var(--muted); font-weight: 400; }
.ranking-top { font-size: 13px; color: var(--muted); }
.ranking-top:hover { color: var(--accent); }

/* コラム */
.column-cards { display: grid; gap: 14px; }
.column-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.column-card:hover { border-color: var(--accent); }
.column-card-title { font-weight: 700; color: var(--text); font-size: 16px; }
.column-card-desc { font-size: 13px; color: var(--muted); }
.column { max-width: 820px; }
.column-body { margin: 10px 0 30px; }
.column-body h2 {
  font-size: 19px;
  margin: 28px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.column-body p { color: var(--text); line-height: 1.9; margin-bottom: 14px; font-size: 15px; }

/* 記事詳細 */
.article-detail { max-width: 820px; }
.article-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.article-date { font-size: 12px; color: var(--muted); }
.article-headline {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.article-hero { margin: 16px 0; border-radius: 8px; overflow: hidden; }
.article-hero img { width: 100%; height: auto; display: block; }
.article-lead { color: var(--text); line-height: 1.9; margin: 16px 0; font-size: 15px; }
.article-body { margin: 16px 0; color: var(--text); line-height: 1.95; font-size: 15px; }
.article-body p { margin-bottom: 16px; }
.article-body h2 { font-size: 19px; margin: 26px 0 10px; padding-left: 12px; border-left: 4px solid var(--accent); }
.article-body h3 { font-size: 16px; margin: 20px 0 8px; }
.article-body ul, .article-body ol { margin: 0 0 16px 1.4em; }
.article-body li { margin-bottom: 6px; }
.article-source-note { font-size: 12px; color: var(--muted); margin: 18px 0; }
.article-source-note a { color: var(--accent); }
.article-quote {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 18px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.article-quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 12px; }
.article-quote cite a { color: var(--accent); }
.article-tags { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.article-tags-label { font-size: 13px; color: var(--muted); }
.tag-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.article-source-cta { margin: 28px 0; text-align: center; }
.source-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
}
.source-btn:hover { background: var(--accent2); }

/* レスポンシブ */
@media (max-width: 768px) {
  .container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .source-filter { display: none; }
  .news-item { grid-template-columns: auto 1fr; }
  .news-time { display: none; }
  .genre-nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .search-box { max-width: 100%; }
  .feed-card { grid-template-columns: 130px 1fr; }
  .fc-body { padding: 12px 12px 12px 0; }
  .fc-title { font-size: 15px; }
  .fc-excerpt { display: none; }
}
