:root {
  --paper: #e8ebea;      /* コンクリート色の紙 */
  --sheet: #f7f8f7;
  --ink: #1d3354;        /* 墨紺 */
  --ink-soft: #4a5b74;
  --line: #c3cac9;
  --safety: #f2b705;     /* 安全標識の黄 */
  --danger: #b3261e;
  --radius-s: 6px;
  --radius-l: 14px;
  --sans: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151b24; --sheet: #1d2532; --ink: #e6ebf2; --ink-soft: #a6b2c3; --line: #36414f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.75 var(--sans); letter-spacing: .02em;
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--safety); outline-offset: 2px; }

/* ヘッダーと進捗（安全テープ） */
.bar { position: sticky; top: 0; z-index: 5; background: var(--paper); }
.bar-inner { max-width: 600px; margin: 0 auto; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 700; font-size: 14px; }
.tape { height: 6px; background: var(--line); }
.tape span {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(-45deg, var(--safety) 0 10px, #1d2228 10px 20px);
  transition: width .4s ease;
}
.link { background: none; border: 0; padding: 6px 4px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font-size: 14px; }

.wrap { max-width: 600px; margin: 0 auto; padding: 24px 16px 48px; }

/* はじめに */
.hero { display: block; margin: 8px -8px 0; }
.hero img { display: block; width: 100%; height: auto; }
@media (min-width: 640px) { .hero { margin: 8px 0 0; } }
.intro h1 { font: 800 30px/1.4 var(--serif); margin: 16px 0 16px; letter-spacing: .04em; }
.intro p { margin: 0 0 12px; max-width: 34em; }
.intro .meta { color: var(--ink-soft); font-size: 15px; }
.facts-note { margin: 24px 0; padding: 14px 16px; border-left: 4px solid var(--safety); background: var(--sheet); font-size: 15px; }

/* 会話 */
.turn { margin: 0 0 20px; }
.ask { max-width: 92%; }
.ask .q { font-weight: 700; font-size: 18px; }
.ask .hint { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.reply { display: flex; justify-content: flex-end; margin-top: 10px; }
.reply button {
  background: var(--ink); color: var(--paper); border: 0; border-radius: var(--radius-l) var(--radius-l) 4px var(--radius-l);
  padding: 10px 14px; text-align: left; max-width: 85%; cursor: pointer; font-size: 15px; line-height: 1.6;
}
.reply button small { display: block; opacity: .7; font-size: 12px; margin-top: 2px; }
.reply .skipped { background: transparent; color: var(--ink-soft); border: 1px dashed var(--line); }
.thinking { color: var(--ink-soft); }

/* 回答パネル */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  background: var(--sheet); border-top: 1px solid var(--line);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  max-height: 62vh; overflow-y: auto;
  box-shadow: 0 -8px 24px rgba(20, 30, 45, .08);
}
.dock-inner { max-width: 600px; margin: 0 auto; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  border: 1.5px solid var(--ink); background: transparent; border-radius: 999px;
  padding: 8px 14px; min-height: 44px; cursor: pointer; font-size: 15px; line-height: 1.5; text-align: left;
}
.choice[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.other-input { width: 100%; margin-top: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--paper); }
.dock-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.primary {
  background: var(--safety); color: #1d2228; border: 0; border-radius: var(--radius-s);
  padding: 13px 22px; font-weight: 700; min-height: 48px; cursor: pointer;
}
.primary:disabled { opacity: .45; cursor: not-allowed; }
.secondary { background: transparent; border: 1.5px solid var(--ink); border-radius: var(--radius-s); padding: 12px 18px; min-height: 48px; cursor: pointer; font-weight: 700; }
.early { display: block; width: 100%; margin-top: 10px; text-align: center; }

/* 結果 */
.result h1 { font: 800 26px/1.5 var(--serif); margin: 16px 0 8px; }
.result .lead { color: var(--ink-soft); font-size: 15px; margin: 0 0 20px; }
.vision { font: 600 20px/1.8 var(--serif); margin: 0; }
.result .sec:first-of-type { border-top: 2px solid var(--ink); }
.sec { display: grid; grid-template-columns: 2.2em 1fr; gap: 0 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.sec .no { font: 800 22px/1.3 var(--serif); color: var(--ink-soft); }
.sec h2 { font-size: 17px; margin: 0 0 8px; }
.sec ul { margin: 0; padding-left: 1.1em; }
.sec li { margin: 4px 0; }
.qual { display: flex; flex-direction: column; gap: 8px; }
.qual div { border-left: 4px solid var(--safety); padding: 4px 0 4px 12px; }
.qual strong { display: block; font-size: 18px; }
.qual span { color: var(--ink-soft); font-size: 14px; }
.course { padding: 10px 0; }
.course + .course { border-top: 1px dashed var(--line); }
.course strong { display: block; }
.course p { margin: 2px 0 0; font-size: 15px; color: var(--ink-soft); }
.course-note { font-size: 13px; color: var(--ink-soft); }
.course-missing { background: var(--sheet); border-radius: var(--radius-s); padding: 10px 12px !important; margin-top: 8px; }
.course-missing p { margin: 0 !important; color: var(--ink) !important; }
.course-missing .link { padding: 8px 0 0; font-weight: 700; color: var(--ink); }
.qual strong, .qual span { overflow-wrap: anywhere; }
.confirm { margin: 24px 0; padding: 16px; background: var(--sheet); border-radius: var(--radius-s); border: 1.5px dashed var(--ink-soft); }
.confirm h2 { font-size: 16px; margin: 0 0 6px; }
.confirm ul { margin: 0; padding-left: 1.1em; }
.sources { font-size: 13px; color: var(--ink-soft); margin: 20px 0; }
.sources a { color: inherit; }
.cta-block { margin: 28px 0 8px; padding: 20px 16px; background: var(--ink); color: var(--paper); border-radius: var(--radius-l); }
.cta-block p { margin: 0 0 14px; }
.cta-block .primary { width: 100%; }
.after-actions { display: flex; gap: 16px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

/* 診断レポートPDF */
.report-block { margin: 28px 0 0; padding: 18px 16px; background: var(--sheet); border: 1.5px solid var(--line); border-radius: var(--radius-l); }
.report-block h2 { font: 800 18px/1.5 var(--serif); margin: 0 0 4px; }
.report-block p { margin: 0 0 12px; font-size: 15px; }
.report-block .secondary { width: 100%; }
.report-status { font-weight: 700; margin: 10px 0 0 !important; }
.cta-block { margin-top: 16px; }

/* 資格取得タイミング比較レポート（配布PDF） */
.timing-guide { margin: 16px 0 0; padding: 18px 16px; background: var(--sheet); border: 1.5px solid var(--line); border-left: 6px solid var(--safety); border-radius: var(--radius-s); }
.intro + #timing-slot .timing-guide { margin-top: 32px; }
.timing-guide h2 { font: 800 18px/1.5 var(--serif); margin: 0 0 4px; }
.timing-guide > p { margin: 0 0 12px; font-size: 15px; }
.timing-btn {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 10px 16px;
  background: var(--ink); color: var(--sheet); border-radius: var(--radius-s); font-weight: 700; text-decoration: none; font-size: 15px; line-height: 1.5;
}
.timing-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 10px 0 0 !important; font-size: 14px !important; }
.timing-sub a { color: var(--ink); font-weight: 700; padding: 6px 0; }
.timing-sub span { color: var(--ink-soft); }
.timing-notes { margin: 12px 0 0; padding-left: 1.1em; font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.timing-notes li + li { margin-top: 4px; }
.timing-notes a { color: inherit; }
.timing-consult { margin-top: 10px; padding: 8px 0; font-size: 15px; color: var(--ink); font-weight: 700; text-align: left; }

/* 受検資格チェッカー（外部） */
.checker { margin: 16px 0 0; padding: 18px 16px; background: var(--sheet); border: 1.5px solid var(--line); border-radius: var(--radius-s); }
.checker h2 { font: 800 18px/1.5 var(--serif); margin: 0 0 4px; }
.checker p { margin: 0 0 12px; font-size: 15px; }
.checker-btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-s); color: var(--ink); font-weight: 700; text-decoration: none; font-size: 15px;
}
.checker-note { color: var(--ink-soft); font-size: 13px !important; margin: 10px 0 0 !important; }
.checker-compact { margin: 0 0 24px; }

/* 同業者紹介 */
.referred { margin: 8px 0 0; padding: 10px 14px; background: var(--sheet); border-left: 4px solid var(--ink); font-size: 15px; }
.refer { margin: 36px 0 8px; padding: 20px 0 0; border-top: 2px solid var(--ink); }
.refer h2 { font: 800 19px/1.5 var(--serif); margin: 0 0 6px; }
.refer p { margin: 0 0 14px; font-size: 15px; }
.refer-actions { display: grid; gap: 8px; }
.refer-btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px;
  border: 1.5px solid var(--ink); border-radius: var(--radius-s); background: transparent;
  color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; font-size: 15px;
}
.refer-btn.line { background: #06c755; border-color: #06c755; color: #fff; }
.refer-status { font-weight: 700; margin: 10px 0 0; }
.refer-url { width: 100%; margin-top: 6px; padding: 10px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--sheet); font-size: 14px; }
.refer-note { color: var(--ink-soft); font-size: 13px !important; margin-top: 12px !important; }
@media (min-width: 520px) { .refer-actions { grid-template-columns: repeat(3, 1fr); } }

/* 相談フォーム */
.form h2 { font: 800 22px/1.5 var(--serif); margin: 8px 0 4px; }
.form p.note { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; }
.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.field label em { font-style: normal; font-weight: 400; color: var(--ink-soft); font-size: 13px; margin-left: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--sheet); font-size: 16px;
}
.field textarea { min-height: 120px; }
.hp { position: absolute; left: -9999px; }
.error { color: var(--danger); font-weight: 700; margin: 8px 0; }
.done { text-align: center; padding: 40px 0; }
.done h2 { font: 800 24px/1.5 var(--serif); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (min-width: 640px) { .intro h1 { font-size: 36px; } }
