:root { --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif; --text: "Lora", Georgia, serif; }
.patient-page {
  --ease-glide: cubic-bezier(0.22, 1, 0.36, 1);
  --face: rgb(255 255 255 / 0.56);
  --face-frost: blur(16px) saturate(1.2);
  --rim: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.17), inset 0 0 0 2.5px rgb(255 255 255 / 0.82);
  --rim-on: inset 0 0 0 1.5px rgb(from var(--brand-blue) r g b / 0.62), inset 0 0 0 3px rgb(255 255 255 / 0.86);
  --button-glass: linear-gradient(145deg, rgb(255 255 255 / 0.74), rgb(255 255 255 / 0.2) 48%, rgb(from var(--accent-wash) r g b / 0.36));
  --button-glass-hover: linear-gradient(145deg, rgb(255 255 255 / 0.94), rgb(255 255 255 / 0.52) 48%, rgb(from var(--accent-wash) r g b / 0.58));
  --button-rim: inset 0 0 0 1px rgb(255 255 255 / 0.85), inset 1.5px 2px 2px -1px #fff, inset -1.5px -2px 2px -1px rgb(from var(--ink) r g b / 0.18), 0 0 0 1px rgb(from var(--ink) r g b / 0.1), 0 2px 5px -1px rgb(from var(--ink) r g b / 0.16);
  --primary-glass: linear-gradient(145deg, color-mix(in srgb, var(--brand-blue) 60%, var(--accent)), var(--accent) 52%, var(--accent-deep));
  --primary-rim: inset 0 0 0 1px rgb(from var(--accent-deep) r g b / 0.9), inset 1.5px 2px 2px -1px rgb(255 255 255 / 0.5), inset -1.5px -2px 2px -1px rgb(from var(--ink) r g b / 0.28), 0 2px 5px -1px rgb(from var(--accent-deep) r g b / 0.36);
  font-size: 1.0625rem; line-height: 1.5;
}
.patient-opening { position: fixed; inset: 0; z-index: -1; }
.patient-opening .thema-opening { --thema-opening-text: var(--text); --thema-opening-display: var(--display); }
.patient-opening .thema-opening__skip { display: none; }
body:not([data-stage="app"]) .patient { visibility: hidden; }

