:root {
  --color-primary: #c2410c;
  --color-primary-dark: #9a3412;
  --color-bg: #fff7ed;
  --color-card: #ffffff;
  --color-border: #fed7aa;
  --color-text: #431407;
  --color-muted: #8f6242;
  --color-danger: #b0123a;
  --color-danger-bg: #ffe4e6;
  --color-warn: #8a5306;
  --color-warn-bg: #fef3c7;
  /* バス来場特典の案内用(琥珀色) */
  --color-bonus: #b45309;
  --color-bonus-frame: #f7dfa8;
  --color-bonus-bg: #fffdf6;
  --color-bonus-step-border: #f2e5c4;
  --color-bonus-marker: #fcd34d;
  --color-bonus-label-bg: #fdf6e8;
  /* 託児所の案内(目立たせず、必要な方だけ読む位置づけの落ち着いた配色) */
  --color-care-bg: #f8f7f5;
  --color-care-border: #ddd8d0;
  --color-care-ink: #4b4741;
  --color-care-label-bg: #efece7;
  --radius: 10px;
}

* { box-sizing: border-box; }

button, input, textarea, select {
  font-family: inherit;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 400;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.event-header {
  text-align: center;
  margin-bottom: 24px;
}

.event-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 0 12px;
}

.event-description {
  white-space: pre-wrap;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-muted);
  margin: 0;
}

.seat-notice {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--color-warn-bg);
  color: var(--color-warn);
  border: 1px solid #fde68a;
  font-weight: 700;
  font-size: 0.9rem;
}

.closed-panel, .reject-panel {
  background: var(--color-danger-bg);
  border: 1px solid #fecdd3;
  color: var(--color-danger);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* 受付開始前の案内(締切とは違い、これから始まるお知らせなので落ち着いた色にする) */
.closed-panel.is-info {
  background: var(--color-warn-bg);
  border-color: #fde68a;
  color: var(--color-warn);
}

.block {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.block h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-bg);
}

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.q-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* 「必須」「任意」のマーク。形は共通で、色と文字だけを変えて見分けやすくする */
.q-label.required::after,
.checkbox-label .required::after,
.q-label.optional::after,
.q-label.not-required::after {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
}

.q-label.required::after,
.checkbox-label .required::after {
  content: "必須";
  background: var(--color-danger);
}

/* 任意項目は、必須と取り違えないよう落ち着いた色にする */
.q-label.optional::after {
  content: "任意";
  background: #969696;
}

/* 条件により入力そのものが不要になる項目(宮崎県以外を選んだときの市町村) */
.q-label.not-required::after {
  content: "不要";
  background: #a8a29e;
}

.hint {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-muted);
  margin: 0 0 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
}

textarea { resize: vertical; }

/* プルダウン。端末標準の矢印を残しつつ、入力欄と高さ・見た目を揃える */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2378716c' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

/* 「宮崎県」以外を選んだときの市町村欄(操作不要であることを示す) */
select:disabled,
select.is-locked {
  background-color: #f5f5f4;
  color: var(--color-muted);
  cursor: not-allowed;
  opacity: 1; /* 端末によっては既定で薄くなりすぎるため打ち消す */
}

/* 氏名(姓・名)+年齢を横に並べる行。申込者欄・参加者欄で共通の見た目にする */
.name-row,
.participant-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.name-row > input,
.participant-row > input { flex: 1; min-width: 0; }

/* 年齢入力と「歳」をひとまとまりにする */
.age-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.age-group input {
  width: 72px;
  flex: none;
  text-align: right;
}
.age-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
  white-space: nowrap;
}

.radio-row, .radio-col, .checkbox-col {
  display: flex;
  gap: 12px 20px;
}
.radio-row { flex-wrap: wrap; }
.radio-col, .checkbox-col { flex-direction: column; gap: 10px; }

.radio-label, .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: pointer;
}

.radio-label input, .checkbox-label input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.sub-field {
  margin-top: 10px;
  padding-left: 4px;
}

/* 自動プログラム対策の入力欄。人には見えない位置に置く。
   display:none ではなく画面外に飛ばすことで、自動プログラムには
   通常の入力欄として認識させ、入力させて判別する。 */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 参加者6名以上の場合の案内(見落とされないよう強調) */
.participants-limit-note {
  margin-top: 12px;
  margin-bottom: 0;
  font-weight: 700;
  color: var(--color-primary);
}

