:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#182237;background:#fff;color-scheme:light}*{box-sizing:border-box}body{margin:0}main{max-width:720px;margin:auto;padding:18px 22px calc(30px + env(safe-area-inset-bottom))}header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:32px}header strong{font-size:15px}.tag{font-size:10px;color:#637189;background:#f1f4f8;padding:4px 7px;border-radius:5px}h1{font-size:29px;letter-spacing:-.8px;margin:15px 0}h2{font-size:18px;margin:0 0 14px}.muted{color:#637189;font-size:13px;line-height:1.65}.local-label{font-size:13px;margin:20px 0;color:#3b6479}button,input,select{font:inherit}button{min-height:46px;border:1px solid #e0e6ef;border-radius:10px;background:#f5f7fa;color:#182237;cursor:pointer;padding:12px 15px;font-size:14px;font-weight:550}button:disabled{opacity:.55;cursor:default}.primary{background:#1674ef;color:white;border-color:#1674ef}.large{display:flex;justify-content:center;align-items:center;width:100%;min-height:60px;font-size:17px;margin-bottom:10px;gap:12px}.light{background:#e7f1ff;border-color:#d7e8ff;color:#145bb7}.pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.rescue{background:#fff0f2;color:#b52e49;border-color:#ffe0e8}.text{background:none;border:0;color:#1264d4;padding:8px 0}.sectionhead{display:flex;justify-content:space-between;align-items:center;gap:14px}.sectionhead h2{margin:0}.panel{border:1px solid #e6ebf2;border-radius:12px;padding:20px;margin:22px 0}.row{padding:15px 0;border-bottom:1px solid #e8ecf2;overflow-wrap:anywhere}.row:last-child{border:0}.row strong{font-size:15px}.row p{font-size:13px;line-height:1.6;margin:5px 0;white-space:pre-wrap}.row small{font-size:11px;color:#637189}.tools{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}label{display:block;font-size:13px;margin:16px 0}input,select{display:block;margin-top:8px;width:100%;padding:12px;border:1px solid #d5dfea;border-radius:8px;font-size:16px;background:white;color:#182237}dialog{max-width:460px;width:calc(100% - 28px);border:0;border-radius:16px;padding:24px;max-height:90dvh;overflow:auto}dialog::backdrop{background:#15253d88}[hidden]{display:none!important}#message,#private-message,#form-error{font-size:14px;line-height:1.6;white-space:pre-wrap}#form-error{color:#a42134}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #8bbfff;outline-offset:2px}@media(max-width:380px){main{padding:14px}header{align-items:flex-start}header>.text{max-width:120px;text-align:right;font-size:12px}.large{font-size:16px}.panel{padding:16px}.sectionhead>.text{font-size:12px}}@media print{header,#capture,#back,#login-form,.tools,#private-message{display:none!important}#notebook,#private-view{display:block!important}.row{break-inside:avoid}main{max-width:none;padding:0}}

