
body.js-chat {
  --chat-page:#f1e9e0;
  --chat-paper:#fffdfa;
  --chat-ink:#33241f;
  --chat-line:#e5d9ce;
  --chat-thread:#f8f2e9;
  --chat-reply:#f0ddc9;
  margin:0;
  background:var(--chat-page);
  overflow:hidden;
}
body.js-chat > #top,
body.js-chat > footer,
body.js-chat > .head_announce,
body.js-chat > .footer_fix,
body.js-chat #main > .form_tit2,
body.js-chat #main > .form_intro,
body.js-chat .remaining { display:none !important; }
body.js-chat #main {
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  background:transparent;
}
#myform.js-chat {
  position:fixed;
  top:var(--chat-visible-top,0px);
  inset-inline:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr) auto;
  width:100%;
  max-width:640px;
  height:100vh;
  height:var(--chat-visible-height,100dvh);
  margin:0 auto;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:var(--chat-paper);
  color:var(--chat-ink);
  box-sizing:border-box;
}
#myform.js-chat *, #myform.js-chat *::before, #myform.js-chat *::after { box-sizing:border-box; }
#myform.js-chat .fstep,
#myform.js-chat [data-chat-q]:not(.is-asking),
#myform.js-chat .fstep_nav,
#myform.js-chat [hidden] { display:none !important; }

#chat_head {
  position:relative;
  z-index:2;
  background:var(--chat-paper);
}
.chat_header_line {
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px 8px;
  padding-top:max(9px,env(safe-area-inset-top));
}
.chat_exit {
  display:grid;
  place-items:center;
  min-width:44px;
  min-height:44px;
  border-radius:10px;
  color:var(--chat-ink);
  font:inherit;
  cursor:pointer;
}
.chat_exit { text-decoration:none; }
.chat_exit_icon { font-size:24px; line-height:1; }
.chat_title { flex:1; min-width:0; }
#chat_head .chat_tit {
  margin:0;
  color:var(--chat-ink);
  font-size:16px;
  font-weight:700;
  line-height:1.35;
}
#chat_head .chat_pct {
  margin:3px 0 0;
  color:#6d5549;
  font-size:11px;
  line-height:1.3;
}
.chat_contact { display:flex; flex:none; gap:5px; }
.chat_contact a {
  display:grid;
  place-items:center;
  min-width:44px;
  min-height:44px;
  padding:0 7px;
  border:1px solid #d9dee7;
  border-radius:8px;
  background:#fff;
  color:#2f3337;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
}
.chat_contact .chat_line {
  color:#087a3a;
  border-color:#06c75573;
}
.chat_bar { height:3px; background:var(--chat-line); }
.chat_bar i {
  display:block;
  height:100%;
  width:0;
  background:var(--fa-main);
  transition:width .2s ease;
}

