:root {
  --night: #1b1545;
  --night-2: #2a1c5c;
  --glow: #c8479e;
  --glow-soft: #e9a0cf;
  --amber: #e8a33d;
  --navy: #1f2a50;
  --clay: #c47a4f;

  --bg: #f4f0f9;
  --surface: #ffffff;
  --surface-2: #ebe5f4;
  --text: #1f1a38;
  --muted: #5d5878;
  --line: #d9d2e8;
  --ok: #2f7d5b;
  --warn: #b5541c;
  --danger: #b3263e;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120e2e;
    --surface: #1d1840;
    --surface-2: #272152;
    --text: #f1ecfb;
    --muted: #b1a9cc;
    --line: #3a3268;
    --ok: #6fd3a2;
    --warn: #f0a26a;
    --danger: #ff8197;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120e2e; --surface: #1d1840; --surface-2: #272152; --text: #f1ecfb;
  --muted: #b1a9cc; --line: #3a3268; --ok: #6fd3a2; --warn: #f0a26a; --danger: #ff8197;
  color-scheme: dark;
}

:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 500; line-height: 1.1; margin: 0; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-style: italic; }
h3 { font-size: 1.25rem; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-glow { background: var(--glow); color: #fff; }
.btn-glow:hover { background: #b23a8a; }
.btn-ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .45rem .9rem; font-size: .9rem; }

/* ── Header ── */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--night) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--night);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 600; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.head-links { display: flex; align-items: center; gap: 1.25rem; }
.head-links a:not(.btn) { text-decoration: none; opacity: .85; font-size: .95rem; }
.head-links a:not(.btn):hover { opacity: 1; }
@media (max-width: 640px) { .head-links a:not(.btn) { display: none; } }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(60% 80% at 85% 20%, rgba(200,71,158,.55), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(232,163,61,.18), transparent 70%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
}
.hero .wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  padding-block: clamp(3rem, 7vw, 6rem);
}
.hero h1 {
  font-size: clamp(2.8rem, 6.6vw, 5.2rem); font-style: italic; font-weight: 400;
  letter-spacing: -.01em; line-height: 1;
}
.hero-lede { margin-top: 1.4rem; font-size: 1.2rem; max-width: 34ch; color: #e6def7; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-facts { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.hero-facts li { padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .92rem; }
.hero-photo { position: relative; }
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 220px 220px 18px 18px;
  box-shadow: 0 30px 80px -20px rgba(200,71,158,.6);
}
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .wrap { gap: 1.6rem; padding-block: 1.5rem 2.5rem; }
  .hero-photo { order: -1; }
  .hero-photo img { aspect-ratio: 16 / 11; border-radius: 140px 140px 16px 16px; }
}

/* ── Sections ── */
section.block { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); max-width: 46ch; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.gallery figcaption { margin-top: .55rem; font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 1.1rem; }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Amenities */
.amen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 2.5rem; }
.amen h3 { margin-bottom: .7rem; padding-bottom: .5rem; border-bottom: 2px solid var(--glow); display: inline-block; }
.amen ul { margin: 0; padding: 0; list-style: none; color: var(--muted); }
.amen li { padding: .22rem 0; }
@media (max-width: 900px) { .amen { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .amen { gap: 1.6rem 1.2rem; font-size: .95rem; } }

.notes { margin-top: 3rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.note { padding: 1.1rem 1.3rem; border-radius: 14px; background: var(--surface-2); }
.note strong { display: block; margin-bottom: .2rem; }
.note p { color: var(--muted); }
@media (max-width: 860px) { .notes { grid-template-columns: 1fr; } }

/* Rules */
.rules { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; }
.rules h3 { margin-bottom: 1rem; }
.rule-list { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: .9rem; }
.rule-list li { counter-increment: r; position: relative; padding-left: 2.6rem; color: var(--muted); }
.rule-list li b { color: var(--text); font-weight: 600; }
.rule-list li::before {
  content: counter(r); position: absolute; left: 0; top: -.1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; font-family: "Fraunces", Georgia, serif; font-style: italic;
  background: color-mix(in srgb, var(--glow) 16%, transparent); color: var(--glow);
}
.policy-col { display: grid; gap: 1rem; }
@media (max-width: 860px) { .rules { grid-template-columns: 1fr; } }

/* ── Booking ── */
.booking { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } }

.cal { background: var(--bg); border-radius: 18px; padding: 1.2rem; }
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.cal-title { font-family: "Fraunces", Georgia, serif; font-size: 1.35rem; font-style: italic; }
.cal-nav { display: flex; gap: .4rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.1rem;
}
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .8rem; color: var(--muted); padding-bottom: .3rem; }
.day {
  aspect-ratio: 1; border: 0; border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; font-size: .95rem; cursor: pointer; position: relative;
}
.day:hover:not([disabled]) { outline: 2px solid var(--glow-soft); }
.day.empty { background: transparent; cursor: default; }
.day[disabled] { color: var(--muted); opacity: .45; cursor: not-allowed; }
.day.booked { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 4px, transparent 4px, transparent 8px); text-decoration: line-through; opacity: .8; }
.day.booked.checkout-ok { cursor: pointer; opacity: 1; }
.day.in-range { background: color-mix(in srgb, var(--glow) 22%, var(--surface)); border-radius: 4px; }
.day.start, .day.end { background: var(--glow); color: #fff; font-weight: 600; }
.day.today::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--amber); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw-free { background: var(--surface); border: 1px solid var(--line); }
.sw-booked { background: repeating-linear-gradient(-45deg, var(--muted), var(--muted) 2px, transparent 2px, transparent 4px); }
.sw-pick { background: var(--glow); }
.cal-hint { margin-top: .8rem; font-size: .95rem; min-height: 1.5em; }
.cal-hint.err { color: var(--danger); }

