:root {
  --paper: #faf6f2;
  --white: #fffdfb;
  --milk: #ede2d8;
  --ink: #4a3c36;
  --ink-soft: #85766d;
  --rule: #e6dbd1;
  --accent: #c98a74;
  --accent-soft: #f6e7df;
  --line-green: #06c755;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --en: "Cormorant Garamond", serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--jp); font-size: 15.5px; line-height: 1.85; letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }

/* 上 */
.top { background: var(--milk); padding: 36px 20px 30px; text-align: center; }
.brand { font-family: var(--en); font-style: italic; letter-spacing: .24em; color: var(--ink-soft); font-size: 16px; }
.top h1 { font-family: var(--round); font-weight: 700; font-size: 26px; line-height: 1.5; margin: 6px 0 18px; letter-spacing: .1em; }
.intro { max-width: 560px; margin: 0 auto; text-align: left; background: var(--white); border-radius: 18px; padding: 18px 18px 14px; }
.intro p { font-size: 14.5px; margin-bottom: 8px; }
.intro ul { margin: 0; padding-left: 1.2em; font-size: 14px; }
.intro li { margin-bottom: 4px; }
.req { color: var(--accent); font-weight: 700; }

main { max-width: 600px; margin: 0 auto; padding: 22px 14px 40px; }

/* セクション */
.sec { background: var(--white); border-radius: 22px; padding: 22px 18px 8px; margin-bottom: 16px; box-shadow: 0 14px 30px -26px rgba(74, 60, 54, .6); }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.sec-no { font-family: var(--en); font-style: italic; color: var(--accent); font-size: 26px; line-height: 1; }
.sec-head h2 { font-family: var(--round); font-weight: 700; font-size: 18px; }

.q { margin-bottom: 20px; }
.q-label { display: block; font-family: var(--round); font-weight: 700; font-size: 14.5px; line-height: 1.6; margin-bottom: 8px; }
.q-hint { display: block; font-size: 12.5px; color: var(--ink-soft); margin: -4px 0 8px; }
.q.missing .q-label { color: #b4553c; }
.q.missing input[type="text"], .q.missing textarea { border-color: #d9826b; background: #fff6f2; }

input[type="text"], textarea {
  width: 100%; font-size: 16px; /* スマホで勝手に拡大されない大きさ */
  padding: 11px 13px; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--paper);
  transition: border-color .2s ease, background .2s ease;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
input[type="text"]:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; }

/* 選ぶボタン */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--rule); background: var(--paper); font-size: 14.5px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.other { margin-top: 8px; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border-radius: 999px; padding: 15px 30px; border: none; cursor: pointer; text-decoration: none;
  font-family: var(--round); font-weight: 700; font-size: 16px; letter-spacing: .06em;
}
.btn-main { width: 100%; background: var(--ink); color: #fff; }
.btn-line { background: var(--line-green); color: #fff; flex: 1; }
.btn-sub { background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); flex: 1; }
.finish { margin-top: 10px; }
.err { margin-top: 12px; color: #b4553c; font-weight: 700; font-size: 14px; }

.result { background: var(--white); border-radius: 22px; padding: 22px 18px; margin-top: 18px; border: 2px solid var(--accent); }
.result h2 { font-family: var(--round); font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.result textarea { min-height: 260px; font-size: 14px; margin: 12px 0 14px; background: var(--paper); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { white-space: nowrap; }
@media (max-width: 480px) { .actions .btn { flex: 1 1 100%; } }
.small { font-size: 13px; color: var(--ink-soft); }
#copy-msg { margin-top: 8px; color: var(--accent); font-weight: 700; }
.note { margin-top: 14px; background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; }
.note p + p { margin-top: 8px; }

.reset { text-align: center; margin-top: 28px; }
.link { background: none; border: none; color: var(--ink-soft); text-decoration: underline; font-size: 13px; cursor: pointer; }
.privacy { text-align: center; font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.foot { text-align: center; font-family: var(--en); font-style: italic; color: var(--ink-soft); letter-spacing: .2em; padding: 18px 0 30px; }
