/* =============================================
   AI Navigator - スタイルシート v2
   3パネルレイアウト（サイドバー + 3カラムグリッド）
   ============================================= */

:root {
  /* ===== The Markup 配色移植（Navy基調ダーク + Pinkアクセント） =====
     公式デザインシステム https://design.themarkup.org/
     Navy #242a49 / Pink #ff335f / Light Pink #fbd7de / Light Blue #e6f3ff */
  --bg-primary: #161a30;       /* 最暗背景: Navy #242a49 を沈めた濃紺 */
  --bg-surface: #1e2440;       /* ヘッダー・サーフェス */
  --bg-card: #242a49;          /* カード = 公式Navy */
  --bg-card-hover: #2d3454;    /* カードhover: Navyを少し持ち上げ */
  --bg-sidebar: #161a30;       /* サイドバー = 最暗背景に揃える */
  --accent: #ff335f;           /* アクセント = 公式Pink */
  --accent-hover: #ff6680;     /* hover: Pinkを明るく */
  --accent-subtle: rgba(255, 51, 95, 0.08);
  --pick-must: #ff335f;        /* PICK必読 = Pink（アクセントと統一） */
  --pick-must-bg: rgba(255, 51, 95, 0.10);
  --pick-check: #f0b36c;       /* PICK確認 = 公式Orange（Pinkと調和） */
  --pick-check-bg: rgba(240, 179, 108, 0.10);
  --text-primary: #f3f2f1;     /* 本文 = 公式Light Tan（Navy背景に映える） */
  --text-secondary: #a9b0cf;   /* 副次テキスト: Navy寄りのライトグレー */
  --text-muted: #6b7299;       /* ミュート: Navy寄りのミッドグレー */
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.14);
  --border-accent: rgba(255, 51, 95, 0.35);
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 58px;
  --sidebar-w: 220px;
}

* { box-sizing: border-box; margin: 0; padding: 0; list-style: none; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(22,26,48,0.06) 0%, rgba(22,26,48,0.30) 60%, rgba(22,26,48,0.60) 100%),
    url("assets/site-bg.webp") center 62% / cover no-repeat,
    var(--bg-primary);
  pointer-events: none;
}

/* =============================================
   ヘッダー: ロゴ | タブ | 検索
   ============================================= */

#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
}

/* ロゴ */
#logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}

#logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

#logo-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1.2;
}

#logo-tagline {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent-hover);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* タブナビゲーション */
#tabbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* 検索 */
#search-wrapper {
  position: relative;
  flex-shrink: 0;
}

#search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

#search-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px 8px 36px;
  color: var(--text-primary);
  font-size: 13px;
  width: 220px;
  transition: width 0.2s, border-color 0.2s;
  outline: none;
}

#search-input:focus {
  width: 280px;
  border-color: var(--border-accent);
}

#search-input::placeholder { color: var(--text-muted); }

/* モバイルトグル（デスクトップでは非表示） */
#sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

/* =============================================
   アプリレイアウト
   ============================================= */

#app-layout {
  display: flex;
  width: min(1440px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
}

/* =============================================
   サイドバー
   ============================================= */

#sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: flex-start;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 100;
}

#sidebar::-webkit-scrollbar { display: none; }

.sidebar-section {
  padding: 8px 0;
}

.sidebar-section-label {
  padding: 6px 20px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* サイドバーフィルターアイテム */
.sidebar-item {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
  border-left: 3px solid transparent;
  user-select: none;
}

.sidebar-item:hover {
  color: var(--text-primary);
  background: var(--accent-subtle);
}

.sidebar-item.active {
  color: var(--accent-hover);
  background: var(--accent-subtle);
  border-left-color: var(--accent);
}

/* 月別アコーディオン */
.date-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.03em;
  transition: color 0.12s;
}

.date-month-header:hover {
  color: var(--text-secondary);
}

.date-month-arrow {
  font-size: 10px;
  opacity: 0.6;
}

.date-month-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.date-month-list.open {
  max-height: 600px;
}

/* =============================================
   メインコンテンツ
   ============================================= */

#main {
  flex: 1;
  margin-left: 0;
  min-width: 0;
  padding-bottom: 80px;
  max-width: calc(100vw - var(--sidebar-w));
}

/* 一覧ページの静的な説明本文（記事一覧のDOM契約とは独立） */
.page-guide {
  margin: 20px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* 一覧上部の h1 はカード化せず、記事一覧の控えめなラベルとして扱う */
.page-guide.page-guide--list-heading {
  margin: 16px 20px 6px;
  padding: 0 4px;
  background: none;
  border: 0;
  border-radius: 0;
}

.page-guide--list-heading > h1 {
  max-width: 1040px;
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.page-guide-section {
  max-width: 1040px;
  margin-top: 36px;
}

.page-guide-section h2 {
  margin-bottom: 14px;
  font-size: 21px;
  line-height: 1.4;
}

.page-guide-section p,
.page-guide-section li,
.page-guide-section td,
.page-guide-section th {
  font-size: 14px;
  line-height: 1.85;
}

.page-guide-section p + p { margin-top: 12px; }
.page-guide-section ul { padding-left: 1.4em; }
.page-guide-section ul > li { list-style: disc; }
.page-guide-section li + li { margin-top: 6px; }
.page-guide-section a { color: var(--accent-hover); }

.page-guide-table-wrap { overflow-x: auto; }
.page-guide table { width: 100%; border-collapse: collapse; }
.page-guide th,
.page-guide td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.page-guide thead th { background: var(--bg-surface); }
.page-guide tbody th { width: 220px; white-space: nowrap; }

/* 統計バー */
#stats-bar {
  display: none;
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stats-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.stats-sep {
  color: var(--text-muted);
}

.stats-companies {
  color: var(--text-muted);
  font-size: 11px;
}

/* =============================================
   日付グループ + カードグリッド
   ============================================= */

.date-group {
  padding: 0 20px;
  margin-top: 24px;
}

.date-group:first-child {
  margin-top: 8px;
}

.date-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.date-label { color: var(--text-secondary); }

.date-count {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* デイリーサマリー */
.daily-summary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.daily-summary-icon {
  flex-shrink: 0;
  font-size: 15px;
  margin-top: 1px;
}

.daily-summary-text {
  flex: 1;
}

/* 4カラムグリッド */
.article-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: start;   /* 各カードを自身の高さに保つ。未指定(stretch)だと行内の最も高いカードに引き伸ばされ、件数増加時に空白の穴が生じる */
}

/* =============================================
   記事カード
   ============================================= */

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
  box-shadow: var(--shadow-card);
}

.card-thumb {
  width: 100%;
  height: 130px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-primary);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.2s;
}

