/* 광동병원 간편 예약 창 - 로그인 없이 진료·검진 예약
   기존 사이트 토큰(주황 #F37021, 글자 #111, 바탕 #f2f0ee, Pretendard)을 그대로 쓴다. */
.kdb {
  --kdb-accent: #F37021;
  --kdb-accent-press: #d95f14;
  --kdb-ink: #111111;
  --kdb-ink-2: #4b4b4b;
  --kdb-ink-3: #767676;
  --kdb-line: #e4e1dd;
  --kdb-soft: #f2f0ee;
  --kdb-surface: #ffffff;
  --kdb-error: #c7361c;
  --kdb-ok: #1f7a4d;
  --kdb-radius: 14px;
  --kdb-radius-sm: 10px;
  --kdb-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --kdb-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  position: fixed; inset: 0; z-index: 2147483000;
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "맑은 고딕", sans-serif;
  color: var(--kdb-ink); letter-spacing: -0.01em;
  visibility: hidden; pointer-events: none;
}
.kdb[data-open="true"] { visibility: visible; pointer-events: auto; }
.kdb *, .kdb *::before, .kdb *::after { box-sizing: border-box; }
.kdb [hidden] { display: none !important; }
.kdb__backdrop {
  position: absolute; inset: 0; background: rgb(17 17 17 / 0.48);
  opacity: 0; transition: opacity 200ms ease;
}
.kdb[data-open="true"] .kdb__backdrop { opacity: 1; }

.kdb__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  background: var(--kdb-surface); border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgb(60 40 20 / 0.16);
  transform: translateY(100%);
  transition: transform 420ms var(--kdb-ease-drawer);
  outline: none;
}
.kdb[data-open="true"] .kdb__panel { transform: translateY(0); }
.kdb[data-closing="true"] .kdb__panel { transition-duration: 220ms; }
.kdb[data-closing="true"] .kdb__backdrop { transition-duration: 160ms; }

@media (min-width: 768px) {
  .kdb__panel {
    left: auto; top: 16px; bottom: 16px; right: 16px; width: 440px; max-height: none;
    border-radius: 20px; box-shadow: 0 24px 64px rgb(60 40 20 / 0.22);
    transform: translateX(28px); opacity: 0;
    transition: transform 280ms var(--kdb-ease-out), opacity 200ms ease;
  }
  .kdb[data-open="true"] .kdb__panel { transform: translateX(0); opacity: 1; }
}

.kdb__grab { width: 40px; height: 4px; border-radius: 4px; background: #d6d2cd; margin: 10px auto 0; }
@media (min-width: 768px) { .kdb__grab { display: none; } }

.kdb__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; }
.kdb__title { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; }
.kdb__sub { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--kdb-ink-2); }
.kdb__x {
  flex: none; width: 40px; height: 40px; margin: -6px -8px 0 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--kdb-ink-2); cursor: pointer; display: grid; place-items: center;
  transition: background-color 160ms ease, transform 160ms var(--kdb-ease-out);
}
.kdb__x:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .kdb__x:hover { background: var(--kdb-soft); } }

.kdb__tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 14px 20px 0;
  padding: 4px; border-radius: 12px; background: var(--kdb-soft);
}
.kdb__tabs::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 9px; background: var(--kdb-surface); box-shadow: 0 1px 3px rgb(60 40 20 / 0.14);
  transform: translateX(var(--kdb-tab-x, 0%)); transition: transform 240ms var(--kdb-ease-out);
}
.kdb__tabs[data-active="checkup"] { --kdb-tab-x: 100%; }
.kdb__tab {
  position: relative; z-index: 1; height: 42px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--kdb-ink-3);
  transition: color 160ms ease;
}
.kdb__tab[aria-selected="true"] { color: var(--kdb-ink); }

.kdb__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 8px; -webkit-overflow-scrolling: touch; }
.kdb__form { display: grid; gap: 16px; }
.kdb__field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.kdb__label { font-size: 14px; font-weight: 600; color: var(--kdb-ink); padding: 0; }
.kdb__label small { font-weight: 400; color: var(--kdb-ink-3); margin-left: 4px; font-size: 13px; }
.kdb__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.kdb__input, .kdb__select, .kdb__textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--kdb-line);
  border-radius: var(--kdb-radius-sm); background: var(--kdb-surface); color: var(--kdb-ink);
  font: inherit; font-size: 16px; line-height: 1.4; appearance: none; -webkit-appearance: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.kdb__textarea { min-height: 84px; resize: vertical; }
