:root {
  --bg: #f6f3ec;
  --panel: #ffffff;
  --ink: #1d2a24;
  --muted: #5b6962;
  --line: #d9d3c6;
  --brand: #23a06d;           /* テーマ色（緑。その一言ゲームの青と色違い）。面・図形に使う */
  --accent: #1a6b4a;          /* 文字・ボタン用の濃い同系色（白文字とのコントラストを確保） */
  --accent-ink: #ffffff;
  --select: #e1f2e9;
  --warn-bg: #fdecea;
  --warn: #9b2c1f;
  --ok-bg: #e6f2e2;
  --ok: #2d6a1e;
  --bar: #5bb58c;
  --quote: #efe9dc;
  --focus: #d9611f;
  --bar-h: 76px;
  /* 円グラフの系列色（dataviz 参照パレットの先頭5色、固定順。1色目をテーマの緑にするため青と緑を入れ替え） */
  --s1: #1baf7a; --s2: #eb6834; --s3: #1d94b9; --s4: #eda100; --s5: #7b57cf;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a16; --panel: #19241f; --ink: #e8efeb; --muted: #a5b3ab; --line: #2f3f37;
    --brand: #3fbf88; --accent: #8ad7b2; --accent-ink: #0d1a14; --select: #143627; --warn-bg: #3a1f1b; --warn: #f2a497;
    --ok-bg: #1d3320; --ok: #9fd68a; --bar: #4db381; --quote: #213029; --focus: #f0935a;
    --s1: #199e70; --s2: #d95926; --s3: #2fa3c6; --s4: #c98500; --s5: #8a6ee0;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.75 "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  overflow-wrap: anywhere;
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.app {
  max-width: 560px; margin: 0 auto;
  padding: 16px 16px calc(var(--bar-h) + 32px + env(safe-area-inset-bottom));
}
body.bar-static .app { padding-bottom: 24px; }
h1 { font-size: 1.5rem; line-height: 1.45; margin: 12px 0 8px; }
h2 { font-size: 1.25rem; line-height: 1.5; margin: 8px 0 12px; }
h3 { font-size: 1.0625rem; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }
.loading { color: var(--muted); }

.progress { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 4px; }
.progress .count { font-weight: 700; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 0.875rem; color: var(--muted); }
.steps li { border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; }
.steps li[aria-current="step"] { border-color: var(--accent); color: var(--ink); font-weight: 700; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.scene { margin-bottom: 8px; }
.line { background: var(--quote); border-radius: 10px; padding: 12px 14px; font-size: 1.125rem; font-weight: 700; margin: 8px 0 12px; }
.imagine { font-size: 1.0625rem; }

.options { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; padding: 0; border: 0; }
.options legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.opt { position: relative; display: flex; gap: 12px; align-items: flex-start; min-height: 56px;
  background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .mark { flex: 0 0 26px; height: 26px; border: 2px solid var(--muted); border-radius: 50%; margin-top: 2px;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; color: transparent; }
.opt .text { flex: 1; }
.opt .state { display: none; font-size: 0.8125rem; font-weight: 700; color: var(--accent); }
.opt:has(input:checked), .opt.checked { border-color: var(--accent); background: var(--select); }
.opt.checked .mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt.checked .state { display: block; }
.opt:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.fiction { font-size: 0.875rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; margin: 12px 0; }
details.optional { margin: 12px 0; }
details.optional summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; color: var(--accent); font-weight: 700; }
textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--panel); resize: vertical; }
.counter { font-size: 0.8125rem; color: var(--muted); text-align: right; }

