@font-face {
  font-family: Inter;
  src: url('./fonts/inter-cyrillic.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  src: url('./fonts/inter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('./fonts/sourceserif4-cyrillic.woff2') format('woff2');
  font-weight: 300 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('./fonts/sourceserif4-latin.woff2') format('woff2');
  font-weight: 300 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --background: #fbf8f2;
  --ink: #0e2a38;
  --accent: #c39966;
  --accent-text: #815b32;
  --yellow: #ffd074;
  --surface: #fff;
  --line: rgb(14 42 56 / 24%);
  --line-strong: rgb(14 42 56 / 50%);
  --muted: rgb(14 42 56 / 78%);
  --glass: rgb(255 255 255 / 88%);
  --gallery-glass: rgb(255 255 255 / 70%);
  --shade: rgb(14 42 56 / 5%);
  --error: #8e342a;
  --rating-star: #ed6854;
  --round: 100px;
  --photo-radius: 4px;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: Inter, Arial, sans-serif;
  --serif-weight: 350;
  --display-tracking: -.03em;
  --control-weight: 550;
  --space: clamp(20px, 4.2vw, 62px);
  --safe-top: max(env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
  --safe-left: max(env(safe-area-inset-left), calc(var(--tg-safe-area-inset-left, 0px) + var(--tg-content-safe-area-inset-left, 0px)));
  --safe-right: max(env(safe-area-inset-right), calc(var(--tg-safe-area-inset-right, 0px) + var(--tg-content-safe-area-inset-right, 0px)));
  --bar-space: 70px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-bottom: var(--bar-space); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: var(--tg-viewport-stable-height, 100dvh);
  margin: 0;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.55 var(--sans);
  letter-spacing: -.012em;
}
body:has(dialog[open]) { overflow: hidden; }
body.has-villa-bar { padding-bottom: calc(var(--bar-space) + var(--safe-bottom)); }
main { flex: 1; }
main:focus, .catalog:focus { outline: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .44; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font: var(--serif-weight) 1em/1.12 var(--serif); letter-spacing: var(--display-tracking); }
h2 { font-size: clamp(1.85rem, 3vw, 2.7rem); }
.shell { width: 100%; max-width: 1440px; margin-inline: auto; padding-left: max(var(--space), var(--safe-left)); padding-right: max(var(--space), var(--safe-right)); }
.skip-link { background: var(--yellow); color: var(--ink); padding: 8px 16px; position: absolute; inset: 8px auto auto 16px; z-index: 12; }
.skip-link:not(:focus) { clip-path: inset(50%); }
.glyph { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent-text); font: 600 .75rem/1.35 var(--sans); letter-spacing: .12em; text-transform: uppercase; }

.site-header { padding-top: 14px; }
.header-inner {
  min-height: 53px;
  max-width: 760px;
  margin-inline: auto;
  padding: 3px 8px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  justify-items: center;
  border: 1px solid rgb(14 42 56 / 7%);
  border-radius: var(--round);
  background: var(--glass);
  box-shadow: 0 2px 5px rgb(14 42 56 / 7%);
}
.home-link { text-decoration: none; text-align: center; font: var(--serif-weight) clamp(1.3rem, 6.4vw, 1.95rem)/1.05 var(--serif); letter-spacing: -.045em; }
.header-icon { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); border: 0; border-radius: 50%; background: transparent; }
.header-icon .glyph { width: 23px; height: 23px; }
.header-icon:hover { background: var(--shade); }
.site-footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 58px; border-top: 1px solid var(--line); padding-block: 22px; }
.site-footer .home-link { font-size: 1.2rem; }
.site-footer small { color: var(--muted); font-size: .79rem; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--round); padding: 8px 20px; color: var(--ink); text-decoration: none; text-align: center; font-size: .875rem; font-weight: var(--control-weight); line-height: 1.4; }
.button-primary { background: var(--yellow); border-color: var(--yellow); }
.button-primary:hover { border-color: var(--ink); }
.button-outline { border-color: var(--ink); background: var(--background); }
.button-outline:hover { background: var(--shade); }
.button-gallery { background: var(--gallery-glass); border-color: rgb(195 153 102 / 15%); box-shadow: 0 3px 3px rgb(0 0 0 / 3%); backdrop-filter: blur(8px); }
.button-gallery:hover { background: var(--surface); }

