:root {
  --ink: #17323a;
  --muted: #5d6f76;
  --sea: #1d6b86;
  --sea-deep: #123744;
  --navy: #16324a;
  --sand: #f4efe6;
  --paper: #fffdf9;
  --line: #e5d9cb;
  --coral: #e48976;
  --lilac: #c9a4d4;
  --ok: #1f7a52;
  --warn: #9a5b12;
  --bad: #9d3b32;
  --shadow: 0 18px 50px rgba(18, 55, 68, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, #d7ebf2 0%, transparent 55%),
    var(--sand);
  font-family: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
a { color: var(--sea); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button, .btn, .btn-ghost, .btn-bad, a.btn { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sea);
  outline-offset: 2px;
}
input, select, textarea { font-size: 16px; }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 28px;
  background: rgba(255, 253, 249, 0.9);
  border-bottom: 1px solid rgba(229, 217, 203, 0.9);
  backdrop-filter: blur(12px);
}
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand img { border-radius: 14px; background: white; }
.brand strong { display: block; font-size: 18px; letter-spacing: -0.03em; }
.brand small { color: var(--muted); }
.top nav { display: flex; gap: 18px; align-items: center; }
.top nav a { color: var(--ink); font-weight: 500; }
#nav-account {
  background: var(--sea-deep);
  color: white !important;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 28px auto 64px; }
.hero, .split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: start; }
.hero { grid-template-columns: 1fr; container-type: inline-size; }
.kicker { color: var(--sea); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
h1 { font-size: clamp(32px, 5vw, 64px); line-height: 0.98; letter-spacing: -0.045em; margin: 8px 0 12px; }
.page-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.05; }
h2 { font-size: 32px; letter-spacing: -0.04em; margin: 0 0 8px; }
h3 { margin: 0 0 6px; letter-spacing: -0.03em; }
.lead { font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero .lead {
  max-width: none;
  font-size: min(16px, 2.55cqi);
  line-height: 1.35;
  white-space: nowrap;
}
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.facts span, .pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
}

