@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,600&family=Manrope:wght@400;500;700&display=swap');

:root {
  --bg: #07131f;
  --bg-2: #0e2033;
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .09);
  --ink: #f3eee6;
  --muted: #93a3b5;
  --sand: #e7c597;
  --aqua: #45d6c6;
  --coral: #ff6b5b;
  --amber: #f0b64d;
  --radius: 18px;
  --radius-s: 11px;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
  --pad: 26px;    /* panel padding (18px on phones) */
  --tabbar: 56px; /* portal bottom tab bar height on tablets and phones */
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* the attribute must beat display:flex on labels */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100%;
}
::selection { background: var(--sand); color: var(--bg); }
a { color: var(--sand); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; letter-spacing: -.015em; margin: 0; }
h1 { font-size: 3.6rem; /* fallback for engines without clamp() */ font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; font-weight: 300; }
h2 { font-size: 1.35rem; margin-bottom: 14px; }
h3 { font-size: 1.35rem; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.warn { color: var(--amber); }
main { max-width: 1040px; margin: 0 auto; padding: 0 24px 48px; position: relative; }

/* aurora: the one piece of atmosphere, slow and quiet */
.aurora {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(69, 214, 198, .22), transparent 70%),
    radial-gradient(45% 40% at 85% 25%, rgba(231, 197, 151, .16), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(14, 32, 51, 1), transparent 70%);
}
@media (prefers-reduced-motion: no-preference) {
  .aurora::after {
    content: ''; position: absolute; top: -20%; right: -20%; bottom: -20%; left: -20%;
    background: radial-gradient(40% 35% at 30% 40%, rgba(69, 214, 198, .12), transparent 70%);
    animation: drift 24s ease-in-out infinite alternate;
  }
  @keyframes drift { to { transform: translate(18%, 12%) scale(1.15); } }
}

/* header */
.top { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; margin: 0 auto; padding: 22px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1rem; letter-spacing: .01em; white-space: nowrap; }
.mark { width: 28px; height: 28px; border-radius: 8px; flex: none; background: url('mark.svg') center/contain no-repeat; }
.lang { display: flex; gap: 2px; align-items: center; }
.lang a { text-decoration: none; padding: 6px 11px; border-radius: 999px; font-weight: 500; font-size: .85rem; color: var(--muted); }
.lang a.on { background: var(--glass-2); color: var(--ink); }
.lang a:hover { color: var(--ink); }
.lang .sep { margin-left: 14px; }

/* hero */
.hero { padding: 6vh 0 24px; }
.hero > p { max-width: 520px; color: var(--muted); font-size: 1.05rem; margin: 18px 0 34px; }

/* search bar: glass, one row on desktop, wraps on mobile */
.searchbar {
  display: flex; flex-wrap: wrap; align-items: stretch;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  position: relative; z-index: 5; /* backdrop-filter makes a stacking context: lift it so the date popup paints over the cards below */
}
.searchbar > label:first-child { border-radius: var(--radius) 0 0 0; }
.searchbar > label { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; border-right: 1px solid var(--line); }
.searchbar > label.narrow-field { flex: 0 1 120px; }
.searchbar > label > span:first-child, .filter-grid > label > span:first-child { font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); } /* the caption only, not the .select wrapper */
.searchbar > label input, .searchbar > label select { width: 100%; min-width: 0; border: 0; font: inherit; font-weight: 700; font-size: 1.05rem; color: var(--ink); background: transparent; padding: 2px 0; }
.searchbar select option { color: var(--bg); background: #fff; }
.searchbar > label input:focus, .searchbar > label select:focus { outline: none; }
.searchbar > label:focus-within { background: var(--glass-2); }
.searchbar button[type=submit] { flex: 0 0 auto; border-radius: 0 var(--radius) 0 0; padding: 0 28px; font-size: 1rem; flex-wrap: wrap; gap: 0 6px; line-height: 1.2; }
.searchbar button[type=submit] small { flex-basis: 100%; text-align: center; font-weight: 500; opacity: .75; font-size: .75rem; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.presets a { text-decoration: none; font-size: .85rem; font-weight: 500; color: var(--muted); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; }
.presets a:hover { color: var(--ink); border-color: rgba(255, 255, 255, .25); }
.presets a.on { color: var(--bg); background: var(--sand); border-color: var(--sand); }
.presets .label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); padding: 7px 4px 7px 0; }
.complexes a.on { background: var(--aqua); border-color: var(--aqua); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--sand); color: var(--bg); font-size: .7rem; text-align: center; }
.saved-link { display: inline-flex; align-items: center; gap: 4px; }
.saved-link .badge.zero { background: var(--glass-2); color: var(--muted); }

