﻿/* =========================================
   ベース設定・レイアウト
========================================= */
body {
  background-color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  color: #1e293b;
  margin: 0;
  padding: 16px 12px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* =========================================
   人物カード全体
========================================= */
.person-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

/* =========================================
   ヘッダー（通し番号＋アバター＋名前・読み＋Wiki を1行に並べる）
========================================= */
.person-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* アバター画像 */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-img {
  object-fit: cover;
  background-color: #e2e8f0;
  border: 2px solid #edf2f7;
}

/* 画像なしイニシャルバッジ */
.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  color: #475569;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid #edf2f7;
}

/* 人物メタ情報 */
.person-meta {
  flex: 1;
  min-width: 0; /* 文字あふれ防止 */
}

.name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

/* 人物名 */
.person-name {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wikipediaリンク */
.wiki-link {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #475569;
  background-color: #f8fafc;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.wiki-link:hover, .wiki-link:active {
  background-color: #e2e8f0;
  color: #1e293b;
  border-color: #94a3b8;
}

/* 他の言語版の同じ人物ページ（名前の右横。English / 中文 … をその言語の表記で） */
.lang-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 7px; /* 縦 横（横はおよそ半角1文字分） */
  max-width: 50%;
  flex-shrink: 1;
}
/* 言語リンクが多くても名前を潰さない */
.person-header .person-title {
  flex: 1 1 auto;
  min-width: 8em;
}
.lang-pages-icon {
  font-size: 12px;
  line-height: 1;
}
.lang-page-link {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background-color: #eff6ff;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.lang-page-link:hover, .lang-page-link:active {
  background-color: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}
/* *_kojin.php の件数見出し（東京都 荒川区：87人）の右横 */
.result-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 4px 0 14px;
}
.result-summary-row .result-summary {
  margin: 0;
}
.lang-pages-summary {
  flex: 1 1 260px; /* 見出しの右に収まらないときは右側の中で折り返す */
  max-width: none;
  justify-content: flex-start;
}
/* スマホ：名前の下の行に回す */
@media (max-width: 600px) {
  .person-header {
    flex-wrap: wrap;
  }
  .lang-pages {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    justify-content: flex-start;
  }
}

/* ふりがな */
.person-kana {
  display: inline-block;
  font-size: 12px;
  color: #64748b;
}

.person-job {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #0284c7;
  background-color: #e0f2fe;
  padding: 1px 6px;
  border-radius: 4px;
}

/* =========================================
   本文説明
========================================= */
.person-desc {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

/* =========================================
   共通タグスタイル（上・中・下 共通）
========================================= */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tag-group-top {
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.tag-group-mid,
.tag-group-bottom {
  margin-top: 8px;
}

/* セクション先頭ラベル（中：外国語Wikiのタイトル用） */
.tag-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 2px;
}

/* タグ本体 */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 16px;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.tag:active {
  transform: scale(0.96);
  opacity: 0.8;
}

/* --- 上：人物情報タグ --- */
/* 生年月日（オレンジ） */
.tag-date {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}

/* 生年（グリーン） */
.tag-year {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #dcfce7;
}

/* 地域（ライトブルー） */
.tag-area {
  background-color: #f0f9ff;
  color: #0369a1;
  border: 1px solid #e0f2fe;
}

/* 出身校（パープル） */
.tag-univ {
  background-color: #faf5ff;
  color: #7e22ce;
  border: 1px solid #f3e8ff;
}

/* --- 中：外国語Wikiタグ（インディゴ／ネイビー系） --- */
.tag-foreign-wiki {
  background-color: #eef2ff;
  color: #4338ca;
  border: 1px solid #e0e7ff;
}

/* 占い・属性情報のラッパー */
.fortune-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 6px;
}

/* 各項目の共通バッジスタイル */
.fortune-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

/* 星座：上品なパープル・ラベンダー系 */
.tag-seiza {
  background-color: #f3e8ff;
  color: #6b21a8;
  border-color: #e9d5ff;
}