.article-card:hover .card-thumb img {
  transform: scale(1.03);
}

.card-body {
  padding: 16px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.new-badge {
  flex-shrink: 0;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: #22c55e;
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 2px;
  margin-right: 4px;
}

.is-new {
  border-left: 3px solid #22c55e;
}

.pick-badge {
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 2px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  flex: 1;
  letter-spacing: -0.01em;
}

/* メタ情報行（バッジ類） */
.card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  margin-top: 2px;
}

/* バッジ統一スタイル（subtle） */
.card-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  white-space: nowrap;
}

.card-badge.badge-source {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.2);
}

.card-date {
  font-size: 11px;
  color: var(--text-muted, #666);
  margin-left: auto;
  white-space: nowrap;
}

/* 日付グループ内デイリーサマリー（ウィジェットと同じデザイン） */
.date-daily-summary {
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.summary-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-hover);
}

.summary-count {
  font-size: 11px;
  color: var(--text-secondary);
  margin-left: auto;
}

.summary-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.card-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
  padding-top: 8px;
}

/* =============================================
   記事詳細モーダル
   ============================================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: modal-slide-up 0.25s ease-out;
}

@keyframes modal-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-thumb-wrap {
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

.modal-thumb-wrap img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.modal-content {
  padding: 20px 20px 28px;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.modal-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 20px;
  white-space: pre-line;
}

.modal-read-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.modal-read-btn:hover {
  background: var(--accent-hover);
}

@media (max-width: 768px) {
  .modal-overlay {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  }
  .modal-box {
    max-height: calc(92dvh - var(--bottom-nav-h) - env(safe-area-inset-bottom));
  }
}

@media (min-width: 769px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
  .modal-box {
    border-radius: 14px;
    max-height: 80vh;
  }
  .modal-thumb-wrap {
    border-radius: 14px 14px 0 0;
  }
}

/* =============================================
   GitHub Trending ページ
   ============================================= */

/* =============================================
   新聞マストヘッド（発行物メタファー / OrangeBot風）
   ============================================= */

#masthead {
  margin: 8px 20px 20px;
  padding: 16px 4px 0;
  border-top: 2px solid var(--text-primary);
}

#masthead-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

#masthead-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#masthead-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1.1;
}

#masthead-tagline {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-hover);
  letter-spacing: 0.02em;
}

#masthead-issue {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  font-family: "JetBrains Mono", monospace;
  line-height: 1.1;
}

#masthead-issue-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

#masthead-issue-no {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

#masthead-rule {
  height: 1px;
  background: var(--border-hover);
  margin: 12px 0 8px;
}

#masthead-digest {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: "JetBrains Mono", monospace;
}

#digest-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  white-space: nowrap;
}

#digest-stats {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

@media (max-width: 768px) {
  #masthead {
    margin: 6px 12px 14px;
    padding-top: 12px;
  }
  #masthead-title { font-size: 20px; }
  #masthead-tagline { font-size: 11px; }
  #masthead-issue-no { font-size: 17px; }
  #masthead-digest {
    flex-direction: column;
    gap: 3px;
  }
}

/* =============================================
   表示切替トグル（カード ⇔ リスト）
   ============================================= */

#view-toggle {
  display: flex;
  margin-left: auto;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  padding: 4px 9px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.view-btn:hover { color: var(--text-secondary); }

.view-btn.active {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 768px) {
  #view-toggle {
    margin-left: 0;
    align-self: flex-start;
  }
}

/* =============================================
   罫線リスト（カテゴリ別番号付きセクション / OrangeBot風）
   ============================================= */

.article-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.list-section {
  display: flex;
  flex-direction: column;
}

.list-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--text-muted);
}

.list-sec-no {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.list-sec-emoji {
  font-size: 13px;
}

.list-sec-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.list-sec-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.list-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s, padding-left 0.12s;
}

.list-row:hover {
  background: var(--accent-subtle);
  padding-left: 10px;
}

.list-row.row-must { border-left: 2px solid var(--pick-must); }
.list-row.row-check { border-left: 2px solid var(--pick-check); }

.row-marker {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.list-row:hover .row-marker { color: var(--accent); }

.row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.row-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
}

