/* 年収ナビ 共通スタイル
 * もとは index.html にインラインで書かれていた987行を切り出したもの。
 * 個別ページを約4,300枚生成するため、同じCSSを全ページに複製すると
 * 転送量が無駄になりブラウザキャッシュも効かない。
 */

:root {
  --primary: #1a237e;
  --primary-light: #3949ab;
  --accent: #ff6f00;
  --accent-light: #ffa000;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-sub: #546e7a;
  --border: #e0e4ef;
  --success: #00897b;
  --warning: #f57c00;
  --danger: #c62828;
  --gold: #f9a825;
  --shadow: 0 2px 16px rgba(26,35,126,0.08);
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(135deg, var(--primary) 0%, #283593 60%, #1565c0 100%);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
}
.logo-text { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }
.logo-sub { font-size: 11px; opacity: 0.75; font-weight: 400; }
/* トップページの検索欄。白いカードの中に置くため、文字は本文色にする。
   （以前はヘッダー用の白文字のままで、入力した文字が白背景に白で見えなかった） */
.site-search {
  flex: 1;
  min-width: 240px;
  position: relative;
}
.site-search input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  font-size: 15px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-search input::placeholder { color: var(--text-sub); opacity: 0.75; }
.site-search input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(57,73,171,0.15);
}
.search-icon {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-sub);
  font-size: 18px;
  pointer-events: none;
}
.header-nav {
  display: flex; gap: 8px;
}
.nav-btn {
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,0.28); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(160deg, #1a237e 0%, #1565c0 50%, #0277bd 100%);
  color: #fff;
  padding: 60px 20px 80px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 14px;
  line-height: 1.2;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: clamp(14px, 2.5vw, 18px);
  opacity: 0.85;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
}
.hero-stats {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-size: 36px; font-weight: 900; color: var(--gold);
  line-height: 1;
}
.hero-stat-label { font-size: 13px; opacity: 0.75; margin-top: 4px; }

/* ===== AD BANNER ===== */
.ad-banner {
  background: linear-gradient(90deg, #fff8e1, #fff3cd);
  border: 1px dashed #ffc107;
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  color: #795548;
  font-size: 13px;
  margin: 16px 0;
}
.ad-banner.leaderboard {
  height: 90px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.ad-label {
  font-size: 10px;
  color: #aaa;
  text-align: right;
  margin-bottom: 2px;
}

/* ===== AFFILIATE STRIP ===== */
.affiliate-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
}
.affiliate-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.affiliate-inner::-webkit-scrollbar { display: none; }
.affiliate-label {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  flex-shrink: 0;
}
.aff-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}
.aff-card:hover {
  border-color: var(--primary-light);
  background: #eef0fb;
  color: var(--primary);
}
.aff-card .aff-emoji { font-size: 16px; }
.aff-card .aff-name { color: var(--text); }
.aff-card .aff-tag {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
}

/* ===== MAIN LAYOUT ===== */
.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) {
  .main-wrap { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* ===== SIDEBAR ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}
.filter-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.filter-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.filter-group:last-child { margin-bottom: 0; }
.filter-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--primary-light); background: #eef0fb; }
.filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.filter-btn .count {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
}
.filter-btn.active .count { background: rgba(255,255,255,0.25); }
.salary-range-wrap {
  padding: 8px 0;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}