/* number inputs: no spinners */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* selects: native element, custom chrome */
.select { position: relative; display: block; }
.select select { -webkit-appearance: none; appearance: none; width: 100%; padding-right: 28px; cursor: pointer; }
.select::after { content: ''; position: absolute; right: 2px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.stack .select select, .unit-form .select select { padding: 10px 32px 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); }
.stack .select::after, .unit-form .select::after { right: 14px; }

/* toggle chips (checkbox hidden, label looks like a pill) */
.check { position: relative; display: inline-block; margin: 0 8px 8px 0; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--muted); transition: .12s; }
.check:hover span { border-color: rgba(255, 255, 255, .3); color: var(--ink); }
.check input:checked + span { background: var(--sand); border-color: var(--sand); color: var(--bg); }
.check input:focus-visible + span { outline: 2px solid var(--aqua); outline-offset: 2px; }

/* date range picker (the popup is inserted inside the clicked field's label, so those labels are positioned) */
.searchbar > label, .stack .row > label, .stack > label { position: relative; }
.dp-field { display: block; width: 100%; text-align: left; justify-content: flex-start; padding: 2px 0; background: none; border: 0; border-radius: 0; color: var(--ink); font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.dp-field:hover { background: none; color: var(--sand); }
.dp-field.on { color: var(--sand); }
.stack .dp-field, .dates-row .dp-field { padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); font-size: .95rem; }
.dp { position: absolute; left: 0; top: 100%; width: 640px; max-width: calc(100vw - 32px); box-sizing: border-box; margin-top: 8px; z-index: 20; text-align: left; font-weight: 400; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); padding: 16px; }
.dp-nav { display: flex; justify-content: space-between; margin-bottom: -30px; position: relative; z-index: 1; }
.dp-nav button { padding: 4px 12px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; font-size: 1.1rem; line-height: 1.2; }
.dp-nav button:hover { background: var(--glass-2); }
.dp-months { display: flex; gap: 20px; }
.dp-month { flex: 1 1 0; min-width: 0; }
.dp-month h4 { margin: 4px 0 10px; text-align: center; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1rem; }
.dp-grid { display: flex; flex-wrap: wrap; }
.dp-grid b { width: 14.28%; text-align: center; font-size: .65rem; color: var(--muted); padding-bottom: 6px; }
.dp-grid i, .dp-grid span { width: 14.28%; height: 36px; display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 600; border-radius: 999px; cursor: pointer; }
.dp-grid span:hover { background: var(--glass-2); }
.dp-grid .past, .dp-grid .busy { color: rgba(147, 163, 181, .45); cursor: not-allowed; text-decoration: line-through; }
.dp-grid .busy { text-decoration: none; background: repeating-linear-gradient(135deg, transparent 0 3px, rgba(255, 107, 91, .18) 3px 5px); border-radius: 0; }
.dp-grid .today { box-shadow: inset 0 0 0 1px var(--muted); }
.dp-grid .in { background: rgba(231, 197, 151, .18); border-radius: 0; }
.dp-grid .start, .dp-grid .end { background: var(--sand); color: var(--bg); }
.dp-grid .start { border-radius: 999px 0 0 999px; }
.dp-grid .end { border-radius: 0 999px 999px 0; }
.dp-grid .start.end { border-radius: 999px; }
.dp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .85rem; color: var(--muted); }


/* icons */
.i { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.18em; }
.i.fill { fill: currentColor; stroke: none; }
.i.big { width: 40px; height: 40px; color: var(--sand); display: block; margin: 0 auto 10px; }
button .i, .btn .i { margin: 0 2px; }
.chip .i { width: .95em; height: .95em; margin-right: 4px; opacity: .8; }
.rating .i { margin-right: 3px; }
.flags li .i { color: var(--aqua); margin-right: 6px; }
button.on .i { fill: var(--coral); stroke: var(--coral); }

