/* style.css — いろは LINE 相談フォーム
 * 見た目の3案（G1 でみきやが1つ選ぶ・index.html の data-theme を変えるだけ）：
 *   a＝メニューと同じ（生成り×コーラル）／b＝ホームページと同じ（生成り×テラコッタ）／c＝白×墨（すっきり）
 * どの案でも：押す所は高さ 48px 前後・入力の文字は 16px（iPhone で勝手に拡大しない）・選んだ所は色と ✓ の両方で分かる・
 * 赤い字は予備の「1〜2枚多く」だけ（入れ忘れのお知らせは赤ではなく濃いだいだい色＋「⚠」）。 */
:root, :root[data-theme="a"] {
  --bg: #FFF8F1; --surface: #FFFFFF; --ink: #2B2620; --sub: #5F564B; --line: #E9DDD0;
  --accent: #B5462F; --accent-ink: #FFFFFF; --accent-soft: #FCEBE5;
  --radius: 16px; --shadow: 0 2px 10px rgba(43, 38, 32, 0.07);
}
:root[data-theme="b"] {
  --bg: #F6F2E9; --surface: #FFFFFF; --ink: #2B2620; --sub: #5F564B; --line: #E2D9C8;
  --accent: #9A4A28; --accent-ink: #FFFFFF; --accent-soft: #F5E6DB;
  --radius: 10px; --shadow: none;
}
:root[data-theme="c"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --ink: #1F1D1A; --sub: #57524A; --line: #DCD7CE;
  --accent: #3A3532; --accent-ink: #FFFFFF; --accent-soft: #F0EEEA;
  --radius: 12px; --shadow: none;
}
:root { --em: #C8102E; --warn: #8A4500; --warn-soft: #FFF4E5; --tap: 48px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px; line-height: 1.7;
}
#app { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(104px + env(safe-area-inset-bottom)); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading { color: var(--sub); }

/* 進み具合（段の名前だけ） */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; font-size: 13px; color: var(--sub); }
.steps li { flex: 1; text-align: center; padding: 4px 0; border-bottom: 3px solid var(--line); }
.steps li.on { color: var(--ink); font-weight: 700; border-color: var(--accent); }
.scr-title { font-size: 20px; line-height: 1.4; margin: 4px 0 14px; }
.scr-title:focus, .sp-title:focus { outline: none; }

/* 質問 */
.q { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.q-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; padding: 0; margin-bottom: 10px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.badge { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; line-height: 1.6; }
.badge.need { background: var(--ink); color: var(--surface); }
.badge.free { background: var(--line); color: var(--ink); }
.help-btn { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--sub); background: var(--surface); color: var(--ink); font-size: 17px; font-weight: 700; font-family: inherit; }
.help { background: var(--surface); border: 1px dashed var(--sub); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 15px; }
.help p { margin: 0 0 6px; }
.help p:last-child { margin-bottom: 0; }
.help-h { font-weight: 700; }
.pic { display: flex; gap: 20px; justify-content: center; margin: 4px 0 8px; }
.pic figure { margin: 0; text-align: center; font-size: 13px; color: var(--sub); }

/* 選ぶボタン（中は本物のラジオボタン） */
.opts { position: relative; display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; }
.opt-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--sub); display: grid; place-items: center; background: var(--surface); }
.check .opt-mark { border-radius: 6px; }
.opt-body { display: grid; gap: 2px; }
.opt-label { font-weight: 600; }
.opt-sub { font-size: 15px; color: var(--sub); line-height: 1.6; }
.vh:checked + .opt { border-color: var(--accent); background: var(--accent-soft); }
.vh:checked + .opt .opt-mark { border-color: var(--accent); background: var(--accent); }
.vh:checked + .opt .opt-mark::after { content: "✓"; color: var(--accent-ink); font-size: 15px; font-weight: 700; line-height: 1; }
.vh:focus-visible + .opt { outline: 3px solid var(--ink); outline-offset: 2px; }
.reveal { display: grid; gap: 10px; margin: 0 0 4px 12px; padding: 4px 0 4px 12px; border-left: 3px solid var(--accent-soft); }
.reveal .q { margin-bottom: 4px; }
.has-err > .opts .opt { border-color: var(--warn); }

