/* Living Light listing pages — Airbnb-like, more considered. */
body.listing {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
  padding-bottom: 5.5rem;
}
@media (min-width: 861px) {
  body.listing { padding-bottom: 0; }
}

/* Subtle time-of-day wash on chrome, not on the photographs */
body.listing .site-header {
  transition: background-color 0.6s ease, border-color 0.6s ease;
}
html[data-tod="dawn"] body.listing { background: color-mix(in srgb, var(--bg) 92%, #f3d5b0 8%); }
html[data-tod="dusk"] body.listing { background: color-mix(in srgb, var(--bg) 90%, #c0843a 10%); }
html[data-tod="night"] body.listing { background: color-mix(in srgb, var(--bg) 88%, #1a2433 12%); }

.listing-main {
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: calc(var(--banner-h) + var(--header-h) + 0.9rem) 0 3.5rem;
}

/* ----- Mosaic hero ----- */
.mosaic {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "main a b"
    "main c d";
  gap: 0.4rem;
  height: min(62vh, 34rem);
  min-height: 18rem;
  border-radius: 1.05rem;
  overflow: hidden;
  isolation: isolate;
}
.mosaic-main {
  grid-area: main;
  position: relative;
  overflow: hidden;
  background: #1a1410;
}
.mosaic > .mosaic-tile:nth-child(2) { grid-area: a; }
.mosaic > .mosaic-tile:nth-child(3) { grid-area: b; }
.mosaic > .mosaic-tile:nth-child(4) { grid-area: c; }
.mosaic > .mosaic-tile:nth-child(5) { grid-area: d; }
.mosaic-tod,
.mosaic-showall { position: absolute; }
.mosaic-tile {
  position: relative;
  overflow: hidden;
  background: #1a1410;
  cursor: pointer;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.mosaic-main { cursor: pointer; border: 0; padding: 0; width: 100%; height: 100%; }
.mosaic picture, .mosaic img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  max-width: none;
}
.mosaic-main img { transform-origin: center center; will-change: transform; }
.mosaic-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}
.mosaic-tile:hover img,
.mosaic-main:hover img { transform: scale(1.035); }
.mosaic-showall {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 3;
  appearance: none;
  border: 1px solid rgba(23, 32, 40, 0.18);
  background: rgba(255, 251, 245, 0.94);
  color: var(--ink);
  font: 700 0.82rem var(--font-body);
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 20, 24, 0.16);
  transition: transform 0.18s ease, background 0.18s ease;
}
.mosaic-showall:hover { transform: translateY(-1px); background: #fff; }
.mosaic-tod {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  mix-blend-mode: multiply;
  opacity: 0.18;
  background: transparent;
}
html[data-tod="dawn"] .mosaic-tod { background: #f0c38a; opacity: 0.14; }
html[data-tod="day"] .mosaic-tod { opacity: 0; }
html[data-tod="dusk"] .mosaic-tod { background: #c46a2a; opacity: 0.16; }
html[data-tod="night"] .mosaic-tod { background: #1a2a44; opacity: 0.22; mix-blend-mode: multiply; }

@media (max-width: 700px) {
  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(14rem, 42vh) 6.8rem;
    grid-template-areas:
      "main main"
      "a b";
    height: auto;
    min-height: 0;
    border-radius: 0.85rem;
  }
  .mosaic-main { grid-area: main; }
  .mosaic > .mosaic-tile:nth-child(4),
  .mosaic > .mosaic-tile:nth-child(5) { display: none; }
}

/* ----- Two-column body ----- */
.listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22.5rem;
  gap: 2.4rem 3rem;
  margin-top: 1.7rem;
  align-items: start;
}
.listing-copy { min-width: 0; }
.listing-booking-col {
  position: sticky;
  top: calc(var(--banner-h) + var(--header-h) + 0.85rem);
}
@media (max-width: 860px) {
  .listing-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .listing-booking-col { position: static; display: none; } /* phone uses the bottom bar + sheet */
}

.listing-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.listing-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--ink);
}
.listing-place {
  margin: 0.55rem 0 0;
  color: var(--ink-muted);
  font-size: 1.02rem;
}
.listing-stats {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.2rem;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-weight: 600;
}
.listing-stats li:not(:last-child)::after {
  content: "·";
  margin: 0 0.55rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.listing-rating {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.host-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.25rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.host-mark {
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--surface-2, #efe6d6);
  color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  flex: 0 0 auto;
}
.host-line h2 { margin: 0; font-size: 1.05rem; font-family: var(--font-display); letter-spacing: -0.02em; }
.host-line p { margin: 0.15rem 0 0; color: var(--ink-muted); font-size: 0.92rem; }

/* Highlights */
.highlights {
  display: grid;
  gap: 0.9rem 1.2rem;
  margin: 1.5rem 0 0;
}
@media (min-width: 640px) {
  .highlights { grid-template-columns: 1fr 1fr; }
}
.highlight {
  display: grid;
  grid-template-columns: 1.7rem 1fr;
  gap: 0.7rem;
  align-items: start;
}
.highlight svg { width: 1.45rem; height: 1.45rem; margin-top: 0.1rem; color: var(--ink); }
.highlight h3 { margin: 0; font-size: 1rem; font-family: var(--font-display); letter-spacing: -0.02em; }
.highlight p { margin: 0.2rem 0 0; color: var(--ink-muted); font-size: 0.92rem; }

.listing-section { margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.listing-section h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.listing-section p { margin: 0 0 0.75rem; color: var(--ink); }
.listing-section .lede { color: var(--ink-muted); }
.prose p + p { margin-top: 0.7rem; }
.prose h3 { margin: 1.1rem 0 0.35rem; font-family: var(--font-display); font-size: 1.15rem; }

/* Sleep cards */
.sleep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.8rem;
}
.sleep-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  overflow: hidden;
  background: var(--surface, #fffaf3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sleep-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 24, 28, 0.08); }
.sleep-card img { width: 100%; height: 8.2rem; object-fit: cover; }
.sleep-card .sleep-body { padding: 0.75rem 0.85rem 0.95rem; }
.sleep-card h3 { margin: 0; font-size: 1rem; font-family: var(--font-display); }
.sleep-card p { margin: 0.25rem 0 0; color: var(--ink-muted); font-size: 0.9rem; }

/* Amenities */
.amenity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.amenity-grid li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.55rem;
  align-items: start;
  font-size: 0.95rem;
}
.amenity-grid svg, .amenity-check {
  width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; color: var(--ink);
}
.amenity-check {
  display: inline-block;
  border-bottom: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
  width: 0.55rem; height: 0.3rem;
  transform: rotate(-45deg);
  margin: 0.45rem 0.3rem 0 0.2rem;
}
.btn-text {
  appearance: none;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font: 700 0.92rem var(--font-body);
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
}
.btn-text:hover { background: var(--surface-2, #efe6d6); }

.rule-list, .note-list { margin: 0; padding-left: 1.15rem; color: var(--ink); }
.rule-list li, .note-list li { margin: 0 0 0.4rem; }
.arrival-note { color: var(--ink-muted); }

/* Nearby */
.nearby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.7rem;
}
.nearby-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.8rem;
  overflow: hidden;
  background: var(--surface, #fffaf3);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nearby-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 24, 28, 0.08); color: inherit; }
.nearby-card img { width: 100%; height: 7.2rem; object-fit: cover; }
.nearby-card .nearby-body { padding: 0.65rem 0.75rem 0.8rem; }
.nearby-card h3 { margin: 0; font-size: 0.95rem; font-family: var(--font-display); }
.nearby-card p { margin: 0.25rem 0 0; font-size: 0.82rem; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.other-cabin {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface, #fffaf3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.other-cabin:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 24, 28, 0.08); color: inherit; }
.other-cabin img { width: 100%; height: 6.2rem; object-fit: cover; border-radius: 0.65rem; }
.other-cabin h3 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -0.02em; }
.other-cabin p { margin: 0.25rem 0 0; color: var(--ink-muted); font-size: 0.92rem; }
.back-story { margin: 1.2rem 0 0; font-size: 0.92rem; }

.listing-foot {
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.88rem;
}
.listing-foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.4rem; }
.listing-foot a { color: inherit; }

/* ----- Booking card ----- */
.booking-card {
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: var(--surface, #fffaf3);
  box-shadow: 0 12px 36px rgba(20, 24, 28, 0.1);
  padding: 1.15rem 1.15rem 1.2rem;
}
.booking-rates {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.booking-rates b { font-weight: 700; }
.booking-rates span { font-family: var(--font-body); font-size: 0.88rem; font-weight: 500; color: var(--ink-muted); letter-spacing: 0; }
.season-note {
  margin: 0.45rem 0 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 0.2rem 0 0.7rem;
}
.date-fields label {
  display: block;
  padding: 0.5rem 0.7rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.date-fields label + label { border-left: 1px solid var(--line); }
.date-fields input {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  font: 600 0.95rem var(--font-body);
  color: var(--ink);
  padding: 0;
  margin-top: 0.15rem;
}
.date-fields input:focus { outline: none; }
.cal-wrap { margin: 0 0 0.7rem; }
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.4rem; margin-bottom: 0.4rem;
}
.cal-nav h3 { margin: 0; font-size: 0.95rem; font-family: var(--font-display); }
.cal-nav button {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  width: 2rem; height: 2rem; border-radius: 50%; cursor: pointer; color: var(--ink);
  font-size: 1rem;
}
.cal-nav button:hover { background: var(--surface-2, #efe6d6); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.1rem;
  text-align: center;
}
.cal-dow {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-muted); padding: 0.25rem 0;
}
.cal-day {
  appearance: none; border: 0; background: transparent;
  aspect-ratio: 1; border-radius: 50%;
  font: 600 0.8rem var(--font-body); color: var(--ink);
  cursor: pointer; position: relative;
}
.cal-day:hover:not(:disabled) { background: var(--surface-2, #efe6d6); }
.cal-day:disabled { color: var(--ink-muted); opacity: 0.35; cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.cal-day.in-range { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 0; }
.cal-day.start, .cal-day.end {
  background: var(--accent); color: var(--accent-ink); border-radius: 50%;
}
.cal-empty { aspect-ratio: 1; }
.cal-legend {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.price-break { margin: 0.2rem 0 0.8rem; padding: 0; list-style: none; }
.price-break li {
  display: flex; justify-content: space-between; gap: 0.8rem;
  padding: 0.28rem 0; font-size: 0.92rem;
}
.price-break .total {
  border-top: 1px solid var(--line);
  margin-top: 0.35rem; padding-top: 0.55rem;
  font-weight: 700; font-size: 1.02rem;
}
.deposit-note, .tax-note, .cal-source {
  margin: 0 0 0.45rem; font-size: 0.8rem; color: var(--ink-muted);
}
.booking-card .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.booking-card .btn { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; }
.reserve-status { margin: 0.55rem 0 0; font-size: 0.88rem; color: var(--ink-muted); }
.booking-card .btn-clear {
  width: 100%; margin-top: 0.45rem;
  background: transparent; border: 0; color: var(--ink-muted);
  font: 600 0.82rem var(--font-body); cursor: pointer; text-decoration: underline;
}

/* Mobile booking bar */
.booking-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  background: var(--surface, #fffaf3);
  border-top: 1px solid var(--line);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(16, 20, 24, 0.08);
  align-items: center;
  gap: 0.8rem;
}
.booking-bar .bar-rates { margin: 0; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.02em; }
.booking-bar .bar-rates span { display: block; font-family: var(--font-body); font-size: 0.75rem; color: var(--ink-muted); font-weight: 500; }
.booking-bar .btn { margin-left: auto; }
@media (max-width: 860px) {
  .booking-bar { display: flex; }
}

/* Phone booking sheet */
.booking-sheet {
  display: none;
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  overflow: auto;
  padding: calc(var(--banner-h) + 0.6rem) 1rem 2rem;
}
body.sheet-open .booking-sheet { display: block; }
body.sheet-open { overflow: hidden; }
.sheet-close {
  appearance: none; border: 0; background: transparent;
  font: 700 0.92rem var(--font-body); color: var(--ink);
  padding: 0.4rem 0 0.8rem; cursor: pointer;
}

/* ----- Gallery overlay + lightbox ----- */
.gallery-overlay, .amenity-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 85;
  background: var(--bg);
  overflow: auto;
  padding: 1rem 1rem 3rem;
}
body.gallery-open .gallery-overlay,
body.amenity-open .amenity-overlay { display: block; }
body.gallery-open, body.amenity-open { overflow: hidden; }
.overlay-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 0.8rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0 0.7rem;
}
.overlay-bar h2 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; flex: 1; }
.overlay-close, .lb-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 0.4rem 0.8rem;
  font: 700 0.88rem var(--font-body); cursor: pointer; color: var(--ink);
}
.gallery-section { margin: 1.4rem 0 0; }
.gallery-section h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.4rem;
}
.gallery-mosaic button {
  appearance: none; border: 0; padding: 0; background: #1a1410;
  border-radius: 0.45rem; overflow: hidden; cursor: pointer; aspect-ratio: 4/3;
}
.gallery-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.gallery-mosaic button:hover img { transform: scale(1.04); }

.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8, 10, 14, 0.94);
  color: #f3efe6;
  align-items: center; justify-content: center;
}
body.lightbox-open .lightbox { display: flex; }
.lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 86vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 0.3rem;
}
.lightbox .lb-caption {
  position: absolute; left: 1rem; right: 1rem; bottom: 0.8rem;
  text-align: center; font-size: 0.9rem; color: rgba(243,239,230,0.85);
}
.lightbox .lb-close {
  position: absolute; top: 0.8rem; right: 0.8rem;
  appearance: none; border: 0; background: transparent;
  color: #f3efe6; font: 700 0.95rem var(--font-body); cursor: pointer;
}
.lightbox .lb-prev, .lightbox .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  appearance: none; border: 1px solid rgba(243,239,230,0.3);
  background: rgba(10,14,18,0.4); color: #f3efe6;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  cursor: pointer; font-size: 1.2rem;
}
.lightbox .lb-prev { left: 0.7rem; }
.lightbox .lb-next { right: 0.7rem; }

.amenity-cats { width: min(44rem, 100%); margin: 0 auto; }
.amenity-cats h3 { margin: 1.2rem 0 0.4rem; font-family: var(--font-display); font-size: 1.2rem; }
.amenity-cats ul { margin: 0; padding-left: 1.1rem; }
.amenity-cats li { margin: 0.25rem 0; }

@media (max-width: 700px) {
  .listing-main { width: calc(100% - 1.2rem); }
  .amenity-grid { grid-template-columns: 1fr; }
  .other-cabin { grid-template-columns: 6.4rem 1fr; }
}

body.listing .mosaic img,
body.listing .sleep-card img,
body.listing .nearby-card img,
body.listing .other-cabin img,
body.listing .gallery-mosaic img {
  max-width: none;
}
body.listing .lightbox img {
  max-width: min(96vw, 1200px);
  height: auto;
}
