:root {
  --as-black: #080808;
  --as-charcoal: #22201f;
  --as-ink: #3f3934;
  --as-muted: #746d66;
  --as-line: #e9e2da;
  --as-cream: #f8f3ee;
  --as-cream-strong: #eee2d7;
  --as-white: #fffdfb;
  --as-focus: #9d7b62;
  --as-shadow: 0 22px 70px rgba(39, 31, 25, 0.12);
  --as-radius: 28px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(226, 207, 190, 0.52), transparent 28rem),
    linear-gradient(180deg, #fffdfb 0%, #f9f5f0 44%, #fffdfb 100%);
  color: var(--as-charcoal);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.as-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: rgba(255, 253, 251, 0.86);
  border-bottom: 1px solid rgba(226, 216, 206, 0.72);
  backdrop-filter: blur(18px);
}

.as-logo {
  display: inline-flex;
  align-items: center;
  color: var(--as-black);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.as-logo img {
  display: block;
  width: clamp(136px, 18vw, 218px);
  height: auto;
}

.as-nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--as-line);
  border-radius: 999px;
  background: var(--as-white);
}

.as-nav__button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--as-muted);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}

.as-nav__button.is-active {
  background: var(--as-black);
  color: #fff;
}

.as-header-auth {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 150px;
}

.as-auth-toggle {
  border: 1px solid var(--as-line);
  border-radius: 999px;
  background: var(--as-white);
  color: var(--as-black);
  padding: 12px 18px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(34, 27, 22, 0.08);
}

.as-auth-link {
  border: 0;
  background: transparent;
  color: var(--as-muted);
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 800;
}

.as-auth-link:hover,
.as-auth-link:focus-visible {
  color: var(--as-black);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.as-login-card--header {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 30;
  width: min(380px, calc(100vw - 32px));
  grid-template-columns: 1fr;
  align-items: stretch;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--as-line);
  border-radius: 24px;
  background: var(--as-white);
  box-shadow: 0 24px 60px rgba(34, 27, 22, 0.18);
}

.as-login-card--header h3 {
  margin-bottom: 6px;
}

.as-login-card__divider {
  height: 1px;
  margin: 4px 0;
  background: var(--as-line);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.as-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(24px, 6vw, 72px);
  align-items: end;
  padding: clamp(38px, 7vw, 76px) 0 clamp(30px, 6vw, 62px);
}

.as-kicker {
  margin: 0 0 10px;
  color: var(--as-focus);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--as-black);
  font-weight: 500;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 900px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1;
}

h3 {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
}

p {
  color: var(--as-muted);
  font-size: 16px;
  line-height: 1.7;
}

.as-hero p {
  max-width: 720px;
}

.as-hero__card,
.as-card {
  border: 1px solid rgba(226, 216, 206, 0.86);
  border-radius: var(--as-radius);
  background: rgba(255, 253, 251, 0.92);
  box-shadow: var(--as-shadow);
}

.as-hero__card {
  display: grid;
  gap: 8px;
  padding: 28px;
}

.as-hero__card span,
.as-hero__card small {
  color: var(--as-muted);
}

.as-hero__card strong {
  color: var(--as-black);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.as-mode {
  display: none;
  padding: 0 0 82px;
}

.as-mode.is-active {
  display: block;
}

.as-dev-only {
  display: none !important;
}

.as-section-heading {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin: 0 0 28px;
}

.as-client-login {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 0.95fr) minmax(260px, 0.75fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  margin-bottom: 28px;
}

.as-client-login__image {
  overflow: hidden;
  min-height: 280px;
  border-radius: 26px;
  background: var(--as-cream);
}

.as-client-login__image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.as-client-login__copy p {
  max-width: 340px;
}

.as-verification-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--as-line);
  border-radius: 20px;
  background: var(--as-cream);
}

.as-client-private-content {
  display: grid;
  gap: 24px;
}

.as-appointment-panel {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 0 0 24px;
  border: 1px solid rgba(226, 216, 206, 0.86);
  border-radius: var(--as-radius);
  background: rgba(255, 253, 251, 0.92);
  box-shadow: var(--as-shadow);
  padding: clamp(18px, 3vw, 28px);
}

.as-appointment-panel p {
  margin: 10px 0 0;
}

.as-appointment-panel__side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.as-intake-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.as-progress {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 10px;
}

.as-step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--as-line);
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.72);
  color: var(--as-muted);
  padding: 14px;
  text-align: left;
}

