.clinician-toolbar{margin:0 0 30px;border:1px solid #e1d4e8;border-radius:14px;padding:22px;background:linear-gradient(120deg,#f2eaf6,#fcfafc);display:flex;justify-content:space-between;align-items:center;gap:20px}.tools-eyebrow{font-size:11px;color:#80658e;letter-spacing:.6px}.clinician-toolbar p{margin:5px 0 0;font-size:16px}.tools-actions,.card-tools,.detail-tools{display:flex;flex-wrap:wrap;gap:8px}.tools-actions button,.card-tools button,.detail-tools button,.tool-body button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 13px;border:1px solid #ded0e6;border-radius:9px;background:#fff;color:#654774;font:inherit;font-size:12px;cursor:pointer;line-height:1.6}.tools-actions svg,.card-tools svg,.detail-tools svg,.tool-body button svg,.region-options svg{width:18px;height:18px;flex-shrink:0}.card-tools{padding:0 14px 16px}.card-tools button{flex:1;font-size:12px;padding:8px}.card-tools button[aria-pressed=true]{background:#654774;color:#fff;border-color:#654774}.detail-tools{padding:0 26px 20px}.detail-tools button:first-child,.tool-body .tool-primary{background:#654774;color:#fff;border-color:#654774}.clinician-dialog{width:min(940px,94vw);max-width:94vw;max-height:92dvh;padding:0;border:1px solid #dfd2e6;border-radius:18px;background:#fcfafc;color:#392840;overflow:auto}.clinician-dialog::backdrop{background:#28192c88;backdrop-filter:blur(4px)}.tool-head{position:sticky;top:0;z-index:2;background:#fcfafc;display:flex;justify-content:space-between;padding:18px 26px;border-bottom:1px solid #e5dbe8;margin:0;max-width:none}.tool-head span{font-size:9px;letter-spacing:1.5px;color:#927a9b}.tool-head h2{font-size:22px;margin:4px 0 0}.tool-head button{width:40px;height:40px;border:1px solid #dfd2e6;border-radius:50%;background:#f4edf7;color:#654774;font-size:24px;cursor:pointer}.tool-body{padding:24px}.tool-intro,.tool-empty{font-size:14px;color:#796980;line-height:1.9}.mini-product{display:flex;align-items:center;gap:18px}.mini-product img{width:66px;height:90px;object-fit:contain}.mini-product b{font-size:12px;color:#876997}.mini-product h3{font-size:17px;line-height:1.5;margin:4px 0;font-family:Georgia,serif;text-align:start}.plan-entry,.saved-product,.patient-product{border:1px solid #e4d8ea;border-radius:13px;background:#fff;padding:22px;margin-bottom:18px}.entry-controls{display:flex;gap:8px;justify-content:flex-end;margin:4px 0 14px}.plan-field{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#72577f;margin:12px 0}.plan-field input,.plan-field textarea,.share-fallback{box-sizing:border-box;width:100%;border:1px solid #ddd0e5;border-radius:8px;background:#fcfafc;padding:12px;color:#392840;font:inherit;font-size:14px;line-height:1.8}.plan-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.plan-caution{border-inline-start:3px solid #b096bf;padding:12px 15px;background:#f7f1f9;color:#6a5075;font-size:13px;line-height:1.8}.local-note{font-size:12px;color:#88768f;line-height:1.8}.tool-body button:disabled{opacity:.4;cursor:not-allowed}.plan-brand{text-align:center;padding:5px 0 24px}.plan-brand img{width:130px;height:60px;object-fit:contain}.plan-brand p{font-size:13px;color:#8a7394}.patient-product{position:relative}.patient-product>p{font-size:15px;line-height:1.9;white-space:pre-line}.step-number{position:absolute;inset-inline-end:20px;top:18px;font:24px Georgia;color:#b5a1c0}.patient-tags{display:flex;gap:9px;flex-wrap:wrap}.patient-tags span{padding:8px 12px;background:#f4edf7;border-radius:7px;font-size:12px}.patient-tags b{margin-inline-end:6px}.review-confirm{display:flex;align-items:center;gap:10px;font-size:13px;margin:20px 0}.review-confirm input{width:20px;height:20px;accent-color:#654774;flex-shrink:0}.compare-scroll{overflow-x:auto}.compare-scroll table{border-collapse:collapse;width:100%;min-width:650px;font-size:13px}.compare-scroll th,.compare-scroll td{border:1px solid #e5dbe8;padding:17px;vertical-align:top;text-align:start;min-width:180px}.compare-scroll tbody th{min-width:115px;background:#f3edf6;font-weight:500}.compare-scroll .mini-product{flex-direction:column;align-items:flex-start;gap:8px}.compare-scroll td p{margin:0 0 8px;line-height:1.8}.region-options{display:grid;gap:12px;margin-top:20px}.region-options a{display:flex;align-items:center;gap:12px;padding:17px;border:1px solid #ddcfe5;border-radius:10px;text-decoration:none;color:#654774;background:#f5eef8}.plan-dock{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:20;width:min(500px,calc(100% - 32px));padding:12px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid #d8c8e1;box-shadow:0 8px 35px #39284025;border-radius:13px;box-sizing:border-box;font-size:13px}.plan-dock[hidden]{display:none}.plan-dock b{padding:3px 9px;background:#efe5f4;border-radius:6px;margin-inline-start:5px}.plan-dock button{border:0;border-radius:8px;padding:12px;background:#654774;color:white;font:inherit;cursor:pointer}.has-plan{padding-bottom:90px}.tool-toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);z-index:100;color:white;background:#50375e;border-radius:9px;padding:12px 20px;max-width:85vw;font-size:13px;pointer-events:none;opacity:0;transition:opacity .2s}.tool-toast.visible{opacity:1}button:focus-visible,.region-options a:focus-visible{outline:2px solid #8c65a1;outline-offset:3px}@media(max-width:600px){.clinician-toolbar{padding:18px;display:block}.clinician-toolbar .tools-actions{margin-top:15px}.clinician-toolbar .tools-actions button{flex:1;font-size:11px;padding:8px}.tool-head{padding:16px}.tool-head h2{font-size:19px}.tool-body{padding:16px}.plan-entry,.patient-product,.saved-product{padding:16px}.plan-fields{grid-template-columns:1fr;gap:0}.plan-field input,.plan-field textarea{font-size:16px}.detail-tools{padding:0 18px 18px}.detail-tools button{flex:1;min-width:140px}.mini-product h3{font-size:15px}.plan-dock{bottom:12px}.compare-scroll th,.compare-scroll td{padding:12px}}
@media print{body>*:not(.clinician-dialog){display:none!important}.clinician-dialog[open]{position:static!important;display:block!important;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;overflow:visible!important;border:0!important;margin:0!important;padding:0!important;box-shadow:none!important}.clinician-dialog::backdrop{display:none}.tool-head{position:static}.tool-head button,.sharing-controls{display:none!important}.tool-body{padding:0}.patient-product{break-inside:avoid}.patient-plan{color:#222}body.has-plan{padding:0}html,body{height:auto!important;overflow:visible!important}.clinician-dialog .tool-head{border-bottom:1px solid #ddd}}

.plan-brand img{display:block;margin:0 auto}.routine-names{display:grid;grid-template-columns:1fr 1fr;gap:16px}.routine-picker{border:1px solid #ded0e6;background:#f5eff8;border-radius:12px;padding:18px;margin:14px 0 22px}.routine-picker h3{font-size:16px;margin:0 0 12px}.routine-picker select{font:inherit;font-size:15px;padding:13px;background:#fff;color:#50375e;border:1px solid #d9c8e2;border-radius:8px;width:100%;min-width:0}.patient-names{border-top:1px solid #e5dbe8;padding-top:14px;margin-bottom:20px;font-size:14px}.clinician-toolbar .tools-actions [data-tool="plan-view"]{background:#654774;color:white}.plan-fields{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.routine-names,.plan-fields{grid-template-columns:1fr;gap:0}.routine-picker select{font-size:16px}.clinician-toolbar .tools-actions [data-tool="plan-view"]{flex-basis:100%}}

.detail-tools .routine-added-button{background:#eee5f4!important;border-color:#c7b0d2!important;color:#624370!important;opacity:1;cursor:default}.detail-tools .routine-added-button svg{width:19px;height:19px}.detail-tools .routine-detail-feedback{flex-basis:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;border:1px solid #ddcde5;border-radius:10px;background:#f7f2fa;color:#654774}.routine-detail-feedback p{font-size:13px;line-height:1.7;margin:0}.detail-tools .routine-detail-feedback button{flex:none;background:#654774;color:white;border-color:#654774;min-height:42px}.detail-tools .routine-detail-feedback button svg{width:17px;height:17px}@media(max-width:600px){.detail-tools .routine-detail-feedback{flex-wrap:wrap}.detail-tools .routine-detail-feedback button{width:100%;min-width:0}}

/* A single tray prevents the comparison and routine controls overlapping. */
.plan-dock{display:flex;flex-direction:column;align-items:stretch;gap:0;width:min(700px,calc(100% - 24px));padding:10px 14px}.dock-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 0;min-width:0}.dock-row+.dock-row{border-top:1px solid #e5dbe8;margin-top:8px;padding-top:12px}.compare-dock-summary{display:flex;align-items:center;gap:9px;flex:1;min-width:0;font-size:13px;line-height:1.6}.compare-dock-summary svg{width:21px;height:21px;flex:none;color:#654774}.plan-dock .dock-clear{background:#f3edf6;color:#765583;border:1px solid #e0d3e6;border-radius:50%;width:32px;height:32px;min-height:32px;padding:0;font-size:22px;line-height:1;flex:none}.dock-row>button:not(.dock-clear){white-space:nowrap;min-height:44px}.has-two-dock-rows{padding-bottom:170px}.card-tools button{font-size:13px;min-height:46px}.card-tools button[aria-pressed=true]{box-shadow:0 3px 9px #65477420}.card-tools button svg{width:20px;height:20px}@media(max-width:600px){.comparison-dock-row{flex-wrap:wrap;gap:8px}.compare-dock-summary{flex:1 1 calc(100% - 45px);font-size:12px}.comparison-dock-row .dock-clear{order:1}.comparison-dock-row [data-tool="compare-view"]{order:2;flex:1 1 100%}.has-plan{padding-bottom:155px}.has-two-dock-rows{padding-bottom:225px}.card-tools button{font-size:12px;padding:9px 6px}.plan-dock{bottom:10px}}

.routine-editor-actions{display:flex;justify-content:flex-end;margin-bottom:10px}.tool-body button.clear-routine{color:#855366;border-color:#e5d3da;background:#faf5f7;font-size:12px;gap:8px}.clear-routine svg{width:17px;height:17px}.tool-body button.clear-routine:hover{background:#f2e6eb;border-color:#c9a6b3}.routine-clear-confirm{padding:10px 0 20px}.routine-clear-confirm p{font-size:15px;line-height:1.9;margin:0 0 24px}.routine-clear-confirm .tools-actions{gap:12px}@media print{.routine-editor-actions,.routine-clear-confirm{display:none!important}}

/* Patient handout: restrained typography and clear, printable hierarchy. */
.patient-plan{background:#fff;color:#35283b;padding:28px;border:1px solid #e9e1ed;border-radius:14px}
.patient-plan .plan-brand{display:flex;align-items:center;justify-content:space-between;gap:28px;text-align:start;padding:0 0 22px;border-bottom:2px solid #91739e}
.patient-plan .plan-brand img{width:120px;height:62px;object-fit:contain;margin:0}
.patient-plan .plan-brand h2{font-size:24px;line-height:1.4;margin:5px 0;color:#4b2856}
.patient-plan .plan-brand p{font-size:13px;line-height:1.6;margin:0;color:#766a7d}
.plan-eyebrow{font:9px/1.5 sans-serif;letter-spacing:1.8px;color:#89758f}
.patient-plan .patient-names{display:flex;flex-wrap:wrap;gap:14px 32px;margin:0 0 24px;padding:15px 0;border:0;border-bottom:1px solid #e9e1ed}
.patient-names:empty{display:none!important}.patient-plan .patient-names p{margin:0;flex:1;min-width:180px;font-size:15px}
.patient-plan .patient-names b{color:#786380;font-weight:500;margin-inline-end:8px}
.patient-plan .patient-product{position:relative;border:1px solid #e5dce9;border-radius:12px;padding:20px;margin:0 0 20px;box-shadow:none}
.patient-product-heading{display:flex;align-items:center;gap:16px;padding-bottom:12px;border-bottom:1px solid #eee7f1}
.patient-plan .step-number{position:static;flex:none;align-self:flex-start;font:20px/1.4 Georgia,serif;color:#92799e;min-width:28px}
.patient-product-heading .mini-product{flex:1;gap:20px;margin:0;min-width:0}
.patient-product-heading .mini-product img{width:65px;height:85px;object-fit:contain;flex:none}
.patient-product-heading .mini-product b{display:inline-block;border:1px solid #e2d6e8;border-radius:5px;padding:2px 9px;font:12px/1.5 sans-serif;color:#745681}
.patient-product-heading .mini-product h3{font:19px/1.35 Georgia,serif;margin:7px 0 0;overflow-wrap:anywhere}
.patient-instructions{padding:13px 0}.patient-instructions h4{font-size:13px;font-weight:600;color:#71557e;margin:0 0 5px}
.patient-instructions p{font-size:16px;line-height:1.8;white-space:pre-line;margin:0;overflow-wrap:anywhere}
.patient-plan .patient-tags{display:flex;gap:10px;flex-wrap:wrap;margin:0}
.patient-plan .patient-tags .patient-tag{flex:1;min-width:120px;border:1px solid #ede5f0;background:#faf7fb;border-radius:7px;padding:9px 12px;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.patient-plan .patient-tags b{display:block;font-size:12px;font-weight:500;color:#7c6587;margin-bottom:2px}
.patient-plan .plan-caution{font-size:13px;line-height:1.7;background:transparent;border-inline-start:2px solid #aa8bb5;padding:5px 12px;margin:14px 0 0;white-space:pre-line}
.patient-plan .patient-note{background:#fcfafc;border-style:dashed}.patient-note h3{font-size:15px;margin:0 0 8px}.patient-plan .patient-product:last-child{margin-bottom:0}
@media screen and (max-width:600px){.patient-plan{padding:16px}.patient-plan .plan-brand{gap:14px}.patient-plan .plan-brand img{width:85px}.patient-plan .plan-brand h2{font-size:20px}.plan-eyebrow{font-size:7px;letter-spacing:1px}.patient-plan .patient-product{padding:15px}.patient-product-heading{gap:9px}.patient-product-heading .mini-product{gap:12px}.patient-product-heading .mini-product h3{font-size:17px}.patient-product-heading .mini-product img{width:48px;height:72px}.patient-instructions p{font-size:15px}}
@page{size:A4;margin:14mm 15mm}
@media print{
 html,body,body.has-plan,body.has-two-dock-rows{margin:0!important;padding:0!important;background:#fff!important;color:#35283b}
 .clinician-dialog[open]{background:#fff!important;border-radius:0!important;inset:auto!important}
 .clinician-dialog .tool-head,.sharing-controls{display:none!important}
 .clinician-dialog .tool-body{margin:0!important;padding:0!important}
 .patient-plan{padding:0;border:0;border-radius:0;background:#fff;font-size:11pt;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .patient-plan .plan-brand{padding-bottom:5mm;gap:10mm;break-inside:avoid;break-after:avoid}
 .patient-plan .plan-brand img{width:31mm;height:16mm}
 .patient-plan .plan-brand h2{font-size:19pt;margin:1mm 0}
 .patient-plan .plan-brand p{font-size:10pt}.plan-eyebrow{font-size:7pt}
 .patient-plan .patient-names{padding:4mm 0;margin-bottom:5mm;break-inside:avoid;break-after:avoid}
 .patient-plan .patient-names p{font-size:11pt}
 .patient-plan .patient-product{padding:4.5mm;margin-bottom:5mm;border-radius:3mm;break-inside:avoid;page-break-inside:avoid}
 .patient-product-heading{padding-bottom:3mm;gap:4mm;break-after:avoid}
 .patient-product-heading .mini-product img{width:16mm;height:21mm}
 .patient-product-heading .mini-product h3{font-size:14pt}.patient-product-heading .mini-product b{font-size:9pt}
 .patient-plan .step-number{font-size:16pt;min-width:7mm}
 .patient-instructions{padding:3mm 0}.patient-instructions h4{font-size:10pt;break-after:avoid}
 .patient-instructions p{font-size:11.5pt;line-height:1.65;orphans:3;widows:3}
 .patient-plan .patient-tags{gap:3mm}.patient-plan .patient-tags .patient-tag{font-size:10.5pt;padding:2mm 3mm;min-width:30mm}.patient-plan .patient-tags b{font-size:9pt}
 .patient-plan .plan-caution{font-size:10pt;line-height:1.6;margin-top:3mm}
 .patient-note h3{font-size:11pt}.patient-plan .patient-note>p{font-size:11pt;line-height:1.65}
}

.patient-product-heading{display:table;width:100%;border-spacing:0;table-layout:fixed}
.patient-product-heading .step-number{display:table-cell;width:38px;vertical-align:top}
.patient-product-heading .mini-product{display:table;width:100%;table-layout:fixed;border-spacing:12px 0}
.patient-product-heading .mini-product img{display:table-cell;vertical-align:middle}
.patient-product-heading .mini-product>div{display:table-cell;vertical-align:middle;width:auto}
.patient-product-heading .mini-product{direction:ltr;text-align:left}
.patient-plan .patient-tags .patient-tag>div{display:block;margin:0;padding:0;border:0;background:none}
@media print{.patient-product-heading .step-number{width:9mm}.patient-product-heading .mini-product{border-spacing:4mm 0}.patient-product-heading .mini-product img{width:16mm}.patient-product-heading .mini-product>div{width:125mm}}

.patient-product-heading .mini-product>.routine-product-image{width:65px;vertical-align:middle}
.patient-product-heading .mini-product>.routine-product-name{width:auto}
.patient-product-heading .routine-product-image img{display:block}
@media screen and (max-width:600px){.patient-product-heading .mini-product>.routine-product-image{width:48px}.patient-product-heading .mini-product{border-spacing:6px 0}.patient-product-heading .step-number{width:25px}}
@media print{.patient-product-heading .mini-product>.routine-product-image{width:16mm}.patient-product-heading .mini-product>.routine-product-name{width:auto}}

.tool-intro,.tool-empty,.local-note{color:#6d5c76}
.plan-caution{white-space:pre-line;color:#62456f}
.plan-caution strong{display:block;font-size:inherit;line-height:1.6;color:#50305d;margin-bottom:7px;white-space:normal}
.routine-date{font-size:13px;color:#6d5c76;margin:14px 0 0;text-align:start}
@media print{.routine-date{font-size:9.5pt;margin:3mm 0 0;break-after:avoid}.plan-caution strong{font-size:10pt}}
@page{@bottom-center{content:counter(page) " / " counter(pages);direction:ltr;unicode-bidi:isolate;font:9pt sans-serif;color:#705f79}}
