/* Paper & Ink（アプリと同じ色）。原本は非公開リポジトリにある。ここは直接編集しない */
:root {
  --paper: #F4F1EA;
  --surface: #FFFFFF;
  --ink: #2F4FA8;
  --text: #1F2328;
  --muted: #5B6068;
  --line: #DDD6C8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1E1F22;
    --surface: #2A2B2F;
    --ink: #8FA8F0;
    --text: #E8E6E1;
    --muted: #A8A6A0;
    --line: #3A3B40;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Noto Sans JP", "Yu Gothic UI", "Segoe UI", system-ui, sans-serif;
  line-height: 1.8;
}
main { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }
/* 上の帯: ロゴ・ページの切り替え・言語の切り替え */
.site { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.3rem; font-weight: 700; }
.brand img { width: 36px; height: 36px; }
.pages { display: flex; flex-wrap: wrap; gap: 4px; }
.pages a { padding: 4px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.pages a:hover { color: var(--ink); background: var(--surface); }
.pages a[aria-current="page"] { color: var(--ink); background: var(--surface); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ink); }
/* 言語のメニュー（日本語 / English / 한국어 / 繁體中文。D-213・Q-473）。地球のアイコンのボタンを押すと下に開く */
.lang { margin-left: auto; position: relative; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 0.9rem; cursor: pointer; list-style: none; white-space: nowrap; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--ink); color: var(--ink); }
.lang summary::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.lang svg { width: 16px; height: 16px; flex: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; margin: 0; padding: 6px; list-style: none; min-width: 10em; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(31, 35, 40, 0.14); }
.lang li a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.95rem; white-space: nowrap; }
.lang li a:hover, .lang li a:focus-visible { background: var(--paper); color: var(--ink); }
.lang li a[aria-current] { color: var(--ink); font-weight: 700; }
/* 言語を 1 ページに持つページ: 選んだ言語の分だけ出す（スクリプトが動かないときは全部を出す） */
html[data-lang="ja"] [data-l]:not([data-l="ja"]),
html[data-lang="en"] [data-l]:not([data-l="en"]),
html[data-lang="ko"] [data-l]:not([data-l="ko"]),
html[data-lang="zh-Hant"] [data-l]:not([data-l="zh-Hant"]) { display: none !important; }
/* 韓国語・繁體中文の字（サイトには同梱しない。Noto Sans KR・TC が入っていればそれ、なければ OS の字〔Mac・Windows〕）。
   :where で強さを 0 にし、kbd など自分の字を持つ要素の指定を上書きしない */
:where(:lang(ko)) { font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", system-ui, sans-serif; word-break: keep-all; }
:where(:lang(zh-Hant)) { font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif; }
a { color: var(--ink); }
h1 { font-size: 1.6rem; line-height: 1.4; }
h2 { font-size: 1.15rem; margin-top: 2em; }
section { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 24px 16px; margin-bottom: 32px; }
.muted { color: var(--muted); font-size: 0.9rem; }
/* ヘルプ（help.html・help-en.html・help-ko.html・help-zh-hant.html） */
section > h2:first-child { margin-top: 1em; }
h3 { font-size: 1rem; margin: 1.6em 0 0.4em; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 24px; margin-bottom: 32px; font-size: 0.95rem; }
.toc ol { margin: 0; padding-left: 1.4em; }
figure { margin: 16px 0; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
table.keys td:last-child { white-space: nowrap; }
kbd { font-family: ui-monospace, Consolas, monospace; font-size: 0.85em; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
/* 製品のページ（index.html） */
main.wide { max-width: 960px; }
.hero { margin-bottom: 40px; }
.eyebrow { margin: 0; color: var(--ink); font-weight: 700; font-size: 0.95rem; }
.hero h1 { font-size: 2.1rem; line-height: 1.35; margin: 8px 0 12px; }
.lead { font-size: 1.1rem; max-width: 40em; }
.maker { color: var(--muted); max-width: 40em; margin-top: -4px; }
.store { margin: 20px 0 28px; }
.store a { display: inline-block; border-radius: 6px; }
.store img { display: block; width: 176px; height: 48px; }
.store img.appstore { width: auto; }
.store a + a { margin-left: 12px; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(31, 35, 40, 0.12); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.card h3 { margin: 0 0 6px; color: var(--ink); }
.card p { margin: 0; font-size: 0.95rem; }
.cases { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cases a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; color: var(--text); text-decoration: none; }
.cases a:hover { border-color: var(--ink); }
.cases strong { display: block; color: var(--ink); }
.cases span { display: block; color: var(--muted); font-size: 0.9rem; }
.support { margin-top: 48px; }
/* 使い方の事例（use-cases.html） */
main.use-cases section > ol li { margin-bottom: 4px; }
.more { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 600px) {
  .pages { order: 3; width: 100%; }
  .hero h1 { font-size: 1.7rem; }
}
@media (max-width: 480px) {
  section, .toc { padding-left: 16px; padding-right: 16px; }
  table.keys td:last-child { white-space: normal; }
}