/* バス来場特典の案内(枠と背景は下の「折りたたみ」側で指定しています) */

/* 一番の魅力を大きく見せる部分 */
.bonus-hook {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-bonus);
  line-height: 1.55;
}
.bonus-hook em {
  font-style: normal;
  border-bottom: 3px solid var(--color-bonus-marker);
  padding-bottom: 1px;
}

.bonus-subtitle {
  margin: 18px 0 10px !important;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-bonus);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bonus-subtitle::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-bonus-frame);
}

/* 乗車証明書(専用抽選券)の配布バス停・配布時間(ラベル付きの表) */
.bonus-info {
  margin: 0;
  background: #fff;
  border: 1px solid var(--color-bonus-step-border);
  border-radius: 8px;
  overflow: hidden;
}
.bonus-info > div {
  display: flex;
  border-bottom: 1px solid var(--color-bonus-step-border);
}
.bonus-info > div:last-child { border-bottom: none; }
.bonus-info dt {
  flex: 0 0 84px;
  background: var(--color-bonus-label-bg);
  color: var(--color-bonus);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 11px 10px;
  line-height: 1.6;
}
.bonus-info dd {
  margin: 0;
  padding: 11px 12px;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #3f3f46;
}
.bonus-info dd strong {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-bonus);
}
/* バス停名や時刻が途中で改行されないようにする(狭い画面対策) */
.bonus-info .nb { white-space: nowrap; }

/* 配布対象を取り違えないための注意書き */
.bonus-info-note {
  margin-top: 8px !important;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--color-bonus);
}

.bonus-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bonus-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--color-bonus-step-border);
  border-radius: 8px;
  padding: 11px 13px;
  margin-bottom: 8px;
  font-size: 0.88rem;
  line-height: 1.7;
}
.bonus-steps li:last-child { margin-bottom: 0; }

/* 番号の丸バッジ(本文の頭を揃えるため左に固定) */
.bonus-step-no {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-bonus);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.bonus-note {
  margin-top: 12px !important;
  font-size: 0.82rem;
  color: var(--color-muted);
}

/* 駐車場についての補足(来場方法の選択肢の上に置く注意文) */
.park-note {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--color-warn);
  line-height: 1.7;
}

.participant-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fffaf5;
}

.participant-card .participant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.participant-card .participant-header strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* .participant-row の並び方は、上部の .name-row と共通の指定にまとめています */

.participant-card.locked {
  background: var(--color-warn-bg);
  border-color: #f3d489;
}
.participant-card.locked input:disabled {
  background: #fdf6e3;
  color: var(--color-text);
  opacity: 1;
  -webkit-text-fill-color: var(--color-text);
}
.locked-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-warn);
  background: #fff;
  border: 1px solid #f3d489;
  border-radius: 4px;
  padding: 2px 8px;
}

.remove-participant-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}

.secondary-btn {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.agreement-item {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--color-border);
}
.agreement-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.agreement-body {
  margin: 8px 0 0 30px;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-muted);
}
.agreement-body li { margin-bottom: 4px; }

/* 文章中のURLを自動でリンク表示したときのスタイル */
.inline-link {
  color: var(--color-primary-dark);
  text-decoration: underline;
  word-break: break-all;
}
.inline-link:hover { color: var(--color-primary); }

