@charset "UTF-8";
/* The interface is a touch surface; only editable fields select text on iOS. */
body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="range"]),body textarea,body [contenteditable="true"],body [contenteditable="true"] *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
:root{--paper:#f5f1e8;--ink:#242622;--purple:#7841b8;--fixed-token:#39AEDB;--fixed-slot:#DCEFF8;--single-token:#E49A4A;--single-slot:#FBE5CD;--muted:#64665f;--line:#d4d2c8;--coral:#da5d40;--fixed:#eeeee4;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}.study{max-width:1320px;margin:0 auto;padding:26px 42px 18px}.masthead{height:57px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:3px solid var(--ink)}.wordmark{display:flex;align-items:center;gap:8px;color:inherit;text-decoration:none;font-weight:800;font-size:29px;letter-spacing:-1.8px;line-height:1}.brand-dot{width:17px;height:17px;border-radius:50%;background:var(--purple);margin-right:3px}.brand-period{color:var(--coral);margin-left:-8px}.study-label{font-size:11px;font-weight:700;letter-spacing:1.8px;padding-top:8px}.study-label span{color:#9a9c92;padding:0 10px}.edition{font-size:13px;padding-top:6px}.workspace{display:grid;grid-template-columns:190px minmax(0,1fr);gap:48px;margin-top:30px}.people{border-right:1px solid var(--line);padding-right:28px;display:flex;flex-direction:column}.section-label{display:flex;align-items:center;gap:8px;font-size:10px;letter-spacing:1.5px;font-weight:700;padding-top:7px}.small-square{width:8px;height:8px;background:var(--ink)}.count{margin-left:auto;color:var(--muted)}.patient-card{margin-top:45px}.token{position:relative;border:3px solid var(--ink);border-radius:50%;width:62px;height:62px;display:grid;place-items:center;background:var(--purple);color:#fff;font-size:24px;font-weight:650;line-height:1;flex-shrink:0}.token-large{width:102px;height:102px;font-size:39px;border-width:4px}.patient-card h2{font-size:30px;letter-spacing:-1px;margin:19px 0 5px}.patient-card p{font-size:14px;color:var(--muted);margin:0}.patient-bottom{margin-top:auto;padding-bottom:21px}.patient-bottom p{font-size:14px;line-height:1.5;margin-bottom:0;color:var(--muted)}.line-art{display:flex;align-items:center;height:37px}.line-art i{width:31px;height:31px;border:2px solid var(--ink);border-radius:50%;margin-right:-10px}.line-art i:last-child{background:var(--coral);border-color:var(--coral)}.day-heading{display:flex;align-items:center;justify-content:space-between;padding:0 2px 22px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:650;margin:0 0 4px}h1{font-size:76px;letter-spacing:-5px;line-height:1;margin:0;font-weight:750}.title-dot{color:var(--coral)}.date-number{font-size:86px;letter-spacing:-6px;line-height:1;font-weight:300;color:var(--purple)}.schedule{border:3px solid var(--ink)}.column-head,.slot{display:grid;grid-template-columns:115px 1fr 1fr 138px}.column-head{min-height:48px;border-bottom:3px solid var(--ink);align-items:stretch}.column-head>span{display:flex;align-items:center;padding:0 18px;font-size:17px;font-weight:650;border-left:2px solid var(--ink)}.column-head>span:first-child{border:0;font-size:10px;letter-spacing:1.6px}.column-head>span:last-child{font-size:14px;justify-content:center}.column-symbol{margin-left:auto;font-size:29px;line-height:1}.repeat{font-size:22px}.slot{min-height:93px;border-bottom:2px solid var(--ink)}.slot:last-child{border-bottom:0}.time{padding-left:17px;display:flex;align-items:center;font-size:30px;letter-spacing:-1.4px;font-weight:650}.time span{font-weight:400}.cell{display:flex;align-items:center;justify-content:center;border-left:2px solid var(--ink);min-width:0}.occupied .fixed{background:var(--fixed-slot)}.unavailable .empty-mark{display:none}.empty-mark{width:6px;height:6px;border-radius:50%;background:#b4b7ac}.placed-patient{display:flex;align-items:center;gap:14px}.patient-name{font-size:17px;font-weight:550}.attendance input{appearance:none;width:31px;height:31px;margin:0;border:2.5px solid #777a70;background:transparent;border-radius:0;opacity:1}.no-session{color:#b4b7ac;font-size:21px}.outside-frame{display:flex;align-items:center;justify-content:flex-end;min-height:88px;padding:10px 22px 0 5px;gap:20px}.release-zone,.trash-zone{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted)}.release-symbol{font-size:30px;color:var(--ink)}.trash-zone{color:var(--ink)}.trash-zone svg{height:32px;width:29px;color:var(--coral)}.footnote{display:flex;justify-content:space-between;margin-top:19px;padding-top:13px;border-top:1px solid var(--line);font-size:9px;letter-spacing:1.1px;color:var(--muted);gap:15px}.footer-dot{color:var(--coral);padding:0 8px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1200px){.study{padding-top:35px}.workspace{margin-top:36px;grid-template-columns:210px minmax(0,1fr);gap:60px}.slot{min-height:107px}.patient-card{margin-top:54px}}
@media(max-width:1000px){.study{padding:23px 26px 16px}.workspace{grid-template-columns:140px minmax(0,1fr);gap:26px}.people{padding-right:20px}.column-head,.slot{grid-template-columns:94px 1fr 1fr 108px}.column-head>span{padding:0 12px}.column-head>span:last-child{font-size:12px}.time{font-size:27px;padding-left:10px}.patient-name{display:none}h1{font-size:65px}.date-number{font-size:76px}.slot{min-height:86px}}
@media(max-width:650px){.study{padding:18px 14px}.masthead{height:49px}.edition{display:none}.workspace{grid-template-columns:minmax(0,1fr);gap:22px;margin-top:18px}.people{border-right:0;border-bottom:1px solid var(--line);padding:0 0 14px;flex-direction:row;align-items:center;justify-content:space-between}.section-label{padding:0}.count{display:inline;margin-left:4px}.patient-card{margin:0;display:flex;align-items:center;gap:10px}.token-large{width:46px;height:46px;font-size:18px;border-width:2px}.patient-card h2{font-size:19px;margin:0}.patient-card p,.patient-bottom{display:none}.day-heading{padding-bottom:17px}h1{font-size:57px}.date-number{font-size:65px}.column-head,.slot{grid-template-columns:78px 1fr 1fr 90px}.column-head>span{font-size:13px;padding:0 8px}.column-head>span:last-child{font-size:11px}.column-symbol{display:none}.time{font-size:23px}.token{width:53px;height:53px;font-size:21px}.slot{min-height:80px}.footnote{font-size:8px;line-height:1.7;flex-wrap:wrap}.outside-frame{padding-right:5px;min-height:73px}}

.attendance input.attendance-circle{width:34px;height:34px;border:2.5px solid var(--ink);border-radius:50%;background:transparent;cursor:pointer;transition:background-color 140ms ease,border-color 140ms ease}
.attendance input.attendance-circle:disabled{cursor:default;opacity:1}
.attendance input.attendance-circle:checked{background:#C5F294}
.attendance input.attendance-circle:focus-visible{outline:3px solid var(--purple);outline-offset:5px}
@media(prefers-reduced-motion:reduce){.attendance input.attendance-circle{transition:none}}

/* Compact day board: leave the surrounding workspace available. */
.day{width:100%;max-width:406px;min-width:0;justify-self:start}
.column-head,.slot{grid-template-columns:repeat(4,minmax(0,1fr))}
.column-head>span,.column-head>span:first-child,.column-head>span:last-child{font-size:17px;font-weight:650;letter-spacing:normal;padding:0 10px;justify-content:center}
.time{padding-left:0;justify-content:center}
@media(max-width:650px){.column-head>span,.column-head>span:first-child,.column-head>span:last-child{font-size:15px;padding:0 6px}}

/* Each schedule row is four squares, at every viewport width. */
.slot{min-height:0;aspect-ratio:4 / 1;border-bottom:0;position:relative}
.slot:not(:last-child)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--ink);pointer-events:none}
.slot>.time,.slot>.cell{min-height:0}

