/* ハピベビ公式サイトの共通スタイル
   色はそだち手帳と同じ系統。文字の大きさは app/文字サイズ・読みやすさガイド.md に合わせる
   （読ませたい文 16px、補足 13px以上、灰色は背景の上で4.5:1以上） */
:root {
  color-scheme: light;
  --bg: #fdf7f2;
  --surface: #ffffff;
  --text: #33302e;
  --text-muted: #655e5b;   /* 背景の上で5.98:1 */
  --border: #ece3db;
  --primary: #e88b7d;      /* 線・飾りだけに使う（文字には薄すぎる） */
  --link: #a84d40;         /* 背景の上で5.2:1。白い文字を乗せても5.53:1 */
  --accent: #5f9e82;
  --catch: #946055;        /* トップの見出し。背景の上で4.86:1 */
  --note-bg: #fff6e9;
  --note-border: #f0d9ad;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #211d1a;
    --surface: #2b2622;
    --text: #f3ece5;
    --text-muted: #b3a89f;
    --border: #443c35;
    --primary: #e8a99d;
    --link: #f0bcb2;
    --accent: #93c7b7;
    --catch: #f0c4b8;
    --note-bg: #322a20;
    --note-border: #5a4a30;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--link); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.brand small { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); margin-left: 6px; letter-spacing: 0.08em; }
.site-nav a { font-size: 0.94rem; font-weight: 700; text-decoration: none; padding: 8px 4px; }

main.wrap { padding-top: 32px; padding-bottom: 48px; }  /* .wrap の左右の余白は残す */

h1 {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 1.6rem;
  line-height: 1.5;
  margin: 0 0 8px;
  text-wrap: balance;
}
h2 {
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
}
h3 { font-size: 1.05rem; margin: 24px 0 6px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 1.4em; }
li { margin-bottom: 6px; }

/* トップの見出し：やわらかい色の丸ゴシック。パソコンでは1行、
   1行に収まらない幅（スマホなど）では「、」のあとで2行にする */
.catch {
  color: var(--catch);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  font-weight: 400;
  font-feature-settings: "palt";
  white-space: nowrap;
  font-size: 1.6rem;
  margin-bottom: 16px;
}
.narrow-only { display: none; }
@media (max-width: 719px) {
  .catch { font-size: 1.4rem; }
  .narrow-only { display: inline; }
}
.lead { font-size: 1.06rem; }
.nobr { display: inline-block; }  /* 見出しを言葉の途中で折り返さない */
.muted { color: var(--text-muted); font-size: 0.875rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 16px;
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}
.note > :last-child { margin-bottom: 0; }

.button {
  display: inline-block;
  background: var(--link);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 22px;
  margin: 4px 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button { color: #2b2622; }
}

/* アプリの紹介カード */
.app-card { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.app-icon { width: 64px; height: 64px; border-radius: 15px; flex-shrink: 0; background: #f0b7a4; overflow: hidden; }
.app-icon svg { display: block; width: 100%; height: 100%; }
.app-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.status { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 10px; margin-bottom: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.94rem; margin: 0; padding: 0; list-style: none; }

/* よくある質問 */
details { border-bottom: 1px solid var(--border); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 8px; }
details > :last-child { margin-bottom: 0; }

/* 規約のページ */
.dates { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 24px; }
.clause h2 { margin-top: 32px; }
table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { white-space: nowrap; color: var(--text-muted); font-size: 0.875rem; }

/* フッター */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: 0.875rem; color: var(--text-muted); }
.site-footer .links { margin-bottom: 10px; }