.as-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--as-cream);
  color: var(--as-focus);
  font-size: 12px;
  font-weight: 800;
}

.as-step.is-active {
  border-color: var(--as-black);
  background: var(--as-black);
  color: #fff;
}

.as-card {
  padding: clamp(20px, 3vw, 34px);
}

.as-form-step {
  display: none;
  animation: asFade 220ms ease;
}

.as-form-step.is-active {
  display: grid;
  gap: 22px;
}

@keyframes asFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.as-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label,
fieldset {
  display: grid;
  gap: 8px;
  color: var(--as-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.as-step-note {
  max-width: 680px;
  margin: 0;
}

.as-question-stack {
  display: grid;
  gap: 14px;
}

.as-question {
  display: grid;
  gap: 14px;
  border: 1px solid var(--as-line);
  border-radius: 22px;
  background: rgba(255, 253, 251, 0.72);
  padding: 16px;
}

.as-question__top {
  display: grid;
  gap: 5px;
}

.as-question__top span {
  color: var(--as-black);
  font-weight: 850;
}

.as-question__top small {
  color: var(--as-muted);
  font-weight: 600;
  line-height: 1.5;
}

.as-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.as-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  border: 1px solid var(--as-line);
  border-radius: 999px;
  background: #fff;
  padding: 10px 13px;
  color: var(--as-ink);
  font-weight: 800;
}

.as-choice input {
  width: auto;
  margin: 0;
  accent-color: var(--as-black);
}

.as-conditional-field {
  display: none;
}

.as-conditional-field.is-visible {
  display: grid;
}

.as-concern-upload {
  gap: 14px;
}

.as-mobile-upload-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

fieldset {
  border: 1px solid var(--as-line);
  border-radius: 22px;
  padding: 18px;
}

legend {
  padding: 0 8px;
  color: var(--as-black);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--as-line);
  border-radius: 16px;
  background: #fff;
  color: var(--as-black);
  padding: 13px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--as-focus);
  box-shadow: 0 0 0 4px rgba(157, 123, 98, 0.14);
}

.as-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.as-checks label,
.as-consent-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--as-line);
  border-radius: 16px;
  background: var(--as-white);
  padding: 12px;
  color: var(--as-ink);
  font-weight: 700;
  line-height: 1.4;
}

.as-checks input,
.as-consent-list input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--as-black);
}

.as-consent-list {
  display: grid;
  gap: 10px;
}

.as-done-card {
  display: grid;
  gap: 4px;
  border-radius: 22px;
  background: var(--as-cream);
  padding: 20px;
}

.as-done-card span {
  color: var(--as-muted);
}

.as-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--as-line);
}

.as-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--as-black);
  border-radius: 999px;
  background: var(--as-black);
  color: #fff;
  padding: 12px 18px;
  font-weight: 800;
}

.as-button--ghost {
  border-color: var(--as-line);
  background: #fff;
  color: var(--as-black);
}

.as-button--dark {
  background: var(--as-charcoal);
  color: #fff;
}

.as-staff-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.as-client-summary {
  position: sticky;
  top: 110px;
  min-width: 0;
  overflow: hidden;
}

.as-client-summary h3 {
  overflow-wrap: anywhere;
}

.as-login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.as-login-card.as-login-card--header {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 16px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
}

.as-login-card--header h3 {
  font-size: clamp(30px, 4vw, 44px);
}

.as-login-card--header .as-search-status {
  max-width: none;
  margin-top: 8px;
}

.as-login-card--header .as-login-form {
  gap: 10px;
}

.as-login-card--header input {
  min-height: 46px;
  padding-block: 10px;
}

.as-login-form {
  display: grid;
  gap: 12px;
}

.as-staff-session {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--as-line);
  border-radius: 999px;
  background: var(--as-white);
  padding: 10px 12px 10px 18px;
  box-shadow: var(--as-shadow);
}

.as-staff-session span {
  color: var(--as-ink);
  font-size: 14px;
  font-weight: 800;
}

.as-staff-session--header {
  margin: 0;
  max-width: min(420px, 36vw);
  padding: 8px 8px 8px 16px;
  box-shadow: 0 10px 28px rgba(34, 27, 22, 0.08);
}

.as-staff-session--header .as-button {
  padding: 9px 14px;
}

.as-search-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.as-search-status {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.as-search-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.as-result-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--as-line);
  border-radius: 18px;
  background: var(--as-white);
  color: var(--as-ink);
  padding: 13px;
  text-align: left;
  overflow-wrap: anywhere;
}