.error { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 14px; margin: 12px 0; font-weight: 700; }
.ok { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.notice { background: var(--warn-bg); color: var(--warn); padding: 10px 16px; font-size: 0.9375rem; }
.notice p { max-width: 560px; margin: 0 auto 4px; }

.check { display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 10px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; margin-top: 3px; flex: 0 0 24px; accent-color: var(--accent); }

ul.plain { padding-left: 1.2em; margin: 0 0 12px; }
.review-item { border-top: 1px solid var(--line); padding: 12px 0; }
.review-item:first-child { border-top: 0; padding-top: 0; }
.review-item .picked { font-weight: 700; }

.section-label { font-size: 0.8125rem; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 4px; font-weight: 700; }
.check-example { background: var(--quote); border-radius: 10px; padding: 10px 14px; }

.token { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 1.0625rem; letter-spacing: 0.05em;
  background: var(--quote); border-radius: 8px; padding: 8px 12px; display: inline-block; user-select: all; }
.share-preview { border: 2px dashed var(--line); border-radius: 14px; padding: 16px; background: var(--panel); }
.share-preview .title { font-weight: 700; font-size: 1.125rem; }

.btn { min-height: 52px; min-width: 48px; border-radius: 12px; border: 2px solid var(--accent); background: var(--panel);
  color: var(--accent); font-weight: 700; padding: 10px 16px; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); flex: 1; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.link { border: 0; background: transparent; padding: 10px 4px; text-decoration: underline; }
.stack { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.stack .btn { width: 100%; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--bg); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.bar:empty { display: none; }
.bar .inner { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; }
body.bar-static .bar { position: static; border-top: 0; padding-bottom: 32px; }

.result-q { margin-bottom: 28px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; }
.select { min-height: 52px; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--panel); color: var(--ink); font-size: 1rem; }
.donut { display: block; width: min(220px, 70vw); height: auto; margin: 8px auto 12px; }
.donut .seg { stroke: var(--s1); }
.donut .seg.s2 { stroke: var(--s2); } .donut .seg.s3 { stroke: var(--s3); }
.donut .seg.s4 { stroke: var(--s4); } .donut .seg.s5 { stroke: var(--s5); }
.donut-n { font-size: 28px; font-weight: 700; fill: var(--ink); }
.donut-sub { font-size: 14px; fill: var(--muted); }
.legend { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.legend li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.legend li:not(:has(.swatch)) { grid-template-columns: 1fr auto; }
.legend .swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--s1); }
.legend .swatch.s2 { background: var(--s2); } .legend .swatch.s3 { background: var(--s3); }
.legend .swatch.s4 { background: var(--s4); } .legend .swatch.s5 { background: var(--s5); }
.legend .name { font-size: 0.9375rem; }
.legend .num { font-variant-numeric: tabular-nums; font-size: 0.9375rem; font-weight: 700; white-space: nowrap; }
a.btn { display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
.exits h2 { margin-top: 0; }

/* SNSシェアのボタン（Issue #23 の続き）。文字色・地色はブランド色に寄せつつ、押せる大きさを確保する */
.sns-row { gap: 8px; }
a.btn.sns { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sns-mark { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; font-weight: 700; font-size: 0.875rem; color: #ffffff; }
.sns.x .sns-mark { background: #000000; }
.sns.line .sns-mark { background: #06c755; }
.sns.fb .sns-mark { background: #1877f2; }


/* コーポレートロゴ（右上）。文字と重ならないよう本文の上に置く */
.brand { max-width: 560px; margin: 0 auto; padding: 10px 16px 0; display: flex; justify-content: flex-end; }
.brand img { width: 128px; height: auto; display: block; }
@media (max-width: 380px) { .brand img { width: 104px; } }

/* 出口の動画（PIVOT）。3つの導線の中でいちばん目に入る扱いにする */
a.video-cta {
  display: flex; align-items: center; gap: 14px; margin: 16px 0 10px; padding: 16px;
  border-radius: 16px; text-decoration: none; color: var(--accent-ink);
  background: var(--accent); border: 3px solid var(--brand);
}
.video-mark {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: var(--brand);
  color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: 1.375rem;
}
.video-text { display: flex; flex-direction: column; gap: 4px; }
.video-label {
  align-self: flex-start; background: var(--brand); color: #ffffff; border-radius: 999px;
  padding: 1px 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em;
}
.video-title { font-weight: 700; font-size: 1.25rem; line-height: 1.35; }
.video-sub { font-size: 0.8125rem; opacity: 0.92; }
