/* Reusable components built on the tokens in application.css. */

/* Brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-navy);
  text-decoration: none;
}

/* The wordmark (name and peace sign) is the only place the name appears on
   a page, in the logo's own lettering. */
.brand__wordmark {
  height: 4rem;
  width: auto;
}

/* A partner's own logo or name on its client pages. */
.brand__partner-logo {
  height: 2.75rem;
  max-width: 12rem;
  width: auto;
  object-fit: contain;
}

.brand__partner-name {
  font-size: var(--text-title);
  font-weight: 800;
  line-height: 1.1;
}

.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-navy);
}

.lockup__logo {
  width: 18rem;
  max-width: 100%;
}

.lockup__logo--partner {
  max-height: 9rem;
  width: auto;
  object-fit: contain;
}

.business-logo-preview {
  display: block;
  max-height: 4rem;
  max-width: 12rem;
  width: auto;
  object-fit: contain;
}

.lockup__name {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.lockup__tagline {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* The signed-in header for therapists and admins (layouts/_site_menu):
   one bar, with dropdowns; behind a Menu button on narrower screens. */
.site-header--menu {
  position: relative;
}

.site-menu {
  display: flex;
  align-items: center;
}

.site-menu__items {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-menu__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--color-ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.site-menu__link:hover {
  background: var(--color-pill);
}

.site-menu__link--current,
.site-menu__link--current:hover {
  background: var(--color-lemon);
}

.site-menu__group {
  position: relative;
}

.site-menu__group-toggle::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-20%) rotate(45deg);
}

.site-menu__group-toggle[aria-expanded="true"]::after {
  transform: translateY(20%) rotate(-135deg);
}

.site-menu__icon {
  width: 1.375rem;
  height: 1.375rem;
}

.site-menu__account-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-menu__panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 14rem;
  margin: 0;
  padding: var(--space-2);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  box-shadow: 0 12px 32px rgb(21 21 21 / 0.12);
  list-style: none;
}

.site-menu__panel[hidden] {
  display: none;
}

.site-menu__panel .site-menu__link {
  width: 100%;
  border-radius: 12px;
}

.site-menu__panel form {
  margin: 0;
}

.site-menu__signed-in {
  padding: var(--space-2) var(--space-4);
  color: var(--color-muted);
  font-size: 0.8125rem;
}

.site-menu__toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-pill);
  color: var(--color-ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

/* Three lines, drawn with borders: no icon file or inline style. */
.site-menu__burger,
.site-menu__burger::before,
.site-menu__burger::after {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.site-menu__burger {
  position: relative;
}

.site-menu__burger::before,
.site-menu__burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-menu__burger::before {
  top: -5px;
}

.site-menu__burger::after {
  top: 5px;
}

.site-menu--open .site-menu__burger {
  background: transparent;
}

.site-menu--open .site-menu__burger::before {
  top: 0;
  transform: rotate(45deg);
}

.site-menu--open .site-menu__burger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Narrower screens: the logo and a Menu button; the items open as a panel
   under the header, with each dropdown opening in place. */
@media (max-width: 64rem) {
  .site-menu__toggle {
    display: inline-flex;
  }

  .site-menu__items {
    display: none;
    position: absolute;
    top: 100%;
    left: var(--space-4);
    right: var(--space-4);
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-3);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    box-shadow: 0 12px 32px rgb(21 21 21 / 0.12);
  }

  .site-menu--open .site-menu__items {
    display: flex;
  }

  .site-menu__items .site-menu__link {
    width: 100%;
    min-height: 3rem;
    font-size: 1rem;
  }

  .site-menu__group-toggle {
    justify-content: space-between;
  }

  .site-menu__panel {
    position: static;
    min-width: 0;
    padding: 0 0 var(--space-2) var(--space-4);
    border: 0;
    box-shadow: none;
  }

  .site-menu__account-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .site-menu__account {
    justify-content: flex-start;
  }

  .site-menu__account::after {
    margin-left: auto;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--color-ink);
  color: var(--color-surface);
}

.btn--primary:hover {
  color: var(--color-surface);
  opacity: 0.9;
}

.btn--accent {
  background: var(--color-lemon);
  color: var(--color-ink);
}

.btn--secondary {
  background: var(--color-pill);
  color: var(--color-ink);
  font-weight: 500;
}

.btn--small {
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  font-size: 0.875rem;
}

.btn--block {
  width: 100%;
}

.button-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Cards */

.card {
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.card--mist {
  background: var(--color-mist);
}

.auth {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
  max-width: 26rem;
  margin: var(--space-5) auto 0;
}

.auth__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
}

/* Forms */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field__label {
  font-size: var(--text-eyebrow);
  font-weight: 600;
}

.field__hint {
  font-size: var(--text-eyebrow);
  color: var(--color-muted);
}

.field__input {
  /* Without these, a select sizes itself to its longest option and can
     overflow a narrow phone screen. */
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: var(--control-height);
  padding: 0 1.125rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-input);
  background: var(--color-ground);
  color: var(--color-ink);
  font: inherit;
  font-size: 1.0625rem;
}