.as-result-card:hover,
.as-result-card:focus {
  border-color: var(--as-focus);
  box-shadow: 0 0 0 4px rgba(157, 123, 98, 0.12);
}

.as-result-card strong {
  color: var(--as-black);
  min-width: 0;
}

.as-result-card small {
  color: var(--as-muted);
  min-width: 0;
}

.as-chart-summary {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--as-line);
  min-width: 0;
  overflow-wrap: anywhere;
}

.as-chart-intake-detail {
  margin: 0 0 18px;
}

.as-intake-summary {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--as-line);
  border-radius: 24px;
  background: var(--as-cream);
}

.as-intake-browser {
  display: grid;
  gap: 14px;
}

.as-intake-browser__header,
.as-intake-summary__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.as-intake-browser h4,
.as-intake-summary h4 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 34px);
}

.as-intake-list {
  display: grid;
  gap: 10px;
}

.as-intake-list__item {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--as-line);
  border-radius: 18px;
  background: var(--as-white);
  color: var(--as-ink);
  padding: 13px;
  text-align: left;
  overflow-wrap: anywhere;
}

.as-intake-list__item:hover,
.as-intake-list__item:focus-visible,
.as-intake-list__item.is-active {
  border-color: var(--as-focus);
  box-shadow: 0 0 0 4px rgba(157, 123, 98, 0.12);
}

