/*
Theme Name: 旭が丘 まちのひだまり
Description: ヒノさんとケヤさんが案内する、旭が丘の地域メディア。
Version: 2.0.0
Text Domain: asahigaoka
*/

/* ==========================================================================
   目次
   01 トークン / ベース
   02 モーション（共通の出現アニメーション）
   03 部品：ボタン／タグ／見出し／ちぎり紙／波
   04 ローダー
   05 ヘッダー・ナビ・サイドレール
   06 ヒーロー
   07 メッセージ（縦書き＋キャラクター散らし）
   08 カード・カルーセル
   09 おしらせ一覧
   10 カテゴリ入口
   11 よみもの／福祉／投稿のおさそい
   12 フッター
   13 一覧・記事・検索・投稿フォーム・マイページ
   14 レスポンシブ
   15 動きを減らす設定
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700;900&family=Bubblegum+Sans&display=swap');

/* ==========================================================================
   01 トークン / ベース
   ========================================================================== */

:root {
  --color-hino: #f07c1e;        /* 朱橙 — ヒノさん、住民導線 */
  --color-hino-light: #fbc15e;  /* 山吹 */
  --color-hino-deep: #a8480a;   /* 文字にも使える濃い橙 */
  --color-keya: #7cb342;        /* 若草 — ケヤさん、事務局導線 */
  --color-keya-dark: #4b7a32;   /* 深緑 */
  --color-keya-deep: #3c6327;
  --color-bg: #fdf8ee;          /* クリーム */
  --color-bg-band: #f7efdf;     /* 帯の背景 */
  --color-paper: #fffdf7;       /* カードの紙 */
  --color-ink: #423527;         /* 焦茶 — 本文 */
  --color-ink-soft: #6b5b4a;
  --color-sky: #a8d4e8;         /* 空色 — アクセント */
  --line: #e0d7c4;
  --font-size: 17px;
  --font-ja: 'Zen Maru Gothic', 'Yu Gothic', sans-serif;
  --font-en: 'Bubblegum Sans', 'Zen Maru Gothic', cursive;
  --ease: cubic-bezier(.165, .84, .44, 1);
  --pop: cubic-bezier(.175, .885, .32, 1.275);
  --deckle: url('assets/deckle.svg');
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: var(--font-size);
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-ja);
  line-height: 1.9;
  overflow-x: hidden;
}

body.is-nav-open { overflow: hidden; }

/* 横のはみ出しを本当に切っておく保険。
   overflow-x: hidden は html が visible のときだけビューポートへ伝播する指定で、
   Android Chrome では「はみ出したぶんレイアウトの基準幅が広がる」ところまでは止められない。
   広がると、right で留めた position: fixed（メニュー、Page top のレール）が画面の外へ出る。
   clip は横だけを切り取り、縦のスクロール文脈を作らないので body の縦スクロールを壊さない。 */
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
  /* html が visible でなくなると、body の overflow はビューポートへ伝播しなくなる。
     メニューを開いている間の背面スクロール止めは、html 側で掛け直す。 */
  html:has(body.is-nav-open) { overflow: hidden; }
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #29608a;
  outline-offset: 4px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.5; }
h2 { font-size: 2rem; letter-spacing: .08em; }
h3 { font-size: 1.14rem; }
small, .small { font-size: .78rem; }
[hidden] { display: none !important; }

.wrap { width: min(1160px, calc(100% - 80px)); margin: auto; }
.wrap-narrow { width: min(860px, calc(100% - 80px)); margin: auto; }

.skip {
  position: absolute;
  top: -100px;
  left: 0;
  background: #fff;
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 10px 0;
}
.skip:focus { top: 0; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

body.text-large { --font-size: 19px; }
body.text-largest { --font-size: 21px; }

/* ==========================================================================
   02 モーション（共通の出現アニメーション）
   .js-reveal を付けた要素が画面に入ると .is-visible が付く。
   子要素の data-motion が実際の動きを決める。
   ========================================================================== */

/* will-change は付けない。重ね合わせ文脈ができて、キャラクター画像の乗算が効かなくなるため。 */

/* 初期状態を隠すのは .has-motion（JS が head で付ける）が有る場合だけ。
   JS が読み込めなかった端末では、はじめから全部見えている。 */
.has-motion [data-motion="fade"] { opacity: 0; }
.has-motion [data-motion="rise"] { opacity: 0; transform: translateY(3rem); }
.has-motion [data-motion="rise-sm"] { opacity: 0; transform: translateY(1.4rem); }
.has-motion [data-motion="pop"] { opacity: 0; transform: scale(.5); }
.has-motion [data-motion="slide-left"] { opacity: 0; transform: translateX(3rem); }
.has-motion [data-motion="slide-right"] { opacity: 0; transform: translateX(-3rem); }
.has-motion [data-motion="wipe"] { clip-path: inset(0 100% 0 0); }

/* 狭い画面では横slideを使わない。
   .wrap の左右余白は 16px しかないため、出現前の translateX(3rem) が画面の右へはみ出し、
   ページに横スクロールが生まれる。Android Chrome はそのぶんレイアウトの基準幅を広げるので、
   right で留めた position: fixed のメニューが画面の外へ押し出されてしまう。
   （文字サイズを変えると再レイアウトが走って直り、再読み込みで再発するのはこれが理由）
   body の overflow-x: hidden では、この基準幅の広がりまでは止められない。 */
@media (max-width: 760px) {
  .has-motion [data-motion="slide-left"],
  .has-motion [data-motion="slide-right"] { transform: translateY(1.4rem); }
}

.is-visible [data-motion],
[data-motion].is-visible {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
  transition: opacity .7s var(--ease), transform .7s var(--ease), clip-path .9s var(--ease);
  transition-delay: var(--motion-delay, 0s);
}

.is-visible [data-motion="pop"],
[data-motion="pop"].is-visible { transition-timing-function: var(--pop); transition-duration: .5s; }

/* 段差（stagger）。JS が --motion-delay を入れられないときの保険 */
[data-delay="1"] { --motion-delay: .08s; }
[data-delay="2"] { --motion-delay: .16s; }
[data-delay="3"] { --motion-delay: .24s; }
[data-delay="4"] { --motion-delay: .32s; }
[data-delay="5"] { --motion-delay: .40s; }
[data-delay="6"] { --motion-delay: .48s; }

/* ゆっくり揺れる（キャラクターの待機モーション） */
@keyframes asahi-bob {
  0%, 100% { transform: translateY(0) rotate(var(--bob-rot, 0deg)); }
  50% { transform: translateY(-9px) rotate(calc(var(--bob-rot, 0deg) * -1)); }
}
@keyframes asahi-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes asahi-leaf {
  0% { transform: translate(0, -12vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--drift, 60px), 105vh) rotate(680deg); opacity: 0; }
}
@keyframes asahi-arrow {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px); opacity: 0; }
  61% { transform: translateY(-12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes asahi-kenburns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.07) translate(-1.2%, -1%); }
}
@keyframes asahi-letter {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-16px); }
}
@keyframes asahi-shine {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.08); }
}

/* ==========================================================================
   03 部品：ボタン／タグ／見出し／ちぎり紙／波
   ========================================================================== */

