:root {
  --bg: #f4efe8;
  --paper: #fffdf9;
  --ink: #2b221a;
  --muted: #6d6158;
  --taupe: #9c8c7d;
  --espresso: #3a2d24;
  --gold: #b8956a;
  --gold-soft: #efe4d4;
  --line: #e4dbd0;
  --ok: #2f5a43;
  --ok-bg: #e7f0ea;
  --warn: #8a3f2c;
  --danger: #8b2e2e;
  --shadow: 0 18px 50px rgba(43, 34, 26, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  max-width: 100%;
}
body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #fbf6ef, transparent 50%),
    var(--bg);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

h1, h2, h3, .brand-name {
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.02em;
}

a { color: var(--espresso); }
button, input, select, textarea { font: inherit; }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  z-index: 20;
}

.demo-banner {
  background: var(--espresso);
  color: #f6efe6;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 8px 16px;
}
.demo-banner strong { font-weight: 600; }

.cita-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cita-tabs a {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
}
.cita-tabs a.is-active {
  background: #fff;
  border-color: var(--line);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 20px 72px;
}

.hero-copy { max-width: 36rem; margin: 12px 0 28px; }
.hero-copy h1 { font-size: clamp(28px, 5vw, 42px); margin: 0 0 8px; }
.hero-copy p { margin: 0; color: var(--muted); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.step {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.step.is-on {
  color: var(--espresso);
  background: var(--gold-soft);
  border-color: transparent;
}

.grid-services {
  display: grid;
  gap: 10px;
}
.choice {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 56px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.choice:hover, .choice:focus-visible { border-color: var(--gold); }
.choice.is-picked {
  border-color: var(--espresso);
  background: #fbf6ef;
}
.choice small { color: var(--muted); display: block; font-size: 13.5px; }
.choice .meta { text-align: right; color: var(--muted); font-size: 13.5px; white-space: nowrap; }

.staff-row { display: grid; gap: 8px; }
@media (min-width: 640px) {
  .staff-row { grid-template-columns: repeat(3, 1fr); }
}

.day-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin: 4px 0 14px;
}
.day {
  min-width: 68px;
  min-height: 64px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  padding: 8px 6px;
}
.day b { display: block; font-size: 16px; }
.day span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.day.is-picked { background: var(--espresso); color: #fff; border-color: var(--espresso); }
.day.is-picked span { color: #e8dccb; }
.day:disabled { opacity: 0.35; cursor: not-allowed; }

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.slot {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.slot.is-picked { background: var(--espresso); color: #fff; border-color: var(--espresso); }
.muted { color: var(--muted); }
.empty { padding: 18px 4px; color: var(--muted); }

.form { display: grid; gap: 12px; margin-top: 8px; }
label span { display: block; font-size: 13px; margin-bottom: 4px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--espresso); color: #f7f0e6; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-wa { background: #128c4a; color: #fff; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #ead3d0; }

.ok-box {
  background: var(--ok-bg);
  border-radius: 14px;
  padding: 16px;
  color: var(--ok);
}
.fineprint { font-size: 13.5px; color: var(--muted); margin-top: 16px; }

.split {
  display: grid;
  gap: 16px;
}

.agenda-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.agenda-toolbar h1 { margin: 0; flex: 1; font-size: 28px; }

.cols {
  display: grid;
  gap: 12px;
}
@media (min-width: 800px) {
  .cols.n-2 { grid-template-columns: 1fr 1fr; }
  .cols.n-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.appt {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
}
.appt.blocked { background: #f3eee8; }
.appt.cancelled { opacity: 0.5; }
.appt h3 { margin: 0 0 4px; font-size: 16px; }
.tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--espresso);
}
.login {
  max-width: 420px;
  margin: 48px auto;
}

.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--espresso);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  display: none;
  z-index: 30;
}
.toast.show { display: block; }

footer.foot, footer.site {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 32px;
  color: var(--muted);
  font-size: 13.5px;
}



/* Mobile pull-downs for day + time; chips/grid stay on desktop */
.mobile-pick { display: none; margin: 4px 0 14px; }
.mobile-pick select {
  width: 100%;
  max-width: 100%;
  appearance: auto;
  -webkit-appearance: menulist;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile: phone-native booking UI (keep body overflow-x: hidden only; never clip) */
@media (max-width: 860px) {
  body { font-size: 16px; }

  /* Compact native selects instead of wide chip strip / slot grid */
  .day-row.desktop-pick,
  .slots.desktop-pick {
    display: none !important;
  }
  .mobile-pick {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 2px 0 14px;
  }
  .mobile-pick select {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    font-size: 16px;
    box-sizing: border-box;
  }

  #app,
  .card,
  .split {
    max-width: 100%;
    overflow-x: hidden; /* contain leftover layout width without clipping page scroll */
  }


  .wrap {
    max-width: 100%;
    width: 100%;
    padding: 6px 12px 100px; /* room above WhatsApp FAB */
    box-sizing: border-box;
  }

  .page-hero { padding-top: 12px; }
  .note { font-size: 13.5px; line-height: 1.45; margin: 0 0 10px; }
  .hero-copy { margin: 8px 0 16px; }
  .hero-copy h1 { font-size: clamp(24px, 7vw, 32px); }
  .hero-copy p { font-size: 15px; }

  .card {
    padding: 14px;
    max-width: 100%;
    border-radius: 14px;
  }
  .card h2 {
    font-size: 1.12rem;
    margin: 0 0 8px;
  }
  .card h2[style] { margin-top: 16px !important; }

  .steps { margin-bottom: 12px; gap: 6px; }
  .step { padding: 5px 8px; font-size: 12px; }

  .choice {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    max-width: 100%;
    width: 100%;
    padding: 12px 14px;
    min-height: 52px;
    border-radius: 12px;
  }
  .choice .meta {
    white-space: normal;
    text-align: right;
    max-width: 42%;
    font-size: 12.5px;
  }
  .choice small { font-size: 12.5px; }

  .staff-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .staff-row .choice {
    min-height: 52px;
  }

  .cita-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .cita-tabs a {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    font-size: 14.5px;
  }

  .day-row {
    gap: 6px;
    margin: 2px 0 12px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  .day {
    min-width: 56px;
    min-height: 56px;
    flex: 0 0 auto;
    padding: 6px 4px;
    border-radius: 10px;
  }
  .day b { font-size: 15px; line-height: 1.2; }
  .day span { font-size: 10px; letter-spacing: 0.04em; }

  .slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .slot {
    min-height: 40px;
    padding: 6px 2px;
    font-size: 13.5px;
    border-radius: 8px;
  }

  .form { gap: 10px; }
  .form label span { font-size: 12.5px; margin-bottom: 3px; }
  input, select, textarea {
    font-size: 16px; /* avoid iOS input zoom */
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 10px;
  }
  textarea { min-height: 84px; }

  .actions { gap: 8px; }
  .btn {
    min-height: 48px;
    padding: 10px 16px;
    font-size: 15px;
    width: 100%;
  }
  .actions .btn { flex: 1 1 auto; }

  .agenda-toolbar h1 { font-size: 1.25rem; }
  .split { gap: 12px; }

  footer.foot, footer.site {
    max-width: 100%;
    padding: 0 12px 88px;
    overflow-wrap: anywhere;
  }
}

/* Narrow phones (~360–430px): denser still */
@media (max-width: 640px) {
  .wrap { padding: 4px 12px 104px; }

  .card { padding: 12px; }

  .choice {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 11px 12px;
    min-height: 48px;
  }
  .choice .meta {
    white-space: normal;
    text-align: left;
    max-width: 100%;
  }

  .staff-row .choice {
    min-height: 48px;
    padding: 12px;
  }

  .day {
    min-width: 52px;
    min-height: 52px;
    padding: 5px 3px;
  }
  .day b { font-size: 14px; }

  .slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .slot {
    min-height: 38px;
    font-size: 13px;
    padding: 5px 2px;
  }

  .card h2 { font-size: 1.05rem; }
}