/* buttons */
button, .btn {
  font: inherit; font-weight: 700; font-size: .95rem;
  border: 0; border-radius: var(--radius-s); padding: 11px 20px;
  background: var(--sand); color: var(--bg); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
button:hover, .btn:hover { background: #f1d3a9; }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.ghost:hover { background: var(--glass-2); border-color: rgba(255, 255, 255, .25); }
.ghost.danger { color: var(--coral); }
button.small, .btn.small { padding: 7px 13px; font-size: .82rem; }
button.icon { padding: 9px 12px; font-size: 1.1rem; line-height: 1; }
button.on { color: var(--coral); border-color: var(--coral); }
.wide { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* results */
.results { margin-top: 36px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.result-count { display: flex; align-items: baseline; gap: 14px; }
.result-count b { font-family: Fraunces, Georgia, serif; font-weight: 300; font-size: 4rem; line-height: .9; color: var(--sand); }
.result-count span { font-size: 1rem; line-height: 1.35; }
.result-count em { font-style: normal; color: var(--muted); font-size: .9rem; }
.units { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.unit {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 24px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.unit::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--aqua); }
.unit.busy::before { background: var(--coral); }
.unit.busy .thumb img, .saved-card.busy .photo img { filter: grayscale(.6) brightness(.7); } /* dim the photo, never the text */
.unit-main { min-width: 0; flex: 1; }
.unit h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.state { margin: 4px 0 12px; color: var(--muted); font-size: .9rem; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--glass-2); color: var(--muted); font-family: Manrope, sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.busy-list { margin-top: 22px; }
.busy-list summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.busy-list summary::before { content: ''; width: 0; height: 0; border: 5px solid transparent; border-left-color: var(--muted); transition: transform .15s; }
.busy-list[open] summary::before { transform: rotate(90deg); }
.busy-list summary::-webkit-details-marker { display: none; }
.busy-list .units { margin-top: 6px; }
.empty { text-align: center; padding: 40px 24px; color: var(--muted); background: var(--glass); border: 1px dashed var(--line); border-radius: var(--radius); margin: 24px 0; }

/* availability strip: 30 cells, free aqua / busy coral, searched nights outlined in sand */
.strip { display: flex; gap: 2px; max-width: 420px; }
.strip i { flex: 1 1 0; height: 10px; border-radius: 2px; background: rgba(69, 214, 198, .55); }
.strip i.b { background: rgba(255, 107, 91, .75); }
.strip i.h { box-shadow: 0 0 0 2px var(--sand); position: relative; z-index: 1; }
.strip i.f.h { background: var(--sand); }
.strip-ends { display: flex; justify-content: space-between; max-width: 420px; font-size: .68rem; color: var(--muted); margin-top: 4px; letter-spacing: .03em; }

/* filters drawer inside the search bar */
.more-filters { flex-basis: 100%; border-top: 1px solid var(--line); }
.more-filters summary { cursor: pointer; padding: 12px 20px; font-size: .85rem; font-weight: 700; color: var(--muted); list-style: none; }
.more-filters summary:hover { color: var(--ink); }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary::before { content: '+ '; }
.more-filters[open] summary::before { content: '– '; }
.filter-grid { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 4px 20px 12px; }
.filter-grid > label { flex: 1 1 150px; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 14px; }
.filter-grid input, .filter-grid select { border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); font: inherit; font-weight: 600; color: var(--ink); padding: 9px 12px; width: 100%; }
.filter-grid input:focus, .filter-grid select:focus { outline: none; border-color: var(--sand); }
.filter-grid select { padding-right: 32px; } /* room for the chevron */
.filter-grid .select::after { right: 13px; }
.filter-grid fieldset { flex-basis: 100%; border: 0; padding: 4px 0 0; margin: 0; }
.filter-grid legend, .unit-form legend { font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); padding: 0; margin-bottom: 8px; }

/* unit card: thumb + main + side */
.unit .thumb { flex: 0 0 150px; height: 110px; border-radius: var(--radius-s); overflow: hidden; background: var(--glass-2); position: relative; display: block; }
.unit .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.unit .thumb .feat { position: absolute; left: 8px; top: 8px; background: var(--sand); color: var(--bg); font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.unit h3 a { color: inherit; text-decoration: none; }
.unit h3 a:hover { color: var(--sand); }
.unit .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; }
.rating { color: var(--sand); font-weight: 700; font-size: .9rem; }
.rating small { color: var(--muted); font-weight: 500; }
.chip.pol { background: rgba(69, 214, 198, .12); color: var(--aqua); }
.unit-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.price { text-align: right; }
.price b { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.5rem; font-weight: 600; color: var(--sand); line-height: 1.1; }
.price small { color: var(--muted); font-size: .75rem; }

/* map */
.map { height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin: 0 0 18px; background: var(--bg-2); }
.leaflet-container { font: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--bg-2); color: var(--ink); }
.leaflet-tile { filter: brightness(.7) saturate(.6) contrast(1.1); }

/* unit detail */
.detail .crumbs { color: var(--muted); font-size: .9rem; margin: 10px 0 18px; }
.gallery { display: flex; flex-wrap: wrap; gap: 8px; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.gallery img { flex: 1 1 22%; height: 180px; min-width: 0; object-fit: cover; display: block; background: var(--glass-2); border-radius: 4px; }
.gallery img:first-child { flex: 2 1 48%; height: 368px; }
.gallery img:nth-child(n+6) { display: none; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-head h1 { font-size: 2.4rem; margin-bottom: 8px; }
.detail-head .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.detail-cols { display: flex; gap: 24px; align-items: flex-start; }
.detail-main { flex: 1 1 0; min-width: 0; }
.detail-main h2 { margin-top: 28px; }
.desc { font-size: 1.05rem; line-height: 1.7; max-width: 640px; }
.flags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.flags li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 500; }
.book { flex: 0 0 340px; position: sticky; top: 20px; }
.book h2 { margin-top: 22px; font-size: 1.1rem; }
.state.big { font-size: 1.05rem; font-weight: 700; margin: 14px 0; color: var(--aqua); }
.state.big.no { color: var(--coral); }
.price-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.price-table td { padding: 6px 0; border-bottom: 1px solid var(--line); white-space: normal; }
.price-table td:last-child { text-align: right; width: 1%; white-space: nowrap; }
.price-table .total td { border: 0; font-weight: 700; color: var(--sand); font-size: 1.1rem; padding-top: 10px; }
.book .btn.wide { margin-top: 12px; }
.book .ghost.wide { margin-top: 8px; }
.calendar { display: flex; flex-wrap: wrap; gap: 16px; }
.cal-month { flex: 1 1 240px; max-width: 300px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.cal-month h4 { font-family: Fraunces, Georgia, serif; font-weight: 600; margin: 0 0 10px; font-size: 1.05rem; }
.cal-grid { display: flex; flex-wrap: wrap; }
.cal-grid b { width: 14.28%; font-size: .62rem; color: var(--muted); text-align: center; font-weight: 700; padding-bottom: 6px; letter-spacing: .04em; }
.cal-grid span, .cal-grid i { width: 14.28%; height: 34px; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; position: relative; }
.cal-grid span::before { content: ''; position: absolute; top: 3px; right: 3px; bottom: 3px; left: 3px; border-radius: 8px; z-index: -1; }
.cal-grid span { z-index: 0; }
.cal-grid .free { color: var(--aqua); }
.cal-grid .free::before { background: rgba(69, 214, 198, .14); }
.cal-grid .busy { color: #ffb3aa; }
.cal-grid .busy::before { background: rgba(255, 107, 91, .2); }
.cal-grid .past { color: var(--muted); } /* no background marks it as past; full muted colour keeps it readable */
.cal-grid .today::before { box-shadow: inset 0 0 0 1px var(--sand); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }
.cal-legend .f { background: rgba(69, 214, 198, .6); }
.cal-legend .b { background: rgba(255, 107, 91, .7); }
.hero.compact { padding-bottom: 24px; }
.hero.compact .btn { margin-top: 4px; }
.h-small { font-size: 2rem; }
.alert-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.alert-form input { font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); color: var(--ink); min-width: 240px; }
.alert-unit { margin: 0 0 14px; }

/* saved page */
.dates-row { align-items: flex-end; flex-wrap: wrap; }
.dates-row > label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; font-weight: 700; color: var(--muted); flex: 0 1 160px; position: relative; }
.dates-row .dp-field { color: var(--ink); }
.saved-grid { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.saved-card { flex: 1 1 300px; max-width: calc(33.333% - 16px); margin: 0 8px 16px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.saved-card .photo { display: block; height: 170px; background: var(--glass-2); position: relative; }
.saved-card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.saved-card .photo .pill { position: absolute; left: 12px; top: 12px; background: rgba(7, 19, 31, .8); } /* legible on any photo */
.saved-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.saved-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.saved-card h3 a { color: inherit; text-decoration: none; }
.saved-card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.saved-card .strip, .saved-card .strip-ends { max-width: none; }
.saved-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 14px; }
.price-inline { font-family: Fraunces, Georgia, serif; font-size: 1.3rem; color: var(--sand); font-weight: 600; white-space: nowrap; margin-right: 8px; }
.h-compare { margin: 18px 0 12px; }
.compare thead th { background: rgba(0, 0, 0, .2); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0 0; }
.pager a { min-width: 38px; padding: 8px 12px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--muted); font-weight: 700; }
.pager a.on { background: var(--sand); border-color: var(--sand); color: var(--bg); }
.results-head .actions a.ghost { font-size: .85rem; padding: 7px 12px; }

/* compare table */
.compare table th { font-size: .95rem; letter-spacing: 0; color: var(--ink); min-width: 140px; white-space: nowrap; }
.compare td:first-child { color: var(--muted); font-size: .85rem; min-width: 0; }
.compare .y { color: var(--aqua); font-weight: 700; }
.compare .n { color: var(--muted); }
.compare td { white-space: nowrap; }

/* footer + toast */
footer { max-width: 1040px; margin: 20px auto 0; padding: 20px 24px 40px; color: var(--muted); font-size: .85rem; display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); }
footer a { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); font-weight: 700; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); transition: .2s; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* panels & forms */
input[type=date], input[type=email], input[type=text], input[type=number], input[type=search], input:not([type]), textarea, select { font: inherit; color: var(--ink); }
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > label, .stack .row > label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: .85rem; }
.stack > label small, .stack .row > label small { font-weight: 500; color: var(--muted); }
.stack input, .stack textarea { width: 100%; min-width: 0; font: inherit; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); color: var(--ink); }
.stack input::placeholder, .stack textarea::placeholder { color: rgba(147, 163, 181, .6); }
.stack input:focus, .stack textarea:focus { border-color: var(--aqua); outline: none; }
.hp { position: absolute; left: -9999px; } /* honeypot field */
.row { display: flex; align-items: stretch; gap: 10px; }
.row > label { flex: 1 1 0; min-width: 0; justify-content: flex-end; }
.row > label.grow { flex: 2 1 0; }
.row > button, .row > .btn { align-self: flex-end; }
.alert, .notice { padding: 11px 16px; border-radius: var(--radius-s); margin: 0 0 18px; font-weight: 700; font-size: .9rem; border: 1px solid; }
.alert { background: rgba(255, 107, 91, .12); color: #ffb3aa; border-color: rgba(255, 107, 91, .3); }
.notice { background: rgba(69, 214, 198, .1); color: var(--aqua); border-color: rgba(69, 214, 198, .3); }
.hero .alert { margin-top: 18px; }
code { display: block; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); color: var(--sand); padding: 10px 14px; border-radius: var(--radius-s); font-size: .82rem; word-break: break-all; margin: 6px 0 14px; }

