/* JL fan 共通CSS（案D）：トップページの css/design_d.css を元に、ほかのページ用に整えたもの。外部の素材・フォントは使っていません。 */
:root {
  --bg: #f4f7f5; --text: #1f2a24; --muted: #5d6b63; --link: #1e7e34; --line: #e3ebe6;
  --accent: #28a745; --accent-dark: #1e7e34; --accent-text: #1e7e34; --focus: rgba(40,167,69,.45);
  --header-bg: #ffffff; --header-text: #1f2a24; --header-shadow: 0 1px 0 #e3ebe6; --menu-btn-border: #d5e2da;
  --menu-bg: #ffffff; --menu-text: #1f2a24; --menu-hover: #eaf6ed;
  --panel-bg: #ffffff; --panel-border: #e3ebe6; --panel-shadow: 0 1px 2px rgba(16,40,24,.04), 0 4px 16px rgba(16,40,24,.06); --radius: 16px;
  --title: #1f2a24; --btn-text: #1e7e34; --input-border: #cfdcd4; --input-bg: #fff;
  --card-border: #f1d2d6; --card-bg: #fff; --card-head-bg: #fdf0f2; --card-head-text: #9b2335;
}
/* ---- 共通の骨組み ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: -apple-system, "BlinkMacSystemFont", "Helvetica Neue", Helvetica, "Arial", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
  font-size: 15px; line-height: 1.7;
  color: var(--text); background: var(--bg);
}
a { color: var(--link); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
img { vertical-align: middle; border: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
/* 画面には出さず、検索エンジン・読み上げ用に残す */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); color: var(--header-text); box-shadow: var(--header-shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
/* ロゴ：自作のSVG（img/illust/logo-jlfan.svg）。文字も線で描いているのでフォントは使わない */
.brand { display: inline-flex; align-items: center; }
.brand:hover, .brand:focus { text-decoration: none; }
.brand-logo { display: block; width: 105px; height: 44px; transition: transform .2s; }
.brand:hover .brand-logo, .brand:focus .brand-logo { transform: translateY(-1px); }
.menu-btn { width: 44px; height: 40px; border: 1px solid var(--menu-btn-border); border-radius: 10px; background: transparent; cursor: pointer; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--header-text); transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.site-menu { display: none; background: var(--menu-bg); border-top: 1px solid var(--line); }
.site-menu.show { display: block; }
.site-menu ul { list-style: none; margin: 0 auto; padding: 8px 16px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.site-menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--menu-text); }
.site-menu a .ill { width: 24px; height: 24px; }
.site-menu a span { min-width: 0; overflow-wrap: anywhere; }
.site-menu a:hover, .site-menu a:focus { background: var(--menu-hover); text-decoration: none; }