/* ボタン：押すと沈む厚みのあるピル */
.button {
  display: inline-flex;
  position: relative;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 30px;
  border: 2px solid var(--color-ink);
  border-radius: 50px;
  background: var(--color-paper);
  font-weight: 700;
  box-shadow: 0 5px 0 var(--color-ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .2s var(--ease);
}
.button:hover { transform: translateY(3px); box-shadow: 0 2px 0 var(--color-ink); color: inherit; }
.button:active { transform: translateY(5px); box-shadow: 0 0 0 var(--color-ink); }
.button .arrow { font-family: Arial, sans-serif; font-size: 1.15rem; line-height: 1; }

.button.orange { background: var(--color-hino-light); border-color: var(--color-hino-deep); box-shadow: 0 5px 0 var(--color-hino-deep); }
.button.orange:hover { box-shadow: 0 2px 0 var(--color-hino-deep); }
.button.green { background: var(--color-keya-dark); border-color: var(--color-keya-deep); color: #fff; box-shadow: 0 5px 0 var(--color-keya-deep); }
.button.green:hover { box-shadow: 0 2px 0 var(--color-keya-deep); }
.button.small { min-height: 44px; padding: 8px 20px; font-size: .84rem; gap: 12px; box-shadow: 0 4px 0 var(--color-ink); }

/* 下線つきテキストリンク：矢印がすっと伸びる */
.text-link {
  display: inline-flex;
  gap: 16px;
  align-items: center;
  font-weight: 700;
  border-bottom: 2px solid var(--color-ink);
  padding: 8px 2px;
  font-size: .86rem;
  white-space: nowrap;
  transition: gap .25s var(--ease), color .2s var(--ease);
}
.text-link:hover { gap: 26px; color: var(--color-hino-deep); border-color: var(--color-hino-deep); }

/* セクション見出し：大きな英字＋小さな日本語 */
.section-heading { text-align: center; margin-bottom: 44px; }
.section-heading .en {
  display: block;
  font-family: var(--font-en);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--color-ink);
  margin-bottom: 12px;
}
.section-heading .ja {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--color-ink-soft);
}
.section-heading.left { text-align: left; }

.eyebrow {
  font-size: .69rem;
  letter-spacing: .18em;
  font-weight: 700;
  display: block;
  color: #856549;
  margin-bottom: 4px;
}

/* 手書き風のラベル（縦組み見出しに添える） */
.script-label {
  font-family: var(--font-en);
  color: var(--color-hino-deep);
  font-size: 1.3rem;
  letter-spacing: .04em;
  transform: rotate(-14deg);
  display: inline-block;
  white-space: nowrap;
}