.row-source {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.row-new {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  background: #22c55e;
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 6px;
  vertical-align: middle;
}

.row-pick {
  font-size: 11px;
  margin-right: 5px;
}

@media (max-width: 768px) {
  .article-list { gap: 18px; }
  .list-row { padding: 10px 2px; }
  .row-title { font-size: 13px; }
}

/* =============================================
   紙面レイアウト（大1＋小N マルチカラム / 本物の新聞）
   ============================================= */

.article-paper {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(22, 26, 48, 0.58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* --- トップブロック: 大記事＋右に小記事が回り込む --- */
.paper-top {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 0;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--text-muted);
}

/* 大記事の右に縦罫線でサイドを区切る */
.paper-side {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}

.paper-cell-onside {
  border-top: none !important;
  border-right: none !important;
  padding: 14px 4px 14px 18px;
  flex: 1;
}
.paper-side .paper-cell-onside + .paper-cell-onside {
  border-top: 1px solid var(--border) !important;
}

/* --- トップ記事（大セル） --- */
.paper-lead {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-right: 24px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.paper-lead.row-must { border-left: 3px solid var(--pick-must); padding-left: 14px; }
.paper-lead.row-check { border-left: 3px solid var(--pick-check); padding-left: 14px; }

.paper-lead-thumb {
  flex-shrink: 0;
  width: 100%;
  height: 240px;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
}

.paper-lead-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.paper-lead:hover .paper-lead-thumb img { transform: scale(1.03); }

.paper-lead-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.paper-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.paper-kicker-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.paper-lead-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.paper-lead-summary {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.paper-source {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: auto;
}

/* --- 共通セル --- */
.paper-cell {
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.12s;
}

.paper-cell:hover { background: var(--accent-subtle); }
.paper-cell.row-must { border-left: 2px solid var(--pick-must); }
.paper-cell.row-check { border-left: 2px solid var(--pick-check); }

.paper-cell-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.paper-cell-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.paper-cell-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

/* --- 中段: サムネ付き中記事の横並び（3カラム） --- */
.paper-midrow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--text-muted);
}

.paper-cell-mid {
  flex-direction: column;
  gap: 10px;
  padding: 0 18px;
  border-right: 1px solid var(--border);
}
.paper-midrow .paper-cell-mid:nth-child(3n) { border-right: none; }
.paper-midrow .paper-cell-mid:first-child { padding-left: 0; }

.paper-cell-thumb {
  width: 100%;
  height: 130px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
}
.paper-cell-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.paper-cell-mid:hover .paper-cell-thumb img { transform: scale(1.03); }

/* サイドの中セルはサムネを小さく横長に */
.paper-cell-onside { flex-direction: column; gap: 8px; }
.paper-cell-onside .paper-cell-thumb { height: 90px; }

/* --- 下段: テキストのみ小記事のマルチカラム --- */
.paper-rest {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.paper-cell-small {
  flex-direction: column;
  gap: 5px;
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.paper-rest .paper-cell-small:nth-child(4n) { border-right: none; }
.paper-cell-small .paper-cell-title { font-size: 13px; font-weight: 500; }
/* 下段リストにも小さめサムネを表示（mid より低く、メリハリは保つ） */
.paper-cell-small .paper-cell-thumb { height: 88px; }
.paper-cell-small.no-thumb .paper-cell-thumb { display: none; }

/* --- 下段の章見出し（01 営業・マーケ … カテゴリ章立て） --- */
.paper-chapter-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--text-muted);
}

.paper-chapter-no {
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1;
}

.paper-chapter-emoji { font-size: 14px; }

.paper-chapter-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.paper-chapter-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

/* 記事ゼロの章: 見出しは出すが控えめにしてメリハリを保つ */
.paper-chapter-empty {
  margin-top: 18px;
  opacity: 0.55;
  border-bottom-style: dashed;
}

.paper-chapter-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  font-style: italic;
}

/* --- 章トップブロック: 面トップ（中サイズの大記事）＋右に中記事 --- */
.paper-chapter-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 0;
  margin-top: 4px;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* 記事1件のみの章: サイドが無いので大記事を全幅に。
   サムネ左・本文右の横長カードにして右側の空白をなくす */
.paper-chapter-top-single {
  grid-template-columns: minmax(0, 1fr);
}
.paper-chapter-top-single .paper-chlead {
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding-right: 0;
}
.paper-chapter-top-single .paper-chlead-thumb {
  width: 320px;
  max-width: 42%;
  height: 180px;
}
@media (max-width: 600px) {
  .paper-chapter-top-single .paper-chlead {
    flex-direction: column;
    gap: 12px;
  }
  .paper-chapter-top-single .paper-chlead-thumb {
    width: 100%;
    max-width: none;
    height: 180px;
  }
}

.paper-chlead {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 22px 0 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.paper-chlead.row-must { border-left: 3px solid var(--pick-must); padding-left: 14px; }
.paper-chlead.row-check { border-left: 3px solid var(--pick-check); padding-left: 14px; }

.paper-chlead-thumb {
  flex-shrink: 0;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
}
.paper-chlead-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.paper-chlead:hover .paper-chlead-thumb img { transform: scale(1.03); }

.paper-chlead-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.paper-chlead-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
}

.paper-chlead-summary {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* サムネ読み込み失敗時: 本文をフル幅に詰める */
.paper-chlead.no-thumb,
.paper-lead.no-thumb { gap: 0; }
.paper-chlead.no-thumb .paper-chlead-body,
.paper-lead.no-thumb .paper-lead-body { flex: 1; }

/* 章トップの右サイド（テキストのみの小記事を縦並び＋左罫線） */
.paper-chapter-top .paper-side {
  border-left: 1px solid var(--border);
}
/* 章トップ右サイドの中記事はサムネ左・テキスト右の横並び（狭いサイドで一覧性優先） */
.paper-chapter-top .paper-cell-onside {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 4px 11px 18px;
  border-top: none !important;
}
.paper-chapter-top .paper-cell-onside + .paper-cell-onside {
  border-top: 1px solid var(--border) !important;
}
/* サムネは左に小さく固定（48x48） */
.paper-chapter-top .paper-cell-onside .paper-cell-thumb {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}
.paper-chapter-top .paper-cell-onside .paper-cell-body { flex: 1 1 auto; min-width: 0; }

/* 紙面: タブレット（下段3カラム・中段3カラム維持・サイド狭め） */
@media (max-width: 1100px) {
  .paper-top { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .paper-rest { grid-template-columns: repeat(3, 1fr); }
  .paper-rest .paper-cell-small:nth-child(4n) { border-right: 1px solid var(--border); }
  .paper-rest .paper-cell-small:nth-child(3n) { border-right: none; }
}

/* 紙面: モバイルは1カラム（縦積み） */
@media (max-width: 768px) {
  .paper-top {
    grid-template-columns: 1fr;
    padding-bottom: 14px;
    margin-bottom: 14px;
  }
  .paper-lead {
    padding-right: 0;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
  }
  .paper-lead-thumb { width: 100%; height: 190px; }
  .paper-lead-title { font-size: 21px; }
  .paper-lead-summary { font-size: 13px; -webkit-line-clamp: 3; }
  /* 中記事はSmartNews型の横並びカード（左テキスト＋右小サムネ）に。
     大記事＝縦・大サムネ、中記事＝横・小サムネ、で緩急をスマホでも保ち見やすくする */
  .paper-side { border-left: none; }
  .paper-cell-onside,
  .paper-midrow .paper-cell-mid {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px !important;
    padding: 12px 4px !important;
    border-top: 1px solid var(--border) !important;
    border-right: none !important;
  }
  /* テキストを左（先）に、サムネを右（後）に並べる */
  .paper-cell-onside .paper-cell-body,
  .paper-midrow .paper-cell-mid .paper-cell-body { order: 1; }
  .paper-cell-onside .paper-cell-thumb,
  .paper-midrow .paper-cell-mid .paper-cell-thumb {
    order: 2;
    flex: 0 0 auto;
    width: 88px;
    height: 88px !important;
  }
  /* 中段は1カラムにして横並びカードを縦に積む */
  .paper-midrow { grid-template-columns: 1fr; }
  /* 下段は1カラム */
  .paper-rest { grid-template-columns: 1fr; }
  .paper-cell-small {
    border-right: none !important;
    padding: 13px 4px;
  }
  /* 章トップブロックも1カラム縦積み */
  .paper-chapter-top { grid-template-columns: 1fr; }
  .paper-chlead {
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }
  .paper-chlead-thumb { width: 100%; height: 170px; }
  .paper-chlead-title { font-size: 16px; }
  .paper-chapter-top .paper-side { border-left: none; }
  .paper-chapter-top .paper-cell-onside {
    padding: 11px 4px !important;
    border-top: 1px solid var(--border) !important;
  }
  /* デスクトップでは非表示の章トップ右サイドのサムネを、スマホの横並びカードでは表示する */
  /* PC用の48px固定指定（詳細度3）がスマホ用88pxを上書きして縦長に潰れるのを、同詳細度で打ち消す */
  .paper-chapter-top .paper-cell-onside .paper-cell-thumb {
    display: block;
    flex: 0 0 88px;
    width: 88px;
    height: 88px !important;
  }
}

/* =============================================
   GitHub Trending カード
   ============================================= */

.trending-repo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  word-break: break-all;
}

.trending-owner {
  color: var(--text-secondary);
}

.trending-sep {
  color: var(--text-muted);
  margin: 0 2px;
}

.trending-repo {
  color: var(--accent);
}

.trending-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  flex-wrap: wrap;
}

.trending-stat {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 3px;
}

.trending-lang {
  font-size: 11px;
  color: #fff;
  background: #2d6a4f;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.trending-hot {
  font-size: 11px;
  font-weight: 700;
  color: #ff6b35;
  background: rgba(255, 107, 53, 0.12);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  border: 1px solid rgba(255, 107, 53, 0.3);
}

/* PICK スタイル */
.article-card.pick-must {
  border-left: 3px solid var(--pick-must);
  background: linear-gradient(135deg, var(--pick-must-bg) 0%, var(--bg-card) 60%);
}

.article-card.pick-check {
  border-left: 3px solid var(--pick-check);
  background: linear-gradient(135deg, var(--pick-check-bg) 0%, var(--bg-card) 60%);
}

/* RANKING タブ */
.rank-score {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-primary);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: auto;
}