/* Form */
form.book-form { display: grid; gap: 1rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
label.field { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 10px; padding: .7rem .85rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--glow); }
.field textarea { min-height: 90px; resize: vertical; }
.field small { color: var(--muted); font-weight: 400; }
.dates-readout { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.readout { padding: .7rem .85rem; border-radius: 10px; background: var(--bg); border: 1.5px dashed var(--line); }
.readout span { display: block; font-size: .8rem; color: var(--muted); }
.readout b { font-weight: 600; }
.check { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 12px; background: var(--bg); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--glow); flex: none; }
.check small { display: block; color: var(--muted); }

.guests { border: 0; margin: 0; padding: .4rem 1rem; border-radius: 12px; background: var(--bg); }
.guests legend { font-weight: 500; font-size: .95rem; padding: 0; margin-bottom: .2rem; float: left; width: 100%; padding-top: .6rem; }
.g-row { clear: both; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.g-row:last-of-type { border-bottom: 0; }
.g-row small { display: block; color: var(--muted); font-size: .85rem; }
.stepper { display: flex; align-items: center; gap: .6rem; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.stepper button:hover:not([disabled]) { border-color: var(--glow); }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 1.5ch; text-align: center; font-weight: 600; }
.g-note { font-size: .88rem; color: var(--muted); padding: .2rem 0 .6rem; }
.g-note.extra { color: var(--glow); }
.summary { border-radius: 14px; padding: 1.1rem 1.2rem; background: var(--night); color: #fff; border: 1px solid var(--line); }
.summary .line { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; color: #d9d0f0; }
.summary .total { border-top: 1px solid rgba(255,255,255,.2); margin-top: .5rem; padding-top: .6rem; color: #fff; font-weight: 600; font-size: 1.15rem; }
.summary .save { color: #ffd38a; }
.save-badge { display: inline-block; margin-left: .3rem; padding: .05rem .5rem; border-radius: 999px; background: var(--amber); color: #1b1545; font-size: .75rem; font-weight: 600; }
.summary .fine { margin-top: .5rem; font-size: .85rem; color: #b8aed6; }

.form-msg { font-size: .95rem; }
.form-msg.err { color: var(--danger); }

.done {
  text-align: center; padding: 2.5rem 1.5rem; border-radius: 18px; background: var(--bg);
}
.done .ref { font-family: "Fraunces", Georgia, serif; font-size: 2.2rem; font-style: italic; color: var(--glow); margin: .4rem 0 1rem; }
.done p { color: var(--muted); max-width: 40ch; margin: 0 auto .6rem; }

/* Footer */
.site-foot { background: var(--night); color: #d9d0f0; padding-block: 3rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; }
.site-foot a { color: #fff; display: inline-block; padding: .35rem 0; }
.site-foot .admin-link { opacity: .5; font-size: .85rem; }

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ── Interactive rules ── */
.rule-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; color: var(--muted); font-size: .9rem; }
.link-btn { font: inherit; font-weight: 600; color: var(--glow); background: none; border: 0; cursor: pointer; padding: .6rem 0 .6rem .8rem; min-height: 44px; }
.rule-list { display: grid; gap: .6rem; }
.rule { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.rule[open] { border-color: var(--glow); box-shadow: 0 8px 24px -16px var(--glow); }
.rule summary, .pol summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; min-height: 52px; }
.rule summary::-webkit-details-marker, .pol summary::-webkit-details-marker { display: none; }
.r-ico { font-size: 1.35rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--glow) 12%, transparent); flex: none; }
.r-title { font-weight: 600; flex: 1; }
.r-chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; flex: none; margin-right: .3rem; }
details[open] > summary .r-chev { transform: rotate(-135deg); }
.rule p { padding: 0 1rem 1rem 4rem; color: var(--muted); }
.pol { padding: 0; }
.pol summary { padding: 1rem 1.2rem; justify-content: space-between; }
.pol p { padding: 0 1.2rem 1.1rem; }
details[open] > p { animation: fadeDown .2s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .rule p { padding-left: 1rem; } }

/* ── Gallery lightbox ── */
.g-open { all: unset; display: block; position: relative; cursor: zoom-in; border-radius: 14px; overflow: hidden; width: 100%; }
.g-open:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.g-open img { transition: transform .35s ease; }
.g-open:hover img { transform: scale(1.04); }
.g-zoom { position: absolute; right: .6rem; bottom: .6rem; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(27,21,69,.7); color: #fff; font-size: .95rem; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12,9,32,.97); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 3.5rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 2rem); }
.lightbox figure { margin: 0; max-width: min(1000px, 100%); max-height: 100%; display: grid; gap: .7rem; justify-items: center; }
.lightbox img { max-height: calc(100dvh - 9rem); width: auto; max-width: 100%; border-radius: 12px; object-fit: contain; touch-action: pan-y; user-select: none; }
.lightbox figcaption { color: #fff; font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 1.2rem; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.5rem; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-close { top: calc(env(safe-area-inset-top, 0px) + .8rem); right: 1rem; font-size: 1.1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem); transform: none; }
  .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); }
  .lightbox { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 5rem); }
}
body.no-scroll { overflow: hidden; }

/* ── Mobile sticky booking bar ── */
.mobile-bar { display: none; }
@media (max-width: 820px) {
  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    justify-content: space-between; align-items: center; gap: 1rem;
    padding: .75rem 1.2rem calc(env(safe-area-inset-bottom, 0px) + .75rem);
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(0,0,0,.25);
    transition: transform .25s ease;
  }
  .mobile-bar.away { transform: translateY(110%); }
  .mobile-bar b { font-size: 1.15rem; }
  .mobile-bar span { color: var(--muted); font-size: .9rem; }
  .mobile-bar small { display: block; color: var(--muted); font-size: .8rem; white-space: nowrap; }
  .mobile-bar .btn { white-space: nowrap; flex: none; padding: .75rem 1.1rem; }
  .mobile-bar > div { min-width: 0; }
  .site-foot { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6rem); }
}
@media (max-width: 380px) {
  .mobile-bar { padding-inline: .9rem; gap: .5rem; }
  .mobile-bar .save-badge { font-size: .7rem; padding: .05rem .4rem; margin-left: .15rem; }
}

/* ── Cozy music button ── */
.music-btn {
  position: fixed; left: 1.2rem; bottom: calc(env(safe-area-inset-bottom, 0px) + 1.2rem); z-index: 40;
  display: inline-flex; align-items: center; gap: .6rem;
  font: inherit; font-size: .9rem; font-weight: 600;
  padding: .7rem 1.05rem; min-height: 44px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--glow) 40%, transparent);
  background: color-mix(in srgb, var(--night) 88%, transparent); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -12px rgba(200,71,158,.7);
  transition: transform .15s ease, background .2s ease;
}
.music-btn:hover { transform: translateY(-2px); }
.music-btn[aria-pressed="true"] { background: var(--glow); border-color: var(--glow); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 4px; border-radius: 2px; background: currentColor; }
.music-btn[aria-pressed="true"] .eq i { animation: eq 1s ease-in-out infinite; }
.music-btn[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: .25s; }
.music-btn[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: .5s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 14px; } }
@media (max-width: 820px) {
  .music-btn { left: auto; right: .9rem; bottom: calc(env(safe-area-inset-bottom, 0px) + 5.8rem); width: 48px; height: 48px; padding: 0; justify-content: center; }
  .music-btn .music-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .music-btn:has(+ .mobile-bar.away) { bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem); }
}

@media (max-width: 340px) { .mobile-bar .save-badge { display: none; } }
