:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --app-viewport-height: 100dvh;
  --app-frame-height: var(--app-viewport-height);
  --document-canvas-height: 100lvh;
  --home-new-patient-action-height: 52px;
  --home-search-pill-height: 52px;
  --search-dock-edge-gap: 8px;
  --search-dock-resting-inset: var(--home-new-patient-anchor-bottom);
  --search-dock-bottom-inset: var(--search-dock-resting-inset);
  --search-dock-visual-gap: var(--search-dock-resting-inset);
  --search-results-dock-gap: 12px;
  --search-results-bottom-fade: 36px;
  --home-new-patient-anchor-top: auto;
  --home-new-patient-anchor-bottom: 16px;
  --floating-action-right-inset: 16px;
  --floating-action-bottom-inset: 16px;
  --home-action-scroll-clearance: calc(max(16px, var(--scroll-tail-clearance)) + var(--home-new-patient-action-height) + var(--sp-lg));
  /* Device-proven on iOS 26, Aug 10 2026: r44f swallowed a native-button tap
     inside the collapsed 105px Safari restore zone; 8px safety yields 113px. */
  --document-terminal-action-clearance: 113px;
  --patient-record-fab-clearance: calc(var(--floating-action-bottom-inset) + 52px + var(--sp-lg));
  --patient-record-action-scroll-clearance: max(var(--document-terminal-action-clearance), var(--patient-record-fab-clearance));
  --app-column-max: 600px;
  --keyboard-inset: 0px;
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 20px;
  --sp-2xl: 24px;
  --sp-3xl: 32px;
  --sp-4xl: 40px;
  --sp-5xl: 48px;
  --sp-6xl: 64px;
  --patient-content-rail: var(--sp-lg);
  --patient-content-offset: calc(var(--sp-lg) * -1);
  --shell-corner-control-size: 44px;
  --shell-corner-control-top: calc(var(--app-safe-top) + 10px);
  --solid-shell-control-height: 64px;
  --solid-shell-height: calc(var(--app-safe-top) + var(--solid-shell-control-height));
  --solid-shell-content-gap: 18px;
  --app-safe-top: 0px;
  --app-safe-bottom: 0px;
  --scroll-tail-clearance: var(--app-safe-bottom);
  --shell-top-inset: var(--sp-xs);
  --shell-safe-top: calc(var(--app-safe-top) + var(--shell-top-inset));
  --shell-title-gap: 20px;
  --shell-title-resting-offset: calc(var(--shell-safe-top) + var(--shell-corner-control-size) + var(--shell-title-gap));
  --z-content: 0;
  --z-physical-underlay: -1;
  --z-solid-header: 20;
  --z-viewport-action: 40;
  --z-dialog: 100;
  --z-sheet-backdrop: 120;
  --z-sheet: 121;
  --page: #f4f4f2;
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #1e2322;
  --muted: #6b7170;
  --line: #e4e3df;
  --primary: #2f7e7c;
  --primary-pressed: #235e5c;
  --brand-teal-light: #85bdb9;
  --secondary: #dfedeb;
  --secondary-ink: #1d4a48;
  --secondary-border: #bfdbd8;
  --secondary-button-border: var(--secondary-border);
  --neutral: #e2e2dd;
  --neutral-button-ink: #4a504e;
  --placeholder-ink: #a9adab;
  --type-label-size: 13px;
  --type-label-weight: 600;
  --type-bar-title-size: 20px;
  --type-bar-title-weight: 700;
  --type-section-size: 18px;
  --type-section-weight: 700;
  --type-dob-size: 13px;
  --type-dob-weight: 500;
  --type-value-size: 17px;
  --type-value-weight: 650;
  --type-context-size: 14px;
  --type-context-weight: 400;
  --type-clinician-size: 14px;
  --type-clinician-weight: 400;
  --type-write-value-size: 22px;
  --type-write-value-weight: 700;
  --record-read-row-pitch: 48px;
  --danger-brand: #c7352f;
  --danger-tint: #faedec;
  --warning-border: #d4b76a;
  --warning-ink: color-mix(in srgb, var(--warning-border) 45%, var(--ink));
  --success-border: #bfdbd8;
  --success-background: #eaf4f3;
  --clinical-decreasing: #2e7d4f;
  --clinical-increasing: #c7352f;
  --clinical-unchanged: #c99a2c;
  --shadow-floating: 0 4px 14px rgba(30, 35, 34, 0.28);
  --terminal-action-control-height: 52px;
  --assessment-action-bottom-gap: max(var(--app-safe-bottom), var(--sp-md));
  --assessment-action-region-height: calc(1px + var(--sp-lg) + var(--terminal-action-control-height) + var(--assessment-action-bottom-gap));
  --content-bottom-clearance: calc(max(var(--scroll-tail-clearance), var(--sp-md)) + var(--sp-2xl));
  --radius-card: 12px;
  --radius-input: 10px;
  --radius-pill: 999px;
  --warning-background: #fff8e7;
  --wound-center: #8e2b2b;
  --wound-mid: #d59b8f;
  --wound-outer: #ebc7b8;
  --periwound: #f2c9b8;
}

@media (display-mode: standalone) {
  :root {
    --app-safe-top: env(safe-area-inset-top);
    --app-safe-bottom: env(safe-area-inset-bottom);
    --home-new-patient-anchor-bottom: max(34px, var(--app-safe-bottom));
    --floating-action-bottom-inset: max(34px, var(--app-safe-bottom));
    --document-terminal-action-clearance: calc(max(var(--scroll-tail-clearance), var(--sp-md)) + var(--sp-2xl));
  }
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background-color: #f4f4f2;
  background-color: var(--page);
  color: var(--ink);
  overscroll-behavior: none;
  touch-action: pan-y;
}

html.auth-mode,
body.auth-mode {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  background-color: #f4f4f2;
  background-color: var(--page);
  overscroll-behavior-y: auto;
}

html.document-scroll,
body.document-scroll {
  height: auto;
}

html.document-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body.document-scroll {
  overflow: visible;
  overscroll-behavior-y: auto;
}

html.modal-flow,
body.modal-flow,
.app-shell.is-modal-flow,
.app-shell.is-modal-flow .app-content {
  background-color: #f4f4f2;
  background-color: var(--page);
}

#app {
  min-width: 0;
  background-color: #f4f4f2;
  background-color: var(--page);
}

.physical-screen-underlay {
  position: fixed;
  z-index: var(--z-physical-underlay);
  top: 0;
  right: 0;
  left: 0;
  height: 100vh;
  height: 100lvh;
  background: var(--page);
  pointer-events: none;
}

html.document-scroll .physical-screen-underlay {
  display: none;
}

@supports (overflow: clip) {
  html,
  body,
  #app,
  .auth-page {
    overflow-x: clip;
  }
}

button,
input,
textarea,
select {
  font: inherit;
  max-width: 100%;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

img,
svg {
  max-width: 100%;
}

button {
  cursor: pointer;
}

.auth-page,
.app-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: #f4f4f2;
  background-color: var(--page);
}

.auth-page {
  display: grid;
  height: var(--app-frame-height);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  place-items: center;
  padding: 32px 20px;
}

.auth-page.keyboard-open {
  align-items: start;
  padding-bottom: calc(var(--keyboard-inset) + 32px);
}

.auth-panel {
  width: min(100%, 390px);
}