.as-intake-list__item span {
  color: var(--as-focus);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.as-intake-list__item strong {
  color: var(--as-black);
}

.as-intake-list__item small {
  color: var(--as-muted);
  line-height: 1.35;
}

.as-intake-summary__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.as-intake-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.as-intake-summary div {
  min-width: 0;
}

.as-intake-summary dt {
  color: var(--as-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.as-intake-summary dd {
  margin: 4px 0 0;
  color: var(--as-black);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.as-client-summary dl,
.as-timeline {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
}

.as-client-summary div,
.as-timeline article {
  border: 1px solid var(--as-line);
  border-radius: 18px;
  background: var(--as-white);
  padding: 14px;
}

dt,
.as-timeline span {
  color: var(--as-focus);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  color: var(--as-black);
}

.as-staff-main {
  display: grid;
  gap: 24px;
}

.as-staff-access-panel,
.as-staff-password-card,
.as-staff-manager-card {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.as-staff-access-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.as-password-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.as-staff-manager-card .as-card__header p {
  margin-bottom: 0;
  max-width: 640px;
}

.as-staff-users-list {
  display: grid;
  gap: 12px;
}

.as-staff-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--as-line);
  border-radius: 20px;
  background: var(--as-white);
  padding: 14px;
}

.as-staff-user-card strong,
.as-staff-user-card small {
  display: block;
}

.as-staff-user-card strong {
  color: var(--as-black);
  font-weight: 900;
}

.as-staff-user-card small {
  margin-top: 4px;
  color: var(--as-muted);
  line-height: 1.45;
}

.as-staff-user-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.as-status-pill--active {
  background: #eef6ed;
  color: #3f6b3d;
}

.as-status-pill--disabled,
.as-status-pill--inactive,
.as-status-pill--blocked {
  background: #f8ece8;
  color: #994f3f;
}

.as-status-pill--pending,
.as-status-pill--pending-approval {
  background: var(--as-cream);
  color: var(--as-focus);
}

.as-card__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.as-calendar-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  max-height: min(620px, calc(100vh - 190px));
  overflow: hidden;
}

.as-status-pill {
  border-radius: 999px;
  background: var(--as-black);
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.as-status-pill--cream {
  background: var(--as-cream);
  color: var(--as-focus);
}

.as-timeline article {
  display: grid;
  gap: 5px;
}

.as-timeline__button {
  cursor: pointer;
}

.as-timeline__button:hover,
.as-timeline__button:focus-visible {
  border-color: var(--as-focus);
  box-shadow: 0 0 0 4px rgba(157, 123, 98, 0.12);
  outline: 0;
}

.as-timeline small {
  color: var(--as-muted);
}

.as-note-form {
  display: grid;
  gap: 16px;
}

.as-intake-review-form {
  margin: 0 0 20px;
  padding: 18px;
  border: 1px solid var(--as-line);
  border-radius: 24px;
  background: rgba(255, 253, 251, 0.88);
}

.as-card__header--compact {
  margin-bottom: 0;
}

.as-inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.as-inline-check input {
  width: auto;
}

.as-appointments-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.as-appointments-toolbar .as-button {
  width: auto;
}

.as-service-filter {
  flex: 1 1 240px;
  gap: 6px;
  min-width: min(100%, 220px);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.as-service-filter input {
  margin-top: 4px;
  min-height: 42px;
}

.as-appointments-toolbar .is-active {
  border-color: var(--as-black);
  background: var(--as-black);
  color: #fff;
}

.as-calendar-list {
  display: grid;
  gap: 14px;
  max-height: min(420px, 48vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.as-calendar-day {
  display: grid;
  gap: 10px;
}

.as-calendar-day__heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  border-bottom: 1px solid var(--as-line);
  padding-bottom: 8px;
}

.as-calendar-day__heading strong {
  color: var(--as-black);
}

.as-calendar-day__heading small {
  color: var(--as-muted);
  font-weight: 800;
}

.as-appointment-item {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--as-line);
  border-radius: 18px;
  background: var(--as-white);
  padding: 14px;
}

.as-appointment-item > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.as-appointment-item time {
  color: var(--as-focus);
  font-weight: 900;
}

.as-appointment-client {
  color: var(--as-black);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.as-service-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--as-black);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
}

.as-service-link:hover,
.as-service-link:focus-visible {
  color: var(--as-focus);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.as-appointment-item small {
  display: block;
  margin-top: 4px;
  color: var(--as-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.as-photo-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
}

.as-upload {
  min-height: 210px;
  place-items: center;
  border: 1px dashed var(--as-focus);
  border-radius: 24px;
  background: var(--as-cream);
  color: var(--as-black);
  text-align: center;
}

.as-upload--compact {
  min-height: 150px;
}

.as-document-upload {
  min-height: 160px;
}

.as-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.as-upload span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
}

.as-upload--compact span {
  font-size: 22px;
}

.as-upload small {
  color: var(--as-muted);
}

.as-photo-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.as-photo-preview--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.as-photo-preview img,
.as-placeholder {
  width: 100%;
  min-height: 210px;
  border: 1px solid var(--as-line);
  border-radius: 22px;
  background: #fff;
  object-fit: cover;
}

.as-saved-photo {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--as-line);
  border-radius: 22px;
  background: var(--as-white);
}

.as-photo-zoom-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.as-photo-zoom-trigger:focus-visible {
  outline: 2px solid var(--as-black);
  outline-offset: -4px;
}

.as-saved-photo img {
  display: block;
  border: 0;
  border-radius: 0;
}

.as-document-preview {
  display: grid;
  min-height: 210px;
  place-items: center;
  gap: 10px;
  padding: 24px;
  border: 0;
  background:
    linear-gradient(145deg, rgba(179, 151, 128, 0.16), rgba(255, 255, 255, 0.92)),
    #fff;
}

.as-document-preview span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 68px;
  border: 1px solid var(--as-line);
  border-radius: 18px;
  background: var(--as-black);
  color: var(--as-white);
  font-weight: 900;
  letter-spacing: 0.14em;
}

.as-document-preview strong {
  max-width: 100%;
  color: var(--as-black);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.as-saved-photo figcaption {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.as-saved-photo figcaption strong {
  color: var(--as-black);
  font-size: 14px;
}

.as-saved-photo figcaption small {
  color: var(--as-muted);
  line-height: 1.35;
}

.as-photo-service-group {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--as-line);
  border-radius: 26px;
  background: #fff;
}

.as-photo-service-group__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--as-line);
  padding-bottom: 12px;
}

.as-photo-service-group__header h4 {
  margin: 4px 0;
  font-size: clamp(24px, 4vw, 34px);
}

.as-photo-service-group__header small {
  color: var(--as-muted);
}

.as-photo-service-group__frame {
  display: grid;
}

.as-photo-service-group__pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.as-photo-service-group__pager span {
  color: var(--as-muted);
  font-weight: 700;
  text-align: center;
}

.as-photo-upload-date {
  color: var(--as-black);
}

.as-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.as-photo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(8px);
}

.as-photo-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 30px;
  background: var(--as-white);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.as-photo-modal__header,
.as-photo-modal__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.as-photo-modal__header {
  border-bottom: 1px solid var(--as-line);
}

.as-photo-modal__header h2 {
  margin: 2px 0 4px;
  font-size: clamp(24px, 4vw, 42px);
}

.as-photo-modal__header p:last-child {
  margin: 0;
  color: var(--as-muted);
}