/* 書く欄 */
.field { display: grid; gap: 6px; }
.f-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.inp { width: 100%; min-height: var(--tap); padding: 10px 12px; font-size: 16px; font-family: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; }
.inp:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.inp[aria-invalid="true"] { border-color: var(--warn); }
.inp::placeholder { color: #746C61; }
.area { min-height: 120px; resize: vertical; }
.num { width: 6.5em; text-align: right; }
.size { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.size-one { display: inline-flex; align-items: center; gap: 6px; }
.size-lbl { font-weight: 600; }
.unit, .times { color: var(--sub); }
.qty { display: flex; align-items: center; gap: 8px; }
.row { display: grid; gap: 8px; padding: 12px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.more-btn, .add-btn, .del-btn { min-height: 44px; padding: 8px 0; background: none; border: 0; font-family: inherit; font-size: 15px; font-weight: 700; text-align: left; color: var(--accent); }
.del-btn { color: var(--sub); font-weight: 600; }
.mini-help { width: 40px; height: 40px; margin-left: 4px; border-radius: 50%; border: 1.5px solid var(--sub); background: var(--surface); color: var(--ink); font-weight: 700; font-family: inherit; vertical-align: middle; }

/* 文 */
.note { font-size: 15px; color: var(--sub); margin: 8px 0 0; }
.note p { margin: 0 0 4px; }
.note.big { font-size: 16px; color: var(--ink); }
.plain { margin: 0 0 10px; }
.em { color: var(--em); font-weight: 700; }
.notice { margin: 0 0 16px; padding: 12px 14px; background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); font-weight: 700; }
.err { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--warn); }
.err-box { margin: 0 0 14px; padding: 10px 12px; background: var(--warn-soft); color: var(--warn); border-radius: 12px; font-weight: 700; }

/* 確認画面 */
.card { margin: 0 0 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { margin: 0; font-size: 16px; }
.edit-btn { min-height: 44px; padding: 6px 16px; border: 1.5px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--accent); font-family: inherit; font-size: 15px; font-weight: 700; }
.card-lines { margin: 8px 0 0; padding-left: 1.2em; font-size: 15px; }

/* 下の［戻る］［次へ］ */
.bar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.bar[hidden] { display: none; }
.btn { min-height: 52px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-family: inherit; font-size: 16px; font-weight: 700; }
.btn.primary { flex: 1; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn[disabled] { opacity: 0.6; }
.btn.wide { display: block; width: 100%; margin-top: 12px; }

/* 送ったあと・入口の画面・送れなかったとき */
.done-mark { margin: 8px 0 12px; font-size: 22px; font-weight: 700; }
.tip { margin: 10px 0 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tip p { margin: 0; }
.links { margin: 6px 0 0; padding-left: 1.2em; }
.links a { display: inline-block; padding: 9px 0; color: var(--accent); font-weight: 700; }
.special { padding-top: 24px; }
.special p { margin: 0 0 12px; }
.sp-title { margin: 0 0 16px; font-size: 20px; }
.fail { margin: 0 0 14px; padding: 12px; background: var(--warn-soft); border-radius: 12px; }
.fail p { margin: 0 0 6px; }
.fail-title { font-weight: 700; color: var(--warn); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 10; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--surface); text-align: center; }
.vh-copy { position: fixed; top: -1000px; left: 0; }
.preview-box { margin-top: 18px; }
.preview-msg { white-space: pre-wrap; padding: 10px; background: var(--surface); border: 1px dashed var(--sub); font-size: 13px; }
@media (prefers-reduced-motion: no-preference) {
  .opt { transition: border-color 0.15s, background-color 0.15s; }
}

/* 押した時の反応（ダブルタップの拡大待ちを無くす・押した瞬間に少し沈む） */
button, .opt, .inp, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn:active, .opt:active, .edit-btn:active, .help-btn:active, .mini-help:active, .more-btn:active, .add-btn:active, .del-btn:active { filter: brightness(0.93); }
