/* KQ AU Host ユーザーマニュアル（ウェブサイト版）。JavaScript は使わない。 */
:root {
  --accent: rgb(46, 199, 179);       /* アプリのティール（Theme.accent 0.180, 0.780, 0.700） */
  --accent-dark: rgb(20, 128, 114);  /* 白地で読める濃さ */
  --accent-pale: rgb(226, 246, 243);
  --text: #1d1f21;
  --muted: #5f6368;
  --line: #dadce0;
  --note: #fff7e0;
  --note-line: #f0c36d;
  --marker: rgb(196, 78, 0);         /* 画像の番号（橙）。白い文字が読める濃さ */
}
* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: #fff; line-height: 1.75;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
a { color: var(--accent-dark); }

/* 並び: 広い画面は左に目次、狭い画面は上に目次 */
.layout { display: grid; grid-template-columns: 15rem minmax(0, 40rem); gap: 2.5rem; justify-content: center; padding: 2rem 1.5rem 4rem; }
@media (max-width: 52rem) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1rem 1rem 3rem; }
}

/* 目次 */
.toc { font-size: .9rem; line-height: 1.5; }
@media (min-width: 52.01rem) {
  /* 画面より長い目次は、目次の中だけでスクロールする */
  .toc { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); max-height: calc(100dvh - 3rem); overflow-y: auto; overscroll-behavior: contain; padding-right: .3rem; }
}
.toc .book { display: block; font-weight: 700; color: var(--text); text-decoration: none; margin-bottom: .2rem; }
.toc .book small { display: block; font-weight: 400; color: var(--muted); }
.toc ol { list-style: none; margin: .8rem 0 0; padding: 0; border-left: 3px solid var(--line); }
.toc li a { display: block; padding: .35rem .8rem; color: var(--muted); text-decoration: none; }
.toc li a:hover { color: var(--accent-dark); }
.toc li a[aria-current="page"] { color: var(--accent-dark); font-weight: 700; border-left: 3px solid var(--accent); margin-left: -3px; }
@media (max-width: 52rem) {
  .toc { border-bottom: 1px solid var(--line); padding-bottom: .8rem; }
  .toc ol { display: flex; flex-wrap: wrap; gap: .3rem; border-left: 0; }
  .toc li a { padding: .2rem .6rem; border: 1px solid var(--line); border-radius: 1rem; }
  .toc li a[aria-current="page"] { border: 1px solid var(--accent); margin-left: 0; background: var(--accent-pale); }
}

/* 本文 */
main h1 { font-size: 1.6rem; line-height: 1.35; margin: 0 0 .3rem; }
main .chapter-no { color: var(--accent-dark); font-weight: 700; font-size: .9rem; letter-spacing: .05em; }
main h2 { font-size: 1.2rem; margin: 2.4rem 0 .6rem; padding-bottom: .3rem; border-bottom: 2px solid var(--accent); }
main h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.lead { color: var(--muted); }
.edition { color: var(--muted); margin: 0 0 .8rem; }

/* この章でできること・用意するもの */
.summary { background: var(--accent-pale); border-radius: .6rem; padding: .9rem 1.2rem; margin: 1.2rem 0; }
.summary h2 { all: unset; display: block; font-weight: 700; margin-bottom: .2rem; }
.summary ul { margin: 0; padding-left: 1.2rem; }