/* Patient collection and right-aligned daily schedule. */
.workspace{grid-template-columns:minmax(0,1fr) minmax(0,406px);gap:48px}
.day{justify-self:end}
.people{padding-right:32px;min-width:0}
.patient-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:32px 20px;margin-top:42px;align-content:start}
.patient-grid .patient-card{margin:0;display:flex;justify-content:center}
.patient-grid .token-large{width:82px;height:82px;font-size:30px;border-width:3px}
@media(max-width:1100px) and (min-width:701px){.workspace{gap:28px;grid-template-columns:minmax(0,1fr) minmax(0,406px)}.people{padding-right:20px}.patient-grid{grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:26px 14px}.patient-grid .token-large{width:64px;height:64px;font-size:24px}}
@media(max-width:700px){.workspace{grid-template-columns:minmax(0,1fr);gap:26px}.people{display:block;border-right:0;border-bottom:1px solid var(--line);padding:0 0 24px}.patient-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:18px 10px;margin-top:24px}.patient-grid .token-large{width:min(100%,58px);height:auto;aspect-ratio:1;font-size:20px}.day{justify-self:end}.section-label .count{margin-left:auto}}

/* Adjustable boundary between patients and the daily schedule. */
@media(min-width:701px){
 .workspace{grid-template-columns:var(--patients-width,minmax(0,1fr)) 20px minmax(0,1fr);gap:14px}
 .people{border-right:0;padding-right:12px}
 .workspace-divider{position:relative;align-self:stretch;cursor:col-resize;touch-action:none;min-height:100%;outline:none}
 .workspace-divider::before{content:"";position:absolute;top:0;bottom:0;width:2px;left:calc(50% - 1px);background:#A3A3A3}
 .workspace-divider::after{content:"";position:absolute;top:46%;left:calc(50% - 3px);width:6px;height:48px;border-radius:4px;background:var(--muted);opacity:1}
 .workspace-divider:hover::after,.workspace-divider:focus-visible::after,.workspace-divider.dragging::after{background:var(--purple);opacity:1}
 .workspace-divider:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
 .workspace.resizing{user-select:none;cursor:col-resize}
 .patient-grid{grid-template-columns:repeat(auto-fill,minmax(82px,1fr))}
}
@media(min-width:701px) and (max-width:1100px){.patient-grid{grid-template-columns:repeat(auto-fill,minmax(64px,1fr))}}
@media(max-width:700px){.workspace-divider{display:none}}

@media(min-width:701px){.day{justify-self:center}}

/* Larger secondary typography; the weekday remains the main heading. */
.masthead{height:87px}
.wordmark{font-size:62px;color:var(--ink);letter-spacing:-3.5px}
.section-label{font-size:16px;letter-spacing:1.4px;gap:10px}
.section-label .count{font-size:18px;font-variant-numeric:tabular-nums;letter-spacing:.5px}
.eyebrow{font-size:17px;letter-spacing:1.7px;margin-bottom:8px}
@media(max-width:1000px){.masthead{height:77px}.wordmark{font-size:54px}}
@media(max-width:650px){.masthead{height:70px}.wordmark{font-size:48px;letter-spacing:-2.5px}.section-label{font-size:14px}.section-label .count{font-size:16px}.eyebrow{font-size:15px;letter-spacing:1.2px}}

/* Long-press study: ML is the only active patient token. */
html{transition:background-color 180ms ease}
body{background:var(--paper);transition:background-color 180ms ease}
html.patient-held,html.schedule-outside{--paper:#FEFFE3;background:var(--paper)}
.patient-interactive{font-family:inherit;padding:0;cursor:grab;touch-action:none;user-select:none;-webkit-touch-callout:none;transition:transform 180ms ease}
.patient-interactive:focus,.patient-interactive:focus-visible{outline:none}
.patient-interactive.is-held{transform:scale(1.12);cursor:grabbing;z-index:1}
.people{display:flex;flex-direction:column;align-items:stretch}
.patient-trash-area{display:flex;justify-content:flex-end;align-items:center;min-height:88px;padding:24px 12px 0;margin-top:auto}
.patient-trash{transform-origin:50% 75%;transition:transform 180ms ease}
.patient-held .patient-trash{transform:scale(1.2) rotate(-12deg)}
@media(max-width:700px){.patient-trash-area{min-height:64px;padding-top:20px}}
@media(prefers-reduced-motion:reduce){html,body,.patient-interactive,.patient-trash{transition:none}}


.patient-drag-source{opacity:0}
.patient-drag-ghost{color:var(--drag-ink,#fff);background:var(--drag-color,var(--purple));position:fixed;z-index:1000;pointer-events:none;transform:scale(1.12);margin:0;box-shadow:none;outline:none;transition:transform 160ms ease,opacity 160ms ease;font-family:inherit}
.patient-drag-ghost.preview-fixed{background:var(--fixed-token);color:#fff}
.patient-drag-ghost.preview-single{background:var(--single-token);color:#fff}
.patient-held .patient-trash.is-drop-target{transform:scale(1.55) rotate(-12deg)}

.patient-drag-ghost.over-navigation{opacity:.65;transform:scale(1.008)}
.patient-drag-ghost.over-trash{opacity:.5;transform:scale(var(--trash-scale,.25));color:transparent;border-color:var(--drag-color,var(--purple))}
@media(prefers-reduced-motion:reduce){.patient-drag-ghost{transition:none}}

.patient-grid{width:100%;align-self:center}

.add-patient-card{display:flex;justify-content:center}
.patient-grid .add-patient{background:transparent;border-color:var(--ink);padding:0;cursor:pointer}
.add-patient svg{width:62%;height:62%;fill:none;stroke:#A3A3A3;stroke-width:3}
.add-patient:focus-visible{outline:none;border-color:var(--purple)}

/* Patient details float within their own panel. */
.people{position:relative}
.patient-editor{position:absolute;z-index:10;top:46px;left:50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:360px;padding:14px;border:2px solid var(--ink);border-radius:22px;background:var(--paper);box-shadow:0 12px 32px #24262218;max-height:calc(100dvh - 210px);overflow-y:auto;overscroll-behavior:contain;container:patient-editor / inline-size}
.patient-editor[hidden]{display:none}
.patient-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.patient-editor h2{margin:0;font-size:24px;letter-spacing:-.8px}
.close-patient-editor{display:grid;place-items:center;width:32px;height:32px;border:0;background:transparent;color:var(--muted);font-family:inherit;line-height:1;cursor:pointer;font-size:28px}
.patient-editor form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.patient-editor label{display:grid;gap:5px;font-size:14px;font-weight:600;min-width:0}
.patient-editor input,.patient-editor select{width:100%;min-width:0;height:36px;border:1.5px solid var(--ink);border-radius:9px;padding:7px 9px;background:transparent;color:var(--ink);font:inherit;font-size:16px;font-weight:400}
.patient-editor input:focus,.patient-editor select:focus{outline:2px solid var(--purple);outline-offset:2px}
.save-patient{grid-column:1/-1;border:2px solid var(--ink);border-radius:10px;padding:8px;background:var(--purple);color:white;font:inherit;font-size:16px;font-weight:650;cursor:pointer}
.patient-editor button:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
@media(max-width:700px){.people:has(.patient-editor:not([hidden])){min-height:var(--patient-editor-space,520px)}.patient-editor{top:38px}}

.rate-field{display:grid;gap:5px;min-width:0}
.rate-controls{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:6px}
.patient-editor select{appearance:none;-webkit-appearance:none;padding-left:7px;padding-right:25px;font-size:16px;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%23242622' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 9px}

/* Visual placement only: one patient per time row. */
.cell.drop-preview,.cell.visually-occupied{background:var(--fixed-slot)}
.cell.fixed .schedule-token{background:var(--fixed-token)}
.cell.single.drop-preview,.cell.single.visually-occupied{background:var(--single-slot)}
.cell.single .schedule-token{background:var(--single-token);color:#fff}
.cell .schedule-token{width:min(70%,62px);height:auto;aspect-ratio:1;font-size:clamp(18px,2.4vw,24px)}

.day .trash-zone,.week-trash{transform-origin:50% 75%;transition:transform 180ms ease}
.schedule-held .day .trash-zone,.week-schedule-held .week-trash{transform:scale(1.2) rotate(-12deg)}
.schedule-held .day .trash-zone.is-drop-target,.week-schedule-held .week-trash.is-drop-target{transform:scale(1.55) rotate(-12deg)}
@media(prefers-reduced-motion:reduce){.day .trash-zone,.week-trash{transition:none}}

/* Only the timetable scrolls; its column labels remain pinned. */
.schedule{max-height:min(454px,55dvh);overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;scrollbar-color:var(--muted) transparent}
.schedule .column-head{position:sticky;top:0;z-index:2;background:var(--paper);transition:background-color 180ms ease}
.schedule:focus-visible{outline:2px solid var(--purple);outline-offset:4px}
@media(prefers-reduced-motion:reduce){.schedule .column-head{transition:none}}

.patient-connection p:empty{display:none}
.patient-connection p{font-size:16px;line-height:1.4;color:var(--muted);margin:16px 0 0}
.patient-connection button{font:inherit;padding:10px 14px;margin-top:12px;border:2px solid var(--ink);border-radius:10px;background:transparent;cursor:pointer}
button:disabled{cursor:wait;opacity:.5}

/* Fixed scroll buttons beside the timetable. */
.day{width:calc(100% - 54px);margin-right:54px}
.schedule-frame{position:relative}
.schedule-scroll-controls{position:absolute;left:calc(100% + 10px);top:calc(50% + 24px);transform:translateY(-50%);display:grid;gap:12px}
.scroll-hours{width:32px;height:32px;display:grid;place-items:center;padding:6px;border:2px solid var(--ink);border-radius:50%;background:var(--purple);color:#fff;cursor:pointer;touch-action:manipulation;transition:transform 120ms ease-out}
.scroll-hours svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter}
.scroll-hours:active:not(:disabled),.scroll-hours.is-scrolling:not(:disabled){transform:scale(.9)}
.scroll-hours:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
.scroll-hours:disabled{cursor:default;opacity:.35}

.day{container-type:inline-size}
.day-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 8px}
.day-heading .eyebrow{margin:0;font-size:clamp(11px,4cqw,17px);letter-spacing:1px}
.day-heading h1{font-size:clamp(28px,13cqw,54px);letter-spacing:-.06em}
.day-heading .date-number{font-size:clamp(48px,21cqw,86px);letter-spacing:-.08em}
.day-navigation{display:flex;gap:8px;justify-content:flex-end}
.change-day{width:38px;height:38px;border:2.5px solid var(--ink);border-radius:50%;background:transparent;color:var(--ink);padding:8px;display:grid;place-items:center;cursor:pointer;touch-action:manipulation}
.change-day svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter}
.change-day:hover{background:#E6D4FF}
.change-day:focus-visible{outline:2px solid var(--purple);outline-offset:3px}

.change-day{transition:transform 120ms ease-out}
.day .change-day.drag-hover:not(:disabled),.day .scroll-hours.drag-hover:not(:disabled){transform:scale(1.18)}
@media(prefers-reduced-motion:reduce){.scroll-hours,.change-day{transition:none}}

.scroll-hours{touch-action:none;user-select:none;-webkit-touch-callout:none}
/* Full-width weekly overview; the daily workspace stays intact while hidden. */
.workspace[hidden],.week-view[hidden]{display:none}
.view-switch{display:flex;align-self:center;border:2px solid var(--ink);border-radius:24px;overflow:hidden;margin-bottom:18px}
.view-switch button{border:0;background:transparent;color:var(--ink);padding:9px 19px;font:inherit;font-size:18px;font-weight:650;cursor:pointer}
.view-switch button + button{border-left:2px solid var(--ink)}
.view-switch button[aria-pressed="true"]{background:var(--purple);color:#fff}
.view-switch button:focus-visible{outline:3px solid var(--ink);outline-offset:-4px}
.header-actions{display:flex;align-self:center;align-items:center;gap:14px;margin-bottom:18px}
.header-actions .view-switch{margin-bottom:0}
.help-link{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;border:2px solid var(--ink);border-radius:50%;color:var(--ink);font-size:26px;font-weight:650;text-decoration:none;transition:transform 120ms ease}
.help-link:hover{transform:scale(.94)}
.help-link:focus-visible{outline:3px solid var(--purple);outline-offset:4px}
@media(max-width:650px){.header-actions{gap:8px;margin-bottom:12px}.help-link{width:34px;height:34px;font-size:23px}.header-actions .view-switch{margin-bottom:0}}
@media(prefers-reduced-motion:reduce){.help-link{transition:none}}
.week-view{margin-top:30px}
.week-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.week-heading>div:first-child{min-width:0}
.week-heading .day-navigation,.week-trash{flex-shrink:0}
.week-trash{width:44px;height:48px;justify-content:center}
.week-trash svg{width:36px;height:40px}
.week-heading h1{font-size:56px;letter-spacing:-3px;margin-top:8px}
.week-board{border:3px solid var(--ink);max-height:calc(100dvh - 300px);min-height:240px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--muted) transparent}
.week-row{display:grid;grid-template-columns:72px repeat(7,minmax(72px,1fr));min-width:576px;min-height:58px}
.week-row:not(:last-child){border-bottom:1px solid var(--ink)}
.week-columns{position:sticky;top:0;z-index:2;background:var(--paper);border-bottom:3px solid var(--ink)!important}
.week-cell,.week-column{display:flex;justify-content:center;align-items:center;border-left:1px solid var(--ink)}
.week-hour{position:sticky;left:0;z-index:1;display:grid;place-items:center;background:var(--paper);font-size:16px;font-weight:650}
.week-day-link{width:100%;padding:10px 4px;display:grid;gap:3px;justify-items:center;border:0;background:transparent;font:inherit;color:var(--ink);cursor:pointer}
.week-day-link span{font-size:14px;font-weight:650}.week-day-link strong{font-size:28px;line-height:1}
.week-day-link[aria-current="date"]{color:var(--purple)}
.week-day-link:hover{background:#E6D4FF}
.week-day-link:focus-visible{outline:2px solid var(--purple);outline-offset:-4px}
.week-cell.has-appointment{background:var(--fixed-slot)}
.week-cell.fixed .week-token{background:var(--fixed-token)}
.week-cell.single.has-appointment{background:var(--single-slot)}
.week-cell.single .week-token{background:var(--single-token);color:#fff}
.week-token{width:38px;height:38px;font-size:16px;border-width:2px}
@media(max-width:650px){.view-switch{margin-bottom:12px}.view-switch button{font-size:16px;padding:8px 13px}.week-heading h1{font-size:44px}.week-heading .eyebrow{font-size:13px}.week-view{margin-top:22px}.week-board{max-height:calc(100dvh - 245px)}}

/* Patient schedule and compact removal choices. */
html.summary-open{overflow:hidden}
.schedule-summary{width:min(960px,calc(100% - 48px));max-height:calc(100dvh - 64px);margin:auto;padding:36px;border:3px solid var(--ink);border-radius:26px;background:var(--paper);color:var(--ink);overflow:auto;overscroll-behavior:contain}
.schedule-summary::backdrop{background:#24262266}
.summary-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding-bottom:28px;border-bottom:3px solid var(--ink)}
.summary-heading .eyebrow{font-size:22px;letter-spacing:0;text-transform:none;overflow-wrap:anywhere;margin-bottom:10px;color:var(--purple)}
.summary-heading h2{font-size:clamp(40px,6vw,64px);line-height:1;letter-spacing:-.05em;margin:0}
.close-summary{flex:none;width:44px;height:44px;display:grid;place-items:center;padding:0;border:2px solid var(--ink);border-radius:50%;background:transparent;color:var(--ink);font:inherit;font-size:34px;line-height:1;cursor:pointer}
.close-summary svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:square}
.close-summary:hover{background:#E6D4FF}
.close-summary:focus-visible{outline:2px solid var(--purple);outline-offset:4px}
.summary-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;min-height:270px;padding-top:30px}
.summary-group-title{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:28px;margin:0 0 18px}
.summary-count{font-size:32px;font-weight:400;color:var(--purple)}
.summary-groups ul{list-style:none;margin:0;padding:0}
.summary-groups li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 0;border-top:1px solid var(--line)}
.summary-weekday{display:block;font-size:23px;letter-spacing:-.03em}
.summary-date{display:block;font-size:16px;color:var(--muted);margin-top:6px}
.summary-time{font-size:32px;letter-spacing:-.04em;font-variant-numeric:tabular-nums;white-space:nowrap}
.summary-groups li>div:first-child{min-width:0;overflow-wrap:anywhere}
.summary-row-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.summary-trash{display:grid;place-items:center;width:44px;height:44px;padding:7px;border:0;border-radius:50%;background:transparent;color:var(--coral);cursor:pointer;transition:transform 160ms ease}
.summary-trash svg{width:27px;height:30px}
.summary-trash:hover:not(:disabled){transform:scale(1.12) rotate(-12deg)}
.summary-trash:disabled{opacity:.3;cursor:default}
.summary-trash:focus-visible,.remove-options button:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
.schedule-remove{width:min(360px,calc(100% - 32px));margin:auto;padding:24px;border:3px solid var(--ink);border-radius:24px;background:var(--paper);color:var(--ink)}
.schedule-remove::backdrop{background:#24262255}
.remove-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.remove-heading h2{margin:0;font-size:30px;letter-spacing:-1px}
#remove-context{margin:14px 0 20px;color:var(--muted);font-size:17px}
.remove-options{display:grid;gap:12px}
.remove-options button{display:grid;gap:5px;text-align:left;padding:16px;border:2px solid var(--ink);border-radius:14px;background:transparent;color:var(--ink);font:inherit;font-size:20px;font-weight:650;cursor:pointer}
.remove-options button small{font-size:14px;font-weight:400;color:var(--muted)}
.remove-options button:hover:not(:disabled){background:#E6D4FF}
.remove-options button:disabled{opacity:.35;cursor:default}
@media(max-width:400px){.summary-row-actions{gap:4px}.summary-groups li{gap:8px}.summary-time{font-size:24px}.summary-date{font-size:14px}.summary-weekday{font-size:20px}}
@media(prefers-reduced-motion:reduce){.summary-trash{transition:none}}
.summary-empty{font-size:19px;color:var(--muted);border-top:1px solid var(--line);margin:0;padding-top:22px}
.week-token{font-family:inherit;padding:0;cursor:grab}
@media(max-width:650px){.schedule-summary{width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:24px;border-radius:22px}.summary-groups{grid-template-columns:1fr;gap:28px}.summary-heading{gap:14px;padding-bottom:24px}.summary-heading .eyebrow{font-size:20px}.summary-time{font-size:28px}.summary-group-title{font-size:26px}}

/* A small patient tray overlays the week and folds away during placement. */
.week-calendar{position:relative}
.week-actions{display:flex;align-items:center;gap:20px;flex-shrink:0}
.week-add{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:9px;border:2px solid var(--ink);border-radius:50%;background:transparent;color:var(--muted);cursor:pointer;transition:transform 140ms ease}
.week-add svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2.5}
.week-add:hover:not(:disabled){transform:scale(.94)}
.week-add[aria-expanded="true"]{background:#E6D4FF;color:var(--ink)}
.week-add:disabled{opacity:.4;cursor:default}
.week-add:focus-visible,.appointment-kind button:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
.week-patients{position:absolute;z-index:20;top:0;display:flex;flex-direction:column;max-height:calc(100dvh - 280px);right:0;width:min(440px,100%);padding:24px;border:3px solid var(--ink);border-radius:24px;background:var(--paper);box-shadow:0 12px 32px #24262218}
.week-patients[hidden]{display:none}
.week-patients-heading{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}
.week-patients h2{margin:0;font-size:30px;letter-spacing:-1px}
.appointment-kind{flex-shrink:0;display:flex;gap:10px}
.appointment-kind button{flex:1;border:2px solid var(--ink);border-radius:18px;padding:9px 14px;background:transparent;color:var(--ink);font:inherit;font-size:20px;font-weight:650;cursor:pointer}
.appointment-kind [data-kind="fixed"][aria-pressed="true"]{background:var(--fixed-token);color:#fff}
.appointment-kind [data-kind="single"][aria-pressed="true"]{background:var(--single-token);color:#fff}
.week-patient-grid{min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));justify-items:center;gap:24px 18px;max-height:min(340px,45dvh);overflow:auto;padding:12px 6px;margin-top:20px;overscroll-behavior:contain}
.week-patient{width:64px;height:64px;font-size:24px}
.week-create-patient{width:64px;height:64px;padding:0;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent}
.week-create-patient svg{width:62%;height:62%;fill:none;stroke:#A3A3A3;stroke-width:3}
.week-create-patient:focus-visible{outline:none;border-color:var(--purple)}
html.weekly-patient-held{--paper:#FEFFE3;background:var(--paper)}
.week-view[data-placement="fixed"] .week-cell.drop-preview{background:var(--fixed-slot)}
.week-view[data-placement="single"] .week-cell.drop-preview{background:var(--single-slot)}
.week-view .change-week.drag-hover{transform:scale(1.18)}
.choosing-patient .week-cell{cursor:pointer}
.choosing-patient .week-cell:focus-visible{outline:3px solid var(--purple);outline-offset:-4px}
@media(max-width:650px){.week-heading{flex-wrap:wrap;gap:14px}.week-actions{gap:14px;margin-left:auto}.week-patients{padding:20px}.week-patients h2{font-size:27px}.week-patient-grid{gap:18px 10px}}
@media(prefers-reduced-motion:reduce){.week-add{transition:none}}
.week-add,.appointment-kind button,.close-week-patients,.week-patient{-webkit-tap-highlight-color:transparent}

html[data-cloud-locked] main.study { visibility: hidden; }
html[data-cloud-locked] #access-gate[hidden], #access-gate:not([hidden]) {
  display:flex; position:fixed; inset:0; z-index:10000; flex-direction:column;
  align-items:center; justify-content:center; gap:24px; background:#f5f1e8; padding:32px;
}
#access-gate p {max-width:580px; text-align:center; font-size:22px;}
#access-gate button,#sign-out {font:inherit; cursor:pointer; padding:12px 20px; border:2px solid #232620; border-radius:28px; background:transparent; color:#232620;}
#access-login {background:#7c3ebc!important; color:white!important;}

/* Accounting shares the agenda's large type, geometric borders and quiet canvas. */
#accounts-view{padding-top:38px;min-width:0}
.accounts-heading{display:flex;align-items:baseline;justify-content:space-between;gap:20px;margin-bottom:30px}
.accounts-heading h1{font-size:clamp(48px,7vw,88px);letter-spacing:-.065em;line-height:1;margin:0}
#accounts-count{color:var(--purple);font-size:clamp(18px,2.6vw,30px);white-space:nowrap}
.accounts-filters{display:flex;align-items:end;gap:18px;flex-wrap:wrap;padding:24px 0;border-top:3px solid var(--ink);border-bottom:1px solid var(--line)}
.accounts-filters label,#account-editor label{display:flex;flex-direction:column;gap:9px;font-size:17px;font-weight:650;min-width:0}
.accounts-filters input,.accounts-filters select,#account-editor input,#account-editor select{font:inherit;background:transparent;border:2px solid var(--ink);border-radius:12px;padding:12px;min-width:0;color:var(--ink);max-width:100%}
.accounts-filters select{cursor:pointer;max-width:250px}
#accounts-view button,#account-editor form button,.payment-row button{font:inherit;border:2px solid var(--ink);border-radius:24px;padding:11px 18px;background:transparent;color:var(--ink);cursor:pointer}
#accounts-view button:hover,#account-editor form button:hover{background:var(--lilac,#E6D4FF)}
.currency-totals{margin:32px 0}
.currency-totals h2{font-size:20px;color:var(--purple);margin:0 0 12px}
.account-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:3px solid var(--ink)}
.account-card{padding:24px;display:flex;flex-direction:column;gap:18px;min-width:0}
.account-card+.account-card{border-left:2px solid var(--ink)}
.account-card span{font-size:20px;font-weight:650}
.account-card strong{font-size:clamp(24px,3.4vw,52px);letter-spacing:-.06em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.account-card.collected{background:#C5F294}.account-card.pending{background:#E6D4FF}
.unpriced-note,#accounts-received{font-size:17px;color:var(--muted)}
.accounts-subtitle{font-size:28px;margin-top:38px}
.account-patient{border-top:2px solid var(--ink);padding:18px 0}
.account-patient summary{cursor:pointer;font-size:24px}.account-patient summary span{float:right;font-size:18px;color:var(--muted)}
.account-row{display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:20px;padding:20px 0;border-top:1px solid var(--line);margin-top:16px}
.account-row>div{display:flex;flex-direction:column;gap:7px}.account-row strong{font-size:20px}.account-row span{color:var(--muted)}
.accounts-empty{font-size:24px;color:var(--muted);padding:32px 0}
#account-editor{width:min(620px,calc(100% - 32px));max-height:90dvh;box-sizing:border-box;overflow:auto;border:3px solid var(--ink);border-radius:30px;padding:32px;background:var(--paper);color:var(--ink)}
#account-editor::backdrop{background:#23262055}
#account-editor header{display:flex;align-items:center;justify-content:space-between;gap:20px}
#account-editor h2{font-size:36px;letter-spacing:-.04em;margin:0;overflow-wrap:anywhere}
#account-balance{display:block;font-size:30px;margin:25px 0}
#account-editor form:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:18px}
#account-editor form button{grid-column:1/-1;background:#E6D4FF}
.payment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0;border-top:1px solid var(--line)}
#account-payments{margin-top:24px}#account-error,#accounts-error{color:#a42e23}
@media(max-width:700px){.header-actions{flex-wrap:wrap;justify-content:end}.masthead{height:auto;min-height:90px;gap:12px}.view-switch button{padding:8px 10px;font-size:16px}.accounts-filters{display:grid;grid-template-columns:1fr 1fr;gap:14px}.accounts-filters input,.accounts-filters select{width:100%;box-sizing:border-box}.account-cards{grid-template-columns:1fr}.account-card+.account-card{border-left:0;border-top:2px solid var(--ink)}.account-card{padding:18px}.account-card strong{font-size:38px}.account-row{grid-template-columns:1fr auto;gap:14px}.account-row button{grid-column:1/-1}.account-patient summary{font-size:21px}.accounts-heading{align-items:center}#account-editor{padding:22px}#account-editor h2{font-size:28px}}

.accounts-caption{font-size:17px;color:var(--muted);margin:24px 0 0}
.accounts-heading-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:16px}
#accounts-view #accounts-export{background:#E6D4FF;font-weight:650;white-space:nowrap;min-height:44px;-webkit-tap-highlight-color:transparent}
#accounts-view #accounts-export:disabled{opacity:.4;cursor:default}
#accounts-view #accounts-export:focus-visible{outline:2px solid var(--purple);outline-offset:4px}
#accounts-export-error{color:#a42e23}
@media(max-width:700px){.accounts-heading{flex-wrap:wrap}.accounts-heading-actions{width:100%;justify-content:space-between;gap:12px}}

/* Local design iteration: separate accounts action and app-owned filter menus. */
.accounts-switch{margin-left:24px;border:2px solid var(--ink);border-radius:26px;padding:10px 22px;background:#C5F294;color:var(--ink);font:inherit;font-size:18px;font-weight:650;cursor:pointer;transition:transform 140ms ease}
.accounts-switch:hover{transform:scale(.96)}

.accounts-switch:focus-visible{outline:3px solid var(--purple);outline-offset:4px}
.account-filter{position:relative;display:flex;flex-direction:column;gap:9px;font-size:17px;font-weight:650;min-width:130px;max-width:260px}
#accounts-view .filter-trigger{border-radius:12px;min-height:49px;width:100%;padding:12px 20px;text-align:left;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#accounts-view .filter-trigger{cursor:pointer}
#accounts-view .filter-options button{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 32 32'%3E%3Cpath d='M16 3v23M6 16l10 10 10-10' fill='none' stroke='%23f5f1e8' stroke-width='7'/%3E%3Cpath d='M16 3v23M6 16l10 10 10-10' fill='none' stroke='%23242622' stroke-width='3.5'/%3E%3C/svg%3E") 14 23,pointer}
#accounts-view .filter-trigger:hover,#accounts-view .filter-trigger[aria-expanded="true"]{background:#E6D4FF}
.filter-options{position:absolute;z-index:40;top:calc(100% + 10px);left:0;min-width:100%;width:max-content;max-width:min(320px,calc(100vw - 40px));max-height:320px;overflow-y:auto;background:var(--paper);border:3px solid var(--ink);border-radius:20px;padding:8px;box-shadow:5px 6px 0 #24262218}
#accounts-view .filter-options button{display:block;width:100%;text-align:left;border:0;border-radius:12px;padding:15px 20px;font-size:17px;font-weight:600;white-space:normal;overflow-wrap:anywhere}
#accounts-view .filter-options button[aria-selected="true"]{background:#C5F294}
#accounts-view .filter-options button:hover,#accounts-view .filter-options button:focus-visible{background:#E6D4FF;outline:2px solid var(--ink);outline-offset:-2px}
@media(max-width:700px){.accounts-switch{margin-left:8px;padding:8px 14px;font-size:16px}.account-filter{min-width:0;max-width:none}.filter-options{max-width:calc((100vw - 42px)/2);min-width:100%;width:100%}#accounts-view .filter-options button{font-size:17px;padding:14px 10px}}
@media(prefers-reduced-motion:reduce){.accounts-switch{transition:none}}

.range-picker{position:relative;display:flex;flex-direction:column;gap:9px;font-size:17px;font-weight:650;min-width:0}
.range-control{display:flex;align-items:center;border:2px solid var(--ink);border-radius:12px;padding:4px 7px;min-height:49px;gap:0}
#accounts-view .date-part{border:0;border-radius:6px;font-size:17px;font-weight:650;padding:8px 2px;min-width:25px;touch-action:none;user-select:none;cursor:ns-resize;font-variant-numeric:tabular-nums}
#accounts-view .date-part:hover,#accounts-view .date-part.scrubbing{background:#E6D4FF}
#accounts-view .date-part:focus-visible{outline:2px solid var(--purple);outline-offset:-2px}
.date-separator{pointer-events:none}
#accounts-view .date-calendar-trigger{padding:6px;margin-left:6px;border:0;border-radius:8px;display:grid;place-items:center;cursor:pointer;min-width:32px;min-height:36px}
.date-calendar-trigger svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}
.date-calendar{position:absolute;z-index:45;top:calc(100% + 10px);width:320px;max-width:calc(100vw - 24px);padding:18px;border:3px solid var(--ink);border-radius:22px;background:var(--paper);box-shadow:5px 6px 0 #24262218}
.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}
.calendar-heading strong{text-transform:capitalize;font-size:19px;text-align:center}
#accounts-view .calendar-nav{border:2px solid var(--ink);padding:0;width:36px;height:36px;flex-shrink:0;border-radius:50%;font-size:26px;line-height:1;background:#E6D4FF;cursor:pointer}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.calendar-weekday{text-align:center;padding:5px 0 10px;color:var(--muted);font-size:14px}
#accounts-view .calendar-date{padding:0;border:0;border-radius:50%;aspect-ratio:1;font-size:17px;font-weight:600;cursor:pointer}
#accounts-view .calendar-date[aria-pressed="true"]{background:var(--purple);color:white}
#accounts-view .calendar-date:not(:disabled):hover{background:#C5F294;color:var(--ink)}
#accounts-view .calendar-date:focus-visible{outline:2px solid var(--ink);outline-offset:0}
#accounts-view .calendar-date:disabled,#accounts-view .calendar-nav:disabled{opacity:.25;cursor:default;background:transparent}
@media(max-width:700px){.range-control{padding:4px 3px}#accounts-view .date-part{font-size:16px;min-width:22px}#accounts-view .date-calendar-trigger{margin-left:auto;padding:3px;min-width:27px}}

@media(min-width:1100px){.accounts-filters{gap:14px}.account-filter{min-width:110px}}

.month-shortcut{min-width:180px}
.month-options{position:absolute;z-index:46;top:calc(100% + 10px);left:0;width:350px;max-width:calc(100vw - 30px);background:var(--paper);border:3px solid var(--ink);border-radius:22px;padding:16px;box-shadow:5px 6px 0 #24262218}
.month-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#accounts-view .month-grid button{border:0;border-radius:10px;padding:14px 4px;font-size:16px;font-weight:650;cursor:pointer}
#accounts-view .month-grid button[aria-pressed="true"]{background:#C5F294}
#accounts-view .month-grid button:hover,#accounts-view .month-grid button:focus-visible{background:#E6D4FF;outline:2px solid var(--ink);outline-offset:-2px}
@media(min-width:1100px){.accounts-filters{gap:12px}.account-filter{min-width:100px}.month-shortcut{min-width:170px}}
@media(max-width:700px){.month-shortcut{min-width:0}}

#accounts-view .calendar-nav{display:grid;place-items:center}
.calendar-nav svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:square;stroke-linejoin:miter;pointer-events:none}

/* Reusable patient labels: compact chips, shared colors and an inline editor. */
.patient-tags{grid-column:1/-1;border-top:1px solid var(--line);padding-top:10px;min-width:0}
.patient-tags-heading{font-size:14px;font-weight:650;margin-bottom:6px}
.patient-tag-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.patient-tags button,.tag-confirm button{font:inherit;color:var(--ink);cursor:pointer}
.patient-tag-chip{display:inline-flex;align-items:center;max-width:100%;min-width:0;border:1.5px solid var(--ink);border-radius:20px;background:var(--tag-color);overflow:hidden}
.patient-tag-chip button{border:0;background:transparent;font-size:14px;font-weight:600;min-height:30px;padding:5px 9px}
.patient-tag-chip .edit-patient-tag{min-width:0;overflow-wrap:anywhere;text-align:left}
.patient-tag-chip .detach-patient-tag{padding:6px;display:grid;place-items:center;flex:none}
.patient-tag-chip svg,.close-tag-panel svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.5}
.patient-tag-chip button:hover{background:#24262212}
.patient-tags .add-tag{width:32px;height:32px;display:grid;place-items:center;padding:0;border:1.5px solid var(--ink);border-radius:50%;font-size:25px;line-height:1;background:transparent}
.add-tag svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square;pointer-events:none}
.patient-tags .add-tag:hover,.patient-tags .add-tag[aria-expanded="true"]{background:#E6D4FF}
.tag-panel{margin-top:8px;border:2px solid var(--ink);border-radius:14px;padding:10px;background:var(--paper)}
.tag-panel header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.tag-panel h3{font-size:15px;margin:0;letter-spacing:-.3px}
.tag-panel .close-tag-panel{border:0;background:transparent;display:grid;place-items:center;width:28px;height:28px;padding:4px;flex:none}
.tag-catalog{max-height:132px;overflow-y:auto;margin-top:8px;padding:2px}
.tag-catalog-row{display:flex;align-items:center;gap:4px}
.tag-catalog-row .tag-choice{flex:1;min-width:0}
.tag-panel .edit-catalog-tag{display:grid;place-items:center;width:32px;height:32px;flex:none;padding:6px;border:0;border-radius:8px;background:transparent}
.edit-catalog-tag svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;pointer-events:none}
.tag-panel .edit-catalog-tag:hover{background:#E6D4FF}
.patient-editor .tag-choice{display:flex;align-items:center;gap:8px;padding:6px 4px;font-size:15px;cursor:pointer;border-radius:8px}
.tag-choice:hover{background:#E6D4FF}
.patient-editor .tag-choice input{appearance:none;-webkit-appearance:none;width:21px;height:21px;flex:none;padding:0;margin:0;border:1.5px solid var(--ink);border-radius:5px;cursor:pointer}
.tag-choice input:checked{background:var(--purple);box-shadow:inset 0 0 0 4px var(--paper)}
.tag-choice-dot{width:14px;height:14px;border:1px solid var(--ink);border-radius:50%;flex:none}
.tag-choice span:last-child{overflow-wrap:anywhere;min-width:0}
.tag-panel .new-tag{border:0;border-top:1px solid var(--line);background:transparent;font-size:15px;font-weight:600;text-align:left;padding:8px 0 0;margin-top:8px;width:100%}
.tag-panel .new-tag{overflow-wrap:anywhere}
.tag-panel .done-tags{display:block;margin:10px 0 0 auto;padding:7px 14px;border:1.5px solid var(--ink);border-radius:9px;background:#E6D4FF;font-size:15px;font-weight:600}
.tag-palette{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;margin:10px 0}
.tag-palette .tag-swatch{width:100%;max-width:32px;aspect-ratio:1;justify-self:center;border:1.5px solid var(--ink);border-radius:50%;padding:0;display:grid;place-items:center}
.tag-swatch[aria-pressed="true"]::after{content:'';width:10px;height:10px;background:var(--ink);border-radius:50%}
.tag-swatch:hover{transform:scale(.92)}
.tag-editor-actions{display:flex;gap:8px;align-items:center;justify-content:end}
.tag-editor-actions button{border:1.5px solid var(--ink);border-radius:9px;background:#E6D4FF;padding:7px 10px;font-size:14px;font-weight:600}
.tag-editor-actions .delete-tag{border:0;background:transparent;color:#a42e23;text-align:left;padding-left:0;margin-right:auto}
.tag-error{color:#a42e23;font-size:15px;margin:10px 0 0}
.tag-confirm{width:min(420px,calc(100% - 32px));padding:28px;border:3px solid var(--ink);border-radius:24px;background:var(--paper);color:var(--ink)}
.tag-confirm::backdrop{background:#24262255}
.tag-confirm h2{font-size:28px;letter-spacing:-.6px;margin:0 0 16px;overflow-wrap:anywhere}
.tag-confirm p{font-size:18px;line-height:1.5;margin:0 0 24px}
.tag-confirm>div{display:flex;justify-content:end;gap:12px}
.tag-confirm button{font-size:17px;border:2px solid var(--ink);border-radius:12px;padding:10px 16px;background:transparent}
.tag-confirm button[data-action="delete"]{background:#FCDEDE}
.tag-confirm button:hover{transform:scale(.96)}
.filter-tag-dot{display:inline-block;vertical-align:middle;width:15px;height:15px;border:1px solid var(--ink);border-radius:50%;margin-right:8px}
@container patient-editor (max-width:280px){
 .rate-field{grid-column:1/-1}
 .tag-palette{grid-template-columns:repeat(4,minmax(0,1fr))}
 .tag-editor-actions{flex-wrap:wrap}
}
@media(max-width:700px){.tag-confirm{padding:22px}}

/* Select outstanding sessions without changing the existing individual actions. */
.account-row{grid-template-columns:32px minmax(0,1fr) minmax(0,1fr) auto}
#accounts-view .account-check{display:grid;place-items:center;width:28px;height:28px;min-width:28px;padding:0;border:2px solid var(--ink);border-radius:6px;background:transparent;touch-action:none;user-select:none}
#accounts-view .account-check[aria-checked="true"],#accounts-view .account-check[aria-checked="mixed"]{background:#C5F294}
.account-check[aria-checked="true"]::after{content:'';width:10px;height:6px;border-left:2px solid var(--ink);border-bottom:2px solid var(--ink);transform:translateY(-2px) rotate(-45deg)}
.account-check[aria-checked="mixed"]::after{content:'';width:12px;border-top:2px solid var(--ink)}
#accounts-view .account-check:disabled{opacity:.25;cursor:default}
.account-check:focus-visible{outline:2px solid var(--purple);outline-offset:4px}
.account-row.selected{background:#C5F29433;border-radius:12px}
.account-selection{display:flex;align-items:center;flex-wrap:wrap;gap:16px;padding:18px 0 0}
.select-all-pending{display:flex;align-items:center;gap:8px;font-size:16px}
.account-selection [role="status"]{font-weight:650;margin-left:auto}
#accounts-view .collect-selected{background:#C5F294}
.account-check-space{width:28px}
@media(max-width:700px){.account-row{grid-template-columns:28px minmax(0,1fr) auto;gap:10px}.account-row>.account-check{grid-column:1;grid-row:1}.account-row>button:not(.account-check){grid-column:2/-1}.account-row strong{font-size:18px}.account-selection [role="status"]{margin-left:0}}
/* Keep the rows still when the first checkbox reveals the batch action. */
#accounts-view .collect-selected[hidden]{display:block;visibility:hidden}
.account-selection [role="status"]{min-width:180px;min-height:24px}

.summary-attendance{appearance:none;-webkit-appearance:none;flex:none;display:block;width:30px;height:30px;margin:0;border:2.5px solid var(--ink);border-radius:50%;background:transparent;cursor:pointer;transition:background-color 140ms ease}
.summary-attendance:checked{background:#C5F294}
.summary-attendance:disabled{cursor:default;opacity:.4}
.summary-attendance:focus-visible{outline:2px solid var(--purple);outline-offset:4px}
.summary-attendance-error{font-size:17px;line-height:1.4;padding:12px 0;color:var(--ink)}
@media(max-width:1000px){.summary-groups{grid-template-columns:1fr}}
@media(max-width:500px){.schedule-summary{padding:20px;width:calc(100% - 24px)}.summary-row-actions{gap:8px}.summary-time{font-size:24px}.summary-groups li{flex-wrap:wrap;gap:12px}.summary-row-actions{margin-left:auto}}
@media(prefers-reduced-motion:reduce){.summary-attendance{transition:none}}
/* Let Safari arbitrate both scroll axes and momentum from the first touch. */
.week-board{touch-action:pan-x pan-y pinch-zoom}

/* Denser daily view: seven half-hour rows in the existing timetable height. */
.day{--day-slot-height:clamp(44px,calc((min(454px,55dvh) - 54px)/7),58px)}
.day .schedule{height:calc(var(--day-slot-height)*7 + 54px)}
.day .slot{aspect-ratio:auto;height:var(--day-slot-height);min-height:var(--day-slot-height)}
.day .time{font-size:clamp(20px,5.5cqw,24px);letter-spacing:-1px}
.day .cell .schedule-token{width:min(70%,calc(var(--day-slot-height)*.72));font-size:clamp(14px,4cqw,18px);border-width:2px}
.day .attendance input.attendance-circle{width:26px;height:26px;border-width:2px}

/* Continuous days; the hour column and headings remain pinned. */
.week-board{user-select:none}
.week-row{grid-template-columns:72px repeat(var(--week-days,7),var(--week-day-width,72px));width:max-content;min-width:100%}
.week-hour{z-index:3}
.week-columns{z-index:4}
.week-swiping{cursor:grabbing}

/* The same patient form replaces the tray while editing from Week. */
.patient-editor.weekly-patient-editor{z-index:21;top:0;right:0;left:auto;transform:none;width:100%;max-width:360px}

/* Fit the landscape agenda to the usable viewport, including Safari's bars.
   Scroll the collections internally, so neither trash target leaves the screen. */
@media(min-width:701px) and (orientation:landscape) and (max-height:900px){
 .study:has(#accounts-view[hidden]){height:100dvh;display:flex;flex-direction:column;padding:16px 28px 12px}
 .study:has(#accounts-view[hidden]) .masthead{height:64px;min-height:64px;flex:none;align-items:center}
 .study:has(#accounts-view[hidden]) .wordmark{font-size:48px;letter-spacing:-2.5px}
 .study:has(#accounts-view[hidden]) .header-actions{margin-bottom:8px}
 .workspace{flex:1;min-height:0;margin-top:18px}
 .people{min-height:0}
 .section-label{font-size:14px;flex:none}
 .section-label .count{font-size:16px}
 .patient-grid{min-height:0;overflow-y:auto;overscroll-behavior:contain;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));grid-auto-rows:max-content;gap:22px 14px;margin-top:22px;padding:8px 0 12px}
 .patient-grid .token-large{width:64px;height:64px;font-size:24px}
 .patient-trash-area,.day .outside-frame{height:64px;min-height:64px;flex:none;padding:8px 12px 0}
 .patient-trash,.day .trash-zone{width:44px;height:44px;justify-content:center}
 .day{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) 64px}
 .day-heading{gap:6px 8px;padding-bottom:12px}
 .day-heading h1{font-size:clamp(28px,12cqw,46px)}
 .day-heading .date-number{font-size:clamp(44px,18cqw,68px)}
 .day-heading .eyebrow{font-size:clamp(11px,3.8cqw,15px)}
 .day .schedule-frame{min-height:0;container-type:size}
 .day .schedule{height:100%;max-height:none}
 .day .column-head{min-height:40px}
 .day .column-head>span{font-size:15px;padding:0 5px}
 .day .slot{--day-slot-height:max(32px,calc((100cqh - 46px)/7))}
 .day .time{font-size:clamp(18px,5cqw,22px)}
 .day .cell .schedule-token{width:min(62%,calc(var(--day-slot-height)*.72),48px)}
 .day .attendance input.attendance-circle{width:24px;height:24px}
 .patient-editor{top:36px;max-height:calc(100% - 44px)}
 .week-view{flex:1;min-height:0;margin-top:18px;display:flex;flex-direction:column}
 .week-heading{flex:none;margin-bottom:14px}
 .week-heading h1{font-size:44px;margin-top:4px}
 .week-heading .eyebrow{font-size:15px}
 .week-calendar{flex:1;min-height:0;display:flex;flex-direction:column}
 .week-board{flex:1;min-height:0;max-height:none}
 .week-patients{max-height:100%;padding:18px}
 .week-patients-heading{margin-bottom:12px}
 .week-patients h2{font-size:26px}
 .week-patient-grid{margin-top:12px}
 .patient-editor.weekly-patient-editor{max-height:100%}
}

/* Attendance and payments are independent; scope applies to the list and PDF. */
.account-scope{display:inline-flex;max-width:100%;border:2px solid var(--ink);border-radius:24px;overflow:hidden;margin:4px 0 20px}
#accounts-view .account-scope button{border:0;border-radius:0;background:transparent;padding:10px 18px;font-size:17px;font-weight:650;min-height:44px}
#accounts-view .account-scope button+button{border-left:2px solid var(--ink)}
#accounts-view .account-scope button[aria-pressed=true]{background:var(--purple);color:white}
#accounts-view .account-scope button:focus-visible{outline:3px solid var(--ink);outline-offset:-5px}
.account-row .account-attendance{display:flex;align-items:center;gap:7px;font-size:13px;margin-top:5px}
.account-attendance::before{content:"";width:12px;height:12px;border:1.5px solid var(--ink);border-radius:50%;flex-shrink:0}
.account-attendance.is-attended::before{background:#C5F294}

/* Shared tag catalog, available independently of any patient. */
.manage-tags{margin-right:auto;display:grid;place-items:center;width:44px;height:44px;padding:8px;border:0;border-radius:50%;background:transparent;color:var(--purple);cursor:pointer;touch-action:manipulation}
.manage-tags svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linejoin:round}
.manage-tags:hover{background:var(--fixed-slot);transform:scale(.96)}
.manage-tags:disabled{opacity:.4;cursor:default}
.manage-tags:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
.tag-manager{width:min(420px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;margin:auto;padding:20px;border:3px solid var(--ink);border-radius:24px;background:var(--paper);color:var(--ink)}
.tag-manager::backdrop{background:#24262255}
.tag-manager .patient-tags,.tag-manager .tag-panel{border:0;padding:0;margin:0}
.tag-manager .tag-panel h3{font-size:26px;letter-spacing:-.7px}
.tag-manager .tag-panel header{margin-bottom:18px}
.tag-manager input{width:100%;box-sizing:border-box;background:transparent;border:1.5px solid var(--ink);border-radius:10px;padding:10px;font:inherit;font-size:17px;color:var(--ink)}
.tag-manager label{display:grid;gap:7px;font-size:16px;font-weight:650}
.tag-manager .tag-catalog{max-height:35dvh;margin-top:12px}
.tag-manager .tag-choice{display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:10px 6px;font-size:17px;text-align:left;border-radius:8px}
.tag-manager .tag-choice:hover{background:#E6D4FF}
.tag-manager .tag-panel .close-tag-panel,.tag-manager .edit-catalog-tag{width:44px;height:44px}
.tag-manager .tag-palette{grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}
.tag-manager .tag-swatch{max-width:38px}
.tag-manager .tag-panel .new-tag,.tag-manager .done-tags,.tag-manager .tag-editor-actions button{font-size:16px;min-height:44px}

/* Public jitdeflou-app palette. Geometry and gesture states come from Gaby v2. */
:root { --paper:#fffdf6; --ink:#272a26; --purple:#c00068; --fixed-token:#119ea8; --fixed-slot:#e2f4f5; --single-token:#b13c74; --single-slot:#fbe8f1; --coral:#e4007c; --muted:#62675e; --line:#daddcf; font-family:Outfit,"Helvetica Neue",Helvetica,Arial,sans-serif; }
html.patient-held,html.schedule-outside { --paper:#f1f5e8; }
.wordmark { letter-spacing:-1px; font-size:27px; color:#b80063; }
.patient-interactive:focus-visible { outline:3px solid #119ea8; outline-offset:4px; }
/* Mouse/touch releases retain focus for continuity, but never add a keyboard halo. */
:root[data-input-modality="pointer"] :is(button,[role="button"]):focus { outline:none !important; }
@media(max-width:700px) { .wordmark { font-size:22px; } }

#connection-message:empty { display:none; }
#connection-message { font-size:13px; color:#9a312c; }

/* Keep long example names inside the native masthead. */
.masthead .wordmark { max-width:55%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; }
.accounts-switch { background:#eaf0e2; }

/* Keep each drop target in its original lower-right column footer. */
@media (min-width:701px) {
  .patient-trash, .day > .outside-frame .trash-zone {
    display:grid; place-items:center; width:44px; height:44px; flex-shrink:0;
  }
}

/* Visible local feedback for a blocked attendance change. */
.attendance-notice {
  position:fixed; z-index:1000; width:min(360px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px); overflow:auto; padding:20px;
  border:2px solid var(--purple); border-radius:18px;
  background:#fff0f7; color:var(--ink); box-shadow:0 8px 28px #6d174b30;
  font-size:18px; line-height:1.45; text-align:left;
}
.attendance-notice[hidden] { display:none; }
.attendance-notice > strong { display:block; padding-right:34px; font-size:20px; line-height:1.2; color:#990053; }
.attendance-notice > p { margin:12px 0 0; }
.attendance-notice-close {
  position:absolute; top:8px; right:8px; width:44px; height:44px;
  display:grid; place-items:center; border:0; border-radius:50%;
  background:transparent; color:#990053; font:inherit; font-size:30px; cursor:pointer;
}
.attendance-notice-close:hover { background:#ffd8ec; }
.attendance-notice-close:focus-visible { outline:3px solid var(--purple); outline-offset:2px; }

/* The examples banner belongs to the patient column, below its token tray. */
.development-note {
  position:relative; align-self:center; flex:none; width:min(340px,100%);
  margin:24px auto 16px; padding:20px 52px 20px 22px;
  border-radius:16px; background:#119ea8; color:white;
  font-size:24px; font-weight:700; line-height:1.25; text-wrap:balance;
}
.development-note[hidden] { display:none; }
.development-note p { margin:0; }
.development-note button {
  position:absolute; top:10px; right:6px; width:44px; height:44px;
  display:grid; place-items:center; border:0; border-radius:8px;
  background:transparent; color:white; font:inherit; font-size:30px; cursor:pointer;
}
.development-note button:hover { background:#ffffff26; }
.development-note button:focus-visible { outline:3px solid white; outline-offset:2px; }

/* Use the open lower part of the column while keeping its controls separate. */
@media (min-width:701px) {
  .people:has(.development-note:not([hidden])) .patient-grid { margin-bottom:24px; }
  .development-note { margin-top:auto; margin-bottom:clamp(24px,7dvh,56px); }
  .people:has(.development-note:not([hidden])) > .patient-trash-area { margin-top:0; }
}