.section { margin-top: 54px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card, .widget, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 18px; }
.card .swatch, a.swatch { height: 160px; border-radius: 16px; margin-bottom: 14px; display: flex; align-items: flex-end; padding: 14px; color: white; font-weight: 700; text-decoration: none; }
.photo-frame { display: block; height: 250px; border-radius: 16px; margin-bottom: 14px; overflow: hidden; }
.photo-frame.tall { height: 310px; border-radius: 24px; }
.section-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 46%; display: block; }
.section-photo.mirror { transform: scaleX(-1); }
.swatch.a { background: linear-gradient(160deg, #7eb7c9, #1d6b86 45%, #16324a); }
.swatch.b { background: linear-gradient(160deg, #f2c2b6, #e48976 42%, #8d4d6e); }
.price { font-size: 28px; letter-spacing: -0.04em; }
.price .from, .price small { font-size: 15px; color: var(--muted); letter-spacing: 0; font-weight: 500; }
.amenities { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.amenities span { background: var(--sand); border-radius: 999px; padding: 4px 10px; font-size: 13px; }

.btn, .btn-ghost, .btn-bad {
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 12px 16px;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn { background: var(--sea-deep); color: white; }
.btn:hover { text-decoration: none; background: #0d2b36; }
.btn-ghost { background: white; border: 1px solid var(--line); color: var(--ink); }
.btn-bad { background: #f8e8e4; color: var(--bad); }
.btn.wide, .btn-ghost.wide, .btn-bad.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: wait; }

.search {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr 0.8fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
}
.search label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.search input {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 12px;
  width: 100%;
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 14px;
}
.tile h2 { font-size: 20px; margin: 0 0 10px; }
.tile p { margin: 0 0 8px; }
.tile p:last-child { margin-bottom: 0; }
.tile-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tile-list li { background: var(--sand); border-radius: 999px; padding: 4px 10px; font-size: 14px; }
.tile-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tile-specs div { background: var(--sand); border-radius: 14px; padding: 8px 10px; }
.tile-specs b { display: block; letter-spacing: -0.03em; }
.tile-specs span { color: var(--muted); font-size: 13px; }
.block { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.block h2 { font-size: 22px; }
.specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.specs-grid div, .amenity-grid div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.specs-grid b { display: block; font-size: 18px; letter-spacing: -0.03em; }
.specs-grid span, .meta { color: var(--muted); font-size: 13px; }
.amenity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.amenity-grid div { line-height: 1.35; }
.amenity-grid .wide { grid-column: 1 / -1; }
.guide { list-style: none; margin: 4px 0 0; padding: 0; max-width: 640px; }
.guide li {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 26px;
  padding: 0 0 8px;
  font-size: 15px;
  line-height: 1.3;
}
.guide li:last-child { padding-bottom: 0; }
.guide li::before {
  content: "→";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e7f3f7;
  color: var(--sea);
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
}
.guide li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 28px;
  bottom: 2px;
  width: 1px;
  background: #d3e4ec;
}
.tile .guide-note { margin: 10px 0 0 36px; color: var(--muted); font-size: 14px; line-height: 1.35; }

.split { margin-top: 18px; }
.widget { padding: 18px; position: sticky; top: 88px; }
.cal-head, .row, .statline, .owner-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cal { margin-top: 8px; }
.cal-nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 6px; }
.cal-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.cal-arrow:hover { background: #e7f3f7; }
.month {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 8px 8px;
}
.month .cal-head { justify-content: center; margin-bottom: 4px; }
.month .cal-head strong { font-size: 15px; }
.week, .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.week { margin-bottom: 2px; }
.week span { text-align: center; color: var(--muted); font-size: 11px; font-weight: 600; }
.week span:nth-child(6), .week span:nth-child(7) { color: #a56d78; }
.cell { position: relative; display: grid; place-items: center; height: 38px; }
.cell.range::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  right: 0;
  background: #e7f3f7;
}
.cell.start::before { left: 50%; }
.cell.end::before { right: 50%; }
.cell.start.end::before { display: none; }
.day {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1;
  padding: 0;
}
.day b { font-size: 13px; font-weight: 650; }
.day small { font-size: 9px; font-weight: 700; color: var(--muted); }
.day.s-summer small { color: var(--sea); }
.day.s-holiday small, .day.s-may small, .day.s-newyear small, .day.s-february small, .day.s-march small, .day.s-november small { color: #9a5b12; }
.day.edge small { color: #d7ebf2; }
.day.we:not(.edge):not(.off) { color: #8d4d6e; }
.day.today:not(.edge) { box-shadow: inset 0 0 0 1.5px var(--sea); }
.day.edge { background: var(--sea-deep); color: white; }
.day.booked { background: var(--sea); color: white; }
.cal-stays { display: grid; gap: 4px; margin-top: 12px; }
.cal-stay.on { background: #e7f3f7; border-radius: 12px; padding: 4px 8px; }
.cal-stay .btn-bad { margin-top: 6px; }
.day.off, .day.closed, .day.past { color: #b7aea4; background: #f3efe8; text-decoration: none; }
.day:disabled { opacity: 1; }
.day:not(:disabled):not(.edge):hover { background: #d7ebf2; }
.day:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.cal-legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: -2px; }
.cal-legend .busy { background: #e7e1d8; }
.cal-legend .pick { background: var(--sea-deep); }
.cal-note { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.months { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; margin: 10px 0; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 11px 12px;
}
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: white; font-size: 20px; }
.lines { margin: 10px 0; }
.lines div, .statline { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.total { font-size: 22px; font-weight: 700; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 12px; line-height: 1.35; }
.error { color: var(--bad); background: #f8e8e4; padding: 10px 12px; border-radius: 12px; }
.ok { color: var(--ok); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; }
.pet-box { margin: 12px 0; }
.pet-step { margin-top: 12px; }
.pet-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 650; }
.pet-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.pet-catalog {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.pet-catalog li + li { border-top: 1px solid var(--line); }
.pet-kind {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 16px;
  font: inherit;
  font-size: 15px;
}
.pet-breed {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font: inherit;
  font-size: 15px;
}
.pet-kind.on { background: var(--sea-deep); color: white; border-color: var(--sea-deep); }
.pet-breed.on { background: #e7f3f7; font-weight: 650; }
.pet-box select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}
.pet-chosen {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.windows { display: grid; gap: 8px; }
.window { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.window input { width: 84px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.window select { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: white; }
.pet-counts { display: flex; gap: 6px; }
.pet-count {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}
.pet-count.on { background: var(--sea-deep); color: white; border-color: var(--sea-deep); }
.banner {
  background: #e7f3f7;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0;
}
.paybox { border: 1px dashed var(--sea); border-radius: 16px; padding: 14px; background: #f5fbfd; }
.owner { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.side { display: grid; gap: 4px; position: sticky; top: 88px; }
.side a, .side button {
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
}
.side a.on { background: var(--sea-deep); color: white; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stat { background: var(--paper); border-radius: 18px; padding: 14px; border: 1px solid var(--line); }
.stat b { display: block; font-size: 26px; letter-spacing: -0.04em; }
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 18px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 140px; }
.bars div { background: linear-gradient(#7eb7c9, var(--sea)); border-radius: 10px 10px 4px 4px; min-height: 8px; position: relative; }
.bars span { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.chart { padding-bottom: 26px; }
.tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; background: #eee; }
.tag.pending { background: #fff1d6; color: var(--warn); }
.tag.awaiting_payment { background: #e7f3f7; color: var(--sea-deep); }
.tag.paid, .tag.completed { background: #e5f6ec; color: var(--ok); }
.tag.cancelled { background: #f8e8e4; color: var(--bad); }
.legal h2 { margin-top: 22px; font-size: 22px; }
.foot {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--muted);
}
.foot > div { display: flex; gap: 10px; align-items: center; min-width: 0; }
.foot-copy { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; }
.foot-copy strong a { color: var(--ink); font-weight: 700; }
.foot p { margin: 0; }

@media (max-width: 1080px) {
  .top nav a:not(#nav-account) { display: none; }
}
@media (max-width: 1024px) {
  .stats, .specs-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero, .split, .months, .owner, .search { grid-template-columns: 1fr; }
  .cards, .tiles { grid-template-columns: 1fr; }
  .widget { position: static; }
  .top { padding: max(12px, env(safe-area-inset-top)) 14px 12px; }
  .side {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    position: static;
    padding-bottom: 4px;
  }
  .side a, .side button {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    background: white;
    border: 1px solid var(--line);
    white-space: nowrap;
  }
  .owner-top { flex-wrap: wrap; }
  .owner-top > span { display: flex; gap: 8px; }
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table td .btn, .table td .btn-ghost, .table td .btn-bad { min-height: 40px; }
}
@media (min-width: 641px) and (max-width: 860px) {
  .cards, .tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hero .lead { white-space: normal; font-size: 16px; line-height: 1.4; }
  .wrap { width: min(1120px, calc(100% - 24px)); margin: 16px auto 40px; }
  .photo-frame { height: 200px; }
  .photo-frame.tall { height: 230px; }
  h2 { font-size: 26px; }
  .card .btn, .widget .btn, .panel .btn, .tile .btn, .panel .btn-bad, .panel .btn-ghost { width: 100%; }
  .foot { flex-direction: column; align-items: flex-start; margin-bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .amenity-grid, .tile-specs { grid-template-columns: 1fr; }
}
@media (hover: hover) and (pointer: fine) {
  .cal-arrow { width: 36px; height: 36px; font-size: 20px; }
  .stepper button { width: 36px; height: 36px; }
  .pet-count { width: 40px; height: 36px; }
  .cell { height: 38px; }
  .day { width: 36px; height: 32px; }
}
.owner > section, .mail-group { min-width: 0; }
.mail-list { display: grid; gap: 12px; }
.mail-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mail-facts span {
  background: var(--sand);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 14px;
}
.mail-event { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.mail-event summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
}
.mail-event pre { margin: 8px 0 0; white-space: pre-wrap; font: inherit; }

@media (pointer: coarse) {
  .cell { height: 46px; }
  .day { width: min(44px, 100%); height: 42px; }
}