/* ちぎり紙のふち */
.deckle {
  -webkit-mask-image: var(--deckle);
  mask-image: var(--deckle);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* 帯の上下を波形にする。擬似要素ではなく帯そのものの背景画像として重ねる
   （余計な合成レイヤーを作らないため）。 */
.band {
  position: relative;
  background-color: var(--color-bg-band);
  background-image: url('assets/wave-bottom.svg'), url('assets/wave-top.svg');
  background-position: left top, left bottom;
  background-size: 100% 90px, 100% 90px;
  background-repeat: no-repeat, no-repeat;
}
.band.band-green { background-color: #eef2e2; }
/* 波の抜き（90px）より内側に中身が来るよう、上下の余白は必ず確保する。
   z-index で持ち上げないのは、新しい重ね合わせ文脈がキャラクター画像の乗算を壊すため。 */
.band, .band.section { padding-block: 104px 100px; }

/* タグ */
.tag {
  padding: 2px 12px;
  border: 1px solid #cfa968;
  border-radius: 40px;
  background: #fff4db;
  font-size: .7rem;
  color: #76511e;
  white-space: nowrap;
}
.tag.green { background: #edf1df; border-color: #8ea77a; color: #3b5f28; }

.demo-label { background: #efe8d9; border-radius: 4px; padding: 3px 10px; font-size: .68rem; white-space: nowrap; }

/* キャラクター（3×2 のスプライト）
   表示には -cut 版（外周の白を透過させた派生ファイル）を使う。原画 3 枚はそのまま残してある。 */
.mascot {
  display: block;
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  background-image: url('assets/characters-color-cut.webp');
  background-size: 300% 200%;
  background-repeat: no-repeat;
  clip-path: inset(0 5% 0 1%);
}
.mascot.hino { background-position: 50% 100%; }
.mascot.hino-wave { background-position: 100% 100%; }
.mascot.hino-side { background-position: 0 100%; }
.mascot.keya { background-position: 50% 0; }
.mascot.keya-side { background-position: 0 0; }
.mascot.keya-back { background-position: 100% 0; }
.mascot.line { background-image: url('assets/characters-line-cut.webp'); }

/* シーン画像の切り出し（原画は変えずに表示領域だけ指定する） */
.vignette { position: relative; overflow: hidden; }
.vignette img {
  display: block;
  max-width: none;
  width: calc(100% * 1536 / var(--crop-w));
  margin-left: calc(-100% * var(--crop-x) / var(--crop-w));
  margin-top: calc(-100% * var(--crop-y) / var(--crop-w));
}
.vignette.pair { --crop-x: 0; --crop-y: 10; --crop-w: 600; aspect-ratio: 600 / 505; }
.vignette.hino-news { --crop-x: 690; --crop-y: 20; --crop-w: 390; aspect-ratio: 390 / 480; }
.vignette.keya-read { --crop-x: 1040; --crop-y: 10; --crop-w: 490; aspect-ratio: 490 / 500; }
.vignette.landscape { --crop-x: 0; --crop-y: 516; --crop-w: 1536; aspect-ratio: 1536 / 508; }

/* ==========================================================================
   04 ローダー
   ========================================================================== */

.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--color-bg);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader .mascot { width: 110px; height: 110px; margin: 0 auto 18px; animation: asahi-bob 1.4s var(--ease) infinite; }
.loader-letters { display: flex; justify-content: center; gap: 2px; font-size: 1.5rem; font-weight: 900; letter-spacing: .08em; }
.loader-letters span { display: inline-block; animation: asahi-letter 1.2s var(--ease) infinite; }

/* ==========================================================================
   05 ヘッダー・ナビ・サイドレール
   ========================================================================== */

.site-header { position: relative; z-index: 20; }

.utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  font-size: .72rem;
}
.utility p { margin: 0; letter-spacing: .08em; }
.utility p span { display: inline-block; }   /* 折り返しは span と span の間だけ */
.size-controls { display: flex; align-items: center; gap: 7px; }
.size-buttons { display: flex; align-items: center; gap: 7px; }
.size-controls button {
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: .72rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.size-controls button[aria-pressed="true"] { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }

.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 18px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 62px;
  height: 62px;
  display: block;
  background: url('assets/characters-color-cut.webp') 50% 100% / 300% 200% no-repeat;
  clip-path: inset(0 5% 0 1%);
  transition: transform .4s var(--pop);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-name { font-size: 1.8rem; letter-spacing: .04em; line-height: 1.2; font-weight: 900; }
.brand-name small { display: block; font-size: .66rem; letter-spacing: .24em; margin-top: 8px; font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 20px; }

/* カテゴリナビ：下線が中央から伸びる */
.main-nav {
  display: flex;
  justify-content: space-around;
  border-block: 1px solid var(--line);
  padding: 12px 0;
  font-size: .92rem;
  font-weight: 700;
}
.main-nav a { padding: 6px 18px; position: relative; }
.main-nav a::before {
  content: '';
  display: inline-block;
  background: var(--color-hino);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 10px;
  transition: transform .3s var(--pop);
}
.main-nav a:nth-child(n+4)::before { background: var(--color-keya-dark); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 2px;
  background: var(--color-ink);
  transition: left .3s var(--ease), right .3s var(--ease);
}
.main-nav a:hover::after { left: 12px; right: 12px; }
.main-nav a:hover::before { transform: scale(1.6); }

/* 追従ヘッダー（スクロールすると出てくる細いバー） */
.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px max(20px, calc((100% - 1160px) / 2));
  background: rgba(253, 248, 238, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%);
  transition: transform .4s var(--ease);
}
.sticky-bar.is-shown { transform: translateY(0); }
.sticky-bar .brand-name { font-size: 1.1rem; }
.sticky-bar .brand-name small { display: none; }
.sticky-bar .brand-mark { width: 40px; height: 40px; }

/* 右の縦レール（ページトップ） */
.page-rail {
  position: fixed;
  right: 10px;
  /* 右下のヒノさん（.floating-invite）の上に置く。重なると両方読めなくなる。
     rem で取るのは、文字サイズを大きくすると吹き出しも背が高くなるため。 */
  bottom: 7rem;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  font-size: .8rem;
  letter-spacing: .1em;
  writing-mode: vertical-rl;
  line-height: 1;
  padding: 14px 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: all .4s var(--ease);
}
.page-rail.is-shown { opacity: 1; visibility: visible; transform: translateX(0); }
.page-rail::after { content: '↑'; writing-mode: horizontal-tb; }
.page-rail:hover { color: var(--color-hino-deep); }

/* 画面の隅に居るヒノさん（投稿への誘導） */
.floating-invite {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 26;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all .45s var(--pop);
}
.floating-invite.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
.floating-invite .bubble {
  background: var(--color-hino-light);
  border: 2px solid var(--color-hino-deep);
  border-radius: 20px 20px 4px 20px;
  padding: 10px 14px;
  font-size: .72rem;
  line-height: 1.5;
  font-weight: 700;
  color: #5a2f05;
  max-width: 150px;
}
.floating-invite .mascot { width: 70px; height: 70px; animation: asahi-bob 3.2s var(--ease) infinite; }
.floating-invite:hover .mascot { animation-duration: 1s; }

/* メニュー（吹き出しボタン＋全画面ナビ） */
/* 吹き出しのメニューボタン。
   大きさを rem で組み、文字サイズ（標準/大/特大）に合わせて一緒に大きくなるようにする。
   px 固定だと、特大のときにラベルが枠の中で2行に割れてしまう。
   右端は端末の安全領域（ノッチ・丸角）を考慮し、12px と安全領域の大きいほうを取る。 */
.menu-toggle {
  --menu-size: 3.6rem;
  display: none;
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 60;
  width: var(--menu-size);
  height: var(--menu-size);
  border: 2px solid var(--color-ink);
  border-radius: 50% 50% 50% 8px;
  background: var(--color-bg);
  box-shadow: 0 4px 0 var(--color-ink);
  font-size: .58rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  padding: calc(var(--menu-size) * .42) 2px 0;
}
.menu-toggle .bars { position: absolute; top: calc(var(--menu-size) * .24); left: 50%; transform: translateX(-50%); width: 1.4rem; height: .82rem; }

/* ログイン中は WordPress の管理バー（z-index 99999）が最前面に出るため、
   固定配置の要素をその下に潜らせない。管理バーの高さは 782px 以下で 46px、それ以上で 32px。 */
.admin-bar .menu-toggle { top: calc(max(12px, env(safe-area-inset-top, 0px)) + 46px); }
.admin-bar .sticky-bar { top: 32px; }
@media screen and (min-width: 783px) {
  .admin-bar .menu-toggle { top: calc(max(12px, env(safe-area-inset-top, 0px)) + 32px); }
}
.menu-toggle .bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.menu-toggle .bars span:nth-child(1) { top: 0; }
.menu-toggle .bars span:nth-child(2) { top: calc(50% - 1px); }
.menu-toggle .bars span:nth-child(3) { bottom: 0; }
body.is-nav-open .menu-toggle .bars span:nth-child(1) { transform: translateY(calc(.41rem - 1px)) rotate(38deg); }
body.is-nav-open .menu-toggle .bars span:nth-child(2) { opacity: 0; }
body.is-nav-open .menu-toggle .bars span:nth-child(3) { transform: translateY(calc(1px - .41rem)) rotate(-38deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--color-bg);
  padding: 96px 28px 40px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
body.is-nav-open .nav-overlay { opacity: 1; visibility: visible; }
.nav-overlay ul { list-style: none; margin: 0 0 28px; padding: 0; }
.nav-overlay li {
  border-bottom: 1px dashed var(--line);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
body.is-nav-open .nav-overlay li { opacity: 1; transform: none; }
body.is-nav-open .nav-overlay li:nth-child(1) { transition-delay: .06s; }
body.is-nav-open .nav-overlay li:nth-child(2) { transition-delay: .12s; }
body.is-nav-open .nav-overlay li:nth-child(3) { transition-delay: .18s; }
body.is-nav-open .nav-overlay li:nth-child(4) { transition-delay: .24s; }
body.is-nav-open .nav-overlay li:nth-child(5) { transition-delay: .30s; }
body.is-nav-open .nav-overlay li:nth-child(6) { transition-delay: .36s; }
body.is-nav-open .nav-overlay li:nth-child(7) { transition-delay: .42s; }
body.is-nav-open .nav-overlay li:nth-child(8) { transition-delay: .48s; }
.nav-overlay a { display: flex; align-items: center; gap: 12px; padding: 16px 4px; font-weight: 700; font-size: 1.05rem; }
.nav-overlay a .mascot { width: 46px; height: 46px; }

/* ==========================================================================
   06 ヒーロー
   ========================================================================== */

.hero { position: relative; padding-top: 40px; text-align: center; }
.hero-kicker { font-size: .83rem; letter-spacing: .22em; margin-bottom: 14px; }
.hero h1 {
  font-size: clamp(2.3rem, 4.7vw, 4.05rem);
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: .13em;
  margin: 0;
  position: relative;
  z-index: 2;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); }
.hero.is-ready h1 .line > span { transform: translateY(0); }
.hero.is-ready h1 .line:nth-child(2) > span { transition-delay: .12s; }
.hero h1 em { font-style: normal; position: relative; }
.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  height: 11px;
  width: 100%;
  background: var(--color-hino-light);
  border-radius: 60%;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .8s var(--ease) .6s;
}
.hero.is-ready h1 em::after { transform: scaleX(1); }

.hero-description { margin: 19px 0 0; font-size: .88rem; letter-spacing: .09em; opacity: 0; transition: opacity .8s var(--ease) .45s; }
.hero-description span { display: inline-block; }   /* 折り返しは span と span の間だけ */
.hero.is-ready .hero-description { opacity: 1; }

/* 縦組みの英字ラベル。1000px 以下では非表示（下の指定を参照）、
   それ以上では .wrap の外側の余白に置いてイラストに重ねない。 */
.hero-side {
  position: absolute;
  right: -26px;
  top: 95px;
  writing-mode: vertical-rl;
  font-size: .66rem;
  letter-spacing: .23em;
  line-height: 1;
}

.hero-stage { position: relative; margin-top: 10px; }
.hero-landscape { position: relative; width: 100%; overflow: hidden; }
/* イラストのヒーローには拡大アニメーションを掛けない。
   大きな画像に無限の transform を掛けると合成レイヤーが重く、端末によっては描画が落ちる。
   動きは舞う葉っぱと吹き出しのゆれで出す。 */

/* assets/photos/hero-*.jpg を置いたときの写真スライド */
.hero-slides { position: relative; aspect-ratio: 1536 / 640; overflow: hidden; }
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero-slides:not(.is-ready) img:first-child { opacity: 1; }
.hero-slides img.is-active { opacity: 1; animation: asahi-kenburns 9s ease-in-out forwards; }
.hero-slide-dots { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 9px; z-index: 3; }
.hero-slide-dots button {
  width: 10px; height: 10px; padding: 0; border-radius: 50%;
  border: 1px solid var(--color-ink); background: rgba(255, 255, 255, .6);
  transition: background .25s var(--ease), transform .25s var(--pop);
}
.hero-slide-dots button[aria-current="true"] { background: var(--color-hino); transform: scale(1.4); }
.hero-landscape::after {
  /* 下端をちぎった紙のように見せる */
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 34px;
  background: url('assets/torn-bottom.svg') 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}

.hero-note {
  position: absolute;
  left: 4%;
  top: 34%;
  font-size: .85rem;
  line-height: 1.8;
  transform: rotate(-8deg);
  border: 2px solid var(--color-ink);
  background: var(--color-bg);
  border-radius: 50%;
  padding: 16px 24px;
  z-index: 3;
  animation: asahi-bob 5s var(--ease) infinite;
  --bob-rot: -8deg;
}

/* 舞う葉っぱ */
.leaves { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.leaves i {
  position: absolute;
  top: 0;
  width: 13px;
  height: 9px;
  border-radius: 100% 0 100% 0;
  background: var(--color-keya);
  opacity: 0;
  animation: asahi-leaf var(--dur, 14s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.leaves i:nth-child(even) { background: var(--color-hino-light); width: 11px; height: 8px; }

/* スクロール案内（右の縦レール） */
.hero-scroll {
  position: absolute;
  /* .wrap の外側の余白に置き、イラストには一切重ねない。
     余白が 40px 以上ある 1001px 以上でのみ表示する（下の指定を参照）。 */
  right: -36px;
  bottom: 40px;
  z-index: 4;
  writing-mode: vertical-rl;
  font-family: var(--font-en);
  font-size: .95rem;
  letter-spacing: .16em;
  /* 縦組みでは line-height が行の「太さ」になる。既定の 1.9 だと帯が 45px まで太り、
     余白に収まらないので 1 にしておく。 */
  line-height: 1;
  padding: 12px 7px 36px;
}
.hero-scroll::after {
  content: '↓';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  writing-mode: horizontal-tb;
  animation: asahi-arrow 2.4s var(--ease) infinite;
}
.hero-scroll:hover { color: var(--color-hino-deep); }

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 22px;
  font-size: .72rem;
  border-bottom: 1px solid var(--line);
}
.hero-bottom a { letter-spacing: .15em; }

/* ==========================================================================
   07 メッセージ（縦書き＋キャラクター散らし）
   ========================================================================== */

.message { position: relative; padding: 80px 0 90px; overflow: hidden; }
.message-inner { position: relative; z-index: 2; width: min(620px, calc(100% - 40px)); margin: auto; }
.message-title {
  display: flex;
  justify-content: center;
  margin-bottom: 44px;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 900;
  line-height: 2.1;
  letter-spacing: .3em;
}
.message-title .txt { writing-mode: vertical-rl; text-orientation: upright; }
.message-body p { font-size: .95rem; margin-bottom: 1.6em; }
.message-actions { display: flex; justify-content: center; margin-top: 34px; }

/* 散らしたキャラクター */
.scatter { position: absolute; inset: 0; pointer-events: none; }
.scatter .mascot {
  position: absolute;
  animation: asahi-bob var(--dur, 4s) var(--ease) infinite;
  animation-delay: var(--delay, 0s);
}
.scatter .mascot.sway { animation-name: asahi-sway; }
.scatter .m1  { left: 2%;  top: 6%;   width: 86px;  height: 86px; --dur: 4.2s; --bob-rot: -6deg; }
.scatter .m2  { left: 9%;  top: 34%;  width: 108px; height: 108px; --dur: 5.1s; --delay: .4s; }
.scatter .m3  { left: 1%;  top: 66%;  width: 74px;  height: 74px;  --dur: 3.8s; --delay: .9s; --bob-rot: 5deg; }
.scatter .m4  { left: 16%; top: 84%;  width: 92px;  height: 92px;  --dur: 4.6s; --delay: 1.3s; }
.scatter .m5  { right: 3%; top: 4%;   width: 96px;  height: 96px;  --dur: 4.4s; --delay: .2s; --bob-rot: 7deg; }
.scatter .m6  { right: 11%; top: 30%; width: 78px;  height: 78px;  --dur: 5.4s; --delay: .7s; }
.scatter .m7  { right: 2%; top: 58%;  width: 112px; height: 112px; --dur: 4.0s; --delay: 1.1s; --bob-rot: -5deg; }
.scatter .m8  { right: 14%; top: 86%; width: 70px;  height: 70px;  --dur: 4.8s; --delay: 1.6s; }
.scatter .m9  { left: 24%; top: 2%;   width: 62px;  height: 62px;  --dur: 5.6s; --delay: .5s; }
.scatter .m10 { right: 25%; top: 92%; width: 66px;  height: 66px;  --dur: 4.3s; --delay: 1.9s; }

/* ==========================================================================
   08 カード・カルーセル
   ========================================================================== */

.section { padding: 60px 0 70px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; gap: 20px; }
.section-head .section-heading { margin-bottom: 0; }
.section-title { display: flex; align-items: center; gap: 17px; }
.section-title h2 { margin: 0; }
.section-title .mascot { animation: asahi-bob 4.4s var(--ease) infinite; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* カード：四隅の点が寄ってくる */
.story-card { position: relative; }
.story-card > a {
  display: block;
  position: relative;
  height: 100%;
  padding: 22px;
  background: var(--color-paper);
  border: 2px solid var(--color-ink);
  border-radius: 18px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.story-card > a::before,
.story-card > a::after,
.story-card .pins::before,
.story-card .pins::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-ink);
  transition: top .35s var(--pop), right .35s var(--pop), bottom .35s var(--pop), left .35s var(--pop);
}
.story-card > a::before { top: 12px; left: 12px; }
.story-card > a::after { top: 12px; right: 12px; }
.story-card .pins::before { bottom: 12px; left: 12px; }
.story-card .pins::after { bottom: 12px; right: 12px; }
.story-card > a:hover { transform: translateY(-4px); box-shadow: 0 10px 0 rgba(66, 53, 39, .12); }
.story-card > a:hover::before { top: 6px; left: 6px; }
.story-card > a:hover::after { top: 6px; right: 6px; }
.story-card > a:hover .pins::before { bottom: 6px; left: 6px; }
.story-card > a:hover .pins::after { bottom: 6px; right: 6px; }

.card-art {
  height: 200px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  isolation: isolate;
}
.card-art > img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.story-card > a:hover .card-art > img { transform: scale(1.06); }
.card-art .art-character {
  position: absolute;
  width: 165px;
  height: 165px;
  bottom: 8px;
  /* ホバーで拡大＋回転すると外接矩形が左右に約8px広がる。
     .card-art は overflow:hidden なので、その分の逃げを右に確保しておく。 */
  right: 16px;
  background: url('assets/characters-color-cut.webp') 50% 100% / 300% 200% no-repeat;
  clip-path: inset(0 5% 0 1%);
  transition: transform .45s var(--pop);
}
.story-card > a:hover .card-art .art-character { transform: translateY(-5px) rotate(-2.5deg) scale(1.03); }
.card-art.art-2 .art-character { background-position: 50% 0; }
.card-art.art-3 .art-character { background-position: 100% 100%; }
.card-art.art-1 { background: #fdf3e0; }
.card-art.art-2 { background: #eff4e6; }
.card-art.art-3 { background: #e9f3f7; }

.art-caption {
  position: absolute;
  left: 18px;
  top: 22px;
  font-weight: 900;
  line-height: 1.6;
  font-size: 1.35rem;
  letter-spacing: .13em;
  max-width: 55%;
  z-index: 1;
}
.art-caption small { display: block; font-size: .63rem; margin-bottom: 5px; letter-spacing: .16em; font-family: var(--font-en); }
.art-caption span { background: #fff; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 2px 4px; }

.date-sticker {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: var(--color-bg);
  border: 2px solid var(--color-hino-deep);
  border-radius: 50%;
  width: 66px;
  height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  font-weight: 700;
  transform: rotate(-7deg);
  z-index: 2;
  transition: transform .4s var(--pop);
}
.story-card > a:hover .date-sticker { transform: rotate(4deg) scale(1.06); }
.date-sticker b { font-size: 1.2rem; }
.date-sticker small { font-size: .59rem; margin-top: 4px; }

.card-meta { font-size: .7rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0 10px; }
.story-card h3 { margin: 0 0 9px; line-height: 1.7; }
.story-card p { font-size: .78rem; margin: 0; color: var(--color-ink-soft); }

/* カルーセル */
.carousel { position: relative; }
.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 56px) / 3);
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* overflow-x を指定すると縦方向も切り取られる。カードがホバーで浮く分（4px）と
     下の影（10px）が切れるので、上下に余白をとって外側の margin で元の間隔に戻す。
     左右は 0 のまま（横の padding はスクロール量とスナップ位置に効いてしまうため）。 */
  padding-block: 10px 22px;
  margin-block: -10px -14px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 28px; }
.carousel-controls button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-ink);
  background: var(--color-paper);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform .25s var(--pop), background .2s var(--ease);
}
.carousel-controls button:hover { background: var(--color-hino-light); transform: scale(1.1); }
.carousel-controls button[disabled] { opacity: .35; cursor: default; transform: none; }
.carousel-dots { display: flex; gap: 9px; }
.carousel-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-ink);
  background: transparent;
  transition: background .25s var(--ease), transform .25s var(--pop);
}
.carousel-dots button[aria-current="true"] { background: var(--color-hino); transform: scale(1.35); }

/* ==========================================================================
   09 おしらせ一覧
   ========================================================================== */

.notice-layout { display: grid; grid-template-columns: 1fr 2.1fr; gap: 70px; padding: 40px 0 70px; }
.notice-layout .section-heading { margin-bottom: 22px; }
.notice-list { border-top: 1px solid var(--line); }
.notice-row {
  display: grid;
  grid-template-columns: 100px 1fr 25px;
  gap: 15px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
  align-items: center;
  position: relative;
  transition: padding-left .3s var(--ease), background .3s var(--ease);
}
.notice-row:hover { background: #fffaf0; padding-left: 18px; }
.notice-row time { font-size: .74rem; font-family: var(--font-en); letter-spacing: .04em; }
.notice-row .go { transition: transform .3s var(--ease); }
.notice-row:hover .go { transform: translate(4px, -4px); }

/* ==========================================================================
   10 カテゴリ入口
   ========================================================================== */

.category-section { text-align: center; padding: 80px 0; }
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 34px; }
.category-item {
  border: 2px solid var(--color-ink);
  border-radius: 60% 60% 14px 14px;
  padding: 22px 8px 20px;
  background: #fffaf0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 700;
  transition: transform .3s var(--pop), background .3s var(--ease), box-shadow .3s var(--ease);
}
.category-item:nth-child(n+4) { background: #eef2e2; }
.category-item:hover { transform: translateY(-8px); box-shadow: 0 8px 0 rgba(66, 53, 39, .14); }
.category-item .mascot { width: 85px; height: 85px; margin-bottom: 12px; transition: transform .4s var(--pop); }
.category-item:hover .mascot { transform: rotate(-7deg) scale(1.1); }
.category-item small { font-weight: 400; font-size: .65rem; margin-top: 5px; color: var(--color-ink-soft); }

/* ==========================================================================
   11 よみもの／福祉／投稿のおさそい
   ========================================================================== */

/* 交互に組む大きなブロック（gooone のカテゴリ紹介へのオマージュ） */
.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  padding: 70px 0;
}
.feature-block.reverse .feature-visual { order: 2; }
.feature-visual { position: relative; }
.feature-visual .vignette { border-radius: 4px; }
.feature-visual .vignette img { transition: transform 1.2s var(--ease); }
.feature-block:hover .feature-visual .vignette img { transform: scale(1.03); }
.feature-copy { display: flex; gap: 22px; align-items: flex-start; }
/* 子の「最小幅」で列が親より広くなるのを防ぐ。
   nowrap のテキストリンクが入ると、狭い画面＋特大でグリッドの列が押し広げられる。 */
.feature-block > *,
.feature-copy > * { min-width: 0; }
.feature-copy .vertical {
  writing-mode: vertical-rl;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 900;
  letter-spacing: .22em;
  line-height: 1.9;
  margin: 0;
  max-height: 16em;
}
.feature-copy .body { flex: 1; }
.feature-copy .body p { font-size: .88rem; }
.feature-labels { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 10px; }

.reading .card-grid { grid-template-columns: repeat(2, 1fr); }
.reading .card-art { height: 240px; }
.reading .art-character { width: 220px; height: 220px; background-position: 50% 0; }
.reading .art-caption { font-size: 1.6rem; max-width: 60%; }

.support {
  display: flex;
  align-items: center;
  gap: 32px;
  border: 2px solid var(--color-keya-dark);
  background: #f4f6ea;
  border-radius: 20px;
  margin-block: 70px;
  padding: 28px 40px;
  position: relative;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.support:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(75, 122, 50, .2); }
.support .mascot { width: 130px; height: 130px; animation: asahi-bob 5s var(--ease) infinite; }
.support h2 { font-size: 1.5rem; margin-bottom: 8px; }
.support p { margin: 0; font-size: .86rem; }
.support .text-link { margin-left: auto; }

.invitation {
  border-top: 2px dashed #bfa88b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 35px;
  padding: 55px 20px 75px;
}
.invitation h2 { font-size: 1.65rem; }
.invitation p { font-size: .86rem; margin-bottom: 0; }
.invite-title { display: flex; gap: 25px; align-items: center; }
.invite-title .mascot { animation: asahi-bob 3.6s var(--ease) infinite; }

/* ==========================================================================
   12 フッター
   ========================================================================== */

.footer { background: #eae7d9; padding: 55px 0 25px; position: relative; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-nav { display: flex; gap: 25px; font-size: .8rem; flex-wrap: wrap; }
.footer-nav a { border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.footer-nav a:hover { border-color: var(--color-ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #cfc9b7;
  margin-top: 32px;
  padding-top: 22px;
  font-size: .65rem;
  gap: 20px;
}

/* ==========================================================================
   13 一覧・記事・検索・投稿フォーム・マイページ
   ========================================================================== */

.page-heading { padding: 55px 0 32px; border-bottom: 1px solid var(--line); margin-bottom: 44px; position: relative; }
.page-heading h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin: 10px 0; }
.page-heading .mascot { position: absolute; right: 0; bottom: 10px; width: 96px; height: 96px; animation: asahi-bob 4.6s var(--ease) infinite; }
.breadcrumbs { font-size: .74rem; color: var(--color-ink-soft); }
.breadcrumbs a:hover { color: var(--color-hino-deep); }
.page-content { min-height: 50vh; padding-bottom: 90px; }
.archive-grid { row-gap: 45px; }

/* イベント絞り込み */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 34px; }
.filter-bar .label { font-size: .78rem; font-weight: 700; margin-right: 4px; }
.filter-bar a {
  padding: 9px 20px;
  border: 2px solid var(--color-ink);
  border-radius: 40px;
  font-size: .82rem;
  font-weight: 700;
  background: var(--color-paper);
  transition: background .2s var(--ease), transform .2s var(--pop);
}
.filter-bar a:hover { transform: translateY(-2px); background: #fff2d8; }
.filter-bar a[aria-current="true"] { background: var(--color-hino-light); border-color: var(--color-hino-deep); }

/* 月ごとの区切り（イベント一覧） */
.month-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 10px 0 24px;
  font-family: var(--font-en);
  font-size: 1.5rem;
  letter-spacing: .06em;
}
.month-divider::after { content: ''; flex: 1; height: 2px; background: var(--line); }
.month-divider span { font-family: var(--font-ja); font-size: .78rem; font-weight: 700; color: var(--color-ink-soft); }

.article { max-width: 800px; margin: 0 auto; padding: 50px 0 80px; }
.article h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin: 24px 0; }
.article .card-art { height: 330px; margin-bottom: 30px; }
.article .art-character { width: 275px; height: 275px; }
.article .art-caption { font-size: 2.2rem; max-width: 52%; }
.article-body { line-height: 2.05; }
.article-body h2 { font-size: 1.5rem; margin-top: 44px; }
.article-body img { border-radius: 10px; margin: 20px 0; }
.article-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.article-gallery img { border-radius: 10px; }

.event-details { display: grid; grid-template-columns: 150px 1fr; border-top: 2px solid var(--color-ink); margin: 30px 0; }
.event-details dt, .event-details dd { padding: 15px 12px; border-bottom: 1px solid var(--line); margin: 0; }
.event-details dt { font-weight: 700; background: #fbf5e8; }

.demo-notice { border-left: 4px solid var(--color-hino-deep); background: #faf0dc; padding: 14px 20px; font-size: .8rem; margin: 24px 0; border-radius: 0 10px 10px 0; }

.share-row { display: flex; gap: 12px; align-items: center; margin-top: 44px; flex-wrap: wrap; font-size: .8rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 50px; }
.post-nav a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--color-paper); font-size: .84rem; transition: transform .25s var(--ease), border-color .25s var(--ease); }
.post-nav a:hover { transform: translateY(-3px); border-color: var(--color-ink); }
.post-nav .next { text-align: right; }

.search-form { display: flex; gap: 10px; margin-bottom: 35px; }
.search-form input { min-width: 0; flex: 1; padding: 13px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.search-form input:focus { border-color: var(--color-ink); }

.pagination { margin-top: 45px; display: flex; gap: 12px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 10px 18px; border: 2px solid var(--line); border-radius: 8px; transition: background .2s var(--ease), border-color .2s var(--ease); }
.pagination .page-numbers:hover { border-color: var(--color-ink); }
.pagination .current { background: var(--color-hino-light); border-color: var(--color-hino-deep); }

.empty { padding: 34px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; }
.empty .mascot { margin: 0 auto 14px; }

/* 投稿フォーム */
.form-shell {
  max-width: 740px;
  margin: 40px auto 90px;
  background: var(--color-paper);
  padding: 40px;
  border: 2px solid var(--color-ink);
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(66, 53, 39, .1);
}
.form-shell h1 { font-size: 1.9rem; }
.form-shell label { display: block; font-weight: 700; margin: 20px 0 8px; }
.form-shell input:not([type=radio]):not([type=checkbox]),
.form-shell textarea,
.form-shell select { width: 100%; border: 2px solid #a69c89; border-radius: 10px; padding: 12px; background: #fff; }
.form-shell input[type=file] { font-size: .85rem; }
.form-shell textarea { min-height: 200px; }
.form-shell fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.form-shell legend { font-size: 1.45rem; font-weight: 700; margin-bottom: 16px; }
.form-shell fieldset[data-step] { animation: step-in .45s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.category-choices { display: flex; gap: 10px; }
.category-choices label { flex: 1; text-align: center; border: 2px solid var(--line); padding: 15px 6px; border-radius: 18px; margin: 0; cursor: pointer; transition: transform .25s var(--pop), border-color .2s var(--ease), background .2s var(--ease); }
.category-choices label:hover { transform: translateY(-4px); }
.category-choices label:has(input:checked) { border-color: var(--color-hino-deep); background: #fff1d0; }
.category-choices .mascot { margin: auto; width: 75px; height: 75px; }
.form-actions { display: flex; justify-content: space-between; gap: 15px; }
.form-progress { font-size: .8rem; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 26px; }
.progress-track { height: 8px; background: #efe7d6; border-radius: 10px; overflow: hidden; margin-top: 10px; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--color-hino); border-radius: 10px; transition: width .4s var(--ease); }
.saved-message { font-size: .73rem; min-height: 28px; color: var(--color-ink-soft); }
.review-text { white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f1e8; padding: 20px; border-radius: 12px; }
.error { color: #8d1f1b; border: 2px solid #8d1f1b; background: #fff1ec; padding: 15px; border-radius: 12px; }
.success { border: 2px solid var(--color-keya-dark); background: #edf5e4; padding: 22px; border-radius: 14px; }

/* マイページ */
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 14px;
  border-bottom: 1px solid var(--line);
  transition: background .25s var(--ease);
}
.status-list li:hover { background: #fffaf0; }
.status-badge { padding: 4px 14px; border-radius: 40px; font-size: .72rem; font-weight: 700; text-align: center; }
.status-badge.publish { background: #e6f0da; color: #355a23; border: 1px solid #8ea77a; }
.status-badge.pending { background: #fff1d3; color: #7d5410; border: 1px solid #cfa968; }
.status-badge.draft { background: #f0ebe1; color: #5c5145; border: 1px solid #c3b8a5; }

/* ガイド */
.guide-steps { list-style: none; counter-reset: step; margin: 30px 0; padding: 0; }
.guide-steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 20px 20px 74px;
  margin-bottom: 14px;
  background: var(--color-paper);
  border: 2px solid var(--line);
  border-radius: 16px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.guide-steps li:hover { border-color: var(--color-ink); transform: translateX(4px); }
.guide-steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-hino-light);
  border: 2px solid var(--color-hino-deep);
  display: grid;
  place-items: center;
  font-family: var(--font-en);
  font-size: 1.2rem;
}
.guide-steps h3 { margin-bottom: 6px; }
.guide-steps p { margin: 0; font-size: .86rem; }

.duo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 34px 0; }
.duo-card { border: 2px solid var(--color-ink); border-radius: 20px; padding: 26px; background: var(--color-paper); }
.duo-card.keya { background: #f4f6ea; }
.duo-card .mascot { width: 100px; height: 100px; margin-bottom: 12px; }
.duo-card h3 { margin-bottom: 8px; }
.duo-card p { font-size: .85rem; margin-bottom: 0; }

/* カレンダー表示 */
.calendar-set { display: grid; gap: 44px; }
.calendar h2 { font-size: 1.3rem; margin-bottom: 14px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-grid .dow { text-align: center; font-size: .72rem; font-weight: 700; padding: 6px 0; color: var(--color-ink-soft); }
.calendar-grid .dow:first-of-type { color: #9c3a2a; }
.calendar-grid .dow:nth-of-type(7) { color: #2f5f88; }
.day {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: var(--color-paper);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .7rem;
  line-height: 1.4;
}
.day.empty { border: 0; background: transparent; min-height: 0; }
.day b { font-size: .82rem; }
.day.past { opacity: .45; }
.day.today { border-color: var(--color-hino-deep); box-shadow: 0 0 0 2px rgba(240, 124, 30, .22); }
.day.has-event { background: #fff5e2; }
.day a {
  display: block;
  background: var(--color-hino-light);
  border: 1px solid var(--color-hino-deep);
  border-radius: 6px;
  padding: 3px 6px;
  overflow: hidden;
  transition: transform .2s var(--pop);
}
.day a:hover { transform: translateY(-2px); }

.nav-overlay a small { font-size: .7rem; font-weight: 400; color: var(--color-ink-soft); }

/* ==========================================================================
   14 レスポンシブ
   ========================================================================== */

@media (min-width: 1500px) {
  .wrap { width: min(1280px, calc(100% - 120px)); }
  .sticky-bar { padding-inline: max(20px, calc((100% - 1280px) / 2)); }
}

@media (max-width: 1000px) {
  .wrap, .wrap-narrow { width: calc(100% - 40px); }
  .header-actions .guide-link { display: none; }
  .main-nav a { padding: 6px 4px; font-size: .84rem; }
  .card-grid { gap: 18px; }
  .carousel-track { grid-auto-columns: calc((100% - 18px) / 2); gap: 18px; }
  .notice-layout { gap: 30px; grid-template-columns: 1fr 1.9fr; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-block { gap: 30px; }
  .support { flex-wrap: wrap; padding: 24px; }
  .support .text-link { margin-left: 0; }
  /* 余白が 20px しかなく、どこに置いてもイラストに重なるので出さない。
     スクロールの誘導は .hero-bottom の「まちを歩く ↓」が担う。 */
  .hero-scroll { display: none; }
  .hero-side { display: none; }

  /* 本文の左右にキャラクターを置く余白が無くなるので、上下の余白へ逃がす。
     （620px の本文＋左右 74px 程度では、幅 80px のキャラクターが文字に重なる） */
  .message { padding: 96px 0 104px; }
  .scatter .mascot { opacity: .55; width: 62px; height: 62px; }
  .scatter .m2, .scatter .m4, .scatter .m6, .scatter .m8, .scatter .m9, .scatter .m10 { display: none; }
  .scatter .m1 { left: 6%;  top: 12px; }
  .scatter .m5 { right: 7%; top: 12px; }
  .scatter .m3 { left: 10%; top: auto; bottom: 16px; }
  .scatter .m7 { right: 9%; top: auto; bottom: 16px; }

  /* カードが3列のままなので絵の枠が約180pxまで縮む。
     165px のキャラクターでは、ホバーの拡大分が枠から出てしまう。 */
  .card-art .art-character { width: 130px; height: 130px; right: 12px; }

  /* 見出し右下のキャラクターに、見出しとリード文がかぶらないようにする */
  .page-heading h1,
  .page-heading > p { padding-right: 112px; }
}

@media (max-width: 760px) {
  .wrap, .wrap-narrow { width: calc(100% - 32px); }
  /* 横に並べると、タグラインが 99px まで潰れて語の途中で折り返す。
     右上の固定メニューボタンを避ける余白も要るので、素直に縦へ積む。 */
  /* 右上の吹き出しメニューは固定配置で、管理バーのぶん下がることもある。
     その帯を丸ごと空けておけば、文字サイズを大きくしても何も潜り込まない。
     幅が足りなくなった行は折り返す（320px＋特大では素直に2行になる）。 */
  .utility {
    display: block;
    padding-top: 10px;
    padding-right: calc(3.6rem + 20px);
  }
  .utility p { font-size: .62rem; letter-spacing: .02em; margin-bottom: 8px; }
  .size-controls { justify-content: flex-start; flex-wrap: wrap; gap: 5px 6px; }
  .size-label { font-size: .64rem; white-space: nowrap; }
  .size-buttons { gap: 6px; }
  .header-actions .button { white-space: nowrap; }
  .brand-row { padding: 12px 0; }
  .brand-mark { width: 42px; height: 42px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 1.15rem; white-space: nowrap; }
  .brand-name small { font-size: .48rem; letter-spacing: .1em; }
  .header-actions .button { font-size: .7rem; gap: 8px; padding: 8px 14px; min-height: 44px; }
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .sticky-bar { display: none; }
  .page-rail { display: none; }
  .floating-invite { display: none; }

  .hero { padding-top: 24px; }
  .hero-kicker { font-size: .65rem; letter-spacing: .14em; }
  .hero h1 { font-size: clamp(1.5rem, 7.6vw, 2.1rem); letter-spacing: .04em; }
  .hero h1 em { white-space: nowrap; }
  .hero-description { font-size: .76rem; margin-top: 16px; }
  .hero-side { display: none; }
  /* 画面いっぱいに出し、並木道の右側（ふたりが居るあたり）だけを切り出す。
     100vw はスクロールバー幅を含んでしまうので使わず、.wrap の左右余白 16px を打ち消す。 */
  .hero-stage { margin-inline: -16px; }
  .hero-landscape .vignette.landscape { --crop-x: 620; --crop-w: 916; aspect-ratio: 916 / 508; }
  .hero-note { font-size: .62rem; padding: 9px 13px; left: 5%; top: 16%; }
  .hero-scroll { display: none; }
  .hero-bottom { font-size: .6rem; padding: 12px 0; flex-wrap: wrap; gap: 6px; }

  /* キャラクターを本文の左右に置く余白が無いので、上下の余白へ逃がす。
     390px では .message-inner が画面の 90% を占め、脇に重ねると文字にかぶるため。 */
  .message { padding: 78px 0 86px; }
  .message-title { font-size: 1.1rem; letter-spacing: .32em; line-height: 1.95; margin-bottom: 30px; }
  .message-body p { font-size: .85rem; }
  .scatter .mascot { opacity: .55; }
  .scatter .m2, .scatter .m4, .scatter .m6, .scatter .m8, .scatter .m9, .scatter .m10 { display: none; }
  .scatter .m1, .scatter .m3, .scatter .m5, .scatter .m7 { width: 52px; height: 52px; }
  .scatter .m1 { left: 5%;  top: 8px; }
  .scatter .m5 { right: 6%; top: 8px; }
  .scatter .m3 { left: 9%;  top: auto; bottom: 12px; }
  .scatter .m7 { right: 8%; top: auto; bottom: 12px; }

  .section { padding: 40px 0 46px; }
  .band { background-size: 100% 54px, 100% 54px; }
  .band, .band.section { padding-block: 70px 66px; }
  .section-heading { margin-bottom: 28px; }
  .section-heading .en { font-size: 2.1rem; }
  .section-heading .ja { font-size: .88rem; }
  .section-head { flex-wrap: wrap; gap: 12px; }
  .section-title { gap: 8px; }
  .mascot { width: 62px; height: 62px; }
  .section-head .text-link { font-size: .72rem; gap: 8px; }

  .card-grid { grid-template-columns: 1fr; }
  .carousel-track { grid-auto-columns: 84%; gap: 14px; }
  .card-art { height: 200px; }
  .art-caption { font-size: 1.15rem; left: 14px; top: 16px; max-width: 64%; }
  .card-art .art-character { width: 150px; height: 150px; right: 10px; }
  .story-card > a { padding: 16px; }
  .story-card h3 { font-size: 1.05rem; }

  .notice-layout { display: block; padding: 20px 0 40px; }
  .notice-layout .section-heading { text-align: left; }
  .notice-row { grid-template-columns: 78px 1fr 16px; font-size: .82rem; gap: 10px; }
  .notice-row time { font-size: .66rem; }

  .category-section { padding: 44px 0; }
  .category-grid { gap: 8px; }
  .category-item { font-size: .82rem; padding: 15px 3px; }
  .category-item .mascot { width: 62px; height: 62px; }
  .category-item small { font-size: .56rem; }

  .feature-block { grid-template-columns: 1fr; padding: 40px 0; }
  .feature-block.reverse .feature-visual { order: 0; }
  .feature-copy { gap: 14px; }
  .feature-copy .vertical { font-size: 1.1rem; max-height: 13em; }
  /* 狭い画面では、矢印つきリンクも折り返せるようにする */
  .feature-copy .text-link { white-space: normal; gap: 10px; }
  .reading .card-grid { grid-template-columns: 1fr; }
  .reading .card-art { height: 210px; }
  .reading .art-character { width: 180px; height: 180px; }

  .support { gap: 12px; padding: 20px; margin-block: 40px; }
  .support .mascot { width: 76px; height: 76px; }
  .support > div { flex: 1; min-width: 180px; }
  .support h2 { font-size: 1.1rem; }
  .support p { font-size: .78rem; }

  .invitation { display: block; padding: 34px 0 44px; }
  .invite-title { gap: 12px; }
  .invitation h2 { font-size: 1.25rem; }
  .invitation p { font-size: .79rem; }
  .invitation .button { margin-top: 22px; }

  .footer-top, .footer-bottom { display: block; }
  .footer-nav { margin-top: 22px; gap: 16px; font-size: .74rem; }
  .footer-bottom p { margin-top: 10px; }

  .page-heading { padding-top: 28px; margin-bottom: 30px; }
  .page-heading .mascot { width: 62px; height: 62px; bottom: 6px; }
  /* スマホではキャラクターが 62px なので、余白もそれに合わせて詰める */
  .page-heading h1,
  .page-heading > p { padding-right: 76px; }

  .article { padding-top: 24px; }
  .article .card-art { height: 220px; }
  .article .art-caption { font-size: 1.35rem; max-width: 64%; }
  .article .art-character { width: 180px; height: 180px; }
  .event-details { grid-template-columns: 100px 1fr; font-size: .86rem; }
  .post-nav { grid-template-columns: 1fr; }
  .duo-cards { grid-template-columns: 1fr; }
  .status-list li { grid-template-columns: 1fr; gap: 8px; }

  .form-shell { padding: 24px 18px; margin-top: 25px; border-radius: 16px; }
  .form-shell legend { font-size: 1.2rem; }
  .category-choices .mascot { width: 55px; height: 55px; }
  .category-choices label { font-size: .8rem; }
  .form-actions .button { padding: 10px 16px; font-size: .86rem; }
  .page-content { padding-bottom: 50px; }
  .calendar-grid { gap: 3px; }
  .day { min-height: 56px; padding: 4px; font-size: .58rem; border-radius: 6px; }
  .day b { font-size: .7rem; }
  .day a { padding: 2px 3px; }
  .filter-bar a { padding: 8px 14px; font-size: .76rem; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 1rem; }
  .header-actions .button { font-size: .64rem; padding: 8px 12px; }
  /* サイト名と投稿ボタンが1行に収まらない幅では、ボタンを次の行へ送る。
     幅を詰めてボタンの中で改行させると、文字が団子になって読めなくなるため。 */
  .brand-row { flex-wrap: wrap; gap: 10px; }
  .header-actions { margin-left: auto; }
}

/* 文字を大きくしたときにヘッダーが破綻しないように */
@media (max-width: 760px) {
  body.text-large .brand-row,
  body.text-largest .brand-row { flex-wrap: wrap; gap: 12px; }
  body.text-large .header-actions,
  body.text-largest .header-actions { margin-left: auto; }
}

/* ==========================================================================
   15 動きを減らす設定
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  [data-motion] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .hero h1 .line > span { transform: none !important; }
  .has-motion [data-motion] { opacity: 1 !important; transform: none !important; }
  .hero h1 em::after { transform: scaleX(1) !important; }
  .hero-description { opacity: 1 !important; }
  .loader { display: none !important; }
}
