/* ばば日和 — 中のページ（利用規約・プライバシー・使い方・特商法・アカウントの削除・404）。
   2026-10-22 に、トップ（lp.css）と同じ見た目へ。色・書体・ヘッダー・フッターはトップと同じ。
   読むページなので、絵は使い方の小さなばあばと、404 のポチだけ。 */

:root {
  --paper: #faf6ef;
  --paper-2: #f3ece1;
  --plum: #76506f;
  --ink: #55324f;
  --text: #4a3e46;
  --muted: #76696f;
  --lav: #f2e8f1;
  --lav-2: #e7daea;
  --line: #e6dbe1;
  --f: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--f);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.95;
  line-break: strict;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
[id] { scroll-margin-top: 24px; }
a:focus-visible, summary:focus-visible, .table-wrap:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.page { width: min(720px, 100% - 48px); margin-inline: auto; }
@media (max-width: 719px) {
  body { font-size: 16px; }
  .wrap, .page { width: calc(100% - 40px); }
}

/* ---------- ヘッダー（トップと同じロゴと、言語の丸いボタン） ---------- */
header.site { background: var(--paper); border-bottom: 1px solid var(--line); }
header.site .bar { display: flex; align-items: center; gap: 8px 16px; min-height: 80px; }
header.site .brand { display: block; flex: none; line-height: 0; margin-right: auto; }
header.site .brand img { display: block; width: 120px; height: auto; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px; }
header.site nav a {
  padding: 10px 12px; border-radius: 999px;
  color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none;
}
header.site nav a:hover { background: var(--lav); }
header.site .lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px var(--line);
  color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.5; text-decoration: none;
}
header.site .lang:hover { background: #fff; }
@media (max-width: 719px) {
  header.site .bar { flex-wrap: wrap; min-height: 68px; padding-bottom: 12px; }
  header.site .brand { padding-top: 12px; }
  header.site .brand img { width: 108px; }
  header.site .lang { order: 2; margin-top: 12px; }
  header.site nav { order: 3; width: 100%; gap: 4px 12px; margin-left: -12px; }
  header.site nav a { padding: 6px 12px; }
}

/* ---------- ページの見出し ---------- */
.page-head { padding: 48px 0 32px; }
.page-head h1 { margin: 0; color: var(--ink); font-size: 36px; font-weight: 800; line-height: 1.4; letter-spacing: 0.01em; }
.page-head .lead { margin: 14px 0 0; font-size: 17px; line-height: 1.9; color: var(--text); }
.page-head .updated { margin: 16px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.page-head--secondary { padding-top: 0; }
.has-medal { display: flex; align-items: center; gap: 24px; }
.has-medal .head-text { flex: 1; min-width: 0; }
@media (max-width: 719px) {
  .page-head { padding: 32px 0 24px; }
  .page-head h1 { font-size: 28px; line-height: 1.45; }
  .page-head .lead { font-size: 16px; }
  .has-medal { flex-direction: column-reverse; align-items: flex-start; gap: 16px; }
}
html:lang(en) .page-head h1, section[lang="en"] .page-head h1 { letter-spacing: 0; }

/* ばあばの顔（トップの丸い窓と同じ。頭だけ上にはみ出す） */
.medal { --s: 88px; position: relative; width: var(--s); flex: none; }
.medal::before {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: calc(var(--s) * 0.98); aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff9f1, #e6d5e6 70%);
  box-shadow: inset 0 0 0 calc(var(--s) * 0.03) rgba(255, 252, 246, 0.95), 0 0 0 calc(var(--s) * 0.16) var(--lav);
}
.medal img {
  position: relative; display: block; width: 100%; height: auto;
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - var(--s) * 0.49) no-repeat,
    radial-gradient(circle calc(var(--s) * 0.49) at 50% calc(100% - var(--s) * 0.49), #000 99%, transparent 100%);
  mask: linear-gradient(#000, #000) top / 100% calc(100% - var(--s) * 0.49) no-repeat,
    radial-gradient(circle calc(var(--s) * 0.49) at 50% calc(100% - var(--s) * 0.49), #000 99%, transparent 100%);
}
@media (max-width: 719px) { .page-medal { --s: 64px; margin-left: 10px; } }

/* ---------- 本文 ---------- */
.reading { padding-bottom: 80px; }
.reading p { margin: 0 0 18px; }
.reading h2 {
  margin: 56px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
  color: var(--ink); font-size: 24px; font-weight: 800; line-height: 1.5; letter-spacing: 0.01em;
}
.reading h3 { margin: 28px 0 10px; color: var(--ink); font-size: 19px; font-weight: 700; line-height: 1.6; }
.reading > :first-child, .reading > section > :first-child { margin-top: 0; }
ul, ol { margin: 16px 0 24px; padding-left: 1.5em; }
li { margin-block: 8px; }
li > ul, li > ol { margin-block: 10px; }
strong { color: var(--ink); font-weight: 700; }
a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
html:lang(en) body, section[lang="en"] { line-height: 1.85; }
html:lang(en) .reading h2, html:lang(en) .reading h3, section[lang="en"] h2, section[lang="en"] h3 { letter-spacing: 0; }
@media (max-width: 719px) {
  .reading { padding-bottom: 56px; }
  .reading h2 { margin: 40px 0 16px; font-size: 21px; line-height: 1.55; }
  .reading h3 { font-size: 18px; }
}

/* ---------- カード・もくじ ---------- */
.card { margin-block: 24px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card--intro { background: var(--lav); border-color: var(--lav-2); }
.card--table { padding: 0; border: 0; background: none; }
.toc { border: 0; box-shadow: 0 6px 20px rgba(70, 40, 60, 0.06); }
.toc h3 { margin: 0 0 14px; font-size: 18px; }
.toc ol { columns: 2; column-gap: 32px; margin: 0; }
.toc li { break-inside: avoid; margin: 0; padding-block: 8px; font-size: 16px; line-height: 1.6; }
@media (max-width: 719px) {
  .card { padding: 20px; }
  .card--table { padding: 0; }
  .toc ol { columns: 1; }
}

/* 運営者の情報 */
dl.op { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 12px 24px; margin: 0; }
dl.op dt { color: var(--muted); font-size: 15px; font-weight: 700; }
dl.op dd { margin: 0; }
@media (max-width: 719px) {
  dl.op { grid-template-columns: 1fr; gap: 4px; }
  dl.op dt:not(:first-child) { margin-top: 18px; }
}

/* ---------- 表 ---------- */
.table-wrap { overflow-x: auto; margin-block: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.card .table-wrap { margin-block: 0; }
table { width: 100%; margin: 0; border-collapse: collapse; font-size: 16px; line-height: 1.8; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
th { background: var(--lav); color: var(--ink); font-weight: 700; }
.table--facts { table-layout: fixed; }
.table--facts th { width: 26%; }
.table--providers { min-width: 520px; }
.table--providers th:first-child, .table--providers td:first-child { width: 32%; }
@media (max-width: 719px) {
  table { line-height: 1.85; }
  th, td { padding: 12px; }
  .table--facts th { width: 32%; font-size: 14px; }
}

/* ---------- よくある質問（トップの開け閉めと同じ） ---------- */
.qa { display: grid; gap: 10px; margin-block: 24px; }
.qa details { border-radius: 18px; background: #fff; box-shadow: 0 6px 20px rgba(70, 40, 60, 0.06); }
.qa summary {
  position: relative; display: flex; align-items: center; min-height: 56px; list-style: none; cursor: pointer;
  padding: 18px 56px 18px 22px; color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.6;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--plum); border-bottom: 2.5px solid var(--plum); rotate: 45deg; transition: rotate 0.2s, margin 0.2s;
}
.qa details[open] summary::after { rotate: 225deg; margin-top: -2px; }
.qa .a { padding: 0 22px 20px; }
.qa .a > * { margin-block: 0; }
.qa .a > * + * { margin-top: 12px; }

/* ---------- アカウントの削除：英語の区切り ---------- */
.language-divider { margin: 72px 0 32px; border: 0; border-top: 1px solid var(--lav-2); }
@media (max-width: 719px) { .language-divider { margin: 48px 0 24px; } }

/* ---------- 404 ---------- */
.error-page { width: min(560px, 100% - 40px); padding-block: 64px; text-align: center; }
.error-pochi { display: block; width: 160px; margin: 0 auto 24px; }
.error-page h1 { margin: 0; color: var(--ink); font-size: 30px; font-weight: 800; line-height: 1.5; }
.error-page .lead { margin: 12px 0 0; }
.error-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0 0; }
.error-links a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 10px 20px; border-radius: 999px;
  border: 2px solid rgba(118, 80, 111, 0.35); background: #fff; color: var(--ink); font-weight: 700; text-decoration: none;
}
.error-links a:hover { border-color: var(--plum); }
@media (max-width: 719px) {
  .error-page { padding-block: 40px; }
  .error-pochi { width: 128px; }
  .error-page h1 { font-size: 24px; line-height: 1.55; }
}

/* ---------- フッター（トップと同じ） ---------- */
footer.site { padding: 48px 0 40px; background: var(--paper-2); font-size: 14px; }
footer.site .wrap { display: grid; gap: 20px; justify-items: start; }
footer.site .foot-logo { width: 120px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer.site nav a { color: var(--ink); text-decoration: none; }
footer.site nav a:hover { text-decoration: underline; }
footer.site small { color: var(--muted); font-size: 13px; }
