

:root { --clinic-calendar-normal-bg: #fff; --clinic-calendar-holiday-bg: #e9f2fc; --clinic-calendar-partial-bg: #e5f3e9; --clinic-calendar-closed-bg: #fce9ee; }

.patient-privacy-footer { margin: 1rem auto 2rem; padding: 0 1rem; text-align: center; font-size: .875rem; }
.patient-privacy-footer a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; }
.contact-phone-field { margin-top: 1.5rem; }
.contact-phone-field input[aria-invalid="true"] { border-color: #b42318; background: #fff4f2; }
.contact-phone-field .helper-text { color: #52606d; font-size: .925rem; margin: .5rem 0; }
.card.patient-calendar { padding: 1rem; }
.calendar-switch { min-width: 0; margin: 0; padding: 0; border: 0; }
.calendar-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.calendar-month-nav { display: flex; gap: .75rem; margin: 1rem 0; }
.calendar-month-nav label:not(.consent-row) { display: grid; place-items: center; min-height: 44px; flex: 1; margin: 0; border: 1px solid #176b55; border-radius: .5rem; color: #176b55; cursor: pointer; }
#patient-calendar-current:checked ~ .calendar-month-nav label[for="patient-calendar-current"], #patient-calendar-next:checked ~ .calendar-month-nav label[for="patient-calendar-next"] { background: #176b55; color: white; }
#patient-calendar-current:focus-visible ~ .calendar-month-nav label[for="patient-calendar-current"], #patient-calendar-next:focus-visible ~ .calendar-month-nav label[for="patient-calendar-next"] { outline: 3px solid #176b55; outline-offset: 3px; }
.calendar-panel { display: none; }
#patient-calendar-current:checked ~ .calendar-panel-0, #patient-calendar-next:checked ~ .calendar-panel-1 { display: block; }
.patient-month { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px; font-size: .75rem; line-height: 1.35; }
.patient-month caption { font-weight: 700; font-size: 1.15rem; padding: .25rem 0 .75rem; }
.patient-month th { padding: .4rem 0; text-align: center; }
.patient-month td { padding: .35rem 1px; height: 94px; vertical-align: top; text-align: center; border: 1px solid #d6ddd8; border-radius: .3rem; }
.patient-month time { display: block; font-weight: 700; margin-bottom: .3rem; }
.calendar-day-status { display: block; }
.page-shell .calendar-vet { margin: .25rem 0 0; padding: 0; list-style: none; font-size: clamp(.45rem, 2.35vw, .65rem); line-height: 1.3; color: #b42318; font-weight: 700; }
.calendar-vet li + li { margin-top: .35rem; }
.calendar-vet span { display: block; }
.calendar-vet span:first-child { overflow-wrap: anywhere; }
.calendar-vet span:last-child { white-space: nowrap; margin-top: .08rem; }
.calendar-closed { background: var(--clinic-calendar-closed-bg); color: #823549; }
.calendar-holiday { --calendar-open-bg: var(--clinic-calendar-holiday-bg); background: var(--clinic-calendar-holiday-bg); color: #24577d; }
.calendar-normal { background: var(--clinic-calendar-normal-bg); color: #222; }
.patient-month .calendar-normal { border-color: #343e38; }
.calendar-partial { background: var(--clinic-calendar-partial-bg); color: #225c39; }

.calendar-am-only { background: linear-gradient(to right, var(--calendar-open-bg, var(--clinic-calendar-normal-bg)) 0% 50%, var(--clinic-calendar-closed-bg) 50% 100%); }

.patient-month .calendar-empty { border-color: transparent; }
.patient-month .calendar-today { border: 2px solid #176b55; }
.calendar-legend { margin: 1rem 0; font-size: .875rem; line-height: 1.7; }
.calendar-legend > div { padding: .75rem 0; border-bottom: 1px solid #e1e7e3; }
.calendar-legend dt { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.calendar-legend dd { margin: .35rem 0 0; overflow-wrap: anywhere; }
.calendar-legend dd p { margin: .35rem 0; }
.calendar-legend-schedule { padding: .35rem 0; text-align: left; }
.calendar-legend-schedule + .calendar-legend-schedule { margin-top: .75rem; border-top: 1px dashed #e1e7e3; padding-top: .75rem; }
.calendar-legend h4 { margin: .35rem 0 .5rem; font-size: 1em; text-align: left; }
.calendar-legend h4.calendar-web-heading { margin-top: 1rem; }
.calendar-legend-session + .calendar-legend-session { margin-top: 1rem; }
.calendar-session-hours { display: flex; align-items: baseline; gap: .75rem; }
.calendar-session-hours > span:first-child { flex: 0 0 2em; font-weight: 600; }
.calendar-time { white-space: nowrap; overflow-wrap: normal; }
.calendar-legend p.calendar-initial-deadline { margin: 0 0 .4rem calc(2em + .75rem); }
.calendar-vaccine { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: .5rem; }
.calendar-vaccine-label { white-space: nowrap; }
.calendar-legend p.calendar-session-closed { margin-top: .75rem; }
.calendar-key { display: inline-block; width: 1rem; height: 1rem; flex: 0 0 1rem; border: 1px solid currentColor; border-radius: .2rem; }
.patient-deadlines { padding-left: 1.25rem; line-height: 1.9; }
[data-line-content][hidden], .line-loading[hidden] { display: none; }
.line-loading { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(235, 238, 238, .96); padding: 1.5rem; }
.line-loading-panel { text-align: center; color: #1f2933; }
.line-loading-panel strong { display: block; font-size: 1.25rem; }
.line-loading-spinner { display: inline-block; width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; border: 4px solid #cbd5d1; border-top-color: #176b58; border-radius: 50%; animation: line-loading-spin 1s linear infinite; }
@keyframes line-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .line-loading-spinner { animation: none; } }

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background: #f5f7f4;
  line-height: 1.65;
}

* { box-sizing: border-box; }

body { margin: 0; }

body.owner-status-page-waiting {
  min-height: 100vh;
  background: #fff4f6;
}

a { color: #176b55; }

.page-shell {
  width: min(100% - 2rem, 44rem);
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.page-header { margin-bottom: 1.5rem; }

.eyebrow {
  margin: 0;
  color: #176b55;
  font-weight: 700;
}

h1, h2 { line-height: 1.35; }

h1 { margin: 0.25rem 0 0.75rem; }

.emergency {
  padding: 1.25rem;
  border: 2px solid #b42318;
  border-radius: 0.75rem;
  background: #fff4f2;
  color: #7a271a;
}

.emergency h2 { margin-top: 0; }

.patient-intake-information { margin: 0 0 1.25rem; padding: 1rem 1.25rem; border-radius: 12px; background: #edf4f1; color: #344b45; }
.patient-intake-information h2 { margin: 0 0 .5rem; font-size: 1rem; }
.patient-intake-information p { margin: 0; line-height: 1.8; }

.waiting-guidance {
  padding: 1.25rem;
  border: 2px solid #176b55;
  border-radius: 0.75rem;
  background: #eef8f4;
  color: #124f40;
}

.waiting-guidance h2 { margin-top: 0; }

.waiting-guidance p:last-child { margin-bottom: 0; }

.card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #d6ddd8;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0.25rem 1rem rgb(31 41 51 / 7%);
}

.development-notice {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #fff8db;
  color: #664d03;
}

label:not(.consent-row) {
  display: block;
  margin: 1rem 0 0.35rem;
  font-weight: 700;
}

input[type="email"],
input[type="text"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #7b8794;
  border-radius: 0.4rem;
  background: #fff;
  font: inherit;
}

input[type="email"],
input[type="text"],
input[type="number"],
input[type="tel"],
select { min-height: 3rem; }

textarea { resize: vertical; }

.consent-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1.25rem 0;
}

.consent-row input { margin-top: 0.35rem; }

fieldset {
  margin: 1.25rem 0 0;
  padding: 1rem;
  border: 1px solid #d6ddd8;
  border-radius: 0.5rem;
}

legend { font-weight: 700; }

.choice-row {
  display: block;
  margin: 0.5rem 0;
}

.vaccine-choice {
  margin: 1.25rem 0;
  font-weight: 700;
}

.field-help {
  margin-top: 0.35rem;
  color: #52606d;
  font-size: 0.925rem;
}

.required-text,
.required-indicator {
  color: #b42318;
  font-weight: 700;
}

.field-error,
.form-error {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #d92d20;
  border-radius: 0.4rem;
  background: #fff4f2;
  color: #7a271a;
}

.questionnaire-section,
.confirmation-actions {
  margin-top: 1.5rem;
}
.registration-processing-overlay[hidden] { display: none; }
.registration-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgb(20 31 29 / 76%);
}
.registration-processing-card {
  width: min(100%, 28rem);
  padding: 1.5rem;
  border-radius: .9rem;
  background: white;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 28%);
  text-align: center;
}
.registration-processing-card h2 { margin: .75rem 0 .5rem; }
.registration-spinner {
  display: inline-block;
  width: 2.4rem;
  height: 2.4rem;
  border: .3rem solid #cfe1da;
  border-top-color: #176448;
  border-radius: 999px;
  animation: registration-spin .8s linear infinite;
}
@keyframes registration-spin { to { transform: rotate(360deg); } }
.link-button {
  padding: 0;
  border: 0;
  color: #176448;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.questionnaire-question[hidden],
.chart-number-field[hidden],
.custom-arrival-field[hidden] {
  display: none;
}

.input-suffix {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.secondary-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
}

.danger-button {
  background: #b42318;
}

.deadline-choice-help {
  margin: 0;
  color: #b42318;
  font-size: 0.925rem;
  font-weight: 700;
}

.deadline-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.arrival-cutoff-error {
  margin: 0.5rem 0 0;
  color: #b42318;
  font-size: 0.925rem;
  font-weight: 700;
}

.completion-waiting-guidance {
  margin: 1.25rem 0;
  color: #a11b38;
  font-size: clamp(1.2rem, 6vw, 2.15rem);
  line-height: 1.4;
  text-wrap: balance;
}

.delete-pet-form {
  margin-top: 1rem;
}

.questionnaire-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #d6ddd8;
}

button {
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 0.4rem;
  background: #176b55;
  color: #fff;
  font: inherit;
  font-weight: 700;
}

button:disabled {
  background: #9aa5b1;
  cursor: not-allowed;
}

.otp-primary-action {
  display: inline-block;
  width: auto;
  min-width: 8rem;
  min-height: 2.75rem;
  margin-top: 1.25rem;
  padding: 0.65rem 1rem;
}

.otp-primary-action-row {
  display: flex;
  justify-content: center;
}

.patient-primary-link {
  box-sizing: border-box;
  border-radius: 0.4rem;
  background: #176b55;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.patient-primary-link:focus-visible { outline: 3px solid #173f74; outline-offset: 3px; }

.emergency-note {
  margin: 1rem 0 0;
  color: #52606d;
  font-size: 0.875rem;
}

.status-plate {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 4.5rem;
  margin: 0 0 0.5rem;
  padding: 0.8rem 1rem;
  border: 2px solid transparent;
  border-radius: 0.85rem;
  box-shadow: 0 0.2rem 0.45rem rgb(20 38 32 / 18%);
  color: #fff;
  font-size: clamp(1.6rem, 7vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.status-plate-waiting { border-color: #82162d; background: #b4233e; }
.status-plate-called { border-color: #10573b; background: #19734f; }
.status-plate-checked_in { border-color: #15496f; background: #1d5f91; }

.status-plate-in_consultation {
  border-color: #9b7410;
  background: #f4c84a;
  color: #2b2400;
}

.consultation-estimate {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #eef8f4;
  text-align: center;
}

.consultation-estimate-label { margin: 0; font-weight: 700; }

.consultation-estimate-time {
  margin: 0.25rem 0;
  color: #124f40;
  font-size: clamp(2rem, 10vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
}

.status-caution {
  color: #52606d;
  font-size: 0.875rem;
}

.confirmation-cta-row {
  display: flex;
  justify-content: center;
}

.confirmation-cta-control {
  width: min(100%, 22rem);
  min-height: 3rem;
  text-align: center;
}

.confirmation-cta-secondary {
  border: 1px solid #176b55;
  background: #fff;
  color: #176b55;
}

.status-qr-placeholder {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px dashed #8ba39c;
  border-radius: 0.5rem;
  background: #f7faf9;
  text-align: center;
}

.owner-group-status {
  display: grid;
  gap: 0.75rem;
}

.owner-group-status-waiting {
  border-color: #e8a8b6;
  background: #fff4f6;
}

.owner-status-guidance { margin: 0; }
.owner-status-warning { display: grid; gap: .65rem; }

.owner-status-guidance-primary {
  color: #a11b38;
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  line-height: 1.35;
}
.owner-called-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1.5rem; color: white; text-align: center; background: rgb(25 30 31 / 88%); cursor: pointer; }
.owner-called-overlay > div { max-width: 36rem; }
.owner-called-overlay strong { display: block; font-size: clamp(2rem, 8vw, 4.5rem); line-height: 1.2; }
.owner-called-overlay p { margin: 1.2rem 0; font-size: clamp(1.35rem, 5vw, 2.5rem); font-weight: 800; }
.owner-called-overlay small { font-size: 1rem; }
.owner-cancel-actions {
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.owner-cancel-actions form { margin: 0; }
.owner-cancel-actions .button {
  display: inline-flex;
  width: auto;
  min-width: 12rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 2px solid transparent;
  border-radius: 0.4rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.owner-cancel-actions .button.danger { border-color: #8f1710; background: #b42318; }
.owner-cancel-actions .button.secondary { border-color: #4b5563; background: #626b76; }
.owner-cancel-actions .button:hover { filter: brightness(0.92); }
.owner-cancel-back { color: #fff; }
.owner-cancel-actions .button:focus-visible { outline: 3px solid #173f74; outline-offset: 3px; }
.device-profile-controls { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #d6ddd8; }
.device-profile-controls h3 { margin: 0; }
.device-profile-controls .consent-row { margin-bottom: .5rem; }
.device-profile-controls small { display: block; color: #52606d; font-weight: 400; }
.device-profile-autofill-notice { margin: .5rem 0 1rem; padding: .65rem .8rem; border-left: 4px solid #b45555; border-radius: 6px; background: #fff4f4; color: #8b3030; font-size: .9rem; font-weight: 700; }
.device-profile-saved-state { margin: .65rem 0 .35rem; color: #40534d; font-size: .92rem; }
@media (max-width: 34rem) {
  .owner-cancel-actions { align-items: stretch; flex-direction: column; }
  .owner-cancel-actions form { width: 100%; }
  .owner-cancel-actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .owner-called-overlay { scroll-behavior: auto; } }

.status-qr-pending {
  padding: 0.85rem 1rem;
  border: 1px dashed #d29aa7;
  border-radius: 0.5rem;
  background: #fffafb;
  color: #7a263a;
}

.status-qr-pending p { margin: 0; }

.status-pet-list {
  padding-top: 0.75rem;
  border-top: 1px solid #d6ddd8;
}

.status-pet-list h3 { margin: 0 0 0.5rem; }

.status-pet-list ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-pet-list li {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #d6ddd8;
  border-radius: 0.5rem;
  background: #fff;
}

.status-pet-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.check-in-time {
  margin: 0;
  color: #245b83;
  font-size: 0.925rem;
  font-weight: 700;
}

.owner-cancel-action { margin-top: 2rem; }

.questionnaire-read-only summary {
  color: #176b55;
  font-weight: 700;
  cursor: pointer;
}

.questionnaire-read-only dt {
  margin-top: 0.75rem;
  color: #52606d;
  font-size: 0.875rem;
}

.questionnaire-read-only dd { margin: 0.2rem 0 0; }

.questionnaire-read-only-caution { margin: 0.75rem 0 0; }

.owner-cancel-action { text-align: center; }

.owner-cancel-action a {
  color: #6d3340;
  font-size: 0.925rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.owner-vet-queue-status {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #d6ddd8;
}

.vet-queue-status-card { margin-top: 0.75rem; }

.vet-queue-status-card h3 { margin-top: 0; }

.status-preview-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.status-preview-navigation a[aria-current="page"] { font-weight: 800; }

.otp-resend-form {
  margin: 1rem 0;
}

.otp-resend-link {
  width: auto;
  min-height: 2.75rem;
  padding: 0.5rem 0;
  border-radius: 0;
  background: transparent;
  color: #176b55;
  font-size: 0.925rem;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.otp-resend-link:disabled {
  background: transparent;
  color: #697386;
  text-decoration: none;
}

.otp-resend-limit {
  color: #7a271a;
  font-size: 0.925rem;
}

.otp-resend-success {
  color: #17653a;
  font-weight: 700;
}

.primary-link {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 0.4rem;
  background: #176b55;
  color: #fff;
  font-weight: 700;
}

.local-preview {
  border-color: #d6a600;
  background: #fffdf2;
}

.error-notice {
  border-color: #d92d20;
}

.ticket-number {
  margin: 0.25rem 0 1rem;
  color: #176b55;
  font-size: clamp(3rem, 14vw, 5rem);
  font-weight: 800;
  line-height: 1;
}

.policy section {
  margin-top: 1.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid #d6ddd8;
}

.policy { line-height: 1.85; }
.policy section { margin-top: 2rem; padding-top: 1rem; }
.policy h2 { margin-bottom: 1.25rem; }
.policy h3 { margin-top: 1.75rem; }
.policy p { margin: 1rem 0; }
.policy .policy-list { list-style: none; padding-left: 1rem; }
.policy .policy-list li { padding-left: 1em; text-indent: -1em; margin-block: .4rem; }
.policy-navigation { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #d6ddd8; }

dt { font-weight: 700; }
dd { margin: 0 0 0.75rem; }

@media (max-width: 36rem) {
  .page-shell { padding-top: 1.25rem; }
  .card { padding: 1.1rem; }
}
.group-checkin-qr { width: min(100%, 22rem); height: auto; background: white; }

/* Patient-only action hierarchy; shared STAFF/ADMIN controls are unaffected. */
.patient-icon { width: 1.35em; height: 1.35em; flex: 0 0 auto; }
.patient-button {
  display: inline-flex; justify-content: center; align-items: center; gap: .6rem;
  width: 100%; min-height: 3.4rem; padding: .9rem 1rem;
  border: 1px solid #096c58; border-radius: .55rem;
  background: #096c58; color: #fff; font: inherit; font-weight: 700;
  text-align: center; text-decoration: none; line-height: 1.6; cursor: pointer;
}
.patient-button-outline { background: #fff; color: #096c58; }
.patient-button-danger { background: #b42318; border-color: #b42318; }
.patient-button-danger-outline { background: #fff; border-color: #eaa29c; color: #b42318; }
.patient-button:hover:not(:disabled) { filter: brightness(.96); }
.patient-button:disabled { opacity: .6; cursor: not-allowed; }
.patient-button:focus-visible, .patient-navigation a:focus-visible {
  outline: 3px solid #173f74; outline-offset: 4px;
}
.patient-form-actions { display: grid; gap: 1rem; margin-top: 1.75rem; }
.patient-form-actions p { margin: 0; }
.patient-text-action { text-align: center; margin: 1.4rem 0 0; }
.patient-text-action a, .patient-text-action .link-button { display: inline-block; padding: .6rem .25rem; min-height: 44px; text-underline-offset: .2em; }
.patient-navigation { padding-block: .75rem; }
.patient-navigation p { margin: 0; }
.patient-navigation a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; text-underline-offset: .2em; overflow-wrap: anywhere; }
.patient-navigation a::after { content: "›"; font-size: 1.5rem; text-decoration: none; }
.patient-navigation p + p { border-top: 1px solid #edf1ef; }
.patient-decision { padding: 2rem 1.75rem; }
.patient-decision-icon { width: 4.5rem; height: 4.5rem; margin: .25rem auto 1.5rem; border-radius: 50%; background: #e6efeb; color: #096c58; display: grid; place-items: center; }
.patient-decision-icon .patient-icon { width: 2.8rem; height: 2.8rem; }
.patient-decision-icon-danger { background: #fff0ef; color: #b42318; }
.patient-decision h1 { text-align: center; font-size: clamp(1.5rem, 5.8vw, 2rem); margin-bottom: 1.4rem; }
.patient-decision-description { color: #46535b; line-height: 1.9; margin-bottom: 1.8rem; }
.patient-decision-description p { margin: .75rem 0; }
.patient-decision .owner-cancel-actions { display: flex; flex-direction: column; gap: 1rem; }
.patient-decision .owner-cancel-actions .button { width: 100%; min-height: 3.4rem; border-radius: .55rem; }
.patient-decision .owner-cancel-actions .button.secondary { color: #23333e; background: #fff; border-color: #aeb9be; }
.patient-pet-heading { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.25rem; font-size: 1.4rem; overflow-wrap: anywhere; }
.patient-pet-icon { display: grid; place-items: center; flex: 0 0 3rem; height: 3rem; border-radius: 50%; background: #e3f3e9; color: #14765c; }
.patient-pet-icon .patient-icon { width: 1.7rem; height: 1.7rem; }
.patient-summary-list { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); margin: 0; }
.patient-summary-list > dt, .patient-summary-list > dd { margin: 0; padding: 1rem 0; border-top: 1px solid #e7ece9; overflow-wrap: anywhere; min-width: 0; }
.patient-summary-list > dt { padding-right: 1rem; color: #647078; font-size: .9rem; }
.patient-summary-list .questionnaire-summary { margin: 0; }
.patient-summary-list .questionnaire-summary dt { font-size: .9rem; color: #647078; font-weight: 400; }
.patient-summary-list .questionnaire-summary dd { margin: .25rem 0 .8rem; white-space: pre-wrap; }
.patient-pet-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem; border-top: 1px solid #e7ece9; padding-top: 1.25rem; }
.patient-pet-actions .patient-button { padding: .8rem .5rem; gap: .35rem; font-size: .875rem; }
.patient-pet-actions form { margin: 0; min-width: 0; }
.patient-pet-actions .field-help { margin: 0; }
@media (max-width: 26rem) {
  .patient-decision { padding: 1.6rem 1.1rem; }
}
@media (max-width: 22.5rem) {
  .patient-pet-actions { grid-template-columns: 1fr; gap: .75rem; }
}

.page-shell [hidden] { display: none !important; }

/* Shared patient presentation; state, routing and security contracts are unchanged. */
.page-shell { --patient-radius: .75rem; --patient-border: #d6ddd8; --patient-ink: #1f2933; overflow-wrap: anywhere; }
.page-shell :is(h1, h2, h3), .patient-state-title { text-align: center; text-wrap: balance; }
.page-shell h1 { font-size: clamp(1.5rem, 5.8vw, 2rem); }
.page-shell h2 { font-size: 1.25rem; }
.page-shell h3 { font-size: 1.05rem; }
.patient-pet-heading { justify-content: center; }
.patient-loading-state { display: grid; justify-items: center; gap: 1rem; padding: 1.5rem 0; text-align: center; }
.patient-loading-state .line-loading-spinner { margin: 0; }
.patient-loading-state .patient-loading-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.registration-processing-card > p, .patient-reentry-guidance { text-align: left; }
.page-shell pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.page-shell .card { border-radius: var(--patient-radius); border-color: var(--patient-border); }
.page-shell button:not(.link-button):not(.patient-button), .page-shell .primary-link {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.4rem; padding: .8rem 1rem; border-radius: .55rem; line-height: 1.6;
}
.page-shell .primary-link { width: 100%; background: #096c58; color: white; text-align: center; font-weight: 700; text-decoration: none; }
.page-shell :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #173f74; outline-offset: 3px; }
.page-shell :is(input, textarea, select) { max-width: 100%; }
.page-shell .choice-row { min-height: 44px; padding-block: .4rem; }
.page-shell summary { min-height: 44px; padding-block: .55rem; }
.page-shell .link-button { min-height: 44px; width: auto; }
.patient-line-card h1 { margin-top: 0; }
.patient-line-card > p:last-child a, .patient-message > p:last-child a { display: inline-block; min-height: 44px; padding-block: .65rem; text-underline-offset: .2em; }
.patient-line-card [data-line-message] { padding: .8rem 1rem; background: #edf4f1; border-radius: .55rem; color: #344b45; }
.line-loading-panel { width: min(100%, 25rem); padding: 2rem 1.25rem; border-radius: .75rem; background: #fff; box-shadow: 0 .25rem 1rem rgb(31 41 51 / 7%); }
.patient-state-icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin: 0 auto 1.25rem; border-radius: 50%; background: #edf4f1; color: #176b55; }
.patient-state-icon .patient-icon { width: 2rem; height: 2rem; }
.patient-state-icon-check { background: #e3f3e9; }
.patient-state-icon-alert { background: #fff3da; color: #755007; }
.patient-state-icon-error { background: #fff0ee; color: #b42318; }
.consent-warning { color: #b42318; font-weight: 700; font-size: 1.1rem; margin-block: 1.25rem; }
.consent-result h1 { text-align: center; font-size: clamp(1.5rem, 6vw, 2rem); }
.consent-result h1:focus { outline: none; }
.consent-result-error h1 { color: #b42318; }
.patient-message h1 { margin: 0 0 1rem; }
.patient-message p { line-height: 1.8; }
.patient-status-tickets { margin: .5rem 0; padding: .75rem 1rem; border: 1px solid #d6ddd8; border-radius: .55rem; background: #fff; }
.patient-status-tickets strong { margin-left: .5rem; font-size: 1.5rem; color: #124f40; }
.page-shell .status-plate { font-size: clamp(1.6rem, 7vw, 2.35rem); box-shadow: none; }
.status-plate-completed { background: #edf4f1; color: #124f40; border-color: #cfe1da; }
.status-plate-cancelled { background: #f0f2f3; color: #46535b; border-color: #d6ddd8; }
.patient-qr-card { padding: 1rem; border: 1px solid #d6ddd8; border-radius: .75rem; background: #fff; text-align: center; }
.patient-qr-card img { display: block; margin: auto; }
.patient-qr-card img[hidden] { display: none; }
.registration-summary { margin-top: 1.25rem; border-top: 1px solid #d6ddd8; padding-top: 1rem; }
.registration-completed ul { list-style: none; padding: 0; }
.registration-completed li { padding: .9rem 0; border-bottom: 1px solid #e7ece9; }
.registration-completed li strong { font-size: 1.4rem; color: #124f40; }
.page-shell .form-error { line-height: 1.8; }
@media (max-width: 360px) { .page-shell { width: calc(100% - 1.5rem); } .patient-summary-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
@media (prefers-reduced-motion: reduce) { .registration-spinner { animation: none; } }

.page-shell .primary-link.confirmation-cta-secondary, .page-shell [data-otp-human-refresh] { border: 1px solid #096c58; background: #fff; color: #096c58; }
.page-shell #delete-device-profile { color: #b42318; }
.owner-cancel-action a { display: inline-block; min-height: 44px; padding-block: .65rem; }
.owner-called-overlay > div { padding: 2rem 1.5rem; border-radius: .75rem; background: #fff; color: #124f40; }
#owner-status-content:not([data-owner-status]) { padding: 1.5rem; margin-top: 1.5rem; border: 1px solid #d6ddd8; border-radius: .75rem; background: #fff; }
#owner-status-content:not([data-owner-status]) > [role="status"] { font-size: 1.25rem; font-weight: 700; }
#owner-status-content:not([data-owner-status]) > a { display: inline-block; padding-block: .65rem; min-height: 44px; }

.patient-pet-actions.patient-pet-actions-single { grid-template-columns: minmax(0, 20rem); justify-content: center; }
.owner-cancel-success { text-align: left; }
.owner-cancel-success > .patient-state-icon { margin-inline: auto; }
.owner-cancel-success > h1 { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.owner-cancel-success > p { max-width: 30em; margin-inline: auto; line-height: 1.9; text-wrap: pretty; }
.owner-cancel-success .local-preview { text-align: left; }
.patient-delete-dialog { padding: 0; border: 1px solid #dce5e1; border-radius: 1rem; width: min(28rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); color: #24343b; background: #fff; box-shadow: 0 1rem 3rem #18352b26; }
.patient-delete-dialog::backdrop { background: #172d2866; }
.patient-delete-dialog-content { padding: clamp(1.25rem, 5vw, 2rem); text-align: center; }
.patient-delete-dialog h2 { margin: 1rem 0; font-size: 1.25rem; line-height: 1.6; }
.patient-delete-dialog p { line-height: 1.8; }
.patient-delete-dialog-actions { display: grid; gap: 1rem; margin-top: 1.5rem; }
.patient-delete-dialog .patient-button { width: 100%; min-height: 48px; }
.patient-button.patient-button-danger { color: #fff; background: #b42318; border-color: #b42318; }
.patient-delete-dialog button:focus-visible { outline: 3px solid #24343b; outline-offset: 3px; }
.patient-consent-dialog { overflow-y: auto; }
.patient-consent-dialog .patient-delete-dialog-content { text-align: left; }
.patient-consent-dialog h2 { text-align: center; }