.tier-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}

.tier-1 { background: var(--pick-must-bg); color: var(--pick-must); }
.tier-2 { background: var(--pick-check-bg); color: var(--pick-check); }
.tier-3 { background: var(--bg-primary); color: var(--text-muted); }

/* =============================================
   もっと見る
   ============================================= */

#load-more-wrapper {
  text-align: center;
  padding: 28px 20px;
}

#load-more-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  padding: 10px 32px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

#load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* =============================================
   空状態・ローディング
   ============================================= */

#empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

#empty-state .empty-icon { font-size: 40px; margin-bottom: 16px; }

/* =============================================
   ボトムナビゲーション（モバイル専用）
   ============================================= */

#bottom-nav {
  display: none; /* デスクトップでは非表示 */
}

/* =============================================
   モバイルカテゴリタブバー（上部横スクロール）
   ============================================= */

#mobile-category-bar {
  display: none; /* デスクトップでは非表示 */
}

/* モバイル日付ドロップダウンもデスクトップでは非表示
   （定義がメディアクエリ内のみで、PC幅だと既定のblockで日付が漏れていた） */
#mob-date-dropdown {
  display: none;
}

/* =============================================
   レスポンシブ
   ============================================= */

/* タブレット: 3カラム */
@media (max-width: 1300px) {
  .article-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 小さめタブレット: 2カラム */
@media (max-width: 900px) {
  .article-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* モバイル: スマニュー風UI */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
    --header-h: 52px;
    --bottom-nav-h: 56px;
    --mobile-cat-h: 44px;
  }

  /* ===== ヘッダー: ロゴ + 検索アイコンのみ ===== */
  #header {
    flex-wrap: nowrap;
    padding: 0 12px;
    height: var(--header-h);
    gap: 0;
  }

  #logo { flex: 1; }

  /* 検索窓を非表示（ボトムナビの検索ボタンで代替） */
  #search-wrapper { display: none; }

  /* ヘッダーのタブバーを非表示（ボトムナビに移行） */
  #tabbar { display: none; }

  /* ハンバーガーも非表示（カテゴリタブで代替） */
  #sidebar-toggle { display: none; }

  /* ===== モバイルカテゴリタブバー ===== */
  #mobile-category-bar {
    display: flex;
    align-items: center;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    height: var(--mobile-cat-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    z-index: 190;
    overflow: hidden;
  }

  /* 右端フェードアウト（スクロール続きがあることを示す） */
  #mobile-category-bar::after {
    content: "";
    position: absolute;
    right: 44px; /* 日付ボタンの左端まで */
    top: 0; bottom: 0;
    width: 32px;
    background: linear-gradient(to right, transparent, var(--bg-surface));
    pointer-events: none;
    z-index: 1;
  }

  #mobile-cat-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    flex: 1;
    padding: 0 10px;
    height: 100%;
    /* 横パンであることをブラウザに明示し、慣性スクロールを有効化（操作の引っかかり対策） */
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  #mobile-cat-scroll::-webkit-scrollbar { display: none; }

  .mob-cat-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
    color: #fff;
    opacity: 0.75;
  }

  .mob-cat-btn.active { opacity: 1; }
  .mob-cat-btn:not(.active) { filter: brightness(0.7); }

  /* 日付ボタン（右端固定） */
  #mob-date-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    padding: 0 12px;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }

  #mob-date-btn.active {
    color: var(--accent-hover);
  }

  /* 日付ドロップダウン */
  #mob-date-dropdown {
    position: fixed;
    top: calc(var(--header-h) + var(--mobile-cat-h));
    left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    z-index: 180;
    display: none;
    max-height: 40vh;
    overflow-y: auto;
  }

  #mob-date-dropdown.open { display: block; }

  #mob-date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 14px;
  }

  .mob-date-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
  }

  .mob-date-item.active {
    background: var(--accent-subtle);
    border-color: var(--border-accent);
    color: var(--accent-hover);
  }

  /* ===== アプリレイアウト調整 ===== */
  #app-layout {
    margin-top: calc(var(--header-h) + var(--mobile-cat-h));
  }

  /* サイドバー非表示 */
  #sidebar { display: none !important; }

  /* メイン */
  #main {
    margin-left: 0;
    max-width: 100vw;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 16px);
    overflow-x: hidden;
  }

  .page-guide {
    margin: 12px;
    padding: 24px 18px;
  }

  .page-guide > h1 { font-size: 26px; }
  .page-guide-section { margin-top: 30px; }
  .page-guide-section h2 { font-size: 19px; }

  /* スワイプアニメーション用 */
  #articles-container {
    will-change: transform, opacity;
  }

  .article-cards-grid { grid-template-columns: 1fr; }

  /* 章サイドの小記事カード: サムネ有無で高さが不揃いになる崩れを防ぐ。
     横並び固定＋サムネを72px正方形に固定し、サムネ無しカードと高さを揃える */
  .paper-side .paper-cell-onside {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }
  .paper-side .paper-cell-onside .paper-cell-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 6px;
  }
  .paper-side .paper-cell-onside .paper-cell-body {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* メイン下段の小記事カード(paper-rest): スマホで1列に潰れると、PC用の
     全幅サムネ(縦並び)のままサムネが横長バナー化して崩れる。
     サイド小記事と同じ「左テキスト＋右72pxサムネ」の横並びに統一する */
  .paper-rest .paper-cell-small {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }
  .paper-rest .paper-cell-small .paper-cell-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    order: 2;   /* サイド小記事と同じく、サムネはテキストの右に置く（DOM順はthumb→bodyのためorderで反転） */
  }
  .paper-rest .paper-cell-small .paper-cell-body {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
  }

  .date-group { padding: 0 12px; }

  .card-thumb { height: 150px; }

  .card-body { padding: 10px 12px; }

  /* ===== ボトムナビ ===== */
  #bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    z-index: 9999;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
  }

  .bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: color 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
  }

  .bnav-item.active { color: var(--accent-hover); }

  .bnav-icon {
    font-size: 20px;
    line-height: 1;
  }

  .bnav-label { line-height: 1; }
}