/* 干支：温かみのあるアンバー・オレンジ系 */
.tag-eto {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

/* 九星気学：落ち着いたエメラルド・グリーン系 */
.tag-kyuusei {
  background-color: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

/* --- 下：市区町村の概要タグ（ティール／青緑系） --- */
.tag-city {
  background-color: #f0fdfa;
  color: #0f766e;
  border: 1px solid #ccfbf1;
}

/* =========================================
   ランキングタイトル中央寄せ（都市ランキングなど個別ページ用）
========================================= */
.ranking-title-center {
  justify-content: center;
  text-align: center;
}

/* =========================================
   フッター用スタイル
========================================= */
.site-footer {
    background-color: #1e293b; /* 落ち着いたダークスレートネイビー */
    color: #cbd5e1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 40px;
    border-top: 3px solid #3b82f6; /* アクセントカラーのブルーライン */
}

.footer-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 20px 20px 20px;
    box-sizing: border-box;
}

/* 2カラムレイアウト設定 */
.footer-main-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 36px;
    padding-bottom: 30px;
    border-bottom: 1px solid #334155;
}

/* 左カラム */
.footer-col-left {
    flex: 1 1 420px;
    max-width: 520px;
}

.footer-logo {
    display: inline-block;
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.footer-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 16px 0;
    line-height: 1.7;
}

/* 統計バッジエリア */
.footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    background-color: #334155;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stat-item i {
    color: #60a5fa;
}

.stat-item strong {
    color: #ffffff;
    font-weight: 600;
}

/* SNSエリア */
.footer-sns {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sns-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sns-icons {
    display: flex;
    gap: 10px;
}

.sns-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #334155;
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.sns-icons a:hover {
    background-color: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
}

/* 右カラム */
.footer-col-right {
    flex: 1 1 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: flex-start;
}

.footer-nav-group {
    min-width: 140px;
}

.footer-heading {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin: 0 0 12px 0;
    position: relative;
    padding-bottom: 6px;
}

.footer-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 24px;
    height: 2px;
    background-color: #3b82f6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a i {
    font-size: 11px;
    color: #64748b;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-links a:hover i {
    color: #60a5fa;
}

/* コピーライトエリア */
.footer-bottom {
    padding-top: 18px;
    text-align: center;
}

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

/* スマホ表示対応（レスポンシブ） */
@media screen and (max-width: 640px) {
    .site-footer {
        margin-top: 30px;
    }
    
    .footer-container {
        padding: 30px 16px 16px 16px;
    }

    .footer-main-row {
        flex-direction: column;
        gap: 28px;
    }

    .footer-col-left,
    .footer-col-right {
        max-width: 100%;
    }

    .footer-col-right {
        gap: 24px;
    }
}

/* =========================================================
   mystyle04.css の末尾に追加（データで見る・職業ランキング）
   色やすき間は related-box に合わせてあります。必要に応じて調整してください
   ========================================================= */

/* ---- データで見る（人物ページ） ---- */
.stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.stats-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}
.stats-list li:last-child {
    border-bottom: none;
}
.stats-name {
    font-weight: bold;
    min-width: 12em;
}
.stats-value strong,
.stats-rank strong {
    color: #0265B8;
    font-size: 1.1em;
}
.stats-rank small {
    color: #64748b;
}
.stats-note {
    margin-top: 8px;
    font-size: 0.85em;
    color: #64748b;
}

/* ---- 職業ランキング（一覧ページ） ---- */
.job-rank {
    list-style: none;
    margin: 0;
    padding: 0;
}
.job-rank li {
    display: grid;
    grid-template-columns: 2em minmax(6em, 10em) 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}
.job-rank-no {
    text-align: center;
    font-weight: bold;
    color: #0265B8;
}
.job-rank-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.job-rank-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}
.job-rank-bar span {
    display: block;
    height: 100%;
    background: #0265B8;
    border-radius: 5px;
}
.job-rank-n {
    font-size: 0.9em;
    color: #334155;
    white-space: nowrap;
}


/* データで見る：人物カードの枠（#person-container）の中、カードのすぐ下 */
.stats-box {
    margin: 24px 0 8px;
}
