/* ==========================================================================
   ごじゃっぺライフ
   読み手ファースト：本文は 680px の1列・端末の標準ゴシック・16px 以上。
   見出しとサイトの声（メニュー・ラベル）だけ丸ゴシック（Zen Maru Gothic）。
   ========================================================================== */

/* ---------- 1. 設定 ---------- */
:root {
  --accent: #1b9c85;       /* 元サイトの緑（線・面に使う） */
  --accent-dk: #137563;    /* 文字とボタンに使う緑（白い文字・白地の文字とも 4.5:1 以上） */
  --accent-bg: #edf6ee;
  --ink: #26292e;
  --ink-strong: #1d2026;
  --sub: #646a73;
  --line: #e4e7e4;
  --surface: #f7f8f6;
  --marker: #ffe3b3;
  --danger: #a93226;
  --danger-bg: #fdecea;

  --measure: 680px;        /* 本文の幅 */
  --wide: 1080px;          /* 一覧の幅 */
  --gutter: 20px;
  --radius: 12px;

  --font-round: "Zen Maru Gothic", "BIZ UDPGothic", sans-serif;  /* 太字（700）の見出しとボタンだけに使う */
  --font-text: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
}

/* ---------- 2. 土台 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: .02em;
}
a { color: var(--accent-dk); }
img, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-round); font-weight: 700; line-height: 1.45; letter-spacing: .03em; color: var(--ink-strong); overflow-wrap: anywhere; }
/* 大きな見出しだけ文節で折り返す（対応ブラウザのみ）。計算が重いので、数の多いカードの題名には使わない */
.post__title, .arch-head h1 { word-break: auto-phrase; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; padding: 8px 16px; background: #fff; border-radius: 8px; }

/* ---------- 3. 部品 ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid var(--accent-dk);
  border-radius: 999px;
  background: var(--accent-dk);
  color: #fff;
  font-family: var(--font-round);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }
.btn--ghost { background: #fff; color: var(--accent-dk); }
.btn--ghost:hover { background: var(--accent-bg); color: var(--accent-dk); }
.btn--block { display: block; width: 100%; }

.pill {
  display: inline-block;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-dk);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips a {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
}
.chips a:hover { border-color: var(--accent); color: var(--accent-dk); }
.chips__count { margin-left: 6px; color: var(--sub); }

.big-search { display: flex; max-width: 560px; margin: 0 auto; }
.big-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 999px 0 0 999px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}
.big-search button {
  padding: 0 24px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--accent-dk);
  color: #fff;
  font-family: var(--font-round);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.more { margin: 40px 0 0; text-align: center; }

/* 記事カード */
/* minmax(0, 1fr)：文節で折り返す長い題名に、列の幅を広げさせない */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.card a { display: block; color: var(--ink); text-decoration: none; }
.card__pic { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.card__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card a:hover .card__pic img { transform: scale(1.03); }
.card__noimg { display: block; width: 100%; height: 100%; background: var(--accent-bg); }
.card__body { padding: 12px 2px 0; }
.card__cat { color: var(--accent-dk); font-size: 16px; font-weight: 500; }
.card__title { margin: 4px 0 6px; font-size: 18px; line-height: 1.55; }
.card__ex { margin: 0 0 6px; color: var(--sub); font-size: 16px; line-height: 1.75; }
.card__ex mark { background: var(--marker); color: inherit; }
.card__meta { margin: 0; color: var(--sub); font-size: 16px; }

/* ページ送り */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 56px 0 0; font-weight: 500; }
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}
.pager a:hover { border-color: var(--accent); }
.pager .pager__cur { border-color: var(--accent-dk); background: var(--accent-dk); color: #fff; }
.pager .pager__gap { min-width: 20px; padding: 0; border: 0; }

/* リンクカード（本文中の「あわせて読みたい」） */
.linkcard {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 2em 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.linkcard:hover { background: var(--surface); }
.linkcard img { flex: none; width: 120px; aspect-ratio: 16 / 10; margin: 0; object-fit: cover; border-radius: 8px; }
.linkcard__label { display: block; color: var(--sub); font-size: 16px; }
.linkcard__title { display: block; font-family: var(--font-round); font-weight: 700; line-height: 1.5; }

/* ---------- 4. ヘッダー ---------- */
.site-header { position: relative; border-bottom: 1px solid var(--line); background: #fff; }
.site-header__inner { display: flex; align-items: center; gap: 24px; max-width: var(--wide); margin: 0 auto; padding: 14px var(--gutter); }
.logo { flex: none; }
.logo img { display: block; width: 200px; height: auto; }
.gnav { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 16px; font-weight: 500; }
.gnav__list { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.gnav__item { position: relative; display: flex; align-items: center; }
.gnav a, .gnav__label { color: var(--ink); text-decoration: none; white-space: nowrap; }
.gnav a:hover { color: var(--accent-dk); }
.gnav__label { cursor: pointer; }
.sub-toggle { padding: 0 0 0 4px; border: 0; background: none; color: var(--sub); cursor: pointer; }
.sub-toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-3px) rotate(45deg); }
.sub {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  z-index: 10;
  min-width: 190px;
  margin: 0;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  list-style: none;
}
.sub a { display: block; padding: 6px 16px; }
.has-sub:hover .sub, .has-sub.is-open .sub { display: block; }
.search { display: flex; }
.search input {
  width: 150px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px 0 0 999px;
  background: var(--surface);
  font-family: var(--font-text);
  font-size: 16px;
}
.search button { padding: 6px 14px; white-space: nowrap; border: 0; border-radius: 0 999px 999px 0; background: var(--accent-dk); color: #fff; font: inherit; cursor: pointer; }
.menu-toggle { display: none; }

/* 運営者の帯（全ページのヘッダーの下） */
.operator-bar { margin: 0; padding: 6px var(--gutter); border-top: 1px solid var(--line); background: var(--surface); color: var(--sub); font-size: 16px; text-align: center; }
.operator-bar a { color: var(--accent-dk); font-weight: 700; }

/* パンくず */
.crumbs { max-width: var(--wide); margin: 0 auto; padding: 12px var(--gutter) 0; font-size: 16px; }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; color: var(--sub); }
.crumbs li { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.crumbs li + li::before { content: "›"; margin: 0 8px; }
.crumbs a { color: var(--sub); }

/* ---------- 5. 記事・固定ページ ---------- */
.post { max-width: calc(var(--measure) + var(--gutter) * 2); margin: 0 auto; padding: 48px var(--gutter) 0; }
.post__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.post__kicker { margin: 0; color: var(--accent-dk); font-weight: 700; }
.post__title { margin: 16px 0 12px; font-size: 30px; }
.post--page .post__title { margin-top: 4px; }
.post__meta, .post__lead { margin: 0; color: var(--sub); font-size: 16px; }
.post__meta a { color: var(--sub); }
.post__sep { margin: 0 4px; }
.post__hero { margin: 32px 0 8px; }
.post__hero img { display: block; width: 100%; border-radius: var(--radius); }
.post__tags { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 40px 0 0; padding: 0; list-style: none; font-size: 16px; }
.post__tags a { color: var(--sub); text-decoration: none; }
.post__tags a:hover { color: var(--accent-dk); }

/* 古い記事の「当時の記録です」 */
.dated { margin: 24px 0 0; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); color: var(--sub); font-size: 16px; line-height: 1.8; }
.dated p { margin: 0; }

/* 利用規約・プライバシーポリシー */
.legal .prose h2 { font-size: 20px; }
.legal .prose li { margin-bottom: .4em; }
.legal__dates { margin-top: 3em; color: var(--sub); text-align: right; }

/* 本文 */
.prose { margin-top: 32px; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { margin: 2.4em 0 .8em; padding-bottom: .4em; border-bottom: 2px solid var(--accent-bg); font-size: 24px; }
.prose h3 { margin: 2em 0 .6em; font-size: 20px; }
.prose h4, .prose h5, .prose h6 { margin: 1.6em 0 .5em; font-size: 18px; }
.prose strong, .prose b { font-weight: 700; }
.prose .marker { background: linear-gradient(transparent 60%, var(--marker) 60%); }
.prose img { display: block; margin: 0 auto; border-radius: 8px; }
.prose img[srcset] { width: 100%; }
.prose .alignleft, .prose .alignright, .prose .aligncenter { float: none; margin-left: auto; margin-right: auto; }
.prose figure { margin: 2em 0; }
.prose .wp-caption { width: auto !important; max-width: 100%; margin: 2em 0; }  /* 元の幅指定（style）より優先 */
.prose .wp-caption-text, .prose figcaption { margin-top: .5em; color: var(--sub); font-size: 16px; text-align: center; }
.prose ul, .prose ol { margin: 0 0 1.6em; padding-left: 1.4em; }
.prose blockquote { margin: 2em 0; padding: 1em 1.4em; border-radius: var(--radius); background: var(--surface); }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: .5em .8em; border: 1px solid var(--line); }
.prose iframe { max-width: 100%; }
.prose video { width: 100%; border-radius: 8px; }
.prose .wp-video { width: 100% !important; }  /* 元の幅指定（style）より優先 */
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 2em 0; }
.prose .gallery br { display: none; }
.prose .gallery-item { width: auto !important; margin: 0 !important; }  /* 元の段組み（style）より優先 */
.prose .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 0 !important; }

