:root { --bg: #F5F6F8; }   /* 이 화면만 회색 배경 */

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  letter-spacing: -0.2px;
}
.page { max-width: var(--maxw); margin: 0 auto; background: var(--bg); min-height: 100dvh; }

/* ---------- 상단바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px var(--pad); background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; margin: 0; }
.topbar__logo { height: 22px; display: block; }

/* ---------- 탭 (예약 정보 / 톡톡) ---------- */
.tabs {
  position: sticky; top: 55px; z-index: 35; display: flex;
  background: var(--bg); border-bottom: 1px solid var(--line-soft);
}
.tab {
  flex: 1; appearance: none; -webkit-appearance: none; cursor: pointer;
  background: transparent; border: 0; color: var(--text-dim);
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: -0.3px;
  padding: 13px 0; position: relative; transition: color .15s;
}
.tab.is-active { color: #1A1C20; }
.tab__ico { width: 15px; height: 15px; vertical-align: -2.5px; margin-right: 4px; }
.tab::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: #1A1C20; transform: scaleX(0); transition: transform .18s;
}
.tab.is-active::after { transform: scaleX(1); }

.body { padding: 0 var(--pad) 40px; }
.sec { padding: 22px 0; border-top: 1px solid var(--line-soft); }
.sec:first-child { border-top: 0; }
.sec__title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; margin: 0 0 14px; }

/* ---------- 예약 상태 카드 ---------- */
.rsv-card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 16px;
}
.rsv-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.rsv-badge {
  font-size: 11.5px; font-weight: 800; letter-spacing: -0.2px;
  background: #1A1C20; color: #fff; border-radius: 999px; padding: 4px 10px;
}
.rsv-no { font-size: 11.5px; color: var(--text-mute); letter-spacing: 0.2px; }
.rsv-place { font-size: 17px; font-weight: 800; letter-spacing: -0.4px; }
.rsv-room { font-size: 13.5px; color: var(--text-dim); margin-top: 3px; }
.rsv-rows { border-top: 1px solid var(--line-soft); margin-top: 13px; padding-top: 11px; }
.rrow { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; }
.rrow .k { color: var(--text-mute); flex-shrink: 0; }
.rrow .v { text-align: right; font-weight: 600; letter-spacing: -0.2px; }
.rrow.total .v { font-weight: 800; font-size: 15px; }

