:root {
  --bg: #FAF6EE;
  --bg-card: rgba(255, 255, 255, 0.58);
  --bg-card-solid: #FFFFFF;
  --fg: #134E4A;
  --fg-dim: #475569;
  --accent: #0369A1;
  --accent-2: #0F766E;
  --on-accent: #FFFFFF;
  --border: rgba(15, 118, 110, 0.18);
  --glass-border: rgba(255, 255, 255, 0.65);
  --radius: 14px;
  --glass-blur: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }

/* soft warm sand glow over the cream base, fixed so it doesn't repeat/scroll per section */
html {
  background:
    radial-gradient(ellipse 120% 55% at 15% -10%, rgba(217, 180, 122, 0.16), transparent 55%),
    radial-gradient(ellipse 90% 50% at 100% 25%, rgba(15, 118, 110, 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--fg);
  font-family: "Josefin Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, .logo {
  font-family: "Cinzel", serif;
}

/* ---------- reveal-on-scroll: plain CSS transition + IntersectionObserver, no scroll-jacking ---------- */
/* start-state only — GSAP (script.js) animates opacity/transform inline via ScrollTrigger;
   this is just the safe default before JS runs, and the fallback path if GSAP fails to load. */
.reveal {
  opacity: 0;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .apt-stat, .term-row, .rule-badge, .rule-extra li, .spec-row {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 24px clamp(20px, 5vw, 60px);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--accent-2);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
}

#hero-snow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero > *:not(#hero-snow) {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(2.1rem, 6.5vw, 5rem);
  line-height: 1.15;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
  color: var(--fg);
}

/* word-by-word stagger reveal on load — outer span clips, inner span slides up (script.js initHeroStagger) */
.hero-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
}
.hero-word-inner {
  display: inline-block;
}

.hero-sub {
  color: var(--fg-dim);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  margin: 0 0 60px;
}

.scroll-hint {
  color: var(--fg-dim);
  font-size: 13px;
  letter-spacing: 0.05em;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ---------- apartment section ---------- */
.apt {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px;
  border-top: 1px solid var(--border);
}

/* ---------- gallery: scrub by cursor/touch position, no arrows or swipe-per-photo ---------- */
.apt-gallery {
  position: relative;
  margin-bottom: 36px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 40px rgba(15, 118, 110, 0.10);
  aspect-ratio: 4 / 3;
}

/* ---------- gallery prev/next arrows (shared by inline gallery + lightbox) ---------- */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  transition: background 0.15s ease, transform 0.15s ease;
}
.gallery-arrow:hover { background: rgba(255, 255, 255, 0.85); }
.gallery-arrow:active { transform: translateY(-50%) scale(0.92); }
.gallery-arrow--prev { left: 12px; }
.gallery-arrow--next { right: 12px; }

.lightbox-gallery .gallery-arrow {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.lightbox-gallery .gallery-arrow:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-gallery .gallery-arrow--prev { left: 16px; }
.lightbox-gallery .gallery-arrow--next { right: 16px; }

@media (max-width: 640px) {
  .gallery-arrow { width: 36px; height: 36px; }
}

.apt-gallery .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  /* pre-scaled so the scroll-linked parallax (script.js) can shift it vertically
     without ever exposing an edge; no CSS transition here — GSAP drives transform
     every scroll frame via scrub, a competing CSS transition would just fight it. */
  transform: scale(1.15);
}

.apt-gallery-slide--empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-dim);
  font-size: 13px;
  cursor: default;
}

.apt-gallery-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}

/* segment bar (like a filmstrip/progress indicator) showing which photo the pointer is over */
.apt-gallery-segments {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.scrub-segment {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
}
.scrub-segment.active { background: #fff; }

.apt-gallery--empty .apt-gallery-counter,
.apt-gallery--empty .apt-gallery-segments { display: none; }
.apt-gallery--empty { cursor: default; }

@media (min-width: 901px) {
  .apt-gallery { aspect-ratio: 16 / 8; }
}

/* ---------- header / stat row ---------- */
.apt-header { margin-bottom: 8px; }

.apt-name {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0;
  color: var(--fg);
}

.apt-address {
  color: var(--fg-dim);
  margin: 0 0 22px;
}

.apt-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.apt-stat {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.06);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 92px;
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.apt-header.is-visible .apt-stat { opacity: 1; transform: none; }
.apt-stat:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apt-stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
}
.apt-stat-label {
  display: block;
  font-size: 11px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ---------- generic content block ---------- */
.apt-block { margin: 36px 0; }
.apt-block h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-2);
  margin: 0 0 14px;
  font-weight: 600;
  font-family: "Josefin Sans", system-ui, sans-serif;
}

