/*
 * 宴会の達人 ご予約フォーム用の追加CSS（UTF-8）
 * ../CSS/c-style.css の末尾に追記してください。
 * 入力・確認画面のメイン領域と、入力画面の日程カレンダーが対象です。
 */

main:has(> #container_form :is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) {
  padding-block-end: clamp(24px, 4vw, 36px);
  background-color: #f6f7f8;
}

main:has(> #container_form :is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) + br {
  display: none;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])),
body:has(#form_1 .datepicker-cal) #ui-datepicker-div {
  --reserve-pink: #d94f68;
  --reserve-pink-fill: #f794a6;
  --reserve-pink-line: #edc0ca;
  --reserve-tint: #fff1f4;
  --reserve-ink: #26252b;
  --reserve-muted: #5e5b65;
  --reserve-line: #e3e5e9;
  --reserve-control: #94949e;
  --reserve-soft: #f6f7f9;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) {
  --reserve-radius: 12px;
  --reserve-action: #e02078;
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-width: 744px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 22px) 0 0;
  color: var(--reserve-ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.6;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .timeline-wrap {
  width: 100%;
  max-width: none;
  margin: 0 0 20px;
  padding: 0;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .timeline-003 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid var(--reserve-line);
  border-radius: 10px;
  background: #fff;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .timeline-003 li {
  position: relative;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--reserve-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .timeline-003 li::before,
#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .timeline-003 li::after {
  content: none;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .timeline-003 li.current {
  color: var(--reserve-ink);
  font-weight: 700;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .timeline-003 li.current::after {
  position: absolute;
  inset: auto 0 2px;
  width: 32px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--reserve-action);
  content: "";
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.content_sec, .customer_sec) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0 0 16px;
  padding: clamp(14px, 4vw, 30px);
  border: 1px solid var(--reserve-line);
  border-top: 3px solid var(--reserve-pink);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(38 37 43 / 5%);
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.content_sec, .customer_sec) .r-mi {
  margin: 0;
  padding: 0 0 13px;
  border: 0;
  border-bottom: 1px solid var(--reserve-line);
  background: transparent;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .r-mi h2 {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--reserve-ink);
  font-size: clamp(20px, 4.5vw, 24px);
  font-weight: 800;
  line-height: 1.45;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.content_sec, .customer_sec) :is(.r-ko, .r-kose) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid var(--reserve-line);
  background: transparent;
}

#container_form:has(#form_1) :is(#form_1, .customer_sec) > :is(.r-ko, .r-kose):last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

#container_form:has(#form_1) :is(#form_1, .customer_sec) > br {
  display: none;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.r-ko1, .r-ko3) {
  box-sizing: border-box;
  float: none;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .r-ko1 {
  margin-bottom: 8px;
  color: var(--reserve-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#container_form:has(#form_1) :is(.r-hisu, .reserve-required) {
  display: inline-block;
  margin-inline: 7px 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--reserve-tint);
  color: var(--reserve-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 1px;
}

#container_form:has(#form_1) .r-ko3 :is(input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  height: auto;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--reserve-control);
  border-radius: var(--reserve-radius);
  background-color: #fff;
  box-shadow: none;
  color: var(--reserve-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}

#container_form:has(#form_1) .r-ko3 :is(input, textarea)::placeholder {
  color: var(--reserve-muted);
  opacity: 1;
}

#container_form:has(#form_1) .r-ko3:has(> textarea:not([readonly][name="fm[plan1]"])) {
  padding-block: 4px;
}

#container_form:has(#form_1) .r-ko3 > textarea[name] {
  display: block;
  min-height: 104px;
  margin-block-end: 8px;
  resize: vertical;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(input, textarea, select, button, a):focus-visible {
  outline: 2px solid var(--reserve-pink);
  outline-offset: 3px;
}

#container_form:has(#form_1) .r-ko3 :is(input, textarea, select):focus {
  border-color: var(--reserve-pink);
}

#container_form:has(#form_1) .r-ko3 :is(input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"]),
#container_form:has(#form_1) :is(.r-ko, .r-kose):has(.err-txt:not(:empty)) :is(.datepicker-cal, .people-counter-input, input:not([type]), input[type="email"], input[type="tel"], textarea, select, .radio-row) {
  border-color: var(--reserve-pink);
}