#chat_log {
  min-width:0;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  overflow-anchor:none;
  padding:20px 14px 14px;
  background:var(--chat-thread);
}
#chat_log .head_announce { border-radius:10px; margin:0 0 12px; }
#chat_log .send_error { margin:0 0 12px; }
.chat_turn { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; margin:0 0 15px; }
.chat_row {
  display:flex;
  align-items:flex-start;
  gap:8px;
  animation:chat_message .18s ease-out both;
}
.chat_row.is-me { justify-content:flex-end; }
@keyframes chat_message {
  from { opacity:0; transform:translateY(5px); }
  to { opacity:1; transform:none; }
}
.chat_av {
  flex:0 0 32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#765346;
  color:#fff;
  font-size:15px;
  font-weight:700;
}
.chat_bubble {
  min-width:0;
  max-width:min(84%,calc(100% - 42px));
  padding:10px 13px;
  border:1px solid var(--chat-line);
  border-radius:4px 16px 16px 16px;
  background:var(--chat-paper);
  font-size:14px;
  line-height:1.65;
  white-space:pre-line;
  overflow-wrap:anywhere;
}
.chat_row.is-me .chat_bubble {
  border-color:#e6cbb2;
  border-radius:16px 4px 16px 16px;
  background:var(--chat-reply);
}
.chat_typing .chat_bubble {
  display:flex;
  align-items:center;
  gap:5px;
  min-height:40px;
}
.chat_typing_dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#765346;
  animation:chat_typing_pulse .55s ease-in-out infinite alternate;
}
.chat_typing_dot:nth-child(2) { animation-delay:.10s; }
.chat_typing_dot:nth-child(3) { animation-delay:.20s; }
@keyframes chat_typing_pulse {
  from { opacity:.45; transform:translateY(0); }
  to { opacity:1; transform:translateY(-3px); }
}
.chat_edit {
  display:block;
  min-height:36px;
  margin:-1px 0 0 auto;
  padding:0 8px;
  border:0;
  background:none;
  color:#705649;
  font:inherit;
  font-size:12px;
  text-decoration:underline;
  cursor:pointer;
}
.chat_plan_facts {
  display:grid;
  gap:4px;
  margin:8px 0 0;
  padding:8px 0 0;
  border-top:1px solid var(--chat-line);
  font-size:13px;
  white-space:normal;
}
.chat_plan_facts p { margin:0; }

.chat_composer_panel {
  position:relative;
  z-index:1;
  min-width:0;
}
.chat_composer {
  position:relative;
  max-height:62vh;
  max-height:calc(var(--chat-visible-height,100dvh) * .62);
  overflow:auto;
  scrollbar-width:none;
  overscroll-behavior:contain;
  padding:10px 13px max(12px,env(safe-area-inset-bottom));
  border-top:1px solid var(--chat-line);
  background:var(--chat-paper);
}
.chat_composer::-webkit-scrollbar { display:none; }
.chat_composer_scrollbar {
  position:absolute;
  inset:6px 3px 6px auto;
  width:5px;
  border-radius:4px;
  background:#e8ded5;
  pointer-events:none;
}
.chat_composer_scrollbar > span {
  display:block;
  width:100%;
  height:var(--chat-scroll-thumb-height);
  transform:translateY(var(--chat-scroll-thumb-top));
  border-radius:inherit;
  background:#8a7061;
}
.chat_fields { min-width:0; }
.chat_question_label {
  margin:0 0 7px;
  color:#705649;
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  overflow-wrap:anywhere;
}
#myform.js-chat .chat_composer [data-chat-q].is-asking {
  width:auto;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
}
#myform.js-chat .chat_composer .in_label label { padding:0; }
#myform.js-chat .chat_composer .form_block dd { min-width:0; }
#myform.js-chat .chat_composer .fgroup_lab,
#myform.js-chat .chat_composer [data-chat-q] > dt,
#myform.js-chat .chat_composer [data-chat-q] > label:only-child > dt,
#myform.js-chat .chat_composer .in_label:not([data-chat-sum]) > label > dt {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
#myform.js-chat .chat_composer [data-chat-q] .fnote { margin:0 0 8px; }
#myform.js-chat .chat_composer .fchoice { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin:0; }
#main #myform.js-chat .chat_composer .fchoice_item,
#main #myform.js-chat .chat_composer .fchoice_item:has(input:checked) {
  min-width:0;
  min-height:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
#main #myform.js-chat .chat_composer .fchoice_item::before,
#main #myform.js-chat .chat_composer .fchoice_item:has(input:checked)::before { content:none; }
#main #myform.js-chat .chat_composer .fchoice_item:has(input:focus-visible) { outline:none; }
#myform.js-chat .chat_composer .fchoice_item > span {
  display:flex;
  flex-direction:column;
  justify-content:center;
  width:100%;
  min-height:44px;
  padding:7px 8px;
  border:1px solid #9eb6eb;
  border-radius:14px;
  background:#f3f7ff;
  color:#204d9d;
  font-size:14px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