.kdb__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23767676' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.kdb__input::placeholder, .kdb__textarea::placeholder { color: #8f8a85; }
.kdb__input:focus-visible, .kdb__select:focus-visible, .kdb__textarea:focus-visible {
  outline: none; border-color: var(--kdb-accent); box-shadow: 0 0 0 3px rgb(243 112 33 / 0.18);
}
.kdb__input[aria-invalid="true"], .kdb__select[aria-invalid="true"] { border-color: var(--kdb-error); }
.kdb__err { margin: 0; font-size: 13px; color: var(--kdb-error); min-height: 0; }
.kdb__err:empty { display: none; }
.kdb__help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--kdb-ink-3); }

.kdb__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kdb__chip { position: relative; }
.kdb__chip input { position: absolute; z-index: 1; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kdb__chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--kdb-line); background: var(--kdb-surface); font-size: 14px; font-weight: 500;
  color: var(--kdb-ink-2); cursor: pointer; user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms var(--kdb-ease-out);
}
.kdb__chip input:checked + span { background: #fff4ec; border-color: var(--kdb-accent); color: #b44a0c; font-weight: 600; }
.kdb__chip input:focus-visible + span { box-shadow: 0 0 0 3px rgb(243 112 33 / 0.22); }
.kdb__chip input:active + span { transform: scale(0.97); }

.kdb__agree { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--kdb-radius-sm); background: var(--kdb-soft); }
.kdb__check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.kdb__check input { width: 20px; height: 20px; margin: 0; accent-color: var(--kdb-accent); flex: none; }
.kdb__more { border: 0; background: none; padding: 0; margin-left: auto; font: inherit; font-size: 13px; color: var(--kdb-ink-3); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.kdb__terms { margin: 0; max-height: 140px; overflow: auto; font-size: 12px; line-height: 1.6; color: var(--kdb-ink-2); white-space: pre-line; }
.kdb__terms[hidden] { display: none; }

.kdb__foot { padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid #efedea; background: var(--kdb-surface); border-radius: 0 0 20px 20px; }
.kdb__submit {
  position: relative; width: 100%; height: 54px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--kdb-accent); color: #fff; font: inherit; font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  transition: transform 160ms var(--kdb-ease-out), background-color 160ms ease;
}
.kdb__submit:active { transform: scale(0.97); background: var(--kdb-accent-press); }
.kdb__submit:focus-visible { outline: 3px solid rgb(243 112 33 / 0.4); outline-offset: 2px; }
.kdb__submit[aria-busy="true"] { pointer-events: none; }
.kdb__submit[aria-busy="true"] .kdb__submit-label { filter: blur(2px); opacity: 0.6; }
.kdb__submit-label { transition: filter 200ms ease, opacity 200ms ease; }
.kdb__spin {
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2.5px solid rgb(255 255 255 / 0.4); border-top-color: #fff; border-radius: 50%;
  opacity: 0; animation: kdb-spin 600ms linear infinite; transition: opacity 160ms ease;
}
.kdb__submit[aria-busy="true"] .kdb__spin { opacity: 1; }
@keyframes kdb-spin { to { transform: rotate(360deg); } }
.kdb__note { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--kdb-ink-3); }

.kdb__alt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.kdb__alt a {
  display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: var(--kdb-radius-sm);
  background: var(--kdb-soft); color: var(--kdb-ink); text-decoration: none; font-size: 13px; font-weight: 600;
  transition: transform 160ms var(--kdb-ease-out), background-color 160ms ease;
}
.kdb__alt a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .kdb__alt a:hover { background: #ebe7e2; } }
.kdb__alt svg { width: 22px; height: 22px; }
.kdb__alt-title { margin: 6px 0 0; font-size: 13px; color: var(--kdb-ink-3); text-align: center; }
.kdb__member { display: block; margin: 12px 0 4px; text-align: center; font-size: 12.5px; color: var(--kdb-ink-3); }
.kdb__member a { color: inherit; }

.kdb__alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--kdb-radius-sm); background: #fdf0ed; color: #8a2a17; font-size: 14px; line-height: 1.5; }
.kdb__alert[hidden] { display: none; }
.kdb__alert a { color: inherit; font-weight: 700; }

.kdb__done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 8px 12px; }
.kdb__done[hidden] { display: none; }
.kdb__done-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fff4ec; color: var(--kdb-accent);
  animation: kdb-pop 420ms var(--kdb-ease-out) both;
}
.kdb__done h3 { margin: 6px 0 0; font-size: 20px; font-weight: 700; }
.kdb__done p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--kdb-ink-2); }
.kdb__summary { width: 100%; margin: 8px 0 0; padding: 14px 16px; border-radius: var(--kdb-radius-sm); background: var(--kdb-soft); text-align: left; font-size: 14px; line-height: 1.7; }
.kdb__summary dt { color: var(--kdb-ink-3); float: left; width: 72px; }
.kdb__summary dd { margin: 0 0 0 72px; font-weight: 600; }
@keyframes kdb-pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.kdb__pane[hidden] { display: none; }

