@charset "UTF-8";


/* 01. 既存の共通クラス（表示切替に必要） */
.clear { clear: both; }
.no_disp { display: none !important; }
.ta-c { text-align: center !important; }

/* 02. 色・フォーム全体 */
#form_area {
  --rf-text: #443b33;
  --rf-muted: #786e63;
  --rf-line: #ded5c9;
  --rf-soft: #faf7f2;
  --rf-accent: #8a704e;
  --rf-dark: #594735;
  --rf-error: #a54046;
  --rf-focus: rgba(138, 112, 78, .16);
  --rf-day-height: 76px;
  --rf-scroll-offset: 112px; /* 固定ヘッダー＋上部余白。JSがpx値として使用 */
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  color: var(--rf-text);
  font-size: 16px;
  line-height: 1.8;
  color-scheme: light;
}

#form_area *,
#form_area *::before,
#form_area *::after {
  box-sizing: border-box;
}

#form_area form { margin: 0; }

/* 03. 項目名 → 入力欄 */
#form_area dl {
  display: block;
  margin: 0 0 30px;
  padding: 0;
  border: 0;
}

#form_area dl dt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rf-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
}

#form_area dl dd {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 16px;
}

#form_area dl dt .req {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--rf-error);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .04em;
}

/* 04. 入力欄 */
#form_area :is(input, select, textarea, button) {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: inherit;
}

#form_area :is(input[type="text"], input[type="tel"], input[type="email"],
  input[type="number"], input[type="date"], select, textarea) {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--rf-line);
  border-radius: 6px;
  background-color: #fff;
  color: var(--rf-text);
  font-weight: 400;
  line-height: 1.5;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

#form_area input[type="number"] { width: 9rem; }
#form_area select { cursor: pointer; }
#form_area textarea { min-height: 140px; resize: vertical; }
#form_area textarea[name="soudan_naiyo_etc"] { min-height: 60px; margin-top: 10px; }
#form_area :is(input, textarea)::placeholder { color: #8a8177; opacity: 1; }

#form_area :is(input[type="text"], input[type="tel"], input[type="email"],
  input[type="number"], input[type="date"], select, textarea):focus {
  border-color: var(--rf-accent);
  outline: 2px solid var(--rf-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--rf-focus);
}

#form_area #yoyaku_nitiji {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%238a704e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18M8 15h2M14 15h2'/%3E%3C/svg%3E");
  background-position: right 15px center;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* 05. ラジオ・チェックボックス */
#form_area label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 46px;
  margin: 0 6px 8px 0;
  padding: 10px 14px;
  border: 1px solid var(--rf-line);
  border-radius: 6px;
  background: #fff;
  color: var(--rf-text);
  font-size: 16px;
  line-height: 1.6;
  vertical-align: top;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

#form_area label :is(input[type="radio"], input[type="checkbox"]) {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--rf-dark);
  cursor: pointer;
}

#form_area label:has(input:checked) {
  border-color: var(--rf-accent);
  background: var(--rf-soft);
  box-shadow: inset 0 0 0 1px var(--rf-accent);
}

#form_area label:focus-within { outline: 2px solid var(--rf-accent); outline-offset: 2px; }
#form_area .dd_soudan label { min-width: 112px; font-size: 15px; }

/* 06. 説明・注意事項（既存の文章・表示条件は維持） */
#form_area dd > p {
  margin: 10px 0 18px;
  color: var(--rf-muted);
  font-size: 14px !important; /* 添付HTMLのインライン文字サイズを統一 */
  line-height: 1.9 !important;
  overflow-wrap: anywhere;
}

#form_area dd > p b { color: var(--rf-text); font-weight: 600; }
#form_area dd > p span { font-size: inherit !important; }
#form_area dd > p font[color="red"] { color: var(--rf-error); }
#form_area dd > p a { color: var(--rf-dark); text-underline-offset: 3px; }
#form_area label:has(input[name="doui2"]) { width: 100%; }
#form_area label:has(input[name="doui2"]) > span { font-size: 15px !important; }

