/*
Theme Name: GOLF100
Theme URI: https://golf100.jp
Author: PNX
Author URI: https://pnxsports.com
Description: GOLF100(ゴルフ100)専用テーマ。100歳までゴルフを続ける人の、体とスコアの守り方。シニア読者向けの大きな文字・高コントラスト・シンプルな導線を最優先に設計。
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: golf100
Tags: blog, one-column, custom-logo, custom-menu, featured-images, accessibility-ready
*/

/* ==========================================================================
   0. Design tokens (ブランド規定 v1.0)
   ========================================================================== */
:root {
  --g100-green: #0B5D3B;
  --g100-green-dark: #084A2F;
  --g100-green-light: #E3EFE9;
  --g100-gold: #E7A614;
  --g100-gold-dark: #B98008; /* テキストで使う場合の濃色 */
  --g100-cream: #F7F2E7;
  --g100-ink: #1A1A1A;
  --g100-text: #222222;
  --g100-muted: #5B6B62;
  --g100-line: #DDE3DF;
  --g100-white: #FFFFFF;
  --g100-danger: #B3261E;

  --g100-font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
  --g100-size: 18px;          /* シニア読者向け基準サイズ */
  --g100-lh: 1.9;
  --g100-measure: 720px;      /* 本文の最大幅 */
  --g100-wide: 1120px;
  --g100-radius: 12px;
  --g100-shadow: 0 2px 10px rgba(11, 93, 59, .08);
  --g100-tap: 48px;           /* タップ領域の最小 */
}
html[data-fontsize="large"] { --g100-size: 21px; }
html[data-fontsize="xlarge"] { --g100-size: 24px; }

/* ==========================================================================
   1. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--g100-size); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--g100-font); font-size: 1rem; line-height: var(--g100-lh);
  color: var(--g100-text); background: var(--g100-white);
  font-feature-settings: "palt" 0; word-break: normal; overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--g100-green); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--g100-green-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--g100-gold); outline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.45; color: var(--g100-ink); margin: 0 0 .6em; font-weight: 700; letter-spacing: .01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1.4em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .4em; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--g100-line); margin: 2.5em 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border: 1px solid var(--g100-line); padding: .6em .8em; text-align: left; vertical-align: top; }
th { background: var(--g100-cream); }
blockquote { margin: 1.5em 0; padding: .8em 1.2em; border-left: 5px solid var(--g100-gold); background: var(--g100-cream); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--g100-green); color: #fff; padding: .6em 1em; z-index: 1000; border-radius: 6px; }
.skip-link:focus { top: 8px; }
.wrap { max-width: var(--g100-wide); margin: 0 auto; padding: 0 20px; }
.measure { max-width: var(--g100-measure); margin-left: auto; margin-right: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: var(--g100-tap);
  padding: .65em 1.4em; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--g100-green);
  background: var(--g100-green); color: #fff; line-height: 1.3; cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--g100-green-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--g100-green); }
.btn--ghost:hover { background: var(--g100-green-light); color: var(--g100-green-dark); }
.btn--gold { background: var(--g100-gold); border-color: var(--g100-gold); color: var(--g100-ink); }
.btn--gold:hover { background: #d19510; border-color: #d19510; color: var(--g100-ink); }

/* ==========================================================================
   2. Header
   ========================================================================== */