/* =============================================
   トップランディング
   ============================================= */

#landing-main {
  padding-top: var(--header-h);
  overflow: hidden;
}

.top-hero {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
  padding: 92px 24px 84px;
  background:
    linear-gradient(90deg, rgba(17,21,42,0.97) 0%, rgba(17,21,42,0.88) 30%, rgba(17,21,42,0.45) 58%, rgba(17,21,42,0.18) 100%),
    url("assets/hero-compass.webp") center right / cover no-repeat,
    linear-gradient(135deg, #11152a 0%, #1e2440 54%, #161a30 100%);
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.top-hero::before,
.top-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  z-index: -1;
}
.top-hero::before { width: 420px; height: 420px; right: 7%; top: 54px; }
.top-hero::after { width: 270px; height: 270px; right: calc(7% + 75px); top: 129px; }
.top-hero-orbit {
  position: absolute;
  right: calc(7% + 197px);
  top: 82px;
  width: 2px;
  height: 364px;
  background: linear-gradient(transparent, rgba(255, 51, 95, 0.75), transparent);
  transform: rotate(34deg);
  transform-origin: center;
  z-index: -1;
}

.top-hero::before,
.top-hero::after,
.top-hero-orbit { display: none; }

.top-hero-content { width: min(1160px, 100%); }
.top-eyebrow,
.top-section-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-hover);
}
.top-hero h1 {
  /* 「ビジネスの未来をナビゲート。」が1行に収まる幅。狭いと「ト。」だけが
     3行目に落ちて見出しの塊が崩れる。 */
  max-width: 900px;
  margin: 16px 0 22px;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.22;
  letter-spacing: -0.035em;
}
.top-hero-lead {
  max-width: 690px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.9;
}
.top-pick-summary {
  margin: 20px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}