.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: clamp(34px, 5vw, 80px); margin-top: 32px; }
.hero-photo { width: 100%; min-width: 0; aspect-ratio: 1.42; object-fit: cover; object-position: 50% 53%; border-radius: var(--photo-radius); }
.hero-content h1 { margin: 8px 0 13px; font-size: clamp(2.8rem, 5.1vw, 5.4rem); line-height: .99; }
.hero-content > p:not(.eyebrow) { max-width: 32ch; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.hero .button { margin-top: 23px; }
.catalog { margin-top: clamp(44px, 6.5vw, 90px); scroll-margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 24px; }
.section-heading p { font-size: .87rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); row-gap: 36px; }
.related .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--photo-radius); overflow: hidden; background: var(--shade); }
.card-photo { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 15px 2px 0; }
.card h3 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
.card-place { margin-top: 6px; font-weight: 600; font-size: .895rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin: 11px 0 13px; font-size: .895rem; }
.card-meta span + span { padding-left: 10px; border-left: 1px solid var(--line-strong); }
.card-action { border-top: 1px solid var(--line-strong); padding-top: 11px; margin-top: auto; }
.card-action p { margin-bottom: 10px; font-size: .875rem; text-align: right; }
.card-action .button { width: 100%; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; min-height: 27px; gap: 3px 8px; color: var(--muted); font-size: .82rem; margin: 12px 0 0; }
.breadcrumbs a { text-underline-offset: 3px; }
.breadcrumbs > :not(:first-child)::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px 0; border: solid var(--accent-text); border-width: 1px 1px 0 0; transform: rotate(45deg); }
.breadcrumbs [aria-current] { color: var(--ink); }
.villa-title { max-width: 920px; margin: 28px auto 20px; text-align: center; }
.villa-location { font-size: .84rem; font-weight: 600; }
.villa-title h1 { margin-top: 5px; font-size: clamp(2.25rem, 5.1vw, 4.55rem); line-height: 1.08; overflow-wrap: anywhere; }
.villa-retreat { margin-top: 4px; font-family: var(--serif); font-size: clamp(1.2rem, 3.1vw, 1.85rem); line-height: 1.12; letter-spacing: var(--display-tracking); }
.villa-meta { margin-top: 22px; min-height: 40px; display: flex; align-items: center; gap: 10px; font-size: .83rem; }
.villa-meta > p { color: var(--accent-text); }
.villa-meta > .villa-rating { color: var(--ink); }
.villa-meta .share-button { margin-left: auto; }
.rating-star { color: var(--rating-star); }
.share-button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 2px 0; color: var(--ink); background: transparent; border: 0; font-size: .84rem; font-weight: 600; text-underline-offset: 3px; }
.share-button:hover { text-decoration: underline; }
.villa-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 85px); align-items: start; }
.preview { position: relative; aspect-ratio: 1; min-width: 0; border-radius: var(--photo-radius); overflow: hidden; background: var(--shade); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview .button-gallery { position: absolute; right: 16px; bottom: 18px; max-width: calc(100% - 32px); padding-inline: 17px; }
.villa-stats { display: flex; flex-wrap: wrap; align-items: start; justify-content: start; list-style: none; gap: 10px 17px; padding: 0 0 17px; margin: 0 0 17px; border-bottom: 1px solid var(--line); }
.villa-stats li { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.villa-stats .glyph { color: var(--accent); width: 19px; height: 19px; }
.story h2 { color: var(--accent-text); font-size: clamp(1.65rem, 3.15vw, 2.6rem); }
.story p { margin-top: 12px; }
.story h3 { margin-top: 23px; font-size: 1.45rem; }
.amenities { display: flex; flex-wrap: wrap; column-gap: 25px; row-gap: 3px; margin: 11px 0 0; padding-left: 17px; font-size: .91rem; }
.amenities li::marker { color: var(--accent); }
.villa-information { max-width: 850px; margin: 46px auto 0; }
.villa-information h2 { margin-bottom: 15px; }
.villa-information details { border-top: 1px solid var(--line); }
.villa-information details:last-child { border-bottom: 1px solid var(--line); }
.villa-information summary { padding: 13px 0; cursor: pointer; font-weight: 500; }
.villa-information details p { padding: 0 0 15px; }
.related { margin-top: 44px; }
.villa-bar { position: fixed; z-index: 5; inset: auto 0 0; padding: 10px 0 calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--background); }
.villa-bar-actions { max-width: 635px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.villa-bar .button { padding-inline: 7px; }

.sheet, .gallery { color: var(--ink); background: var(--background); border: 1px solid var(--line); padding: clamp(16px, 4vw, 24px); }
.sheet { width: min(calc(100% - 32px), 470px); max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 28px); border-radius: 14px; }
dialog::backdrop { background: rgb(14 42 56 / 42%); }
.sheet-header, .gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-header h2, .gallery-header h2 { font-size: clamp(1.6rem, 3.5vw, 2rem); }
.site-menu .menu-links { display: grid; margin-top: 11px; }
.menu-links a { min-height: 50px; padding: 13px 0; border-top: 1px solid var(--line); text-decoration: none; }
.menu-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.share-dialog .button { width: 100%; margin-top: 14px; }
.share-local, .share-status { font-size: .82rem; margin-top: 9px; }
.share-status:empty { display: none; }
.round-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.5rem; line-height: 1; }
.round-button:hover:not(:disabled) { background: var(--shade); }
.gallery { position: fixed; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; inset: 0; padding: 0; border: 0; }
.gallery-inner { width: 100%; max-width: 1440px; margin-inline: auto; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; padding: max(14px, var(--safe-top)) max(18px, var(--safe-right)) max(14px, var(--safe-bottom)) max(18px, var(--safe-left)); }
.gallery-header { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.gallery-figure { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; }
.gallery-photo { width: 100%; height: 100%; min-height: 0; object-fit: contain; touch-action: pan-y; cursor: grab; }
.gallery-caption { margin-top: 7px; font-size: .87rem; text-align: center; }
.gallery-controls, .gallery-thumbs { display: grid; align-items: center; gap: 7px; }
.gallery-controls { width: 100%; max-width: 630px; justify-self: center; grid-template-columns: 44px minmax(0, 1fr) 44px; border-top: 1px solid var(--line); padding-top: 11px; }
.gallery-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.thumb { min-width: 0; height: clamp(44px, 12vw, 68px); padding: 0; overflow: hidden; background: var(--shade); border: 2px solid transparent; border-radius: var(--photo-radius); }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.thumb[aria-pressed='true'] { border-color: var(--accent-text); }
.thumb[aria-pressed='true'] img, .thumb:hover img { opacity: 1; }

.booking-shell { max-width: 1100px; }
.booking-heading { padding: 22px 0 20px; }
.booking-heading h1 { margin: 5px 0 8px; font-size: clamp(2.1rem, 5.4vw, 4.35rem); overflow-wrap: anywhere; }
.booking-heading > p:last-child { max-width: 44ch; color: var(--muted); font-size: .9rem; }
.booking-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr); gap: 26px; align-items: start; }
.booking-panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: clamp(15px, 3vw, 26px); background: var(--glass); }
.booking-stay { border-bottom: 1px solid var(--line); }
.booking-stay img { width: 100%; max-height: 285px; aspect-ratio: 1.35; object-fit: cover; border-radius: var(--photo-radius); }
.stay-copy { padding: 12px 0; }
.stay-copy h2 { font-size: 1.65rem; }
.booking-panel fieldset { margin: 22px 0 0; padding: 7px 0 0; border: 0; min-width: 0; }
.booking-panel legend { width: 100%; padding: 10px 0 0; border-top: 1px solid var(--line); font: var(--serif-weight) 1.32rem/1.15 var(--serif); letter-spacing: var(--display-tracking); }
.booking-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.field { display: grid; gap: 5px; min-width: 0; margin-top: 9px; font-size: .86rem; font-weight: 500; }
.booking-panel form > .field { margin-top: 0; }
.input { display: block; appearance: none; width: 100%; min-width: 0; min-height: 44px; padding: 8px; background: var(--background); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; font-size: 1rem; font-weight: 400; }
.input[type='date'] { text-align: left; }
.input::-webkit-date-and-time-value { text-align: left; }
.input::-webkit-calendar-picker-indicator { margin: 0; padding: 0; }
select.input { padding-right: 30px; background-image: url('./chevron.svg'); background-position: right 10px center; background-repeat: no-repeat; }
textarea.input { resize: vertical; min-height: 79px; }
.date-actions { display: flex; align-items: center; justify-content: space-between; gap: 7px 13px; flex-wrap: wrap; }
.date-actions p { font-size: .82rem; font-weight: 600; }
.guest-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.guest-row > span { font-size: .91rem; }
.counter { display: flex; align-items: center; gap: 7px; }
.counter button { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.1rem; line-height: 1; }
.counter button:hover:not(:disabled) { background: var(--shade); }
.counter output { text-align: center; min-width: 25px; font-variant-numeric: tabular-nums; }
.guest-capacity, .field-hint { margin: 8px 0 0; font-size: .81rem; }
.field-error { color: var(--error); font-size: .87rem; margin-top: 9px; }
.input[aria-invalid='true'] { border-color: var(--error); }
.booking-submit { width: 100%; margin-top: 16px; }
.booking-step h2 { font-size: clamp(1.75rem, 3.6vw, 2.55rem); margin: 3px 0 8px; }
.booking-step .muted { font-size: .89rem; }
.summary { margin: 14px 0 0; }
.summary div { display: grid; grid-template-columns: minmax(85px, .95fr) minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .89rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; overflow-wrap: anywhere; white-space: pre-wrap; }
.summary .total { font-weight: 600; }

