:root {
  --ink: #12201c;
  --foam: #eef3ef;
  --paper: #f8fbf8;
  --muted: #4f635a;
  --brand: #0f3d36;
  --accent: #2f8f6b;
  --line: rgba(15, 61, 54, 0.12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: rgba(47, 143, 107, 0.15);
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(47, 143, 107, 0.14), transparent 55%),
    var(--foam);
}
a { color: inherit; text-decoration: none; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: calc(0.9rem + env(safe-area-inset-top)) max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right)) 0.9rem max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left));
  background: var(--brand);
  color: #fff;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.45rem;
}
.brand.brand--home {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.top nav { display: flex; gap: 1rem; font-size: 0.9rem; font-weight: 500; align-items: center; }
.top nav a.nav-academia {
  opacity: 1;
  font-weight: 700;
  color: #fff;
  background: var(--accent, #2f8f6b);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(47, 143, 107, 0.35);
}
.top nav a.nav-academia:hover { filter: brightness(1.08); color: #fff; }
.wrap {
  width: min(760px, calc(100% - 2rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin: 1.5rem auto 3rem;
}
.foot {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.eyebrow {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0 0 0.55rem; }
h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
.lede, .muted, .hint { color: var(--muted); line-height: 1.55; }
.hint { font-size: 0.88rem; }
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
  margin: 1rem 0;
}
.is-hidden { display: none !important; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  padding: 0;
  margin: 1.2rem 0 0;
}
.steps li {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 0.3rem;
  border-radius: 99px;
  background: rgba(15, 61, 54, 0.08);
  color: var(--muted);
}
.steps li.is-active {
  background: var(--accent);
  color: #fff;
}
.therapy-grid {
  display: grid;
  gap: 0.65rem;
}
.therapy {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  font: inherit;
}
.therapy strong { display: block; margin-bottom: 0.2rem; }
.therapy span { color: var(--muted); font-size: 0.9rem; }
.therapy.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 143, 107, 0.25);
  background: #f2faf6;
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.cal-grid.head span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.25rem 0;
}
.day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: default;
  position: relative;
}
.day.is-muted { color: #aab5af; }
.day.is-available {
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}
.day.is-available::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.day.is-selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.day.is-selected::after { background: #fff; }
.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.slot {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.slot.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.summary {
  background: #eef6f1;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}
.stack { display: grid; gap: 0.85rem; }
label { display: grid; gap: 0.35rem; font-size: 0.9rem; font-weight: 500; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 16px;
  background: #fff;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]), select { min-height: 44px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0.8rem 1.1rem;
  font: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.alert.error {
  background: #f7dede;
  color: #7a1f1f;
  padding: 0.8rem 1rem;
  border-radius: 8px;
}
.success {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 560px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

.pay-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
@media (min-width: 900px) {
  .pay-grid { grid-template-columns: repeat(3, 1fr); }
}

label.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 500;
}
label.check input { width: 1.2rem; height: 1.2rem; margin: 0.1rem 0 0; flex-shrink: 0; accent-color: var(--accent); }
@media (pointer: coarse) {
  label.check { min-height: 2.25rem; padding: 0.15rem 0; }
}
.consent-list { margin: 0 0 1rem; padding-left: 1.3rem; line-height: 1.6; }
.consent-list li { margin-bottom: 0.45rem; }
.consent-done { border-left: 4px solid var(--accent); }
.consent-doc { line-height: 1.65; }
.consent-doc p { margin: 0 0 0.85rem; text-align: justify; hyphens: auto; }
.consent-doc strong { color: var(--brand); }
.consent-title { text-align: center; letter-spacing: 0.06em; font-size: 1.25rem; margin: 0 0 1rem; }
.consent-items { list-style: none; margin: -0.3rem 0 0.9rem; padding-left: 1.2rem; }
.consent-items li { position: relative; padding-left: 2.2rem; margin-bottom: 0.55rem; text-align: justify; }
.consent-item-label { position: absolute; left: 0; color: var(--muted); }
.consent-fill { font-weight: 600; color: var(--brand); background: var(--foam); border-radius: 3px; padding: 0 0.08rem; hyphens: none; overflow-wrap: anywhere; }
.qr-box { text-align: center; margin: 1rem 0; }
.qr-box svg { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.form-grid { display: grid; gap: 0.85rem; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--foam);
  color: var(--brand);
}
.tag.warn { background: #fbefd9; color: #7a4b0f; }
.tag.ok { background: #d9f0e4; color: #164b36; }
.location-picker { display: grid; gap: 0.85rem; }
.location-custom { display: grid; gap: 0.85rem; padding: 0.85rem; border: 1px dashed var(--line); border-radius: 8px; }
@media (min-width: 640px) {
  .location-custom { grid-template-columns: 1fr 1fr; }
  .location-custom .check { grid-column: 1 / -1; }
}
.location-row { display: flex; justify-content: space-between; gap: 0.6rem 1rem; flex-wrap: wrap; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.location-row .admin-details { flex-basis: 100%; }
.admin-details { margin-top: 0.4rem; }
.admin-details summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 0.88rem; }
.admin-details[open] summary { margin-bottom: 0.75rem; }
.consent-item { padding: 0.75rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.consent-item summary { font-size: 1rem; color: var(--ink); }
.consent-item summary .tag { margin-left: 0.35rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.alert.ok { background: #d9f0e4; color: #164b36; padding: 0.8rem 1rem; border-radius: 8px; }
.alert { margin: 1rem 0; line-height: 1.5; }
.btn-copy { min-height: 36px; padding: 0.3rem 0.75rem; margin: 0.25rem 0 0.25rem 0.4rem; font-size: 0.85rem; vertical-align: middle; }
.consent-jump { display: none; }
@media (max-width: 760px) {
  .consent-jump {
    display: flex; position: sticky; z-index: 5;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    margin: 0 0 1rem; box-shadow: 0 10px 24px rgba(15, 61, 54, 0.25);
  }
  .consent-actions .btn { flex: 1 1 100%; }
}
