@charset "UTF-8";

:root {
  --bg: #F2F8FC;
  --card: #FFFFFF;
  --text: #1F2D36;
  --text-sub: #566B78;
  --main: #0F6CA8;
  --main-dark: #0B5386;
  --main-pale: #E1F0FA;
  --accent: #A85A24;
  --error: #B3261E;
  --error-pale: #FBEDEC;
  --line: #D3E0E9;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
  font-size: 17px;
  line-height: 1.8;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 18px;
}

a { color: var(--main); }

/* ---------- ヘッダー・フッター ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.brand {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: var(--main);
}
.brand-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

.site-footer {
  margin-top: 40px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-sub);
}
.site-footer p { margin: 0 0 8px; }
.footer-brand { font-weight: bold; color: var(--text); }
.footer-links a { margin-right: 4px; }

/* ---------- 進捗バー ---------- */

.progress { padding-top: 16px; }
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
#progress-step { font-size: 15px; font-weight: bold; }
#progress-name { font-size: 14px; color: var(--text-sub); }
.progress-track {
  height: 8px;
  background: var(--main-pale);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--main);
  border-radius: 4px;
  transition: width .25s;
}

/* ---------- 見出し・本文 ---------- */

h1 {
  font-size: 24px;
  line-height: 1.5;
  color: var(--main);
  margin: 24px 0 8px;
}
h2 {
  font-size: 22px;
  line-height: 1.5;
  color: var(--main);
  margin: 20px 0 8px;
}
.lead {
  margin: 0 0 4px;
  color: var(--text-sub);
  font-size: 15px;
}

.notice {
  background: var(--main-pale);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.8;
  margin: 16px 0;
}
.notice-error {
  background: var(--error-pale);
  border: 2px solid var(--error);
  color: var(--error);
  font-weight: bold;
}
.notice strong { display: block; }

/* ---------- 質問カード ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.card.is-error { border: 2px solid var(--error); }

.q-title {
  display: block;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.6;
  margin: 0;
}
.req {
  display: inline-block;
  font-size: 12px;
  font-weight: normal;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: 3px;
  white-space: nowrap;
}
.q-help {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--text-sub);
}
.q-error {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: bold;
  color: var(--error);
}
.q-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--main-pale);
  border-radius: var(--radius);
  font-size: 15px;
}
.q-count {
  margin: 12px 0 0;
  padding: 12px;
  background: var(--main-pale);
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: bold;
  color: var(--main);
  text-align: center;
}

/* ---------- 入力欄 ---------- */

input[type="text"],
input[type="url"],
textarea {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
textarea { min-height: 120px; resize: vertical; }
input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus {
  outline: 3px solid var(--main-pale);
  border-color: var(--main);
}
.card.is-error input[type="text"],
.card.is-error input[type="url"],
.card.is-error textarea { border: 2px solid var(--error); }
::placeholder { color: #66717A; opacity: 1; }

.sub-input { margin-top: 12px; }
.sub-input-label {
  display: block;
  font-size: 15px;
  color: var(--text-sub);
}
.sub-input input { margin-top: 6px; }

/* ---------- 選択肢 ---------- */

.options {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 17px;
  line-height: 1.5;
  cursor: pointer;
}
.opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.opt-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid #90A4B2;
  background: #fff;
}
.opt-radio .opt-mark { border-radius: 50%; }
.opt-check .opt-mark { border-radius: 4px; }
.opt.is-checked {
  background: var(--main-pale);
  border: 1px solid var(--main);
  border-left: 5px solid var(--main);
  border-radius: 0;
  padding-left: 10px;
}
.opt.is-checked .opt-mark { border-color: var(--main); }
.opt-radio.is-checked .opt-mark { border-width: 7px; }
.opt-check.is-checked .opt-mark {
  background: var(--main);
  position: relative;
}
.opt-check.is-checked .opt-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.opt input:focus-visible + .opt-mark { outline: 3px solid var(--main); outline-offset: 2px; }

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid var(--main);
  background: var(--main);
  color: #fff;
  cursor: pointer;
}
.btn:hover { background: var(--main-dark); border-color: var(--main-dark); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-sub {
  background: #fff;
  color: var(--main);
}
.btn-sub:hover { background: var(--main-pale); border-color: var(--main); }
.btn-quiet {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-sub);
  font-weight: normal;
}
.btn-quiet:hover { background: #fff; border-color: var(--text-sub); }
.btn-small { min-height: 44px; font-size: 15px; padding: 8px 14px; }
.btn-block { display: flex; width: 100%; }

.nav {
  display: flex;
  gap: 12px;
  margin: 24px 0 0;
}
.nav .btn { flex: 1; }
.nav .btn-next { flex: 1.4; }

.saved {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--text-sub);
  text-align: center;
}

.stack { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }

/* ---------- 完了画面 ---------- */

.result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  max-height: 60vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.9;
}
.send-box {
  background: var(--main-pale);
  border: 2px solid var(--main);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}
.send-box p { margin: 0 0 12px; font-size: 16px; }
.toast {
  margin: 12px 0 0;
  padding: 12px;
  background: var(--main);
  color: #fff;
  border-radius: var(--radius);
  font-size: 16px;
  text-align: center;
}

/* ---------- 利用規約ページ ---------- */

.doc { padding-bottom: 20px; }
.doc h2 { font-size: 19px; margin-top: 28px; }
.doc p, .doc li { font-size: 16px; }
.doc ul { padding-left: 1.4em; }

/* ---------- パソコン表示 ---------- */

@media (min-width: 768px) {
  body { font-size: 17px; }
  h1 { font-size: 28px; }
  h2 { font-size: 25px; }
  .card { padding: 20px 24px; }
  .options.cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .nav { max-width: 520px; }
}