.field__input:focus-visible {
  outline-offset: 0;
}

.field__input--code {
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  text-align: center;
}

/* Two-factor setup */

.qr-code {
  align-self: center;
  width: 12rem;
  padding: var(--space-3);
  border-radius: var(--radius-input);
  background: var(--color-surface);
}

/* Big enough to scan from across the chair (the tip code). */
.qr-code--large {
  width: min(18rem, 100%);
}

.qr-code img {
  display: block;
  width: 100%;
  height: auto;
}

.secret-key {
  margin-top: var(--space-2);
  font-family: ui-monospace, monospace;
  font-size: 1.0625rem;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.recovery-codes code {
  font-size: 1.0625rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-eyebrow);
  color: var(--color-muted);
  line-height: 1.4;
}

.check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-ink);
}

.errors {
  padding: var(--space-4);
  border: 1px solid var(--color-signal);
  border-radius: var(--radius-input);
  font-size: 0.9375rem;
}

.errors ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-5);
}

/* Flash messages and banners */

.flash {
  max-width: 72rem;
  margin: 0 auto var(--space-4);
  padding: 0 var(--space-4);
}

.flash__message {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 0.9375rem;
}

.flash__message--alert {
  border: 1px solid var(--color-signal);
}

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-card);
  background: var(--color-mist);
  color: var(--color-mist-ink);
  font-size: 0.9375rem;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 2.25rem;
  }

  /* On phones the logo is centered, with the buttons below it. */
  .site-header {
    flex-direction: column;
    gap: var(--space-3);
  }

  .site-header--menu {
    flex-direction: row;
  }

  .site-header--menu .brand__wordmark {
    height: 3rem;
  }

  .site-nav {
    gap: var(--space-1);
  }

  .site-nav .btn--small {
    padding: 0 var(--space-3);
  }

  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: var(--space-5);
  }
}

/* Admin */

/* Which business the admin area is working in, and the switcher. */
.admin-business {
  margin-bottom: var(--space-3);
}

.admin-business__select {
  width: auto;
  min-height: 2.75rem;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-pill);
  color: var(--color-ink);
  font-size: 0.9375rem;
  text-decoration: none;
}

.pill--current {
  background: var(--color-lemon);
  font-weight: 600;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}

.page-header__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.section-title {
  margin: var(--space-6) 0 var(--space-3);
  font-size: 1.25rem;
  font-weight: 500;
}

.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-input);
  background: var(--color-surface);
}

.list__main {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.list__title {
  font-weight: 600;
  text-decoration: none;
}

.list__kind {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

.list__meta {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.empty {
  padding: var(--space-5);
  border: 1px dashed var(--color-line);
  border-radius: var(--radius-input);
  color: var(--color-muted);
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.75rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: var(--text-eyebrow);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-muted);
}

.badge--published::before {
  background: var(--color-navy);
}

.badge--live {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-surface);
}

.badge--live::before {
  background: var(--color-lemon);
}

.badge--closed,
.badge--cancelled {
  color: var(--color-muted);
}

.badge--cancelled::before {
  background: var(--color-signal);
}

/* A massage's payment, on the chair. */
.badge--unpaid::before {
  background: var(--color-signal);
}

.badge--paid::before {
  background: var(--color-navy);
}

.details {
  display: grid;
  grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  margin: 0;
}

.details dt {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  color: var(--color-muted);
  padding-top: 0.125rem;
}

.details dd {
  margin: 0;
}

.fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  border: 0;
}