.lockup { width: 140px; margin-bottom: 34px; }
.lockup svg { display: block; width: 100%; height: auto; }
.lockup-top { color: var(--ink); aspect-ratio: 3327.031723 / 741.114; }
.lockup-bottom { color: var(--primary); aspect-ratio: 3327.031723 / 402.750; }

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.stack,
.settings-form {
  display: grid;
  gap: 14px;
}

.auth-panel h1 {
  margin-bottom: 24px;
}

.calm-copy {
  margin: -8px 0 24px;
  color: var(--muted);
  line-height: 1.45;
}

.field {
  display: grid;
  gap: var(--sp-sm);
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 1.3;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink);
  padding: 0 var(--sp-md);
  outline: none;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

.field input,
.field select {
  min-height: 52px;
}

.field textarea {
  min-height: 104px;
  padding-top: 13px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--placeholder-ink);
  font-size: 16px;
  font-weight: 400;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent);
}

.button {
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-card);
  padding: 0 18px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.button.primary {
  min-height: 56px;
  background: var(--primary);
  color: var(--surface);
}

.button.primary:active {
  background: var(--primary-pressed);
}

.button.secondary {
  min-height: 48px;
  border: 0;
  background: var(--neutral);
  color: var(--neutral-button-ink);
  font-size: 15px;
}

.terminal-actions {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-md);
}

.terminal-actions.is-single-action {
  grid-template-columns: minmax(0, 1fr);
}

.terminal-actions.is-stacked {
  grid-template-columns: minmax(0, 1fr);
}

.terminal-actions .terminal-action {
  width: 100%;
  min-height: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.terminal-actions .terminal-action.secondary {
  font-size: 16px;
  font-weight: 600;
}

.terminal-actions .terminal-action:disabled {
  cursor: default;
  opacity: 0.55;
}

.auth-links {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin-top: 18px;
}

.auth-links button {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  font-weight: 720;
}

.message-block {
  display: grid;
  min-height: 56px;
  align-items: center;
  margin: 0 0 18px;
  border: 1px solid var(--success-border);
  border-radius: 8px;
  background: var(--success-background);
  color: var(--secondary-ink);
  padding: 0 16px;
  font-weight: 740;
}

.message-block.compact {
  margin: 0;
}

.modal-backdrop {
  position: absolute;
  z-index: var(--z-dialog);
  inset: 0;
  display: grid;
  align-items: center;
  background: color-mix(in srgb, var(--ink) 34%, transparent);
  padding: 24px;
}

.modal-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 20px;
  box-shadow: 0 22px 50px color-mix(in srgb, var(--ink) 18%, transparent);
}

.modal-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.modal-actions {
  display: grid;
  gap: 12px;
}

.modal-actions .button.secondary {
  min-height: 48px;
  border-radius: 12px;
}

.modal-actions .button.primary {
  min-height: 56px;
  border-radius: 12px;
}

.app-shell {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: min(100%, 480px);
  height: var(--app-frame-height);
  margin: 0 auto;
  overflow: hidden;
}

.app-shell.is-document-scroll {
  position: relative;
  top: auto;
  height: auto;
  overflow: visible;
}

.app-shell.is-browsing {
  --content-bottom-clearance: calc(max(var(--scroll-tail-clearance), var(--sp-md)) + var(--sp-2xl));
}

.app-shell.is-modal-flow {
  /* The quarantined canvas covers the large viewport so no prior document
     compositor layer can show beneath a small/dynamic Capture frame. */
  height: 100lvh;
  --content-bottom-clearance: calc(max(var(--scroll-tail-clearance), var(--sp-xs)) + var(--sp-2xl));
}

.app-shell.is-modal-flow .app-content {
  inset: 0 0 auto;
  height: var(--app-frame-height);
}

.app-shell.has-bottom-action-bar {
  --content-bottom-clearance: calc(var(--assessment-action-region-height) + var(--sp-2xl));
}

.app-content {
  position: absolute;
  z-index: var(--z-content);
  inset: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  scroll-behavior: smooth;
  background-color: #f4f4f2;
  background-color: var(--page);
  padding: 24px var(--patient-content-rail) var(--content-bottom-clearance);
}

.app-shell.is-document-scroll .app-content {
  position: relative;
  inset: auto;
  overflow: visible;
}

html.document-keyboard-open .app-shell.is-document-scroll .app-content {
  padding-bottom: 0;
}

.app-shell.is-modal-flow.keyboard-open .app-content {
  padding-bottom: calc(var(--keyboard-inset) + 32px);
}

.app-content:has(.patient-record) {
  background-color: #f4f4f2;
  background-color: var(--page);
  padding-top: calc(var(--solid-shell-height) + var(--solid-shell-content-gap));
  padding-bottom: var(--patient-record-action-scroll-clearance);
}

.app-content.is-record-sheet-open {
  overflow-y: hidden;
}

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

.screen-title {
  margin-bottom: 16px;
}

.screen-title h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0px;
  line-height: 1.2;
}

.empty-state {
  color: var(--muted);
  font-weight: 720;
  line-height: 1.35;
}

.patient-search {
  display: grid;
  gap: var(--sp-md);
}

.search-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 9px 12px;
}

.search-input-wrap:focus-within {
  border-color: var(--primary);
  border-width: 1.5px;
}

.search-input-wrap svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.25;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-input-wrap svg {
  color: var(--muted);
}

.search-input-wrap:focus-within svg,
.patient-search.has-results .search-input-wrap svg {
  color: var(--primary);
}

.search-input-wrap input {
  width: 100%;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  padding: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}

.search-input-wrap input::placeholder {
  color: var(--placeholder-ink);
}

.patient-list-row {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  padding: var(--sp-md) var(--sp-lg);
  text-align: left;
}

.patient-list-row-copy {
  min-width: 0;
}

.patient-list-row-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 21px;
  margin-bottom: var(--sp-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-list-row-copy span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.patient-list {
  display: grid;
  gap: var(--sp-sm);
}

.patient-list-section {
  display: grid;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}

.patient-list-overline {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-section-size);
  font-weight: var(--type-section-weight);
  letter-spacing: 0;
  line-height: 22px;
}

.patient-list-overline[hidden] {
  display: none;
}

.match-card {
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.match-card > div {
  min-width: 0;
}

.match-card strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  overflow-wrap: anywhere;
}

