:root {
  --page: #F5F7F4; --paper: #FFFFFF; --ink: #14233A; --muted: #556579;
  --blue: #1D5FA8; --blue-d: #154A85; --sky: #DCE8F6; --sun: #F2B632;
  --line: #D3DCE6; --busy: #C9D0DA; --err: #B3261E; --ok: #1E7B4A;
  --head: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' fill='%23E4EDF8'/%3E%3Cg fill='none' stroke='%231D5FA8' stroke-width='1.5'%3E%3Ccircle cx='32' cy='16' r='10'/%3E%3Ccircle cx='32' cy='48' r='10'/%3E%3Ccircle cx='16' cy='32' r='10'/%3E%3Ccircle cx='48' cy='32' r='10'/%3E%3C/g%3E%3Cpath d='M32 26l6 6-6 6-6-6z' fill='%23F2B632'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root { color-scheme: light; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-wrap: anywhere; margin: 0; background: var(--page); color: var(--ink); font: 400 1rem/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-d); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; border-radius: 6px; }
.skip:focus { left: 8px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; word-break: break-all; }

/* header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--head); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 67px; height: 52px; flex: none; object-fit: contain; }
.lang { display: flex; gap: 4px; }
.lang a { padding: 8px 12px; border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--muted); min-width: 44px; text-align: center; }
.lang a[aria-current] { background: var(--sky); color: var(--ink); }

/* hero */
.hero { padding: 40px 0 36px; background: linear-gradient(var(--paper), var(--page)); border-bottom: 1px solid var(--line); position: relative; }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-bottom: 10px; }
.lead { font-size: 1.15rem; max-width: 34em; color: #2A3B52; }
.perks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.perks li { padding-left: 28px; position: relative; }
.perks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 12px; background: var(--sun); transform: rotate(45deg); border-radius: 2px; }
.ribbon { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: 0 1px 0 rgba(20,35,58,.04); }
.ribbon h2 { font-size: 1.05rem; margin-bottom: 14px; }
.rb-row { margin-bottom: 18px; }
.rb-name { display: inline-block; font-weight: 600; margin-bottom: 6px; color: var(--ink); text-decoration: none; }
.rb-name:hover { text-decoration: underline; }
.rb-bar { display: flex; height: 30px; gap: 0; border-radius: 6px; overflow: hidden; background: var(--busy); }
.rb-bar i { flex: 1; background: var(--blue); border-right: 1px solid rgba(255,255,255,.35); }
.rb-bar i.b { background: var(--busy); }
.rb-bar i.m { border-left: 2px solid var(--paper); }
.rb-months { position: relative; height: 18px; margin-top: 4px; font-size: .75rem; color: var(--muted); }
.rb-months span { position: absolute; transform: translateX(0); white-space: nowrap; }
.legend { margin: 6px 0 0; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.sw.free { background: var(--blue); } .sw.busy { background: var(--busy); margin-left: 10px; }

/* apartment cards */
.apts { padding: 44px 20px 56px; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.card:hover { border-color: var(--blue); }
.card-img { aspect-ratio: 16 / 10; background: var(--sky); position: relative; overflow: hidden; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile { background: var(--tile) 0 0 / 64px 64px; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; }
.card:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; }
.card-foot { margin: auto 0 0; padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price { font-weight: 700; }
.cta-text { color: var(--blue); font-weight: 600; }
.facts { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; color: #2A3B52; }
.facts li { position: relative; }
.facts li + li::before { content: ""; position: absolute; left: -10px; top: .6em; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* apartment page */
.stay { padding-top: 28px; padding-bottom: 64px; }
.crumb { margin: 0 0 8px; font-size: .95rem; }
.stay-head h1 { max-width: 20ch; }
.gallery { display: grid; gap: 8px; margin: 24px 0 36px; border-radius: 14px; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery.g1 { grid-template-columns: 1fr; height: clamp(240px, 42vw, 440px); }
.gallery.g2 { grid-template-columns: 1fr 1fr; height: clamp(220px, 34vw, 380px); }
.gallery.g3, .gallery.g4, .gallery.g5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, clamp(110px, 17vw, 190px)); }
.gallery.g3 { grid-template-columns: 2fr 1fr; }
.gallery.g3 img:first-child, .gallery.g4 img:first-child, .gallery.g5 img:first-child { grid-row: span 2; }
.gallery-empty { margin: 24px 0 36px; height: clamp(180px, 28vw, 300px); border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: end start; }
.gallery-empty span { margin: 14px; padding: 6px 12px; background: var(--paper); border-radius: 8px; font-size: .9rem; color: var(--muted); }
.stay-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: start; }
.stay-main section { margin-bottom: 32px; }
.prose p { max-width: 62ch; }
.prose h2 { margin-top: 1.6em; }
.amen { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.amen li, .rules li { padding-left: 24px; position: relative; }
.amen li::before { content: ""; position: absolute; left: 3px; top: .45em; width: 6px; height: 11px; border: solid var(--blue); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.rules li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 8px; height: 8px; background: var(--sun); transform: rotate(45deg); }

/* photo viewer */
.gallery-wrap { position: relative; margin: 24px 0 36px; }
.gallery-wrap .gallery { margin: 0; cursor: zoom-in; }
.btn-photos { position: absolute; right: 12px; bottom: 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 8px; padding: 9px 14px; font: 600 .9rem var(--body); cursor: pointer; }
.btn-photos:hover { background: var(--sky); }
#photos-dlg { width: min(960px, 96vw); max-height: 92vh; padding: 12px; border: 0; border-radius: 14px; background: var(--paper); overflow: auto; }
#photos-dlg::backdrop { background: rgba(20, 35, 58, .75); }
#photos-dlg img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 10px; }
.dlg-close { position: sticky; top: 0; float: right; z-index: 2; margin: 0 0 8px 8px; padding: 10px 16px; background: var(--ink); color: #fff; border: 0; border-radius: 8px; font: 700 .95rem var(--body); cursor: pointer; }

/* booking card */
.book { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px; position: sticky; top: 16px; box-shadow: 0 8px 28px rgba(20,35,58,.08); }
.book h2 { margin-bottom: 2px; }
.from { margin: 0 0 14px; color: var(--muted); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head strong { font: 700 1rem var(--head); }
.cal-nav { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.cal-nav:disabled { opacity: .35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow { text-align: center; font-size: .75rem; color: var(--muted); padding: 4px 0; text-transform: capitalize; }
.cal-day { height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.1; border: 0; background: none; font: 500 .95rem var(--body); color: var(--ink); cursor: pointer; position: relative; border-radius: 0; padding: 0; }
.cal-day:hover:not(:disabled) { background: var(--sky); }
.cal-day:disabled { cursor: not-allowed; color: #98A4B3; }
.cal-day.busy:disabled { text-decoration: line-through; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(201,208,218,.45) 5px 7px); }
.cal-day.today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; background: var(--blue); border-radius: 50%; }
.cal-day.in-range { background: var(--sky); }
.cal-day.edge, .cal-day.edge:disabled { background: var(--sun); font-weight: 700; color: var(--ink); border-radius: 8px; text-decoration: none; }
.cal-day.edge.start { border-radius: 8px 0 0 8px; } .cal-day.edge.end { border-radius: 0 8px 8px 0; }
.cal-day.edge.start.end { border-radius: 8px; }
.cal-hint { min-height: 1.4em; margin: 8px 0 0; font-size: .875rem; color: var(--muted); }
.cal-hint.bad { color: var(--err); }
.range { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; margin: 12px 0; }
.range div { padding: 10px 12px; } .range div + div { border-left: 1px solid var(--line); }
.range span { display: block; font-size: .75rem; color: var(--muted); }
.range strong { font-size: .95rem; }
.field { display: block; margin: 0 0 14px; font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font: 400 1rem var(--body); color: var(--ink); background: var(--paper); border: 1px solid #A9B5C4; border-radius: 8px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--sun); outline-offset: 0; border-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lines { margin: 4px 0 14px; display: grid; gap: 6px; }
.lines div { display: flex; justify-content: space-between; gap: 12px; }
.lines .total { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 800; font-size: 1.1rem; }
.free-cancel { font-size: .9rem; color: var(--ok); margin: 0 0 14px; }
.no-cancel { font-size: .9rem; color: #6B4B00; background: #FFF6DD; border: 1px solid #E8C766; border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.summary .free-cancel, .summary .no-cancel { margin: 10px 0 0; }
.btn { display: block; width: 100%; padding: 14px 20px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font: 700 1rem var(--body); cursor: pointer; text-align: center; text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--blue-d); color: #fff; }
.btn:disabled { background: #AEB9C6; cursor: not-allowed; }
.btn.ghost { background: var(--paper); color: var(--err); border: 1px solid var(--err); }
.btn.ghost:hover:not(:disabled) { background: #FBEDEC; color: var(--err); }
.linkbtn { background: none; border: 0; padding: 8px 0; margin-bottom: 8px; color: var(--blue); font: 600 .95rem var(--body); cursor: pointer; }
.summary { background: var(--page); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: .95rem; }
.pay { border: 0; padding: 0; margin: 0 0 14px; }
.pay legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 8px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid #A9B5C4; border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--blue); background: #F0F6FD; box-shadow: inset 0 0 0 1px var(--blue); }
.opt input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.opt small { display: block; color: var(--muted); font-size: .85rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin-bottom: 14px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.error { color: var(--err); font-weight: 600; margin: 0 0 12px; }

/* booking status page */
.booking { padding-top: 32px; padding-bottom: 64px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: .875rem; background: var(--sky); }
.pill.confirmed { background: #D9F0E3; color: #135C37; } .pill.cancelled, .pill.expired { background: #F3DCDA; color: #8A1F18; } .pill.pending { background: #FBEBC4; color: #6B4B00; }
.pill.soft { background: var(--paper); border: 1px solid var(--line); font-weight: 600; }
.note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--sun); border-radius: 10px; padding: 16px 18px; margin: 18px 0; }
.note h2 { font-size: 1.1rem; }
.kv { margin: 0; display: grid; gap: 0; }
.kv > div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.cancel { margin: 24px 0; max-width: 360px; }

.foot { border-top: 1px solid var(--line); background: var(--paper); padding: 28px 0; font-size: .9rem; margin-top: 24px; }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .stay-grid { grid-template-columns: 1fr; gap: 24px; }
  .book { position: static; order: -1; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .apts { padding: 32px 16px 40px; }
  .amen { grid-template-columns: 1fr; }
  .gallery.g2 { grid-template-columns: 1fr; height: auto; }
  .gallery.g3, .gallery.g4, .gallery.g5 { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 90px; }
  .gallery.g3 img:first-child, .gallery.g4 img:first-child, .gallery.g5 img:first-child { grid-row: auto; grid-column: span 2; }
  .gallery.g4 img:nth-child(n+4), .gallery.g5 img:nth-child(n+4) { display: none; }
  .book { padding: 18px; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .foot-in { flex-direction: column; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

.map { display: block; width: 100%; height: 320px; border: 0; border-radius: 12px; background: var(--sky, #DCE8F6); }
@media (max-width: 640px) { .map { height: 260px; } }

.cal-day small { font: 500 .66rem var(--body); color: var(--muted, #5B6B7F); }
.cal-day.edge small { color: var(--ink); }
.cal-note { margin: 6px 0 0; font-size: .8rem; color: var(--muted, #5B6B7F); }

.foot .copy { margin: 0 auto; padding-top: 18px; padding-bottom: 6px; font-size: .85rem; color: var(--muted, #5B6B7F); }

/* homepage hero: street photo at 50% opacity behind the text */
.hero { overflow: hidden; background: var(--paper); }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/photos/home-hero.jpg") center 40% / cover no-repeat; opacity: .5; }
.hero-in { position: relative; z-index: 1; }
.hero-text { background: rgba(255, 255, 255, .78); border-radius: 16px; padding: 22px 26px; backdrop-filter: blur(2px); }
@media (max-width: 640px) { .hero-text { padding: 16px 16px; } }
.brand, .lang a, .lang span { white-space: nowrap; }
@media (max-width: 480px) { .brand { font-size: 1.02rem; gap: 8px; } .brand-mark { width: 58px; height: 45px; } }
.top-in { justify-content: flex-end; } .top-in { min-height: 56px; }
