/* ==========================================================================
   rh-base.css — デザイントークンと土台
   既存テーマに足しても衝突しないよう、クラスはすべて rh- で始める。
   値の出どころ: Figma「両備ホームズUI・UX改善」ページ original
   ========================================================================== */

:root {
  /* 色 */
  --rh-blue: #0054a6;        /* メイン（ボタン・帯・バッジ） */
  --rh-link: #0057a8;        /* リンク・見出しの青 */
  --rh-dark: #123554;        /* 濃紺（カード見出し） */
  --rh-ink: #25384b;         /* 本文インク（フッター・リンク） */
  --rh-text: #253b37;        /* 見出し・フォーム文字 */
  --rh-black: #1e1e1e;
  --rh-gray: #272d2b;        /* リード・補足（#64716b は薄くて読みにくい → ひとつ濃いグレーに） */
  --rh-muted: #2a3138;       /* 10/4 --rh-gray とあわせて濃く（今は未使用） */
  --rh-card-lead: #526b7e;
  --rh-placeholder: #aeb8c1;
  --rh-soft: #f1f6fa;        /* 淡い青（カード下地） */
  --rh-pale: #eef0f3;        /* 淡いグレー青（フッター・帯） */
  --rh-line: #dbe3eb;        /* 罫線（入力枠） */
  --rh-line-2: #dce1da;      /* 罫線（区切り・タイル） */
  --rh-line-blue: #abcbeb;
  --rh-white: #fff;
  --rh-line-green: #4cc764;
  --rh-red: #c4283a;         /* 開催中のバッジ。目立たせつつ青・紺になじむ、少し深い赤（前は #e22020） */

  /* 書体
     ゴシック＝Noto Sans JP（Google Fonts）。端末で見え方がそろい、Windows の細い游ゴシックの問題も無くなる。400／500（Figma の Medium）／700
     明朝＝Shippori Mincho（Google Fonts）で全端末を統一。游明朝に近い端正な明朝。500（Figma の Medium）／600（Demibold）／700
     英字＝Libre Baskerville（Google Fonts。本番と同じ） */
  --rh-serif: "Shippori Mincho", "游明朝体", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --rh-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Meiryo", sans-serif;
  --rh-en-serif: "Libre Baskerville", serif;
  --rh-en-sans: "Helvetica Neue", "Helvetica", "Arial", sans-serif;

  /* レイアウト */
  --rh-content: 1160px;
  --rh-gutter: 60px;
  --rh-header-h: 94px;

  /* 角丸 */
  --rh-r-input: 1px;
  --rh-r-btn: 3px;
  --rh-r-card: 6px;
  --rh-r-pill: 60px;
}

@media (max-width: 767px) {
  :root {
    --rh-gutter: 20px;
    --rh-header-h: 64px;
  }
}

/* --- 土台（rh-page の中だけに効かせる） --- */
html .rh-page,
html .rh-page *,
html .rh-page *::before,
html .rh-page *::after { box-sizing: border-box; }

html .rh-page {
  margin: 0;
  color: var(--rh-text);
  font-family: var(--rh-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background: var(--rh-white);
}
/* :where で詳細度を 0 にし、部品側のクラス指定が必ず勝つようにする */
html :where(.rh-page) img { max-width: 100%; height: auto; vertical-align: middle; }
html :where(.rh-page) a { color: inherit; text-decoration: none; }
html :where(.rh-page) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
html :where(.rh-page) :where(ul, html ol) { margin: 0; padding: 0; list-style: none; }
html :where(.rh-page) :where(h1, html h2, html h3, html h4, html p) { margin: 0; }
/* 1文字だけ次の行に落ちる「泣き別れ」を防ぐ（見出しは行を均等に）。本文は通常の折り返し（10/4 夜：text-wrap: pretty は iPhone の Safari で早めに改行して段落の右に大きな空きが出るため外した） */
/* 見出しは単語の途中で折らない（句読点・カッコ・<wbr> の位置で折る。収まらないときだけ途中で折る） */
html :where(.rh-page) :where(h1, html h2, html h3, html h4, html dt, html th) { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
/* 数値と単位などを1かたまりで折り返す */
html .rh-nw { white-space: nowrap; }
/* hidden 属性は、部品側の display 指定より必ず優先する */
html .rh-page [hidden] { display: none !important; }
/* ページ内リンクはなめらかにスクロール。固定ヘッダーの分だけ止める位置を下げる */
@media (prefers-reduced-motion: no-preference) { html:has(body.rh-page) { scroll-behavior: smooth; } }
html .rh-page [id] { scroll-margin-top: calc(var(--rh-header-h) + 16px); }

html .rh-inner {
  width: 100%;
  max-width: calc(var(--rh-content) + var(--rh-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--rh-gutter);
}

html .rh-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 丸い矢印（↗）— CTA カード・メニューカードの右下 */
html .rh-arrow-circle {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--rh-blue); color: var(--rh-white);
  font-size: 14px; line-height: 1;
}
html .rh-arrow-circle--s { width: 24px; height: 24px; font-size: 10.5px; }
html .rh-arrow-circle--xs { width: 14px; height: 14px; font-size: 6px; }

/* 青丸のシェブロン（›）— 横長リンクカード */
html .rh-chev-circle {
  display: inline-grid; place-items: center; flex: none;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--rh-blue);
}
html .rh-chev-circle::before {
  content: ""; width: 4px; height: 4px; margin-left: -1px;
  border: solid #fff; border-width: 1.2px 1.2px 0 0; transform: rotate(45deg);
}
html .rh-chev-circle--s { width: 12px; height: 12px; }
html .rh-chev-circle--s::before { width: 3px; height: 3px; }

/* フォーカスの見た目（デザインに無いので、メインの青で統一） */
html :where(.rh-page) a:focus-visible,
html :where(.rh-page) button:focus-visible {
  outline: 2px solid var(--rh-blue);
  outline-offset: 2px;
}