.fieldset legend {
  margin-bottom: var(--space-3);
  font-size: 1.25rem;
  font-weight: 500;
}

select.field__input {
  appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-ink) 50%), linear-gradient(135deg, var(--color-ink) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - 0.9rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
}

textarea.field__input {
  min-height: 6rem;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  line-height: 1.5;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.checkbox-row input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--color-ink);
}

.form-narrow {
  max-width: 40rem;
}

.btn--danger {
  background: transparent;
  border: 1px solid var(--color-signal);
  color: var(--color-ink);
  font-weight: 500;
}

@media (max-width: 30rem) {
  .details {
    grid-template-columns: minmax(0, 1fr);
    gap: 0 var(--space-4);
  }

  .details dd {
    margin-bottom: var(--space-3);
  }
}

.danger-zone {
  margin: var(--space-6) 0 0;
}

.pill__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.375rem;
  height: 1.375rem;
  margin-left: var(--space-1);
  padding: 0 0.375rem;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-surface);
  font-size: 0.75rem;
  font-weight: 600;
}

/* A section that opens on tap (e.g. past shifts), closed to start. */
.section-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-3);
  cursor: pointer;
  list-style: none;
}

.section-disclosure > summary::-webkit-details-marker {
  display: none;
}

.section-disclosure > summary .section-title {
  margin: 0;
}

.section-disclosure > summary::after {
  content: "";
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: var(--space-2);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 150ms ease;
}

.section-disclosure[open] > summary::after {
  transform: translateY(25%) rotate(-135deg);
}

.section-disclosure__count {
  margin-left: var(--space-1);
  color: var(--color-muted);
  font-size: 1rem;
}

.section-title--flush {
  margin-top: 0;
}

.inline-form {
  display: inline;
  margin-left: var(--space-2);
}

/* File fields: our own button and "✓ ready" note (file_picker_controller.js).
   The input itself is hidden but still focusable. */
.file-picker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.file-picker__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.file-picker__input:focus-visible + .file-picker__button {
  outline: 2px solid var(--color-navy);
  outline-offset: 2px;
}

.file-picker__button {
  cursor: pointer;
}

.file-picker__status {
  font-weight: 600;
}

/* Therapist profiles */

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.avatar {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-mist);
}

.avatar--small {
  width: 4rem;
  height: 4rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-ground);
  font-size: 0.875rem;
}

.badge--approved::before {
  background: var(--color-navy);
}

.badge--rejected,
.badge--suspended {
  color: var(--color-muted);
}

.badge--rejected::before,
.badge--suspended::before {
  background: var(--color-signal);
}

/* Staffing and money */

.card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.list__item--flat {
  padding: var(--space-3) var(--space-4);
  background: var(--color-ground);
}

.form--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
}

.field--grow {
  flex: 1 1 12rem;
}

.details--money dd {
  line-height: 1.6;
}

.section-title--small {
  margin: var(--space-4) 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.badge--confirmed,
.badge--preferred {
  border-color: var(--color-ink);
}

.badge--confirmed::before,
.badge--preferred::before {
  background: var(--color-navy);
}

.badge--invited::before {
  background: var(--color-lemon);
  outline: 1px solid var(--color-ink);
}

.badge--declined,
.badge--withdrawn,
.badge--removed,
.badge--expired,
.badge--excluded {
  color: var(--color-muted);
}

.badge--withdrawn::before,
.badge--excluded::before {
  background: var(--color-signal);
}

.badge--applied::before,
.badge--waitlisted::before {
  background: var(--color-mist-ink);
}

.badge--not_selected {
  color: var(--color-muted);
}

/* Printable QR posters */

.poster-page {
  background: var(--color-surface);
}

.poster-actions {
  display: flex;
  justify-content: space-between;
  max-width: 40rem;
  margin: var(--space-4) auto 0;
  padding: 0 var(--space-4);
}

.poster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.poster__headline {
  margin-top: var(--space-4);
  font-size: 3.5rem;
}

.poster__subhead {
  font-size: 1.375rem;
}

.poster__qr {
  width: min(22rem, 80vw);
  margin: var(--space-4) 0;
}

.poster__cta {
  font-size: 1.375rem;
  font-weight: 600;
}

.poster__detail,
.poster__url {
  color: var(--color-muted);
}

.poster__url {
  font-size: 0.8125rem;
  word-break: break-all;
}

@media print {
  .poster-actions {
    display: none;
  }

  .poster {
    padding-top: 0;
  }
}

/* Room listings */

.badge--listed::before {
  background: var(--color-navy);
}

.banner--stack {
  flex-direction: column;
  align-items: flex-start;
}

.room-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-photos__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.room-photos__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-input);
}