.match-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.row-nav-chevron {
  display: inline-grid;
  width: var(--sp-2xl);
  place-items: center;
  justify-self: end;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.settings-form {
  gap: 14px;
}

.patient-record {
  display: grid;
  gap: 24px;
  padding-inline: 0;
}

.patient-record-section {
  display: grid;
  gap: 12px;
}

.patient-record-section + .patient-record-section {
  margin-top: 0;
}

.record-image-context {
  display: grid;
  gap: var(--sp-sm);
}

.empty-viewfinder {
  display: block;
  width: 44px;
  height: 44px;
}

.record-wound-image {
  border-color: var(--line);
  background:
    radial-gradient(circle at 50% 48%, var(--primary-pressed) 0 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, var(--secondary) 0 30%, transparent 31%),
    linear-gradient(135deg, var(--primary-pressed), var(--primary));
}

.patient-record .wound-image-meta {
  top: var(--sp-md);
  right: var(--sp-lg);
  left: var(--sp-lg);
  gap: var(--sp-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.wound-image-meta {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 14px;
  left: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.wound-image {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1.42;
  min-height: 210px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 48% 48%, var(--wound-center) 0 16%, transparent 17%),
    radial-gradient(circle at 50% 50%, var(--wound-mid) 0 36%, transparent 37%),
    linear-gradient(135deg, var(--periwound), var(--wound-outer));
}

.wound-shape {
  width: 92px;
  height: 58px;
  border: 3px solid rgba(255, 253, 250, 0.78);
  border-radius: 48% 52% 45% 55%;
  background: rgba(111, 31, 31, 0.7);
}

.measurement-flow-card {
  display: grid;
  border: 0;
  border-radius: 0;
  gap: var(--sp-lg);
  background: transparent;
  padding: 0;
}

.record-wound-image {
  position: relative;
  aspect-ratio: 4 / 3;
  height: clamp(280px, calc(100dvh - 644px - var(--app-safe-bottom)), 360px);
  min-height: 280px;
  max-height: clamp(280px, calc(100dvh - 644px - var(--app-safe-bottom)), 360px);
}

.assessment-flow-screen {
  /* Assessment-preview colors are intentionally scoped to the simulated viewfinder. */
  --assessment-preview-border: #d8cbbb;
  --assessment-guide: rgba(255, 253, 250, 0.78);
  --assessment-overlay: rgba(111, 31, 31, 0.7);
  background: var(--page);
  padding: 0 var(--patient-content-rail) var(--content-bottom-clearance);
}

.analysis-status-pill {
  position: absolute;
  right: var(--sp-md);
  bottom: var(--sp-md);
  left: var(--sp-md);
  margin: 0;
  border-radius: var(--radius-input);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  padding: var(--sp-xs) var(--sp-sm);
  text-align: center;
}

.location-validation {
  margin: -4px 0 0;
  color: var(--danger-brand);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.location-validation[hidden] {
  display: none;
}

.location-chip-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  row-gap: 10px;
}

.location-chip {
  min-height: 44px;
  border: 1px solid var(--secondary-button-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 18px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.location-chip.selected {
  border-color: transparent;
  background: var(--secondary);
  color: var(--secondary-ink);
  box-shadow: 0 0 0 2px var(--primary);
}

.patient-record .location-chip-list {
  gap: 8px;
}

.patient-record .location-chip {
  min-height: 44px;
  padding: 0 var(--sp-lg);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.patient-record textarea {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

.patient-record .location-validation {
  color: var(--danger-brand);
  font-size: 16px;
  font-weight: 600;
  line-height: var(--sp-xl);
  margin: 0;
}

.patient-record {
  display: block;
  padding-inline: 0;
}

.patient-record.is-empty {
  display: grid;
  min-height: calc(100svh - var(--app-safe-top) - 84px - var(--patient-record-action-scroll-clearance));
  grid-template-rows: minmax(0, 1fr);
}

.patient-record-empty-state {
  display: grid;
  place-items: center;
  text-align: center;
}

.patient-record-empty-state-content {
  width: 100%;
}

.patient-record-ghost {
  opacity: 0.45;
  pointer-events: none;
}

.patient-record-ghost-banner,
.patient-record-ghost-card {
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
}

.patient-record-ghost-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
  padding: 14px;
}

.patient-record-ghost-line,
.patient-record-ghost-heading,
.patient-record-ghost-dot {
  display: block;
  border-radius: var(--radius-pill);
  background: var(--line);
}

.patient-record-ghost-line {
  width: 62%;
  height: 12px;
}

.patient-record-ghost-line.is-short {
  width: 34%;
  height: 10px;
}

.patient-record-ghost-line.is-value {
  width: 56%;
  height: 14px;
}

.patient-record-ghost-dot {
  width: 12px;
  height: 12px;
}

.patient-record-ghost-image {
  display: grid;
  height: 170px;
  place-items: center;
  margin-bottom: var(--sp-lg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  background: repeating-linear-gradient(45deg, #f0f0ec 0 8px, #f6f6f3 8px 16px);
}

.patient-record-ghost-image .empty-viewfinder {
  width: 40px;
  height: 40px;
}

.patient-record-ghost-image .empty-viewfinder rect {
  fill: transparent;
}

.patient-record-ghost-heading {
  width: 44%;
  height: var(--sp-lg);
  margin-bottom: 10px;
}

.patient-record-ghost-heading.is-secondary {
  width: 38%;
}

.patient-record-ghost-card {
  display: grid;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
  padding: 14px;
}

.patient-record-ghost-card.is-secondary {
  height: 74px;
  margin-bottom: 0;
}

.patient-record-empty-caption {
  margin: var(--sp-lg) 0 var(--sp-xs);
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

.patient-header {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  margin: 0 var(--patient-content-offset);
  padding: var(--shell-title-resting-offset) var(--patient-content-rail) var(--sp-sm);
  background: var(--page);
}

.patient-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--line);
  content: "";
  opacity: 0;
  transition: opacity 150ms ease;
}

.app-content.is-patient-header-scrolled .patient-header::after {
  opacity: 1;
}

.patient-header-copy {
  flex: 1;
  min-width: 0;
}

.patient-header h1 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-header-context {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--type-context-size);
  font-weight: var(--type-context-weight);
  line-height: 20px;
}

.viewport-shell-host:empty {
  display: none;
}

html.document-scroll .viewport-shell-host,
html.document-scroll .viewport-actions-host {
  display: contents;
}

.solid-shell-header {
  position: fixed;
  z-index: var(--z-solid-header);
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: var(--solid-shell-height);
  border-bottom: 1px solid var(--line);
  background: var(--page);
  pointer-events: none;
}

.solid-shell-row {
  display: grid;
  width: min(100%, var(--app-column-max));
  height: 100%;
  grid-template-columns: var(--shell-corner-control-size) minmax(0, 1fr) var(--shell-corner-control-size);
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: var(--app-safe-top) var(--patient-content-rail) 0;
}

.solid-shell-side,
.solid-shell-spacer {
  display: grid;
  width: var(--shell-corner-control-size);
  height: var(--shell-corner-control-size);
  place-items: center;
}

.solid-shell-side .shell-circle-button {
  pointer-events: auto;
}

.solid-shell-title,
.solid-shell-identity {
  width: 100%;
  min-width: 0;
  max-width: 56vw;
  justify-self: center;
  margin: 0;
  color: var(--ink);
  text-align: center;
}

.solid-shell-title {
  overflow: hidden;
  font-size: var(--type-bar-title-size);
  font-weight: var(--type-bar-title-weight);
  letter-spacing: 0;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-wordmark-title {
  display: grid;
  height: var(--shell-corner-control-size);
  place-items: center;
  overflow: visible;
}

.home-wordmark {
  display: block;
  width: 105px;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.solid-shell-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
}

.solid-shell-identity-name {
  display: block;
  width: 100%;
  overflow: hidden;
  font-size: var(--type-bar-title-size);
  font-weight: var(--type-bar-title-weight);
  letter-spacing: 0;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solid-shell-identity-dob {
  margin-top: 0;
  color: var(--muted);
  font-size: var(--type-dob-size);
  font-weight: var(--type-dob-weight);
  letter-spacing: 0;
  line-height: 17px;
  white-space: nowrap;
}

.shell-circle-button {
  display: grid;
  flex: none;
  width: var(--shell-corner-control-size);
  height: var(--shell-corner-control-size);
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 2px 8px rgba(0, 0, 0, 0.12);
}

.shell-circle-button svg {
  display: block;
}

.shell-circle-button:active {
  color: var(--primary-pressed);
}

.shell-circle-button:disabled {
  opacity: 0.45;
}

.patient-record-body {
  display: block;
  padding-top: 0;
}

.record-wound-chip {
  display: flex;
  width: 100%;
  align-items: center;
  gap: var(--sp-sm);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--paper);
  color: var(--ink);
  padding: 10px var(--sp-md);
  text-align: left;
}

.record-wound-chip.is-switcher {
  color: var(--primary);
}

.record-wound-chip.is-switcher:active {
  color: var(--primary-pressed);
}

.record-wound-chip-thumb {
  flex: none;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 8px;
}

.record-wound-chip-thumb .wound-image {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 0;
}

.record-wound-chip-thumb .wound-shape {
  width: 18px;
  height: 12px;
  border-width: 2px;
}

.record-wound-chip-thumb .empty-viewfinder {
  width: 30px;
  height: 30px;
}

.record-wound-chip-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.record-wound-chip-location {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  white-space: normal;
}

.record-wound-chip-chevron,
.record-assessment-date-chevron {
  display: inline-grid;
  flex: none;
  width: 13px;
  height: 13px;
  place-items: center;
  color: currentColor;
  transform-origin: center;
}

.record-wound-chip-chevron svg,
.record-assessment-date-chevron svg {
  display: block;
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 3;
}

.record-assessment-date-chevron {
  color: var(--primary);
}

.patient-record .record-image-context {
  position: relative;
  margin-top: 14px;
}

.patient-record .record-wound-image {
  border: 0;
  border-radius: var(--radius-card);
  min-height: 0;
  overflow: hidden;
}

.record-assessment-date-header {
  padding-top: var(--sp-3xl);
}

.record-assessment-date-control {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: 44px;
  margin: -10px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 10px 0;
  font-size: 22px;
  font-weight: 650;
  line-height: 24px;
  text-align: left;
  white-space: nowrap;
}

.record-assessment-date-unit {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.record-assessment-state-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: var(--sp-xs) var(--sp-md);
  font-size: 13px;
  font-weight: 650;
  line-height: 16px;
  white-space: nowrap;
}

.record-assessment-state-pill.is-past {
  border: 1px solid var(--warning-border);
  background: var(--warning-background);
  color: var(--warning-ink);
}

.record-assessment-state-pill.is-current {
  border: 1px solid var(--secondary-border);
  background: var(--secondary);
  color: var(--secondary-ink);
}

.record-assessment-date-header + .record-status-block {
  padding-top: var(--sp-3xl);
}

.patient-record-block {
  padding-top: 30px;
}

.record-block-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.record-block-heading .record-section-title {
  margin: 0;
}

.record-section-title {
  margin: 0 0 var(--sp-md);
  color: var(--ink);
  font-size: var(--type-section-size);
  font-weight: var(--type-section-weight);
  letter-spacing: 0;
  line-height: 22px;
}

.assessment-editor-message {
  margin-top: var(--sp-lg);
  border-color: var(--danger-brand);
  background: var(--danger-tint);
  color: var(--danger-brand);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.write-input-box:has(.write-measurement-input[aria-invalid="true"]) {
  border-color: var(--danger-brand);
}

.record-assessment-date-control:disabled {
  cursor: default;
  opacity: 1;
}

.record-status-card {
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: var(--sp-lg);
}

.record-status-hero {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.record-status-big {
  min-width: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 36px;
}

.record-status-unit {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.record-status-big.is-unmeasured {
  color: var(--muted);
  font-weight: 600;
}

.record-status-state {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  margin: var(--sp-sm) 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 18px;
}

.record-status-state strong {
  font-weight: 650;
}

.record-status-state-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  margin-top: 5px;
}

.record-status-state-dot.is-intact {
  background: var(--clinical-decreasing);
}

.record-status-state-dot.is-dehisced {
  background: var(--clinical-increasing);
}

.record-status-delta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: var(--sp-xs) 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.record-status-arrow {
  width: 16px;
  height: 16px;
  flex: none;
}

.record-status-arrow.is-decreasing {
  color: var(--clinical-decreasing);
}

.record-status-arrow.is-increasing {
  color: var(--clinical-increasing);
}

.record-status-arrow.is-unchanged {
  color: var(--clinical-unchanged);
}

.record-status-intact-check {
  width: 20px;
  height: 20px;
  flex: none;
}

.record-status-intact-check circle {
  fill: var(--clinical-decreasing);
}

.record-area-chart {
  margin-top: var(--sp-lg);
}

.record-area-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.record-area-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.record-area-fill {
  fill: color-mix(in srgb, var(--muted) 10%, transparent);
}

.record-area-line {
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 2;
}

.record-area-line.is-closure-gap {
  opacity: 0.8;
  stroke-dasharray: 2 7;
}

.record-area-dot {
  fill: var(--muted);
  stroke: var(--surface);
  stroke-width: 2;
}

.record-area-dot.is-healed {
  fill: var(--neutral);
}

.record-area-dot.is-selected {
  fill: var(--primary);
}

.record-area-selected-ring {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  opacity: 1;
}

.record-area-chart text {
  fill: var(--muted);
  font-size: 11px;
}

.record-measurements-card {
  display: block;
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: 2px var(--sp-lg);
}

.record-measurement-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: var(--sp-lg);
  min-width: 0;
  min-height: var(--record-read-row-pitch);
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.record-measurement-cell:last-child {
  border-bottom: 0;
}

.record-measurement-label {
  display: block;
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 16px;
}

.record-measurement-position {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.record-measurement-value {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--sp-sm);
  margin: 0;
}

.record-measurement-value-zone {
  display: block;
  flex: none;
  width: 104px;
  min-height: 0;
  border: 0;
  color: var(--ink);
  font-size: var(--type-value-size);
  font-weight: var(--type-value-weight);
  letter-spacing: 0;
  line-height: 22px;
  padding: 0;
  text-align: right;
}

.record-measurement-unit {
  display: inline-grid;
  grid-template-columns: max-content;
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  text-align: left;
}

.record-measurement-unit > span,
.record-measurement-unit::after {
  grid-area: 1 / 1;
}

.record-measurement-unit::after {
  content: attr(data-measurement-unit-width);
  visibility: hidden;
}

.record-measurement-value.is-empty .record-measurement-value-zone {
  width: auto;
  color: var(--muted);
  font-weight: 400;
}

.record-info-card {
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: 2px var(--sp-lg);
}

.record-notes-card {
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: var(--sp-lg);
}

.record-info-pair + .record-info-pair {
  border-top: 1px solid var(--line);
}

.record-info-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-content: center;
  align-items: start;
  column-gap: var(--sp-md);
  row-gap: 0;
  min-height: var(--record-read-row-pitch);
  padding: 9px 0;
}

.record-info-pair span {
  display: block;
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 22px;
}

.record-info-pair strong {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: var(--type-value-size);
  font-weight: var(--type-value-weight);
  line-height: 22px;
  text-align: right;
}

.record-info-pair strong.empty-value {
  color: var(--muted);
  font-weight: 400;
}

.record-info-pair.is-one-line-value {
  grid-template-columns: max-content minmax(0, 1fr);
}

.record-info-pair.is-one-line-value strong {
  white-space: nowrap;
}

.record-info-pair.is-one-line-value strong .value-separator {
  display: inline;
  font-size: inherit;
  line-height: inherit;
}

.record-info-pair strong.is-comment-only {
  font-size: var(--type-clinician-size);
  font-weight: var(--type-clinician-weight);
  line-height: 19px;
  white-space: pre-wrap;
}

.record-info-comment {
  display: grid;
  grid-column: 1 / -1;
  gap: 2px;
  margin-top: 10px;
}

.record-info-comment > .record-info-comment-label {
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 16px;
}

.record-info-comment-text {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-clinician-size);
  font-weight: var(--type-clinician-weight);
  line-height: 19px;
  white-space: pre-wrap;
}

.record-note-text {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  white-space: pre-wrap;
}

.record-notes-empty {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.record-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet-backdrop);
  background: color-mix(in srgb, var(--ink) 40%, transparent);
}

.viewport-sheet-host {
  display: contents;
}

.record-sheet {
  position: fixed;
  right: 10px;
  bottom: calc(10px + var(--app-safe-bottom));
  left: 10px;
  z-index: var(--z-sheet);
}

.record-document-sheet-locked .record-sheet-backdrop {
  transform: translateY(var(--record-sheet-backdrop-offset, 0px));
}

.record-document-sheet-locked .record-sheet {
  transform: translateY(var(--record-sheet-panel-offset, 0px));
}

.record-sheet-group,
.record-sheet-cancel {
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
}

.record-sheet-group {
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.record-sheet-heading {
  margin: 0;
  color: var(--ink);
  padding: var(--sp-lg) 17px var(--sp-md);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.record-sheet-cancel {
  margin-top: var(--sp-sm);
}

.record-sheet-group > button,
.record-sheet-cancel button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--primary-pressed);
  padding: 17px;
  font-size: 17px;
  font-weight: 450;
  line-height: 22px;
  text-align: center;
}

.record-sheet-group > button:first-of-type {
  border-top: 0;
}

.record-sheet-cancel button {
  border-top: 0;
  font-weight: 650;
}

.record-sheet-group > button.record-sheet-row {
  justify-content: flex-start;
  border-left: 3px solid transparent;
  gap: var(--sp-sm);
  padding-left: 13px;
  text-align: left;
}

.record-sheet-group > button.record-sheet-row.is-current {
  border-left-color: var(--primary);
  background: var(--success-background);
}

.record-sheet-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.record-sheet-copy strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.record-sheet-copy small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}

.record-sheet-assessment-row .record-sheet-copy strong {
  font-size: 17px;
  font-weight: 650;
}

.record-sheet-assessment-row .record-sheet-copy small {
  font-size: 14px;
  line-height: 20px;
}

.record-sheet-check {
  flex: none;
  margin-left: auto;
  color: var(--primary-pressed);
}

.record-sheet-thumb {
  flex: none;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: var(--radius-input);
}

.record-sheet-thumb .wound-image {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
}

.record-sheet-thumb .wound-shape {
  width: 24px;
  height: 16px;
  border-width: 2px;
}

.clock-position-sheet {
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.clock-position-sheet .record-sheet-group {
  max-height: calc(100dvh - max(20px, var(--app-safe-top)));
  border-radius: 18px 18px 0 0;
  padding: 14px var(--sp-lg) max(28px, var(--app-safe-bottom));
  box-shadow: 0 -4px 24px color-mix(in srgb, var(--ink) 18%, transparent);
}

.clock-position-grab {
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto var(--sp-md);
  border-radius: 2px;
  background: var(--line);
}

.clock-position-title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.clock-position-caption {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  text-align: center;
}

.clock-position-dial {
  position: relative;
  width: 310px;
  height: 310px;
  margin: 0 auto;
}

.clock-position-face {
  position: absolute;
  inset: 0;
  width: 310px;
  height: 310px;
  pointer-events: none;
}

.clock-position-face circle {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.clock-position-head {
  position: absolute;
  z-index: 2;
  top: -4px;
  left: 50%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 14px;
  transform: translateX(-50%);
}

.clock-position-option {
  position: absolute;
  z-index: 3;
  top: var(--clock-top);
  left: var(--clock-left);
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font: inherit;
  font-size: 17px;
  font-weight: 650;
  line-height: 22px;
}

.clock-position-option:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.clock-position-option.is-selected {
  background: var(--primary);
  color: var(--surface);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--primary);
}

.clock-position-option.is-intermediate {
  background: var(--secondary);
  color: var(--secondary-ink);
}

.clock-position-option.is-intermediate.is-selected {
  background: var(--primary);
  color: var(--surface);
}

.clock-position-echo {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 150px;
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.value-separator {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  vertical-align: baseline;
}

.record-info-pair .value-separator,
.record-measurement-value-zone .value-separator,
.write-clock-value .value-separator,
.clock-position-echo .clock-position-separator,
.clock-position-separator {
  color: inherit;
  font-weight: 400;
  vertical-align: baseline;
}

.clock-position-echo .clock-position-pending,
.clock-position-pending {
  color: var(--muted);
  font-weight: 400;
  vertical-align: baseline;
}

.clock-position-sheet .clock-position-clear {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 12px 0 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 20px;
}

.clock-position-actions {
  margin-top: var(--sp-md);
}

.clock-position-actions .button {
  width: 100%;
  height: 50px;
}

.measurement-form {
  display: grid;
  gap: 0;
  margin-top: var(--sp-lg);
}

.measurement-flow-card .field {
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
}

.measurement-flow-card .field input,
.measurement-flow-card .field textarea {
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}

.clinical-note {
  gap: 8px;
}

.clinical-note textarea::placeholder {
  color: var(--placeholder-ink);
  font-size: 16px;
  font-weight: 400;
}

.assessment-flow-view {
  display: block;
  color: var(--ink);
}

.assessment-flow-screen {
  padding-top: 0;
}

.assessment-flow-wound-banner {
  margin-top: var(--sp-md);
}

.assessment-flow-photo {
  margin-top: 14px;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.assessment-flow-photo .wound-image {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  border-color: var(--assessment-preview-border);
  border-radius: var(--radius-card);
}

.assessment-flow-photo .wound-shape {
  border-color: var(--assessment-guide);
  background: var(--assessment-overlay);
}

.assessment-flow-photo + .measurement-form > .write-section:first-child {
  padding-top: var(--sp-3xl);
}

.assessment-correction-banner {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: var(--radius-card);
  background: var(--danger-tint);
  color: var(--danger-brand);
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
  text-align: center;
}

.assessment-correction-banner + .assessment-flow-photo {
  margin-top: 12px;
}

.assessment-flow-screen.confirm-screen {
  padding-top: calc(var(--solid-shell-height) + var(--solid-shell-content-gap));
  padding-bottom: var(--document-terminal-action-clearance);
}

.assessment-confirm-actions {
  margin-top: var(--sp-3xl);
}

.write-section {
  padding-top: 26px;
}

.write-measurement-card {
  display: block;
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: 2px var(--sp-lg);
}

.write-measurement-cell {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.write-measurement-cell:last-of-type {
  border-bottom: 0;
}

.write-measurement-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-lg);
}

.write-cell-label {
  display: block;
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 16px;
}

.write-cell-label span {
  font-weight: 400;
}

.write-cell-input {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: 0;
}

.write-input-box {
  position: relative;
  display: flex;
  width: 128px;
  height: 46px;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  border: 1px solid #C9CCCA;
  border-radius: 10px;
  background: var(--surface);
  padding: 0 12px;
}

.write-input-size-mirror {
  position: absolute;
  right: 12px;
  visibility: hidden;
  color: var(--ink);
  font-size: var(--type-write-value-size);
  font-weight: var(--type-write-value-weight);
  line-height: 28px;
  white-space: pre;
}

.write-measurement-input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: var(--type-write-value-size);
  font-weight: var(--type-write-value-weight);
  letter-spacing: 0;
  line-height: 28px;
  outline: none;
  padding: 0;
  text-align: right;
}

.write-input-box:focus-within {
  border-color: var(--primary);
}

.write-clock-trigger {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font: inherit;
  font-size: var(--type-write-value-size);
  font-weight: var(--type-write-value-weight);
  line-height: 28px;
  text-align: right;
}

.write-measurement-cell-auto .write-auto-value {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: 0;
  color: var(--ink);
  font-size: var(--type-write-value-size);
  font-weight: var(--type-write-value-weight);
  letter-spacing: 0;
  line-height: 28px;
}

.write-auto-slot {
  background: var(--page);
  text-align: right;
}

.write-card,
.write-note-card {
  display: block;
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: var(--sp-lg);
}

.wound-profile-form {
  display: grid;
  gap: 0;
}

.wound-profile-form-section {
  display: grid;
  gap: var(--sp-sm);
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
  margin-bottom: 14px;
}

.wound-profile-form-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.assessment-additional-details-card {
  padding-top: 2px;
  padding-bottom: 2px;
}

.assessment-field-group {
  display: grid;
  gap: var(--sp-sm);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.assessment-field-group:first-child {
  padding-top: 12px;
}

.assessment-field-group:last-child {
  border-bottom: 0;
}

.assessment-field-group .write-measurement-cell {
  padding-left: 0;
  padding-right: 0;
}

.wound-profile-group-label {
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: 650;
  line-height: 18px;
}

.wound-profile-comment-field > span:first-child {
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 18px;
}

.wound-profile-comment-doorway {
  width: fit-content;
  min-height: 44px;
  margin: calc(var(--sp-sm) * -1) 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: var(--sp-sm) 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 20px;
  text-align: left;
}

.wound-profile-comment-doorway:active {
  color: var(--primary-pressed);
}

.write-measurement-intact-doorway {
  width: 100%;
  grid-column: 1 / -1;
  justify-self: start;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 18px 0 14px;
}

.write-measurement-site-pair {
  border-bottom: 1px solid var(--line);
}

.write-measurement-site-pair:last-child {
  border-bottom: 0;
}

.write-measurement-site-collection[data-measurement-site-collection="undermining"] {
  border-bottom: 1px solid var(--line);
}

.write-measurement-site-pair .write-measurement-cell {
  border-bottom: 0;
}

.write-measurement-site-first-row {
  display: grid;
  grid-template-columns: 32px var(--sp-sm) minmax(0, 1fr);
  align-items: stretch;
}

.write-measurement-site-first-row .write-measurement-cell {
  grid-column: 3;
  min-width: 0;
}

.write-measurement-site-clock-row {
  display: grid;
  grid-template-columns: 32px var(--sp-sm) minmax(0, 1fr);
  align-items: stretch;
}

.write-measurement-site-clock-row .write-measurement-cell {
  grid-column: 3;
  min-width: 0;
}

.write-measurement-site-clock-spacer {
  width: 20px;
  height: 20px;
  align-self: center;
  justify-self: end;
}

.write-measurement-site-doorway {
  width: 100%;
  margin: 0;
  border-bottom: 0;
  padding: 18px 0 14px;
}

.write-measurement-site-doorway:last-child {
  border-bottom: 0;
}

.write-measurement-site-remove {
  display: flex;
  width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  grid-column: 1 / span 2;
}

.write-measurement-site-remove-icon {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--danger-brand);
}

.write-measurement-site-remove-icon::after {
  position: absolute;
  left: 5px;
  top: 9px;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: var(--surface);
  content: '';
}

.write-measurement-site-remove:active .write-measurement-site-remove-icon {
  opacity: 0.72;
}

.write-measurement-intact-doorway.is-inert {
  opacity: 0.45;
  pointer-events: none;
}

.wound-profile-comment-field {
  display: grid;
  gap: var(--sp-sm);
}

.wound-profile-comment-field textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  padding: 10px var(--sp-md);
  resize: none;
}

.wound-profile-type-validation {
  margin: 0;
}

.write-note-card {
  padding: var(--sp-lg);
}

.write-note-card textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 120px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  outline: none;
  padding: 0;
  resize: none;
}

.assessment-flow-view .measurement-form {
  margin-top: 0;
}

.confirm-screen .clinical-note span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.confirm-screen .location-validation {
  margin: 0;
}

@media (max-width: 370px) {
  h1 {
    font-size: 1.72rem;
  }

  .app-content {
    padding-right: 14px;
    padding-left: 14px;
  }
}

.assessment-action-bar {
  position: absolute;
  z-index: var(--z-viewport-action);
  right: 50%;
  bottom: 0;
  left: 50%;
  width: min(100%, 480px);
  height: var(--assessment-action-region-height);
  border: 0;
  background: transparent;
  padding:
    var(--sp-lg)
    var(--patient-content-rail)
    var(--assessment-action-bottom-gap);
  pointer-events: none;
  transform: translateX(-50%);
  transition:
    opacity 150ms ease,
    visibility 150ms ease;
}

.assessment-action-bar::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
  content: "";
  pointer-events: none;
}

.assessment-action-bar .terminal-action {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.viewport-actions-host {
  position: fixed;
  z-index: var(--z-viewport-action);
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: var(--app-frame-height);
  background: transparent;
  pointer-events: none;
}

body:has(.app-shell .modal-backdrop) .viewport-actions-host > * {
  display: none;
}

.home-new-patient-action,
.patient-record-camera-action {
  position: absolute;
  z-index: var(--z-viewport-action);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--primary);
  color: var(--surface);
  box-shadow: var(--shadow-floating);
  pointer-events: auto;
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    visibility 150ms ease;
}

.home-new-patient-action {
  position: fixed;
  right: max(var(--sp-lg), calc((100vw - var(--app-column-max)) / 2 + var(--sp-lg)));
  top: var(--home-new-patient-anchor-top);
  bottom: var(--home-new-patient-anchor-bottom);
  width: var(--home-new-patient-action-height);
  min-height: var(--home-new-patient-action-height);
  height: var(--home-new-patient-action-height);
  border-radius: 50%;
  padding: 0;
}

.home-new-patient-action svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.patient-record-camera-action {
  position: fixed;
  right: max(var(--floating-action-right-inset), calc((100vw - var(--app-column-max)) / 2 + var(--floating-action-right-inset)));
  bottom: var(--floating-action-bottom-inset);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 0;
}

.home-new-patient-action:active,
.patient-record-camera-action:active {
  background: var(--primary-pressed);
}

.viewport-actions-host.search-focused .home-new-patient-action,
body:has(.patient-record input:focus, .patient-record textarea:focus, .patient-record select:focus) .patient-record-camera-action {
  display: none;
}

.assessment-discard-dialog .assessment-discard-action {
  min-height: 56px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--danger-brand);
  color: var(--surface);
}

.assessment-discard-dialog,
.assessment-prompt-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  justify-items: center;
}

.assessment-discard-dialog .modal-card,
.assessment-prompt-dialog .modal-card {
  width: min(100%, 432px);
}

.assessment-discard-dialog .assessment-discard-action:active {
  background: color-mix(in srgb, var(--danger-brand) 82%, var(--ink));
}

html.modal-flow .viewport-actions-host.keyboard-open .assessment-action-bar::before,
html.modal-flow .viewport-actions-host.keyboard-open .assessment-action-bar .terminal-action {
  display: none;
}

@media (min-width: 700px) {
  .app-shell {
    width: 100%;
    max-width: 100%;
  }

  .app-content {
    right: auto;
    left: 50%;
    width: min(100%, var(--app-column-max));
    transform: translateX(-50%);
  }

  .assessment-action-bar {
    width: min(100%, var(--app-column-max));
  }

}

.new-patient-screen {
  background: var(--page);
  padding: calc(var(--solid-shell-height) + var(--solid-shell-content-gap)) var(--sp-lg) var(--content-bottom-clearance);
  overscroll-behavior-y: contain;
}

.new-patient-screen .create-patient-panel {
  display: grid;
  gap: var(--sp-2xl);
}

.new-patient-screen .screen-title {
  margin-bottom: 0;
}

.new-patient-screen .create-patient-form {
  gap: 0;
}

.patient-identity-groups {
  display: grid;
  gap: var(--sp-2xl);
}

.patient-identity-group {
  display: grid;
  gap: var(--sp-lg);
}

.patient-identity-name-row,
.patient-identity-dob-row,
.patient-identity-address-row {
  display: grid;
  gap: var(--sp-md);
}

.patient-identity-name-row { grid-template-columns: minmax(0, 1fr) 118px; }
.patient-identity-dob-row { grid-template-columns: 1fr 1fr 1.5fr; }
.patient-identity-address-row { grid-template-columns: 96px minmax(0, 1fr) 64px; }

.patient-identity-field-group {
  display: grid;
  gap: var(--sp-sm);
}

.patient-identity-address-fields {
  display: grid;
  gap: var(--sp-lg);
}

.patient-identity-group-label {
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 1.3;
}

.patient-identity-dob-row .field > span,
.patient-identity-address-fields .field > span {
  font-weight: 400;
}

.patient-identity-inline-actions {
  margin-top: var(--sp-2xl);
}

.field.has-error input {
  border-color: var(--danger-brand);
}

.field-validation-message {
  margin-top: var(--sp-xs);
  color: var(--danger-brand);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.patient-identity-dob-message {
  margin: 0;
}

.patient-identity-form-message {
  margin: var(--sp-lg) 0 0;
}

.patient-identity-form-message + .patient-identity-inline-actions {
  margin-top: var(--sp-lg);
}

.record-identity-correction-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.duplicate-screen {
  background: var(--page);
  padding: calc(var(--solid-shell-height) + var(--solid-shell-content-gap)) var(--sp-lg) var(--content-bottom-clearance);
  overscroll-behavior-y: contain;
}

.duplicate-screen .screen-title {
  margin-bottom: var(--sp-2xl);
}

.duplicate-screen .stack {
  gap: var(--sp-lg);
}

.duplicate-screen .match-card {
  display: grid;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-md);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: var(--sp-md) 0;
}

.home-bottom-search {
  display: contents;
}

.home-bottom-search.is-focused {
  display: contents;
}

html.search-mode .solid-shell-header-home {
  display: none;
}

html.search-prearmed,
body.search-prearmed,
html.search-mode,
body.search-mode {
  height: var(--search-shell-height, 100dvh);
  min-height: var(--search-shell-height, 100dvh);
  max-height: var(--search-shell-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
}

html.search-prearmed #app,
html.search-mode #app {
  height: var(--search-shell-height, 100dvh);
  min-height: var(--search-shell-height, 100dvh);
  max-height: var(--search-shell-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
}

html.search-mode .home-screen {
  display: block;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 0 var(--sp-lg);
  overscroll-behavior: none;
  touch-action: pan-y;
}

html.search-mode .home-search-results-viewport {
  --search-results-fade-end: calc(
    100%
    - var(--search-dock-visual-gap)
    - var(--home-search-pill-height)
    + 4px
  );
  --search-results-fade-start: calc(
    var(--search-results-fade-end)
    - var(--search-results-bottom-fade)
  );
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0;
  background: transparent;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

html.search-mode .home-search-results-viewport::-webkit-scrollbar {
  display: none;
}

html.search-mode .home-search-results-viewport .patient-list-overline {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html.search-mode .home-search-results-viewport .patient-list {
  /* Keep WebKit's pan owner on this contained scroller even for short lists. */
  align-content: start;
  min-height: calc(100% + 1px);
  padding-top: 8px;
  padding-bottom: calc(
    var(--home-search-pill-height)
    + var(--search-dock-visual-gap)
    + var(--search-results-dock-gap)
    + var(--search-results-bottom-fade)
  );
}

html.search-mode.search-has-query .home-search-results-viewport {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 var(--search-results-fade-start),
    rgba(0, 0, 0, 0.96) calc(var(--search-results-fade-start) + 9px),
    rgba(0, 0, 0, 0.72) calc(var(--search-results-fade-start) + 18px),
    rgba(0, 0, 0, 0.32) calc(var(--search-results-fade-start) + 27px),
    transparent var(--search-results-fade-end),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 var(--search-results-fade-start),
    rgba(0, 0, 0, 0.96) calc(var(--search-results-fade-start) + 9px),
    rgba(0, 0, 0, 0.72) calc(var(--search-results-fade-start) + 18px),
    rgba(0, 0, 0, 0.32) calc(var(--search-results-fade-start) + 27px),
    transparent var(--search-results-fade-end),
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

html.search-mode:not(.search-has-query) .home-search-results-viewport {
  display: none;
}

.home-bottom-search .search-input-wrap {
  position: fixed;
  z-index: var(--z-viewport-action);
  right: max(84px, calc((100vw - var(--app-column-max)) / 2 + 84px));
  bottom: var(--home-new-patient-anchor-bottom);
  left: max(var(--sp-lg), calc((100vw - var(--app-column-max)) / 2 + var(--sp-lg)));
  grid-template-columns: auto minmax(0, 1fr);
  height: var(--home-search-pill-height);
  gap: 10px;
  border: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  padding: 0 18px;
  pointer-events: auto;
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 6px 18px rgba(30, 35, 34, 0.18);
}

.home-bottom-search .search-input-wrap:focus-within {
  box-shadow:
    inset 0 0 0 1.5px var(--primary),
    0 6px 18px rgba(30, 35, 34, 0.18);
}

.home-bottom-search.is-focused .search-input-wrap {
  position: fixed;
  z-index: var(--z-viewport-action);
  right: 76px;
  bottom: var(--search-dock-bottom-inset);
  left: 12px;
  height: 52px;
  min-width: 0;
  gap: 10px;
  border-radius: 26px;
  padding: 0 10px 0 18px;
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 6px 18px rgba(30, 35, 34, 0.18);
  touch-action: pan-x;
}

.home-bottom-search .search-input-wrap svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  stroke-width: 2.4;
}

.home-bottom-search.is-focused .search-input-wrap svg {
  width: 17px;
  height: 17px;
}

.home-bottom-search .search-input-wrap input {
  min-height: var(--home-search-pill-height);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.home-bottom-search.is-focused .search-input-wrap input {
  min-height: 52px;
  font-weight: 600;
  touch-action: pan-x;
}

.home-bottom-search .search-input-wrap input::placeholder {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.home-search-close {
  display: none;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 6px 18px rgba(30, 35, 34, 0.18);
  touch-action: none;
}

.home-search-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}

.home-bottom-search.is-focused .home-search-close {
  position: fixed;
  z-index: var(--z-viewport-action);
  right: 12px;
  bottom: var(--search-dock-bottom-inset);
  display: grid;
  pointer-events: auto;
}

.home-screen {
  background-color: #f4f4f2;
  background-color: var(--page);
  padding:
    calc(var(--solid-shell-height) + var(--solid-shell-content-gap))
    var(--sp-lg)
    var(--home-action-scroll-clearance);
  overscroll-behavior-y: contain;
}

.home-profile-button span {
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.home-screen .patient-list-section {
  margin-top: 0;
}

.home-screen .patient-list-section.is-search-results .patient-list-overline {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
}

.patient-search-empty {
  display: flex;
  align-self: stretch;
  justify-self: stretch;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 32px 48px;
  text-align: center;
}

html.search-mode .home-search-results-viewport .patient-list.is-empty-results {
  align-content: stretch;
  padding-top: 96px;
}

.patient-search-empty-glyph {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  color: #9a9d9c;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.patient-search-empty-title,
.patient-search-empty-subtitle {
  margin: 0;
}

.patient-search-empty-title {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.patient-search-empty-subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.home-screen .patient-list-row-copy strong {
  font-size: 16px;
  font-weight: 650;
  line-height: 21px;
}

.home-screen .patient-list-row-copy span {
  font-size: 13px;
  line-height: 19px;
}

.settings-screen {
  background: var(--page);
  padding: calc(var(--solid-shell-height) + var(--solid-shell-content-gap)) var(--sp-lg) var(--content-bottom-clearance);
  overscroll-behavior-y: contain;
}

.settings-subscreen {
  position: relative;
}

.assessment-flow-view {
  position: relative;
}

.assessment-flow-shell-controls {
  position: absolute;
  z-index: 5;
  top: var(--shell-corner-control-top);
  left: 0;
  margin: 0;
}

.settings-list {
  display: grid;
  gap: var(--sp-lg);
}

.settings-navigation-row:not(.has-preview) .patient-list-row-copy strong {
  margin-bottom: 0;
}

.settings-navigation-row .settings-transient-status {
  color: var(--primary);
  font-weight: 600;
}

.settings-logout-row {
  grid-template-columns: 1fr;
  justify-items: center;
  color: var(--danger-brand);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.settings-build-stamp {
  display: flex;
  min-height: 44px;
  margin: var(--sp-3xl) 0 0;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

.environment-integrity-banner {
  margin: 0 0 var(--sp-lg);
  padding: var(--sp-md);
  border-radius: var(--radius-card);
  background: var(--danger-tint);
  color: var(--danger-brand);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.settings-subscreen-form {
  display: grid;
  gap: var(--sp-lg);
}

.settings-subscreen .settings-readonly-field p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

.feedback-screen {
  background: var(--page);
  padding: calc(var(--solid-shell-height) + var(--solid-shell-content-gap)) var(--sp-lg) var(--content-bottom-clearance);
  overscroll-behavior-y: contain;
}

.feedback-screen .screen-title {
  margin: 0 0 var(--sp-2xl);
}

.feedback-screen .feedback-field {
  margin-bottom: 0;
}

.record-additional-actions {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: 2px 0;
}

.record-additional-actions button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--primary);
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 22px;
  text-align: left;
}

.record-additional-actions .row-nav-chevron {
  width: auto;
  color: #c4c7c5;
  font-size: 15px;
  font-weight: 700;
}

.record-additional-actions button:last-child {
  border-bottom: 0;
}

.record-additional-actions button:active {
  background: color-mix(in srgb, var(--page) 70%, var(--paper));
}

.record-additional-actions button:disabled {
  opacity: 0.45;
}

.auth-page.auth-refreshed .auth-success-block {
  display: grid;
  min-height: 56px;
  align-items: center;
  border: 1px solid var(--success-border);
  border-radius: var(--radius-card);
  background: var(--success-background);
  color: var(--ink);
  padding: 0 var(--sp-lg);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

.feedback-screen .feedback-field textarea {
  min-height: 180px;
  max-height: min(40dvh, 320px);
  border-radius: var(--radius-input);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  overflow-y: hidden;
  resize: none;
}

@media (min-width: 720px) {
  .auth-page {
    align-items: start;
    padding-top: 72px;
  }
}

.auth-page.auth-refreshed {
  align-items: start;
  background: var(--page);
  padding: calc(var(--shell-safe-top) + var(--sp-5xl)) var(--sp-lg) var(--sp-3xl);
  place-items: start center;
}

.auth-page.auth-refreshed .auth-panel {
  position: relative;
}

.auth-page.auth-refreshed.keyboard-open {
  padding-bottom: calc(var(--keyboard-inset) + var(--sp-3xl));
}

.auth-page.auth-refreshed .lockup { margin-bottom: var(--sp-3xl); }

.auth-page.auth-refreshed h1 {
  margin-bottom: var(--sp-2xl);
}

.auth-page.auth-refreshed.trouble-screen h1 {
  margin-bottom: var(--sp-sm);
}

.auth-page.auth-refreshed .calm-copy {
  margin: 0 0 var(--sp-2xl);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
}

.auth-page.auth-refreshed .stack {
  gap: var(--sp-lg);
}

.auth-page.auth-refreshed .auth-form-actions {
  display: grid;
  gap: var(--sp-md);
}

.auth-page.auth-refreshed .auth-links {
  justify-items: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-2xl);
  text-align: center;
}

.auth-page.auth-refreshed .auth-links button {
  min-height: 44px;
  color: var(--primary);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.history-screen {
  padding: calc(var(--solid-shell-height) + var(--solid-shell-content-gap)) var(--sp-lg) var(--content-bottom-clearance);
}

.history-page-body {
  display: grid;
  gap: var(--sp-xl);
}

.history-page-body .record-wound-chip {
  margin: 0;
}

.history-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 22px;
}

.history-card {
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--paper);
  padding: 2px var(--sp-lg);
}

.history-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.history-row:last-child { border-bottom: 0; }

.history-timestamp {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
}

.history-context-caption {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 16px;
}

.history-sentence {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}

.history-sentence + .history-sentence { margin-top: 2px; }

.history-previous-version-doorway {
  min-height: 44px;
  margin: 2px 0 -8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 8px 0;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
}

.history-quiet-state {
  margin: 0;
  color: var(--muted);
  padding: 28px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

.history-failure-card {
  border: 1px solid var(--danger-brand);
  border-radius: var(--radius-card);
  background: var(--danger-tint);
  color: var(--danger-brand);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.previous-version-banner {
  border-radius: var(--radius-card);
  background: var(--warning-background);
  color: var(--warning-ink);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 19px;
  text-align: center;
}

.record-info-pair .record-corrected-value,
.record-info-pair .record-corrected-value-separator {
  color: inherit;
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.record-info-pair .record-corrected-value.is-previous,
.record-info-pair .record-corrected-value-separator,
.record-info-pair .record-corrected-value.is-not-documented {
  color: var(--muted);
  font-size: var(--type-label-size);
  font-weight: 400;
  line-height: 18px;
}
