.test-banner {
  background: #7c2d12;
  color: #fff;
  text-align: center;
  font-weight: 700;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
}

.page {
  padding-top: clamp(1.6rem, 4vw, 3rem);
  padding-bottom: 3rem;
}
.back { color: var(--marsh-2); font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }

.room-layout { display: grid; gap: 1.75rem; align-items: start; }
.room-layout > *, .split > *, .house-grid, .other-rooms, .gallery, picture { min-width: 0; max-width: 100%; }
.room-title { margin-top: 1.35rem; }
.gallery { margin: 0.4rem 0 0; }
.gallery-stage { border-radius: var(--radius); overflow: hidden; background: var(--line); }
.gallery-slide { display: none; }
.gallery-slide.is-on { display: block; }
.gallery picture { width: 100%; }
.room-photo, .gallery-stage img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border-radius: 0; background: var(--line); }
.gallery figcaption { margin-top: 0.55rem; color: var(--muted); font-size: 0.95rem; }
.gallery-thumbs { display: flex; gap: 0.55rem; margin-top: 0.65rem; }
.gallery-thumbs button {
  width: 5.5rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
  cursor: pointer;
  line-height: 0;
}
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--marsh); }
.gallery-thumbs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; height: auto; }
.room-facts { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.35rem; }
.room-facts li { padding-left: 0.9rem; position: relative; }
.room-facts li::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--gold); }

.house-grid { display: grid; gap: 0.8rem; margin-top: 0.6rem; }
@media (min-width: 560px) { .house-grid { grid-template-columns: 1fr 1fr; } }
.house-grid figure { margin: 0; display: flex; flex-direction: column; }
.house-grid picture { aspect-ratio: 4/3; overflow: hidden; border-radius: 14px; background: var(--line); }
.house-grid img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border-radius: 0; }
.house-grid figcaption { margin-top: 0.3rem; font-size: 0.88rem; color: var(--muted); }

.other-rooms { margin-top: 2rem; }
.other-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.4rem;
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 960px) {
  .other-row {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    gap: 1rem;
  }
}
.other-row a {
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.other-row img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.other-row span { display: block; padding: 0.55rem 0.7rem 0.7rem; font-weight: 600; color: var(--marsh); }

.booking-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.1rem 1.25rem;
}
.booking-box h2, .booking-box h3 { margin-bottom: 0.25rem; }
.booking-intro { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 960px) {
  .room-layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 2.75rem; }
  .room-layout .booking-box {
    position: sticky;
    top: calc(var(--header) + 1rem);
    align-self: start;
    padding: 1.35rem 1.25rem 1.45rem;
  }
}

.booking-form, .stack { display: grid; gap: 0.75rem; }
.field { display: grid; gap: 0.3rem; }
.field span, .booking-form label, .admin-card label, .stack label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}
.date-row { display: grid; gap: 0.7rem; }
@media (min-width: 560px) { .date-row { grid-template-columns: 1fr 1fr; } }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d9d0c3;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: 400 1rem/1.4 var(--font);
  color-scheme: light;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--marsh); outline-offset: 1px; border-color: var(--marsh); }