#container_form:has(#form_1) .r-ko3 .datepicker-cal[readonly] {
  padding-inline: 12px 43px;
  border-color: var(--reserve-pink);
  background-color: var(--reserve-tint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d94f68' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M7 3v4m10-4v4M3 10h18m-13 5h3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 21px;
  font-weight: 600;
  cursor: pointer;
}

#container_form:has(#form_1) .r-ko3 .datepicker-cal::placeholder {
  font-size: 14px;
}

#container_form:has(#form_1) .r-ko:has(.err-txt:not(:empty)) .r-ko3 .datepicker-cal[readonly],
#container_form:has(#form_1) .r-ko3 .datepicker-cal[aria-invalid="true"] {
  border-color: var(--reserve-pink);
}

#container_form:has(#form_1) .r-ko3:has(.textbox-2[readonly]) > br,
#container_form:has(#form_1) .r-ko3 > input[name^="fm[hotel"] + br:has(+ :is(input, textarea)[name^="fm[plan"]),
#container_form:has(#form_1) .r-ko3 > br:has(+ .come-txt:empty),
#container_form:has(#form_1) .come-txt:empty {
  display: none;
}

#container_form:has(#form_1) .r-ko3 .textbox-2[readonly] {
  display: block;
  padding-block: 8px;
  border-color: var(--reserve-line);
  background: var(--reserve-soft);
  cursor: text;
}

#container_form:has(#form_1) .r-ko3 > input[name^="fm[hotel"] + br + :is(input, textarea)[name^="fm[plan"] {
  display: block;
  margin-top: 8px;
}

/* プラン名は折り返し、対応ブラウザーでは内容に合わせて高さを広げます。 */
#container_form:has(#form_1) .r-ko3 > textarea[readonly][name="fm[plan1]"] {
  field-sizing: content;
  min-height: 48px;
  margin-block-end: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#container_form:has(#form_1) .r-ko3 .textbox-2[readonly][name="fm[hotel1]"] {
  font-weight: 700;
}

#container_form:has(#form_1) .r-ko3 .selectbox-3 {
  display: inline-block;
  width: min(100%, 260px);
  max-width: 100%;
  margin: 0;
  vertical-align: top;
}

#container_form:has(#form_1) .r-ko3 .selectbox-3 select {
  appearance: auto;
  padding-inline-end: 9px;
  cursor: pointer;
}

#container_form:has(#form_1) .r-ko3 select[name="fm[charge_no1]"] {
  margin-block: 8px;
}

#container_form:has(#form_1) .r-ko3 .selectbox-3::before,
#container_form:has(#form_1) .r-ko3 .selectbox-3::after {
  content: none;
}

#container_form:has(#form_1) .guest-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}

#container_form:has(#form_1) .guest-counter .people-counter-button {
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--reserve-control);
  border-radius: var(--reserve-radius);
  background: var(--reserve-soft);
  color: var(--reserve-ink);
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
}

#container_form:has(#form_1) .guest-counter :is(.people-counter-input, .selectbox-3) {
  width: 88px;
  min-width: 0;
}

#container_form:has(#form_1) .guest-counter .people-counter-input {
  appearance: textfield;
  height: 48px;
  padding: 0 5px;
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#container_form:has(#form_1) .people-counter-input::-webkit-inner-spin-button,
#container_form:has(#form_1) .people-counter-input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

#container_form:has(#form_1) .guest-counter:has(.people-counter-input:invalid) .people-counter-input {
  border-color: var(--reserve-pink);
}

#container_form:has(#form_1) .rad-txt:has(> .radio-row) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

#container_form:has(#form_1) :is(.radio-row, .reserve-radio-list > label) {
  position: relative;
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--reserve-control);
  border-radius: 10px;
  background: #fff;
  color: var(--reserve-ink);
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  vertical-align: top;
  overflow-wrap: anywhere;
}

#container_form:has(#form_1) .r-kose > .radio-row {
  margin: 0 4px 8px 0;
}

#container_form:has(#form_1) :is(.radio-row, .reserve-radio-list > label) > input[type="radio"] {
  appearance: none;
  box-sizing: border-box;
  display: inline-block;
  position: static;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--reserve-control);
  border-radius: 50%;
  background: #fff;
  opacity: 1;
  clip-path: none;
}