/* パネル（カード） */
main { padding-top: 24px; padding-bottom: 32px; }
.panel { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--radius); box-shadow: var(--panel-shadow); padding: 18px 20px; margin-bottom: 16px; }
.panel-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--title); display: flex; align-items: center; gap: 8px; }
.panel-title::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--accent); }
.panel p { margin: 0 0 12px; color: var(--muted); }
.panel p.lead { color: var(--text); }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid > .panel { margin-bottom: 0; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature { display: flex; flex-direction: column; }
.feature form { margin-top: auto; }

/* ボタン・入力 */
form { margin: 0; }
.btn { font: inherit; font-size: 14px; display: inline-block; padding: 7px 18px; border-radius: 999px; cursor: pointer; border: 1px solid var(--accent); background: transparent; color: var(--btn-text); transition: background-color .15s, color .15s; }
.btn:hover, .btn:focus { background: var(--accent); color: #fff; }
.btn:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-main { background: var(--accent); color: #fff; }
.btn-main:hover, .btn-main:focus { background: var(--accent-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search-form label { display: inline-flex; align-items: center; gap: 6px; }
select { font: inherit; font-size: 16px; min-width: 76px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text); }

/* 今日の誕生日（jl_player_cards の出力） */
.bday-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bday-list > div:not(.card) { display: none; }
.card { border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; background: var(--card-bg); }
.card-header { padding: 8px 12px; font-weight: 700; background: var(--card-head-bg); color: var(--card-head-text); }
.card-body { padding: 6px 12px; font-size: 14px; }
.card-body + .card-body { padding-top: 0; padding-bottom: 10px; color: var(--muted); }

/* お知らせ・このサイトについて */
.news, .about { list-style: none; margin: 8px 0 0; padding: 0; }
.news li { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.news li:last-child { border-bottom: 0; }
.news time { font-variant-numeric: tabular-nums; color: var(--accent-text); font-weight: 700; min-width: 92px; }
.about li { padding: 6px 0 6px 18px; position: relative; }
.about li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ページの先頭へ */
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.2); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.to-top.is-show { opacity: 1; visibility: visible; }

@media (max-width: 600px) {
  body { font-size: 15px; }
  .wrap { padding: 0 12px; }
  .panel { padding: 16px; }
  .grid-2, .grid-4, .bday-list { grid-template-columns: 1fr; }
  .site-menu ul { grid-template-columns: 1fr 1fr; }
  .brand-logo { width: 96px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .menu-btn, .site-menu, .to-top { display: none !important; } }

/* ---- イラスト・フッター ---- */

/* イラスト付きの見出し */
.ill { flex: none; }
.panel-title .ill { width: 28px; height: 28px; }
.panel-title:has(.ill)::before { display: none; }

/* フッターの上に芝のふち */
.site-footer { position: relative; margin-top: 18px; height: 40px; background: #1e7e34; display: flex; align-items: center; justify-content: center; }
.footer-name { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; line-height: 1; color: rgba(255,255,255,.85); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 12px; background: url("../img/illust/grass.svg") repeat-x left bottom / 120px 12px; }

/* ---- 案Dのほかのページ用 ---- */
.page { padding-top: 20px; }
.back-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.back-links.is-bottom { margin: 8px 0 0; }
.back-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--accent); background: #fff; color: var(--btn-text); font-size: 14px; }
.back-links a::before { content: "\2039"; margin-right: 6px; font-weight: 700; }
.back-links a.is-home::before { content: none; }
.back-links a:hover, .back-links a:focus { background: var(--accent); color: #fff; text-decoration: none; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.page-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--title); line-height: 1.3; }
.page-sub { margin: 2px 0 0; color: var(--muted); }
.page-head .ill { width: 48px; height: 48px; }

/* 人数の一覧（白いカード） */
/* 1行に1つずつ縦に並べる（どの画面幅でも）。広い画面では読みやすい幅（760px）までにする */
.count-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; grid-template-columns: 1fr; max-width: 760px; }
.count-list li { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 12px; box-shadow: var(--panel-shadow); padding: 12px 14px; }
.count-list .count-main { display: block; font-weight: 700; }
.count-list .count-note { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.note { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.total { margin: 12px 0 0; font-weight: 700; color: var(--accent-dark); }

@media (max-width: 600px) {
  .page { padding-top: 14px; }
  .page-title { font-size: 20px; }
  .page-head .ill { width: 40px; height: 40px; }
  .count-list { grid-template-columns: 1fr; gap: 10px; }
  .count-list li { padding: 10px 14px; }
}

/* 地方などのまとまりの見出し（出身地・母校・倶楽部の一覧） */
.group-title { margin: 22px 0 10px; font-size: 16px; font-weight: 700; color: var(--title); display: flex; align-items: center; gap: 8px; }
.group-title::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--accent); }
.page-head + .group-title { margin-top: 4px; }
.count-list .map { width: 26px; height: 26px; margin-right: 8px; }
.count-list li.is-empty { background: transparent; border-style: dashed; box-shadow: none; padding: 4px 14px; }

/* ランキングの順位 */
.card-header .rank { display: inline-block; min-width: 3.2em; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }

/* 倶楽部情報（情報・監督を横に2つ、スマホは縦に） */
.club-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.club-grid > .panel { margin-bottom: 0; }
.page-sub.club-name { font-size: 16px; font-weight: 700; color: var(--text); }
.info-list { list-style: none; margin: 6px 0 0; padding: 0; }
.info-list li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.info-list li:last-child { border-bottom: 0; }
.coach-card { margin-top: 10px; }
.panel-title + .bday-list { margin-top: 10px; }

/* ---- トップページ（index.php）用：css/design_d.css と同じ ---- */
.top-area { padding-top: 20px; }
.today { position: relative; overflow: hidden; }
.today::after { content: ""; position: absolute; right: -40px; top: -30px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, #eaf6ed 0 60%, transparent 61%); z-index: 0; pointer-events: none; }
.today > * { position: relative; z-index: 1; }
.today-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.today-head .panel-title { font-size: 20px; margin: 0; }
.today-head .panel-title::before { display: none; }
.today-none { padding: 6px 0 2px; }
.pitch-divider { height: 132px; margin: 10px 0 6px; background: url("../img/illust/pitch.svg") no-repeat center / auto 112px, linear-gradient(180deg, rgba(234,246,237,0) 0%, #eaf6ed 50%, rgba(234,246,237,0) 100%); }
.stats { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.stats-list { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; color: var(--text); }
.stats-list span { display: inline-flex; align-items: baseline; gap: 6px; }
.stats-list small { font-size: 12px; color: var(--muted); }
.stats-list b { font-size: 20px; color: var(--accent-dark); }

@media (max-width: 600px) {
  .club-grid { grid-template-columns: 1fr; }
  .group-title { margin-top: 18px; }
  .pitch-divider { height: 96px; margin: 4px 0 0; background-size: auto 80px, auto; }
  .today-head .ill { width: 56px; height: 50px; }
  .today::after { width: 130px; height: 130px; }
  .stats { align-items: flex-start; }
  .stats .ill { width: 40px; height: 40px; }
}

/* 倶楽部情報の選手：ポジションごとのまとまり（GK・DF・MF・FW で緑の濃さを変える） */
.posi-group { --posi: var(--accent); margin-top: 18px; }
.posi-group:first-of-type { margin-top: 12px; }
.posi-gk { --posi: #155d27; }
.posi-df { --posi: #1e7e34; }
.posi-mf { --posi: #28a745; }
.posi-fw { --posi: #2e8b57; }
.posi-other { --posi: #6c757d; }
.posi-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; padding: 8px 12px; border-left: 5px solid var(--posi); border-radius: 10px; background: #eaf6ed; font-size: 16px; font-weight: 700; color: var(--title); }
.posi-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 2.8em; padding: 2px 10px; border-radius: 999px; background: var(--posi); color: #fff; font-size: 14px; letter-spacing: .06em; }
.posi-ja { font-size: 15px; }
.posi-count { margin-left: auto; font-size: 14px; color: var(--accent-dark); }
.panel p.posi-none { margin: 0 0 4px; padding: 0 4px; font-size: 14px; }

/* ---- v5 修正1 ---- */
/* トップページ：誰がため・出身地友の会・母校de先輩後輩を3列に（スマホは1列） */
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* トップページ：倶楽部情報だけで1列を使う横長カード（パソコン：イラスト・文・Go を横に並べたまま、まとめてカードの中央に） */
.feature-wide { flex-direction: row; align-items: center; justify-content: center; gap: 20px; padding: 20px 24px; background: linear-gradient(90deg, #eaf6ed 0, var(--panel-bg) 22%, var(--panel-bg) 78%, #eaf6ed 100%); }
.feature-wide .ill { width: 96px; height: 96px; }
.feature-wide-text { flex: 0 1 auto; min-width: 0; }
.feature-wide .panel-title { font-size: 19px; }
.feature-wide .panel-title::before { display: block; }
.feature-wide p { margin: 0; }
.feature-wide form { margin-top: 0; flex: none; }
.feature-wide .btn { padding: 9px 30px; }
/* 倶楽部情報：合計人数はポジションのまとまりとは別の、小さな帯 */
.club-total { margin: 0 0 16px; padding: 10px 16px; text-align: center; background: var(--panel-bg); border: 1px solid var(--panel-border); border-top: 3px solid var(--accent); border-radius: 12px; box-shadow: var(--panel-shadow); }

@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .feature-wide { gap: 14px; padding: 16px; background: linear-gradient(90deg, #eaf6ed 0, #eaf6ed 80px, var(--panel-bg) 170px); flex-wrap: wrap; }
  .feature-wide .ill { width: 64px; height: 64px; }
  .feature-wide-text { flex-basis: calc(100% - 78px); }
  .feature-wide { justify-content: flex-start; }
  .feature-wide form { width: 100%; text-align: center; }
}
