*, *::before, *::after { box-sizing: border-box; }

:root {
  --color-primary: #334155;
  --color-secondary: #0f172a;
  --color-accent: #d97706;
  --color-background: #f8fafc;
  --color-on-primary: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #172033;
  --muted: #5d6879;
  --border: #dce2e9;
  --danger: #a61b1b;
  --danger-soft: #fff1f1;
  --success: #17633a;
  --success-soft: #edf9f2;
  --focus: #111827;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, .12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --page-width: 1180px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--color-primary) 10%, transparent), transparent 30rem),
    var(--color-background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-weight: 800;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.page-state {
  width: min(620px, calc(100% - 32px));
  min-height: 54vh;
  margin: 12vh auto;
  padding: clamp(28px, 6vw, 54px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.page-state h1 { margin: 0; font-size: clamp(1.8rem, 6vw, 3rem); line-height: 1.08; }
.page-state p { margin: 0; color: var(--muted); }
.loading-mark {
  width: 46px;
  height: 46px;
  border: 4px solid var(--border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.public-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--color-background) 90%, transparent);
  backdrop-filter: blur(14px);
  padding-top: env(safe-area-inset-top);
}
.public-nav,
.auth-strip {
  width: min(var(--page-width), calc(100% - 32px));
  margin-inline: auto;
}
.public-nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.public-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}
.public-brand img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; }
.public-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-menu { display: flex; align-items: center; gap: 4px; }
.public-menu a {
  min-height: 44px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 750;
  text-decoration: none;
}
.public-menu a:hover,
.public-menu a[aria-current="location"] { background: var(--surface); color: var(--text); }
.public-menu .nav-booking { background: var(--color-primary); color: var(--color-on-primary); }
.menu-toggle { display: none; min-height: 44px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 800; }
.auth-strip {
  min-height: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  font-size: .86rem;
}
.auth-strip:has(#landing-auth-user:empty):has(#landing-google-button:empty) { display: none; }
.auth-strip button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.page { width: min(var(--page-width), calc(100% - 32px)); margin: 0 auto; padding: 28px 0 76px; }
.landing-layout { display: flex; flex-direction: column; gap: 26px; }
.landing-section { min-width: 0; scroll-margin-top: 106px; }
.section {
  padding: clamp(24px, 5vw, 52px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-sm);
}
.section-heading { max-width: 720px; margin-bottom: 28px; }
.section h2,
.hero h1 { letter-spacing: -.045em; }
.section h2 { margin: 4px 0 8px; font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.08; }
.section-subtitle { margin: 0; color: var(--muted); }
.eyebrow {
  margin: 0;
  color: color-mix(in srgb, var(--color-primary) 78%, #111827);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero {
  min-height: min(680px, calc(100dvh - 122px));
  padding: clamp(28px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  align-items: center;
  gap: clamp(28px, 7vw, 82px);
  border: 1px solid color-mix(in srgb, var(--color-primary) 16%, var(--border));
  border-radius: clamp(26px, 5vw, 48px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 12%, #fff), var(--surface) 55%);
  box-shadow: var(--shadow-lg);
}
.brand-heading { display: grid; justify-items: start; gap: 14px; }
.business-logo { width: min(180px, 48vw); height: 120px; object-fit: contain; object-position: left center; border-radius: 18px; }
.hero h1 { max-width: 800px; margin: 0; font-size: clamp(2.8rem, 7vw, 6rem); line-height: .96; }
.hero-headline { max-width: 720px; margin: 22px 0 8px; font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 750; }
.hero-description { max-width: 680px; margin: 0; color: var(--muted); font-size: 1.04rem; }
.hero-headline:empty, .hero-description:empty { display: none; }
.hero-facts { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 9px; }
.hero-facts span { padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: .88rem; font-weight: 750; }
.hero-facts span::before { content: "•"; margin-right: 7px; color: var(--color-accent); }
.hero-actions, .booking-controls { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { padding: clamp(22px, 4vw, 34px); border-radius: var(--radius-md); background: var(--color-secondary); color: #fff; box-shadow: var(--shadow-lg); }
.hero-card h2 { margin: 8px 0 18px; font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.1; }
.hero-card ol { padding-left: 22px; }
.hero-card li + li { margin-top: 8px; }
.hero-card > p:last-child { margin: 20px 0 0; color: rgba(255,255,255,.76); font-size: .9rem; }
.hero-card .eyebrow { color: color-mix(in srgb, var(--color-accent) 68%, white); }

.btn {
  min-height: 48px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 10px 22px color-mix(in srgb, var(--color-primary) 24%, transparent); }
.btn-secondary { border-color: var(--border); background: var(--surface); color: var(--text); }

.intro-card { max-width: 840px; font-size: clamp(1.05rem, 2vw, 1.28rem); }
.intro-card p { margin: 0; }
.services-grid, .team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card, .team-card, .info-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.service-card { display: flex; flex-direction: column; gap: 14px; }
.service-card h3, .team-card h3, .info-card h3 { margin: 0; font-size: 1.2rem; }
.service-card p, .team-card p { margin: 0; color: var(--muted); }
.service-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 6px 10px; border-radius: 999px; background: var(--surface-soft); font-size: .86rem; font-weight: 800; }
.service-card .btn { align-self: flex-start; margin-top: 6px; }
.team-card { display: grid; align-content: start; gap: 12px; }
.team-avatar { width: 76px; height: 76px; object-fit: cover; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-soft); }
.team-initial { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--color-primary) 14%, var(--surface)); font-size: 1.35rem; font-weight: 900; }
.team-card .btn { justify-self: start; }
.inline-status:empty { display: none; }
.inline-status, .empty-state { padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface-soft); }
.inline-status:not(:empty) { margin-bottom: 16px; }

.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.gallery-item { grid-column: span 4; min-height: 220px; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-md); background: var(--surface-soft); cursor: zoom-in; }
.gallery-item:first-child { grid-column: span 8; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; min-height: 220px; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item:first-child img { aspect-ratio: 16 / 10; }
.gallery-dialog { position: fixed; z-index: 150; inset: 0; display: grid; place-items: center; padding: 20px; }
.gallery-dialog-backdrop { position: absolute; inset: 0; background: rgba(4, 10, 20, .82); }
.gallery-dialog-panel { position: relative; width: min(980px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: 18px; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-lg); }
.gallery-dialog-panel header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.gallery-dialog-panel h2 { margin: 0; font-size: 1.35rem; }
.icon-button { width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.8rem; }
.gallery-viewer { min-height: 360px; margin-top: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border-radius: var(--radius-sm); background: #0f172a; }
.gallery-viewer img { width: 100%; max-height: calc(100dvh - 190px); object-fit: contain; }
.gallery-control { width: 48px; height: 48px; margin: 6px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 2rem; }
#gallery-dialog-caption { margin: 12px 4px 2px; color: var(--muted); }

.location-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fact-list { margin: 18px 0; }
.fact-list div { padding: 12px 0; border-top: 1px solid var(--border); }
.fact-list dt { color: var(--muted); font-size: .8rem; font-weight: 850; text-transform: uppercase; }
.fact-list dd { margin: 3px 0 0; }
.info-note { color: var(--muted); font-size: .9rem; }
.reviews-section > p { max-width: 620px; color: var(--muted); }
.reviews-section .btn { margin-top: 14px; }

.booking-section { border-color: color-mix(in srgb, var(--color-primary) 32%, var(--border)); }
.booking-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.timezone-note { max-width: 280px; margin: 0 0 6px; color: var(--muted); font-size: .88rem; text-align: right; }
.booking-progress { margin: 30px 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); list-style: none; counter-reset: none; }
.booking-progress li { position: relative; display: grid; justify-items: center; gap: 7px; color: var(--muted); font-size: .76rem; font-weight: 800; text-align: center; }
.booking-progress li::before { content: ""; position: absolute; z-index: 0; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--border); }
.booking-progress li:first-child::before { display: none; }
.booking-progress span { z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--border); border-radius: 50%; background: var(--surface); }
.booking-progress li.complete span { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.booking-progress li[aria-current="step"] { color: var(--text); }
.booking-progress li[aria-current="step"] span { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.booking-form { max-width: 900px; margin-inline: auto; }
.booking-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.booking-step legend { width: 100%; margin-bottom: 8px; font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 900; }
.booking-step > p { margin: 0 0 22px; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-button {
  min-width: 0;
  min-height: 96px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-content: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.choice-button strong { font-size: 1.04rem; }
.choice-button small { color: var(--muted); }
.choice-button .choice-check { align-self: center; grid-column: 2; grid-row: 1 / span 2; font-weight: 900; }
.choice-button[aria-pressed="true"] { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 7%, var(--surface)); }
.choice-button[aria-pressed="true"] .choice-check::after { content: "Seleccionado"; }
.online-booking-unavailable { padding: 20px; display: grid; gap: 16px; border: 1px solid #f0c36b; border-radius: var(--radius-sm); background: #fff9e8; }
.online-booking-unavailable .btn { justify-self: start; }

.calendar-picker { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); gap: 22px; }
.calendar-picker > div { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.calendar-picker h3 { margin: 0 0 14px; }
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.calendar-day { min-width: 0; min-height: 76px; padding: 8px 5px; display: grid; place-items: center; gap: 2px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); cursor: pointer; }
.calendar-day strong { font-size: .88rem; }
.calendar-day span { color: var(--muted); font-size: .74rem; }
.calendar-day small { font-size: .68rem; }
.calendar-day:disabled { cursor: not-allowed; background: var(--surface-soft); color: var(--muted); opacity: .74; }
.calendar-day[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.calendar-day[aria-pressed="true"] span { color: inherit; }
.calendar-pagination { margin-top: 12px; display: flex; justify-content: space-between; gap: 8px; }
.calendar-pagination .btn { min-height: 42px; padding: 8px 12px; font-size: .82rem; }
.time-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.time-slot { min-height: 46px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); cursor: pointer; font-weight: 850; }
.time-slot[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-on-primary); }
.empty-slots { grid-column: 1 / -1; margin: 0; padding: 16px; border-radius: 10px; background: var(--surface-soft); color: var(--muted); }
.slot-error { background: var(--danger-soft); color: var(--danger); }
.selected-slot-summary { margin-top: 14px; padding: 15px; border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--border)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--color-primary) 7%, var(--surface)); font-weight: 750; }

