/* 청도 달이네 홈페이지 — 로고 색(올리브·크림·달빛 노랑) */
:root {
  --bg: #f8f2e6; --cream: #fdf5ea; --surface: #fffdf8; --ink: #33311f; --muted: #77735c; --line: #e7dfcc;
  --olive: #5c5a39; --olive-soft: #ebe9d8; --moon: #e2bd6c; --moon-soft: #f8ecd2;
  --off: #eef1f4; --shoulder: #fdf0d6; --peak: #fbdcd5;
  --serif: 'Nanum Myeongjo', 'Noto Serif KR', 'AppleMyungjo', 'Batang', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--olive); }
h2 { font-family: var(--serif); font-size: 28px; font-weight: 700; margin: 0 0 10px; color: var(--olive); }
h3 { font-size: 16px; margin: 0 0 10px; }
h3 small, .sub { color: var(--muted); font-weight: 400; font-size: 14px; }
.sub { margin: 0 0 18px; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 24px; background: var(--olive); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 20px; font-weight: 700; }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: var(--cream); }
.menu { display: flex; gap: 4px; overflow-x: auto; }
.menu a { color: #ebe6cd; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.menu a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* 첫 화면 */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; place-items: center; padding: 40px 16px; overflow: hidden; background: #1d1c14; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.hero-card { position: relative; background: var(--cream); border-radius: 24px; padding: 18px 22px 22px; width: min(380px, 92vw); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); text-align: center; }
.hero-logo { width: 100%; height: auto; mix-blend-mode: multiply; }
.hero-cta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 10px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; background: var(--olive); color: #fff; }
.btn.moon { background: var(--moon); color: var(--olive); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.disabled { opacity: .6; cursor: default; }

/* 본문 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 56px 20px 8px; }
.lead { font-size: 17px; margin: 0 0 22px; }
.amenities { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.amenities li, .facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.amenities b { display: block; color: var(--olive); font-size: 15px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts li { background: var(--moon-soft); border-color: #eedcb2; }
.facts span { display: block; color: var(--muted); font-size: 12px; }
.facts b { font-size: 17px; color: var(--olive); }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; background: #222; aspect-ratio: 4 / 3; }
.gallery figure.wide { grid-column: span 2; grid-row: span 2; }
.gallery a, .gallery img { width: 100%; height: 100%; }
.gallery img { object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }
.ph-group { margin: 18px 0 10px; color: var(--olive); }
.gallery figcaption { position: absolute; left: 8px; bottom: 8px; background: rgba(30, 28, 18, .62); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; pointer-events: none; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(60, 55, 25, .06), 0 4px 14px rgba(60, 55, 25, .05); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td, th { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
table.rates td + td, table.rates th + th, table.kv td + td, table.nights td + td + td { text-align: right; font-variant-numeric: tabular-nums; }
table.kv { margin-top: 10px; }
table.kv.space { margin-top: 0; }
table.kv.space td + td { text-align: left; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.badge.off { background: var(--off); color: #4f5b68; }
.badge.shoulder { background: var(--shoulder); color: #8a5a00; }
.badge.peak { background: var(--peak); color: #a0362b; }
.seasons { list-style: none; padding: 0; margin: 0 0 8px; }
.seasons li { padding: 6px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.seasons small { color: var(--muted); }
.plain { margin: 0; padding-left: 18px; }
.plain li { margin: 4px 0; }

/* 예약 문의 */
.calc .fields { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.calc input, .calc select { font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); min-width: 0; width: 100%; }
.result { margin: 16px 0; }
.result .line { display: flex; justify-content: space-between; margin: 8px 0; }
.result .total { font-size: 20px; color: var(--olive); border-top: 2px solid var(--olive); padding-top: 10px; }
.err { color: #b2453c; font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.addr { font-size: 17px; margin: 0 0 12px; }

.foot { text-align: center; color: var(--muted); padding: 48px 16px calc(40px + env(safe-area-inset-bottom)); font-size: 14px; }
.foot img { margin: 0 auto 8px; border-radius: 50%; }
.foot p { margin: 4px 0; }

.float-sms { transition: opacity .2s, transform .2s; }
.float-sms.hide { opacity: 0; transform: translateY(20px); pointer-events: none; }
.float-sms { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 6px; padding: 13px 18px; border-radius: 999px; background: var(--moon); color: var(--olive); font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(40, 38, 20, .3); }

dialog#viewer { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog#viewer::backdrop { background: rgba(10, 10, 6, .85); }
dialog#viewer img { max-width: 94vw; max-height: 84vh; border-radius: 10px; }
dialog#viewer p { color: #fff; text-align: center; margin: 8px 0 0; }
dialog#viewer button { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; cursor: pointer; }
dialog#viewer button.nv { top: 50%; right: auto; left: 6px; width: 48px; height: 48px; margin-top: -40px; font-size: 30px; line-height: 1; }
dialog#viewer button.nx { left: auto; right: 6px; }
.btn.small { padding: 10px 14px; font-size: 14px; min-height: 44px; }
.copy-row { margin-top: 8px; }
.inapp-note { margin: 10px 0 0; font-size: 13px; }

@media (max-width: 820px) {
  .calc .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc .fields label:first-child, .calc .fields label:nth-child(2) { grid-column: span 1; }
  .cols { grid-template-columns: 1fr; }
  .amenities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .top { padding: 8px 12px; flex-direction: column; align-items: stretch; gap: 6px; }
  .brand { font-size: 18px; }
  .brand img { width: 34px; height: 34px; }
  .menu a { padding: 4px 10px; font-size: 13px; }
  html { scroll-padding-top: 100px; }
  h2 { font-size: 24px; }
  .wrap { padding-top: 40px; }
  .facts { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding: 28px 14px; }
  .actions .btn { flex: 1 1 100%; }
}
table.kv:not(.space) td + td { white-space: nowrap; }

/* 인스타그램 프로필 링크 페이지 (links.html) */
body.links { background: var(--olive); min-height: 100vh; }
.lk { max-width: 480px; margin: 0 auto; padding: 28px 18px calc(32px + env(safe-area-inset-bottom)); text-align: center; color: #fff; }
.lk-logo { width: 220px; height: 220px; margin: 0 auto; border-radius: 50%; object-fit: cover; background: var(--cream); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.lk-sub { margin: 16px 0 2px; color: #ebe6cd; font-size: 15px; }
.lk-rate { margin: 0 0 18px; font-weight: 700; font-size: 17px; color: var(--moon); }
.lk-list { display: flex; flex-direction: column; gap: 10px; }
.lb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 15px 16px; border-radius: 14px; background: var(--cream); color: var(--olive); text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.lb b { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
.lb span { font-size: 13px; color: var(--muted); }
.lb.moon { background: var(--moon); }
.lb.moon span { color: #5c4a1c; }
.lb.disabled { opacity: .7; }
.lk-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 18px; }
.lk-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.lk-foot { margin-top: 16px; font-size: 13px; color: #ebe6cd; }
.lb.naver { background: #03c75a; color: #fff; }
.lb.naver span { color: #e6fff0; }
