/* Cynthialy ブランド（ブランドキットガイド Ver.2.0）
   白・オフホワイト70% / 緑25% / 黄5%以下。黄は面だけに使い、文字色にしない。
   濃い緑と薄い緑を直接重ねない。Webフォントは読み込まない（システムフォント）。 */
:root {
  --green-900: #0D2623;  /* プライマリ */
  --green-700: #22635B;  /* セカンダリ */
  --green-500: #598A84;
  --green-300: #90B1AD;
  --green-100: #C8D8D6;
  --yellow: #E8DE9F;     /* 面のみ */
  --offwhite: #EDF2E7;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --muted: #595959;
  --line: #D9E2DC;
  --radius: 14px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--white);
  line-height: 1.75; font-size: 16px; min-height: 100vh; display: flex; flex-direction: column;
}
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 56px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--green-700); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.nb { display: inline-block; }

/* ヘッダー・フッター */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand img { display: block; height: 24px; width: auto; }
.demo-badge {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--green-900);
  border: 1.5px solid var(--green-900); border-radius: 999px; padding: 2px 10px; background: var(--white);
}
.site-footer { background: var(--green-900); color: #DCE6E2; font-size: 13px; padding: 22px 0; }
.site-footer p { margin: 0 0 4px; }
.site-footer .copy { color: var(--green-300); }

/* 進み具合 */
.progress { display: flex; gap: 6px; margin: 0 0 20px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--green-100); }
.progress span.on { background: var(--green-900); }
.step-label { font-size: 13px; font-weight: 700; color: var(--green-700); letter-spacing: .06em; margin: 0 0 6px; }

/* 見出し */
h1, h2, h3 { color: var(--green-900); line-height: 1.4; margin: 0; }
.hero { padding: 8px 0 22px; }
.hero h1 { font-size: clamp(24px, 5.4vw, 36px); font-weight: 800; letter-spacing: .01em; }
.hero h1 .mark { background: linear-gradient(transparent 62%, var(--yellow) 62%); padding: 0 2px; }
.hero p { color: var(--muted); margin: 10px 0 0; }
.q-title { font-size: clamp(21px, 4.6vw, 28px); font-weight: 800; margin: 0 0 18px; }

/* 選択ボタン */
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  min-height: 60px; padding: 14px 16px; border-radius: var(--radius); border: 1.5px solid var(--line);
  background: var(--white); color: var(--green-900); font-weight: 700; font-size: 16px;
  transition: border-color .15s, background .15s, transform .1s;
}
.choice:hover { border-color: var(--green-700); background: var(--offwhite); }
.choice:active { transform: scale(.98); }
.choice .count { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.choice .arrow { color: var(--green-700); font-size: 18px; }
.back {
  margin-top: 22px; background: none; border: none; color: var(--green-700); font-weight: 700; padding: 6px 0;
}
.back:hover { text-decoration: underline; }

/* 結果 */
.result-head { background: var(--offwhite); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.result-head .eyebrow { font-size: 13px; font-weight: 700; color: var(--green-700); margin: 0 0 4px; }
.result-head h1 { font-size: clamp(22px, 4.8vw, 30px); font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.chips li { background: var(--white); border: 1px solid var(--green-100); color: var(--green-900); font-size: 13px; border-radius: 999px; padding: 2px 12px; }

.cards { display: grid; gap: 16px; }
.card {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white);
  display: grid; gap: 12px;
}
.card .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rank {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-900); color: var(--white); font-weight: 800; font-size: 15px; flex: none;
}
.card.first .rank { background: var(--yellow); color: var(--green-900); }
.ease { font-size: 12px; font-weight: 700; color: var(--green-700); border: 1px solid var(--green-300); border-radius: 999px; padding: 1px 10px; }
.card h2 { font-size: clamp(19px, 4.2vw, 23px); font-weight: 800; }
.pair { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.pair > div { background: var(--offwhite); border-radius: 10px; padding: 12px 14px; }
.pair dt { font-size: 12px; font-weight: 700; color: var(--green-700); margin-bottom: 2px; }
.pair dd { margin: 0; font-size: 15px; }
.how { color: var(--muted); font-size: 14px; margin: 0; }
.reasons { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.reasons li { font-size: 14px; color: var(--green-900); padding-left: 22px; position: relative; }
.reasons li::before { content: "✓"; position: absolute; left: 2px; color: var(--green-700); font-weight: 800; }
.cta {
  justify-self: start; border: none; border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 15px;
  background: var(--green-900); color: var(--white); transition: background .15s;
}
.cta:hover { background: #163a35; }

/* 次の一歩（高度なエージェント）：濃い緑の面に白文字。薄い緑は重ねない */
.next-label { font-size: 14px; font-weight: 800; color: var(--green-700); margin: 30px 0 10px; letter-spacing: .04em; }
.card.advanced { background: var(--green-900); border-color: var(--green-900); color: var(--white); }
.card.advanced h2 { color: var(--white); }
.card.advanced .rank { background: var(--white); color: var(--green-900); }
.card.advanced .ease { color: var(--white); border-color: rgba(255,255,255,.55); }
.card.advanced .pair > div { background: rgba(255,255,255,.08); }
.card.advanced .pair dt { color: #CFE0DB; }
.card.advanced .how, .card.advanced .reasons li { color: #DCE6E2; }
.card.advanced .reasons li::before { color: var(--white); }
.card.advanced .cta { background: var(--white); color: var(--green-900); }
.card.advanced .cta:hover { background: var(--offwhite); }

.restart { margin-top: 26px; text-align: center; }
.restart button { background: none; border: 1.5px solid var(--green-900); color: var(--green-900); border-radius: 999px; padding: 10px 22px; font-weight: 700; }

/* 相談フォーム */
.dialog::backdrop { background: rgba(13, 38, 35, .55); }
.dialog {
  width: min(520px, calc(100vw - 32px)); border: none; border-radius: var(--radius); padding: 0;
  color: var(--text); max-height: calc(100vh - 32px);
}
.dialog form, .dialog .done { padding: 22px; display: grid; gap: 14px; }
.dialog h2 { font-size: 20px; font-weight: 800; }
.dialog .target { background: var(--offwhite); border-radius: 10px; padding: 10px 14px; font-weight: 700; color: var(--green-900); margin: 0; }
.field { display: grid; gap: 4px; }
.field label { font-size: 14px; font-weight: 700; color: var(--green-900); }
.field label small { font-weight: 600; color: var(--muted); margin-left: 6px; }
.field input {
  font: inherit; font-size: 16px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; width: 100%;
}
.field input:focus { border-color: var(--green-700); outline: none; }
.purpose { font-size: 13px; color: var(--muted); margin: 0; background: #F7F9F5; border-radius: 10px; padding: 10px 12px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green-900); flex: none; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.actions .cancel { background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 18px; font-weight: 700; color: var(--green-900); }
.actions .cta:disabled { background: var(--green-300); cursor: not-allowed; }
.error { color: #A12A2A; font-size: 14px; margin: 0; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

@media (max-width: 560px) {
  .pair { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .cta { justify-self: stretch; text-align: center; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .grid.depts { grid-template-columns: 1fr 1fr; }
  .grid.depts .choice { min-height: 56px; padding: 12px; font-size: 15px; }
  .grid.depts .arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
