/*
 * ROOOOM の説明・ヘルプのページ(docs/BETA_SITE_AND_ONBOARDING_BLUEPRINT.md 8.1)。
 * 見た目は、アプリの「始め方の案内」(2026-09-29 に決めた試作 docs/prototype/onboarding.html、web/css/entry.css)とそろえる:
 * 背景 #f0f2f5・白いカード(角 20px)・ロゴの絵・丸い手順の番号・オレンジの注意書き・行の形のリンク。
 * 見出し(h2)ごとの区切りは、組み立て(build.py wrap_sections)がカードにする。
 */
:root {
    --color-main: #329e91;
    --color-main-dark: #2a7f75;
    --text: #2c3e50;
    --text-sub: #5d6d7e;
    --text-muted: #7f8c8d;
    --line: #e3e7eb;
    --warn-bg: #fff4e5;
    --warn-text: #8a4b00;
    --soft: #eef5f4;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: #f0f2f5;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--color-main-dark); text-underline-offset: 2px; }

/* アプリの中で開いたとき(ホーム画面のアプリ)だけ出す「アプリに戻る」。site.js が hidden を外す */
.back-to-app {
    position: sticky; top: 0; z-index: 10;
    padding: calc(0.5rem + var(--safe-top)) 16px 0.5rem;
    background: var(--color-main); color: #fff;
}
.back-to-app[hidden] { display: none; }
.back-to-app a { color: #fff; font-weight: 600; text-decoration: none; display: inline-block; padding: 0.25rem 0; }

/* 上の帯: ロゴ(絵)と、ページの切り替え */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header-inner { max-width: 44rem; margin: 0 auto; padding: 12px 12px 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; }
.logo { display: block; height: 1.4rem; width: auto; aspect-ratio: 993.13 / 218.13; color: var(--color-main); }
.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
    text-decoration: none; color: var(--text-sub); font-size: 0.85rem; font-weight: 600;
    padding: 4px 10px; border-radius: 16px; border: 1px solid transparent; white-space: nowrap;
}
.site-nav a[aria-current="page"] { color: var(--color-main-dark); background: var(--soft); border-color: rgba(50, 158, 145, 0.25); }

/* 本文 */
main { max-width: 44rem; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 14px; }
main > * { margin: 0; }
/* 見出しは、文の区切り(<wbr>・空白)だけで折り返す(「消／す」のように語の途中で切らない)。入りきらないときだけ、どこでも折り返す(アプリの entry.css と同じ) */
h1 { font-size: 1.35rem; line-height: 1.45; margin: 8px 0 0; text-align: center; font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
/* 文は左揃え(中央揃えは、行の始まりがそろわず読みにくい。アプリの G29 と同じ。2026-10-06 ユーザー) */
.lead { font-size: 0.95rem; line-height: 1.7; color: var(--text-sub); text-align: left; }
main > p { font-size: 0.92rem; line-height: 1.75; color: var(--text-sub); }
main > p.lead { color: var(--text-sub); }
main > ul { font-size: 0.92rem; color: var(--text-sub); padding-left: 1.3em; }

.card {
    background: #fff; padding: 18px; border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); border: 1px solid #f0f0f0;
    display: flex; flex-direction: column; gap: 10px;
}
.card > * { margin: 0; }
.card h2 { font-size: 1.05rem; line-height: 1.5; margin: 0 0 2px; font-weight: 700; color: var(--text); }
.card h3 { font-size: 0.92rem; margin: 8px 0 0; color: var(--color-main-dark); }
.card p, .card li { font-size: 0.92rem; line-height: 1.75; }
.card ul, .card ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.card li { margin: 0; }

.muted { color: var(--text-muted); font-size: 0.82rem; }
.note { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 0.88rem; line-height: 1.65; }
.note p { margin: 0; }
.warn { background: var(--warn-bg); color: var(--warn-text); border-radius: 12px; padding: 10px 12px; font-size: 0.88rem; line-height: 1.65; }
.warn p { margin: 0; }
.draft-banner { background: #fdecea; border: 1px solid #e8a6a0; color: #8a1c1c; border-radius: 12px; padding: 10px 12px; font-size: 0.85rem; }

/* ページの中の飛び先(試作の、端末を切り替えるボタンと同じ形) */
main > ul.jump { list-style: none; padding: 0; display: flex; gap: 6px; }
.jump li { flex: 1; }
.jump a { display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 17px; border: 1px solid #d1d8e0; background: #fff; color: var(--text-sub); font-size: 0.85rem; text-decoration: none; }
.card h2[id] { scroll-margin-top: 12px; }

/* 手順(案内の画面と同じ丸い番号) */
.steps { list-style: none; padding: 0 !important; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
/* 番号は左に重ねて置く(手順の中に太字などが混ざっても、文が1つの流れのまま折り返すように) */
.steps > li { counter-increment: step; position: relative; padding-left: 36px; }
.steps > li::before {
    content: counter(step); position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--soft); color: var(--color-main-dark); font-size: 0.78rem; font-weight: 700; display: grid; place-items: center;
}

/* ヘルプの目次(アプリの「はじめかた」の②③と同じ、行の形のリンク) */
.toc { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.toc li { margin: 0; }
.toc a {
    display: flex; align-items: center; gap: 12px; background: #fff; padding: 14px 16px; border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02); text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.95rem;
}
.toc a::after { content: "›"; margin-left: auto; color: #bbb; font-size: 1.2rem; font-weight: 400; }
.toc small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

table { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
th, td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; line-height: 1.6; }
th { background: var(--soft); color: var(--color-main-dark); }
.table-scroll { overflow-x: auto; margin: 0 -4px; }

details { font-size: 0.9rem; }
summary { cursor: pointer; color: var(--text-sub); padding: 4px 2px; }

.button {
    display: flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px; border-radius: 23px;
    background: var(--color-main); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.95rem;
}

/* 下の帯 */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer-inner { max-width: 44rem; margin: 0 auto; padding: 16px 16px calc(20px + var(--safe-bottom)); font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.site-footer-inner nav { display: flex; gap: 4px 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 6px; }
.site-footer-inner a { color: var(--text-muted); }
.site-footer-inner p { margin: 0; }
