/* HAEON — all styles. Mobile first; one breakpoint at 768px (bottom of file). No web fonts: system serif + sans. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f5f1ea;
  --bg-elevated: #fbf8f3;
  --surface: #ece6db;
  --surface-2: #e4dccd;
  --text: #2b2723;
  --text-soft: #4d463f;
  --muted: #6f675d;
  --line: rgba(43, 39, 35, 0.14);
  --border: #d9d0c2;
  --primary: #2b2723;
  --on-primary: #f5f1ea;
  --accent: #8a6447;
  --danger: #a1402e;
  --ok: #4f6b4a;
  --radius: 2px;
  --max: 1280px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --sans: "Pretendard", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", "Noto Serif CJK KR", serif;
}

@view-transition { navigation: auto; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.75 var(--sans);
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
h1, h2, h3 { line-height: 1.3; font-weight: 500; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #d9c7b0; }

/* ---------- Type ---------- */
.eyebrow {
  margin: 0 0 18px;
  font: 500 11px/1.5 var(--sans);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { color: var(--text); }
.display, .display-sm, .hero-title, .room-card-title, .result-title, .summary-title, .facility-card-title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.display { margin: 0 0 24px; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.22; }
.display-sm { margin: 0 0 18px; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.3; }
.display a, .display-sm a { text-decoration: none; }
.lead { margin: 0; max-width: 38em; font-size: clamp(16px, 1.5vw, 18px); color: var(--text-soft); }
.prose { color: var(--text-soft); }
.prose p { margin: 0 0 1.1em; }
.prose > :last-child { margin-bottom: 0; }
.muted, .hint { color: var(--muted); }
.hint { margin: 10px 0 0; font-size: 13px; line-height: 1.6; }
.center { text-align: center; }
.meta { margin: 0; font-size: 14px; color: var(--muted); }
.price { margin: 0; font-family: var(--serif); font-size: 20px; }
.price span { font-family: var(--sans); font-size: 13px; color: var(--muted); }

.link-arrow, .link-back {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.08em; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.link-arrow::after { content: "→"; transition: transform 0.4s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-back::before { content: "←"; }
.link-back { margin-top: 12px; color: var(--muted); border-color: var(--line); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.section { padding: 80px 0; }
.section-tight { padding: 40px 0 80px; }
.section-alt { background: var(--surface); }
.section-head { display: grid; gap: 0; margin-bottom: 40px; }
.section-head .display, .section-head .display-sm { margin-bottom: 16px; }
.stack-lg { display: grid; justify-items: center; gap: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.img-placeholder { width: 100%; height: 100%; min-height: 200px; background: linear-gradient(135deg, var(--surface-2), #cfc2ae); }

/* ---------- Demo bar / header ---------- */
.demo-bar { position: relative; z-index: 20; background: var(--text); color: #e9e2d6; font-size: 12px; line-height: 1.5; }
.demo-bar .container { display: flex; align-items: center; gap: 10px; min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.demo-tag { flex: none; padding: 1px 7px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; border: 1px solid rgba(233, 226, 214, 0.5); }
.demo-text { flex: 1; min-width: 0; }
.demo-bar a { flex: none; color: #e9e2d6; }
.hide-sm { display: none; }

.site-header { position: sticky; top: 0; z-index: 15; background: rgba(245, 241, 234, 0.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
/* Over the hero: stays in flow (body is a flex column, where an absolute child would jump to the top) and pulls the hero up under itself. */
.site-header.is-overlay { position: relative; margin-bottom: calc(-1 * var(--header-h) - 1px); background: none; border-color: rgba(255, 255, 255, 0.18); color: #fff; backdrop-filter: none; }
.site-nav { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: inherit; text-decoration: none; }
.logo { display: block; width: auto; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3px; overflow: visible; }
.logo * { vector-effect: non-scaling-stroke; }
.nav-links { display: none; }
.btn.nav-book { min-height: 38px; padding: 0 16px; font-size: 13px; }
.is-overlay .nav-book { color: var(--text); background: #f5f1ea; border-color: #f5f1ea; }

.nav-menu { position: static; }
.nav-menu summary { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; cursor: pointer; list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary span, .nav-menu summary span::before { display: block; width: 22px; height: 1px; background: currentColor; transition: transform 0.3s var(--ease); }
.nav-menu summary span { position: relative; transform: translateY(-3px); }
.nav-menu summary span::before { content: ""; position: absolute; top: 7px; }
.nav-menu[open] summary span { transform: translateY(0) rotate(45deg); }
.nav-menu[open] summary span::before { transform: translateY(-7px) rotate(-90deg); }
.nav-menu nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: grid; padding: 12px 20px 32px;
  color: var(--text); background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(43, 39, 35, 0.35);
}
.nav-menu nav a { padding: 14px 0; font-family: var(--serif); font-size: 22px; text-decoration: none; border-bottom: 1px solid var(--line); }
.nav-menu nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px;
  font: 500 14px/1.2 var(--sans); letter-spacing: 0.06em; text-decoration: none; white-space: nowrap;
  color: var(--text); background: transparent;
  border: 1px solid var(--text); border-radius: var(--radius); cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { color: var(--on-primary); background: var(--text); }
.btn-primary { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #4a3f35; border-color: #4a3f35; }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.75); }
.btn-ghost:hover { color: var(--text); background: #fff; border-color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 58px; font-size: 15px; }
.btn-small { min-height: 34px; padding: 0 14px; font-size: 13px; letter-spacing: 0.02em; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { color: #fff; background: var(--danger); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn-link { padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.form { display: grid; align-content: start; gap: 22px; }
.field { display: grid; gap: 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field small, .optional { font-size: 11px; letter-spacing: 0.04em; text-transform: none; color: var(--muted); font-weight: 400; }
.field .hint { margin: 2px 0 0; letter-spacing: 0; text-transform: none; font-weight: 400; }
.input {
  width: 100%; min-height: 46px; padding: 10px 0;
  font: inherit; font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none; /* 16px stops iOS zoom */
  color: var(--text); background: transparent;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  transition: border-color 0.3s var(--ease);
}
.input:focus { outline: none; border-bottom-color: var(--text); }
.input:focus-visible { outline: none; }
textarea.input { min-height: 96px; padding: 10px 12px; border: 1px solid var(--border); resize: vertical; }
select.input {
  appearance: none; padding-right: 24px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f675d'/%3E%3C/svg%3E") no-repeat right 4px center;
}
input[type="date"].input { appearance: none; min-width: 0; }
.fieldset { display: grid; gap: 20px; margin: 0; padding: 0; border: 0; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: 4px; font-family: var(--serif); font-size: 22px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-soft); cursor: pointer; }
.check input, .choice input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--text); }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.inline-form .input { flex: 1 1 200px; width: auto; min-width: 0; }

.alert { margin: 0 0 16px; padding: 14px 16px; font-size: 14px; line-height: 1.6; color: var(--danger); background: #f6e7e2; border-left: 2px solid var(--danger); }
.alert ul { margin: 0; padding-left: 18px; }
.alert-ok { color: var(--ok); background: #e7ece2; border-color: var(--ok); }
.notice { padding: 16px 18px; font-size: 14px; line-height: 1.65; background: var(--surface); border-left: 2px solid var(--accent); }
.notice strong { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.notice p { margin: 0; color: var(--text-soft); }

/* ---------- Home: hero + booking ---------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: 600px; height: 100svh; max-height: 980px; overflow: hidden; color: #fff; background: #3a332c; }
.hero-img, .hero > .img-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-in 2.6s var(--ease) both; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(28, 23, 19, 0.62), rgba(28, 23, 19, 0.08) 52%, rgba(28, 23, 19, 0) 70%), linear-gradient(to bottom, rgba(28, 23, 19, 0.38), rgba(28, 23, 19, 0) 22%); }
.hero-content { position: relative; z-index: 1; padding-bottom: 56px; }
.hero-content > * { animation: rise 1.4s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: 0.15s; }
.hero-content > :nth-child(3) { animation-delay: 0.3s; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.8); }
.hero-title { margin: 0 0 20px; max-width: 13em; font-size: clamp(36px, 6vw, 80px); line-height: 1.16; }
.hero-text { margin: 0; max-width: 33em; font-size: clamp(15px, 1.5vw, 18px); color: rgba(255, 255, 255, 0.88); }
@keyframes hero-in { from { opacity: 0.4; transform: scale(1.06); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.booking-wrap { position: relative; z-index: 2; padding: 24px 0 0; }
.booking-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: 24px 20px; background: var(--bg-elevated); box-shadow: 0 30px 60px -40px rgba(43, 39, 35, 0.45); }
.booking-form .field:nth-of-type(3) { grid-column: 1 / -1; }
.booking-form .btn { grid-column: 1 / -1; }
.booking-form-stack { grid-template-columns: 1fr 1fr; padding: 0; background: none; box-shadow: none; }

/* ---------- Home sections ---------- */
.split { display: grid; gap: 48px; align-items: center; }
.split-media img, .split-media .img-placeholder { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split-text .prose { margin-bottom: 32px; max-width: 34em; }

.room-cards { display: grid; gap: 56px; }
.room-card { display: grid; gap: 0; }
.room-card-media { display: block; margin-bottom: 22px; overflow: hidden; }
.room-card-media img, .room-card-media .img-placeholder { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.4s var(--ease); }
.room-card:hover .room-card-media img { transform: scale(1.035); }
.room-card .eyebrow { margin-bottom: 8px; }
.room-card-title { margin: 0 0 8px; font-size: 26px; }
.room-card-title a { text-decoration: none; }
.room-card .price { margin-top: 14px; }

.facility-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 14px; }
.facility-card { display: grid; gap: 4px; text-decoration: none; }
.facility-card img, .facility-card .img-placeholder { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: 14px; transition: opacity 0.5s var(--ease); }
.facility-card:hover img { opacity: 0.88; }
.facility-card .eyebrow { margin: 0; }
.facility-card-title { font-size: 18px; line-height: 1.4; }

.banner { position: relative; display: flex; align-items: flex-end; min-height: 78svh; overflow: hidden; color: #fff; background: #3a332c; }
.banner-img, .banner > .img-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(28, 23, 19, 0.66), rgba(28, 23, 19, 0) 62%); }
.banner-content { position: relative; z-index: 1; padding-bottom: 64px; }
.banner-content .eyebrow { color: rgba(255, 255, 255, 0.8); }
.banner-content p { max-width: 32em; margin: 0 0 28px; color: rgba(255, 255, 255, 0.88); }
.banner-content .display { max-width: 14em; }

/* ---------- Inner pages ---------- */
.page-hero { padding: 64px 0 40px; }
.page-hero .display { margin-bottom: 20px; }
.page-hero-compact { padding: 32px 0 8px; }
.page-hero-compact .display-sm { margin: 0; }

.room-list { display: grid; gap: 80px; }
.room-row { display: grid; gap: 28px; }
.room-row-media { display: block; overflow: hidden; }
.room-row-media img, .room-row-media .img-placeholder { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.4s var(--ease); }
.room-row:hover .room-row-media img { transform: scale(1.03); }
.room-row-body > p:not(.eyebrow):not(.price) { margin: 0 0 24px; color: var(--text-soft); }
.room-row .eyebrow { margin-bottom: 10px; }
.room-row .price { margin-top: 24px; }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 0; }
.specs > div { padding: 12px 0; border-top: 1px solid var(--line); }
.specs dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 2px 0 0; font-size: 15px; }

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { scroll-snap-align: start; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.detail { display: grid; gap: 48px; }
.detail-text .prose { margin-bottom: 36px; font-size: 17px; }
.detail-text .specs { margin-bottom: 40px; }
.detail-text h2.eyebrow { margin-bottom: 14px; }
.amenities { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.amenities li { padding: 10px 0; color: var(--text-soft); border-bottom: 1px solid var(--line); }
.booking-panel { align-self: start; padding: 28px 22px; background: var(--bg-elevated); border: 1px solid var(--line); }
.booking-panel > .price { font-size: 26px; }
.booking-panel .booking-form { margin-top: 24px; }
.booking-result:not(:empty) { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.avail { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; color: var(--ok); }
.avail::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.avail-no { color: var(--danger); }
.nightly { margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; }
.nightly li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--text-soft); border-bottom: 1px dotted var(--border); }
.nightly li.is-released { color: var(--muted); text-decoration: line-through; }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 18px; font-size: 14px; }
.total strong { font-family: var(--serif); font-size: 26px; font-weight: 400; }

.feature-list { display: grid; gap: 88px; }
.feature { display: grid; gap: 28px; scroll-margin-top: 90px; }
.feature-media img, .feature-media .img-placeholder { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hours { display: grid; gap: 2px; margin: 24px 0 0; padding-top: 14px; font-size: 14px; border-top: 1px solid var(--line); }
.hours span { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cta .display-sm { margin-bottom: 28px; }

.info-layout { display: grid; gap: 40px; }
.info-media img, .info-media .img-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.info-sections { display: grid; gap: 56px; }
.info-block { scroll-margin-top: 90px; }
.info-block .specs { margin-bottom: 18px; }
.address { margin: 0 0 14px; font-size: 17px; }

/* ---------- Booking flow ---------- */
.steps { display: flex; gap: 6px 18px; flex-wrap: wrap; margin: 0 0 24px; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps span { display: grid; place-items: center; width: 22px; height: 22px; font-size: 11px; border: 1px solid var(--border); border-radius: 50%; }
.steps [aria-current] { color: var(--text); font-weight: 600; }
.steps [aria-current] span { color: var(--on-primary); background: var(--text); border-color: var(--text); }

.booking-results { margin-top: 40px; }
.results-head { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.results { border-top: 1px solid var(--line); }
.result { display: grid; gap: 18px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.result.is-focus { position: relative; }
.result.is-focus::before { content: ""; position: absolute; left: -20px; top: 28px; bottom: 28px; width: 2px; background: var(--accent); }
.result-media img, .result-media .img-placeholder { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.result.is-unavailable .result-media img { filter: grayscale(0.6); opacity: 0.7; }
.result .eyebrow { margin-bottom: 6px; }
.result-title { margin: 0 0 6px; font-size: 24px; }
.result .link-arrow { margin-top: 14px; }
.result-price .total { display: grid; justify-items: start; gap: 0; margin-bottom: 16px; }
.result-price .total span { color: var(--muted); font-size: 13px; }
.result-price .btn { width: 100%; }

.checkout { display: grid; gap: 40px; }
.summary { align-self: start; background: var(--bg-elevated); border: 1px solid var(--line); }
.summary img, .summary .img-placeholder { width: 100%; aspect-ratio: 21 / 9; min-height: 0; object-fit: cover; }
.summary-body { padding: 22px 20px 24px; }
.summary .eyebrow { margin-bottom: 4px; }
.summary-title { margin: 0 0 16px; font-size: 24px; }
.summary-list { display: grid; gap: 0; margin: 0 0 16px; }
.summary-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.summary-list dt { flex: none; color: var(--muted); }
.summary-list dd { margin: 0; text-align: right; }
.checkout-form { gap: 36px; }
.checkout-form > .alert { margin: 0; }
.choice { display: flex; gap: 14px; padding: 16px 18px; font-size: 15px; border: 1px solid var(--border); cursor: pointer; transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease); }
.choice:has(input:checked) { background: var(--bg-elevated); border-color: var(--text); }
.choice span { display: grid; gap: 2px; }
.choice small { font-size: 13px; color: var(--muted); }
.policy { font-size: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.policy summary { padding: 14px 0; cursor: pointer; color: var(--text-soft); }
.policy .prose { padding-bottom: 14px; }

.confirmation { display: grid; gap: 48px; }
.code-block { display: grid; justify-items: start; gap: 6px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.code-block .eyebrow { margin: 0; }
.code { margin: 0; font-family: var(--serif); font-size: clamp(34px, 6vw, 48px); line-height: 1.1; letter-spacing: 0.06em; }
.confirmation-main .summary-list { margin-bottom: 24px; }
.confirmation-main .notice { margin-top: 28px; }
.confirmation-aside { display: grid; align-content: start; gap: 18px; }
.confirmation-aside img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.confirmation-aside .eyebrow { margin: 6px 0 0; }
.confirmation-aside p { margin: 0; }
.card-form { padding: 28px 22px; background: var(--bg-elevated); border: 1px solid var(--line); }
.input-code { font-family: var(--serif); font-size: 22px; letter-spacing: 0.1em; text-transform: uppercase; }

.status { display: inline-flex; align-items: center; padding: 2px 10px; font: 600 12px/1.6 var(--sans); letter-spacing: 0.02em; white-space: nowrap; color: #3f5236; background: #e3e7da; border-radius: 999px; }
.status-checked_in { color: #2f4a52; background: #dce4e6; }
.status-checked_out { color: #6f675d; background: #e8e2d8; }
.status-cancelled { color: #8a3324; background: #f1deda; }

/* ---------- Static pages ---------- */
.page { padding: 56px 0 96px; }
.page .prose h2 { margin: 2.2em 0 0.6em; font-family: var(--serif); font-size: 21px; font-weight: 400; color: var(--text); }
.page .prose ul { padding-left: 1.2em; }
.auth { display: flex; justify-content: center; padding: 56px 20px 96px; }
.auth .card-form { width: 100%; max-width: 420px; }
.auth h1 { margin: 0 0 8px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; font-size: 14px; color: var(--text-soft); background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 36px; padding-top: 56px; padding-bottom: 44px; }
.footer-brand .logo { height: 18px; }
.footer-brand p { margin: 14px 0 0; color: var(--muted); }
.footer-links { display: grid; align-content: start; gap: 10px; }
.footer-links a { width: fit-content; text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.demo-notice { padding: 32px 0 40px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.demo-notice .eyebrow { margin-bottom: 12px; color: var(--accent); }
.demo-statement { max-width: 52em; margin: 0 0 22px; color: var(--text); }
.maker { display: grid; gap: 8px 32px; margin: 0 0 22px; font-size: 13px; }
.maker > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.maker dt { flex: none; min-width: 7.5em; color: var(--muted); }
.maker dd { margin: 0; }
.contact-img { height: 15px; width: auto; }
.copyright { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- Admin ---------- */
.admin { --radius: 6px; font-size: 15px; line-height: 1.6; background: var(--bg); }
.admin .input { padding: 9px 12px; font-size: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); }
.admin .input:focus { border-color: var(--text); }
.admin select.input { padding-right: 30px; background-position: right 12px center; }
.admin .field { letter-spacing: 0.04em; text-transform: none; font-size: 13px; }
.admin .btn { min-height: 40px; padding: 0 16px; font-size: 14px; letter-spacing: 0; }
.admin .btn-small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.admin .alert { margin: 0 0 16px; border-radius: var(--radius); }
.admin .logo { height: 13px; }
.badge { display: inline-block; padding: 1px 8px; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; }

.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px; background: var(--bg-elevated); border-bottom: 1px solid var(--line); }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.topbar-right a, .topbar-right .btn-link { color: var(--muted); text-decoration: none; }
.topbar-right a:hover, .topbar-right .btn-link:hover { color: var(--text); }
.topbar-right form { margin: 0; }
.topbar-user { display: none; color: var(--muted); }
.admin-body { flex: 1 0 auto; display: flex; flex-direction: column; }
.admin-sidebar { background: var(--surface); border-bottom: 1px solid var(--line); }
.sidebar-nav { display: flex; gap: 4px; padding: 8px 12px; overflow-x: auto; }
.sidebar-nav a { flex: none; padding: 8px 12px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; border-radius: var(--radius); }
.sidebar-nav a:hover { color: var(--text); }
.sidebar-nav a[aria-current="page"] { font-weight: 600; color: var(--text); background: var(--bg-elevated); }
.admin-main { flex: 1; min-width: 0; padding: 24px 16px 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-title { margin: 0; font-size: clamp(22px, 3vw, 28px); font-weight: 600; }
.section-title { margin: 8px 0 0; font-size: 17px; font-weight: 600; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 32px; }

.card { min-width: 0; margin-bottom: 16px; padding: 20px; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius); }
.card > :last-child { margin-bottom: 0; }
.card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.card-title small { font-size: 13px; font-weight: 400; color: var(--muted); }
.card-link { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.card-danger { border-color: #e2bfb7; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
.empty { margin: 0; padding: 16px 0; color: var(--muted); text-align: center; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats .card { margin: 0; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.3; }
.stat-hint { font-size: 12px; color: var(--muted); }

.res-list { margin: 0; padding: 0; list-style: none; }
.res-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.res-list li:last-child { border-bottom: 0; }
.res-list a { display: grid; min-width: 0; text-decoration: none; }
.res-list a span { font-size: 13px; color: var(--muted); }
.res-list a:hover strong { text-decoration: underline; }

.room-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.room-tile { display: grid; gap: 0; padding: 10px 12px; font-size: 12px; text-decoration: none; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--border); border-radius: var(--radius); }
.room-tile strong { font-size: 16px; }
.room-tile span { color: var(--muted); }
.room-tile em { overflow: hidden; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.room-tile.is-occupied { border-left-color: #7d9270; }
.room-tile.is-inhouse { border-left-color: #557a86; background: #e6eef0; }
.room-tile.is-blocked { border-left-color: #b9805f; color: var(--muted); }
.room-tile.is-inactive { opacity: 0.55; border-style: dashed; }

.occupancy { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.occupancy li { display: grid; grid-template-columns: 64px 1fr 40px; align-items: center; gap: 10px; }
.occupancy li > :last-child { text-align: right; color: var(--muted); }
meter { width: 100%; height: 8px; appearance: none; background: var(--surface-2); border: 0; border-radius: 4px; }
meter::-webkit-meter-bar { height: 8px; background: var(--surface-2); border: 0; border-radius: 4px; }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { background: var(--accent); border-radius: 4px; }
meter::-moz-meter-bar { background: var(--accent); border-radius: 4px; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.filters .input { width: auto; flex: 1 1 160px; }
.filters input[type="search"] { flex-basis: 240px; }
.filter-date { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.table th, .table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); }
.table tr:last-child td { border-bottom: 0; }
.table form { margin: 0; }
.table .num { text-align: right; }
.table .empty { padding: 32px 14px; }
.sub { font-size: 12px; color: var(--muted); }
.pager { display: flex; gap: 8px; margin-top: 12px; }

.info { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0 0 18px; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; }
.card .actions { margin-top: 8px; }
.card .actions form { margin: 0; }
.plain-list, .timeline { margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; }
.plain-list li, .timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.timeline li { padding-left: 16px; border-left: 2px solid var(--border); border-bottom: 0; }

.calendar-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.input-small { min-height: 32px; padding: 4px 8px !important; font-size: 13px !important; }
.calendar-nav .inline-form .input { flex: none; width: auto; }
.tape { border-collapse: collapse; font-size: 12px; table-layout: fixed; min-width: 900px; width: 100%; }
.tape th, .tape td { height: 44px; padding: 4px; border: 1px solid var(--line); }
.tape thead th { width: 56px; font-weight: 500; line-height: 1.3; text-align: center; color: var(--muted); background: var(--surface); }
.tape thead th:first-child, .tape tbody th { width: 96px; }
.tape tbody th { font-size: 14px; text-align: left; background: var(--surface); }
.tape tbody th span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.tape .is-weekend { color: var(--accent); }
.tape .is-today { color: var(--text); background: var(--surface-2); }
.tape td.is-inactive { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--line) 6px 7px); }
.bar { display: block; overflow: hidden; padding: 6px 8px; font-size: 12px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; color: #2c3a26; background: #dfe6d5; border-left: 3px solid #7d9270; border-radius: 3px; }
.bar-checked_in { color: #23404a; background: #d8e4e8; border-color: #557a86; }
.bar-checked_out { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.bar-block { color: #6b4530; background: repeating-linear-gradient(-45deg, #f1e3d7 0 6px, #ead8c8 6px 12px); border-color: #b9805f; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.legend .bar { display: inline-block; }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.form-title { margin: 0; font-size: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.weekdays { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; border: 0; font-size: 14px; }
.weekdays legend { margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.weekdays label { display: flex; align-items: center; gap: 4px; }
.form-inline-wide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; align-items: end; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0 0 16px; padding: 0; list-style: none; }
.thumbs li { display: grid; gap: 8px; align-content: start; }
.thumbs img, .content-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.thumb-actions { display: flex; align-items: center; gap: 6px; }
.thumb-actions form { margin: 0; }
.upload-form { display: grid; gap: 8px; }
.content-edit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.content-image { display: grid; gap: 10px; align-content: start; }
.content-image .img-placeholder { aspect-ratio: 3 / 2; min-height: 0; border-radius: var(--radius); }

.rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.rate-grid li { display: grid; padding: 8px 10px; font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.rate-grid .d { color: var(--muted); }
.rate-grid .p { font-size: 14px; font-weight: 600; }
.rate-grid .s { color: var(--muted); }
.rate-grid .is-weekend .d { color: var(--accent); }
.rate-grid .is-override, .legend .key.is-override { background: #f3e9dc; border-color: #d8bfa3; }
.rate-grid .is-stopped, .legend .key.is-stopped { background: repeating-linear-gradient(-45deg, #f1e3d7 0 6px, #ead8c8 6px 12px); }
.legend .key { padding: 2px 8px; border: 1px solid var(--line); border-radius: 3px; }
.legend + .admin-grid { margin-top: 24px; }

@media (prefers-color-scheme: dark) {
  .admin {
    color-scheme: dark;
    --bg: #171513;
    --bg-elevated: #1f1c19;
    --surface: #24211d;
    --surface-2: #2f2a25;
    --text: #ebe5dc;
    --text-soft: #cfc7bb;
    --muted: #9c9388;
    --line: rgba(235, 229, 220, 0.12);
    --border: #3b352e;
    --primary: #ebe5dc;
    --on-primary: #171513;
    --danger: #e08a77;
    --ok: #9cbf8f;
  }
  .admin .alert { background: #3a221d; }
  .admin .alert-ok { background: #24301f; }
  .admin .room-tile.is-inhouse { background: #1e2a2e; }
  .admin .rate-grid .is-override { background: #33291f; border-color: #5c4632; }
  .admin .btn-primary:hover { background: #fff; border-color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* ---------- Tablet / PC ---------- */
@media (min-width: 768px) {
  .container { padding: 0 40px; }
  .hide-sm { display: inline; }
  .section { padding: 136px 0; }
  .section-tight { padding: 56px 0 128px; }
  .section-head { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 64px; }
  .section-head .eyebrow { grid-column: 1 / -1; }
  .section-head .display, .section-head .display-sm { margin: 0; }

  :root { --header-h: 84px; }
  .site-nav { gap: 36px; }
  .logo { height: 18px; }
  .nav-links { display: flex; gap: 32px; font-size: 14px; letter-spacing: 0.04em; }
  .nav-links a { position: relative; padding: 6px 0; text-decoration: none; }
  .nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
  .nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
  .nav-menu { display: none; }
  .btn.nav-book { min-height: 42px; padding: 0 22px; }

  .hero { min-height: 680px; }
  .hero-content { padding-bottom: 136px; }
  .booking-wrap { margin-top: -64px; padding: 0; }
  .booking-form { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; gap: 28px; padding: 30px 36px; }
  .booking-form .field:nth-of-type(3), .booking-form .btn { grid-column: auto; }
  .booking-form .btn { min-width: 160px; }
  .booking-form-stack { grid-template-columns: 1fr 1fr; gap: 20px 16px; padding: 0; }
  .booking-form-stack .field:nth-of-type(3), .booking-form-stack .btn { grid-column: 1 / -1; }

  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 8%; }
  .room-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .room-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-cards-2 .room-card-media img, .room-cards-2 .room-card-media .img-placeholder { aspect-ratio: 3 / 2; }
  .facility-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .banner { min-height: 86svh; }
  .banner-content { padding-bottom: 96px; }

  .page-hero { padding: 120px 0 56px; }
  .page-hero .lead { font-size: 19px; }
  .page-hero-compact { padding: 48px 0 8px; }
  .room-list { gap: 136px; }
  .room-row, .feature { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 7%; align-items: center; }
  .room-row.is-reverse .room-row-media, .feature.is-reverse .feature-media { order: 2; }
  .feature-list { gap: 136px; }

  .gallery { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow: visible; }
  .gallery-main { grid-column: 1 / -1; }
  .gallery-main img { aspect-ratio: 16 / 9; }
  .detail { grid-template-columns: minmax(0, 7fr) minmax(320px, 4fr); gap: 8%; }
  .booking-panel { position: sticky; top: 112px; padding: 36px 32px; }

  .info-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 8%; align-items: start; }
  .info-media { position: sticky; top: 112px; }
  .info-media img { aspect-ratio: 4 / 5; }

  .steps { font-size: 13px; }
  .result { grid-template-columns: 300px minmax(0, 1fr) 240px; gap: 36px; align-items: center; }
  .result-media img { aspect-ratio: 4 / 3; }
  .checkout { grid-template-columns: minmax(0, 1fr) 400px; gap: 8%; }
  .summary { order: 2; position: sticky; top: 112px; }
  .summary img, .summary .img-placeholder { aspect-ratio: 16 / 9; }
  .summary-body { padding: 28px 28px 30px; }
  .confirmation { grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr); gap: 8%; }
  .card-form { padding: 40px 36px; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr; padding-top: 80px; padding-bottom: 64px; }
  .maker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .maker .wide { grid-column: 1 / -1; }

  .admin-topbar { position: sticky; top: 0; z-index: 10; padding: 0 24px; }
  .topbar-user { display: inline; }
  .admin-body { flex-direction: row; }
  .admin-sidebar { flex: none; width: 200px; border-bottom: 0; border-right: 1px solid var(--line); }
  .sidebar-nav { position: sticky; top: 56px; flex-direction: column; padding: 16px 12px; overflow: visible; }
  .admin-main { padding: 32px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .room-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid-wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .span-2 { grid-column: 1 / -1; }
  .form-inline-wide { grid-template-columns: 1.4fr 1fr 1fr 1.4fr auto; }
  .content-edit { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; }
}