/* 手順: 番号は濃いティールの角の丸い四角（画像の番号の橙の丸と、色と形の両方で見分ける） */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 2.4rem; margin: .9rem 0; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem;
  width: 1.7rem; height: 1.7rem; border-radius: .4rem; background: var(--accent-dark); color: #fff;
  font-weight: 700; font-size: .9rem; line-height: 1.7rem; text-align: center;
}
/* 画像の番号: 橙の塗りの丸（画像に重ねる印と同じ） */
.marker { display: inline-block; min-width: 1.4em; padding: 0 .25em; border-radius: 1em; background: var(--marker); color: #fff; font-size: .8em; font-weight: 700; text-align: center; line-height: 1.4em; }

/* iPhone・iPad と Mac の違い */
.platform { display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; margin: .5rem 0; font-size: .95rem; }
.platform dt { font-weight: 700; white-space: nowrap; }
.platform dd { margin: 0; }
.only { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: .3rem; padding: 0 .35rem; vertical-align: .1em; }

kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: .3rem; padding: 0 .35em; background: #fafafa; }
.ui { font-weight: 700; }  /* 画面に出る言葉 */

/* 画像（今は仮の枠） */
figure { margin: 1.2rem 0; }
figure img { display: block; max-width: 100%; height: auto; border-radius: .5rem; border: 1px solid var(--line); }
.placeholder { border: 2px dashed var(--line); border-radius: .5rem; background: #f6f7f8; padding: 1rem 1.2rem; color: var(--muted); font-size: .9rem; }
.placeholder strong { color: var(--text); }
.placeholder ol, ol.legend { list-style: none; counter-reset: mark; margin: .4rem 0 0; padding: 0; }
.placeholder ol > li, ol.legend > li { counter-increment: mark; position: relative; padding-left: 1.9rem; margin: .25rem 0; }
.placeholder ol > li::before, ol.legend > li::before { content: counter(mark); position: absolute; left: 0; top: .1rem; min-width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--marker); color: #fff; font-weight: 700; font-size: .75rem; line-height: 1.4rem; text-align: center; }
ol.legend { font-size: .9rem; margin-top: .6rem; }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .3rem; }

/* ひとこと・困ったとき */
.note, .trouble { border-left: 4px solid var(--note-line); background: var(--note); border-radius: .3rem; padding: .7rem 1rem; margin: 1.2rem 0; font-size: .95rem; }
.note strong:first-child, .trouble strong:first-child { display: block; }
.trouble { border-left-color: #e8710a; background: #fdeee0; }

/* 前へ・次へ */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .95rem; }
.pager a { text-decoration: none; }
.pager .next { margin-left: auto; text-align: right; }

/* 目次のページ */
.chapters { list-style: none; padding: 0; }
.chapters li { border: 1px solid var(--line); border-radius: .6rem; margin: .8rem 0; }
.chapters a { display: block; padding: .9rem 1.2rem; text-decoration: none; color: var(--text); }
.chapters a:hover { border-color: var(--accent); background: var(--accent-pale); }
.chapters .no { color: var(--accent-dark); font-weight: 700; font-size: .85rem; }
.chapters .title { display: block; font-weight: 700; font-size: 1.05rem; }
.chapters .desc { display: block; color: var(--muted); font-size: .9rem; }

/* 目次の部の見出し */
.toc .part { margin: 1.2rem 0 0; font-weight: 700; font-size: .8rem; color: var(--accent-dark); letter-spacing: .05em; }
.toc .part + ol { margin-top: .4rem; }
@media (max-width: 52rem) { .toc .part { margin-top: .6rem; } }

/* リファレンスの表 */
table.items { width: 100%; border-collapse: collapse; margin: .8rem 0 1.2rem; font-size: .95rem; }
table.items th, table.items td { border-bottom: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
table.items th { background: var(--accent-pale); font-weight: 700; white-space: nowrap; }
table.items td:first-child { width: 40%; font-weight: 700; }

/* ガイドから機能リファレンスへ */
.see-also { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .6rem 0; margin: 2rem 0 0; font-size: .95rem; }
.see-also strong { margin-right: .6rem; color: var(--accent-dark); }

/* site/index.html: the languages */
main.home { max-width: 40rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
ul.languages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .6rem; }
ul.languages a { display: block; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: .5rem; text-decoration: none; font-weight: 700; }
ul.languages a:hover { border-color: var(--accent); background: var(--accent-pale); }

/* Chinese and Korean in their own fonts (the Japanese ones would draw other glyph forms) */
html:lang(zh-Hans) body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif; }
html:lang(zh-Hant) body { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif; }
html:lang(ko) body { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
.toc .language { display: inline-block; font-size: .8rem; color: var(--muted); text-decoration: none; margin-bottom: .6rem; }
.toc .language:hover { color: var(--accent-dark); }
.toc .print-link { display: block; font-size: .8rem; color: var(--muted); text-decoration: none; margin-bottom: .6rem; }
.toc .print-link:hover { color: var(--accent-dark); }
.toc .language { margin-bottom: .2rem; }

/* 著作権表示 */
footer.copyright { text-align: center; font-size: .8rem; color: var(--muted); padding: 0 1rem 2rem; }