.room-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.room-card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-input);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.door-code {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.space-question {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.space-question > span {
  flex: 1 1 100%;
}

.time-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.pill--choice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.pill--choice:has(input:checked) {
  background: var(--color-ink);
  color: var(--color-surface);
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding-left: var(--space-5);
}

/* What's left before renting or taking bookings (therapist/_rental_steps):
   each line opens to explain itself, with a link to where it's done. */
.rental-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.rental-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-line);
}

.rental-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rental-step__details {
  width: 100%;
}

.rental-step__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  cursor: pointer;
  list-style: none;
}

.rental-step__summary::-webkit-details-marker {
  display: none;
}

.info-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid var(--color-muted);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: 0.8125rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}

.rental-step__details[open] .info-button {
  border-color: var(--color-ink);
  background: var(--color-ink);
  color: var(--color-surface);
}

.rental-step__info {
  margin: var(--space-2) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-input);
  background: var(--color-ground);
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.rentable-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
}

.rentable-day__day {
  grid-column: 1 / -1;
}

.rentable-day .field__input {
  padding-inline: var(--space-3);
}

/* Printable signed agreements (waivers and guardian consents) */

.agreement {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.agreement__text {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}

.agreement__footer {
  font-size: 0.8125rem;
}

@media print {
  .agreement {
    padding-top: 0;
  }
}

/* Joining the line */

.join__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.wait-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5);
}

.wait-card__number {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

.wait-card__meta,
.wait-card__price {
  font-size: 0.875rem;
  color: var(--color-mist-ink);
}

.wait-card__price {
  max-width: 14rem;
  text-align: right;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.choice {
  position: relative;
  display: inline-flex;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.choice input:checked + span {
  border-color: var(--color-ink);
  background: var(--color-lemon);
  font-weight: 600;
}

.choice input:focus-visible + span {
  outline: 3px solid var(--color-navy);
  outline-offset: 2px;
}

.agreements {
  gap: var(--space-3);
}

.legal {
  margin-top: calc(-1 * var(--space-2));
  font-size: 0.875rem;
  color: var(--color-muted);
}

.legal summary {
  cursor: pointer;
  text-decoration: underline;
}

.legal p {
  margin-top: var(--space-2);
}

/* A place in line */

.card--lemon {
  background: var(--color-lemon);
}

/* A lemon button would vanish on a lemon card */
.card--lemon .btn--accent {
  background: var(--color-surface);
}

.place-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.place-card__who {
  font-weight: 600;
}

.place-card__number {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}

.place-card__number span {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.place-card__meta {
  color: var(--color-mist-ink);
}

/* The short number for calling someone and finding their place again. */
.line-number {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.line-number__label {
  color: var(--color-muted);
}

.line-number__value {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* In-seat events: where the therapist finds the client. */
.seat-callout {
  font-size: 1.25rem;
}

/* Handing a standing shift to another therapist (admin series page). */
.handover {
  flex-basis: 100%;
}

.handover summary {
  cursor: pointer;
  font-weight: 600;
}

.handover__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.seat-location summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  cursor: pointer;
}

.seat-location__form {
  margin-top: var(--space-2);
}

/* Full-width buttons stay full width in a place card (e.g. the chair's
   Call next, Start and Finish): big targets for busy hands. */
.place-card > form:has(.btn--block) {
  align-self: stretch;
}

/* The massage timer on the therapist's chair page */
.session-timer {
  font-variant-numeric: tabular-nums;
}

/* "Time's up": a heavy ink outline and a label, so it shows on a phone
   that's on silent. Past the maximum the clock turns red. */
.session-timer--done {
  box-shadow: inset 0 0 0 4px var(--color-ink);
}

.session-timer--over .session-timer {
  color: var(--color-signal);
}

/* A paused massage: the clock stands still until Resume. */
.pause-callout {
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  border: 2px solid var(--color-ink);
}

.session-timer__status {
  font-size: 1.25rem;
  font-weight: 600;
}

/* An opened section in a list row (e.g. the chair's Follow-up and Fix
   times) takes the full width, with room between its parts. */
.list__item details[open] {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.list__item details[open] > form,
.list__item details[open] > details {
  align-self: stretch;
}

/* A given rating: filled stars, then the rest muted */
.rating-stars {
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--color-ink);
}

.rating-stars span {
  color: var(--color-line);
}

/* A simple data table (e.g. the admin offers report) */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-input);
  overflow: hidden;
  font-size: 0.875rem;
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-line);
}

.table th {
  font-weight: 600;
  color: var(--color-muted);
}

/* An offer's code, easy to read out at the front desk */
.offer-code {
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
}

/* The sponsor's running tally (admin event page). */
.budget-bar {
  width: 100%;
  height: 0.75rem;
  accent-color: var(--color-navy);
}

.tally {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-eyebrow);
}

.tally th,
.tally td {
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--color-line);
  text-align: left;
}