#myform.js-chat .chat_composer .fchoice_item:has(input:checked) > span {
  border-color:var(--fa-main);
  background:#dfebff;
  font-weight:700;
}
#myform.js-chat .chat_composer .fchoice_item:has(input:focus-visible) > span {
  outline:2px solid var(--fa-main);
  outline-offset:2px;
}
#myform.js-chat .chat_composer #lic_choice .fchoice_item > span { align-self:stretch; }
#myform.js-chat .chat_composer #lic_choice small { font-size:10px; }
#myform.js-chat .chat_composer .fsub { margin-top:8px; }
#myform.js-chat .chat_composer .fdate { margin:0; }
#myform.js-chat .chat_composer .fend .dl_form { margin:0 0 10px; }
#myform.js-chat .chat_composer .fend .cnt,
#myform.js-chat .chat_composer .fend .frecaptcha,
#myform.js-chat .chat_composer .fend .fcaution { margin-left:0; margin-right:0; }
#myform.js-chat .chat_composer #privacy_box { max-height:170px; overscroll-behavior:contain; }
#myform.js-chat .chat_composer .fend .form-btn-style-send { margin:0 0 10px; }
.chat_error {
  margin:0 0 8px;
  color:#a52520;
  font-size:13px;
  font-weight:600;
}
.chat_error:empty { display:none; }
.chat_actions { display:flex; gap:8px; margin-top:8px; }
.chat_composer_content > .chat_actions { flex-wrap:wrap; }
.chat_skip_row { flex-basis:100%; text-align:right; }
.chat_actions.has-inline-skip { flex-wrap:nowrap; }
.chat_actions.has-inline-skip .chat_send,
.chat_actions.has-inline-skip .chat_skip_row {
  flex:1 1 0;
  min-width:0;
}
.chat_actions.has-inline-skip .chat_skip_row { display:flex; }
.chat_actions.has-inline-skip .chat_skip {
  flex:1;
  min-width:0;
  padding-inline:4px;
  border-color:#d5c5b7;
  border-radius:14px;
  background:#fff;
  text-decoration:none;
}
.chat_actions.is-company .chat_company_choices { flex:1; min-width:0; }
.chat_actions.is-company .chat_send { flex-basis:100%; }
.chat_choice_set { display:grid; gap:7px; }
.chat_choice_set.is-region { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:767px) {
  .chat_choice_set.is-region .chat_choice:last-of-type { grid-column:1 / -1; }
}
.chat_choice_set.is-license { grid-template-columns:repeat(2,minmax(0,1fr)); }
.chat_choice_set.is-license .chat_choice_select,
.chat_choice_set.is-license .chat_choice:last-of-type { grid-column:1 / -1; }
.chat_choice {
  min-height:44px;
  padding:6px 4px;
  border:1px solid #9eb6eb;
  border-radius:14px;
  background:#f3f7ff;
  color:#204d9d;
  font:inherit;
  font-size:14px;
  line-height:1.35;
  cursor:pointer;
}
.chat_choice[aria-pressed="true"],
.chat_choice[aria-expanded="true"] {
  border-color:var(--fa-main);
  background:#dfebff;
  font-weight:700;
}
.chat_choice:disabled { opacity:.55; cursor:default; }
.chat_choice:focus-visible { outline:2px solid var(--fa-main); outline-offset:2px; }
.chat_choice_set .chat_choice_select { width:100%; }
#myform.js-chat #FormSchool > .chat_choice_select,
#myform.js-chat #FormSchool > .chat_choice_status { width:100%; margin:8px 0 0; }
#chat_address_toggle { width:100%; margin-top:8px; }
#chat_address_picker, .chat_address_fields { display:grid; gap:6px; }
#chat_address_picker { margin-top:8px; }
#chat_address_picker label,
#myform.js-chat #corp_body > label { display:block; font-size:13px; }
#myform.js-chat #corp_body > label { margin-bottom:6px; }
#chat_address_input_toggle { min-height:44px; justify-self:end; }
#myform.js-chat #FormArea.is-manual #zip_result { display:none; }
.chat_send, .chat_change_plan, .chat_accept_plan {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  flex:1;
  min-height:44px;
  padding:7px 12px;
  border:1px solid transparent;
  border-radius:14px;
  background:var(--fa-main);
  color:#fff;
  font:inherit;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.chat_change_plan {
  background:var(--chat-paper);
  border-color:#9eb6eb;
  color:#204d9d;
}
.chat_send:disabled { opacity:.5; cursor:default; }
.chat_back, .chat_skip {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
  min-width:44px;
  min-height:44px;
  padding:0 12px;
  border:1px solid transparent;
  background:none;
  color:#705649;
  font:inherit;
  font-size:12px;
  cursor:pointer;
}
.chat_back { border-color:#d5c5b7; border-radius:10px; }
.chat_skip { text-decoration:underline; }
.chat_required {
  margin-left:6px;
  color:var(--fa-err);
  font-size:11px;
  font-weight:600;
  letter-spacing:.04em;
  vertical-align:.05em;
  white-space:nowrap;
}
#myform.js-chat .chat_composer .formError { display:none; }
#myform.js-chat .chat_composer .fgroup_lab { position:static; width:auto; height:auto; clip-path:none; margin:0 0 6px; white-space:normal; }
#myform.js-chat .chat_composer .fgroup_lab:not(:has(.fnote)) { display:none; }
#myform.js-chat .chat_composer .fgroup_lab:has(.fnote) { font-size:0; }
#myform.js-chat .chat_composer .fgroup_lab:has(.fnote)::after { display:none; }
#myform.js-chat .chat_composer .fgroup_lab .fnote { font-size:12px; }
#myform.js-chat .chat_composer.is-text input:not([type="hidden"]),
#myform.js-chat .chat_composer.is-text textarea {
  min-height:44px;
  border-radius:18px;
  font-size:16px;
}
#myform.js-chat .chat_composer :is(input:not([type="radio"], [type="checkbox"], [type="hidden"]), textarea) {
  font-size:16px;
}
#myform.js-chat .chat_composer.is-text textarea { height:72px; resize:vertical; }
#myform.js-chat .chat_back:focus-visible,
#myform.js-chat .chat_skip:focus-visible,
#myform.js-chat .chat_send:focus-visible,
#myform.js-chat .chat_edit:focus-visible,
#myform.js-chat .chat_exit:focus-visible,
#myform.js-chat .chat_contact a:focus-visible {
  outline:2px solid var(--fa-main);
  outline-offset:2px;
}