.patient { display: grid; grid-template-rows: auto 1fr; min-height: 100dvh; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(14px, 4vw, 36px) 6px; }
.top-brand { height: 52px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--face); backdrop-filter: var(--face-frost); box-shadow: var(--rim); }
.top-brand span { display: inline; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.patient-main { display: grid; align-content: start; gap: 16px; width: min(760px, 100%); margin: 0 auto; padding: 10px 14px 80px; outline: 0; }

.patient-page .slab { --slab-radius: 24px; --slab-bevel: 8px; box-shadow: 0 0 0 1px rgb(from var(--ink) r g b / 0.06), 0 3px 8px rgb(from var(--ink) r g b / 0.05), 0 28px 56px -26px rgb(from var(--ink) r g b / 0.42); }
.patient-page .slab::before { backdrop-filter: none; }
.patient-page .slab::after { background: var(--face); backdrop-filter: var(--face-frost); }
.patient-main > .pane:has(> .actions > [data-action="manageScheduling"]):has(> .page-title)::after {
  background: linear-gradient(118deg, rgb(255 255 255 / 0.92) 18%, rgb(from var(--current-wash) r g b / 0.94) 68%, rgb(from var(--brand-orange) r g b / 0.45));
}
.pane { padding: clamp(22px, 5vw, 34px) clamp(20px, 5vw, 36px); }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pane h2 { font: 400 1.75rem/1.1 var(--display); letter-spacing: -0.012em; }
.pane h3 { font-size: 1.0625rem; font-weight: 600; }
.count { color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; }
.eyebrow { margin-bottom: 8px; color: var(--ink-soft); font-size: 1rem; font-weight: 500; }
.page-title { font: 400 clamp(2.375rem, 8vw, 3.25rem)/1.02 var(--display); letter-spacing: -0.018em; text-wrap: balance; }
.lead { margin-top: 12px; max-width: 56ch; color: var(--ink-soft); text-wrap: pretty; white-space: pre-line; }
.quiet { color: var(--ink-quiet); font-size: 0.9375rem; }
.visit-when { margin-top: 18px; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.005em; text-wrap: balance; }
.visit-when span { white-space: nowrap; }
.visit-what { margin-top: 4px; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.actions + .quiet { margin-top: 12px; }

.patient-page :is(.primary, .secondary) { height: 52px; padding: 0 24px; border: 0; border-radius: 999px; font-size: 1.0625rem; font-weight: 600; }
.patient-page .actions button[data-action="manageScheduling"][data-id],
.patient-page .primary { background: var(--primary-glass); box-shadow: var(--primary-rim); color: #fff; }
.patient-page .primary:disabled { background: rgb(from var(--ink) r g b / 0.08); box-shadow: inset 0 0 0 1px rgb(from var(--ink) r g b / 0.1); color: var(--ink-quiet); cursor: default; }
.patient-page :is(.secondary, .icon-button) { border: 0; background: var(--button-glass); box-shadow: var(--button-rim); color: var(--ink); }
.patient-page .icon-button { width: 52px; height: 52px; border-radius: 50%; }
.patient-page :is(.primary, .secondary) .icon { width: 1.25rem; height: 1.25rem; }
.patient-page .inline-button { font-size: 1rem; }
.account-button { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; }
.patient-page a:is(.primary, .secondary) { text-decoration: none; }
.back { justify-self: start; height: 46px; padding: 0 20px 0 14px; }

.rows { position: relative; display: grid; margin: 0 -12px; }
.row {
  position: relative; z-index: 2; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px;
  border: 0; border-radius: 16px; background: none; color: var(--ink); text-align: left; text-decoration: none;
}
.row:is(:hover, :focus-visible) { z-index: 4; }
.row + .row::before { content: ""; position: absolute; inset: 0 12px auto 60px; border-top: 1px solid rgb(from var(--ink) r g b / 0.09); }
.row b { display: block; font-size: 1.125rem; font-weight: 600; }
.row-copy > span { display: block; color: var(--ink-soft); font-size: 0.9688rem; text-wrap: pretty; }
.row > .icon { color: var(--ink-quiet); transition: transform 200ms var(--ease-out); }
.row-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgb(from var(--ink) r g b / 0.28); color: transparent; }
.row-mark .icon { width: 1.125rem; height: 1.125rem; }
.row[data-state="done"] .row-mark { background: var(--confirmed); box-shadow: none; color: #fff; }
.row[data-state="open"] .row-copy > span { color: var(--waiting); font-weight: 500; }
.list-lens { border-radius: 16px; list-style: none; --glass-fill: rgb(255 255 255 / 0.5); box-shadow: var(--rim); }
.list-lens::after { display: none; }

.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: rgb(from var(--brand-blue) r g b / 0.1); box-shadow: inset 0 0 0 1px rgb(from var(--brand-blue) r g b / 0.22); color: var(--ink); font-size: 0.9688rem; }
.note .icon { margin-top: 2px; color: var(--accent-deep); }
.note a { color: var(--accent-deep); font-weight: 600; }
.guest { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.guest p { color: var(--ink-soft); }
.guest b { display: block; color: var(--ink); font-size: 1.125rem; }

.field { display: grid; gap: 8px; margin-top: 22px; }
.field > span, .field > legend { padding: 0; font-size: 1.0625rem; font-weight: 600; }
.field small { color: var(--ink-quiet); font-size: 0.9375rem; font-weight: 400; }
fieldset.field { min-width: 0; margin-inline: 0; padding: 0; border: 0; }
.patient-page :is(.input, .sign-in input) {
  width: 100%; height: 54px; padding: 0 16px; border: 0; border-radius: 14px; outline: 0; background: rgb(255 255 255 / 0.62); box-shadow: var(--rim);
  color: var(--ink); font: inherit; transition: background-color 160ms ease, box-shadow 160ms ease;
}
.patient-page :is(.input, .sign-in input):focus-visible { background: rgb(255 255 255 / 0.86); box-shadow: var(--rim-on); }
.with-unit { display: grid; grid-template-columns: minmax(0, 160px) auto; align-items: center; gap: 12px; color: var(--ink-soft); }
.options { display: grid; gap: 8px; }
.option { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; border-radius: 14px; background: rgb(255 255 255 / 0.36); box-shadow: var(--rim); cursor: pointer; transition: background-color 160ms ease, box-shadow 160ms ease; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgb(255 255 255 / 0.6); box-shadow: inset 0 0 0 1.5px rgb(from var(--ink) r g b / 0.3); color: transparent; }
.option[data-kind="radio"] i { border-radius: 50%; }
.option i .icon { width: 1rem; height: 1rem; }
.option:has(input:checked) { background: var(--current-wash); box-shadow: inset 0 0 0 1.5px var(--current-edge); color: var(--ink); }
.option:has(input:checked) i { background: var(--brand-orange); box-shadow: inset 0 0 0 1px var(--current-edge); color: var(--ink); }
.option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-rows { display: grid; gap: 10px; }
.table-row { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 8px; }
.cell { display: grid; gap: 4px; }
.cell span { color: var(--ink-quiet); font-size: 0.875rem; font-weight: 500; }
.file { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; border-radius: 14px; background: rgb(255 255 255 / 0.36); box-shadow: var(--rim); cursor: pointer; }
.file input { position: absolute; opacity: 0; pointer-events: none; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.files { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }

.progress { display: grid; gap: 8px; margin-top: 16px; }
.pane-head > .count { color: var(--ink); background: var(--current-wash); }
.progress > .count { color: var(--ink); background: linear-gradient(90deg, var(--brand-orange), var(--current-wash) 44%, transparent 80%); }
.progress-track { height: 12px; border-radius: 999px; background: var(--accent-wash); box-shadow: var(--rim); overflow: hidden; }
.progress-fill { height: 100%; width: calc(var(--done) * 100%); border-radius: 999px; background: var(--primary-glass); transition: width 420ms var(--ease-glide); }
.section-title { margin-top: 26px; }
.document { max-height: 300px; margin-top: 18px; padding: 18px 20px; overflow-y: auto; border-radius: 16px; background: rgb(255 255 255 / 0.5); box-shadow: var(--rim); color: var(--ink-soft); }
.document h3 { margin-bottom: 8px; color: var(--ink); }
.document p, .document ul, .disclosure p, .disclosure ul { margin-top: 10px; }
.document ul, .disclosure ul { padding-left: 20px; list-style: disc; }
.disclosure { margin-top: 18px; padding: 14px 16px; border-radius: 16px; background: rgb(255 255 255 / 0.5); box-shadow: var(--rim); color: var(--ink-soft); }
.disclosure summary { color: var(--ink); font-weight: 600; cursor: pointer; }
#consent-form > .option { margin-top: 18px; }
.signed { display: flex; align-items: center; gap: 10px; margin-top: 20px; color: var(--confirmed); font-weight: 600; }
.facts { display: grid; gap: 16px; margin-top: 22px; }
.fact { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.fact .icon { margin-top: 3px; color: var(--accent-deep); }
.fact b { display: block; }
.fact span { color: var(--ink-soft); white-space: pre-line; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; border-radius: 999px; background: rgb(255 255 255 / 0.3); box-shadow: var(--rim); }
.steps i { grid-row: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; color: var(--ink-quiet); font-size: 0.9375rem; font-style: normal; font-weight: 600; }
.steps i[data-reached] { color: var(--confirmed); }
.steps i:nth-of-type(1) { grid-column: 1; }
.steps i:nth-of-type(2) { grid-column: 2; }
.steps i:nth-of-type(3) { grid-column: 3; }
.steps-fill { grid-row: 1; grid-column: 1 / span var(--reached); border-radius: 999px; background: rgb(from var(--brand-blue) r g b / 0.18); box-shadow: var(--rim-on); }
.steps .icon { width: 1rem; height: 1rem; }

.patient-page button.primary[data-action="selectCheckAppointment"] { background: var(--brand-orange); color: var(--ink); box-shadow: var(--button-rim); }
.check-list { display: grid; gap: 12px; margin-top: 22px; }
.check { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: rgb(255 255 255 / 0.36); box-shadow: var(--rim); }
.check[data-state="ok"] .row-mark { background: var(--confirmed); box-shadow: none; color: #fff; }
.check[data-state="failed"] .row-mark { background: var(--failed); box-shadow: none; color: #fff; }
.check p { color: var(--ink-soft); }
.check .secondary { margin-top: 12px; }
.preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; max-height: 300px; width: 100%; margin-top: 12px; overflow: hidden; border-radius: 16px; background: var(--ink); color: rgb(255 255 255 / 0.7); font-size: 0.9375rem; }
.preview video { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview[data-live] video { display: block; }
.meter { height: 14px; margin-top: 12px; border-radius: 999px; background: rgb(255 255 255 / 0.4); box-shadow: var(--rim); overflow: hidden; }
.meter i { display: block; height: 100%; width: calc(var(--level, 0) * 100%); border-radius: 999px; background: var(--confirmed); transition: width 90ms linear; }

.room { position: relative; display: grid; place-items: center; height: min(70dvh, 620px); min-height: 380px; overflow: hidden; border-radius: 26px; background: var(--ink); color: #fff; box-shadow: 0 30px 60px -28px rgb(from var(--ink) r g b / 0.6); }
.room-remote { display: grid; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.room-avatar { display: grid; place-items: center; width: 132px; height: 132px; margin-bottom: 6px; border-radius: 50%; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.24); font: 400 3rem/1 var(--display); }
.room-avatar .icon { width: 3.25rem; height: 3.25rem; }
.room-remote p { font-size: 1.25rem; font-weight: 500; }
.room-remote small { max-width: 34ch; color: rgb(255 255 255 / 0.66); font-size: 0.9375rem; }
.room-chip { position: absolute; top: 18px; left: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; background: rgb(255 255 255 / 0.13); backdrop-filter: blur(10px); font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.room-chip i { width: 8px; height: 8px; border-radius: 50%; background: #ff8a7d; animation: room-pulse 1.4s ease-in-out infinite; }
.room-self { position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: clamp(110px, 24%, 190px); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: var(--ink-soft); box-shadow: 0 0 0 1px var(--brand-orange); font-weight: 600; }
.room-self video { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.room-self[data-live] video { display: block; }
.room-controls { position: absolute; left: 50%; bottom: 18px; display: flex; gap: 8px; padding: 7px; border-radius: 999px; background: rgb(255 255 255 / 0.12); backdrop-filter: blur(14px); translate: -50% 0; }
.room-controls button { display: grid; place-items: center; min-width: 56px; height: 56px; padding: 0 16px; border: 0; border-radius: 999px; background: rgb(255 255 255 / 0.15); color: #fff; font-size: 1rem; font-weight: 600; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.room-controls button:active { transform: scale(0.95); }
.room-controls button[aria-pressed="false"] { background: #fff; color: var(--ink); }
.room-controls .room-leave { padding: 0 24px; background: #d2382f; }
.room-controls button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.room-controls .icon { width: 1.375rem; height: 1.375rem; }
@keyframes room-pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

.sign-in {
  --slab-radius: 26px;
  position: fixed; left: 50%; top: 46%; z-index: 20; width: min(400px, calc(100vw - 28px)); padding: 34px 32px 30px; translate: -50% -50%;
  animation: slab-land 800ms var(--ease-out) both;
}
.patient-page .sign-in::after { background: rgb(255 255 255 / 0.56); backdrop-filter: blur(10px) saturate(1.1); }
.sign-in > * { animation: glass-arrive 600ms ease both; }
.sign-in-step { display: grid; gap: 14px; }
.sign-in h1 { font: 400 2.5rem/1 var(--display); letter-spacing: -0.015em; }
.sign-in p { color: var(--ink-soft); }
.sign-in label { display: grid; gap: 8px; font-weight: 600; }
.sign-in input { font-size: 1.25rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.sign-in input[name="code"] { letter-spacing: 0.32em; }
.sign-in .primary { width: 100%; margin-top: 6px; }
.sign-in .inline-button { justify-self: center; }
.sign-in .sign-in-error { color: var(--failed); font-weight: 500; }
body[data-stage="entering"] .sign-in { pointer-events: none; animation: sign-in-pass 520ms cubic-bezier(0.5, 0, 0.75, 0) both; }
body[data-stage="entering"] .sign-in::before, body[data-stage="entering"] .sign-in::after, body[data-stage="entering"] .sign-in > * { animation: glass-leave 380ms ease both; }
.sign-in[hidden], body[data-stage="app"] .sign-in { display: none; }
body[data-arriving] .patient .slab { animation: slab-land 900ms var(--ease-out) var(--arrive-delay, 0ms) both; }
body[data-arriving] .patient .slab > * { animation: glass-arrive 620ms ease var(--arrive-delay, 0ms) both; }
body[data-arriving] .patient-main > :nth-child(2) { --arrive-delay: 110ms; }
body[data-arriving] .patient-main > :nth-child(n + 3) { --arrive-delay: 220ms; }
@keyframes slab-land { from { transform: translateY(28px) scale(0.955); box-shadow: 0 0 0 0 transparent; } }
@keyframes glass-arrive { from { opacity: 0; } }
@keyframes glass-leave { to { opacity: 0; } }
@keyframes sign-in-pass { 60% { box-shadow: 0 0 0 0 transparent; } to { transform: scale(1.5); box-shadow: 0 0 0 0 transparent; } }

.account-menu { inset: 78px clamp(14px, 4vw, 36px) auto auto; width: min(320px, calc(100vw - 28px)); margin: 0; padding: 18px; border: 0; border-radius: 20px; background: rgb(255 255 255 / 0.8); backdrop-filter: blur(22px) saturate(1.4); box-shadow: var(--rim), 0 20px 40px -20px rgb(from var(--ink) r g b / 0.42); color: var(--ink); }
.account-name { font-size: 1.125rem; font-weight: 600; }
.account-phone { color: var(--ink-soft); }
.account-preview { display: grid; gap: 2px; margin: 14px -8px; padding: 12px 0; border-block: 1px solid rgb(from var(--ink) r g b / 0.1); }
.account-preview p { padding: 0 8px 6px; color: var(--ink-quiet); font-size: 0.875rem; font-weight: 500; }
.account-menu button, .account-menu nav a { display: block; width: 100%; min-height: 44px; padding: 8px; border: 0; border-radius: 10px; background: none; font-size: 1rem; font-weight: 500; text-align: left; }
.account-menu nav a { display: flex; align-items: center; color: inherit; text-decoration: none; }
.account-menu { max-height: calc(100dvh - 94px); overflow: auto; }
.account-preview button[aria-pressed="true"] { color: var(--accent-deep); font-weight: 600; }
.account-menu .account-out { margin: 0 -8px; width: calc(100% + 16px); }
.help { width: min(440px, calc(100vw - 28px)); padding: 28px; border: 0; border-radius: 24px; background: rgb(255 255 255 / 0.86); backdrop-filter: blur(24px) saturate(1.4); box-shadow: var(--rim), 0 30px 60px -24px rgb(from var(--ink) r g b / 0.5); color: var(--ink); }
.help::backdrop { background: rgb(from var(--ink) r g b / 0.28); backdrop-filter: blur(3px); }
.help h2 { font: 400 2rem/1.05 var(--display); letter-spacing: -0.012em; }
.help-note { margin-top: 10px; color: var(--ink-soft); }
.help-note:empty { display: none; }
.help .field textarea.input { height: auto; min-height: 5rem; padding: 12px 16px; resize: vertical; }
#help-request .primary, #help-another { margin-top: 14px; }
.help-history { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; }
.help-history h3 { font: 400 1.5rem/1.15 var(--display); }
.help-history ul { list-style: none; margin: 0; padding: 0; }
.help-history li { display: grid; gap: 4px; margin: 12px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.help-history small { color: var(--ink-soft); }
.help-history p, .help-history small { margin: 0; }
.help-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 68px; margin-top: 12px; padding: 12px 18px; border-radius: 16px; background: var(--button-glass); box-shadow: var(--button-rim); color: var(--ink); text-decoration: none; }
.help-row .icon { width: 1.375rem; height: 1.375rem; color: var(--accent-deep); }
.help-row b { display: block; }
.help-row span span { color: var(--ink-soft); }
.help-hours { margin-top: 14px; color: var(--ink-soft); font-size: 0.9688rem; }
.help .secondary { margin-top: 20px; width: 100%; }
.patient-page .toast { bottom: 22px; border: 1px solid rgb(255 255 255 / 0.18); background: rgb(from var(--ink) r g b / 0.72); backdrop-filter: blur(18px) saturate(1.6); font-size: 1rem; }

@media (hover: hover) {
  .patient-page :is(.secondary, .icon-button, .help-row):hover { background: var(--button-glass-hover); }
  .patient-page .actions button[data-action="manageScheduling"][data-id]:hover,
  .patient-page .primary:not(:disabled):hover { background: rgb(from var(--accent-deep) r g b / 0.96); }
  .row:hover > .icon { transform: translateX(3px); color: var(--accent-deep); }
  .option:not(:has(input:checked)):hover, .file:hover { background: rgb(255 255 255 / 0.6); }
  .account-menu button:hover { background: rgb(from var(--ink) r g b / 0.06); }
}
@media (max-width: 560px) {
  .top-label { display: none; }
  .top-actions .secondary { width: 52px; padding: 0; }
  .actions :is(.primary, .secondary) { flex: 1 1 100%; }
  .table-row { grid-template-columns: minmax(0, 1fr); padding-bottom: 10px; border-bottom: 1px solid rgb(from var(--ink) r g b / 0.1); }
  .room { height: 72dvh; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .patient-page *, .patient-page *::before, .patient-page *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
@supports selector(::-webkit-scrollbar) {
  html:has(.patient-page), .patient-page * { scrollbar-color: auto; scrollbar-width: auto; }
  html:has(.patient-page)::-webkit-scrollbar, .patient-page ::-webkit-scrollbar { width: 12px; height: 12px; }
  html:has(.patient-page)::-webkit-scrollbar-track, .patient-page ::-webkit-scrollbar-track { background: transparent; }
  html:has(.patient-page)::-webkit-scrollbar-thumb, .patient-page ::-webkit-scrollbar-thumb { border: 4px solid transparent; border-radius: 999px; background: rgb(from var(--brand-blue) r g b / 0.42) content-box; }
  html:has(.patient-page)::-webkit-scrollbar-thumb:hover, .patient-page ::-webkit-scrollbar-thumb:hover { background-color: rgb(from var(--accent-deep) r g b / 0.85); }
}

/* Video media uses the existing room surface and controls. */
.visit-video .room-remote { position: absolute; inset: 0; width: 100%; padding: 0; }
.visit-video [data-video-placeholder] { z-index: 2; display: grid; justify-items: center; align-self: center; gap: 10px; padding: 24px; }
.visit-video [data-video-placeholder][hidden] { display: none; }
.visit-video [data-video-participants] { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.visit-video [data-participant] { position: relative; display: grid; place-items: center; overflow: hidden; }
.visit-video [data-participant] > span { position: absolute; bottom: 90px; z-index: 1; }
.visit-video [data-participant] video { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.visit-video [data-video-track="audio"] { display: none; }
.visit-video .room-top, .visit-video .room-controls, .visit-video .room-self { z-index: 3; }
.visit-video .room-top { position: absolute; top: 18px; left: 18px; display: grid; justify-items: start; gap: 8px; }
.visit-video .room-top .room-chip { position: static; }
.visit-video .room-handoff, .visit-video .room-presence { font-weight: 500; }
.visit-video .room-handoff[hidden], .visit-video .room-presence[hidden] { display: none; }
.visit-video button[hidden] { display: none; }
.visit-video .room-controls button:disabled { opacity: .5; }
@media (max-width: 700px) {
  .visit-video .room-self { bottom: 100px; width: 110px; }
  .visit-video .room-controls { gap: 4px; max-width: calc(100% - 16px); }
  .visit-video .room-controls button { min-width: 40px; padding-inline: 10px; white-space: nowrap; }
  .visit-video .room-chip { flex-wrap: wrap; max-width: calc(100vw - 80px); }
}

.video-appointment { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; }
.video-appointment > span { display: grid; gap: 6px; }
.video-appointment > button { white-space: nowrap; }
.video-appointment > .actions { margin-top: 0; }
.video-appointment + .video-appointment { margin-top: 24px; }
.lead + .video-appointment { margin-top: 20px; }
@media (max-width: 600px) {
  .video-appointment { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .video-appointment > button { justify-self: start; }
}

.sign-in { max-height: calc(100dvh - 32px); overflow-y: auto; }
.sign-in[data-wide="true"] { width: min(520px, calc(100vw - 28px)); top: 50%; }
.sign-in select, .sign-in textarea { width: 100%; padding: 12px 14px; border: 1px solid rgb(from var(--ink) r g b / 0.16); border-radius: 12px; background: rgb(255 255 255 / 0.85); color: var(--ink); font: inherit; font-size: 1.05rem; }
.auth-links { display: grid; gap: 6px; justify-items: center; margin-top: 6px; padding-top: 10px; border-top: 1px solid rgb(from var(--ink) r g b / 0.1); }
.auth-links[hidden] { display: none; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.patient-switcher { display: flex; align-items: center; }
.patient-switcher[hidden] { display: none; }
.patient-switcher select { min-height: 44px; max-width: 220px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--button-glass); box-shadow: var(--button-rim); color: var(--ink); font: inherit; font-weight: 500; }
.caregiver-list { display: grid; gap: 4px; margin-top: 12px; }
.caregiver-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgb(from var(--ink) r g b / 0.1); }
.caregiver-row > span { display: grid; gap: 2px; }
.caregiver-row:last-child { border-bottom: 0; }
.sign-in-step[hidden] { display: none; }
@media (max-width: 560px) {
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .top-actions, .patient-switcher { min-width: 0; }
  .patient-switcher select { min-width: 0; width: 100%; }
  .top:has(.patient-switcher:not([hidden])) .top-brand span { display: none; }
}
.guest-stage { display: grid; place-items: center; gap: 24px; min-height: 100dvh; padding: 24px 16px; }
.guest-intro { display: grid; gap: 16px; max-width: 520px; }
.guest-intro[hidden] { display: none; }
.guest-stage #guest-room { width: min(1000px, 100%); }
.visit-video .room-invite { position: absolute; z-index: 4; left: 50%; bottom: 96px; translate: -50% 0; display: grid; gap: 10px; width: min(360px, calc(100% - 32px)); padding: 16px; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-overlay); }
.visit-video .room-invite[hidden] { display: none; }
.visit-video .room-invite label { display: grid; gap: 4px; font-size: .8125rem; }
.visit-video .room-invite-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.visit-video .room-invite p { margin: 0; color: var(--ink-soft); font-size: .8125rem; overflow-wrap: anywhere; }
.visit-video .room-invite p:empty { display: none; }
.visit-video [data-participant] > [data-participant-label] { left: 16px; padding: 4px 11px; border-radius: 999px; background: rgb(from var(--ink) r g b / 0.55); backdrop-filter: blur(8px); font-size: .8125rem; }
.visit-video:not([data-connection="connected"]):not([data-connection="reconnecting"]) .room-self { display: none; }

.plan-instructions { white-space: pre-wrap; overflow-wrap: anywhere; }