textarea{display:block;width:100%;font:inherit;font-size:16px;padding:12px;border:1px solid #d5dfea;border-radius:8px;min-height:90px;margin-top:8px;resize:vertical}summary{cursor:pointer;font-weight:600;line-height:1.6}details>details{padding:12px 0;border-top:1px solid #e6ebf2}.check{display:flex;gap:10px;align-items:flex-start;line-height:1.6}.check input{width:20px;min-width:20px;margin:3px 0}#med-edit-error{color:#a42134}#med-section .panel{padding:14px}#med-reminders{border-color:#e5ba66;background:#fff9ec}

#med-history-list pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}

#history-list pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}#history-list summary{font-size:14px}#history-import-progress{white-space:pre-wrap;line-height:1.6}

.danger{color:#a42134}.danger-button{background:#a42134;border-color:#a42134;color:#fff}#delete-preview{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}#delete-error{color:#a42134}

#care-patient dl{display:grid;gap:14px}#care-patient dt{font-size:12px;color:#637189}#care-patient dd{margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}#care-section h3{font-size:16px;margin:22px 0 12px}.care-text{white-space:pre-wrap;overflow-wrap:anywhere}fieldset{border:1px solid #e0e6ef;border-radius:10px;margin:14px 0;padding:14px}legend{font-size:14px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin-top:14px}.calendar-grid .weekday{text-align:center;font-size:11px;color:#637189;padding:7px 0}.calday{min-height:47px;padding:6px 2px;font-size:13px}.calday small{display:block;font-size:10px;color:#1264d4}.calday.outside{opacity:.45}.calday.today{border-color:#1674ef}.calday.selected{background:#1674ef;color:#fff}.calday.selected small{color:#fff}#care-history-list pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}#care-profile-error,#care-measurement-error,#care-appointment-error,#care-import-error{color:#a42134;line-height:1.6}#care-current-measurements .panel{padding:12px;min-width:0}#care-current-measurements h3{margin-top:0}#care-current-measurements button{margin-top:12px}#open-patient,#open-appointments{font-size:14px;min-height:52px;margin-bottom:0}

.dose-row{display:grid;grid-template-columns:1fr 75px 1fr 90px;gap:8px;align-items:end;min-width:0}.dose-row label{margin:0;min-width:0}.dose-row input,.dose-row select{padding:10px 7px;min-width:0}.dose-row button{grid-column:1/-1;justify-self:end;min-height:30px}.draft-dose{padding:14px;background:#fff9ec;border:1px solid #f0dfb6;border-radius:10px;margin-top:14px}.draft-dose p{white-space:pre-wrap;line-height:1.6;font-size:14px}#dose-review-dialog{max-width:620px}#dose-review-dialog .panel{padding:14px}#dose-review-error{color:#a42134;line-height:1.6}#med-list .panel>p{white-space:pre-wrap;line-height:1.6}@media(max-width:400px){.dose-row{grid-template-columns:minmax(70px,1fr) 65px minmax(65px,1fr) 75px;gap:5px}.dose-row input,.dose-row select{padding:9px 4px}}

.notebook-cover{margin:24px 0}.notebook-cover h2{font-size:22px;letter-spacing:-.5px;margin-bottom:7px}.notebook-cover .muted{margin:0}.notebook-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.notebook-tile{min-height:150px;background:#fff;border:1px solid #e2e8f0;padding:20px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:8px;box-shadow:0 2px 5px #18223704}.notebook-tile strong{font-size:16px;line-height:1.3}.notebook-tile>span:last-child{font-size:12px;color:#637189;font-weight:400;line-height:1.4}.tile-mark{font-size:24px;color:#1674ef;line-height:1;margin-bottom:8px}.notebook-tile:hover{background:#f8fbff;border-color:#b6d3fc}.version-label{color:#637189;font-size:11px;margin:24px 0}#notebook-subnav{margin:12px 0 24px}#med-section,#care-section{margin-top:10px}.recorder-settings{display:block;margin:25px auto 0}#settings-workspace>details{margin:20px 0}#settings-message{font-size:14px;line-height:1.6;white-space:pre-wrap}#report-summary h3{margin-top:26px}.chart-row{display:grid;grid-template-columns:85px 1fr 32px;gap:10px;align-items:center;margin:8px 0;font-size:12px}.chart-track{height:10px;background:#eef2f7;border-radius:4px;overflow:hidden}.chart-bar{height:100%;background:#1674ef;min-width:0}.chart-row strong{text-align:right;font-size:12px}.print-only{display:none}#report-summary p{white-space:pre-wrap;line-height:1.6}#report-message{font-size:14px;line-height:1.6}@media(max-width:400px){.notebook-grid{gap:10px}.notebook-tile{padding:15px;min-height:145px}.notebook-tile strong{font-size:15px}.notebook-cover h2{font-size:20px}}@media print{@page{size:A4;margin:14mm}body.printing-report>main{display:none!important}body.printing-report>#report-print-output{display:block!important;font:11pt Arial,sans-serif;color:#182237}#report-print-output h1{font-size:20pt}#report-print-output h2{font-size:16pt;margin-top:18px}#report-print-output h3{font-size:12pt;margin-top:18px}#report-print-output .muted{font-size:9pt;color:#555}#report-print-output .row{break-inside:avoid}#report-print-output .row p{font-size:10pt}#report-print-output .panel{border:0;padding:0}#report-print-output .chart-row{break-inside:avoid;margin:5px 0}#report-print-output .chart-bar{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

#med-section>h2,#reports-workspace>h2,#events-workspace>h2{display:none}

.med-graph-markers{display:flex;flex-wrap:wrap;gap:4px;min-height:26px;align-items:center;justify-content:center}.med-marker{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;text-decoration:none;width:24px;height:24px;border-radius:5px;background:#193d4d;color:#fff!important;font-size:18px!important;font-weight:700}.med-marker.stop{background:#8d4439}.med-marker.change{width:15px;height:15px;border-radius:50%;font-size:15px!important;background:#306d69}.med-marker.planned{background:white;color:#193d4d!important;border:2px dashed currentColor}.med-marker.change.planned{border-width:1px}.med-graph-key>div{display:flex;align-items:center;gap:9px;padding:7px 0;font-size:12px;break-inside:avoid}.med-graph-key .major-change{font-weight:700}.med-graph-key{margin-top:14px}@media print{.med-marker{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

.chart-row-markers{margin:3px 0 12px 0}.chart-row-markers>div{display:flex;align-items:center;gap:8px;margin:4px 0;font-size:12px}.chart-row-markers .major-change{font-weight:700}

.med-daily-chart{overflow-x:auto;max-width:100%}.med-daily-chart svg{display:block;font-family:Arial,sans-serif;max-width:none}@media print{.med-daily-chart{overflow:visible}.med-daily-chart svg{width:100%;height:auto;max-width:100%;print-color-adjust:exact;-webkit-print-color-adjust:exact}}

/* Dedicated A4 chart sheets: 31 daily bars remain readable; hourly rows stay together. */
@media print{
 #report-print-output .report-graph-page{break-before:page;break-inside:avoid;page-break-before:always;page-break-inside:avoid;padding:0;margin:0}
 #report-print-output .report-graph-page h2{font-size:16pt;margin:0 0 3mm}
 #report-print-output .report-graph-page h3{font-size:11pt;margin:0 0 3mm}
 #report-print-output .report-graph-page .graph-page-range{font-size:10pt;margin:0 0 4mm}
 #report-print-output .report-graph-page .report-chart{break-inside:avoid;margin:0 0 5mm;padding:0;border:0}
 #report-print-output .report-graph-page .med-daily-chart svg{width:100%;height:auto;max-height:90mm;max-width:100%}
 #report-print-output .report-graph-page .muted{font-size:8pt;line-height:1.25;margin:2mm 0}
 #report-print-output .report-graph-page .chart-row{display:flex;gap:3mm;align-items:center;height:3.4mm;margin:0;font-size:8pt;line-height:1}
 #report-print-output .report-graph-page .chart-row>span{width:18mm;flex:none}
 #report-print-output .report-graph-page .chart-track{flex:1;height:2mm}
 #report-print-output .report-graph-page .chart-row strong{width:10mm;flex:none;font-size:8pt}
}

.review-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.review-heading h2{margin:0}.review-actions{display:grid;gap:.6rem;margin:1rem 0}.planned-dose{font-size:1.15rem;font-weight:600}#med-due-dialog{max-height:85dvh;overflow-y:auto}#med-due-edit-fields{margin:1rem 0}
.simple-med-dialog{width:min(680px,calc(100vw - 24px));max-height:92dvh}.simple-dose-row{display:grid;grid-template-columns:1fr 85px;gap:10px;border:1px solid #d8e1ec;border-radius:14px;margin:14px 0;padding:14px}.simple-dose-row label{margin:0}.simple-dose-row label:nth-of-type(2),.simple-dose-row label:nth-of-type(3){grid-column:1 / -1}.simple-med-dialog pre{white-space:pre-wrap;font-family:inherit}.med-overview p{margin:6px 0}.simple-med-dialog details{margin:18px 0}.simple-med-dialog summary{cursor:pointer;font-weight:600}.simple-med-dialog .error{color:#a82222}

@media print{#report-print-output .report-medications{break-before:page;page-break-before:always}}

.meeting-dialog{width:min(94vw,700px);max-height:90dvh;overflow:auto}.meeting-photo{display:block;max-width:100%;max-height:340px;object-fit:contain;margin:12px 0}.meeting-dialog audio{display:block;max-width:100%;margin:12px 0}.meeting-dialog textarea{width:100%;white-space:pre-wrap}.meeting-dialog .row a{display:inline-block;padding:12px}.meeting-dialog button{margin:5px 4px 5px 0}#care-patient-section .row p{white-space:pre-wrap}

.app-brand{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;line-height:1.28}.cloudflare-tag{background:#fff1dc;color:#853604;border:1px solid #efc68e;white-space:nowrap}main>header{gap:12px}main>header>button{flex-shrink:0}