#container_form:has(#form_1) :is(.radio-row, .reserve-radio-list > label) > input[type="radio"]:checked {
  border-color: var(--reserve-pink);
  background: radial-gradient(circle, var(--reserve-pink) 0 4px, #fff 4.5px);
}

@media (forced-colors: active) {
  #container_form:has(#form_1) :is(.radio-row, .reserve-radio-list > label) > input[type="radio"] {
    appearance: auto;
  }
}

#container_form:has(#form_1) .radio-row > span {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow-wrap: anywhere;
}

#container_form:has(#form_1) .radio-row > span::before,
#container_form:has(#form_1) .radio-row > span::after {
  content: none;
}

#container_form:has(#form_1) :is(.radio-row, .reserve-radio-list > label):has(> input:checked) {
  border-color: var(--reserve-pink);
  background: var(--reserve-tint);
  color: var(--reserve-ink);
}

#container_form:has(#form_1) :is(.radio-row, .reserve-radio-list > label):has(> input:focus-visible) {
  outline: 2px solid var(--reserve-pink);
  outline-offset: 2px;
}

/* 予約・見積もり両方で、選べるサービスの行だけを囲みます。 */
#container_form:has(#form_1) .r-kose:has(
  > .radio-row > input[type="radio"][name="fm[org_service]"],
  > .r-ko3 > .rad-txt > .radio-row > input[type="radio"][name="fm[org_service]"]
) {
  margin-block: 14px 0;
  padding: 12px;
  border: 1px solid var(--reserve-pink-line);
  border-radius: 10px;
  background: var(--reserve-tint);
}

#container_form:has(#form_1) .radio-row:has(> input[name="fm[org_service]"]:not(:checked)) {
  border-color: var(--reserve-pink-line);
}

#container_form:has(#form_1) .radio-row:has(> input[name="fm[org_service]"]:checked) {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--reserve-pink);
}

/* 入力欄の間にある全角空白は、列幅の計算から除きます。 */
#container_form:has(#form_1) .r-ko3:has(> input:is(.name_kanji, .name_kana)) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  font-size: 0;
  line-height: 0;
}

#container_form:has(#form_1) .r-ko3:has(> input:is(.name_kanji, .name_kana)) > * {
  grid-column: 1 / -1;
}

#container_form:has(#form_1) .r-ko3 > input:is(.name_kanji, .name_kana) {
  grid-row: 1;
  width: 100%;
  min-width: 0;
}

#container_form:has(#form_1) .r-ko3 > input:is(.name_kanji, .name_kana)[name$="_l]"] {
  grid-column: 1;
}

#container_form:has(#form_1) .r-ko3 > input:is(.name_kanji, .name_kana)[name$="_f]"] {
  grid-column: 2;
}

#container_form:has(#form_1) :is(.come-txt, .char-limit, .r-checkin-time) {
  color: var(--reserve-muted);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#container_form:has(#form_1) .come-txt:not(:empty) {
  margin-top: 6px;
}

#container_form:has(#form_1) .err-txt:not(:empty) {
  display: block;
  box-sizing: border-box;
  margin: 8px 0 0;
  padding: 7px 10px;
  border-inline-start: 3px solid var(--reserve-pink);
  border-radius: 4px;
  background: #fff0f1;
  color: var(--reserve-ink);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ゴルフオプション */
#container_form:has(#form_1) .reserve-golf-accordion {
  margin: 16px 0 0;
  border: 1px solid var(--reserve-pink-line);
  border-radius: var(--reserve-radius);
  background: #fff;
}

#container_form:has(#form_1) .reserve-golf-btn {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: clamp(12px, 3vw, 18px);
  border: 0;
  border-radius: var(--reserve-radius);
  background: var(--reserve-tint);
  color: var(--reserve-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
  touch-action: manipulation;
}

#container_form:has(#form_1) .reserve-golf-accordion.active .reserve-golf-btn {
  border-radius: var(--reserve-radius) var(--reserve-radius) 0 0;
}

#container_form:has(#form_1) .reserve-golf-title {
  display: block;
  color: var(--reserve-ink);
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

#container_form:has(#form_1) .reserve-golf-copy {
  display: block;
  margin-top: 4px;
  color: var(--reserve-muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#container_form:has(#form_1) .reserve-golf-icon {
  box-sizing: border-box;
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--reserve-pink);
  border-radius: 50%;
  background: #fff;
  color: var(--reserve-action);
}