/* ---------- 출입 (잇소키 원격 열기/닫기 · 최상단) ---------- */
.door-cards { display: flex; flex-direction: column; gap: 10px; }
.door-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 12px 14px;
}
.door-card__info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.door-card__step {
  width: 22px; height: 22px; border-radius: 999px; background: #1A1C20; color: #fff;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 800; flex-shrink: 0;
}
.door-card__t { font-size: 15.5px; font-weight: 800; letter-spacing: -0.4px; }
.door-card__s { font-size: 11px; color: var(--text-mute); margin-top: 2px; letter-spacing: -0.2px; }
.door-card__acts { display: flex; gap: 12px; flex-shrink: 0; }
.door-act {
  appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer;
  font: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0;
}
.door-act__circle {
  width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center;
  transition: transform .1s, background-color .12s;
}
.door-act.open .door-act__circle { background: #1A1C20; color: #fff; }
.door-act.close .door-act__circle { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); }
.door-act:hover:not(:disabled) .door-act__circle { transform: scale(1.06); }
.door-act.open:hover:not(:disabled) .door-act__circle { background: #33363E; }
.door-act.close:hover:not(:disabled) .door-act__circle { border-color: rgba(0,0,0,0.35); color: #1A1C20; }
.door-act__circle svg { width: 21px; height: 21px; }
.door-act__lbl { font-size: 10px; font-weight: 700; color: var(--text-dim); letter-spacing: -0.2px; }
.door-act:disabled { cursor: default; opacity: .4; }

/* ---------- 위치 ---------- */
.addr-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.addr-copy {
  appearance: none; cursor: pointer; background: transparent; border: 0; padding: 0;
  color: var(--text-mute); font: inherit; font-size: 12px; text-decoration: underline; flex-shrink: 0;
}
.addr-copy:hover { color: #1A1C20; }
.info-phone { display: inline-block; margin-top: 10px; font-size: 13.5px; color: var(--text); text-decoration: none; }
.info-phone:hover { color: #1A1C20; }
.info-phone .lbl { color: var(--text-mute); margin-right: 6px; }

/* ---------- 환불 규정 / 취소 ---------- */
.refund { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 6px 14px; }
.refund__row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.refund__row:first-child { border-top: 0; }
.refund__when { color: var(--text-dim); }
.refund__what { font-weight: 600; }
.refund__what.no { color: #f56b6b; }
/* 예약 취소: 하단에 작게 */
.cancel-link {
  display: block; margin: 26px auto 0; appearance: none; -webkit-appearance: none;
  background: none; border: 0; cursor: pointer; font: inherit;
  font-size: 12px; color: var(--text-mute); text-decoration: underline; text-underline-offset: 3px;
  letter-spacing: -0.2px;
}
.cancel-link:hover { color: var(--text-dim); }

/* ---------- 톡톡 (호스트 1:1 채팅 · 회원 전용) ---------- */
.talk-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.talk-head__avatar {
  width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.talk-head__name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.3px; }
.talk-head__sub { font-size: 11.5px; color: var(--text-mute); margin-top: 2px; letter-spacing: -0.2px; }
.talk-msgs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.talk-msg { display: flex; flex-direction: column; max-width: 80%; }
.talk-msg.host { align-self: flex-start; align-items: flex-start; }
.talk-msg.me { align-self: flex-end; align-items: flex-end; }
.talk-msg__bubble {
  padding: 10px 13px; font-size: 13.5px; line-height: 1.6;
  letter-spacing: -0.2px; white-space: pre-line; word-break: break-word;
}
.talk-msg.host .talk-msg__bubble { background: var(--surface); border: 1px solid var(--line-soft); color: var(--text); border-radius: 4px 14px 14px 14px; }
.talk-msg.me .talk-msg__bubble { background: #1A1C20; color: #fff; border-radius: 14px 4px 14px 14px; }
.talk-msg__time { font-size: 10.5px; color: var(--text-mute); margin-top: 4px; padding: 0 2px; }

.talk-inputrow { display: flex; gap: 8px; align-items: center; }
.talk-input {
  flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: 14px; padding: 11px 15px;
  border-radius: 999px; outline: none; letter-spacing: -0.2px;
}
.talk-input::placeholder { color: var(--text-mute); }
.talk-input:focus { border-color: rgba(0,0,0,0.35); }
.talk-send {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 999px; border: 0;
  cursor: pointer; background: #1A1C20; color: #fff; display: grid; place-items: center;
  transition: background-color .12s;
}
.talk-send:hover { background: #33363E; }
.talk-send svg { width: 18px; height: 18px; }

.talk-join { display: flex; flex-direction: column; gap: 8px; }

/* 하단 고정 메시지 입력바 (톡톡 탭에서만 표시) */
.talkbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: var(--maxw); z-index: 50;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-soft);
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
}

/* 데모 전용: 비회원/회원 상태 전환 토글 (실서비스에서는 제거) */
.demo-toggle { margin-left: auto; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.demo-toggle__cap { font-size: 9.5px; color: var(--text-mute); letter-spacing: 0.4px; }
.demo-toggle__seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.demo-toggle__btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; border: 0; background: transparent;
  color: var(--text-dim); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: -0.2px;
  padding: 4px 11px; border-radius: 999px; transition: background-color .12s, color .12s;
}
.demo-toggle__btn.on { background: #1A1C20; color: #fff; }

/* 데모 바 (탭 아래 · 케이스 전환) */
.demo-bar {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px;
  padding: 8px var(--pad); border-bottom: 1px dashed var(--line);
  background: rgba(0,0,0,0.02); overflow-x: auto;
}
.demo-bar .demo-toggle__seg { flex-shrink: 0; }
.demo-bar .demo-toggle__btn { padding: 4px 9px; font-size: 10.5px; }


/* 이용 완료 뱃지 / 재예약 */
.rsv-badge.done { background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--line); }
/* ---------- 장비 고장 신고 (긴급) ---------- */
.broken-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit;
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px; border-radius: 12px;
  background: rgba(245,107,107,0.16);
  border: 1.5px solid rgba(228,84,84,0.65);
  transition: background-color .12s, border-color .12s;
}
.broken-btn:hover { background: rgba(245,107,107,0.24); border-color: #E05252; }
.broken-btn__ico {
  width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
  background: rgba(245,107,107,0.28); color: #C93A3A;
  display: grid; place-items: center;
}
.broken-btn__ico svg { width: 19px; height: 19px; }
.broken-btn__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.broken-btn__t { font-size: 14.5px; font-weight: 800; letter-spacing: -0.3px; color: #C93A3A; }
.broken-btn__s { font-size: 12px; color: var(--text-dim); letter-spacing: -0.2px; }
.broken-btn__chev { color: #C93A3A; flex-shrink: 0; opacity: .8; }
.broken-btn__chev svg { width: 16px; height: 16px; display: block; }

.rebook-btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  cursor: pointer; font: inherit; text-decoration: none; appearance: none; -webkit-appearance: none;
  background: #1A1C20; color: #fff; border: 0; border-radius: 12px; padding: 16px;
  font-size: 15.5px; font-weight: 800; letter-spacing: -0.4px;
  transition: background-color .12s;
}
.rebook-btn:hover { background: #33363E; }

/* ---------- 지점/호실 정보 ---------- */
.dir-toggle {
  appearance: none; cursor: pointer; font: inherit; width: 100%;
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: 0; padding: 0; margin-top: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: -0.2px; color: var(--text);
}
.dir-toggle .dir-sum {
  flex: 1; min-width: 0; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dir-toggle svg { width: 15px; height: 15px; color: var(--text-mute); }
.dir-toggle .chev { transition: transform .18s; }
.dir-toggle.is-open .chev { transform: rotate(180deg); }
.dir-body {
  white-space: pre-line; font-size: 12.5px; color: #4A4D55; line-height: 1.8;
  letter-spacing: -0.2px; background: var(--surface-2);
  border-radius: 10px; padding: 12px 14px; margin-top: 8px;
}
.branch-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.branch-head__logo {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--line); overflow: hidden;
  display: grid; place-items: center;
}
.branch-head__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; box-sizing: border-box; display: block; }
.branch-head__info { min-width: 0; }
.branch-head__name { font-size: 16px; font-weight: 800; letter-spacing: -0.4px; }
.branch-head__tag { font-size: 12px; color: var(--text-dim); letter-spacing: -0.2px; margin-top: 3px; }

.branch-intro { margin: 14px 0; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.branch-intro__toggle {
  appearance: none; cursor: pointer; font: inherit; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface); border: 0; padding: 12px 14px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.3px; color: var(--text);
}
.branch-intro__toggle svg { width: 16px; height: 16px; color: var(--text-mute); transition: transform .18s; }
.branch-intro.is-open .branch-intro__toggle svg { transform: rotate(180deg); }
.branch-intro__body {
  padding: 4px 14px 14px; font-size: 13px; color: #4A4D55;
  line-height: 1.8; letter-spacing: -0.2px; border-top: 1px solid var(--line-soft);
}
.branch-intro__body p { margin: 0 0 12px; }
.branch-intro__body p:last-child { margin-bottom: 0; }
.branch-intro__body b { font-weight: 800; color: #000; }
.branch-intro__body .hl { color: #000; font-weight: 700; }
.branch-intro__body .sm { font-size: 12px; color: #6B6E76; }

.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.photo-strip img { height: 130px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.fac__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 4px; }
.fac__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.fac__ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
}
.fac__ico svg { width: 20px; height: 20px; }
.fac__name { font-size: 11px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.2; word-break: keep-all; }
.room-spec { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 13px 14px; }
.room-spec__t { font-size: 14.5px; font-weight: 800; letter-spacing: -0.3px; }
.room-spec__meta { font-size: 12px; color: var(--text-dim); margin-top: 4px; letter-spacing: -0.2px; }
.room-spec__desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.7; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); letter-spacing: -0.2px; }
.talk-join__cap { margin: 0; text-align: center; font-size: 11.5px; color: var(--text-mute); letter-spacing: -0.2px; }

/* ---------- 카카오 버튼 / 가입 카드 ---------- */
.kakao-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit;
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #FEE500; color: #191919; border: 0; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; letter-spacing: -0.3px; padding: 13px;
  transition: background-color .12s;
}
.kakao-btn:hover { background: #f4dc00; }
.join-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px; }
.join-card .jc-t { font-size: 14px; font-weight: 800; letter-spacing: -0.3px; margin: 0; }
.join-card .jc-d { font-size: 12px; color: var(--text-dim); letter-spacing: -0.2px; line-height: 1.6; margin: 7px 0 12px; }

/* ---------- 카카오 가입 시트 (휴대폰 인증 필수) ---------- */
.authsheet {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity .18s;
}
.authsheet[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.authsheet__box {
  width: 100%; max-width: var(--maxw); background: #FFFFFF;
  border-top: 1px solid var(--line); border-radius: 16px 16px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(12px); transition: transform .18s;
}
.authsheet[aria-hidden="false"] .authsheet__box { transform: none; }
.authsheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.authsheet__title { font-size: 16px; font-weight: 800; letter-spacing: -0.4px; margin: 0; }
.authsheet__x { appearance: none; cursor: pointer; background: transparent; border: 0; color: var(--text-dim); width: 30px; height: 30px; display: grid; place-items: center; }
.authsheet__x svg { width: 18px; height: 18px; }
.authsheet__sub { font-size: 12.5px; color: var(--text-dim); letter-spacing: -0.2px; line-height: 1.6; margin: 0 0 16px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-size: 12.5px; color: var(--text-dim); margin-bottom: 7px; letter-spacing: -0.2px; }
.field input {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: 15px; padding: 12px 13px;
  border-radius: var(--radius-sm); outline: none; letter-spacing: -0.2px;
}
.field input::placeholder { color: var(--text-mute); }
.field input:focus { border-color: rgba(0,0,0,0.35); }
.frow { display: flex; gap: 8px; }
.frow input { flex: 1; min-width: 0; }

/* ---------- 카카오싱크 동의 화면 (시뮬레이션 · 실제로는 카카오가 호스팅) ---------- */
.ksync { position: fixed; inset: 0; z-index: 95; overflow-y: auto; background: #FDFAF2; display: none; }
.ksync[aria-hidden="false"] { display: block; }
.ksync__wrap { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 18px 16px 96px; color: #191919; font-family: inherit; }
.ksync__x {
  position: absolute; top: 12px; right: 12px; appearance: none; cursor: pointer;
  background: transparent; border: 0; color: #999; font-size: 17px; width: 32px; height: 32px;
}
.ksync__logo { text-align: center; font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin: 8px 0 18px; }
.ksync__card { background: #fff; border: 1px solid #F0EDE4; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.ksync__ch { display: flex; align-items: center; gap: 10px; }
.ksync__ch-logo { height: 26px; display: block; }
.ksync__ch-ico { width: 34px; height: 34px; border-radius: 999px; background: #191919; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.ksync__ch-name { display: flex; align-items: baseline; gap: 7px; }
.ksync__ch-name b { font-size: 15px; letter-spacing: -0.3px; }
.ksync__ch-name small { font-size: 11.5px; color: #999; }
.ksync__acc { margin-top: 12px; background: #F7F6F2; border-radius: 10px; padding: 11px 13px; font-size: 13px; color: #333; display: flex; justify-content: space-between; align-items: center; }
.ksync__acc-chg { font-size: 12px; color: #999; }
.ksync__desc { font-size: 12.5px; color: #666; line-height: 1.6; margin: 0 0 2px; }
.ksync__item { display: flex; gap: 9px; padding: 12px 0; border-bottom: 1px solid #F4F2EC; font-size: 13px; line-height: 1.5; letter-spacing: -0.2px; align-items: flex-start; }
.ksync__item:last-of-type { border-bottom: 0; }
.ksync__item .chk { color: #191919; font-weight: 800; flex-shrink: 0; }
.ksync__item small { display: block; color: #999; font-size: 11.5px; margin-top: 3px; }
.ksync__note { font-size: 11px; color: #A5A29A; line-height: 1.65; margin: 10px 0 0; }
.ksync__ok {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); appearance: none; cursor: pointer; border: 0;
  background: #FEE500; color: #191919; font: inherit; font-size: 15px; font-weight: 800;
  padding: 17px 16px calc(17px + env(safe-area-inset-bottom)); letter-spacing: -0.3px;
}
.ksync__ok:hover { background: #f4dc00; }


.mini-btn {
  flex-shrink: 0; cursor: pointer; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text); font: inherit;
  font-size: 13px; font-weight: 600; padding: 0 15px; border-radius: var(--radius-sm);
  letter-spacing: -0.2px; white-space: nowrap;
}
.mini-btn:hover { border-color: rgba(0,0,0,0.35); color: #1A1C20; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px);
  background: #31343D; color: #F4F4F5; font-size: 13px; padding: 10px 16px; border-radius: 999px;
  white-space: nowrap; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  border: 1px solid var(--line);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
