/* flicli の文書のページ（操作ガイド）の共通の見た目。
   サポート・プライバシーポリシーと同じ配色（白地、ダークでは暗いスレート。アクセントはアイコンの琥珀色）。 */
:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6a6a6a;
  --faint: #8a8a8a;
  --border: #e3e3e6;
  --accent: #9a6412;
  --card: #f7f7f9;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a22;
    --fg: #eef1f6;
    --muted: #9aa4b8;
    --faint: #7a8498;
    --border: #2a3240;
    --accent: #f2b24c;
    --card: #1c2430;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", Roboto, sans-serif;
  line-height: 1.8; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; font-size: 0.9rem; }
.topbar .lang a { margin-left: 14px; }
header.page { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
header.page h1 { font-size: 2rem; margin: 0 0 8px; letter-spacing: -0.01em; line-height: 1.3; }
.updated, .sub { color: var(--muted); font-size: 0.9rem; margin: 0; }
h2 { font-size: 1.45rem; margin: 56px 0 14px; letter-spacing: -0.01em; line-height: 1.35; scroll-margin-top: 16px; }
h2 .num { font-family: var(--mono); color: var(--accent); margin-right: 10px; font-size: 1.1rem; }
h3 { font-size: 1.1rem; margin: 30px 0 8px; line-height: 1.4; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 1.4em; margin: 0 0 14px; }
li { margin: 6px 0; }
code, .ui, kbd {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px;
  white-space: nowrap;
}
.ui { color: var(--fg); }
.muted { color: var(--muted); }
.note {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 12px 16px; margin: 16px 0; color: var(--muted); font-size: 0.94rem;
}
.note strong { color: var(--fg); }
.warn { border-left-color: #d9534f; }
/* 版の印（その版からの変更） */
.ver {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; line-height: 1.6;
  color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 0 8px; margin: 0 4px 0 0; vertical-align: 0.12em; white-space: nowrap; letter-spacing: 0;
}
h2 .ver, h3 .ver { margin-left: 8px; }
pre {
  font-family: var(--mono); font-size: 0.86rem; line-height: 1.6;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; margin: 0 0 16px; white-space: pre-wrap; overflow-wrap: anywhere;
}
table.msgs code { white-space: normal; overflow-wrap: anywhere; }

/* 目次 */
.toc { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; margin: 0 0 24px; }
.toc p { margin: 0 0 8px; font-weight: 600; }
.toc ol { margin: 0; columns: 2; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* 画面と説明を並べる（iPhone の縦長） */
.screen { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; margin: 18px 0 30px; }
.screen figure { margin: 0; text-align: center; }
.screen img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); background: var(--card); display: block; }
.screen figcaption { color: var(--faint); font-size: 0.8rem; margin-top: 8px; }
.screen .desc > *:first-child { margin-top: 0; }
/* Mac のパネル（横長）は上に大きく */
.shot { margin: 18px 0 24px; text-align: center; }
.shot img { width: 100%; max-width: 760px; height: auto; border-radius: 12px; border: 1px solid var(--border); display: block; margin: 0 auto; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.shot figcaption { color: var(--faint); font-size: 0.8rem; margin-top: 8px; }
.screens2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 18px 0 30px; }
.screens2 figure { margin: 0; text-align: center; }
.screens2 img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); background: var(--card); display: block; }
.screens2 figcaption { color: var(--faint); font-size: 0.8rem; margin-top: 8px; }
@media (max-width: 720px) {
  .screen { grid-template-columns: 1fr; }
  .screen figure { max-width: 280px; margin: 0 auto; }
}

/* 項目の一覧 */
dl.items { margin: 0 0 16px; }
dl.items dt { font-family: var(--mono); color: var(--accent); font-size: 0.92rem; margin-top: 14px; }
dl.items dd { margin: 4px 0 0 0; color: var(--fg); }
table.msgs { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 0.92rem; }
table.msgs th, table.msgs td { text-align: left; vertical-align: top; padding: 9px 10px; border-top: 1px solid var(--border); }
table.msgs th { font-weight: 600; color: var(--fg); width: 40%; }
table.msgs td { color: var(--muted); }
table.msgs.keys th { font-family: var(--mono); font-weight: 500; width: 30%; }
@media (max-width: 640px) {
  table.msgs th, table.msgs td { display: block; width: auto; border-top: none; padding: 2px 0; }
  table.msgs tr { display: block; border-top: 1px solid var(--border); padding: 8px 0; }
}
footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.85rem; text-align: center; }
footer a { color: var(--muted); }

/* 秘匿性: キーと暗号文の通り道（9 章の図） */
.flow { margin: 18px 0 20px; }
.flow-grid { display: grid; grid-template-columns: 1fr 88px 1fr 88px 1fr; align-items: stretch; }
.flow .node { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 14px; font-size: 0.86rem; line-height: 1.6; }
.flow .node.cloud { border-style: dashed; }
.flow .node .label { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent); }
.flow .node strong.title { display: block; font-size: 1rem; margin: 2px 0 8px; }
.flow .node ul { list-style: none; padding: 0; margin: 0; }
.flow .node li { margin: 0; padding: 6px 0; border-top: 1px solid var(--border); color: var(--muted); }
.flow .node li b { color: var(--fg); }
.flow .link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 0 4px; }
.flow .link .what { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); }
.flow .link small { color: var(--faint); font-size: 0.7rem; line-height: 1.4; }
.flow .arrow { position: relative; width: 60px; height: 2px; background: var(--accent); }
.flow .arrow::before, .flow .arrow::after { content: ""; position: absolute; top: -5px; border: 6px solid transparent; }
.flow .arrow::before { left: -6px; border-right-color: var(--accent); border-left-width: 0; }
.flow .arrow::after { right: -6px; border-left-color: var(--accent); border-right-width: 0; }
.flow .keypath { grid-column: 1 / -1; margin-top: 14px; border: 1px dashed var(--accent); border-radius: 12px; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; text-align: center; font-size: 0.88rem; line-height: 1.5; }
.flow .keypath .label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent); }
.flow .keypath .to { font-family: var(--mono); color: var(--accent); }
.flow .keypath .file { font-family: var(--mono); color: var(--accent); border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 4px 10px; }
.flow .keypath .file small { display: block; color: var(--faint); font-size: 0.7rem; }
.flow .keypath .kp-note { flex-basis: 100%; color: var(--faint); font-size: 0.8rem; }
.flow figcaption { color: var(--faint); font-size: 0.8rem; margin-top: 8px; text-align: center; }
@media (max-width: 720px) {
  .flow-grid { grid-template-columns: 1fr; }
  .flow .link { padding: 14px 0; }
  .flow .arrow { width: 2px; height: 36px; }
  .flow .arrow::before { left: -5px; top: -6px; border: 6px solid transparent; border-bottom-color: var(--accent); border-top-width: 0; }
  .flow .arrow::after { left: -5px; right: auto; top: auto; bottom: -6px; border: 6px solid transparent; border-top-color: var(--accent); border-bottom-width: 0; }
  .flow .keypath { flex-direction: column; flex-wrap: nowrap; }
  .flow .keypath .to { transform: rotate(90deg); }
  .flow .keypath .kp-note { flex-basis: auto; }
}