/* terms */
.apt-terms { display: flex; flex-direction: column; gap: 8px; }
.term-row {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.apt-block.is-visible .term-row { opacity: 1; transform: none; }

/* rules */
.rule-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.rule-badge {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.apt-block.is-visible .rule-badge { opacity: 1; transform: none; }
.rule-badge.neutral { color: var(--fg-dim); }
.rule-badge.ok { color: #15803d; border-color: rgba(21, 128, 61, 0.35); background: rgba(134, 239, 172, 0.25); }
.rule-badge.no { color: #b91c1c; border-color: rgba(185, 28, 28, 0.3); background: rgba(252, 165, 165, 0.2); }

.rule-extra { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rule-extra li {
  color: var(--fg-dim);
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}
.apt-block.is-visible .rule-extra li { opacity: 1; transform: none; }

/* spec tables (О квартире / О доме) */
.apt-spec-table { display: flex; flex-direction: column; }
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  transition-delay: calc(var(--i, 0) * 50ms);
}
.apt-block.is-visible .spec-row { opacity: 1; transform: none; }
.spec-row:last-child { border-bottom: none; }
.spec-row span { color: var(--fg-dim); flex-shrink: 0; }
.spec-row strong { color: var(--fg); font-weight: 600; text-align: right; }
.spec-row--list { flex-direction: column; align-items: flex-start; gap: 4px; }
.spec-row--list strong { text-align: left; font-weight: 400; color: var(--fg-dim); line-height: 1.5; }

.spec-row--ok strong { color: #15803d; }
.spec-row--no strong { color: #b91c1c; }

/* description */
.apt-description {
  color: var(--fg-dim);
  line-height: 1.7;
  white-space: pre-line;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.apt-block.is-visible .apt-description { opacity: 1; transform: none; }

/* ---------- book trigger button ---------- */
.apt-book-trigger {
  width: 100%;
  margin-top: 8px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 20px rgba(3, 105, 161, 0.25);
}
.apt-book-trigger:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(3, 105, 161, 0.32); }

/* ---------- booking modal ---------- */
.apt-booking-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.apt-booking-overlay.hidden { display: none; }

.apt-booking-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}
.apt-booking-panel h3 { margin: 0 0 16px; font-size: 1.1rem; }

.apt-booking-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--fg-dim);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.consent-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px !important;
  line-height: 1.5;
  color: var(--fg-dim);
}
.consent-row input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.policy-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
  font: inherit;
  font-size: inherit;
  cursor: pointer;
}

.apt-open-chat-btn {
  width: 100%;
  margin-top: 14px;
  background: var(--accent-2);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.28);
}

.apt-occupied {
  color: var(--fg-dim);
  font-size: 13px;
  margin-bottom: 16px;
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-dim);
}

/* scoped to ".booking-form" so this beats the generic ".booking-form button" accent-button
   rule below in specificity — otherwise this renders as a solid block with no visible label */
.booking-form .date-range-trigger {
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  font-weight: 400;
  margin-top: 0;
}

.booking-form .date-range-trigger.picked { color: var(--accent); font-weight: 600; border-color: var(--accent); }

.slot-picker {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.slot-picker.hidden { display: none; }

.slot-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--fg-dim);
}

.booking-form .slot-picker-header button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-weight: 400;
  margin-top: 0;
}

.slot-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.slot-cell {
  border: none;
  border-radius: 6px;
  padding: 6px 2px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  min-width: 0;
}

.booking-form .slot-cell {
  color: #0f172a;
  font-weight: 400;
  margin-top: 0;
}

.slot-day-grid .slot-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  gap: 1px;
}

.slot-cell-l2 { opacity: 0.75; }