/* 07. 入力エラー：既存JSの .req_err を使用 */
#form_area dd.req_err :is(input[type="text"], input[type="tel"], input[type="email"],
  input[type="number"], input[type="date"], select, textarea, label),
#form_area :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--rf-error);
  background-color: #fff5f5;
  box-shadow: none;
}

/* 08. カレンダー外枠・年月・案内 */
#calendar_area { margin: 0 0 38px !important; }

#calendar_area .box_calendar {
  margin: 16px 0 0;
  padding: 24px;
  border: 1px solid var(--rf-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(68, 59, 51, .035);
}

#calendar_area :is(table, th, td) { border: 0; background: none; }
#calendar_area table { width: 100%; margin: 0; border-spacing: 0; }

#calendar_area .table_caltop { table-layout: fixed; }
#calendar_area .table_caltop td {
  padding: 0 0 18px;
  color: var(--rf-dark);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.5;
  vertical-align: middle;
  letter-spacing: .04em;
}

#calendar_area .table_caltop td:nth-child(1) { width: 25%; text-align: left; }
#calendar_area .table_caltop td:nth-child(2) { width: 50%; text-align: center; }
#calendar_area .table_caltop td:nth-child(3) { width: 25%; text-align: right; }

#calendar_area .table_caltop a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--rf-line);
  border-radius: 5px;
  color: var(--rf-dark);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-decoration: none;
}

#calendar_area .p_midasi_bottom {
  margin: 0 0 20px;
  color: var(--rf-muted);
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}

#calendar_area .p_midasi_bottom a { color: var(--rf-dark) !important; text-underline-offset: 3px; }

/* 09. 月表示を7列のグリッドにする
 * DOMは動かさず、開いたセルのみ display:contents で子をグリッドへ参加させる。
 * 時間表は order:2 で月の最終行より後へ。絶対配置・固定高さは使わない。
 */
#calendar_area .table_calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  padding: 0;
}

#calendar_area .table_calendar > tbody,
#calendar_area .table_calendar > tbody > tr {
  display: contents;
}

#calendar_area .table_calendar > tbody > tr > :is(th, td) {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
}

#calendar_area .table_calendar > tbody > tr > th {
  padding: 8px 0 12px;
  color: var(--rf-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
/* ========================================
   土日列の背景色
======================================== */

/* 日曜日：セルとgapを淡い赤で塗る */
#calendar_area .table_calendar > tbody > tr > th:first-child,
#calendar_area .table_calendar > tbody > tr > td:first-child {
  background-color: #fff3f1 !important;
  box-shadow: 0 0 0 3px #fff3f1;
}

/* 土曜日：セルとgapを淡い青で塗る */
#calendar_area .table_calendar > tbody > tr > th:last-child,
#calendar_area .table_calendar > tbody > tr > td:last-child {
  background-color: #f1f6fa !important;
  box-shadow: 0 0 0 3px #f1f6fa;
}

/* 日曜日の曜日・通常の日付 */
#calendar_area .table_calendar > tbody > tr > th:first-child,
#calendar_area .table_calendar > tbody > tr > td:first-child > p:first-child,
#calendar_area .table_calendar > tbody > tr > td:first-child > .btn-day > p:first-child {
  color: #b45c5c !important;
}

/* 土曜日の曜日・通常の日付 */
#calendar_area .table_calendar > tbody > tr > th:last-child,
#calendar_area .table_calendar > tbody > tr > td:last-child > p:first-child,
#calendar_area .table_calendar > tbody > tr > td:last-child > .btn-day > p:first-child {
  color: #527b9b !important;
}

#calendar_area .table_calendar > tbody > tr > td > p {
  margin: 0;
  padding: 0;
  color: #938b82;
  font-size: 17px;
  line-height: 24px;
}