.reset-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #eef0fb;
  color: var(--primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.reset-btn:hover { background: #dde2f7; }

/* ===== CONTENT ===== */
.content { min-width: 0; }
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.result-count {
  font-size: 14px;
  color: var(--text-sub);
}
.result-count strong { color: var(--text); font-size: 18px; }
.sort-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sort-label { font-size: 12px; color: var(--text-sub); }
select.sort-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  cursor: pointer;
}
.view-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.view-btn {
  padding: 7px 12px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.15s;
}
.view-btn.active { background: var(--primary); color: #fff; }

/* ===== COMPANY CARDS ===== */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.company-grid.list-view {
  grid-template-columns: 1fr;
}
.company-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
}
.company-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--industry-color, #ccc);
}
.company-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26,35,126,0.14);
  border-color: var(--primary-light);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.card-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
}
.card-rank.top3 { background: var(--gold); color: #333; }
.company-type-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.badge-listed { background: #e8f5e9; color: #2e7d32; }
.badge-unlisted { background: #fff3e0; color: #e65100; }
.badge-public { background: #e3f2fd; color: #1565c0; }
.badge-other { background: #f3e5f5; color: #6a1b9a; }
.card-name {
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 4px;
  line-height: 1.3;
}
.card-industry {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 14px;
}
.card-salary-main {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}
.salary-label-sm { font-size: 12px; color: var(--text-sub); }
.salary-big {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.salary-unit { font-size: 14px; color: var(--text-sub); font-weight: 400; }
.salary-bar-wrap {
  background: var(--bg);
  border-radius: 6px;
  height: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.salary-bar {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
}
.card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.meta-item {
  font-size: 11px;
  color: var(--text-sub);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 8px;
}
.card-note {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* List view overrides */
.list-view .company-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}
.list-view .card-top { display: none; }
.list-view .card-note { display: none; }
.list-view .salary-bar-wrap { display: none; }
.list-view .card-meta { display: none; }
.list-view .card-name { font-size: 15px; margin-bottom: 2px; }
.list-view .card-industry { margin-bottom: 0; font-size: 12px; }
.list-view .card-salary-main { margin-bottom: 0; }
.list-view .salary-big { font-size: 24px; }
.list-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  min-width: 28px;
  text-align: right;
}
.list-num.top3 { color: var(--gold); font-size: 16px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-btn.wide { width: auto; padding: 0 14px; }

/* ===== CHARTS SECTION ===== */
.charts-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.section-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title span { font-size: 22px; }
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) {
  .charts-grid { grid-template-columns: 1fr; }
}
.chart-box { position: relative; height: 260px; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 28px 28px 20px;
  border-radius: 20px 20px 0 0;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(255,255,255,0.35); }
.modal-industry-badge {
  font-size: 12px;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 10px;
}
.modal-name {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 6px;
}
.modal-type { font-size: 13px; opacity: 0.8; }
.modal-body { padding: 24px 28px; }
.modal-salary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.modal-salary-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.modal-salary-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.modal-salary-num.accent { color: var(--accent); }
.modal-salary-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}
.salary-visual {
  margin-bottom: 24px;
}
.salary-visual-bar {
  height: 12px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin: 8px 0;
}
.salary-visual-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--primary-light), var(--accent));
  border-radius: 6px;
}
.salary-visual-marker {
  position: absolute;
  top: -4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: translateX(-50%);
}
.salary-visual-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-sub);
}
.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.info-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 16px;
}
.info-label { font-size: 11px; color: var(--text-sub); margin-bottom: 2px; }
.info-value { font-size: 16px; font-weight: 700; }
.modal-note {
  background: #fff8e1;
  border-left: 4px solid var(--gold);
  padding: 14px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-primary {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-secondary {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--primary);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-secondary:hover { background: #eef0fb; }

/* ===== RANKING SECTION ===== */
.ranking-section {
  margin-bottom: 24px;
}
.ranking-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ranking-tab {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.ranking-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.ranking-list {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.ranking-item:last-child { border-bottom: none; }
.ranking-item:hover { background: #f8f9ff; }
.rank-num {
  font-size: 20px;
  font-weight: 900;
  min-width: 36px;
  text-align: center;
  color: var(--text-sub);
}
.rank-1 { color: #f9a825; }
.rank-2 { color: #90a4ae; }
.rank-3 { color: #a1887f; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 15px; font-weight: 700; }
.rank-industry { font-size: 12px; color: var(--text-sub); }
.rank-bar-wrap {
  width: 120px;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}
.rank-bar { height: 100%; border-radius: 4px; }
.rank-salary {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  min-width: 70px;
  text-align: right;
}
.rank-salary span { font-size: 12px; color: var(--text-sub); font-weight: 400; }

.modal-caution {
  margin: 14px 0 0;
  padding: 10px 14px;
  background: #fff8e1;
  border-left: 4px solid var(--warning);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: #6d4c00;
}

/* ===== AFFILIATE SECTION ===== */
.affiliate-section {
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  border: 1.5px solid #ffd54f;
}
.aff-section-title {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 16px;
  color: #5d4037;
}
.aff-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.aff-big-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  border: 1.5px solid #ffe082;
  transition: all 0.2s;
  display: block;
}
.aff-big-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(255,111,0,0.15);
  transform: translateY(-2px);
}
.aff-big-name {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 4px;
}
.aff-big-desc {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 8px;
  line-height: 1.5;
}
.aff-big-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 40px 20px 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand { }
.footer-logo { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.footer-tagline { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.footer-disclaimer {
  font-size: 11px;
  line-height: 1.7;
  opacity: 0.6;
  background: rgba(255,255,255,0.06);
  padding: 12px;
  border-radius: 8px;
}
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
}

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sub);
}
.no-results-icon { font-size: 48px; margin-bottom: 12px; }
.no-results h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }

/* ===== INDUSTRY COLORS ===== */
.ind-商社 { --industry-color: #1565c0; }
.ind-銀行 { --industry-color: #00897b; }
.ind-証券 { --industry-color: #2e7d32; }
.ind-保険 { --industry-color: #00838f; }
.ind-IT { --industry-color: #6a1b9a; }
.ind-コンサル { --industry-color: #4527a0; }
.ind-自動車 { --industry-color: #e65100; }
.ind-電機 { --industry-color: #c62828; }
.ind-製薬 { --industry-color: #ad1457; }
.ind-不動産 { --industry-color: #558b2f; }
.ind-広告 { --industry-color: #f57c00; }
.ind-航空 { --industry-color: #0277bd; }
.ind-公務員 { --industry-color: #546e7a; }
.ind-外資 { --industry-color: #b71c1c; }
.ind-医療 { --industry-color: #1b5e20; }

/* ===== TOOLTIP ===== */
.tooltip {
  position: fixed;
  background: rgba(26,35,126,0.95);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  pointer-events: none;
  z-index: 300;
  max-width: 220px;
  line-height: 1.5;
  display: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ===== LOADING ===== */
.loading {
  display: none;
  text-align: center;
  padding: 60px;
  font-size: 24px;
  color: var(--text-sub);
}

/* ==========================================================
   静的生成ページ用（個別ページ・業種一覧・コラム・法務ページ）
   ========================================================== */

.page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* --- パンくず --- */
.breadcrumb {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 18px;
  word-break: break-word;
}
.breadcrumb a { color: var(--primary-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-current] { color: var(--text); }

/* --- 広告の明示（ステマ規制対応） --- */
.ad-disclosure {
  background: #eef1f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 18px;
}

/* --- 個別ページ見出し --- */
.detail-head {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  margin-bottom: 20px;
  border-top: 5px solid var(--primary);
}
.detail-head h1 {
  font-size: 26px;
  line-height: 1.35;
  margin-bottom: 10px;
}
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail-badges .chip {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef1f8;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.detail-badges a.chip:hover { background: #dde3f3; }
.detail-lead {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

/* --- 数値カード --- */
.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.figure-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  text-align: center;
}
.figure-num { font-size: 30px; font-weight: 900; color: var(--primary); line-height: 1.2; }
.figure-num.accent { color: var(--accent); }
.figure-num.muted { color: var(--text-sub); font-size: 22px; }
.figure-label { font-size: 12px; color: var(--text-sub); margin-top: 6px; }

/* --- セクション --- */
.section {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  margin-bottom: 20px;
}
.section h2 {
  font-size: 19px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.section h3 { font-size: 16px; margin: 20px 0 10px; }
.section p { margin-bottom: 12px; line-height: 1.9; }
.section ul, .section ol { margin: 0 0 14px 1.4em; }
.section li { margin-bottom: 7px; line-height: 1.85; }

/* --- 位置バー --- */
.position-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e3e7f3 0%, #c5cde8 100%);
  margin: 14px 0 8px;
}
.position-marker {
  position: absolute;
  top: -5px;
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--accent);
  transform: translateX(-50%);
}
.position-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-sub);
}

/* --- データテーブル --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 520px;
}
table.data th, table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
table.data th {
  background: #f2f4fb;
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 700;
}
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.name { white-space: normal; min-width: 200px; }
table.data tr:hover td { background: #fafbff; }
table.data a { color: var(--primary-light); text-decoration: none; }
table.data a:hover { text-decoration: underline; }
table.data tr.is-current td { background: #fff8e1; font-weight: 700; }

/* --- 出典 --- */
.source-box {
  background: #f7f8fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-sub);
}
.source-box dt { font-weight: 700; color: var(--text); margin-top: 8px; }
.source-box dt:first-child { margin-top: 0; }
.source-box a { color: var(--primary-light); }

/* --- 注意書き --- */
.caution {
  background: #fff8e1;
  border-left: 4px solid var(--warning);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: #6d4c00;
  margin-bottom: 18px;
}
.estimate-note {
  background: #e8f4fd;
  border-left: 4px solid #1565c0;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: #0d3c61;
  margin-bottom: 18px;
}

/* --- 関連リンク --- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.related-item {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, transform .15s;
}
.related-item:hover { border-color: var(--primary-light); transform: translateY(-1px); }
.related-item .r-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.related-item .r-meta { font-size: 12px; color: var(--text-sub); }

/* --- コラム本文 --- */
.article-body { font-size: 15.5px; line-height: 2; }
.article-body h2 {
  font-size: 21px;
  margin: 34px 0 14px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
}
.article-body h3 { font-size: 17px; margin: 26px 0 10px; color: var(--primary); }
.article-body p { margin-bottom: 17px; }
.article-body ul, .article-body ol { margin: 0 0 18px 1.5em; }
.article-body li { margin-bottom: 8px; }
.article-body .table-scroll { margin-bottom: 18px; }
/* min-width を持たせて、狭い画面では表を潰さず箱の中で横スクロールさせる */
.article-body table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.article-body th, .article-body td { padding: 9px 12px; border: 1px solid var(--border); text-align: left; }
.article-body th { background: #f2f4fb; }
.article-body blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 4px solid var(--primary-light);
  background: #f7f8fc;
  color: var(--text-sub);
}
.article-body a { color: var(--primary-light); }
.article-meta { font-size: 13px; color: var(--text-sub); margin-bottom: 20px; }

/* --- ページャ・一覧 --- */
.list-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.list-count { font-size: 14px; color: var(--text-sub); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row a {
  font-size: 13px; padding: 6px 13px; border-radius: 999px;
  background: #eef1f8; color: var(--primary);
  text-decoration: none; font-weight: 600;
}
.chip-row a:hover { background: #dde3f3; }
.chip-row a.is-active { background: var(--primary); color: #fff; }

/* --- ヒストグラム --- */
.histogram { display: flex; align-items: flex-end; gap: 5px; height: 150px; margin: 16px 0 6px; }
.histogram .bin { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.histogram .bin-bar { background: var(--primary-light); border-radius: 3px 3px 0 0; min-height: 2px; }
.histogram .bin-count { font-size: 11px; color: var(--text-sub); text-align: center; margin-bottom: 3px; }
.histogram-labels { display: flex; gap: 5px; }
.histogram-labels span { flex: 1; font-size: 10px; color: var(--text-sub); text-align: center; }

@media (max-width: 640px) {
  .detail-head { padding: 18px; }
  .detail-head h1 { font-size: 21px; }
  .section { padding: 18px; }
  .figure-num { font-size: 25px; }
  .article-body { font-size: 15px; }
}

/* ヘッダーナビはもともと <button> だったが、静的ページ化で <a> に変えたため
   リンクの下線が出てしまう。ボタンとしての見た目に戻す。 */
header .nav-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
