@charset "UTF-8";
/* ==========================================================================
   さくらそう会 — components.css
   ボタンは3種類＋幅バリアントに限定する（増やさない）。
   ========================================================================== */

@layer components {

  /* ====================================================== アイコン */
  .c-icon {
    width: var(--icon-md); height: var(--icon-md);
    stroke: currentColor;
    fill: none;
    stroke-width: var(--icon-stroke);
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    vertical-align: middle;
  }
  .c-icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
  .c-icon--lg { width: var(--icon-lg); height: var(--icon-lg); }
  .c-icon--xl { width: var(--icon-xl); height: var(--icon-xl); }

  /* ====================================================== ボタン（3種） */
  .c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 48px;
    padding: var(--sp-3) var(--sp-6);
    border-radius: var(--r-sm);
    font-family: var(--ff-body);
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tr-wide);
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
    border: 1px solid transparent;
    transition: background-color var(--dur) var(--ease),
                color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
  }

  /* 1. primary — 主導線 */
  .c-btn--primary {
    background: var(--c-action-accent);
    color: var(--c-text-on-action);
  }
  .c-btn--primary:hover { background: var(--c-action-accent-hover); color: var(--c-text-on-action); }

  /* 2. secondary — 副次導線 */
  .c-btn--secondary {
    background: transparent;
    color: var(--c-action-primary);
    border-color: var(--c-brand-200);
  }
  .c-btn--secondary:hover {
    background: var(--c-brand-50);
    color: var(--c-action-primary-hover);
    border-color: var(--c-brand-600);
  }

  /* 3. brand — 紺ベタ。写真の上など、白では沈む場所の導線に。 */
  .c-btn--brand {
    background: var(--c-action-primary);
    color: var(--c-text-on-action);
  }
  .c-btn--brand:hover { background: var(--c-action-primary-hover); color: var(--c-text-on-action); }

  /* 4. quiet — 濃色地の上／控えめな導線 */
  .c-btn--quiet {
    background: var(--c-bg);
    color: var(--c-action-primary);
    border-color: transparent;
  }
  .c-btn--quiet:hover { background: var(--c-brand-50); }

  /* 幅バリアント */
  .c-btn--full  { width: 100%; }
  .c-btn--wide  { min-width: 260px; }

  /* ====================================================== カード */
  .c-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--c-surface);
    border-radius: var(--r-md);
    overflow: hidden;
    /* 触れる前から浮かせておく。カードが押せるものだと最初から分かるように。 */
    box-shadow: var(--sh-md);
    transition: box-shadow var(--dur) var(--ease);
  }
  /* inherit にすると濃色帯の白を継いでしまい、カード内の文字が消える。
     トークン経由にして、明るい島の設定に追従させる。 */
  a.c-card, a.c-card:visited { text-decoration: none; color: var(--c-text); }
  a.c-card:hover { box-shadow: var(--sh-lg); }

  .c-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-kinari-100); }
  .c-card__media img { width: 100%; height: 100%; object-fit: cover; }
  /* 文字の入った図版や縦長の絵は切り取らず、全体を見せる（余白は生成り）。 */
  .c-card__media--whole img { object-fit: contain; }
  .c-card__body { padding: var(--sp-5); display: grid; gap: var(--sp-2); }
  .c-card__title { font-size: var(--fs-h4); font-weight: var(--fw-semibold); font-family: var(--ff-heading); text-wrap: balance; word-break: auto-phrase; }

  /* 説明カード：アイコン＋見出し＋短い本文 */
  .c-card--feature .c-card__body { gap: var(--sp-3); padding: var(--sp-5); }
  .c-card--feature h3 { font-size: var(--fs-h4); }
  .c-card__ico { color: var(--c-emphasis); display: block; line-height: 1; }

  /* 品種カード（正方形サムネイル） */
  .c-card--variety .c-card__media { aspect-ratio: 1 / 1; }
  .c-card--variety .c-card__body  { padding: var(--sp-4); gap: 0; text-align: center; }

  /* ====================================================== 数値バー */
  /* 初版の見せ方を踏襲：アイコン＋ラベル＋数字を横並びに置く */
  .c-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
  }
  @media (min-width: 900px) { .c-stats { grid-template-columns: repeat(4, 1fr); } }

  .c-stats__item {
    display: flex; align-items: center; justify-content: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-4);
    border-block-end: 1px solid var(--c-line);
  }
  .c-stats__item:nth-child(odd) { border-inline-end: 1px solid var(--c-line); }
  @media (min-width: 900px) {
    .c-stats__item { border-block-end: 0; border-inline-end: 1px solid var(--c-line); }
    .c-stats__item:last-child { border-inline-end: 0; }
  }
  .c-stats__ico { flex: 0 0 auto; }
  .c-stats__ico img { height: 54px; width: auto; }
  @media (max-width: 899px) { .c-stats__ico img { height: 40px; } }

  .c-stats__body { display: grid; gap: 2px; }
  .c-stats__label { font-size: var(--fs-caption); color: var(--c-text-muted); line-height: 1.4; }
  .c-stats__num {
    font-family: var(--ff-heading);
    font-size: var(--fs-stat);
    font-weight: var(--fw-bold);
    color: var(--c-brand-900);
    line-height: 1.15;
  }
  .c-stats__num small {
    font-family: var(--ff-body);
    font-size: var(--fs-small);
    font-weight: var(--fw-normal);
    color: var(--c-text);
  }

  /* ====================================================== 定義テーブル */
  .c-table th, .c-table td {
    padding: var(--sp-4);
    border: 0;    /* WordPress の表ブロック（全辺に線）を打ち消す。線は下だけ */
    border-block-end: 1px solid var(--c-line);
    text-align: start;
    vertical-align: top;
    font-size: var(--fs-small);
  }
  .c-table th {
    width: 12em;
    font-weight: var(--fw-semibold);
    color: var(--c-text-muted);
    background: var(--c-surface-alt);
    white-space: nowrap;
  }
  /* 帯の和紙が透けると小さい文字が読みにくいので、値のセルは白で伏せる。
     th は生成り（--c-surface-alt）のままで、見出し列との差を残す。 */
  .c-table td { background: var(--c-surface); }
  @media (max-width: 599px) {
    .c-table th, .c-table td { display: block; width: auto; }
    .c-table th { border-block-end: 0; }
  }

  /* ====================================================== タグ */
  .c-tag {
    display: inline-flex; align-items: center; gap: var(--sp-1);
    padding: 0.3em 0.9em;
    border-radius: var(--r-pill);
    background: var(--c-surface);
    color: var(--c-brand-800);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    text-decoration: none;
    border: 1px solid var(--c-brand-600);
    transition: background-color var(--dur) var(--ease);
  }
  a.c-tag:hover { background: var(--c-brand-50); color: var(--c-brand-900); }
  .c-tag--accent { background: var(--c-accent-50); color: var(--c-emphasis); border-color: var(--c-accent-100); }

  /* ====================================================== 手順（ステップ） */
  .c-steps { counter-reset: step; display: grid; gap: var(--sp-5); }
  .c-steps__item {
    counter-increment: step;
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: var(--sp-4);
    align-items: start;
  }
  /* ラベル版：連番でなく時代名などを置く場合 */
  .c-steps--marked { counter-reset: none; }
  .c-steps--marked .c-steps__item { grid-template-columns: 5rem 1fr; }
  .c-steps--marked .c-steps__item::before { content: none; }
  .c-steps__mark {
    display: grid; place-items: center;
    min-height: 2.75rem; padding: var(--sp-2);
    border-radius: var(--r-sm);
    background: var(--c-brand-800);
    color: var(--c-text-invert);
    font-family: var(--ff-heading);
    font-size: var(--fs-small);
  }
  /* 「1961年」「3月」のように2行で見せるラベルは、span で行を分ける（素の <br> を使わない）。
     c-steps__mark は grid なので、外側の span 1つにまとめて「1つの中身」として中央に置く。 */
  .c-steps__mark > span > span { display: block; }

  .c-steps__item::before {
    content: counter(step);
    display: grid; place-items: center;
    /* 見出し（h3=21px×1.5）の1行目の中心に丸を合わせる */
    margin-block-start: calc((var(--fs-h3) * var(--lh-heading) - 2.5rem) / 2);
    width: 2.5rem; height: 2.5rem;
    border-radius: 50%;
    background: var(--c-brand-800);
    color: var(--c-text-invert);
    font-family: var(--ff-num);
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
  }

  /* ====================================================== 図版 */
  .c-figure { display: grid; gap: var(--sp-3); }
  /* グリッドに入っていない単独の図版は、本文幅いっぱいに広がると
     原寸で出てしまう。読み物幅に収める。 */
  /* 表ブロック（figure.wp-block-table）は図版ではないので除く。:where で詳細度を上げない（下の図解の幅指定が負けないように） */
  .l-container > .c-figure,
  .l-container > figure:where(:not(.wp-block-table)) { max-width: var(--container-read); margin-inline: auto; }
  /* 図解・説明図はさらに小さく。写真と違い、大きくしても情報量は増えない。
     上の l-container 直下ルールより詳細度を上げておく。 */
  .l-container > .c-figure--diagram,
  .c-figure--diagram { max-width: 30rem; }
  .c-figure img { border-radius: var(--r-md); width: 100%; }
  .c-figure figcaption { font-size: var(--fs-caption); color: var(--c-text-muted); line-height: 1.8; }
  /* キャプション内の小見出し。br で下に文が続くため、行間で間隔を作る。 */
  .c-figure figcaption strong,
  .l-grid > figure figcaption strong,
  .c-figure__label {
    display: block;
    font-weight: var(--fw-semibold);
    color: var(--c-text);
    line-height: 2;
  }

  /* グリッド内の素の figure。画像とキャプションが密着していた。 */
  .l-grid > figure { display: grid; gap: var(--sp-3); align-content: start; }
  .l-grid > figure img { border-radius: var(--r-md); }
  .l-grid > figure figcaption strong + br { display: none; }
  .l-grid > figure a,
  .l-grid > figure a:visited { display: grid; gap: var(--sp-3); text-decoration: none; color: var(--c-text); }
  .l-grid > figure figcaption { font-size: var(--fs-small); line-height: 1.5; }


  /* 注記の中の見出し */
  .c-note > h3 { font-size: var(--fs-h4); --flow: 0; }

  /* ====================================================== 注記 */
  /* 注記の頭の小見出し（太字1行）。本文は次の行から続く。素の <br> の代わり。 */
  .c-note__title { display: block; }
  .c-note {
    display: grid; gap: var(--sp-3);
    padding: var(--sp-5);
    background: var(--c-surface-alt);
    border-inline-start: 3px solid var(--c-brand-200);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-size: var(--fs-small);
  }

  /* ====================================================== パンくず */
  .c-breadcrumb { display: flex; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--fs-caption); color: var(--c-text-muted); }
  .c-breadcrumb a { text-decoration: none; }
  .c-breadcrumb li + li::before { content: "›"; margin-inline-end: var(--sp-2); color: var(--c-text-subtle); }

  /* ====================================================== フォーム */
  .c-field { display: grid; gap: var(--sp-2); --flow: var(--sp-5); }
  .c-field__label { font-weight: var(--fw-semibold); font-size: var(--fs-small); display: flex; align-items: center; gap: var(--sp-2); }
  .c-field__req {
    font-size: var(--fs-caption); font-weight: var(--fw-normal);
    padding: 0.1em 0.6em; border-radius: var(--r-sm);
    background: var(--c-accent-50); color: var(--c-emphasis);
  }
  .c-input, .c-select, .c-textarea {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r-sm);
    background: var(--c-bg);
    font-size: var(--fs-small);
    transition: border-color var(--dur) var(--ease);
  }
  .c-textarea { min-height: 8rem; resize: vertical; }
  .c-input:hover, .c-select:hover, .c-textarea:hover { border-color: var(--c-brand-600); }
  .c-input[aria-invalid="true"], .c-select[aria-invalid="true"], .c-textarea[aria-invalid="true"] { border-color: var(--c-error); }
  .c-field__error { display: block; margin-block-start: var(--sp-1); font-size: var(--fs-caption); color: var(--c-error); }
  .c-field__note { font-size: var(--fs-caption); color: var(--c-text-muted); }

  /* フォーム全体（Contact Form 7 の form に html_class="c-form" で付ける） */
  .c-form { display: grid; gap: var(--sp-5); }
  .c-form__accept { font-size: var(--fs-small); }
  .c-form__submit { display: flex; justify-content: center; }
  .c-form__submit .c-btn { min-width: 260px; }
  /* 必須が入るまで押せないボタン（cf7-enhance.js が is-disabled を付け外しする） */
  .c-btn.is-disabled, .c-btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

  /* チェック・ラジオ：スマホは縦、PC は横に並べる */
  .c-form input[type="checkbox"], .c-form input[type="radio"] {
    width: 1.25em; height: 1.25em; margin: 0; vertical-align: -0.2em;
    accent-color: var(--c-action-primary);
  }
  .c-form label:has(> input[type="checkbox"]), .c-form label:has(> input[type="radio"]) {
    display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer;
  }

  /* ====================================================== 確認画面（モーダル） */
  .c-modal {
    width: min(100% - 2 * var(--sp-4), 40rem);
    max-height: calc(100dvh - 2 * var(--sp-5));
    margin: auto; /* base.css のリセットで 0 になるため、画面の中央に戻す */
    padding: 0;
    border: 0;
    border-radius: var(--r-md);
    background: var(--c-surface);
    color: var(--c-text);
    overflow: auto;
  }
  .c-modal::backdrop { background: color-mix(in srgb, var(--c-brand-900) 55%, transparent); }
  .c-modal__inner { padding: var(--sp-6) var(--sp-5); }
  .c-modal__title { font-size: var(--fs-h3); margin: 0; }
  .c-modal__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
  .c-modal__actions .c-btn { flex: 1 1 10rem; }

  .c-confirm { display: grid; grid-template-columns: 1fr; margin: 0; border-block-start: 1px solid var(--c-line); }
  .c-confirm dt { padding: var(--sp-3) 0 0; font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--c-text-muted); }
  .c-confirm dd { margin: 0; padding: var(--sp-1) 0 var(--sp-3); border-block-end: 1px solid var(--c-line); font-size: var(--fs-small); white-space: pre-wrap; overflow-wrap: anywhere; }
  @media (min-width: 600px) {
    .c-confirm { grid-template-columns: 11em 1fr; }
    .c-confirm dt { padding: var(--sp-3) var(--sp-3) var(--sp-3) 0; border-block-end: 1px solid var(--c-line); }
    .c-confirm dd { padding: var(--sp-3) 0; }
  }

  /* ====================================================== 番号つきカード */
  /* 番号 → 見出し → 本文を上詰めで並べる。
     h3 の既定余白が効くと番号との間が大きく開くため、ここで打ち消す。 */
  .c-numcard {
    display: flex; flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-5);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    height: 100%;
  }
  .c-numcard > * { margin-block: 0; }
  .c-numcard__num {
    font-family: var(--ff-num);
    font-size: var(--fs-h4);
    font-weight: var(--fw-bold);
    color: var(--c-emphasis);
    line-height: 1;
    letter-spacing: .08em;
  }
  .c-numcard h3 { font-size: var(--fs-h4); }
  /* 番号をエディタの段落で置いた場合（p.c-numcard__num）は、本文の文字サイズを当てない */
  .c-numcard p:not(.c-numcard__num) { font-size: var(--fs-small); }

  /* ====================================================== 検索欄 */
  .c-searchfield { --flow: var(--sp-5); }
  .c-searchfield .c-input { max-width: 32em; }

  /* ====================================================== タグ（ボタン版） */
  button.c-tag { cursor: pointer; font-family: inherit; }
  button.c-tag:hover { background: var(--c-brand-50); border-color: var(--c-brand-800); }
  .c-tag[aria-pressed="true"] {
    background: var(--c-action-primary);
    color: var(--c-text-on-action);
    border-color: var(--c-action-primary);
  }

  /* ====================================================== ロゴ */
  /* ロゴは文字組みのみ。図案マークは使用しない。 */
  .c-logo {
    display: inline-flex; flex-direction: column; gap: 2px;
    text-decoration: none; line-height: 1.2;
  }
  .c-logo__ja {
    font-family: var(--ff-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-logo-ja);
    letter-spacing: 0.06em;
    color: var(--c-logo-ai);
  }
  .c-logo__en {
    font-family: var(--ff-num);
    font-size: var(--fs-logo-en);
    letter-spacing: 0.145em;
    color: var(--c-text-muted);
  }

  /* 数値バー（スマホ）：「約230名」の単位だけが次の行に落ちないよう1行に固定し、
     狭い端末でも収まるよう間隔と数字を少し詰める。 */
  @media (max-width: 599px) {
    .c-stats__item { gap: var(--sp-3); padding-inline: var(--sp-3); }
    .c-stats__num { white-space: nowrap; font-size: var(--fs-stat-sp); }
  }

  /* ##################################################################
     あしらい（旧 ornament.css）
     罫・括り・小さな意匠だけを集める。図案（花のマーク）は使わない。線と余白でつくる。
     上の部品の指定を上書きするので、components の最後に置く。
     ################################################################## */


  /* ======================================================== 見出しの罫 */
  /* h2 のデフォルト装飾は太い罫の一本組み。
     以前あった細い1pxの副罫（h2::after）は削除した。 */
  h2 { padding-inline-start: 0.8em; }
  h2::before { width: 5px; border-radius: 1px; }
  /* 装飾を外す指定のときは、字下げも一緒に消す。
     これを忘れると「マークが無いのに一字下がっている」状態になる。 */
  h2:is(.t-heading--plain, .is-style-plain),
  h2:is(.t-heading--underline, .is-style-underline),
  h2:is(.t-heading--centered, .is-style-centered),
  h2.t-heading--number { padding-inline-start: 0; }

  /* 下線パターンは、太い線の右に細い線を継ぐ */
  h2:is(.t-heading--underline, .is-style-underline) { padding-inline-start: 0; }
  h2:is(.t-heading--underline, .is-style-underline)::after {
    content: "";
    inset-inline-start: 0; inset-block: auto 0;
    width: 2.5em; height: 3px;
    background: linear-gradient(90deg,
      var(--c-emphasis) 0 1.6em,
      var(--c-brand-200) 1.6em 100%);
  }

  /* ======================================================== Eyebrow */
  /* 英字ラベルの前に短い横罫を引く。図案の代わりの目印。 */
  .t-eyebrow {
    display: flex; align-items: center; gap: .8em;
  }
  .t-eyebrow::before {
    content: "";
    flex: 0 0 auto;
    width: 2em; height: 1px;
    background: var(--c-emphasis);
  }

  /* ======================================================== カードのあしらい */
  .c-card { position: relative; }
  .c-card--variety .c-card__body { position: relative; padding-block-start: var(--sp-4); }
  .c-card--variety .c-card__title { letter-spacing: .04em; }

  /* ======================================================== 定義表のあしらい */
  .c-table th { position: relative; }
  .c-table th::after {
    content: "";
    position: absolute; inset-block: 25% ; inset-inline-end: 0;
    width: 1px; background: var(--c-line);
  }
  @media (max-width: 599px) { .c-table th::after { content: none; } }

  /* ======================================================== 注記のあしらい */
  /* 菱は「順序や階層の記号」と誤読されたため撤去。縦罫のみで静かに区切る。 */
  .c-note { position: relative; }

  /* ======================================================== リンクのあしらい */
  /* 下線は typography.css の currentColor に任せる（文字色と同色）。
     ここで色を上書きすると文字と下線がずれる。 */
  .t-textlink { position: relative; }
  .t-textlink .c-icon { transition: transform var(--dur) var(--ease); }
  .t-textlink:hover .c-icon { transform: translateX(.25em); }

  /* ======================================================== フッター */
  .p-footer__col h3 { position: relative; padding-block-end: var(--sp-2); }
  .p-footer__col h3::after {
    content: "";
    position: absolute; inset-block-end: 0; inset-inline-start: 0;
    width: 1.6em; height: 1px;
    background: var(--c-accent-200);
  }

  /* ======================================================== 手順の縦線 */
  /* 番号の丸どうしを細い線でつなぎ、順序であることを示す。 */
  .c-steps { position: relative; }
  .c-steps .c-steps__item { position: relative; }
  .c-steps .c-steps__item:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: calc(2.75rem / 2 - .5px);
    inset-block-start: 3.1rem;
    width: 1px; height: calc(100% - 2.35rem);
    background: var(--c-brand-200);
  }
  .c-steps--marked .c-steps__item::after { content: none; }
}