.form-error {
  background: var(--color-danger-bg);
  border: 1px solid #fecdd3;
  color: var(--color-danger);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.form-error ul { margin: 6px 0 0; padding-left: 20px; }

.primary-btn {
  display: block;
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}
.primary-btn:hover { background: var(--color-primary-dark); }
.primary-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.confirm-panel .block { margin-bottom: 16px; }

.confirm-content {
  margin: 0;
}

.confirm-content .confirm-row {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.92rem;
}
.confirm-content .confirm-row:last-child { border-bottom: none; }

.confirm-content dt {
  flex: 0 0 200px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.confirm-content dd {
  flex: 1;
  margin: 0;
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
.confirm-actions .secondary-btn {
  flex: 1;
  text-align: center;
}
.confirm-actions .primary-btn {
  flex: 2;
}

@media (max-width: 480px) {
  .confirm-content .confirm-row { flex-direction: column; gap: 2px; }
  .confirm-content dt { flex: none; }
  .confirm-actions { flex-direction: column; }
}

.success-panel {
  background: #eafaf1;
  border: 1px solid #a9dfc0;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.success-panel h2 { color: #1e7e46; font-weight: 700; margin-top: 0; }


/* 託児所希望調査の案内
   バス特典とは別の位置づけのため、本文と同じフォント(Zen Kaku Gothic New)のまま、
   彩度を抑えたグレー系でまとめている。 */
/* 託児所の案内(枠と背景は下の「折りたたみ」側で指定しています) */

.care-lead {
  font-size: 0.9rem;
  line-height: 1.8;
}

/* 対象年齢・利用料金 */
.care-info {
  margin: 14px 0 0;
  background: #fff;
  border: 1px solid var(--color-care-border);
  border-radius: 6px;
  overflow: hidden;
}
.care-info > div {
  display: flex;
  border-bottom: 1px solid var(--color-care-border);
}
.care-info > div:last-child { border-bottom: none; }
.care-info dt {
  flex: 0 0 84px;
  background: var(--color-care-label-bg);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 11px 10px;
  line-height: 1.6;
}
.care-info dd {
  margin: 0;
  padding: 11px 12px;
  font-size: 0.85rem;
  line-height: 1.7;
}
.care-info dd strong { font-weight: 700; }

.care-subtitle {
  margin: 18px 0 8px !important;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.care-subtitle::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-care-border);
}

.care-notes {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.85rem;
  line-height: 1.8;
}
.care-notes li { margin-bottom: 4px; }
.care-notes li:last-child { margin-bottom: 0; }

/* 伊沢さんへのクイズ募集のお知らせ(アンケートの最後) */
.quiz-notice {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  background: var(--color-card);
}
.quiz-notice p {
  margin: 0 0 6px;
  font-size: 0.87rem;
  line-height: 1.8;
}
.quiz-notice p:last-child { margin-bottom: 0; }
.quiz-notice-title {
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* ===== 折りたたみ(バス来場特典・託児サービス) =====
   初期状態は閉じた1枚のバーで、タップすると中身が開きます。
   フォームが縦に長くなりすぎないようにするための仕組みです。
   中身はHTMLに常に存在するため、ページ内検索や読み上げソフトからは
   閉じたままでも読み取れます。 */
.acc {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

/* 閉じているときに見える1枚のバー */
.acc-sum {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;                 /* 端末標準の三角マークを消す */
  -webkit-tap-highlight-color: transparent;
}
.acc-sum::-webkit-details-marker { display: none; }  /* Safari用 */
.acc-sum:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }

.acc-txt { min-width: 0; }
.acc-ttl {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}
/* 見出しに続けて書くひとこと(文字サイズ・色・太さとも見出しと同じ) */
/* 狭い画面で折り返すとき、言葉の途中や末尾の「～」だけで改行されないようにする */
.acc-catch .nb { white-space: nowrap; }

.acc-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* 右端の＋/－ */
.acc-sign {
  margin-left: auto;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}
.acc-sign::before { content: "＋"; }
.acc[open] .acc-sign::before { content: "－"; }

.acc-inner { overflow: hidden; }
.acc-body { padding: 14px 16px 16px; }
.acc-body p { margin: 0; }

/* 開いているときは、見出しのバーと中身を細い線で区切る */
.acc-bonus[open] .acc-sum { border-bottom: 1px solid var(--color-bonus-frame); }
.acc-care[open] .acc-sum { border-bottom: 1px solid var(--color-care-border); }

/* バス来場特典(この枠の中だけ「M PLUS 1p」を使用) */
.acc-bonus {
  margin-top: 16px;
  border: 2px solid var(--color-bonus-frame);
  background: var(--color-bonus-bg);
  font-family: "M PLUS 1p", sans-serif;
}
.acc-bonus .acc-ttl { color: var(--color-bonus); }
.acc-bonus .acc-sign { background: var(--color-bonus); }

/* 託児サービス(目立たせず、必要な方だけが開く位置づけ) */
.acc-care {
  margin-bottom: 20px;
  border-color: var(--color-care-border);
  background: var(--color-care-bg);
  color: var(--color-care-ink);
}
.acc-care .acc-ttl { color: #55504a; }
.acc-care .acc-sign { background: #6f6a63; }

/* パソコンから入力できない方への案内(タイトル・概要のすぐ下) */
.pc-notice {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: var(--color-warn-bg);
  color: var(--color-warn);
  text-align: left;
}
.pc-notice p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.75;
}
.pc-notice-title {
  font-weight: 700;
  margin-bottom: 2px !important;
}