.tally td:nth-child(n+3),
.tally th:nth-child(n+3) {
  text-align: right;
}

/* Sponsor invoices. */
.badge--invoice-sent::before {
  background: var(--color-navy);
}

.badge--invoice-paid::before {
  background: var(--color-lemon);
}

.tally tfoot th {
  border-bottom: 0;
}

/* Footer and legal pages. */
.site-footer {
  padding: var(--space-6) var(--space-4);
  color: var(--color-muted);
  font-size: var(--text-eyebrow);
  text-align: center;
}

.site-footer a {
  color: inherit;
}

.site-footer__powered {
  margin: 0 0 var(--space-2);
}

.site-footer__audiences {
  margin-bottom: var(--space-2);
}

.site-footer__copyright {
  margin: var(--space-2) 0 0;
}

.legal-page {
  max-width: 40rem;
  margin: var(--space-5) auto 0;
}

.legal-page h2 {
  margin-top: var(--space-4);
}

.legal-page ul {
  display: grid;
  gap: var(--space-2);
  padding-left: var(--space-5);
}

.legal-page__screenshot {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}

.legal-page__screenshot img {
  width: 100%;
  max-width: 390px;
  height: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-input);
}

.legal-page__screenshot figcaption {
  color: var(--color-muted);
  font-size: var(--text-eyebrow);
}

.legal-page__wording {
  padding: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-input);
}

.legal-page__wording fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.legal-page__wording-label {
  margin: 0;
  font-weight: 600;
}

/* "Customize your massage" on the join form. */
.massage-request__body {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-4);
}

.massage-request__body .fieldset {
  display: grid;
  gap: var(--space-2);
}

/* Place page: "still right?" and "save for next time?" prompts. */
.preference-prompt {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-input);
  background: var(--color-surface);
}

.preference-summary {
  display: grid;
  gap: var(--space-1);
  padding-left: var(--space-5);
}

/* Chair: a regular's choices changed since their last visit. */
.preference-changed {
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--color-signal);
  background: var(--color-surface);
}

/* Text consent with the mobile number below it (shared/_text_opt_in). */
.text-opt-in {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-2) var(--space-5);
  border-bottom: 1px solid var(--color-line);
}

.text-opt-in__choice {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--color-ink);
}

.text-opt-in__about {
  margin: 0;
  color: var(--color-muted);
}

.text-opt-in__fine {
  margin: 0;
  font-size: var(--text-eyebrow);
  color: var(--color-muted);
}