/* 日付だけのセル。高さ指定を「満」の各段落に適用しない。 */
#calendar_area .table_calendar > tbody > tr > td:not(.batu) > p:only-child {
  min-height: var(--rf-day-height);
  padding: 10px 2px;
  border: 1px solid transparent;
}

/* 満席セル：日付＋「満」を、ボタン1個分の高さへ収める。 */
#calendar_area .table_calendar > tbody > tr > td.batu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: var(--rf-day-height);
  padding: 10px 2px;
  border: 1px solid #e8e2d9;
  border-radius: 7px;
  background: #f7f5f1;
}

#calendar_area .table_calendar > tbody > tr > td.batu > p + p {
  color: #b45c5c;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}

#calendar_area .table_calendar > tbody > tr > td.open { display: contents; }

/* 10. 日付ボタン：数字と記号を明示的に2段に配置 */
#calendar_area .btn-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: var(--rf-day-height);
  padding: 10px 2px;
  border: 1px solid #e7dfd3;
  border-radius: 7px;
  background: var(--rf-soft);
  color: var(--rf-dark);
  font-size: 17px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

#calendar_area .btn-day > br { display: none; }
#calendar_area .btn-day > p { margin: 0; padding: 0; max-width: none; overflow: visible; }

/* ○△はフォントで描かず固定比率の図形にする。文字の切れ・フォント未読込を解消。 */
#calendar_area .btn-day > .p_hantei {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--rf-accent);
  font-size: 0;
  line-height: 1;
}

#calendar_area .p_hantei > span { display: none; }
#calendar_area .p_hantei::before { content: ""; display: block; }
#calendar_area .maru .p_hantei::before { width: 14px; height: 14px; border: 1.6px solid currentColor; border-radius: 50%; }
#calendar_area .sankaku .p_hantei::before {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5L18 17H2Z' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5L18 17H2Z' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

#calendar_area .table_calendar > tbody > tr > td.open > .btn-day {
  border-color: var(--rf-dark);
  background: var(--rf-dark);
  color: #fff;
}

#calendar_area td.open > .btn-day > .p_hantei { color: #fff; }

/* 色だけに頼らない凡例。時間表より前に表示。 */
#calendar_area .table_calendar::after {
  content: "○  空きあり　　△  残りわずか";
  grid-column: 1 / -1;
  order: 1;
  padding-top: 12px;
  color: var(--rf-muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: right;
}

/* 11. 空き時間：カレンダー下の自然な高さの一覧 */
#calendar_area .table_hours {
  display: none;
  grid-column: 1 / -1;
  order: 2;
  min-width: 0;
  margin: 16px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rf-line);
  color: var(--rf-text);
}

#calendar_area td.open > .table_hours { display: block; }
#calendar_area .table_hours > tbody { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

#calendar_area .table_hours > tbody > tr {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #e8e2d9;
  border-radius: 6px;
  background: #f7f5f1;
  color: #867d72;
}

#calendar_area .table_hours > tbody > tr:first-child {
  grid-column: 1 / -1;
  justify-content: flex-start;
  min-height: 0;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--rf-dark);
}

#calendar_area .table_hours :is(th, td) {
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

#calendar_area .table_hours th[colspan] { font-size: 17px; font-weight: 600; letter-spacing: .04em; }
#calendar_area .table_hours th[colspan] br { display: none; }
#calendar_area .table_hours th[colspan]::after {
  content: "ご希望の時間をお選びください";
  display: block;
  margin-top: 4px;
  color: var(--rf-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}
#calendar_area .table_hours th[colspan]:focus-visible { outline: 2px solid var(--rf-accent); outline-offset: 4px; }
#calendar_area .table_hours td { text-align: center; }
#calendar_area .table_hours tr:has(> td.ok) { border-color: var(--rf-line); background: #fff; color: var(--rf-dark); }

#calendar_area .table_hours td.ok > a {
  display: grid;
  position: static;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--rf-accent);
  font-size: 0;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

