@charset "UTF-8";
/* FormStudio — どのブランドでも使える控えめな共通スタイル。
   フォームごとの色は定義JSONの theme_color で --accent を差し替える。 */

:root {
  --accent: #8A6D3B;        /* 落ち着いた金茶（既定） */
  --accent-dark: #6E5730;
  --ink: #2B2B2B;
  --ink-soft: #6B6255;
  --paper: #FAF7F1;
  --white: #FFFFFF;
  --line: #E5DDD0;
  --error: #B3261E;
  --error-bg: #FDECEA;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 28px 18px 80px; }

h1 { font-size: 22px; line-height: 1.6; margin-bottom: 20px; text-align: center; }
h2 { font-size: 18px; margin-bottom: 12px; }

.intro { margin-bottom: 20px; font-size: 15px; }
.intro p { margin-bottom: 1em; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 22px;
}

/* ── 入力欄 ── */
.field { margin-bottom: 22px; }
.flabel { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.req {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600;
  color: var(--white); background: var(--error); border-radius: 4px; padding: 1px 7px;
  vertical-align: 2px;
}
input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  font-size: 16px;            /* iOSのズーム防止 */
  font-family: inherit;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFDF9;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; cursor: pointer; }
.opt input { margin-top: 6px; transform: scale(1.2); accent-color: var(--accent); }
.comment { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

.has-error input, .has-error textarea, .has-error select { border-color: var(--error); }
.err { color: var(--error); font-size: 13px; margin-top: 6px; font-weight: 600; }
.errorbox {
  background: var(--error-bg); color: var(--error);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; font-weight: 600;
}

/* 人には見えないおとり欄（迷惑投稿よけ） */
.hp { position: absolute; left: -9999px; top: -9999px; }

/* ── ボタン ── */
.btns { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.btn {
  font-size: 16px; font-weight: 600; font-family: inherit;
  border: none; border-radius: 100px; padding: 14px 34px; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--white); }
.btn.primary:hover { background: var(--accent-dark); }
.btn.back { background: #EEE8DD; color: var(--ink-soft); }

/* ── 確認画面 ── */
.confirm { width: 100%; border-collapse: collapse; margin: 14px 0 6px; }
.confirm th, .confirm td { border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left; vertical-align: top; font-size: 15px; }
.confirm th { width: 38%; color: var(--ink-soft); font-weight: 600; }

.receipt { font-size: 17px; margin: 10px 0 16px; }
.privacy-note { font-size: 12px; color: var(--ink-soft); text-align: center; margin-top: 18px; }

@media (max-width: 480px) {
  .card { padding: 20px 16px; }
  .confirm th { width: 100%; display: block; border-bottom: none; padding-bottom: 0; }
  .confirm td { display: block; padding-top: 2px; }
}

/* ══════════════════════════════════════════════════════════
   1問1画面（スマホ向けの進み方）
   forms/{slug}.json に "mobile_steps": true があるフォームだけに付く。
   項目・文言・検証・送信の中身は変えない。見た目と進み方だけ。
   ══════════════════════════════════════════════════════════ */

.fs-steps { -webkit-tap-highlight-color: transparent; }
.fs-steps .wrap { max-width: 480px; padding: 20px 16px 40px; }
.fs-steps.fs-live .wrap { padding-bottom: 150px; }
.fs-steps .card { background: transparent; border: none; border-radius: 0; padding: 0; }
.fs-steps h1 { font-size: 23px; line-height: 1.55; font-weight: 700; text-align: left; margin-bottom: 12px; }
.fs-steps .intro { font-size: 16px; line-height: 1.9; margin-bottom: 18px; }

/* 入口の「所要」「質問」 */
.fs-meta { display: flex; gap: 10px; margin: 0 0 18px; }
.fs-metabox {
  flex: 1; background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 10px; text-align: center;
}
.fs-metabox .fs-k { display: block; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.fs-metabox .fs-n { display: block; font-size: 24px; font-weight: 700; color: var(--accent-dark); line-height: 1.3; }
.fs-metabox .fs-n small { font-size: 14px; font-weight: 700; }

/* 上の進みぐあい */
.fs-topbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.fs-topbar.fs-hide { display: none; }
.fs-topinner { max-width: 480px; margin: 0 auto; padding: 10px 16px 8px; }
.fs-toprow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.fs-iconbtn {
  width: 44px; height: 44px; flex: none; border: none; background: transparent; color: var(--ink-soft);
  font-size: 22px; line-height: 1; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.fs-iconbtn:active { background: #F1EBE0; }
.fs-remain { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--accent-dark); }
.fs-bar { height: 6px; background: var(--line); border-radius: 100px; overflow: hidden; }
.fs-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 100px; transition: width .25s ease; }

/* 1画面ずつ出す */
.fs-live .fs-screen { display: none; }
.fs-live .fs-screen.fs-on { display: block; }
.fs-steps .field { margin-bottom: 22px; }
.fs-live .field.fs-screen { margin-bottom: 0; }
.fs-qnum { font-size: 13px; font-weight: 700; color: var(--accent-dark); letter-spacing: .08em; margin-bottom: 6px; }
.fs-live .flabel { font-size: 21px; line-height: 1.55; font-weight: 700; margin-bottom: 6px; }
.fs-live .comment { font-size: 14px; line-height: 1.75; color: var(--ink-soft); margin: 0 0 18px; }
.fs-any {
  display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600;
  color: var(--ink-soft); background: #EEE8DD; border-radius: 4px; padding: 1px 7px; vertical-align: 2px;
}

/* 入力欄（特大） */
.fs-steps input[type="text"], .fs-steps input[type="email"], .fs-steps textarea {
  font-size: 17px; line-height: 1.7; min-height: 58px; padding: 16px 14px;
  border: 1.5px solid #CBBFA9; border-radius: 14px; background: var(--white);
}
.fs-steps textarea { min-height: 150px; }
.fs-steps input[type="text"]#f_zip, .fs-steps input.fs-zip { letter-spacing: .18em; font-size: 20px; }
.fs-steps .opts { gap: 10px; }
.fs-steps .opt {
  align-items: center; gap: 12px; min-height: 62px; font-size: 16px; line-height: 1.6;
  background: var(--white); border: 1.5px solid #CBBFA9; border-radius: 14px; padding: 14px 16px;
}
.fs-steps .opt input { margin-top: 0; transform: scale(1.4); }
.fs-steps .opt.fs-on { border-color: var(--accent); background: #F3EDE0; font-weight: 700; }
.fs-steps .err {
  color: var(--error); background: var(--error-bg); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; font-weight: 700; line-height: 1.7; margin-top: 12px;
}
.fs-live .errorbox { display: none; }

/* 都道府県などの選ぶ形 */
.fs-live select.fs-native { position: absolute; left: -9999px; }
.fs-pick {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 62px;
  background: var(--white); border: 1.5px solid #CBBFA9; border-radius: 14px;
  padding: 14px 16px; font: inherit; font-size: 17px; color: var(--ink); text-align: left; cursor: pointer;
}
.fs-pick .fs-arrow { margin-left: auto; color: var(--ink-soft); font-size: 18px; }
.fs-pick.fs-chosen { border-color: var(--accent); background: #F3EDE0; font-weight: 700; }

/* 下に固定するボタン */
.fs-live .btns { display: none; }
.fs-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 15;
  background: linear-gradient(to bottom, rgba(250, 247, 241, 0), var(--paper) 26%);
}
.fs-footinner { max-width: 480px; margin: 0 auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.fs-btn {
  width: 100%; min-height: 58px; border: none; border-radius: 100px; font: inherit;
  font-size: 17px; font-weight: 700; background: var(--accent); color: var(--white); cursor: pointer;
}
.fs-btn:disabled { background: #DCD3C3; color: #8F8779; cursor: default; }
.fs-btn.fs-ghost {
  background: transparent; color: var(--ink-soft); min-height: 48px; font-size: 15px;
  text-decoration: underline; margin-top: 2px;
}
.fs-live .privacy-note { font-size: 12px; margin-top: 10px; }

/* 確認の画面 */
.fs-rev { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 14px 0 16px; }
.fs-revrow { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.fs-revrow:last-child { border-bottom: none; }
.fs-revrow .fs-k { width: 34%; flex: none; font-size: 13px; color: var(--ink-soft); font-weight: 600; line-height: 1.7; }
.fs-revrow .fs-val { flex: 1; font-size: 15px; line-height: 1.7; word-break: break-all; white-space: pre-wrap; }
.fs-revrow .fs-val.fs-blank { color: #A79E8E; }
.fs-fix {
  flex: none; align-self: flex-start; background: none; border: none; font: inherit; font-size: 14px;
  font-weight: 700; color: var(--accent-dark); text-decoration: underline; cursor: pointer;
  padding: 4px 2px; min-height: 32px; min-width: 44px; text-align: right;
}
.fs-cbtns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.fs-cbtns .btn { width: 100%; min-height: 58px; padding: 14px 20px; }

/* 下からせり上がる一覧 */
.fs-veil { position: fixed; inset: 0; background: rgba(43, 43, 43, .45); z-index: 30; display: none; }
.fs-veil.fs-on { display: block; }
.fs-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 480px; margin: 0 auto;
  background: var(--paper); border-radius: 22px 22px 0 0; max-height: 88vh;
  display: none; flex-direction: column; box-shadow: 0 -8px 30px rgba(43, 43, 43, .18);
}
.fs-sheet.fs-on { display: flex; }
.fs-grab { width: 44px; height: 5px; background: #CBBFA9; border-radius: 100px; margin: 10px auto 4px; }
.fs-sheethead { padding: 6px 16px 10px; border-bottom: 1px solid var(--line); }
.fs-sheethead h3 { font-size: 18px; font-weight: 700; line-height: 1.6; margin: 0; }
.fs-search {
  width: 100%; margin-top: 10px; font-family: inherit; font-size: 17px; padding: 14px;
  border: 1.5px solid #CBBFA9; border-radius: 12px; background: var(--white); color: var(--ink);
}
.fs-search:focus { outline: none; border-color: var(--accent); }
.fs-sheetbody { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); }
.fs-srow {
  width: 100%; display: flex; align-items: center; min-height: 56px; background: var(--white);
  border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 12px 16px;
  font: inherit; font-size: 17px; color: var(--ink); text-align: left; cursor: pointer;
}
.fs-srow.fs-on { border-color: var(--accent); background: #F3EDE0; font-weight: 700; }
.fs-srow .fs-tick { margin-left: auto; color: var(--accent); font-size: 18px; font-weight: 700; visibility: hidden; }
.fs-srow.fs-on .fs-tick { visibility: visible; }
.fs-empty { font-size: 15px; color: var(--ink-soft); text-align: center; padding: 24px 0; }

/* ── 管理画面 ── */
.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 24px 18px 80px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); font-size: 13px; }
.admin-table th, .admin-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.admin-table th { background: #F1EBE0; }
.tag { display: inline-block; border-radius: 4px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.tag.ok { background: #E4F2E4; color: #256029; }
.tag.failed { background: var(--error-bg); color: var(--error); }
.tag.none { background: #EEE8DD; color: var(--ink-soft); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.toolbar a, .toolbar button {
  font-size: 14px; font-family: inherit; text-decoration: none; cursor: pointer;
  background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 7px 14px; color: var(--ink);
}
.detail { color: var(--ink-soft); font-size: 12px; max-width: 320px; word-break: break-all; }
