/* 手引き・ロードマップのページ。ゲーム本体と同じ色とマス目を使い、読みやすい1列にする */
.doc { max-width: 720px; margin: 0 auto; padding: 16px 16px 72px; }
.doc .top { margin-bottom: 20px; }
.doc .logo a { color: inherit; text-decoration: none; }
.doc nav.docnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.doc nav.docnav a { font-size: 13px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; }
.doc nav.docnav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.doc h1 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.3; margin: 0 0 8px; }
.doc h2 { font-family: var(--f-display); font-weight: 400; font-size: 21px; margin: 0; }
.doc h3 { font-size: 16px; margin: 4px 0 0; }
.doc p, .doc li { max-width: 40em; }
.doc ul, .doc ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; }
.doc .panel { margin-bottom: 16px; }
.doc .lead { font-size: 16px; color: var(--muted); margin: 0 0 20px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-weight: 700; white-space: nowrap; }
.doc .tablewrap { overflow-x: auto; }
.doc .callout { background: var(--soft); border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 14px; }
.doc .steps { counter-reset: s; list-style: none; padding: 0; gap: 10px; }
.doc .steps li { counter-increment: s; position: relative; padding-left: 36px; }
.doc .steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; font-family: var(--f-display); background: var(--accent); color: var(--accent-ink); border-radius: 6px; width: 24px; height: 24px; display: grid; place-items: center; font-size: 14px; }
.doc .play { display: inline-block; text-decoration: none; }
.doc footer { color: var(--muted); font-size: 13px; text-align: center; margin-top: 24px; }

/* ロードマップ：曲がりくねった道と、道ぞいの地点 */
.road { list-style: none; margin: 8px 0 16px; padding: 0; }
.road .stop { position: relative; min-height: 170px; display: flex; align-items: center; }
.road .roadsvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.road .road-edge { fill: none; stroke: var(--ink); stroke-width: 26; stroke-linecap: round; opacity: .18; }
.road .road-body { fill: none; stroke: var(--card); stroke-width: 20; stroke-linecap: round; }
.road .road-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 8; opacity: .7; }
.road .pin { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent); z-index: 1; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.road .stop.done .pin { background: var(--accent); }
.road .stop.done .pin::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-ink); font-weight: 700; font-size: 15px; }
.road .stop.now .pin { background: var(--seal); border-color: var(--seal); animation: pulse 1.8s ease-in-out infinite; }
.road .stop.goal .pin { border-style: dashed; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(200,64,47,.45); } 50% { box-shadow: 0 0 0 10px rgba(200,64,47,0); } }
.road .card { position: relative; z-index: 2; width: 58%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.road .stop.L .card { margin-left: auto; }
.road .stop.R .card { margin-right: auto; }
.road .card h2 { font-size: 18px; line-height: 1.3; }
.road .card p { margin: 0; font-size: 14px; color: var(--muted); }
.road .badge { align-self: flex-start; margin-left: 0; }
.road .stop.done .badge { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.road .stop.now .badge { background: var(--seal); color: #fff; border-color: var(--seal); }
.road .stop.now .card { border-color: var(--seal); box-shadow: 0 0 0 1px var(--seal) inset; }
.road .stop.goal .card { background: transparent; border-style: dashed; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); margin-left: 6px; vertical-align: middle; font-family: var(--f-body); }

/* 言語の切り替え：表示中の言語のかたまりだけを見せる */
html[lang="en"] [data-l="ja"], html[lang="ja"] [data-l="en"] { display: none !important; }

/* 属性の相性図：赤は有利（1.2倍）、青い点線は不利（0.83倍） */
.rps { margin: 4px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rps svg { width: 100%; max-width: 320px; height: auto; }
.rps .node { fill: var(--card); stroke: var(--ink); stroke-width: 2.5; }
.rps .emoji { font-size: 28px; }
.rps .nodelbl { font-family: var(--f-display); font-size: 17px; fill: var(--ink); }
.rps .fw { stroke: var(--seal); stroke-width: 3; }
.rps .rv { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 4; }
.rps .head-fw { fill: var(--seal); }
.rps .head-rv { fill: var(--accent); }
.rps .lbl-fw { font-size: 13px; font-weight: 700; fill: var(--seal); }
.rps .lbl-rv { font-size: 12px; font-weight: 700; fill: var(--accent); }
.rps figcaption { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; }
.rps figcaption .item { white-space: nowrap; }
.rps .key { display: inline-block; width: 22px; height: 0; vertical-align: middle; margin-right: 4px; }
.rps .key.fw { border-top: 3px solid var(--seal); }
.rps .key.rv { border-top: 2px dashed var(--accent); }

/* 遊び方：キャッチフレーズ・目次・画面の画像・AIとのやりとりの例・よくある質問 */
.doc .tagline { font-family: var(--f-display); color: var(--seal); font-size: 15px; margin: 0 0 4px; letter-spacing: .04em; }
.doc .toc { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 16px; }
.doc .toc a { color: var(--accent); text-decoration: none; padding: 4px 0; font-weight: 700; }
.doc section[id] { scroll-margin-top: 12px; }
.doc .steps li { display: flex; flex-direction: column; gap: 8px; }
.doc .shot { display: block; width: 100%; max-width: 320px; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.doc .chat { display: flex; flex-direction: column; gap: 6px; max-width: 320px; background: var(--soft); border-radius: 12px; padding: 10px; }
.doc .bubble { margin: 0; padding: 8px 10px; border-radius: 12px; font-size: 13px; line-height: 1.5; max-width: 90%; word-break: break-all; }
.doc .bubble.you { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.doc .bubble.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--line); font-family: ui-monospace, Menlo, monospace; border-bottom-left-radius: 4px; }
.doc .callout.warn { background: transparent; border: 2px solid var(--seal); }
.doc .faq details { border-top: 1px solid var(--line); padding: 8px 0; }
.doc .faq details:last-of-type { border-bottom: 1px solid var(--line); }
.doc .faq summary { cursor: pointer; font-weight: 700; }
.doc .faq details p { margin: 6px 0 0; color: var(--muted); }
.doc td .who { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.doc th { white-space: normal; min-width: 6em; }