/* login / install */
body.narrow main.panel { max-width: 440px; margin: 10vh auto; padding: 36px; }
body.narrow .mark { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px; }
body.narrow h1 { font-size: 2.2rem; }
body.narrow h2 { margin-top: 10px; }
.checks { list-style: none; padding: 0; margin: 18px 0; }
.checks li { padding: 6px 0 6px 26px; position: relative; font-size: .92rem; }
.checks li::before { content: ''; position: absolute; left: 4px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--aqua); }
.checks li.bad::before { background: var(--coral); }
.checks li.opt::before { background: var(--amber); }

/* portal shell */
body.portal { display: flex; min-height: 100vh; }
.side { flex: 0 0 230px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; border-right: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.side .brand { padding: 0 8px 22px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.side nav a b { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--sand); color: var(--bg); font-size: .72rem; text-align: center; }
.side nav a:hover { color: var(--ink); background: var(--glass); }
.side nav a.on { color: var(--ink); background: var(--glass-2); }
.side-foot { margin-top: auto; display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 8px 0; font-size: .82rem; }
.side-foot a { color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 999px; }
.side-foot a.on { background: var(--glass-2); color: var(--ink); }
.portal-main { flex: 1 1 0; min-width: 0; max-width: 1100px; padding: 28px 32px 60px; margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; }
.page-head h1 { font-size: 2rem; }
.page-head .crumbs { margin: 0 0 6px; font-size: .85rem; }
.page-head .actions form { margin: 0; }
.portal-main .panel { margin-bottom: 16px; }
.stats a { text-decoration: none; color: inherit; }
.stats a:hover { border-color: rgba(255, 255, 255, .25); }
.occ { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-top: 6px; }
.occ i { flex: 1 1 0; background: rgba(255, 107, 91, .55); border-radius: 3px 3px 0 0; min-height: 3px; }
.occ i:hover { background: var(--coral); }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state p { color: var(--muted); max-width: 420px; margin: 8px auto 20px; }
.edit-cols { display: flex; gap: 16px; align-items: flex-start; }
.edit-cols > form { flex: 1 1 0; min-width: 0; }
.edit-cols > aside { flex: 0 0 320px; }
.unit-form h2 { margin: 12px 0 2px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 1.1rem; }
.unit-form h2:first-of-type { border: 0; padding-top: 0; margin-top: 0; }
.sticky-actions { position: sticky; bottom: 0; z-index: 2; margin: 6px calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding: 14px var(--pad); background: var(--bg-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.strong { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1rem; }
.strong:hover { color: var(--sand); }
.row.between { justify-content: space-between; align-items: flex-start; }
.settings .row { margin-top: 4px; }

/* features tab */
.features td, .features th { padding: 6px 8px; }
.features input { width: 100%; min-width: 120px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); color: var(--ink); }
.features input.sort { width: 64px; min-width: 0; }
code.inline { display: inline; padding: 2px 6px; margin: 0; font-size: .8rem; }
.add-feature { margin-top: 14px; }
.unit-form legend a, .unit-form legend button { margin-left: 8px; font-weight: 500; }
.unit-form legend button { padding: 3px 10px; font-size: .72rem; letter-spacing: 0; }

/* admin */
.prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); overflow: hidden; font-weight: 500; color: var(--muted); font-size: .85rem; }
.prefix { padding-left: 12px; }
.stack .prefix input { border: 0; border-radius: 0; background: var(--glass-2); flex: 1; min-width: 0; }
h1 .count { color: var(--muted); font-family: Manrope, sans-serif; font-weight: 700; font-size: .9em; margin-left: 4px; }
.unit-form fieldset { border: 0; padding: 0; margin: 0; }
.unit-form select { font: inherit; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-s); background: rgba(0, 0, 0, .25); color: var(--ink); }
.unit-form select option { color: var(--bg); background: #fff; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border: 0; }
.feed li p { margin: 6px 0; white-space: pre-wrap; }
.feed.small li { padding: 6px 0; font-size: .85rem; color: var(--muted); }
.feed .row { justify-content: space-between; align-items: center; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; margin: 10px 0 22px; }
.stats > * { flex: 1 1 150px; padding: 18px 20px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); }
.stats b { display: block; font-family: Fraunces, Georgia, serif; font-weight: 300; font-size: 2.2rem; line-height: 1; }
.stats span { color: var(--muted); font-size: .82rem; font-weight: 500; }
.stats .bad b { color: var(--coral); }
.stats .text b { font-size: 1.5rem; padding: 7px 0 4px; }
.two-col { display: flex; gap: 16px; margin-bottom: 16px; }
.two-col > * { flex: 1 1 0; min-width: 0; }
.table-panel { padding: 0; margin-bottom: 16px; overflow: hidden; }
.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.table-tools input { font: inherit; width: 260px; max-width: 50%; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, .25); color: var(--ink); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
th { font-size: .72rem; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
th, td:first-child, td:nth-child(2) { white-space: normal; }
td:first-child { min-width: 200px; }
td:nth-child(2) small { white-space: nowrap; }
td:first-child a { overflow-wrap: anywhere; word-break: break-all; }
td:last-child { width: 1%; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--glass); }
.strip-cell .strip { width: 200px; }
.strip-cell .strip-ends { width: 200px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pill.ok { background: rgba(69, 214, 198, .15); color: var(--aqua); }
.pill.bad { background: rgba(255, 107, 91, .15); color: #ffb3aa; }
.pill.wait { background: rgba(240, 182, 77, .15); color: var(--amber); }
.booking-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: .85rem; }
.booking-list li { padding: 2px 0; }
td details summary { cursor: pointer; font-weight: 700; color: var(--sand); }

/* ---- responsive: two breakpoints. tablet ≤900 (one column, stacked panels), phone ≤640 (everything stacks) ---- */
@media (max-width: 900px) {
  /* search bar: dates on one row, area+guests on the next, full-width button */
  .searchbar > label { flex-basis: 40%; border-bottom: 1px solid var(--line); }
  .searchbar > label.narrow-field { flex-basis: 20%; }
  .searchbar button[type=submit] { flex-basis: 100%; border-radius: 0; padding: 16px; }
  /* cards: photo + text in a row, price and actions below */
  .unit { flex-wrap: wrap; gap: 16px; }
  .unit-side { flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
  .price { text-align: left; }
  .saved-card { max-width: calc(50% - 16px); }
  /* two-column layouts become one */
  .two-col, .detail-cols, .edit-cols { flex-direction: column; }
  .book, .edit-cols > aside { flex-basis: auto; position: static; width: 100%; }
  /* portal: sidebar becomes a bottom tab bar */
  body.portal { flex-direction: column; }
  .side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); flex-direction: row; align-items: center; padding: 0; border-right: 0; border-top: 1px solid var(--line); background: var(--bg-2); z-index: 10; padding-bottom: env(safe-area-inset-bottom, 0); }
  .side .brand, .side-foot { display: none; }
  .side nav { flex-direction: row; flex: 1; }
  .side nav a { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 10px 4px; font-size: .68rem; border-radius: 0; }
  .side nav a b { position: absolute; top: 6px; right: 12%; margin: 0; }
  .portal-main { padding: 18px 16px calc(var(--tabbar) + 40px); }
  .sticky-actions { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); } /* stay above the tab bar */
  .page-head h1 { font-size: 1.5rem; }
}
@media (max-width: 640px) {
  html { font-size: 15px; }
  main { padding: 0 16px 40px; }
  .top { padding: 14px 16px; }
  .brand { font-size: .9rem; }
  .lang a { padding: 6px 8px; }
  .lang .sep { margin-left: 4px; }
  .hero { padding-top: 3vh; }
  .hero > p { margin: 12px 0 22px; font-size: .98rem; }
  .presets a { padding: 6px 10px; font-size: .8rem; }
  /* search bar and filters: one field per row */
  .searchbar > label, .searchbar > label.narrow-field { flex-basis: 100%; border-right: 0; padding: 12px 16px; }
  .filter-grid { padding: 0 16px 10px; }
  .filter-grid > label { flex-basis: 40%; }
  .results-head { flex-direction: column; align-items: stretch; }
  .results-head .actions > * { flex: 1 1 auto; }
  .result-count b { font-size: 3rem; }
  /* cards: everything stacked, full-width photo */
  .unit { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 16px 16px 20px; }
  .unit .thumb { flex-basis: auto; width: 100%; height: 180px; }
  .unit .thumb:not(:has(img)) { height: auto; background: none; } /* no photo: no blank block, keep a Featured label */
  .unit h3 { font-size: 1.2rem; }
  .unit-side { flex-basis: auto; flex-direction: column; align-items: stretch; }
  .unit .actions > * { flex: 1 1 auto; }
  .saved-card { max-width: none; }
  /* unit page */
  .gallery img { flex-basis: 45%; height: 120px; }
  .gallery img:first-child { flex-basis: 100%; height: 220px; }
  .gallery img:nth-child(n+4) { display: none; }
  .detail-head h1 { font-size: 1.9rem; }
  .cal-month { max-width: none; }
  .dp-month h4 { font-size: .95rem; }
  .book .row, .results-head .row { flex-wrap: wrap; }
  .book .row > label, .results-head .row > label { flex-basis: 100%; }
  /* portal + forms */
  .stats > * { flex-basis: 40%; padding: 14px 16px; }
  .stats b { font-size: 1.8rem; }
  :root { --pad: 18px; }
  .row { flex-wrap: wrap; }
  .row > label { flex: 1 1 40%; }
  .row > label.grow { flex-basis: 100%; }
  .table-tools { flex-direction: column; align-items: stretch; }
  .table-tools input { width: 100%; max-width: none; }
  .table-wrap table { min-width: 720px; }
  .compare table { min-width: 0; }
  footer { padding: 16px 16px 32px; }
  .toast { bottom: 16px; width: calc(100% - 32px); text-align: center; }
}
