:root {
  --ink: #25302f;
  --muted: #66736f;
  --paper: #fffdfa;
  --shell: #f7f5ef;
  --line: #d7ded9;
  --sea: #0f766e;
  --sea-deep: #134e4a;
  --coral: #d85f44;
  --gold: #f4c66a;
  --sand: #efe6d4;
  --palm: #7fc8b5;
  --mint: #e6f3ee;
  --rose: #f9e5df;
  --shadow: 0 18px 55px rgba(37, 48, 47, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 54px);
  background: rgba(255, 253, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--sea-deep);
}

.booking-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  min-height: calc(100vh - 72px);
  background: var(--shell);
}

.media-panel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--sea-deep);
}

.media-panel img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 78, 74, 0.76), rgba(19, 78, 74, 0.18) 58%, rgba(19, 78, 74, 0.04)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent 42%);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: clamp(32px, 8vw, 86px);
  width: min(720px, calc(100% - 48px));
  color: white;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #ffd8c8;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: 0;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-facts span {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.reserve-panel {
  align-self: center;
  width: min(100%, 520px);
  margin: 32px clamp(18px, 4vw, 54px);
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-heading {
  margin-bottom: 18px;
}

.booking-form,
.guest-fields,
.manual-block-form {
  display: grid;
  gap: 14px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-row.compact {
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 650;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.quote-box {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--mint);
}

.quote-empty,
.form-status {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.quote-line,
.quote-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quote-total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(19, 78, 74, 0.18);
  font-size: 1.12rem;
  font-weight: 900;
}

.quote-alert {
  color: #a83f2d;
  font-weight: 800;
}

.primary-action,
.secondary-action,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.primary-action {
  background: var(--sea);
  color: white;
  padding: 10px 16px;
}

.primary-action:hover {
  background: var(--sea-deep);
}

.primary-action.small {
  min-height: 40px;
}

.secondary-action {
  background: var(--rose);
  color: #873924;
  padding: 10px 14px;
}

.secondary-action:hover {
  background: #f5d2c7;
}

.icon-button {
  width: 44px;
  background: var(--mint);
  color: var(--sea-deep);
  font-size: 1.6rem;
}

.availability-band,
.details-layout,
.gallery-section,
.admin-section {
  padding: clamp(34px, 6vw, 76px) clamp(18px, 4vw, 54px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 22px;
  max-width: 1180px;
}

.month-actions {
  display: flex;
  gap: 10px;
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.month-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.month-title {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday,
.day-cell {
  display: grid;
  place-items: center;
  min-width: 0;
}

.weekday {
  height: 34px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.day-cell {
  aspect-ratio: 1;
  min-height: 42px;
  border-top: 1px solid #edf0ed;
  border-left: 1px solid #edf0ed;
  background: white;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.day-cell:nth-child(7n + 1) {
  border-left: 0;
}

.day-cell.muted {
  color: #bac3bf;
  cursor: default;
}

.day-cell.blocked {
  color: #7b3a2d;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(216, 95, 68, 0.16),
      rgba(216, 95, 68, 0.16) 6px,
      rgba(255, 255, 255, 0.9) 6px,
      rgba(255, 255, 255, 0.9) 12px
    );
}

.day-cell.selected,
.day-cell.in-range {
  background: var(--sea);
  color: white;
}

.day-cell.today {
  outline: 2px solid var(--gold);
  outline-offset: -3px;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--sea);
}

.details-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  background: var(--sea-deep);
  color: white;
}

.details-copy,
.details-list {
  max-width: 1180px;
}

.details-copy p {
  max-width: 58ch;
  color: #dbe8e3;
  font-size: 1.06rem;
}

.stay-description {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.stay-description p {
  margin: 0;
}

.stay-description .stay-notice {
  padding: 12px 14px;
  border: 1px solid rgba(255, 216, 200, 0.42);
  border-radius: 8px;
  background: rgba(216, 95, 68, 0.16);
  color: #ffe5db;
  font-weight: 800;
}

.details-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.details-list article {
  min-height: 142px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.details-list p {
  margin: 0;
  color: #dbe8e3;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  grid-auto-rows: 240px;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
}

.gallery-grid figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--mint);
}

.gallery-grid figure:first-child {
  grid-row: span 2;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(19, 78, 74, 0.78);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-section {
  background: var(--shell);
}

.admin-panel {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.admin-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.admin-panel > summary::-webkit-details-marker {
  display: none;
}

.admin-panel[open] .summary-chevron {
  transform: rotate(180deg);
}

.summary-chevron {
  transition: transform 0.2s ease;
  font-size: 1.4rem;
}

.admin-toolbar,
.admin-grid,
.bookings-block {
  border-top: 1px solid var(--line);
}

.admin-panel.is-locked #saveSources,
.admin-panel.is-locked #syncSources,
.admin-panel.is-locked .admin-grid,
.admin-panel.is-locked .bookings-block {
  display: none;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 12px;
  padding: 18px 20px;
  align-items: end;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 20px;
}

.admin-block {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.bookings-block {
  padding: 20px;
}

.owner-blocks-panel {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.owner-blocks-panel h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.sources-list,
.bookings-list {
  display: grid;
  gap: 12px;
}

.source-row {
  display: grid;
  grid-template-columns: 34px 1fr 1.5fr 84px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.source-row input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  align-self: center;
}

.source-row input[type="color"] {
  min-height: 44px;
  padding: 4px;
}

.source-status {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.booking-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.owner-block-row {
  background: #fbf6ed;
}

.booking-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.booking-actions button {
  min-height: 36px;
  padding: 8px 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--sea-deep);
  font-size: 0.76rem;
  font-weight: 900;
}

.form-status {
  margin: 0;
}

.is-error {
  color: #a83f2d;
}

.is-success {
  color: var(--sea-deep);
}

@media (max-width: 1020px) {
  .booking-shell {
    grid-template-columns: 1fr;
  }

  .media-panel,
  .media-panel img {
    min-height: 540px;
  }

  .reserve-panel {
    width: auto;
    margin-top: -74px;
    position: relative;
    z-index: 4;
  }

  .months-grid,
  .details-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .media-panel,
  .media-panel img {
    min-height: 500px;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.1rem);
  }

  .field-row,
  .field-row.compact,
  .details-list,
  .admin-toolbar,
  .source-row,
  .booking-row {
    grid-template-columns: 1fr;
  }

  .months-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-auto-rows: 230px;
  }

  .gallery-grid figure:first-child {
    grid-row: span 1;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-status {
    grid-column: auto;
  }
}
