/*
 * HAH & JUST4U 사이트 스타일. Bootstrap 5 위에 덧씌운다.
 * 분위기: 숙박업답게 차분하고 조용하게. 흰 바탕, 따뜻한 회색 글씨, 은은한 브론즈색 강조, 가는 제목.
 * 글꼴은 기기에 설치된 것을 쓴다(외부 글꼴을 내려받지 않아 중국에서도 빠르다).
 * 휴대폰 화면을 기준으로 쓰고, 넓은 화면용 조정은 아래쪽 @media 에 모았다.
 */

:root {
  --ink: #2b2926;          /* 본문 글씨 */
  --ink-soft: #6e6962;     /* 보조 글씨 */
  --paper: #ffffff;        /* 바탕 */
  --paper-soft: #f6f4f0;   /* 옅은 바탕(구역 구분용) */
  --card: #ffffff;
  --line: #e6e2db;
  --brand: #8a6a42;        /* 강조색: 은은한 브론즈 */
  --brand-dark: #6c5232;
  --hah: #4d605a;          /* HAH: 차분한 회녹색 */
  --just4u: #8e5b47;       /* JUST4U: 차분한 흙색 */
  --warn-bg: #f8f2e8;
  --warn-ink: #6b4d22;

  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-link-color-rgb: 138, 106, 66;
  --bs-link-hover-color-rgb: 108, 82, 50;
  --bs-border-radius: .5rem;
  --bs-border-color: var(--line);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: .9375rem;        /* 15px */
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
/* 언어별 글꼴: 같은 한자라도 일본어와 중국어 글자 모양이 달라 따로 지정한다. */
:lang(ja) { font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif; }
:lang(zh-Hans) { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif; }
:lang(ko) { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif; }
:lang(ja), :lang(zh-Hans) { line-height: 1.75; }

main { flex: 1; }
h1, h2, h3 { font-weight: 400; letter-spacing: -.005em; text-wrap: balance; color: var(--ink); }
a { text-underline-offset: .25em; }

/* 작은 영문 머리말 (예: DONGDAEMUN, SEOUL) */
.kicker {
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .75rem;
}

.btn { --bs-btn-border-radius: 999px; --bs-btn-font-weight: 500; letter-spacing: .01em; }
.btn .bi { margin-right: .15rem; }
.btn-lg { --bs-btn-padding-y: .65rem; --bs-btn-padding-x: 1.6rem; --bs-btn-font-size: .95rem; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-focus-shadow-rgb: 138, 106, 66;
}
.btn-outline-primary {
  --bs-btn-color: var(--ink); --bs-btn-border-color: #cfc8bd;
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--paper-soft); --bs-btn-hover-border-color: var(--ink-soft);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--paper-soft); --bs-btn-active-border-color: var(--ink-soft);
  --bs-btn-focus-shadow-rgb: 138, 106, 66;
}
.skip-link { position: absolute; z-index: 2000; background: #fff; padding: .5rem 1rem; }

/* ---------- 상단 메뉴 ---------- */
.site-nav { background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.navbar-brand { font-weight: 600; letter-spacing: .14em; color: var(--ink); font-size: .95rem; margin-right: .5rem; }
.navbar-brand:hover { color: var(--ink); }
.site-nav > .container { flex-wrap: wrap; }
.brand-amp { color: var(--brand); font-weight: 400; }
.site-nav .nav-link { color: var(--ink-soft); font-weight: 400; padding-block: .7rem; }
.site-nav .nav-link:hover { color: var(--ink); }
.site-nav .nav-link.active { color: var(--ink); }
.navbar-toggler { border-color: var(--line); padding: .4rem .55rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(138, 106, 66, .25); }

.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch a {
  padding: .3rem .5rem; font-size: .75rem; line-height: 1.4;
  color: var(--ink-soft); text-decoration: none; white-space: nowrap;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { background: var(--ink); color: #fff; }

/* ---------- 메인: 사진 슬라이드 ---------- */
.home-slider { background: var(--paper-soft); }
.slide-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.home-slider .carousel-indicators { margin-bottom: .75rem; }
.home-slider .carousel-indicators [data-bs-target] { width: 1.5rem; height: 2px; }
.home-slider .carousel-control-prev, .home-slider .carousel-control-next { width: 12%; }
.home-slider .carousel-control-prev-icon, .home-slider .carousel-control-next-icon { width: 1.5rem; height: 1.5rem; }
/* 사진이 아직 없을 때(초안 모드) 보이는 자리 표시 */
.slide-empty { display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .85); font-size: .85rem; letter-spacing: .1em; }
.slide-empty-hah    { background: linear-gradient(135deg, #5b6d67, #8a9a93); }
.slide-empty-just4u { background: linear-gradient(135deg, #8e6a5b, #b89a8a); }
.slide-empty-area   { background: linear-gradient(135deg, #6f6a62, #a39c90); }

/* ---------- 메인: 환영 문구 ---------- */
.welcome { text-align: center; padding: 2.25rem 0 1.75rem; }
.welcome h1 { font-size: clamp(1.6rem, 5.5vw, 2.5rem); font-weight: 300; margin-bottom: 1.75rem; }
.welcome-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.welcome .todo-note { text-align: left; max-width: 40rem; margin: 0 auto 1.5rem; }

/* 주요 시간: 가는 선으로 나눈 조용한 한 줄 */
.time-strip {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.time-item { padding: 1.1rem .75rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.time-item:nth-child(odd) { border-right: 1px solid var(--line); }
.time-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.time-value { font-size: 1.15rem; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.time-label { font-size: .78rem; color: var(--ink-soft); }

/* ---------- 페이지 제목 영역 ---------- */
.page-head { padding: 1.75rem 0 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; background: var(--paper-soft); }
.page-head h1 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); font-weight: 300; margin-bottom: .5rem; }
.page-head .lead { color: var(--ink-soft); font-size: .95rem; font-weight: 400; max-width: 44rem; margin-bottom: 0; }
.head-icon { color: var(--brand); }
.back-link { display: inline-block; font-size: .85rem; color: var(--ink-soft); text-decoration: none; margin-bottom: .75rem; padding: .25rem 0; }
.back-link:hover { color: var(--ink); }

.block { margin: 2.25rem 0; }
.block-title { font-size: 1.25rem; font-weight: 300; margin-bottom: .35rem; }
.block-title + .row, .block-title + .block-lead { margin-top: .75rem; }
.block-lead { color: var(--ink-soft); margin-bottom: 1.25rem; }

/* ---------- 내용 카드 ---------- */
.info-card {
  background: var(--card); border: 1px solid var(--line); border-radius: .5rem;
  padding: 1.25rem; margin-bottom: 1rem;
}
.info-card > :last-child { margin-bottom: 0; }
.info-title { font-size: 1.05rem; font-weight: 500; margin-bottom: .65rem; line-height: 1.45; }
.info-title .badge { font-size: .7rem; font-weight: 500; vertical-align: middle; }
.info-title .text-bg-success { background: var(--brand) !important; color: #fff !important; }

.check-list, .warn-list { list-style: none; padding-left: 0; }
.check-list li { position: relative; padding-left: 1.4rem; margin-bottom: .35rem; }
.check-list li::before {
  content: ""; position: absolute; left: .2rem; top: .78em;
  width: .45rem; height: 1px; background: var(--brand);
}
.step-list { padding-left: 0; list-style: none; counter-reset: step; }
.step-list li { counter-increment: step; position: relative; padding-left: 2.4rem; margin-bottom: .5rem; min-height: 1.7rem; }
.step-list li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 1px solid var(--brand); color: var(--brand); font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.warn-list { background: var(--warn-bg); color: var(--warn-ink); border-radius: .5rem; padding: .85rem 1rem; margin-top: .85rem; }
.warn-list li { padding-left: 1.7rem; position: relative; }
.warn-list li + li { margin-top: .35rem; }
.warn-list .bi { position: absolute; left: 0; top: .1em; }

.info-table { margin-bottom: 1rem; --bs-table-bg: transparent; --bs-table-border-color: var(--line); }
.info-table th { font-weight: 500; }
.info-table thead th { color: var(--ink-soft); font-size: .8rem; font-weight: 400; }

.house-badge { color: #fff; font-weight: 500; letter-spacing: .06em; }
.house-badge.house-hah { background: var(--hah); }
.house-badge.house-just4u { background: var(--just4u); }

.doorlock-video { width: 100%; max-width: 22rem; border-radius: .5rem; background: #000; display: block; }

/* ---------- 게스트하우스 카드 ---------- */
.house-card {
  display: flex; flex-direction: column; gap: .35rem; height: 100%;
  padding: 1.4rem 1.5rem; border-radius: .5rem; text-decoration: none;
  background: var(--paper-soft); color: var(--ink);
  border: 1px solid var(--line); border-top: 3px solid var(--ink-soft);
  transition: border-color .2s ease, background-color .2s ease;
}
.house-card.house-hah { border-top-color: var(--hah); }
.house-card.house-just4u { border-top-color: var(--just4u); }
.house-card:hover, .house-card:focus-visible { color: var(--ink); background: #fff; }
.house-name { font-size: 1.15rem; font-weight: 400; letter-spacing: .02em; }
.house-hah .house-name { color: var(--hah); }
.house-just4u .house-name { color: var(--just4u); }
.house-rooms { color: var(--ink-soft); font-size: .9rem; }
.house-more { margin-top: auto; padding-top: .6rem; font-size: .85rem; color: var(--ink); }

/* ---------- 이용법 아이콘 ---------- */
.guide-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  height: 100%; min-height: 6.5rem; padding: 1rem .6rem; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: .5rem;
  color: var(--ink); font-size: .9rem; line-height: 1.4; text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.guide-tile .bi { font-size: 1.45rem; color: var(--brand); }
.guide-tile:hover, .guide-tile:focus-visible { border-color: var(--brand); background: var(--paper-soft); color: var(--ink); }

/* ---------- 객실 카드 ---------- */
.room-card { background: var(--card); border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; height: 100%; scroll-margin-top: 5rem; }
.room-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.room-photo-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 300; letter-spacing: .12em; color: rgba(255, 255, 255, .9);
}
.room-photo-empty.house-hah { background: linear-gradient(135deg, var(--hah), #8a9a93); }
.room-photo-empty.house-just4u { background: linear-gradient(135deg, var(--just4u), #b89a8a); }
.room-body { padding: 1rem 1.1rem 1.1rem; }
.room-body h3 { font-size: 1rem; font-weight: 500; margin-bottom: .5rem; }
.room-body > :last-child { margin-bottom: 0; }
.room-code {
  display: inline-block; min-width: 2.3rem; text-align: center; padding: .05rem .4rem; margin-right: .2rem;
  border-radius: .3rem; border: 1px solid var(--ink-soft); color: var(--ink-soft);
  font-size: .75rem; font-weight: 500; letter-spacing: .06em;
}

/* ---------- 문의 ---------- */
.contact-card {
  display: flex; align-items: center; gap: 1rem; height: 100%;
  padding: 1rem 1.15rem; background: var(--card); border: 1px solid var(--line); border-radius: .5rem;
  color: var(--ink); text-decoration: none;
}
a.contact-card:hover, a.contact-card:focus-visible { border-color: var(--brand); }
.contact-card .bi { font-size: 1.4rem; color: var(--brand); }
.contact-card .contact-type { display: block; font-size: .78rem; color: var(--ink-soft); }
.contact-value { display: block; font-weight: 500; word-break: break-all; }

.pager-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.25rem 0 2.25rem; }
.pager-nav a { text-decoration: none; padding: .5rem 0; }

/* ---------- 하단 ---------- */
.site-footer { background: #2f2c29; color: #cdc6bc; padding: 2rem 0; margin-top: 2.5rem; font-size: .875rem; }
.site-footer a { color: #fff; }
.footer-brand { font-weight: 500; letter-spacing: .14em; color: #fff; margin-bottom: .5rem; }
.site-footer .brand-amp { color: #c9a97c; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.contact-list .bi { width: 1.4rem; display: inline-block; }
.contact-list .contact-type { display: inline-block; min-width: 5.5rem; color: #9d968c; }

/* ---------- 초안용 TODO 상자 (config.php 의 draft 가 true 일 때만 나온다) ---------- */
.todo-note {
  margin-top: .85rem; padding: .6rem .8rem; font-size: .82rem; line-height: 1.5;
  background: #fffbe6; color: #5c4a00; border: 1px dashed #d4b106; border-radius: .5rem;
}
.todo-tag { font-weight: 800; font-size: .72rem; background: #d4b106; color: #fff; padding: .1rem .4rem; border-radius: .3rem; margin-right: .25rem; }
.site-footer .todo-note { margin-top: 1.5rem; }

/* ---------- 태블릿 이상 ---------- */
@media (min-width: 768px) {
  .navbar-brand { font-size: 1.05rem; margin-right: 1rem; }
  .lang-switch a { padding: .3rem .7rem; font-size: .78rem; }
  .slide-img { aspect-ratio: 16 / 7; max-height: 72vh; }
  .welcome { padding: 3rem 0 2.25rem; }
  .time-strip { grid-template-columns: repeat(4, 1fr); }
  .time-item { padding: 1.4rem 1rem; }
  .time-item:nth-child(-n+2) { border-bottom: 0; }
  .time-item:nth-child(odd) { border-right: 0; }
  .time-item + .time-item { border-left: 1px solid var(--line); }
  .info-card { padding: 1.35rem 1.5rem; }
  .page-head { padding: 2.25rem 0 1.5rem; }
}
@media (min-width: 992px) {
  .site-nav .nav-link { padding-inline: .8rem; }
  .info-card { max-width: 52rem; }
}
@media (prefers-reduced-motion: reduce) {
  .house-card, .guide-tile { transition: none; }
}

/* ---------- 사진 넘겨 보기 (객실 카드, 공용 공간) ---------- */
.photo-carousel { position: relative; background: var(--paper-soft); }
.photo-carousel .photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-carousel .carousel-control-prev, .photo-carousel .carousel-control-next { width: 16%; }
.photo-carousel .carousel-control-prev-icon, .photo-carousel .carousel-control-next-icon {
  width: 2rem; height: 2rem; background-size: 45%; border-radius: 50%; background-color: rgba(0, 0, 0, .28);
}
.photo-count {
  position: absolute; right: .6rem; bottom: .6rem; padding: .1rem .5rem; border-radius: 999px;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: .72rem; pointer-events: none;
}
.house-gallery { border-radius: .5rem; overflow: hidden; max-width: 52rem; }
.house-gallery .photo { aspect-ratio: 3 / 2; }

/* ---------- 주변 안내 ---------- */
.nearby-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.nearby-chips a {
  padding: .3rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--ink); font-size: .85rem; text-decoration: none;
}
.nearby-chips a:hover { border-color: var(--brand); }
.nearby-block { scroll-margin-top: 5rem; }
.place-card { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.place-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.place-photo-empty { display: flex; align-items: center; justify-content: center; background: var(--paper-soft); color: var(--brand); font-size: 2rem; }
.place-body { display: flex; flex-direction: column; gap: .5rem; flex: 1; padding: 1rem 1.1rem 1.1rem; }
.place-body h3 { font-size: 1rem; font-weight: 500; margin: 0; }
.place-desc { margin: 0; }
.place-meta { list-style: none; padding: 0; margin: 0; font-size: .82rem; color: var(--ink-soft); }
.place-meta li { position: relative; padding-left: 1.4rem; }
.place-meta .bi { position: absolute; left: 0; top: .05em; }
.place-map { margin-top: auto; align-self: flex-start; }

/* ---------- 관리자 화면 (/admin/) ---------- */
.admin { background: var(--paper-soft); }
.admin-nav { background: #fff; border-bottom: 1px solid var(--line); padding: .6rem 0; font-size: .9rem; }
.admin-nav a { color: var(--ink); text-decoration: none; }
.admin-nav a:hover { color: var(--brand); }
.admin-brand { font-weight: 600; letter-spacing: .06em; }
.admin-login { max-width: 22rem; margin: 3rem auto; background: #fff; border: 1px solid var(--line); border-radius: .5rem; padding: 2rem; }
.admin-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.admin-filter a { padding: .25rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .82rem; text-decoration: none; }
.admin-filter a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.admin-table { background: #fff; font-size: .9rem; }
.admin-thumb { display: block; width: 4rem; height: 3rem; object-fit: cover; border-radius: .3rem; }
.admin-thumb-empty { background: var(--paper-soft); border: 1px dashed var(--line); }
.admin-form, .admin-cat { background: #fff; border: 1px solid var(--line); border-radius: .5rem; padding: 1.25rem; margin-bottom: 1rem; max-width: 52rem; }
.admin-cat-new { border-style: dashed; }
.admin-lang { border: 1px solid var(--line); border-radius: .5rem; padding: .75rem 1rem 1rem; margin-bottom: 1rem; }
.admin-lang legend { float: none; width: auto; font-size: .9rem; font-weight: 500; padding: 0 .4rem; margin: 0; }
.admin-lang legend .badge { font-weight: 400; }
.admin-preview { width: 9rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .4rem; border: 1px solid var(--line); }
.admin .btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand); }

/* ---------- 게스트하우스별 색 (body.theme-hah / body.theme-just4u) ---------- */
/* HAH: 헤더·버튼·링크 모두 진한 파랑 */
.theme-hah    { --brand: #174a78; --brand-dark: #0f3558; --bs-link-color-rgb: 23, 74, 120; --bs-link-hover-color-rgb: 15, 53, 88; --nav-bg: #174a78; }
/* JUST4U: 헤더·버튼·링크 모두 검정 */
.theme-just4u { --brand: #1a1a1a; --brand-dark: #000000; --bs-link-color-rgb: 26, 26, 26;  --bs-link-hover-color-rgb: 0, 0, 0;  --nav-bg: #1a1a1a; }

/* 색 바탕 헤더: 글씨는 흰색 계열 (흰 글씨와의 명암 대비 4.5:1 이상) */
.theme-hah .site-nav, .theme-just4u .site-nav { background: var(--nav-bg); border-bottom-color: transparent; }
.theme-hah .navbar-brand, .theme-just4u .navbar-brand,
.theme-hah .navbar-brand:hover, .theme-just4u .navbar-brand:hover { color: #fff; }
.theme-hah .brand-sub, .theme-just4u .brand-sub { color: rgba(255, 255, 255, .78); }
.theme-hah .site-nav .nav-link, .theme-just4u .site-nav .nav-link { color: rgba(255, 255, 255, .86); }
.theme-hah .site-nav .nav-link:hover, .theme-just4u .site-nav .nav-link:hover,
.theme-hah .site-nav .nav-link.active, .theme-just4u .site-nav .nav-link.active { color: #fff; }
.theme-hah .site-nav .nav-link.active, .theme-just4u .site-nav .nav-link.active { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .45em; }
.theme-hah .navbar-toggler, .theme-just4u .navbar-toggler { border-color: rgba(255, 255, 255, .45); }
.theme-hah .navbar-toggler:focus, .theme-just4u .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .35); }
.theme-hah .switch-house, .theme-just4u .switch-house { color: #fff; border-color: rgba(255, 255, 255, .5); }
.theme-hah .switch-house:hover, .theme-just4u .switch-house:hover { color: var(--nav-bg); background: #fff; border-color: #fff; }
.brand-sub { font-weight: 300; letter-spacing: .08em; color: var(--ink-soft); }
.switch-house { display: inline-block; font-size: .82rem; color: var(--ink-soft); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .85rem; white-space: nowrap; }
.switch-house:hover { color: var(--ink); border-color: var(--ink-soft); }
.welcome-lead { color: var(--ink-soft); max-width: 36rem; margin: -1rem auto 1.5rem; }
.room-photo-empty { background: linear-gradient(135deg, var(--brand), #b8ad9f); }
.footer-houses { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; }
.footer-houses a { color: #cdc6bc; text-decoration: none; }
.footer-houses a[aria-current] { color: #fff; }

/* ---------- 첫 화면: 게스트하우스 선택 ---------- */
.select-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: .5rem;
  color: var(--ink); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.select-card:hover, .select-card:focus-visible { color: var(--ink); border-color: var(--brand); box-shadow: 0 .5rem 1.5rem rgba(43, 41, 38, .08); }
.select-photo { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.select-photo-empty { background: linear-gradient(135deg, var(--brand), #b8ad9f); }
.select-body { display: flex; flex-direction: column; gap: .3rem; padding: 1.25rem 1.4rem 1.4rem; border-top: 3px solid var(--brand); }
.select-name { font-size: 1.3rem; font-weight: 300; letter-spacing: .03em; color: var(--brand); }
.select-rooms { color: var(--ink-soft); font-size: .88rem; }
.select-go { margin-top: .5rem; font-size: .88rem; }
@media (prefers-reduced-motion: reduce) { .select-card { transition: none; } }

/* ---------- 관리자: 숨긴 항목 ---------- */
.admin-table tr.is-hidden td { color: var(--ink-soft); }
.admin-table tr.is-hidden img { opacity: .5; }
/* HAH 헤더 메뉴 글씨는 온전한 흰색으로 (지금 페이지는 밑줄로 구분) */
.theme-hah .site-nav .nav-link, .theme-hah .brand-sub { color: #fff; }

/* ---------- 관리자 화면: 헤더·버튼·링크 모두 진한 주황 ---------- */
.admin { --brand: #9c4612; --brand-dark: #7a360d; --bs-link-color-rgb: 156, 70, 18; --bs-link-hover-color-rgb: 122, 54, 13; }
.admin-nav { background: #9c4612; border-bottom-color: transparent; }
.admin-nav a, .admin-nav a:hover { color: #fff; }
.admin-nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
.admin-nav .btn-outline-secondary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .55); --bs-btn-hover-color: #9c4612; --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff; --bs-btn-active-color: #9c4612; --bs-btn-active-bg: #fff; }
/* 메뉴: 넓은 화면은 한 줄, 휴대폰·태블릿(992px 미만)은 ☰ 단추로 펼치는 풀다운 */
.admin-nav-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.admin-nav-menu { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; flex: 1; }
.admin-nav-logout { margin-left: auto; }
.admin-nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255, 255, 255, .55); border-radius: .4rem; color: #fff; font-size: 1.4rem; line-height: 1; padding: .2rem .55rem; }
@media (max-width: 991.98px) {
  .admin-nav-toggle { display: block; }
  .admin-nav-menu { display: none; flex: 0 0 100%; flex-direction: column; align-items: stretch; gap: 0; padding-top: .4rem; }
  .admin-nav-menu.open { display: flex; }
  .admin-nav-menu > a { padding: .7rem .25rem; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 1rem; }
  .admin-nav-logout { margin: 0; padding-top: .7rem; border-top: 1px solid rgba(255, 255, 255, .2); }
}

/* ---------- 첫 화면 사이트 이름: "Guesthouse" 강조 ---------- */
.brand-point {
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400;
  letter-spacing: .02em; font-size: 1.15em; color: var(--brand);
  margin-left: .2em; padding-bottom: .05em; border-bottom: 2px solid currentColor;
}

/* ---------- 첫 화면 문구 ---------- */
.welcome h1.select-title { margin-bottom: .6rem; letter-spacing: .01em; }
.select-subtitle { font-size: clamp(1.05rem, 3.2vw, 1.3rem); color: var(--ink); margin-bottom: 1.25rem; }
.welcome .welcome-lead { margin-top: 0; word-break: keep-all; }

/* ---------- 셀프체크인 조회 (/checkin.html) ---------- */
.checkin-lookup { padding: 2rem 0 2.75rem; }
.ci-wrap { max-width: 34rem; margin: 0 auto; }
.ci-title { font-size: clamp(1.7rem, 6vw, 2.3rem); font-weight: 300; margin-bottom: .75rem; }
.ci-lead { color: var(--ink-soft); margin-bottom: 1.5rem; }
.ci-form { background: #fff; border: 1px solid var(--line, #e5e1da); border-radius: .75rem; padding: 1.4rem; }
.ci-blocked p { margin-bottom: .35rem; }
.ci-guest { margin-bottom: 1.25rem; }
.ci-name { font-size: 1.5rem; font-weight: 500; margin-bottom: .2rem; word-break: break-word; }
.ci-notice { background: var(--paper-soft); border-left: 3px solid var(--brand); border-radius: .5rem; padding: 1rem 1.1rem; margin-bottom: 1.25rem; font-size: .92rem; }
.ci-notice p { margin-bottom: .45rem; }
.ci-notice p:last-child { margin-bottom: 0; }
.ci-notice .bi { color: #2e7d4f; }
.ci-codes, .ci-rooms { background: #fff; border: 1px solid var(--line, #e5e1da); border-radius: .75rem; margin-bottom: 1rem; }
.ci-code-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; }
.ci-code-row + .ci-code-row { border-top: 1px solid var(--line, #e5e1da); }
.ci-label { display: block; color: var(--ink-soft); font-size: .85rem; }
.ci-code-row .ci-label { display: inline; }
.ci-value { font-weight: 500; text-align: right; }
.ci-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .08em; color: var(--brand-dark); }
.ci-room { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; padding: 1rem 1.1rem; }
.ci-room + .ci-room { border-top: 1px solid var(--line, #e5e1da); }
.ci-room-no { font-size: 1.8rem; font-weight: 700; }
.ci-room-dates { grid-column: 1 / -1; color: var(--ink-soft); font-size: .85rem; }
.ci-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.ci-contact { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line, #e5e1da); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ci-contact p { width: 100%; }

/* ---------- 관리자 > 객실 현황 ---------- */
.rooms-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.rooms-date { width: auto; font-weight: 600; }
.rooms-weekday { font-weight: 600; min-width: 1.5em; }
.rooms-table th, .rooms-table td { text-align: center; }
.rooms-table thead th { background: var(--brand); color: #fff; font-weight: 500; white-space: nowrap; }
.rooms-house th { background: var(--paper-soft); text-align: left !important; font-weight: 600; font-size: .9rem; }
.rooms-name { font-size: 1.1rem; }
.rooms-table tr.is-staying td, .rooms-table tr.is-staying th { color: var(--ink-soft); background: #fafafa; }
.rooms-code { font-size: 1.15rem; font-weight: 700; color: #b02a37; }
.rooms-done { color: #2e7d4f; font-weight: 600; }
.rooms-guest summary { cursor: pointer; font-weight: 600; list-style: none; }
.rooms-guest summary::-webkit-details-marker { display: none; }
.rooms-guest[open] { text-align: left; }
.rooms-tag-icon { margin-left: .3rem; font-size: 1.05rem; vertical-align: -.1em; }
.rooms-tag-3 { color: #6c757d; }
.rooms-tag-5 { color: #b07800; }
.rooms-tag-7 { color: #2e7d4f; }
.rooms-tag-11 { color: #0b5394; }
.rooms-tag-13 { color: #1e8a4c; }
.rooms-tag-17 { color: #7b3fa0; }
.rooms-filter-box { margin: 0 0 .75rem; }
.rooms-filter-box > summary { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; padding: .3rem .7rem; border: 1px solid #dee2e6; border-radius: 1rem; background: #fff; font-weight: 600; list-style: none; }
.rooms-filter-box > summary::-webkit-details-marker { display: none; }
.rooms-filter-box[open] > summary { margin-bottom: .4rem; }
.rooms-filter-sum { display: inline-flex; align-items: center; gap: .3rem; font-weight: 400; }
.rooms-filter-hidden { color: var(--ink-soft); font-size: .85rem; }
.rooms-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: 0; padding: .5rem .75rem; border: 1px solid #dee2e6; border-radius: .5rem; background: #fff; }
.rooms-filter-item { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .5rem; border-radius: 1rem; background: #f1f4f8; cursor: pointer; font-size: .9rem; white-space: nowrap; }
.rooms-filter-item .form-check-input { margin: 0; }
.rooms-filter-n { color: var(--ink-soft); font-size: .8rem; }
.rooms-st-icon { font-size: 1.2rem; vertical-align: -.15em; }
.rooms-st-out_wait { color: #c0392b; }
.rooms-st-out_done { color: #9aa3ab; }
.rooms-st-in_wait { color: #1f5f99; }
.rooms-st-in_done { color: #2e7d4f; }
.rooms-st-stay { color: #6c757d; }
.rooms-st-empty { color: #adb5bd; }
.rooms-table td.rooms-stay-cell { text-align: center; }
.rooms-flag-btn { min-width: 2.25rem; font-size: 1.05rem; line-height: 1; padding: .35rem .5rem; border: 1px solid currentColor; background: #fff; }
.rooms-flag-btn.is-on, .rooms-flag-btn.is-on:hover { background: currentColor; }
.rooms-flag-btn.is-on .bi { color: #fff; }
.rooms-flag-btn:hover { box-shadow: 0 0 0 .15rem rgba(0,0,0,.08); }
.rooms-flag-btn.rooms-tag-5 { --bs-btn-color: #b07800; --bs-btn-hover-color: #b07800; --bs-btn-active-color: #b07800; --bs-btn-hover-bg: #fff; --bs-btn-active-bg: #fff; }
.rooms-flag-btn.rooms-tag-17 { --bs-btn-color: #7b3fa0; --bs-btn-hover-color: #7b3fa0; --bs-btn-active-color: #7b3fa0; --bs-btn-hover-bg: #fff; --bs-btn-active-bg: #fff; }
.rooms-flag-btn.rooms-tag-11 { --bs-btn-color: #0b5394; --bs-btn-hover-color: #0b5394; --bs-btn-active-color: #0b5394; --bs-btn-hover-bg: #fff; --bs-btn-active-bg: #fff; }
.rooms-legend { margin-top: 1rem; padding: .75rem 1rem; border: 1px solid #dee2e6; border-radius: .5rem; background: #fafbfc; }
.rooms-legend-title { font-size: .95rem; font-weight: 700; margin: 0 0 .5rem; }
.rooms-legend dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .75rem; align-items: center; margin: 0 0 .75rem; }
.rooms-legend dt { font-weight: 400; text-align: center; }
.rooms-legend dt .rooms-tag-icon { margin: 0; }
.rooms-legend dd { margin: 0; }
@media (max-width: 575.98px) { .rooms-legend dl { grid-template-columns: 1fr; } .rooms-legend dt { text-align: left; } }
.rooms-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }

/* 관리자 화면: 접속 기록 · 차단 (common/admin/log.php) */
.admin-log-form { max-width: none; }
.admin-log-form .form-label { font-size: .78rem; margin-bottom: .15rem; color: var(--ink-soft); }
.admin-log { font-size: .8rem; }
.admin-log td { vertical-align: top; }
.admin-log-path { max-width: 28rem; word-break: break-all; }
.admin-log-ref { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-log-ua { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.admin-log tr.is-blocked td { background: #fdecea; }
.admin-log-top { background: #fff; border: 1px solid var(--line); border-radius: .5rem; padding: .6rem .9rem; }
.admin-log-top summary { font-weight: 500; font-size: .9rem; cursor: pointer; }
.admin-block-link { color: #b3261e; margin-left: .2rem; }
.admin-status { font-weight: 600; }
.admin-status.s3 { color: #6c757d; }
.admin-status.s4 { color: #b07800; }
.admin-status.s5 { color: #b3261e; }

/* 관리자 화면: 호텔 지식 (common/admin/knowledge.php) */
.admin-k-text { white-space: pre-wrap; word-break: break-word; max-height: 9rem; overflow: auto; }
.admin-k-answer { background: #eef4ec; border: 1px solid #cfe2c9; border-radius: .5rem; padding: .6rem .8rem; }
.admin-k td { vertical-align: top; }