.as-photo-modal__close {
  min-width: 88px;
  padding: 10px 16px;
  border: 1px solid var(--as-line);
  border-radius: 999px;
  background: var(--as-cream);
  color: var(--as-black);
}

.as-photo-modal__viewport {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: auto;
  padding: 20px;
  overscroll-behavior: contain;
  cursor: default;
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.025) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.025) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.as-photo-modal__viewport.is-zoomed {
  cursor: grab;
}

.as-photo-modal__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.as-photo-modal__viewport img,
.as-photo-modal__viewport iframe {
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.as-photo-modal__viewport img {
  max-height: 68vh;
  transform-origin: center center;
  transition: max-width 180ms ease, max-height 180ms ease;
  pointer-events: none;
}

.as-photo-modal__viewport iframe {
  min-width: min(900px, 100%);
  height: 68vh;
  border: 1px solid var(--as-line);
  background: #fff;
  transition: width 180ms ease, height 180ms ease;
}

.as-photo-modal__viewport.is-document {
  place-items: start center;
}

.as-photo-modal__controls {
  border-top: 1px solid var(--as-line);
  background: #fff;
}

.as-photo-zoom-slider {
  display: grid;
  min-width: min(320px, 100%);
  gap: 8px;
  color: var(--as-muted);
  font-size: 13px;
  text-align: center;
}

.as-photo-zoom-slider span {
  color: var(--as-black);
  font-weight: 700;
}

.as-photo-zoom-slider input {
  width: 100%;
  accent-color: var(--as-black);
}

.as-photo-modal__hint {
  flex-basis: 100%;
  margin: 0;
  color: var(--as-muted);
  font-size: 13px;
  text-align: center;
}

.as-photo-preview--compact img,
.as-photo-preview--compact .as-placeholder {
  min-height: 150px;
}

.as-placeholder {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  color: var(--as-muted);
  text-align: center;
  padding: 24px;
}

.as-code {
  overflow: auto;
  max-height: 640px;
  border: 1px solid var(--as-line);
  border-radius: 20px;
  background: #111;
  color: #f8f3ee;
  padding: 20px;
  font-size: 13px;
  line-height: 1.55;
}

.as-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100% - 36px));
  border-radius: 18px;
  background: var(--as-black);
  color: #fff;
  padding: 14px 16px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.as-toast.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .as-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .as-nav {
    width: 100%;
    overflow-x: auto;
  }

  .as-header-auth {
    width: 100%;
    justify-content: stretch;
  }

  .as-auth-toggle,
  .as-auth-link,
  .as-staff-session--header {
    width: 100%;
  }

  .as-staff-session--header {
    max-width: none;
  }

  .as-login-card--header {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .as-hero,
  .as-client-login,
  .as-staff-access-panel,
  .as-password-form,
  .as-intake-shell,
  .as-staff-layout,
  .as-photo-grid {
    grid-template-columns: 1fr;
  }

  .as-client-login__image,
  .as-client-login__image img {
    min-height: 240px;
  }

  .as-progress,
  .as-client-summary {
    position: static;
  }

  .as-progress {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .as-step {
    min-width: 164px;
  }
}

@media (max-width: 640px) {
  main {
    width: min(100% - 22px, 1180px);
  }

  .as-grid,
  .as-checks,
  .as-photo-preview {
    grid-template-columns: 1fr;
  }

  .as-form-actions,
  .as-card__header,
  .as-intake-browser__header,
  .as-intake-summary__header,
  .as-appointment-panel,
  .as-staff-user-card {
    flex-direction: column;
    align-items: stretch;
  }

  .as-appointment-panel__side {
    justify-items: stretch;
  }

  .as-staff-user-card {
    grid-template-columns: 1fr;
  }

  .as-staff-user-card__actions {
    justify-content: stretch;
  }

  .as-mobile-upload-actions,
  .as-photo-preview--compact,
  .as-intake-summary dl {
    grid-template-columns: 1fr;
  }

  .as-appointment-item {
    grid-template-columns: 1fr;
  }

  .as-photo-modal {
    padding: 8px;
  }

  .as-photo-modal__panel {
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  .as-photo-modal__header,
  .as-photo-modal__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .as-photo-modal__viewport {
    min-height: 300px;
    padding: 12px;
  }

  .as-photo-service-group__header,
  .as-photo-service-group__pager {
    flex-direction: column;
    align-items: stretch;
  }

  .as-button {
    width: 100%;
  }
}