/* Clients' bottom tab bar (Home, Rewards, Visits, Account). */
.has-tab-bar {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}

.tab-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: var(--space-2) var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-line);
  background: var(--color-surface);
}

.tab-bar__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: var(--space-1);
  border-radius: var(--radius-input);
  color: var(--color-muted);
  font-size: var(--text-eyebrow);
  text-decoration: none;
}

.tab-bar__icon {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.7;
}

.tab-bar__tab--current {
  color: var(--color-ink);
  font-weight: 600;
}

.tab-bar__tab--current .tab-bar__icon {
  opacity: 1;
}

/* The client home. */
.client-home {
  display: grid;
  gap: var(--space-4);
  max-width: 36rem;
  margin-inline: auto;
}

.client-home__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.client-home__greeting {
  margin: var(--space-1) 0 0;
  font-size: var(--text-title);
}

.client-home__account {
  display: inline-flex;
  padding: var(--space-2);
  border-radius: 50%;
}

.client-visit {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
}

.client-visit p {
  margin: 0;
}

.client-visit__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.client-visit__eyebrow {
  font-size: var(--text-eyebrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.client-visit__title {
  margin: 0;
  font-size: 1.375rem;
}

.client-visit__count {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--color-muted);
}

.client-visit__count strong {
  font-size: 1.75rem;
  color: var(--color-ink);
}

.client-visit__note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-input);
  background: var(--color-ground);
}

.client-visit__note img {
  width: 1.125rem;
  height: 1.125rem;
}

.client-visit__link {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--color-ink);
  text-decoration: none;
}

.client-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.client-stat {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  color: var(--color-ink);
  text-decoration: none;
}

.client-stat__icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: var(--space-2);
}

.client-stat__value {
  font-size: 1.125rem;
  font-weight: 600;
}

.client-stat__label {
  font-size: var(--text-eyebrow);
  color: var(--color-muted);
}

.client-history {
  display: grid;
  gap: var(--space-2);
}

.client-history__title {
  margin: var(--space-2) 0 0;
  font-size: 1.125rem;
}

.client-history__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-history__list li + li {
  border-top: 1px solid var(--color-line);
}

.client-history__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  color: var(--color-ink);
  text-decoration: none;
}

.client-history__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.client-history__main {
  display: grid;
  flex: 1;
}

.client-history__name {
  font-weight: 600;
}

.client-history__meta {
  font-size: var(--text-eyebrow);
  color: var(--color-muted);
}

.client-history__chevron {
  font-size: 1.5rem;
  color: var(--color-muted);
}

.account-sign-out {
  margin-top: var(--space-5);
}

/* Studios on a renter's public booking page. */
.studio-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.studio-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.studio-list__photo {
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
  border-radius: var(--radius-input);
  object-fit: cover;
}

.studio-list__map {
  font-size: var(--text-eyebrow);
}

/* The sponsor invitation's link and message, ready to copy. */
.invitation-link {
  overflow-wrap: anywhere;
}

.invitation-body {
  min-height: 18rem;
  font-family: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Choosing a therapist on the join and place pages (event_joins/_therapist_options). */
.therapist-options {
  display: grid;
  gap: var(--space-2);
}

.therapist-option {
  position: relative;
  display: block;
}

.therapist-option input {
  position: absolute;
  opacity: 0;
}

.therapist-option__body {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 3.5rem;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-input);
  background: var(--color-surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.therapist-option input:checked + .therapist-option__body {
  border-color: var(--color-ink);
  background: var(--color-lemon);
}

.therapist-option input:focus-visible + .therapist-option__body {
  outline: 3px solid var(--color-navy);
  outline-offset: 2px;
}

.therapist-option--full .therapist-option__body {
  opacity: 0.55;
  cursor: not-allowed;
}

.therapist-option__photo {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-mist);
}

.therapist-option__text {
  display: grid;
}

.therapist-option__name {
  font-weight: 600;
}

.therapist-option__meta {
  font-size: var(--text-eyebrow);
  color: var(--color-muted);
}

/* Something the client should know about their place, e.g. their chosen therapist's schedule changed. */
.place-card__notice {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-input);
  background: var(--color-surface);
}
