﻿@charset "UTF-8";

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@500;700;900&display=swap");

/* ========================================
   全体・共通設定
======================================== */
:root {
    --accent-900: #14204a;
    --accent-700: #0265B8;
    --accent-600: #2354c9;
    --accent-500: #2f6fe0;
    --accent-400: #4d8bf5;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333333;
    background-color: #ffffff;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   メインコンテナ（幅制限と中央配置）
======================================== */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========================================
   1. ヘッダーエリア
======================================== */
header {
    text-align: center;
    padding: 26px 16px 0px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: linear-gradient(135deg, var(--accent-900) 0%, var(--accent-700) 45%, var(--accent-500) 100%);
}

header a {
    display: block;
}

header img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;   /* ← 追加 */
    top: 7px;             /* ← 追加：3px 下げる */
}

.header-sub-msg {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    /*margin: 12px 0;*/
	margin: 12px 0 0; 
    background-color: rgba(2, 101, 184, 0.08);
    border: 1px solid rgba(2, 101, 184, 0.25);
    border-radius: 999px;
}

/* ========================================
   2. 検索エリア
======================================== */
.search-container {
    margin: 4px 0 16px;
    position: relative;
    z-index: 2;
}

.search-form {
    display: flex;
    gap: 6px;
    background-color: #ffffff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(20, 32, 74, 0.18);
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 10px;
    font-size: 14px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px rgba(47, 111, 224, 0.15);
}

.search-select {
    flex-shrink: 0;
    padding: 10px 4px;
    font-size: 13px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background-color: #f7fafc;
    outline: none;
}

.search-btn {
    flex-shrink: 0;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-600) 0%, var(--accent-400) 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(35, 84, 201, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, background-color 0.2s;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(35, 84, 201, 0.45);
}

/* ========================================
   3. コンセプト説明文
======================================== */
.concept-box {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.6;
    padding: 14px 16px;
    background-color: var(--accent-700);
    border-left: 3px solid var(--accent-400);
    border-radius: 0 6px 6px 0;
    margin-bottom: 16px;
}