#container_form:has(#form_1) .reserve-golf-icon::before {
  position: static;
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  content: "";
}

#container_form:has(#form_1) .reserve-golf-accordion.active .reserve-golf-icon::before {
  transform: translateY(2px) rotate(225deg);
}

#container_form:has(#form_1) .reserve-golf-content {
  padding: 0 clamp(12px, 3vw, 18px);
}

#container_form:has(#form_1) .reserve-golf-content .reserve-form-section {
  padding-block: 14px;
  border-bottom: 1px solid var(--reserve-line);
}

#container_form:has(#form_1) .reserve-golf-content .reserve-form-section:last-child {
  border-bottom: 0;
}

#container_form:has(#form_1) .reserve-golf-content .reserve-form-title {
  margin-bottom: 8px;
  color: var(--reserve-ink);
  font-size: 16px;
  font-weight: 700;
}

#container_form:has(#form_1) .reserve-radio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#container_form:has(#form_1) .reserve-number-input[type="text"] {
  box-sizing: border-box;
  width: 88px !important; /* HTML内の60px !importantを上書きします。 */
  height: 48px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--reserve-control);
  border-radius: var(--reserve-radius);
  background: #fff;
  color: var(--reserve-ink);
  font: inherit;
  font-size: 16px;
  text-align: center;
}

#container_form:has(#form_1) .rad-txt2,
#container_form:has(#form_1) .rad-txt2 > .c {
  text-decoration: none;
  border-bottom: 0;
  box-shadow: none;
}

#container_form:has(#form_1) .rad-txt2 > .c > a {
  border-bottom: 0;
  box-shadow: none;
  color: var(--reserve-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .button-wrap,
#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .button-wrap .sou-b {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .button-wrap input[type="submit"].b-border {
  appearance: none;
  box-sizing: border-box;
  width: min(100%, 440px);
  max-width: 100%;
  min-height: 56px;
  height: auto;
  margin: 0;
  padding: 12px 44px;
  border: 1px solid transparent;
  border-radius: var(--reserve-radius);
  background: var(--reserve-action) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6'/%3E%3C/svg%3E") no-repeat right 16px center / 20px;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.people-counter-button, .b-border):disabled {
  opacity: .55;
  cursor: default;
}