@media (min-width:720px) and (min-height:540px) {
  body.js-chat #main { padding:20px 0; }
  #myform.js-chat {
    top:calc(var(--chat-visible-top,0px) + 20px);
    height:calc(100vh - 40px);
    height:calc(var(--chat-visible-height,100dvh) - 40px);
    border:1px solid var(--chat-line);
    border-radius:20px;
    box-shadow:0 14px 42px #51322226;
  }
}
@media (prefers-reduced-motion:reduce) {
  .chat_row, .chat_typing_dot { animation:none; }
  .chat_bar i { transition:none; }
}

/* Next reservation adapter; the chat shell above is reused from Takumi. */
body.js-chat #globalNav,body.js-chat .reserve-steps {display:none!important}
body.js-chat .site-header,body.js-chat .site-footer,body.js-chat .guide-page-header,body.js-chat .guide-breadcrumb,body.js-chat .fixed-actions {display:none!important}
#myform.js-chat {z-index:1000; box-shadow:0 0 50px #33241f15}
#myform.js-chat .chat_composer dl.dl_form {display:block;border:0;padding:0;margin:0;background:transparent}
#myform.js-chat .chat_composer dl.dl_form > dd {float:none;width:100%;padding:6px 0;margin:0;border:0;background:transparent}
#myform.js-chat .chat_composer input,#myform.js-chat .chat_composer select,#myform.js-chat .chat_composer textarea {max-width:100%;font-size:16px}
#myform.js-chat .chat_composer .radio_box {display:flex;flex-wrap:wrap;gap:8px}
#myform.js-chat .chat_composer .radio_box > div {border:1px solid #e5d9ce;border-radius:10px;padding:10px;background:white}
#myform.js-chat .chat_actions button {border-radius:9px;padding:12px 18px;font-size:14px;cursor:pointer}
#myform.js-chat .chat_actions .chat_send {background:#77543e;color:white;border:0}
#myform.js-chat .chat_composer [hidden] {display:none!important}