.top-hero-content h1 { max-width: none; white-space: nowrap; }
.top-eyebrow,
.top-hero-lead { max-width: 620px; }
.top-hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.top-pick-actions { display: flex; justify-content: center; margin-top: 12px; }
.top-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.top-action:hover { transform: translateY(-2px); border-color: var(--accent); }
.top-action-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.top-action-primary:hover { background: var(--accent-hover); }
.top-action-secondary { background: rgba(255, 255, 255, 0.03); }

.top-stats-bar {
  width: min(1280px, calc(100% - 40px));
  margin: 72px auto 0;
  position: relative;
  z-index: 2;
  background: #242a49;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.top-section-heading h2,
.top-stats-heading h2 { font-size: 24px; line-height: 1.35; margin-top: 5px; }

/* =============================================
   AI相談
   ============================================= */

.ai-consult {
  display: none;
}

.ai-consult-card {
  width: 100%;
  min-width: 0;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ai-consult-label {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.ai-consult-heading {
  margin: 0;
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.5;
}

.ai-consult-toast[hidden] {
  display: none;
}

.ai-consult-description {
  margin: 10px 0 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.75;
}

.ai-consult-services {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-consult-service {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background 0.12s, border-color 0.12s;
}

.ai-consult-service:hover,
.ai-consult-service:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.ai-consult-service-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-consult-service-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-consult-service-icon-google_ai_mode svg path {
  fill: currentColor;
  stroke: none;
}

.ai-consult-copy {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.ai-consult-copy:hover,
.ai-consult-copy:focus-visible {
  border-color: var(--accent-hover);
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.ai-consult-copy svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.ai-consult-service:focus-visible,
.ai-consult-copy:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

.ai-consult-toast {
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 375px) {
  .ai-consult-card { padding: 14px; }
  .ai-consult-heading { font-size: 15px; }
}
.top-section-heading h2 span { color: var(--accent-hover); font-size: 12px; letter-spacing: 0.1em; margin-left: 8px; }
.top-stats-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.top-stats-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.top-stat { padding: 4px 14px; border-left: 1px solid var(--border); text-align: center; }
.top-stat:first-child { border-left: 0; }
.top-stat strong,
.top-number-card strong {
  display: block;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-primary);
  font-size: 19px;
  line-height: 1.35;
}
.top-stat strong small,
.top-number-card strong small { font-size: 11px; color: var(--text-secondary); margin-left: 2px; }
.top-stat span { display: block; color: var(--text-muted); font-size: 10px; line-height: 1.45; margin-top: 4px; }

.top-editorial-layout {
  width: min(1280px, calc(100% - 40px));
  margin: 76px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 48px;
  /* align-items:start だと左右が独立して伸び、短い方の下に空白が残る
     （Phase 5で数字グリッドを外し左カラムが短くなって顕在化した）。
     stretch にして両カラムの高さを揃える。 */
  align-items: stretch;
}
.top-editorial-main { min-width: 0; }
/* グリッドの align-items:stretch で左カラムと高さが揃う。
   sticky を付けると stretch が無効化されて空白が戻るので付けない。 */
.top-section { margin-top: 72px; }
.top-editorial-main > .top-section:first-child { margin-top: 0; }
.top-section-heading { margin-bottom: 22px; }
.top-section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.top-text-link { color: var(--accent-hover); text-decoration: none; font-size: 12px; font-weight: 700; }
.top-text-link:hover { text-decoration: underline; }
.top-loading,
.top-empty { color: var(--text-muted); padding: 28px; border: 1px dashed var(--border-hover); border-radius: var(--radius); }

.top-pick-section {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 72px;
}
.top-pickup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.top-pickup-card {
  display: grid;
  grid-template-columns: minmax(180px, 36%) 1fr;
  min-height: 260px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s, border-color 0.16s;
}
.top-pickup-card:hover,
.top-news-card:hover,
.top-note-card:hover { transform: translateY(-3px); border-color: var(--border-accent); }
.top-pickup-thumb,
.top-news-thumb {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2c355d, #1a203a);
}
/* PICKサムネを本文列の高さから切り離し、元画像全体を表示する。
   文字入りの横長画像でも左右を切り落とさない。 */
.top-pickup-thumb {
  aspect-ratio: 16 / 9;
  align-self: center;
}
.top-pickup-thumb img,
.top-news-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.top-pickup-thumb img { object-fit: contain; }
.top-thumb-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, #273158, #181d34); }
.top-thumb-placeholder::before { content: ""; width: 72px; height: 72px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; position: absolute; }
.top-thumb-placeholder span { font-family: "JetBrains Mono", monospace; font-size: 20px; font-weight: 700; color: var(--accent-hover); }
.top-pickup-body { min-width: 0; padding: clamp(20px, 2.5vw, 30px); display: flex; flex-direction: column; justify-content: center; }
.top-pickup-label { align-self: flex-start; color: #fff; background: var(--accent); border-radius: 999px; padding: 5px 9px; font-size: 12px; line-height: 1.4; }
.top-article-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: 11px; }
.top-article-meta span { color: var(--accent-hover); font-weight: 700; }
.top-pickup-body .top-article-meta { margin-top: 12px; }
.top-pickup-body h3 { margin: 12px 0 9px; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.top-pickup-body p { color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.top-pickup-body b { color: var(--accent-hover); margin-top: 15px; font-size: 12px; }

.top-news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.top-news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s, border-color 0.16s;
}
.top-news-thumb { aspect-ratio: 16 / 9; }
.top-news-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.top-news-body h3 { font-size: 14px; line-height: 1.55; margin: 10px 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.top-news-body time { margin-top: auto; color: var(--text-muted); font-size: 10px; }

.top-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.top-category-tile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.top-category-tile:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }
.top-category-icon { font-size: 24px; }
.top-category-tile > span:nth-child(2) { min-width: 0; flex: 1; }
.top-category-tile strong,
.top-category-tile small { display: block; }
.top-category-tile strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.top-category-tile small { color: var(--text-muted); margin-top: 2px; }
.top-category-tile b { color: var(--accent-hover); }

.top-release-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 22px;
  background: rgba(36, 42, 73, 0.58);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.top-trending-section { padding-bottom: 24px; border-bottom: 1px solid var(--border-hover); }
.top-release-section { padding-top: 24px; }
.top-trending-section .top-section-heading,
.top-release-section .top-section-heading { margin-bottom: 16px; }
.top-trending-section .top-section-heading h2 { font-size: 20px; }
.top-trending-list { border-top: 1px solid var(--border); }
.top-trending-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 14px;
  gap: 9px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.top-trending-item:hover strong { color: var(--accent-hover); }
.top-trending-rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 51, 95, 0.14);
  color: var(--accent-hover);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}
.top-trending-body { min-width: 0; }
.top-trending-body strong {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .15s;
}
.top-trending-summary {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
.top-trending-meta { display: block; margin-top: 7px; color: var(--text-muted); font-size: 9px; }
.top-trending-external { color: var(--text-muted); font-size: 11px; }
.top-release-list { border-top: 1px solid var(--border); }
.top-release-item { display: block; padding: 16px 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.top-release-item:hover h3 { color: var(--accent-hover); }
.top-release-item > div { display: flex; justify-content: space-between; gap: 8px; color: var(--text-muted); font-size: 9px; }
.top-release-item > div span { max-width: 64%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-release-item h3 { margin-top: 7px; font-size: 12px; line-height: 1.55; transition: color .15s; }
.top-release-all { display: inline-block; margin-top: 18px; }

.top-numbers-section,
.top-how-section,
.top-note-section { width: min(1120px, calc(100% - 40px)); margin-left: auto; margin-right: auto; }
.top-centered-heading { text-align: center; }
.top-number-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.top-number-card { padding: 26px 18px; text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.top-number-card strong { color: var(--accent-hover); font-size: 25px; }
.top-number-card span { display: block; color: var(--text-secondary); font-size: 11px; margin-top: 7px; }

.top-step-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; position: relative; }
.top-step { display: flex; align-items: flex-start; gap: 16px; padding: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.top-step > span { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); font-family: "JetBrains Mono", monospace; font-weight: 700; }
.top-step h3 { font-size: 16px; margin-bottom: 8px; }
.top-step p { color: var(--text-secondary); font-size: 12px; }
.top-centered-action { text-align: center; margin-top: 24px; }

.top-note-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.top-note-card { display: block; min-height: 190px; padding: 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; color: inherit; text-decoration: none; transition: transform .16s, border-color .16s; }
.top-note-card span { font-family: "JetBrains Mono", monospace; color: var(--accent-hover); font-size: 10px; letter-spacing: .1em; }
.top-note-card h3 { margin: 13px 0 22px; font-size: 17px; line-height: 1.65; }
.top-note-card b { color: var(--accent-hover); font-size: 12px; }

.top-site-info {
  width: min(1280px, calc(100% - 40px));
  margin: 76px auto 0;
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: linear-gradient(110deg, #2a3154, #202642);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
}
.top-site-info > div { max-width: 650px; }
.top-site-info strong { font-family: "JetBrains Mono", monospace; font-size: 19px; }
.top-site-info p { color: var(--text-secondary); margin-top: 5px; }
.top-site-info dl { display: flex; gap: 24px; }
.top-site-info dl div { padding-left: 20px; border-left: 1px solid var(--border-hover); }
.top-site-info dt { color: var(--text-muted); font-size: 9px; }
.top-site-info dd { font-weight: 700; white-space: nowrap; }

.top-stats-bar, .top-section, .top-trending-section,
.top-release-section, .top-site-info { background: transparent; }

.article-card, .top-pickup-card, .top-news-card, .top-category-tile,
.top-number-card, .top-step, .top-stat, .top-trending-item, .top-release-item {
  background: rgba(36, 42, 73, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#article-list-start { height: 1px; margin-top: 80px; scroll-margin-top: var(--header-h); }

/* フッター（ページ末尾に1個） */
#site-footer.top-site-footer {
  margin: 60px 0 0;
  padding: 44px max(24px, calc((100% - 1280px) / 2));
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 42px;
  background: #111528;
}
#site-footer:not(.top-site-footer) {
  max-width: 760px;
  margin: 48px auto 32px;
  padding: 24px 22px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-brand,
#site-footer .footer-title {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.footer-column h2 { font-size: 11px; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 4px; }
.footer-column a { color: var(--text-secondary); text-decoration: none; font-size: 12px; }
.footer-column a:hover { color: var(--accent-hover); }
.footer-brand-column p,
#site-footer .footer-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.footer-social { display: flex; gap: 8px; margin-top: 5px; }
.footer-social a { padding: 4px 9px; border: 1px solid var(--border-hover); border-radius: 5px; }
.footer-category-links { display: flex; flex-direction: column; gap: 9px; }
#site-footer .footer-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}
#site-footer .footer-meta a { color: var(--accent); text-decoration: none; }
#site-footer .footer-meta a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .top-stats-row { grid-template-columns: repeat(4, 1fr); row-gap: 18px; }
  .top-stat:nth-child(5) { border-left: 0; }
  .top-news-grid { grid-template-columns: repeat(2, 1fr); }
  .top-editorial-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
}

@media (max-width: 900px) {
  .top-hero-content h1 { white-space: normal; }
  .top-editorial-layout { grid-template-columns: 1fr; }
  .top-release-sidebar { position: static; }
  .top-number-grid { grid-template-columns: repeat(3, 1fr); }
  .top-site-info { align-items: flex-start; flex-direction: column; }
  #site-footer.top-site-footer { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .top-hero {
    min-height: 510px;
    padding: 72px 20px 70px;
    place-items: start center;
    background:
      linear-gradient(180deg, rgba(17,21,42,0.96) 0%, rgba(17,21,42,0.90) 46%, rgba(17,21,42,0.60) 100%),
      url("assets/hero-compass.webp") 72% 42% / 190% auto no-repeat,
      linear-gradient(135deg, #11152a 0%, #1e2440 54%, #161a30 100%);
  }
  .top-hero::before { width: 280px; height: 280px; right: -90px; top: 110px; }
  .top-hero::after { width: 180px; height: 180px; right: -40px; top: 160px; }
  .top-hero-orbit { display: none; }
  .top-hero h1 { font-size: clamp(32px, 10.5vw, 46px); }
  .top-hero h1 br { display: none; }
  .top-hero-lead { font-size: 14px; }
  .top-eyebrow, .top-hero-lead { max-width: none; }
  .top-hero-actions { flex-direction: column; }
  .top-action { width: 100%; }
  .top-pick-summary { margin-top: 16px; font-size: 13px; }
  .top-pick-actions { margin-top: 10px; }
  .top-pick-actions .top-action { width: 100%; }

  .top-stats-bar { width: calc(100% - 24px); margin-top: 54px; padding: 18px 12px; }
  .top-stats-heading { display: block; padding: 0 6px; }
  .top-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
  .top-stat { border-left: 0; border-top: 1px solid var(--border); padding: 14px 6px; }
  .top-stat:nth-child(odd) { border-right: 1px solid var(--border); }

  .top-editorial-layout,
  .top-pick-section,
  .top-numbers-section,
  .top-how-section,
  .top-note-section,
  .top-site-info { width: calc(100% - 24px); }
  .top-editorial-layout { margin-top: 54px; }
  .top-section { margin-top: 54px; }
  .top-section.top-pick-section { margin-top: 0; padding: 22px 0 54px; }
  .top-section-heading h2,
  .top-stats-heading h2 { font-size: 21px; }
  .top-section-heading-row { align-items: flex-start; }
  .top-pickup { grid-template-columns: 1fr; gap: 12px; }
  .top-pickup-card { grid-template-columns: 104px minmax(0, 1fr); min-height: 158px; }
  .top-pickup-thumb { min-height: 0; }
  .top-pickup-body { padding: 12px 14px; }
  .top-pickup-label { padding: 3px 7px; font-size: 11px; }
  .top-pickup-body .top-article-meta { margin-top: 8px; font-size: 9px; }
  .top-pickup-body h3 { margin: 7px 0 0; font-size: 14px; line-height: 1.45; -webkit-line-clamp: 3; }
  .top-pickup-body p,
  .top-pickup-body b { display: none; }
  .top-news-grid,
  .top-category-grid,
  .top-number-grid,
  .top-step-list,
  .top-note-grid { grid-template-columns: 1fr; }
  .top-news-card { display: grid; grid-template-columns: 116px 1fr; min-height: 116px; }
  .top-news-thumb { aspect-ratio: auto; min-height: 116px; }
  .top-news-body { padding: 12px; }
  .top-news-body h3 { margin: 7px 0 10px; -webkit-line-clamp: 2; }
  .top-number-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-number-card { padding: 20px 10px; }
  .top-site-info { margin-top: 54px; padding: 24px 20px; }
  .top-site-info dl { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .top-site-info dl div { padding: 0 8px; text-align: center; }
  .top-site-info dl div:first-child { border-left: 0; }
  .top-site-info dd { font-size: 12px; }

  #article-list-start { margin-top: 56px; scroll-margin-top: var(--header-h); }
  #mobile-category-bar { position: sticky; top: var(--header-h); }
  #app-layout { margin-top: 0; }
  #main { max-width: 100%; }

  #site-footer.top-site-footer { grid-template-columns: 1fr 1fr; gap: 28px 18px; padding: 34px 20px calc(88px + env(safe-area-inset-bottom)); }
  .footer-brand-column { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
  .top-hero { padding-left: 16px; padding-right: 16px; }
  .top-hero h1 { font-size: 32px; }
  .top-news-card { grid-template-columns: 104px 1fr; }
  .top-category-tile { padding: 14px 12px; }
  .top-number-card strong { font-size: 21px; }
  .top-site-info dl { grid-template-columns: 1fr; gap: 10px; }
  .top-site-info dl div { border-left: 0; border-top: 1px solid var(--border); padding-top: 8px; }
  #site-footer.top-site-footer { grid-template-columns: 1fr; }
  .footer-brand-column { grid-column: auto; }
}