/* 確認画面 */
#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.content_sec, .customer_sec) > :is(.r-ko, .r-kose):has(> .confa-td) {
  display: grid;
  grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
  align-items: start;
  gap: 4px 16px;
  padding: 12px 0;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.content_sec, .customer_sec) > :is(.r-ko, .r-kose):has(> .confa-td):last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .r-ko1.confa-th {
  margin: 0;
  color: var(--reserve-muted);
  font-size: 14px;
  line-height: 1.65;
  text-align: start;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .r-ko3.confa-td {
  color: var(--reserve-ink);
  font-size: 16px;
  line-height: 1.65;
  text-align: start;
  overflow-wrap: anywhere;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .confa-td > br + br {
  display: none;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) > form[name="frm"][action$="reserve-form_3.php"] .button-wrap .sou-b {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  max-width: 540px;
  margin-inline: auto;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) > form[name="frm"][action$="reserve-form_3.php"] .button-wrap input:is(.b-border, .b-border2) {
  width: 100%;
  max-width: 100%;
}

#container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .button-wrap input[type="button"].b-border2 {
  appearance: none;
  box-sizing: border-box;
  min-height: 56px;
  height: auto;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--reserve-control);
  border-radius: var(--reserve-radius);
  background: #fff;
  color: var(--reserve-ink);
  font: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

/* jQuery UIの日程カレンダーはフォームの外に挿入されます。 */
body:has(#form_1 .datepicker-cal) #ui-datepicker-div {
  box-sizing: border-box;
  width: 380px;
  max-width: calc(100vw - 24px);
  padding: clamp(8px, 3vw, 14px);
  border: 1px solid var(--reserve-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 36px rgb(34 33 42 / 20%);
  color: var(--reserve-ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-header {
  position: relative;
  min-height: 44px;
  padding: 0 46px;
  border: 0;
  background: #fff;
  color: var(--reserve-ink);
  text-align: center;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 44px;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div :is(.ui-datepicker-prev, .ui-datepicker-next) {
  position: absolute;
  top: 1px;
  display: grid;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--reserve-control);
  border-radius: 10px;
  background: #fff;
  color: var(--reserve-ink);
  cursor: pointer;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-prev {
  right: auto;
  left: 0;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-next {
  right: 0;
  left: auto;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div :is(.ui-datepicker-prev, .ui-datepicker-next) > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div :is(.ui-datepicker-prev, .ui-datepicker-next)::after {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  content: "";
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-prev::after {
  transform: rotate(135deg);
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-next::after {
  transform: rotate(-45deg);
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-header .ui-state-disabled {
  opacity: .45;
  cursor: default;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar {
  width: 100%;
  margin: 8px 0 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 3px;
  table-layout: fixed;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar th {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--reserve-muted);
  font-size: 12px;
  text-align: center;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar td {
  padding: 0;
  border: 0;
  background: transparent;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar td > :is(a, span) {
  box-sizing: border-box;
  display: grid;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f5f6f8;
  color: var(--reserve-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-week-end:where(:nth-last-child(7)),
body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-week-end:where(:nth-last-child(7)) > a {
  color: var(--reserve-ink);
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-week-end:where(:last-child),
body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-week-end:where(:last-child) > a {
  color: #2054a7;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar td.ui-state-disabled {
  opacity: 1;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar td.ui-state-disabled > span {
  background: transparent;
  color: #918a94;
  font-weight: 400;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar td.ui-datepicker-today > a {
  border-color: var(--reserve-pink);
  background: var(--reserve-tint);
  color: var(--reserve-ink);
  font-weight: 700;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar td > a:hover {
  border-color: var(--reserve-pink);
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div .ui-datepicker-calendar td > a.ui-state-active {
  border-color: var(--reserve-pink);
  background: var(--reserve-pink-fill);
  color: var(--reserve-ink);
  font-weight: 700;
}

body:has(#form_1 .datepicker-cal) #ui-datepicker-div :is(a, button, select):focus-visible {
  outline: 2px solid var(--reserve-pink);
  outline-offset: 1px;
}

@media (hover: hover) {
  #container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .button-wrap input[type="button"].b-border2:hover:not(:disabled) {
    background: var(--reserve-tint);
    border-color: var(--reserve-pink);
    color: var(--reserve-ink);
  }

  #container_form:has(#form_1) :is(.radio-row, .reserve-radio-list > label, .guest-counter .people-counter-button):hover {
    border-color: var(--reserve-pink);
    background-color: var(--reserve-tint);
  }

  #container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .button-wrap input[type="submit"].b-border:hover:not(:disabled) {
    /* 既存のホバー指定より優先し、白地にピンクの文字を表示します。 */
    background: #fff !important;
    border-color: var(--reserve-action);
    color: var(--reserve-action) !important;
    -webkit-text-fill-color: currentColor !important;
  }
}

@media (max-width: 560px) {
  #container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) :is(.content_sec, .customer_sec) > :is(.r-ko, .r-kose):has(> .confa-td),
  #container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) > form[name="frm"][action$="reserve-form_3.php"] .button-wrap .sou-b {
    grid-template-columns: minmax(0, 1fr);
  }

  /* スマホ幅では、jQuery UIが指定する座標より画面中央を優先します。 */
  body:has(#form_1 .datepicker-cal) #ui-datepicker-div {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  /* スマホ幅では決済方法と選べるサービスを1行につき1項目にします。 */
  #container_form:has(#form_1) .radio-row:has(> input[type="radio"]:is([name="fm[settle]"], [name="fm[org_service]"])) {
    display: flex;
    width: 100%;
    margin-inline: 0;
  }

  #container_form:has(:is(#form_1, form[name="frm"][action$="reserve-form_3.php"])) .button-wrap input[type="submit"].b-border {
    width: 100%;
  }
}

@media (max-width: 380px) {
  /* 狭い画面では日程欄の案内文に横幅を確保します。 */
  #container_form:has(#form_1) .r-ko3 .datepicker-cal[readonly] {
    padding-inline: 9px;
    background-image: none;
  }
}

@media (max-width: 360px) {
  #container_form:has(#form_1) .r-ko3 .datepicker-cal::placeholder {
    font-size: 13px;
  }
}