.calendar-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 10px; }
.calendar-stages .button { font-size: .81rem; padding-inline: 5px; }
.calendar-stages .button[aria-pressed='true'] { background: var(--yellow); }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.calendar-heading p { font-size: .92rem; font-weight: 600; }
.calendar-heading p::first-letter { text-transform: uppercase; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; gap: 3px; margin-top: 4px; }
.calendar-grid span { font-size: .76rem; color: var(--muted); }
.calendar-day { min-width: 0; min-height: 40px; border-radius: 5px; border: 1px solid transparent; color: var(--ink); background: transparent; padding: 0; font-size: .86rem; }
.calendar-day:hover:not(:disabled) { border-color: var(--accent-text); }
.calendar-day[aria-pressed='true'] { background: var(--yellow); }
.calendar-day.in-range { background: var(--shade); }
.error-page { padding-top: 55px; }
.error-page h1 { font-size: 2.5rem; margin-bottom: 18px; }

@media (max-width: 1000px) {
  .cards, .related .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 19px; }
  .hero-photo { aspect-ratio: 1.09; }
  .hero-content { text-align: center; }
  .hero-content h1 { font-size: clamp(2.55rem, 8.3vw, 3.7rem); }
  .hero-content > p { margin-inline: auto; }
  .hero .button { margin-top: 18px; }
  .villa-feature { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .villa-stats { gap: 8px 13px; }
  .booking-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .booking-stay { grid-row: 1; display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 12px; padding-bottom: 8px; }
  .booking-stay img { aspect-ratio: 1.18; }
  .stay-copy { padding: 0; }
  .stay-copy h2 { font-size: 1.32rem; }
  .stay-copy p { font-size: .82rem; }
}
@media (max-width: 600px) {
  .site-header { padding-top: 15px; }
  .header-inner { min-height: 46px; padding-block: 0; }
  .cards, .related .cards { grid-template-columns: minmax(0, 1fr); }
  .section-heading { align-items: start; flex-direction: column; margin-bottom: 18px; }
  .card h3 { font-size: clamp(1.25rem, 5vw, 1.5rem); }
  .villa-title { margin: 35px 0 14px; }
  .villa-title h1 { font-size: clamp(1.75rem, 7.7vw, 2.25rem); }
  .villa-meta { margin-top: 24px; }
  .preview { width: calc(100% + 12px); margin-inline: -6px; }
  .story h2 { font-size: clamp(1.38rem, 5.9vw, 1.6rem); }
  .gallery-figure { margin-inline: -8px; }
  .gallery-photo { object-position: center 32%; }
  .booking-heading { padding-block: 18px 15px; }
  .booking-heading h1 { font-size: clamp(1.82rem, 7.7vw, 2.4rem); }
  .booking-panel:has(form:not([hidden])) { background: transparent; border: 0; padding: 0; }
  .booking-panel fieldset { margin-top: 18px; }
  .guest-row { padding-block: 3px; }
  .booking-panel form .input { padding-left: 0; background-color: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; }
  .booking-panel form .input[aria-invalid='true'] { border-bottom: 2px solid var(--error); }
  .villa-information, .related { margin-top: 34px; }
  .site-footer { margin-top: 36px; }
}
@media (max-width: 355px) {
  .booking-dates { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