/* 회원가입·로그인 유도 숨김 (예약은 로그인 없이) */
#header .login-area > a[href*="/member/"], #header .login-area > p, .login-wrap > a[href*="/member/"] { display: none !important; }

/* 예약 페이지 안내 띠 */
.kdb-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1200px; margin: 24px auto; padding: 18px 22px; border-radius: 16px; background: #fff4ec; border: 1px solid #f9d2b8;
  font-family: "Pretendard Variable", Pretendard, sans-serif; color: #111;
}
.kdb-banner strong { font-size: 17px; }
.kdb-banner p { margin: 4px 0 0; font-size: 14px; color: #4b4b4b; }
.kdb-banner button {
  height: 46px; padding: 0 22px; border: 0; border-radius: 10px; background: #F37021; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.kdb-banner button:active { transform: scale(0.97); }
@media (max-width: 767px) { .kdb-banner { margin: 16px; } .kdb-banner button { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .kdb__panel, .kdb[data-open="true"] .kdb__panel { transform: none !important; transition: opacity 200ms ease; }
  .kdb__panel { opacity: 0; }
  .kdb[data-open="true"] .kdb__panel { opacity: 1; }
  .kdb__tabs::before, .kdb__done-icon { transition: none; animation: none; }
}

/* 언어 선택 (ekwangdong.com 외국어 사이트와 같은 구성) */
.kdl-wrap { z-index: 50; }
.kdl { position: relative; font-family: "Pretendard Variable", Pretendard, sans-serif; letter-spacing: -0.01em; }
.kdl summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px;
  border: 1px solid rgb(255 255 255 / 0.38); border-radius: 999px; color: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; white-space: nowrap; user-select: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.kdl summary::-webkit-details-marker { display: none; }
.kdl summary:active { transform: scale(0.97); }
.kdl summary:focus-visible { outline: 2px solid #F37021; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .kdl summary:hover { background: rgb(255 255 255 / 0.1); border-color: #fff; } }
.kdl[open] summary { border-color: #fff; }
.kdl svg { fill: currentColor; flex: none; }
.kdl-g { width: 18px; height: 18px; }
.kdl-v { width: 12px; height: 12px; transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1); }
.kdl[open] .kdl-v { transform: rotate(180deg); }
.kdl-m {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000; display: grid; gap: 2px; min-width: 232px; padding: 6px;
  background: #fff; border: 1px solid rgb(17 17 17 / 0.1); border-radius: 14px; box-shadow: 0 18px 44px rgb(40 24 12 / 0.18);
  transform-origin: top right;
}
.kdl[open] .kdl-m { animation: kdl-in 180ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes kdl-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.kdl-m a {
  display: grid; grid-template-columns: 26px 1fr 18px; align-items: center; column-gap: 12px; padding: 9px 12px; border-radius: 9px;
  color: #111 !important; text-decoration: none; transition: background-color 120ms ease;
}
.kdl-m b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.kdl-f { grid-row: 1 / 3; grid-column: 1; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(17 17 17 / 0.12); object-fit: cover; }
.kdl-m b { grid-column: 2; }
.kdl-m small { grid-column: 2; font-size: 12px; color: #767676; line-height: 1.3; }
.kdl-m a[aria-current] { background: #fff4ec; }
.kdl-m a[aria-current] b { color: #b44a0c; }
.kdl-k { grid-row: 1 / 3; grid-column: 3; width: 16px; height: 16px; fill: #F37021 !important; }
@media (hover: hover) and (pointer: fine) { .kdl-m a:hover { background: #f4f1ec; } }
.kdl-m a:focus-visible { outline: 2px solid #F37021; outline-offset: -2px; }
#header .mobile-header .kdl-wrap { min-width: 0; }
#header .mobile-header .kdl summary { height: 32px; padding: 0 10px 0 8px; font-size: 13px; }
@media (max-width: 1199px) { .kdl-m { position: fixed; left: 16px; right: 16px; top: var(--kdl-top, 64px); min-width: 0; transform-origin: top center; } }
@media (prefers-reduced-motion: reduce) { .kdl[open] .kdl-m { animation: none; } .kdl-v { transition: none; } }