/* Cool palette and precise Takumi edit-link styling, overriding shared buttons. */
body.js-chat {--chat-page:#eaf0f5;--chat-paper:#fcfeff;--chat-ink:#22394a;--chat-line:#d3e1ea;--chat-thread:#f0f6fa;--chat-reply:#dceef7}
#myform.js-chat .chat_bar i {background:#3784aa}
#myform.js-chat .chat_av {background:#377897;color:white}
#myform.js-chat .chat_actions .chat_send {background:#246e94;color:white}
#myform.js-chat .chat_actions .chat_back,#myform.js-chat .chat_actions .chat_skip {color:#3c6278;border-color:#c6dbe7;background:#f3f8fb}
#myform.js-chat .chat_required {color:#286b91;background:#e0eff8}
#myform.js-chat .chat_edit {display:block;width:auto;min-height:36px;margin:-1px 0 0 auto;padding:0 8px;border:0;border-radius:0;box-shadow:none;background:none;color:#476c83;font:inherit;font-size:12px;font-weight:400;text-decoration:underline;cursor:pointer}
#myform.js-chat .chat_question_label {color:#476c83}
#myform.js-chat .chat_composer [data-chat-notice] > p {display:none}
#myform.js-chat .chat-yesno {display:grid;grid-template-columns:1fr 1fr;gap:10px}
#myform.js-chat .chat-yesno label {display:flex;gap:8px;align-items:center;padding:14px;border:1px solid var(--chat-line);border-radius:9px;background:#f0f7fb}
/* Match local Takumi choice layouts and font sizes, with Next cool colors. */
body.js-chat {--fa-main:#276e94}
#myform.js-chat .chat_choice_set .chat_choice {font:inherit;font-size:14px;min-height:44px;padding:6px 4px;border:1px solid #9bb9cc;border-radius:14px;background:#f1f7fb;color:#28536d;box-shadow:none}
#myform.js-chat .chat_choice[aria-pressed=true] {background:#dceef7;border-color:#3784aa}
#myform.js-chat .chat_choice_set.is-region .chat_choice:last-of-type {grid-column:auto}
#myform.js-chat .chat_choice_select {margin-top:8px;width:100%}
#myform.js-chat .fchoice {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0}
#myform.js-chat .fchoice_item {display:flex;position:relative;margin:0;padding:0;border:0;background:transparent;min-width:0;font-size:14px}
#myform.js-chat .fchoice_item > input {position:absolute;opacity:0;width:1px;height:1px;min-height:0}
#myform.js-chat .fchoice_item > span {display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;padding:10px 8px;min-height:48px;border:1px solid #a9c5d7;border-radius:14px;background:#f3f8fc;color:#28536d;line-height:1.4;text-align:center}
#myform.js-chat .fchoice_item:has(input:checked)>span {background:#dceef7;border-color:#3784aa;font-weight:700}
#myform.js-chat .fchoice_item:has(input:focus-visible)>span {outline:2px solid #3784aa;outline-offset:2px}
#myform.js-chat .fchoice_item small {font-size:10px}
#myform.js-chat .fsub {margin-top:8px;font-size:12px;line-height:1.5}
#myform.js-chat .chat-name-grid {display:grid;grid-template-columns:1fr 1fr;gap:10px}
#myform.js-chat .chat-name-grid label {display:block;min-width:0;font-size:13px}
#myform.js-chat .chat-name-grid input {width:100%;margin-top:5px}
#myform.js-chat .chat_company_choices {min-width:0;flex:1}
#myform.js-chat .chat_actions.has-inline-skip {display:flex;flex-wrap:nowrap;align-items:stretch}
#myform.js-chat .chat_actions.has-inline-skip .chat_send,#myform.js-chat .chat_actions.has-inline-skip .chat_skip_row {flex:1 1 0;min-width:0}
#myform.js-chat .chat_actions.has-inline-skip .chat_skip_row {display:flex}
#myform.js-chat .chat_actions button {font-size:14px;line-height:1.35;padding:7px 10px;min-height:44px}
#myform.js-chat .chat_actions .chat_skip {flex:1;border:1px solid #bbcedb;border-radius:14px;background:white;text-decoration:none}
#myform.js-chat .chat_row.is-me .chat_bubble,#myform.js-chat .chat_composer .radio_box>div {border-color:#c5dbe7}
#myform.js-chat button,#myform.js-chat input[type=submit],#myform.js-chat .form-btn-style-send {box-shadow:0 2px 4px #00000012!important}
#myform.js-chat .chat_edit {box-shadow:none!important}
#myform.js-chat .chat_composer .check_form dd,#myform.js-chat .chat_composer .dl_form dd {font-size:13px;line-height:1.5}
#myform.js-chat .chat_composer .dl_form dd input[type=text],#myform.js-chat .chat_composer .dl_form dd input[type=tel] {min-height:40px;padding:8px}
#myform.js-chat .chat_composer .dl_form dd p {margin:5px 0;font-size:12px}
#myform.js-chat .chat_composer .dl_form dd select {min-height:40px;padding:7px}
#myform.js-chat .chat_composer .dl_form dd :is(.period,.period_box) {display:flex;flex-wrap:wrap;gap:5px}

#myform.js-chat :is(input,select,textarea,.chat_bubble,.radio_box>div,.fsub_panel,.chat_skip,.chat_back) {border-color:#c3d8e5}
#myform.js-chat .chat-period-choice {display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:10px 12px!important;border:1px solid #adc9da;border-radius:12px;background:#f1f7fb;font-size:13px}
#myform.js-chat .chat-period-choice:has(input:checked) {border-color:#3784aa;background:#dceef7}
#myform.js-chat #stop_license_item4 {display:flex;gap:5px;flex-wrap:wrap}
#myform.js-chat #stop_license_item4[hidden] {display:none!important}
#myform.js-chat .chat-period-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px 0}
#myform.js-chat .chat-period-options .chat-period-choice {display:flex!important;min-width:0;margin:0!important;padding:10px 8px!important}
#myform.js-chat .chat-period-options .chat-period-choice label {flex:1;min-width:0;font-size:13px;line-height:1.5;cursor:pointer}

/* Native shell: these values no longer depend on the ordinary site's layout. */
body.chat-reserve-layout {font-family:Arial,"Noto Sans JP","Meiryo",sans-serif;font-size:14px;line-height:1.6;color:var(--chat-ink)}
body.chat-reserve-layout .reserve-form {margin:0}
#myform.js-chat .chat_composer {font-size:14px;line-height:1.6}
#myform.js-chat input,#myform.js-chat select,#myform.js-chat textarea {font-family:inherit;box-sizing:border-box}
#chat_boot_status {margin:10px 0;color:#476c83;font-size:13px}
#myform.js-chat .entry-form-error {margin:10px;padding:12px;border:1px solid #c35b5b;border-radius:10px;color:#923c3c;background:#fff5f5}