.slot-cell.free { background: #86efac; }
.slot-cell.partial { background: #fcd34d; }
.slot-cell.busy { background: #fca5a5; opacity: 0.6; cursor: not-allowed; color: #7f1d1d; }

.slot-cell.in-range { box-shadow: inset 0 0 0 999px rgba(3, 105, 161, 0.18); }
.slot-cell.range-start,
.slot-cell.range-end {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  font-weight: 700;
}

/* time adjustment shown inline once a date is picked — no confirm step, updates live */
.slot-time-row { display: flex; gap: 10px; margin-top: 12px; }
.slot-time-row .slot-time-label { flex: 1; }

.slot-time-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-dim);
}

.slot-time-input {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--fg);
  font-family: inherit;
  font-size: 16px;
  color-scheme: light;
}

.booking-form input {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
}

.booking-form button {
  margin-top: 8px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}

.booking-form button.policy-link {
  display: inline;
  margin-top: 0;
  background: none;
  color: var(--accent);
  border: none;
  border-radius: 0;
  padding: 0;
  font-weight: 400;
  text-decoration: underline;
}

.booking-status {
  font-size: 13px;
  min-height: 18px;
}

.tracked-status {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.tracked-status.visible { display: block; }
.tracked-status.pending { background: rgba(3, 105, 161, 0.12); color: var(--accent); }
.tracked-status.confirmed { background: rgba(21, 128, 61, 0.12); color: #15803d; }
.tracked-status.rejected { background: rgba(185, 28, 28, 0.12); color: #b91c1c; }

.site-footer a,
.apt-contact-phone a {
  color: var(--accent);
  text-decoration: none;
}

.apt-contact-phone {
  margin-top: 14px;
  font-size: 13px;
  color: var(--fg-dim);
  text-align: center;
}

.closing {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
}

.closing h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 12px; color: var(--fg); }
.closing p { color: var(--fg-dim); }

.site-footer {
  text-align: center;
  padding: 30px 20px 60px;
  color: var(--fg-dim);
  font-size: 12px;
}

.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.35);
}

.chat-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 100;
  width: min(340px, 90vw);
  height: 420px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.chat-header button {
  background: none;
  border: none;
  color: var(--fg-dim);
  font-size: 20px;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-msg.client {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
}

.chat-msg.admin {
  align-self: flex-start;
  background: rgba(15, 118, 110, 0.10);
  color: var(--fg);
}

.chat-form {
  display: flex;
  border-top: 1px solid var(--border);
}

.chat-form input {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 14px;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
}

.chat-form input:focus { outline: none; }

.chat-form button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 18px;
  padding: 0 16px;
  cursor: pointer;
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.92);
}
.lightbox.hidden { display: none; }

.lightbox-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 48px 24px;
  box-sizing: border-box;
}

.lightbox-gallery .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-gallery .swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-segments { top: 20px; left: 20px; right: 20px; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 201;
  background: none;
  border: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- policy modal (privacy / personal data / terms / cookies) ---------- */
.policy-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.policy-modal.hidden { display: none; }

.policy-modal-panel {
  position: relative;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}
.policy-modal-panel h3 { margin: 0 0 16px; font-size: 1.15rem; padding-right: 24px; }

.policy-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--fg-dim);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.policy-modal-body { color: var(--fg-dim); font-size: 13px; line-height: 1.7; }
.policy-modal-body p { margin: 0 0 12px; }
.policy-modal-body p:last-child { margin-bottom: 0; }
.policy-modal-body strong { color: var(--fg); }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 120;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}
.cookie-banner.hidden { display: none; }
.cookie-banner p { margin: 0; font-size: 12px; color: var(--fg-dim); flex: 1; min-width: 200px; }
#cookie-accept {
  background: var(--accent);
  border: none;
  color: var(--on-accent);
  font-weight: 700;
  font-family: inherit;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .apt { padding: 48px 16px; }

  .hero { min-height: 90vh; padding: 0 16px; }

  .slot-time-row { flex-direction: column; }
  .slot-cell { font-size: 12px; padding: 8px 2px; }

  .chat-panel { right: 12px; left: 12px; width: auto; bottom: 84px; }
  .chat-toggle { right: 16px; bottom: 16px; padding: 12px 20px; }

  .cookie-banner { left: 12px; right: 12px; max-width: none; }
}

@media (max-width: 380px) {
  .slot-day-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