.site-header { background: #fff; border-bottom: 1px solid var(--g100-line); position: relative; z-index: 50; }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-brand img, .site-brand svg { height: 44px; width: auto; display: block; }
.site-brand__tag { font-size: .8rem; color: var(--g100-muted); display: none; }
@media (min-width: 900px) { .site-brand__tag { display: block; } }
.header-tools { display: flex; align-items: center; gap: 8px; }
.fontsize-toggle { display: inline-flex; align-items: center; border: 2px solid var(--g100-green); border-radius: 999px; overflow: hidden; }
.fontsize-toggle span.label { padding: 0 .6em; font-size: 14px; color: var(--g100-green); font-weight: 700; white-space: nowrap; }
.fontsize-toggle button { background: #fff; border: 0; border-left: 1px solid var(--g100-green-light); min-width: 44px; min-height: 40px; font-weight: 700; color: var(--g100-green); cursor: pointer; white-space: nowrap; font-family: inherit; }
.fontsize-toggle button[aria-pressed="true"] { background: var(--g100-green); color: #fff; }
/* ヘッダー操作部は本文の拡大に連動させない(px固定) */
.fontsize-toggle button.small { font-size: 14px; } .fontsize-toggle button.large { font-size: 17px; } .fontsize-toggle button.xlarge { font-size: 20px; }
.search-toggle, .menu-toggle { background: #fff; border: 2px solid var(--g100-green); color: var(--g100-green); border-radius: 999px; min-height: 44px; padding: 0 14px; font-weight: 700; cursor: pointer; font-size: 15px; white-space: nowrap; font-family: inherit; }
.primary-nav { border-top: 1px solid var(--g100-line); background: var(--g100-cream); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.primary-nav li { margin: 0; }
.primary-nav a { display: block; padding: .8em 1.1em; text-decoration: none; font-weight: 700; color: var(--g100-green-dark); min-height: var(--g100-tap); }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { background: #fff; color: var(--g100-green); box-shadow: inset 0 -4px 0 var(--g100-gold); }
@media (max-width: 767px) {
  .site-header__bar { min-height: 64px; gap: 8px; }
  .site-brand img, .site-brand svg { height: 34px; }
  .header-tools { gap: 6px; }
  .fontsize-toggle button { min-width: 40px; min-height: 36px; }
  .fontsize-toggle button.xlarge { display: none; }
  .search-toggle, .menu-toggle { min-height: 40px; padding: 0 11px; font-size: 14px; }
  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { border-bottom: 1px solid var(--g100-line); font-size: 1.05rem; }
  .fontsize-toggle span.label { display: none; }
}
@media (min-width: 768px) { .menu-toggle { display: none; } }
.header-search { display: none; background: #fff; border-bottom: 1px solid var(--g100-line); padding: 12px 0; }
.header-search.is-open { display: block; }
.search-form { display: flex; gap: 8px; max-width: 640px; }
.search-form input[type="search"] { flex: 1; min-width: 0; min-height: var(--g100-tap); font-size: 1rem; padding: .4em .9em; border: 2px solid var(--g100-line); border-radius: 8px; font-family: inherit; }
.search-form button { min-height: var(--g100-tap); white-space: nowrap; flex: none; }

/* ==========================================================================
   3. Front page
   ========================================================================== */
.hero { background: var(--g100-cream); padding: 44px 0 40px; }
.hero__inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.15fr 1fr; } }
.hero__eyebrow { color: var(--g100-gold-dark); font-weight: 700; letter-spacing: .08em; font-size: .9rem; margin-bottom: .6em; }
.hero h1 { font-size: clamp(1.6rem, 2.6vw + 1rem, 2.4rem); line-height: 1.4; }
.hero p.lead { font-size: 1.05rem; color: var(--g100-text); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.2em; }
.hero__card { background: #fff; border-radius: var(--g100-radius); box-shadow: var(--g100-shadow); padding: 22px 24px; }
.hero__card h2 { font-size: 1.05rem; color: var(--g100-green); margin-bottom: .6em; }
.hero__card ul { margin: 0; padding-left: 1.2em; }
.section { padding: 44px 0; }
.section--cream { background: var(--g100-cream); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section__head h2 { margin: 0; font-size: 1.45rem; }
.section__head h2 small { display: block; font-size: .8rem; color: var(--g100-gold-dark); letter-spacing: .08em; font-weight: 700; margin-bottom: .2em; }
.section__more { font-weight: 700; }

/* Category tiles */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile { background: #fff; border: 2px solid var(--g100-line); border-radius: var(--g100-radius); padding: 18px 16px; text-decoration: none; display: block; min-height: 120px; color: var(--g100-ink); transition: border-color .15s; }
.tile:hover { border-color: var(--g100-green); color: var(--g100-green-dark); }
.tile__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--g100-green-light); display: grid; place-items: center; color: var(--g100-green); font-weight: 700; margin-bottom: 10px; font-size: 1rem; }
.tile__title { font-weight: 700; font-size: 1.05rem; display: block; }
.tile__desc { font-size: .85rem; color: var(--g100-muted); display: block; margin-top: .3em; line-height: 1.6; }

/* Cards */
.cards { display: grid; gap: 22px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } .cards--2 { grid-template-columns: repeat(2, 1fr); } }
.card { background: #fff; border-radius: var(--g100-radius); box-shadow: var(--g100-shadow); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--g100-line); }
.card__thumb { aspect-ratio: 16 / 9; background: var(--g100-green-light); display: block; overflow: hidden; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__thumb--placeholder { display: grid; place-items: center; color: var(--g100-green); }
.card__thumb--placeholder img { width: 42%; height: auto; object-fit: contain; opacity: .9; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__cat { font-size: .78rem; font-weight: 700; color: var(--g100-green); text-decoration: none; letter-spacing: .04em; }
.card__title { font-size: 1.08rem; line-height: 1.5; margin: 0; }
.card__title a { text-decoration: none; color: var(--g100-ink); }
.card__title a:hover { color: var(--g100-green); text-decoration: underline; }
.card__meta { font-size: .8rem; color: var(--g100-muted); margin-top: auto; display: flex; gap: .9em; flex-wrap: wrap; }
.card--horizontal { flex-direction: row; }
.card--horizontal .card__thumb { width: 38%; aspect-ratio: 4/3; }
.card--horizontal .card__body { width: 62%; }

/* CTA / product */
.cta { background: var(--g100-green); color: #fff; border-radius: var(--g100-radius); padding: 26px 26px; display: grid; gap: 18px; align-items: center; }
@media (min-width: 800px) { .cta { grid-template-columns: 1fr auto; } }
.cta h2, .cta h3 { color: #fff; margin: 0 0 .4em; font-size: 1.25rem; }
.cta p { margin: 0; color: #E9F2ED; }
.cta .btn { white-space: nowrap; }
.cta--product { background: var(--g100-cream); color: var(--g100-text); border: 2px solid var(--g100-gold); }
.cta--product h3 { color: var(--g100-ink); }
.cta--product p { color: var(--g100-text); }
.cta__label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--g100-gold-dark); display: block; margin-bottom: .3em; }
.disclosure { font-size: .78rem; color: var(--g100-muted); margin-top: .8em; }

/* Supervisors */
.people { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .people { grid-template-columns: repeat(3, 1fr); } }
.person { background: #fff; border-radius: var(--g100-radius); border: 1px solid var(--g100-line); padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.person__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--g100-green-light); flex: none; overflow: hidden; display: grid; place-items: center; color: var(--g100-green); font-weight: 700; }
.person__avatar img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-weight: 700; margin: 0; font-size: 1rem; }
.person__title { font-size: .85rem; color: var(--g100-muted); margin: 0 0 .3em; }
.person__bio { font-size: .88rem; margin: 0; line-height: 1.7; }

/* ==========================================================================
   4. Article
   ========================================================================== */
.breadcrumbs { font-size: .82rem; color: var(--g100-muted); padding: 14px 0 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4em; }
.breadcrumbs li::after { content: "›"; margin-left: .4em; color: #9AA8A0; }
.breadcrumbs li:last-child::after { content: ""; }
.entry-header { padding: 22px 0 10px; }
.entry-header .entry-cat { display: inline-block; background: var(--g100-green); color: #fff; font-size: .78rem; font-weight: 700; padding: .25em .8em; border-radius: 999px; text-decoration: none; margin-bottom: .8em; }
.entry-title { font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); line-height: 1.4; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .5em 1.4em; font-size: .85rem; color: var(--g100-muted); margin: .6em 0 0; }
.entry-meta b { color: var(--g100-text); font-weight: 700; }
.entry-thumb { margin: 20px 0 8px; border-radius: var(--g100-radius); overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { padding: 10px 0 30px; }
.entry-content > * { margin-left: auto; margin-right: auto; }
.entry-content h2 { font-size: 1.45rem; margin: 2.2em 0 .8em; padding: .5em .9em; border-left: 8px solid var(--g100-green); background: var(--g100-cream); border-radius: 0 8px 8px 0; }
.entry-content h3 { font-size: 1.2rem; margin: 1.8em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid var(--g100-green-light); }
.entry-content h4 { font-size: 1.05rem; margin: 1.5em 0 .5em; color: var(--g100-green-dark); }
.entry-content img { border-radius: 8px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .82rem; color: var(--g100-muted); text-align: center; margin-top: .5em; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content ul li::marker { color: var(--g100-green); }
.entry-content a { font-weight: 600; }
.entry-content .wp-block-button__link { border-radius: 999px; background: var(--g100-green); font-weight: 700; padding: .7em 1.5em; }

/* Key points box */
.keypoints { background: var(--g100-cream); border: 2px solid var(--g100-gold); border-radius: var(--g100-radius); padding: 18px 22px; margin: 18px auto 26px; }
.keypoints__title { font-weight: 700; color: var(--g100-green-dark); margin: 0 0 .5em; font-size: 1rem; display: flex; align-items: center; gap: .5em; }
.keypoints ul { margin: 0; padding-left: 1.3em; }
.keypoints li { margin-bottom: .35em; }

/* TOC */
.toc { background: #fff; border: 2px solid var(--g100-line); border-radius: var(--g100-radius); padding: 16px 22px; margin: 0 auto 30px; }
.toc summary { font-weight: 700; cursor: pointer; font-size: 1rem; color: var(--g100-green-dark); min-height: 32px; display: flex; align-items: center; gap: .5em; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::before { content: "▸"; color: var(--g100-gold); transition: transform .15s; }
.toc[open] summary::before { transform: rotate(90deg); }
.toc ol { margin: .8em 0 0; padding-left: 1.4em; counter-reset: toc; }
.toc ol li { margin-bottom: .4em; }
.toc ol ol { margin-top: .3em; padding-left: 1.2em; font-size: .92rem; list-style: none; }
.toc ol ol li::before { content: "–"; color: var(--g100-gold); margin-right: .4em; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Supervisor box */
.supervisor-box { display: flex; gap: 16px; align-items: flex-start; background: var(--g100-green-light); border-radius: var(--g100-radius); padding: 18px 20px; margin: 30px auto; }
.supervisor-box .person__avatar { width: 72px; height: 72px; background: #fff; }
.supervisor-box__label { font-size: .78rem; font-weight: 700; color: var(--g100-green); letter-spacing: .06em; margin: 0 0 .2em; }
.supervisor-box p { margin: 0; }
.supervisor-box .person__bio { margin-top: .4em; }
.supervisor-box a { font-weight: 700; }

/* References */
.references { margin: 30px auto; font-size: .88rem; }
.references h2 { font-size: 1.05rem; border: 0; background: none; padding: 0; margin: 0 0 .5em; color: var(--g100-green-dark); }
.references ol { padding-left: 1.4em; margin: 0; }
.references li { margin-bottom: .3em; }

/* Author / share / related */
.entry-footer { border-top: 1px solid var(--g100-line); padding: 26px 0; }
.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share span { font-size: .85rem; color: var(--g100-muted); font-weight: 700; }
.share .btn { min-height: 44px; padding: .4em 1em; font-size: .9rem; }
.related { padding: 34px 0 44px; background: var(--g100-cream); }
.entry-nav { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; padding: 22px 0; }
.entry-nav a { display: block; padding: 14px 16px; border: 2px solid var(--g100-line); border-radius: var(--g100-radius); text-decoration: none; color: var(--g100-ink); background: #fff; }
.entry-nav a small { display: block; font-size: .75rem; color: var(--g100-muted); margin-bottom: .2em; }
.entry-nav a:hover { border-color: var(--g100-green); }
.entry-nav .next { text-align: right; }

/* Notice */
.notice { font-size: .85rem; color: var(--g100-muted); background: #FBF9F4; border: 1px dashed var(--g100-line); padding: .9em 1.1em; border-radius: 8px; margin: 26px auto; }
.notice--medical { border-color: var(--g100-gold); }

/* ==========================================================================
   5. Archive / page / search / 404
   ========================================================================== */
.archive-header { background: var(--g100-cream); padding: 34px 0 28px; }
.archive-header h1 { margin: 0 0 .3em; }
.archive-header p { margin: 0; color: var(--g100-text); max-width: var(--g100-measure); }
.archive-body { padding: 34px 0 44px; }
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 34px 0 0; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: var(--g100-tap); min-height: var(--g100-tap); border: 2px solid var(--g100-line); border-radius: 8px; text-decoration: none; font-weight: 700; color: var(--g100-green); background: #fff; padding: 0 .6em; }
.pagination .page-numbers.current { background: var(--g100-green); border-color: var(--g100-green); color: #fff; }
.pagination .page-numbers:hover { border-color: var(--g100-green); }
.page-content { padding: 20px 0 50px; }
.error-404 { text-align: center; padding: 60px 0; }
.error-404 h1 { font-size: 2rem; }
.error-404 .btn { margin-top: 1em; }

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer { background: var(--g100-green); color: #E9F2ED; padding: 44px 0 30px; margin-top: 30px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--g100-gold); }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand img { height: 40px; width: auto; }
.footer-brand p { font-size: .9rem; margin: .8em 0 0; max-width: 42ch; }
.footer-nav h2 { color: #fff; font-size: .95rem; letter-spacing: .06em; margin-bottom: .6em; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: .45em; }
.footer-nav a { text-decoration: none; display: inline-block; min-height: 32px; }
.footer-nav a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.2); margin-top: 30px; padding-top: 18px; font-size: .8rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer-bottom p { margin: 0; }
.footer-disclaimer { font-size: .78rem; color: #CFE3D8; margin-top: 14px; max-width: 80ch; }

/* Back to top */
.to-top { position: fixed; right: 16px; bottom: 16px; min-width: 52px; min-height: 52px; border-radius: 50%; background: var(--g100-green); color: #fff; border: 2px solid #fff; box-shadow: var(--g100-shadow); display: none; place-items: center; font-weight: 700; z-index: 40; cursor: pointer; }
.to-top.is-visible { display: grid; }

/* Print */
@media print { .site-header, .site-footer, .to-top, .share, .cta, .related, .entry-nav { display: none !important; } body { font-size: 12pt; } }
