:root {
  --orange: #f08a24;
  --orange-deep: #d96f0c;
  --orange-soft: #fff1e0;
  --navy: #1b2266;
  --sky: #7cb6e6;
  --cream: #fff9f1;
  --ink: #3a2e28;
  --muted: #8a7a70;
  --line: #eaded2;
  --card: #ffffff;
  --red: #d9483b;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 120px; }

/* ヘッダー */
.top {
  background: var(--orange);
  color: #fff;
  padding: 10px 16px;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 10px rgba(217, 111, 12, .25);
}
.top-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.top img { width: 34px; height: 34px; border-radius: 50%; background: #fff; }
.top .t { font-weight: 800; font-size: 15px; line-height: 1.3; }
.top .s { font-size: 11px; opacity: .9; }
.progress { max-width: 640px; margin: 8px auto 0; height: 6px; background: rgba(255,255,255,.35); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: #fff; border-radius: 99px; transition: width .35s ease; }

/* 表紙 */
.hero { text-align: center; padding: 36px 8px 8px; }
.hero img { width: 132px; height: 132px; border-radius: 50%; box-shadow: 0 8px 24px rgba(27,34,102,.18); }
.hero h1 { font-size: 26px; margin: 18px 0 4px; font-weight: 800; letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: var(--orange-deep); }
.hero p { margin: 8px 0; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 13px; }
.flow { background: var(--card); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; text-align: left; border: 1px solid var(--line); }
.flow h3 { margin: 0 0 8px; font-size: 15px; }
.flow ol { margin: 0; padding-left: 1.3em; }
.flow li { margin: 2px 0; }
.note { font-size: 13px; color: var(--muted); }

/* セクション */
.sec-head { padding: 26px 4px 6px; }
.sec-head .icon { font-size: 30px; line-height: 1; }
.sec-head h2 { margin: 6px 0 0; font-size: 22px; font-weight: 800; }
.sec-head .sub { color: var(--orange-deep); font-weight: 700; font-size: 14px; }
.sec-head .desc { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.q { background: var(--card); border-radius: var(--radius); padding: 16px 16px 18px; margin: 12px 0; border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.q.err { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,72,59,.12); }
.q-label { font-weight: 700; margin: 0 0 10px; }
.q-hint { font-size: 13px; color: var(--muted); margin: -6px 0 10px; }
.req { display: inline-block; font-size: 11px; background: var(--red); color: #fff; border-radius: 6px; padding: 0 6px; margin-left: 6px; vertical-align: 2px; font-weight: 700; }
.err-msg { color: var(--red); font-size: 13px; margin-top: 8px; display: none; }
.q.err .err-msg { display: block; }
.heading { margin: 26px 4px 4px; font-size: 15px; font-weight: 800; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.heading::before { content: ''; width: 6px; height: 18px; border-radius: 3px; background: var(--orange); }

/* 5段階 */
.rate { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rate button {
  height: 52px; border-radius: 14px; border: 2px solid var(--line); background: #fff;
  font-size: 20px; font-weight: 800; cursor: pointer; transition: transform .1s, background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.rate button:active { transform: scale(.94); }
.rate button.on { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 4px 12px rgba(240,138,36,.35); }
.rate-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
.na { margin-top: 10px; background: none; border: 1px dashed var(--line); border-radius: 99px; padding: 3px 12px; font-size: 12px; color: var(--muted); cursor: pointer; }
.na.on { background: #efe9e3; border-style: solid; color: var(--ink); }

/* 選択肢 */
.opts { display: grid; gap: 8px; }
.opts.inline { grid-template-columns: repeat(3, 1fr); }
.opt {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background .15s, border-color .15s;
}
.opts.inline .opt { justify-content: center; padding: 11px 6px; font-size: 15px; }
.opt .mark { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cdbfb2; position: relative; }
.opt.multi .mark { border-radius: 6px; }
.opts.inline .opt .mark { display: none; }
.opt.on { border-color: var(--orange); background: var(--orange-soft); font-weight: 700; }
.opt.on .mark { border-color: var(--orange); background: var(--orange); }
.opt.on .mark::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.opt:not(.multi).on .mark::after { left: 4px; top: 4px; width: 8px; height: 8px; border: 0; background: #fff; border-radius: 50%; transform: none; }

input[type=text], textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 11px 13px; background: #fffdfa; outline: none;
  transition: border-color .15s, background .15s;
}
input[type=text]:focus, textarea:focus { border-color: var(--orange); background: #fff; }
textarea { min-height: 104px; resize: vertical; }
.other-input { margin-top: 8px; }

/* アイデア */
.idea { background: var(--card); border-radius: var(--radius); border: 2px dashed #f5c089; padding: 16px; margin: 12px 0; }
.idea-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.idea-no { font-weight: 800; color: var(--orange-deep); }
.idea-del { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; }
.idea label.small { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
.idea label.small:first-of-type { margin-top: 0; }
.add-idea { width: 100%; padding: 14px; border-radius: var(--radius); border: 2px dashed var(--orange); background: transparent; color: var(--orange-deep); font-weight: 800; cursor: pointer; }

/* 下のボタン */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,249,241,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); z-index: 10; }
.nav-in { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.btn { border: 0; border-radius: 99px; padding: 14px 20px; font-weight: 800; font-size: 16px; cursor: pointer; }
.btn-main { flex: 1; background: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(240,138,36,.4); }
.btn-main:disabled { opacity: .6; }
.btn-sub { background: #fff; border: 2px solid var(--line); color: var(--ink); }
.btn-big { display: block; width: 100%; margin: 22px 0 8px; }

/* 確認 */
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px; margin: 12px 0; }
.review-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: 0; }
.review-row button { background: none; border: 0; color: var(--orange-deep); font-weight: 700; cursor: pointer; white-space: nowrap; }
.count { font-size: 13px; color: var(--muted); }

.thanks { text-align: center; padding: 48px 8px; }
.thanks .big { font-size: 64px; }
.thanks h2 { font-size: 24px; margin: 10px 0; }

.fade { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