/* ========================================
   4. 広告 / ピックアップ枠
======================================== */
.ad-space {
    border: 1px dashed #cbd5e0;
    background-color: #fffaf0;
    color: #718096;
    font-size: 12px;
    text-align: center;
    padding: 18px 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* ========================================
   5. カテゴリ一覧
======================================== */
.category-section {
    margin-bottom: 24px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.category-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background-color: var(--accent-700);
    border: 1px solid var(--accent-700);
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.15s;
}

.category-card:hover {
    background-color: var(--accent-600);
    border-color: var(--accent-500);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(20, 32, 74, 0.2);
}

/* 奇数個の最後の要素を中央・全幅で配置 */
.category-card:last-child:nth-child(odd) {
    grid-column: span 2;
}

/* ========================================
   6. 多言語エリア
======================================== */
.multilingual-section {
    margin-bottom: 32px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.multilingual-title {
    font-size: 15px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.multilingual-desc {
    font-size: 12px;
    color: #718096;
    margin-bottom: 12px;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.lang-item {
    display: block;
    text-align: center;
    font-size: 12px;
    padding: 8px 4px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #4a5568;
    transition: border-color 0.2s, color 0.2s;
}

.lang-item:hover {
    border-color: var(--accent-500);
    color: var(--accent-600);
}

/* トップページの外国語ボタン（5列×2段。色は .category-card と同じ） */
.lang-btn-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
@media (max-width: 600px) {
    .lang-btn-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 64px;
    padding: 10px 6px;
    background-color: var(--accent-700);
    border: 1px solid var(--accent-700);
    border-radius: 6px;
    color: #ffffff;
    text-align: center;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.lang-btn:hover {
    background-color: var(--accent-600);
    border-color: var(--accent-500);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(20, 32, 74, 0.2);
}
.lang-btn-name {
    font-family: 'Nunito', 'Noto Sans SC', 'Noto Sans KR', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    word-break: keep-all;
    hyphens: auto;            /* 長い単語は言語の規則でハイフンを入れて折り返す（Persönlich-keiten） */
    overflow-wrap: break-word;
}
.lang-btn-name:lang(zh) {
    font-family: 'Noto Sans SC', sans-serif;
}
.lang-btn-name:lang(ko) {
    font-family: 'Noto Sans KR', sans-serif;
}
.lang-btn-ja {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
}

/* ========================================
   フッターエリア
======================================== */
.site-footer {
    width: 100%;
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
    padding: 32px 0 24px;
    margin-top: 40px;
}

.footer-grid,
.footer-bottom {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    margin-bottom: 24px;
}

/* フッターリンク文字（中央揃え・太字指定） */
.footer-grid-item {
    display: block;
    text-align: center; /* 各列の中で文字を中央揃え */
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    background-color: var(--accent-700);
    border-radius: 6px;
    padding: 10px 6px;
    transition: background-color 0.2s;
}

.footer-grid-item:hover {
    background-color: var(--accent-600);
}

.footer-bottom {
    border-top: 1px solid #edf2f7;
    padding-top: 16px;
    text-align: center; /* コピーライトの中央揃え */
}

.copyright {
    font-size: 12px;
    color: #a0aec0;
    margin: 0;
}

/* ========================================
   連動プルダウン選択エリア（*_ken.php 共通）
======================================== */
.select-form-group {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    flex-wrap: wrap;
}

.select-box-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-box-wrap label {
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
}

.custom-select {
    padding: 10px 12px;
    font-size: 1rem;
    border: 2px solid #333;
    border-radius: 4px;
    background-color: #fff;
    min-width: 220px;
    outline: none;
    cursor: pointer;
}

.custom-select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    border-color: #ccc;
}

.selected-result {
    font-weight: bold;
    margin: 16px 0;
    color: #0369a1;
    text-align: center;
}

/* ========================================
   ランキング（人気順クイックリンク）エリア
   *_ken.php 第二階層の select と footer の間に表示
======================================== */
.ranking-section {
    margin: 24px 0;
    padding: 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ranking-title {
    font-size: 14px;
    font-weight: bold;
    color: #2d3748;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
}

.ranking-rank {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-700);
    color: #ffffff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
}

.ranking-name {
    flex: 1;
    color: #2d3748;
    font-weight: 500;
}

.ranking-count {
    flex-shrink: 0;
    color: #718096;
    font-size: 12px;
    white-space: nowrap;
}

/* ========================================
   *_kojin.php 系ページ共通スタイル
   （件数表示・表示件数/ページング・もっと読む）
======================================== */
.result-summary {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 14px;
}
.result-summary .result-count {
    color: var(--accent-700, #0265B8);
    font-size: 20px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.pagesize-form {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}
.pagesize-form select {
    padding: 6px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    color: #334155;
    background: #fff;
}
.pagination a:hover {
    background-color: #f1f5f9;
}
.pagination .current {
    background-color: var(--accent-700, #0265B8);
    border-color: var(--accent-700, #0265B8);
    color: #fff;
    font-weight: bold;
}
.pagination .disabled {
    color: #cbd5e0;
}
.pagination .ellipsis {
    border: none;
    background: none;
}

.read-more-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 0;
    background: none;
    border: none;
    color: var(--accent-600, #2354c9);
    font-size: 12.5px;
    font-weight: bold;
    cursor: pointer;
}
.read-more-btn:hover {
    text-decoration: underline;
}

.no-result {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* ========================================
   人物簡易リスト（*_ken.php 系の絞り込み結果を1行で連番表示）
======================================== */
.list-count-summary {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 12px;
}
.person-simple-list {
    margin: 0 0 16px;
    padding-left: 1.6em;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.person-simple-list li {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.5;
}
.person-simple-list a {
    color: var(--accent-700, #0265B8);
    font-weight: bold;
    text-decoration: none;
}
.person-simple-list a:hover {
    text-decoration: underline;
}
/* 簡易一覧：名前は個人ページへ、その後ろに小さく Wikipedia へのリンク */
.person-simple-list a.simple-wiki-link {
    font-size: 11px;
    font-weight: normal;
    color: #64748b;
    margin-left: 2px;
}
.person-simple-list .ext-link-icon {
    font-size: 0.85em;
}
.view-profile-link {
    text-align: center;
    margin: 8px 0 16px;
}
.view-profile-link a {
    display: inline-block;
    padding: 8px 20px;
    background: #0265B8;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
}

/* ========================================
   多層検索（*_kojin.php 系ページ共通）
======================================== */
.multi-search {
    margin-bottom: 20px;
    padding: 14px 14px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.multi-search-title {
    font-size: 15px;
    font-weight: bold;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.multi-search-sub {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 12px;
}
.multi-search-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* 選択欄：見出しを上に置き、全幅で縦に並べる */
.multi-search-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}
.multi-search-row label {
    font-size: 13px;
    font-weight: bold;
    color: #334155;
    margin-top: 6px;
}
.multi-search-row label:first-child {
    margin-top: 0;
}
.multi-search-row select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: #1e293b;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background-color: #fff;
}
/* 前の項目が未選択の欄はグレーにして選べなくする */
.multi-search-row select:disabled {
    color: #94a3b8;
    background-color: #eef1f4;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.multi-search-row label:has(+ select:disabled) {
    color: #a0aec0;
}
/* タブ：2列×2段の同じ大きさのボタン（奇数個なら最後を横いっぱいに） */
.multi-search-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}
.multi-search-tab {
    padding: 9px 6px;
    font-size: 13px;
    font-weight: bold;
    color: #475569;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}
.multi-search-tab:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
.multi-search-tab.active {
    color: #fff;
    background: var(--accent-700, #0265B8);
    border-color: var(--accent-700, #0265B8);
}
.multi-search-panes {
    margin-bottom: 4px;
}
.multi-search-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 14px;
    text-align: center;
}
.multi-search-submit {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent-600, #2354c9) 0%, var(--accent-400, #4d8bf5) 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
.multi-search-clear {
    font-size: 12px;
    color: #64748b;
    text-decoration: underline;
}
.active-filter-note {
    font-size: 12px;
    color: #0369a1;
    margin-top: 8px;
}

/* =========================================
   人物カード（render_kojin_card）：ヘッダー1行化・職業タグ・タグのリンク
========================================= */
/* ページをまたいだ通し番号 */
.person-no {
  flex-shrink: 0;
  min-width: 2em;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 名前＋読み（横並び。スマホなど幅が足りないときは読みを名前の下に回す） */
.person-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
}
.person-title .person-name {
  flex-shrink: 0;
  max-width: 100%;
}

/* 職業タグ（ローズ系） */
.tag-job {
  background-color: #fff1f2;
  color: #be123c;
  border: 1px solid #ffe4e6;
}

/* 一覧ページへのリンクになっているタグ */
.tag-link {
  text-decoration: none;
  cursor: pointer;
}
.tag-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========================================
   人物カード：名前から個人ページ（jinbutsu.php）へのリンク
======================================== */
.person-name-link {
  color: var(--accent-700, #0265B8);
  text-decoration: none;
}
.person-name-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
h1.person-name {
  font-size: 22px;
}

/* ========================================
   検索結果（kensaku.php）
======================================== */
.kensaku-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}
.kensaku-jump a {
  font-size: 13px;
  color: var(--accent-700, #0265B8);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 4px 12px;
}
.kensaku-section {
  margin: 0 0 36px;
}
.kensaku-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 2px solid var(--accent-700, #0265B8);
  padding-bottom: 6px;
  margin: 0 0 16px;
}
.kensaku-section-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-700, #0265B8);
  margin-left: 6px;
}
.kensaku-empty {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 8px;
}
/* 種類（都道府県・市町村・大学…）ごとの箱。種類が変わる所は間を空ける */
.kensaku-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 20px;
}
.kensaku-group-title {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 8px;
}
.kensaku-group-title span {
  font-weight: 400;
  color: #64748b;
  font-size: 12px;
}
/* 黒丸は見出しの「出身」の「身」あたりから始める */
.kensaku-items {
  list-style: disc;
  margin: 0;
  padding: 0 0 0 2.9em;
}
.kensaku-items li {
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.6;
}
.kensaku-items li::marker {
  color: #64748b;
}
.kensaku-items a {
  color: var(--accent-700, #0265B8);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.kensaku-items a:hover {
  text-decoration: underline;
}
.kensaku-items li.is-exact a::before {
  content: "一致";
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: var(--accent-700, #0265B8);
  border-radius: 4px;
  padding: 0 5px;
  margin-right: 6px;
  vertical-align: 1px;
}
.kensaku-item-count {
  font-size: 12px;
  color: #64748b;
  margin-left: 8px;
  white-space: nowrap;
}
.kensaku-more summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent-600, #2354c9);
  padding: 8px 0 2px 1.9em;
}
.kensaku-more[open] summary {
  margin-bottom: 4px;
}
.kensaku-range {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 12px;
}
.kensaku-person-list {
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
}
.kensaku-person {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}
.kensaku-person-body {
  min-width: 0;
  flex: 1;
}
.kensaku-person-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
}
.kensaku-person-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-700, #0265B8);
}
.kensaku-person-name:hover {
  text-decoration: underline;
}
.kensaku-person-name mark {
  background: #fef08a;
  color: inherit;
  padding: 0 1px;
}
.kensaku-person-kana {
  font-size: 12px;
  color: #64748b;
}
.kensaku-person-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  font-size: 12.5px;
  color: #475569;
  margin-top: 4px;
}

/* ========================================
   個人ページ（jinbutsu.php）：パンくず・関連する人物
======================================== */
.breadcrumb {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.breadcrumb a {
  color: var(--accent-700, #0265B8);
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  margin: 0 6px;
  color: #94a3b8;
}
.related-box {
  margin: 32px 0 36px;
}
.related-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 2px solid var(--accent-700, #0265B8);
  padding-bottom: 6px;
  margin: 0 0 16px;
}
.related-group {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 0 20px;
}
.related-head {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 8px;
}
/* 見出し（日本大学出身の有名人 など）から一覧ページへ */
.related-head-link {
  color: var(--accent-700, #0265B8);
  text-decoration: none;
}
.related-head-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.related-names {
  list-style: disc;
  margin: 0;
  padding: 0 0 0 2.9em;
}
.related-names li {
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}
.related-names li::marker {
  color: #64748b;
}
.related-names a {
  color: var(--accent-700, #0265B8);
  font-weight: 700;
}
.related-names a:hover {
  text-decoration: underline;
}
.related-job {
  font-size: 12px;
  color: #64748b;
}
.related-foot {
  margin: 8px 0 0 1.9em;
  font-size: 13px;
}
.related-rest {
  color: #64748b;
  margin-right: 10px;
}
.related-more {
  color: var(--accent-600, #2354c9);
}
.related-more:hover {
  text-decoration: underline;
}

/* ========================================
   info01〜04.php（このサイトについて・お問い合わせ・プライバシーポリシー・免責事項）
======================================== */
.info-page {
  margin-top: 24px;
}
.info-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-900);
  border-left: 5px solid var(--accent-700);
  padding: 4px 0 4px 12px;
  margin: 0 0 20px;
}
.info-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px 20px 8px;
  margin-bottom: 24px;
  line-height: 1.85;
  color: #1e293b;
}
.info-box h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-700);
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  margin: 0 0 12px;
}
.info-box h2:not(:first-child) {
  margin-top: 24px;
}
.info-box p {
  margin: 0 0 12px;
}
.info-box ul,
.info-box ol {
  margin: 0 0 12px;
  padding-left: 1.6em;
}
.info-box ul {
  list-style: disc;
}
.info-box ol {
  list-style: decimal;
}
.info-box li {
  margin-bottom: 4px;
}
.info-box a {
  color: var(--accent-600);
  text-decoration: underline;
}
.info-count {
  font-weight: 700;
  color: var(--accent-700);
}
.info-lang-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 14px;
}
.info-lang-table th,
.info-lang-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
}
.info-lang-table th {
  background: #f1f5f9;
  text-align: left;
  font-weight: 700;
}
.info-lang-table td {
  text-align: right;
}
.info-note {
  font-size: 13px;
  color: #64748b;
}
.info-marker {
  background: linear-gradient(transparent 60%, #fde68a 60%);
  font-weight: 700;
}
.info-updated {
  text-align: right;
  font-size: 13px;
  color: #64748b;
}

/* お問い合わせフォーム（info02.php） */
.info-form label {
  display: block;
  font-weight: 700;
  margin: 16px 0 6px;
}
.info-form select,
.info-form input[type="text"],
.info-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}
.info-form textarea {
  height: 10em;
  resize: vertical;
}
.info-form .info-auth-word {
  display: inline-block;
  font-family: monospace;
  font-size: 18px;
  letter-spacing: 0.15em;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
  padding: 0 8px;
  margin: 0 2px;
}
.info-notice {
  background: #f8fafc;
  border-left: 4px solid var(--accent-400);
  padding: 10px 14px;
  margin: 16px 0;
  font-size: 14px;
}
.info-notice p {
  margin: 0 0 8px;
}
.info-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 12px;
}
.info-btn {
  display: inline-block;
  min-width: 140px;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  background: var(--accent-700);
  text-align: center;
  text-decoration: none !important;
}
.info-btn:hover {
  background: var(--accent-600);
}
.info-btn-sub {
  color: var(--accent-700) !important;
  background: #fff;
  border: 1px solid var(--accent-700);
}
.info-btn-sub:hover {
  background: #eff6ff;
}
.info-check-list {
  list-style: none !important;
  padding-left: 0 !important;
}
.info-check-list li {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.info-check-list .info-check-label {
  display: block;
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
}
.info-error {
  color: #dc2626;
  font-weight: 700;
}

/* 出典表示（ウィキペディア CC BY-SA 4.0）：人物ページの概要の下・フッター */
.person-source {
  font-size: 12px;
  color: #64748b;
  margin: -4px 0 10px;
}
.person-source a,
.footer-source a {
  color: inherit;
  text-decoration: underline;
}
.footer-source {
  font-size: 12px;
  color: #718096;
  margin: 0 0 8px;
}

/* ========================================
   PC版レイアウト（画面幅1024px以上）
   スマホ・タブレット（1023px以下）は今まで通りの640px幅・1列表示。
   PHP（HTML）は変えず、各ページの部品の並びをCSSグリッドで2列に組み替える。
   ページの種類は「そのページにだけある部品」で見分ける（:has）。
     ・一覧ページ（*_kojin.php）… 絞り込み検索（#filterForm .multi-search）がある
         → 左：絞り込み検索（スクロールしても付いてくる）／右：件数・人物カード
     ・選択ページ（*_ken.php）  … ランキング（.ranking-section）がある
         → 左：プルダウン・選択結果／右：ランキング
     ・個人ページ（jinbutsu.php）… 関連する人物（.related-box）がある
         → 左：人物カード／右：関連する人物
======================================== */
@media (min-width: 1024px) {

    /* --- 共通：幅を広げる --- */
    /* ヘッダーの横幅（100vw）がPCのスクロールバー分はみ出して横スクロールが出るのを防ぐ */
    html {
        overflow-x: clip;
    }
    .container {
        max-width: 1200px;
        padding: 0 24px;
    }

    /* ヘッダー画像は横いっぱいに伸ばさず、ほどよい大きさで中央に */
    header a {
        max-width: 760px;
        margin: 0 auto;
    }

    /* キーワード検索窓は中央にほどよい幅で */
    .search-container {
        width: 100%;
        max-width: 760px;
        margin: 4px auto 24px;
    }

    /* --- トップページ：カテゴリを5列×2段に --- */
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
    .category-card {
        padding: 20px 10px;
        font-size: 15px;
    }
    .category-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    /* --- フッター：4つのリンクを横1列に --- */
    .footer-grid,
    .footer-bottom {
        max-width: 1200px;
        padding: 0 24px;
    }
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* --- 一覧ページ（*_kojin.php）：左に絞り込み検索、右に人物カード --- */
    .container:has(> #filterForm .multi-search) {
        display: grid;
        grid-template-columns: 300px minmax(0, 1fr);
        column-gap: 32px;
        align-items: start;
    }
    .container:has(> #filterForm .multi-search) > *,
    .container:has(> #filterForm .multi-search) > #filterForm > * {
        grid-column: 2;
    }
    .container:has(> #filterForm .multi-search) > header,
    .container:has(> #filterForm .multi-search) > .search-container {
        grid-column: 1 / -1;
    }
    /* フォームの箱を消して、中の部品（表示件数・ページ送り・絞り込み検索）を直接グリッドに並べる
       （フォームとしての送信はそのまま動く） */
    .container:has(> #filterForm .multi-search) > #filterForm {
        display: contents;
    }
    /* 絞り込み検索：ヘッダー・検索窓の下（3行目）から最後まで左の列を使い、スクロールしても画面に残す */
    .container:has(> #filterForm .multi-search) > #filterForm > .multi-search {
        grid-column: 1;
        grid-row: 3 / span 40;
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
        margin-bottom: 0;
    }

    /* --- 選択ページ（*_ken.php）：左にプルダウンと選択結果、右にランキング --- */
    .container:has(> .ranking-section) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 360px;
        column-gap: 32px;
        align-items: start;
    }
    .container:has(> .ranking-section) > * {
        grid-column: 1;
    }
    .container:has(> .ranking-section) > header,
    .container:has(> .ranking-section) > .search-container,
    .container:has(> .ranking-section) > .concept-box,
    .container:has(> .ranking-section) > .ad-space {
        grid-column: 1 / -1;
    }
    /* ヘッダー・検索窓・説明文・広告枠（4行）の下から右の列に */
    .container:has(> .ranking-section) > .ranking-section {
        grid-column: 2;
        grid-row: 5 / span 40;
        margin-top: 0;
    }

    /* --- 個人ページ（jinbutsu.php）：左に人物カード、右に関連する人物 --- */
    .container:has(> .related-box) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 360px;
        column-gap: 32px;
        align-items: start;
    }
    .container:has(> .related-box) > * {
        grid-column: 1 / -1;
    }
    .container:has(> .related-box) > #person-container {
        grid-column: 1;
    }
    /* ヘッダー・検索窓・パンくず（3行）の下から右の列に */
    .container:has(> .related-box) > .related-box {
        grid-column: 2;
        grid-row: 4 / span 40;
        margin-top: 0;
    }

    /* --- 検索結果（kensaku.php）：箱と人物を2列に --- */
    #kensaku-other {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px;
        align-items: start;
    }
    #kensaku-other > .kensaku-section-title,
    #kensaku-other > .kensaku-empty {
        grid-column: 1 / -1;
    }
    .kensaku-person-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
    }

    /* --- info01〜04.php：文章は読みやすい幅に --- */
    .info-page {
        max-width: 880px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ========================================
   個人ページ（jinbutsu.php）：出身地の名所・観光スポット
   見た目は「関連する人物」（.related-*）と共通
======================================== */
.meisho-box {
  margin: 32px 0 36px;
}
/* PC版：人物カードの下（左の列）に置く */
@media (min-width: 1024px) {
  .container:has(> .related-box) > .meisho-box {
    grid-column: 1;
  }
}

/* ========================================
   タップしやすい間隔（body.tap-roomy のページだけ）
   2026-10-28 まず sichouson_kojin.php で試行。良ければ他ページの body にも付ける
   目安：リンク・ボタンの高さ 36〜44px、隣どうしの間隔 8〜10px
======================================== */
/* 件数見出しの右の言語リンク（English / 中文 …）と人物カード内の言語リンク */
.tap-roomy .lang-pages {
  gap: 10px 10px;
}
.tap-roomy .lang-page-link {
  font-size: 13px;
  padding: 8px 14px;
}
.tap-roomy .result-summary-row {
  gap: 12px 20px;
  margin: 8px 0 18px;
}
/* ページ送り */
.tap-roomy .pagination {
  gap: 6px;
  margin: 20px 0;
}
.tap-roomy .pagination a,
.tap-roomy .pagination span {
  min-width: 38px;
  height: 40px;
  font-size: 14px;
}
/* 「…」はタップしないので幅を詰め、スマホでも1行に収める */
.tap-roomy .pagination .ellipsis {
  min-width: 16px;
  padding: 0;
}
/* 絞り込み検索のタブ */
.tap-roomy .multi-search-tabs {
  gap: 10px;
  margin-bottom: 18px;
}
.tap-roomy .multi-search-tab {
  padding: 12px 6px;
  font-size: 14px;
}
/* 人物カード：Wiki・タグ・もっと読む */
.tap-roomy .wiki-link {
  font-size: 12px;
  padding: 7px 12px;
}
.tap-roomy .person-header {
  row-gap: 10px;
}
.tap-roomy .read-more-btn {
  padding: 8px 12px 8px 0;
  font-size: 13.5px;
}
.tap-roomy .tag-group {
  gap: 10px 8px;
}
.tap-roomy .fortune-box {
  gap: 10px 8px;
  margin-top: 10px;
}
.tap-roomy .tag-group-mid,
.tap-roomy .tag-group-bottom {
  margin-top: 10px;
}
.tap-roomy .tag,
.tap-roomy .fortune-tag {
  font-size: 13px;
  padding: 7px 12px;
}
.tap-roomy .person-card {
  margin-bottom: 20px;
}

/* ---- Cookie同意バナー（js/consent.js、2026-10-29）：EEA・英国・スイスの訪問者だけに出る ---- */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid #ccc;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}
.consent-banner-text {
  margin: 0;
  max-width: 720px;
}
.consent-banner-text a {
  color: #1a5fb4;
  text-decoration: underline;
}
.consent-banner-buttons {
  display: flex;
  gap: 10px;
}
.consent-btn {
  min-width: 110px;
  padding: 8px 16px;
  border: 1px solid #1a5fb4;
  border-radius: 6px;
  background: #fff;
  color: #1a5fb4;
  font-size: 14px;
  cursor: pointer;
}
.consent-btn:hover {
  background: #eef4fc;
}

/* 生年・年代のように「どちらか1つを選ぶ」プルダウンの上に出す案内（tannen_ken.php・外国語版 2026-10-29） */
.select-either-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #eff6ff;
  border-left: 4px solid #2563eb;
  border-radius: 6px;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.select-either-note i {
  color: #2563eb;
}