.customer-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.customer-fields label { min-width: 0; display: grid; align-content: start; gap: 7px; font-weight: 800; }
.customer-fields .wide-field { grid-column: 1 / -1; }
.optional { color: var(--muted); font-size: .78rem; font-weight: 600; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #b8c2cf;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}
textarea { min-height: 120px; resize: vertical; }
input[type="file"] { padding: 10px; }
[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 18%, transparent); }
.field-error { margin: 8px 0 0; color: var(--danger); font-size: .88rem; font-weight: 750; }
.customer-fields .field-error { margin-top: 0; }
.form-hint, .privacy-note { color: var(--muted); font-size: .9rem; }
.privacy-note { margin-top: 18px; padding: 15px; border-left: 4px solid var(--color-primary); background: var(--surface-soft); }
.error-summary { max-width: 900px; margin: 0 auto 20px; padding: 16px 18px; border: 1px solid #efb3b3; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); }
.error-summary strong { display: block; margin-bottom: 4px; }
.booking-controls { max-width: 900px; margin: 28px auto 0; justify-content: flex-end; }
.booking-controls #booking-back { margin-right: auto; }
.booking-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.review-block { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.review-block h3 { margin: 0 0 8px; font-size: .78rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.review-block p { margin: 3px 0; overflow-wrap: anywhere; }
.review-edit { margin-top: 10px; padding: 0; border: 0; background: transparent; color: var(--color-primary); cursor: pointer; font-weight: 850; text-decoration: underline; }
.expected-state { margin-top: 16px; padding: 18px; border-radius: var(--radius-sm); background: #fff9e8; }
.expected-state p { margin: 5px 0 0; }
.booking-feedback { max-width: 900px; margin-inline: auto; padding: clamp(22px, 5vw, 38px); border: 1px solid #a9d7bc; border-radius: var(--radius-md); background: var(--success-soft); }
.booking-feedback h3 { margin: 6px 0 10px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.booking-feedback p { margin: 7px 0; }
.result-grid { margin: 22px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-grid div { padding: 13px; border-radius: 10px; background: rgba(255,255,255,.75); }
.result-grid strong { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.post-booking-login { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.post-booking-login h3, .post-booking-login p { margin: 0 0 10px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contact-card { min-height: 110px; padding: 20px; display: grid; align-content: center; gap: 5px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); text-decoration: none; }
.contact-card:hover { border-color: var(--color-primary); }
.contact-card span { color: var(--muted); overflow-wrap: anywhere; }
.footer { width: min(var(--page-width), calc(100% - 32px)); margin: 0 auto; padding: 28px 0 42px; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer p { margin: 0; }
.mobile-booking-cta { display: none; }

/* Las plantillas conservan identidad sin alterar la arquitectura ni el foco. */
.template-elegant { font-family: Georgia, "Times New Roman", serif; }
.template-elegant .section, .template-elegant .hero { border-radius: 8px; }
.template-elegant .service-card, .template-elegant .team-card, .template-elegant .info-card { border-radius: 6px; }
.template-beauty .section, .template-beauty .hero { border-radius: 42px; }
.template-beauty .service-card, .template-beauty .team-card { border-radius: 28px; }
.template-clinic .hero { background: var(--surface); border-left: 7px solid var(--color-primary); }
.template-clinic .section { border-radius: 16px; }
.template-urban .hero { background: var(--color-secondary); color: #fff; }
.template-urban .hero .hero-description, .template-urban .hero-facts span { color: rgba(255,255,255,.78); }
.template-urban .hero-facts span { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.template-urban .hero-card { background: var(--surface); color: var(--text); }
.template-urban .hero-card > p:last-child { color: var(--muted); }
.template-minimal .section, .template-minimal .hero { border-radius: 4px; box-shadow: none; }
.template-minimal .page { --page-width: 980px; }

@media (max-width: 1024px) {
  .public-menu a { padding-inline: 8px; font-size: .82rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-card { max-width: 620px; }
  .services-grid, .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-picker { grid-template-columns: 1fr; }
  .gallery-item, .gallery-item:first-child { grid-column: span 6; grid-row: auto; }
}

@media (max-width: 820px) {
  .public-nav { min-height: 62px; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; }
  .public-menu {
    position: absolute;
    top: calc(100% - 1px);
    right: 16px;
    left: 16px;
    max-height: calc(100dvh - 84px);
    padding: 12px;
    display: none;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
  }
  .public-menu.open { display: grid; }
  .public-menu a { width: 100%; min-height: 48px; padding: 12px 14px; }
  .auth-strip { padding-bottom: 7px; }
  .booking-progress { grid-template-columns: repeat(3, 1fr); gap: 14px 0; }
  .booking-progress li:nth-child(4)::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page, .public-nav, .auth-strip, .footer { width: min(100% - 20px, var(--page-width)); }
  .page { padding-top: 12px; padding-bottom: 100px; }
  .landing-layout { gap: 14px; }
  .landing-section { scroll-margin-top: 86px; }
  .section { padding: 23px 18px; border-radius: 22px; }
  .hero { padding: 30px 20px; gap: 30px; border-radius: 24px; }
  .hero h1 { font-size: clamp(2.55rem, 15vw, 4.3rem); }
  .hero-actions .btn { flex: 1 1 150px; }
  .services-grid, .team-grid, .location-grid, .choice-grid, .customer-fields, .booking-review, .result-grid { grid-template-columns: 1fr; }
  .customer-fields .wide-field { grid-column: auto; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item, .gallery-item:first-child { grid-column: auto; }
  .gallery-dialog { padding: 0; }
  .gallery-dialog-panel { width: 100%; max-height: 100dvh; min-height: 100dvh; border-radius: 0; padding: 12px; }
  .gallery-viewer { min-height: calc(100dvh - 150px); gap: 3px; }
  .gallery-control { width: 42px; height: 42px; margin: 2px; }
  .booking-heading { display: block; }
  .timezone-note { max-width: none; margin: 8px 0 0; text-align: left; }
  .booking-progress { overflow-x: auto; grid-template-columns: repeat(6, minmax(88px, 1fr)); padding-bottom: 8px; }
  .booking-progress li:nth-child(4)::before { display: block; }
  .calendar-picker > div { padding: 14px 10px; }
  .calendar-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .time-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calendar-pagination { align-items: stretch; }
  .calendar-pagination .btn { flex: 1; }
  .booking-controls { position: sticky; z-index: 20; bottom: 70px; margin-inline: -8px; padding: 10px 8px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); }
  .booking-controls .btn { flex: 1; }
  .footer { padding-bottom: calc(92px + env(safe-area-inset-bottom)); flex-direction: column; }
  .mobile-booking-cta {
    position: fixed;
    z-index: 70;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    min-height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: var(--shadow-lg);
    font-weight: 900;
    text-decoration: none;
  }
}

@media (max-width: 390px) {
  .public-brand { max-width: 190px; }
  .calendar-days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .time-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-progress { margin-inline: -10px; }
  .booking-controls { flex-direction: column-reverse; }
  .booking-controls #booking-back { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  :focus-visible,
  .btn,
  .choice-button,
  .calendar-day,
  .time-slot,
  .status-badge,
  .gallery-control { border: 2px solid currentColor; }
  .choice-button[aria-pressed="true"],
  .calendar-day[aria-pressed="true"],
  .time-slot[aria-pressed="true"] { outline: 3px solid currentColor; }
}

@media print {
  .public-header,
  .mobile-booking-cta,
  .booking-controls,
  .gallery-dialog,
  .auth-strip { display: none !important; }
  body { background: #fff; color: #000; }
  .page { width: 100%; padding: 0; }
  .section, .hero { break-inside: avoid; box-shadow: none; }
}