.field-hint { margin: 0; color: var(--muted); font-size: 0.9rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f3c0ba;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  margin: 0.4rem 0 0.2rem;
}
.alert p { margin: 0 0 0.35rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: #b7e4c7; }
.small { font-size: 0.88rem; color: var(--muted); margin: 0.8rem 0 0; }
.stay-summary {
  background: var(--bg);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
}
.stay-summary p { margin: 0 0 0.35rem; }
.night-lines { list-style: none; margin: 0.35rem 0 0; padding: 0; display: grid; gap: 0.2rem; }
.night-lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.stay-warn { color: #7c2d12; font-weight: 700; margin: 0.45rem 0 0; }

.cal { margin-top: 0.4rem; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.cal-nav button {
  background: var(--bg);
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--marsh);
}
.cal-nav button:disabled { opacity: 0.35; cursor: default; }
.cal-nav span { font-weight: 700; color: var(--marsh); text-transform: capitalize; }
.cal-months { display: grid; grid-template-columns: 1fr; gap: 1rem; min-width: 0; }
.cal-month, .cal-grid { min-width: 0; }
.cal-day, .cal-grid .dow { min-width: 0; }
.cal-month h4 { text-align: center; font-family: var(--font); font-weight: 700; font-size: 1rem; margin: 0 0 0.35rem; text-transform: capitalize; color: var(--marsh); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-grid .dow { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; font-weight: 700; padding: 0.2rem 0; }
.cal-day {
  min-height: 44px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  font: 600 0.95rem/1 var(--font);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}
.cal-day:hover:not(:disabled) { background: var(--sand); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.cal-day.busy { background: #e7e1d8; color: #5c564e; text-decoration: line-through; cursor: not-allowed; }
.cal-day.past { color: #b3aa9e; cursor: not-allowed; }
.cal-day.sel { background: var(--marsh); color: var(--paper); }
.cal-day.range { background: #efe4d2; color: var(--marsh); border-radius: 4px; }
.cal-day.co-only { background: linear-gradient(135deg, var(--white) 50%, #e7e1d8 50%); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 0.55rem 1.1rem; justify-content: flex-start; font-size: 0.92rem; color: var(--ink); margin-top: 0.85rem; }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.cal-legend i { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); flex: 0 0 auto; }
.lg-busy { background: #e7e1d8; }
.lg-sel { background: var(--marsh); }
.lg-free { background: var(--white); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (min-width: 860px) {
  .cal-months { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .cal-month { background: var(--bg); border-radius: 14px; padding: 0.65rem 0.45rem 0.75rem; }
  .cal-day { min-height: 40px; }
  .cal-nav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}
@media (max-width: 859px) {
  .cal-months .cal-month:nth-child(2) { display: none; }
  .cal-month h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

.recap { width: 100%; border-collapse: collapse; margin: 0.6rem 0 0.2rem; }
.recap th, .recap td { padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.recap th { color: var(--muted); font-weight: 600; width: 46%; }
.recap .total th, .recap .total td { font-weight: 700; color: var(--marsh); font-size: 1.12rem; border-bottom: 0; }
.summary { max-width: 40rem; margin: 0 auto; }
.sandbox-pay { border: 3px dashed #7c2d12; }
.sandbox-label, .tag-test {
  background: #7c2d12;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}
.sandbox-label { display: block; text-align: center; margin-bottom: 0.8rem; padding: 0.45rem 0.6rem; }
.status-ok h2, .status-ok h3 { color: var(--ok); }
.status-wait h2, .status-wait h3 { color: #7a5a32; }
.status-warn h2, .status-warn h3 { color: #7c2d12; }

.sticky-book { display: none; }
@media (max-width: 959px) {
  body.page-room { padding-bottom: 4.8rem; }
  .sticky-book {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 45;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    background: var(--marsh);
    color: var(--paper);
    text-decoration: none;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.16);
  }
  .sticky-book:hover { color: var(--paper); }
  .sticky-book-price { font-size: 0.92rem; }
  .sticky-book-action {
    background: var(--sand);
    color: var(--marsh);
    font-weight: 700;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    white-space: nowrap;
  }
  .sticky-book.is-hidden { display: none; }
}

.contact-layout { display: grid; gap: 1.2rem; align-items: start; }
@media (min-width: 860px) { .contact-layout { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch; } }
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}
.contact-card p { margin: 0.35rem 0; }
.contact-card h2 { font-size: 1.4rem; }

.admin { padding-top: 0.4rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-top h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.admin-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 1.1rem 0;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.admin-tabs a {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.admin-tabs a.on { background: var(--marsh); color: var(--paper); border-color: var(--marsh); }
.filters { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; align-items: center; }
.filters a { font-weight: 600; }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin: 0.8rem 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 720px; }
.admin-table th, .admin-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: var(--bg); font-weight: 700; }
.admin-table small, .admin-table .url { color: var(--muted); word-break: break-word; }
.st-cancelled td, .st-expired td { opacity: 0.6; }
.st-paid_conflict td { background: var(--danger-bg); }
.admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.8rem 0;
  display: grid;
  gap: 0.75rem;
}
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 720px) { .admin-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } .span-2 { grid-column: span 2; } }
.admin-card textarea { min-height: 80px; }
.chk { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.chk input { width: auto; min-height: 0; }
.btn-small {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font: 600 0.82rem/1 var(--font);
  min-height: 36px;
}
.btn-small.danger { background: var(--danger-bg); color: var(--danger); border-color: #f3c0ba; }
input.copy { font-size: 0.8rem; min-width: 16rem; }
.login-box { max-width: 26rem; margin: 1rem auto; }

@media (max-width: 800px) {
  .admin-table { min-width: 0; }
  .table-wrap { overflow: visible; background: transparent; border: 0; }
  .admin-table tr {
    display: grid;
    gap: 0.15rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    margin: 0 0 0.75rem;
  }
  .admin-table tr.is-head { display: none; }
  .admin-table td { display: grid; gap: 0.1rem; padding: 0.35rem 0; border: 0; }
  .admin-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
  }
  .st-paid_conflict td { background: transparent; }
  .st-paid_conflict { background: var(--danger-bg); }
}