/* 書いた人 */
.author { margin: 48px 0 0; padding: 24px 28px; border-radius: 16px; background: var(--accent-bg); }
.author__label { margin: 0; color: var(--sub); font-size: 16px; }
.author__name { margin: 2px 0 8px; font-family: var(--font-round); font-size: 20px; font-weight: 700; }
.author__name a { color: var(--ink); text-decoration: none; }
.author__bio { margin: 0 0 12px; font-size: 16px; line-height: 1.8; white-space: pre-line; }
.author__more { font-size: 16px; font-weight: 500; }

/* 前後の記事 */
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: calc(var(--measure) + var(--gutter) * 2); margin: 48px auto 0; padding: 0 var(--gutter); }
.pn__link {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
}
.pn__link:hover { border-color: var(--accent); }
.pn__link--next { grid-column: 2; text-align: right; }
.pn__label { display: block; color: var(--sub); font-family: var(--font-text); font-size: 16px; font-weight: 400; }

.related { max-width: var(--wide); margin: 72px auto 0; padding: 0 var(--gutter); }
.related h2 { margin: 0 0 24px; font-size: 22px; text-align: center; }

/* ---------- 6. 一覧 ---------- */
.arch-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.arch-head__inner { max-width: var(--wide); margin: 0 auto; padding: 48px var(--gutter) 40px; }
.arch-head__kicker { margin: 0; color: var(--accent-dk); font-weight: 700; }
.arch-head h1 { margin: 4px 0; font-size: 30px; }
.arch-head__count { margin: 0; color: var(--sub); }
.arch-head__lead { max-width: var(--measure); margin: 16px 0 0; font-size: 16px; white-space: pre-line; }
.arch-head .big-search { margin: 20px 0 12px; }
.arch-head__links { margin-top: 16px; }
.arch { max-width: var(--wide); margin: 40px auto 0; padding: 0 var(--gutter); }
.empty { color: var(--sub); text-align: center; }
.notfound { margin-top: 8px; }