/* リンク領域を時間枠全体へ広げる。既存の onclick="setYoyaku(...)" を使用。 */
#calendar_area .table_hours td.ok > a::before { content: ""; position: absolute; inset: 0; border-radius: 6px; }
#calendar_area .table_hours td.ok > a::after { content: ""; width: 13px; height: 13px; border: 1.6px solid currentColor; border-radius: 50%; }
#calendar_area .table_hours tr:focus-within { outline: 2px solid var(--rf-accent); outline-offset: 2px; }

/* 12. 送信ボタン */
#form_area .submit_area { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rf-line); text-align: center; }
#form_area .submit_area > .cf-turnstile { margin-bottom: 16px; }

#form_area .submit_area :is(input[type="button"], input[type="submit"], button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 360px);
  min-height: 58px;
  margin: 0;
  padding: 16px 28px;
  appearance: none;
  border: 1px solid var(--rf-dark);
  border-radius: 6px;
  background: var(--rf-dark);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .08em;
  box-shadow: 0 4px 12px rgba(68, 59, 51, .10);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}

#form_area .submit_area :is(input, button):disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* 13. キーボード・ホバー */
#form_area :is(a, input[type="button"], input[type="submit"], button):focus-visible {
  outline: 2px solid var(--rf-accent);
  outline-offset: 3px;
}

@media (hover: hover) {
  #form_area label:hover,
  #calendar_area .table_caltop a:hover { border-color: var(--rf-accent); background: var(--rf-soft); }
  #form_area #yoyaku_nitiji:hover { border-color: var(--rf-accent); }
  #calendar_area .btn-day:hover { border-color: var(--rf-accent); background: #eee7dc; }
  #calendar_area .table_hours tr:has(> td.ok):hover { border-color: var(--rf-accent); background: var(--rf-soft); }
  #form_area .submit_area :is(input[type="button"], input[type="submit"], button):not(:disabled):hover { border-color: #443626; background: #443626; }
}

/* 14. スマホ */
@media (max-width: 600px) {
  #form_area { --rf-day-height: 64px; margin: 28px auto; }
  #form_area dl { margin-bottom: 24px; }
  #form_area label { padding: 10px 12px; font-size: 15px; }
  #form_area .dd_soudan label { min-width: 100%; font-size: 14px; }
  #calendar_area .box_calendar { padding: 14px 10px 16px; border-radius: 9px; }
  #calendar_area .table_caltop td { font-size: 20px; }
  #calendar_area .table_caltop a { padding: 5px 7px; font-size: 12px; }
  #calendar_area .p_midasi_bottom { margin-bottom: 14px; font-size: 12px; }
  #calendar_area .table_calendar { gap: 4px; }
  #calendar_area .btn-day { padding: 7px 1px; gap: 3px; border-radius: 5px; font-size: 16px; }
  #calendar_area .table_calendar > tbody > tr > td > p { font-size: 16px; }
  #calendar_area .table_calendar > tbody > tr > td:not(.batu) > p:only-child { padding-top: 7px; }
  #calendar_area .table_calendar > tbody > tr > td.batu { padding: 7px 1px; gap: 3px; border-radius: 5px; }
  #calendar_area .table_hours > tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #calendar_area .table_hours > tbody > tr { padding: 9px 10px; }
  #form_area .submit_area :is(input[type="button"], input[type="submit"], button) { width: 100%; }
}

@media (max-width: 380px) {
  #calendar_area .box_calendar { padding-right: 7px; padding-left: 7px; }
  #calendar_area .table_calendar { gap: 3px; }
  #calendar_area .table_hours > tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  #form_area *, #form_area *::before, #form_area *::after { transition: none !important; }
}

/* 15. 既存の案内・送信完了表示 */
.p01 { margin: 20px 0; text-align: center; line-height: 1.9; }
.box_thanks { width: 90%; max-width: 720px; margin: 36px auto 56px; }
.box_thanks p { margin: 24px 0; line-height: 1.9; }