/* ---------- 7. トップ ---------- */
.hero { background: var(--accent-bg); }
.hero__inner { max-width: var(--wide); margin: 0 auto; padding: 72px var(--gutter) 56px; text-align: center; }
.hero__kicker { margin: 0 0 8px; color: var(--accent-dk); font-weight: 700; }
.hero__title { margin: 0 0 16px; font-size: 34px; line-height: 1.6; }
.hero__lead { margin: 0 0 32px; color: var(--sub); }

.home-sec { max-width: var(--wide); margin: 80px auto 0; padding: 0 var(--gutter); }
.home-sec__title { margin: 0 0 24px; font-size: 26px; }
.home-sec__title:has(+ .home-sec__lead) { margin-bottom: 4px; }
.home-sec__lead { margin: 0 0 24px; color: var(--sub); font-size: 16px; }

/* テーマで探す */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.theme { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; }
.theme__pic { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.theme__pic img { width: 100%; height: 100%; object-fit: cover; }
.theme h3 { margin: 0 0 4px; font-size: 20px; }
.theme h3 a { color: var(--ink-strong); text-decoration: none; }
.theme h3 a:hover { color: var(--accent-dk); }
.theme__count { margin-left: 8px; color: var(--sub); font-family: var(--font-text); font-size: 16px; font-weight: 400; }
.theme__pic { display: block; }
.theme p { margin: 0 0 12px; color: var(--sub); font-size: 16px; line-height: 1.75; }

/* 隊員紹介への帯 */
.member-banner { display: block; padding: 40px var(--gutter); border-radius: 20px; background: var(--surface); color: var(--ink); text-align: center; text-decoration: none; }
.member-banner__title { display: block; margin: 20px 0 8px; font-family: var(--font-round); font-size: 24px; font-weight: 700; }
.member-banner__text { display: block; margin: 0 0 20px; color: var(--sub); }
.faces { display: flex; flex-wrap: wrap; justify-content: center; }
.faces img { width: 64px; height: 64px; margin: 0 -6px; object-fit: cover; border: 3px solid #fff; border-radius: 50%; }

.about-band { padding: 32px 36px; border-radius: 20px; background: var(--accent-bg); }
.about-band__title { margin: 0 0 12px; font-size: 22px; }
.about-band p { margin: 0 0 12px; font-size: 16px; }

.news { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.news li { display: flex; gap: 20px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.news time { flex: none; color: var(--sub); }
.news a { color: var(--ink); }

/* ---------- 8. 隊員紹介 ---------- */
.member-page { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.term { margin-top: 64px; }
.term > h2 { margin: 0 0 24px; font-size: 24px; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.member { padding: 28px 24px; border: 1px solid var(--line); border-radius: 20px; }
.member__photo { display: block; width: 120px; height: 120px; margin: 0 auto 16px; object-fit: cover; border-radius: 50%; }
.member__name { margin: 0; font-size: 20px; text-align: center; }
.member__left { margin: 0; color: var(--sub); font-size: 16px; text-align: center; }
.member__role { margin: 8px 0 12px; color: var(--accent-dk); font-weight: 700; text-align: center; }
.member__bio { margin: 0 0 12px; font-size: 16px; line-height: 1.85; }
.member__posts { margin: 8px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.6; list-style: none; }
.member__posts li { margin: 0 0 8px; }
.member__posts a { color: var(--ink); }
.member__more { font-size: 16px; font-weight: 500; }

/* ---------- 9. フォーム ---------- */
.form { margin-top: 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 10px 14px; border: 1px solid #cfd3cf; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); }
.req { margin-left: 4px; color: var(--danger); font-size: 16px; font-weight: 400; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0 28px; }
.check input { width: 20px; height: 20px; }
.hp { position: absolute; left: -9999px; }  /* ボット避けの隠し欄 */
.form__error { padding: 12px 16px; border-radius: 10px; background: var(--danger-bg); color: var(--danger); }
.form-done { margin-top: 32px; padding: 28px; border-radius: 16px; background: var(--accent-bg); }
.form-done h2 { margin-top: 0; }

/* ---------- 10. フッター ---------- */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer__inner { max-width: var(--wide); margin: 0 auto; padding: 48px var(--gutter) 32px; font-size: 16px; }
.site-footer h2 { margin: 0 0 12px; font-size: 18px; }
.site-footer section { margin-bottom: 32px; }
.site-footer__about { padding: 24px 28px; border-radius: 16px; background: #fff; }
.site-footer__about p { margin: 0 0 8px; }
.site-footer__links a { margin-right: 20px; color: var(--sub); }
.site-footer__copy { margin: 16px 0 0; color: var(--sub); }

/* ---------- 11. タブレット・スマホ ---------- */
@media (max-width: 960px) {
  .site-header__inner { padding: 10px 16px; }
  .logo img { width: 170px; }
  .menu-toggle { display: block; position: relative; width: 44px; height: 44px; margin-left: auto; border: 0; background: none; cursor: pointer; }
  .menu-toggle__bar, .menu-toggle__bar::before, .menu-toggle__bar::after {
    content: "";
    position: absolute;
    left: 11px;
    width: 22px;
    height: 2px;
    background: var(--ink);
  }
  .menu-toggle__bar { top: 21px; }
  .menu-toggle__bar::before { top: -7px; left: 0; }
  .menu-toggle__bar::after { top: 7px; left: 0; }
  .gnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 8px 16px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }
  .nav-open .gnav { display: flex; }
  .gnav__list { flex-direction: column; gap: 0; }
  .gnav__item { flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .sub-toggle { margin-left: auto; padding: 4px 8px; }
  .sub { position: static; width: 100%; padding: 4px 0 0 12px; border: 0; box-shadow: none; }
  .has-sub:hover .sub { display: none; }
  .has-sub.is-open .sub { display: block; }
  .search input { flex: 1; width: auto; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .themes { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .post { padding-top: 28px; }
  .post__title { font-size: 24px; }
  .post__hero { margin: 24px calc(var(--gutter) * -1) 0; }
  .post__hero img { border-radius: 0; }
  .prose h2 { font-size: 21px; }
  .prose h3 { font-size: 18px; }
  .author { padding: 20px; }
  .pn { grid-template-columns: 1fr; }
  .pn__link--next { grid-column: auto; }
  .cards { grid-template-columns: 1fr; gap: 32px; }
  .related .cards { gap: 16px; }
  .related .card a { display: grid; grid-template-columns: 120px 1fr; align-items: start; gap: 12px; }
  .related .card__pic { border-radius: 8px; }
  .related .card__body { padding: 0; }
  .related .card__title { margin: 0 0 4px; font-size: 16px; }
  .linkcard img { width: 96px; }

  .hero__inner { padding: 44px 16px 36px; }
  .hero__title { font-size: 23px; }
  .home-sec { margin-top: 64px; }
  .home-sec__title, .term > h2 { font-size: 22px; }
  .theme { grid-template-columns: 96px 1fr; gap: 14px; padding: 16px; }
  .theme .chips a { padding: 2px 10px; }
  .about-band { padding: 24px 20px; }
  .operator-bar { font-size: 16px; line-height: 1.6; }
  .news li { flex-direction: column; gap: 0; }

  .arch-head__inner { padding: 32px 16px 28px; }
  .arch-head h1 { font-size: 24px; }
  .members { grid-template-columns: 1fr; }
}
