/* Remaining portal overlays share the current home/client-detail visual language.
   This sheet changes presentation only; dialog content and commands stay with their owners. */
:root {
  --po-paper: #1b1f24;
  --po-ink: #eef0f3;
  --po-muted: #b3b8c0;
  --po-gold: #d6b479;
  --po-gold-hi: #dfbf85;
  --po-line: rgba(221, 229, 239, .13);
  --po-edge: rgba(221, 229, 239, .2);
  --po-field: #15181c;
  --po-hover: rgba(224, 197, 132, .07);
  --po-button: linear-gradient(135deg, #f0d7a2 0%, #dcba7e 48%, #b88f55 100%);
  --po-button-ink: #1a140b;
  --po-danger: #f2b2a2;
  --po-danger-field: #321b18;
  --po-success: #a8cdb0;
  --po-shade: rgba(5, 6, 8, .62);
  --po-serif: 'Lora', Georgia, serif;
  --po-sans: 'Nunito Sans', 'Segoe UI', sans-serif;
  --po-height: calc((100dvh - 32px) / var(--dayview-user-zoom, 1));
  --po-width: calc((100vw - 28px) / var(--dayview-user-zoom, 1));
}
html[data-theme='light'] {
  --po-paper: #EEE4D8;
  --po-ink: #201C19;
  --po-muted: #655A52;
  --po-gold: #7d5c2c;
  --po-gold-hi: #7d5c2c;
  --po-line: #DED4C8;
  --po-edge: #D5C9BE;
  --po-field: #F1EAE0;
  --po-hover: rgba(181, 138, 76, .1);
  --po-button: linear-gradient(135deg, #e9c98a 0%, #d6b074 48%, #b58a4c 100%);
  --po-button-ink: #1a140b;
  --po-danger: #9d3b32;
  --po-danger-field: #fae7df;
  --po-success: #396b48;
  --po-shade: rgba(32, 28, 25, .4);
}

/* Explicit families keep the approved client-detail modal and home untouched. */
html:root :is(.modal-overlay:not(#clientModal), .voice-modal-overlay, .confirm-overlay, .drawer-backdrop, .month-drawer-overlay, .comms-mandatory-gate, .comms-permission-help) {
  background: var(--po-shade) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}
html:root body :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .drawer-panel, .month-drawer, .dashboard-notify-panel, .dayview-zoom-card, .comms-popup-card, .comms-popup-thread-menu, .therapist-group-action-menu, .messages-audio-menu, .comms-mandatory-card, .comms-permission-help-card):not(.cd-modal) {
  background: var(--po-paper) !important;
  color: var(--po-ink) !important;
  border: 1px solid var(--po-edge) !important;
  border-radius: 3px !important;
  box-shadow: 0 16px 48px #0003 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-family: var(--po-sans);
  font-size: 13px;
  line-height: 1.6;
  text-shadow: none !important;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
html:root body :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .comms-mandatory-card, .comms-permission-help-card):not(.cd-modal) {
  box-sizing: border-box;
  width: min(404px, var(--po-width)) !important;
  max-width: var(--po-width) !important;
  max-height: var(--po-height) !important;
  zoom: var(--dayview-user-zoom, 1) !important;
  overflow: hidden;
}
html:root :is(#appointmentActionsModal, #blockExtensionModal)[open] { display: flex; flex-direction: column; }
html:root :is(#appointmentActionsModal, #blockExtensionModal)::backdrop { background: var(--po-shade); backdrop-filter: blur(5px); }
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content) :is(.modal-header, .voice-modal-header) {
  position: relative;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 22px 18px !important;
  background: transparent !important;
  border-bottom: 1px solid var(--po-line) !important;
  box-shadow: none !important;
  zoom: 1 !important;
}
html:root :is(.modal-header, .voice-modal-header) > :first-child { min-width: 0; }
html:root :is(#appointmentActionsTitle, #blockExtensionTitle, .modal-title, .voice-modal-title, .confirm-title, .month-drawer-title, .drawer-title) {
  font: 400 26px/1.2 var(--po-serif) !important;
  letter-spacing: -.4px;
  color: var(--po-ink) !important;
  overflow-wrap: anywhere;
  margin: 0;
}
html:root :is(#appointmentActionsContext, .voice-modal-subtitle, .confirm-message, .comms-popup-body, .comms-popup-preview) {
  color: var(--po-muted) !important;
  font: 400 13px/1.6 var(--po-sans);
  overflow-wrap: anywhere;
}
html:root :is(#appointmentActionsContext, .voice-modal-subtitle) { margin-top: 9px; }
html:root :is(#appointmentActionsBody, #blockExtensionBody, .modal-content .modal-body, .voice-modal-content .voice-modal-body) {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  zoom: 1 !important;
  color: var(--po-ink) !important;
  box-shadow: none !important;
}
html:root :is(#appointmentActionsBody, #blockExtensionBody, .modal-content, .voice-modal-content) :is(.status-line, .voice-status, .voice-transcript-help, .written-note-help, .file-note-help) {
  color: var(--po-muted) !important;
  opacity: 1;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
html:root #appointmentActionsBody > .status-line { margin: 0; }
html:root #appointmentActionsBody .appointment-operations-link { color: var(--po-gold-hi); text-decoration: underline; text-underline-offset: 3px; }
/* Retain the bug report's existing visual-viewport measurement above a keyboard. */
html:root #bugReportModal { --po-height: calc((var(--bug-report-viewport-height, 100dvh) - 32px) / var(--dayview-user-zoom, 1)); }
/* Replace the old summary cap, which divides by the legacy .8 scale. */
html:root body #summaryModal .modal-content { max-height: var(--po-height) !important; background: var(--po-paper) !important; }
html:root body #summaryModal :is(.detail-section, .detail-card, .notes-content) { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
html:root :is(#summaryModal, #notificationAppointmentModal, #waitlistDecisionModal) :is(.detail-section-title, .detail-label, .notification-detail-label) { color: var(--po-muted) !important; }
html:root :is(#summaryModal, #notificationAppointmentModal, #waitlistDecisionModal) :is(.detail-value, .notes-content, .notification-detail-value) { color: var(--po-ink) !important; }
html:root :is(#notificationAppointmentFooter, #waitlistDecisionFooter) { flex: 0 0 auto; border-color: var(--po-line); background: transparent; }

/* Unboxed close controls keep their existing accessible names and handlers. */
html:root body :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .drawer-panel, .month-drawer) :is(.close-btn, .voice-modal-close, .drawer-close, .month-drawer-close) {
  position: relative;
  flex: 0 0 44px;
  width: 44px !important;
  height: 44px !important;
  min-height: 44px;
  padding: 0;
  margin: -9px -11px -9px 0;
  border: 0 !important;
  border-radius: 3px !important;
  background: transparent !important;
  color: var(--po-muted) !important;
  box-shadow: none !important;
  font-size: 0 !important;
}
html:root :is(.close-btn, .voice-modal-close, .drawer-close, .month-drawer-close)::before,
html:root :is(.close-btn, .voice-modal-close, .drawer-close, .month-drawer-close)::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 1px;
  top: calc(50% - .5px);
  left: calc(50% - 8px);
  background: currentColor;
  transform: rotate(45deg);
}
html:root :is(.close-btn, .voice-modal-close, .drawer-close, .month-drawer-close)::after { transform: rotate(-45deg); }
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .drawer-panel, .month-drawer, .dashboard-notify-panel, .comms-popup-card) :is(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--po-gold-hi) !important;
  outline-offset: -3px;
}

html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .comms-popup-card, .comms-popup-thread-menu) :is(.btn, .appt-action, .extend-btn, .confirm-btn, .voice-btn, .voice-redo-btn, .voice-save-btn, .file-action-btn, .comms-popup-btn, .written-note-page-btn) {
  min-height: 44px;
  border: 1px solid var(--po-line) !important;
  border-radius: 3px !important;
  background: transparent !important;
  color: var(--po-gold-hi) !important;
  box-shadow: none !important;
  font: 500 13px/1.5 var(--po-sans);
  white-space: normal;
  overflow-wrap: anywhere;
}
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .comms-popup-card) :is(.btn.primary, .confirm-btn.primary, .voice-save-btn, .comms-popup-btn.primary) {
  background: var(--po-button) !important;
  color: var(--po-button-ink) !important;
  border-color: transparent !important;
}
html:root #confirmOverlay .confirm-btn.danger {
  color: var(--po-danger) !important;
  background: var(--po-danger-field) !important;
  border-color: currentColor !important;
}
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .drawer-panel) button:hover:not(:disabled) { filter: brightness(1.08); }
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card) button:disabled { opacity: .45; cursor: not-allowed; }
html:root #confirmOverlay .confirm-card { padding: 24px 22px 22px; overflow-y: auto; }
html:root #confirmOverlay .confirm-message { margin: 14px 0 24px; }
html:root #confirmOverlay .confirm-actions { gap: 10px; }
html:root :is(#blockExtensionModal, #bugReportModal, .voice-modal-content) :is(input:not([type='range']):not([type='file']), select, textarea) {
  background: var(--po-field) !important;
  border: 1px solid var(--po-line) !important;
  border-radius: 3px !important;
  color: var(--po-ink) !important;
  font-size: 16px;
}
html:root .voice-modal-content .voice-modal-body { justify-content: flex-start; }
html:root #bugReportModal input[type='file'] { color: var(--po-muted) !important; background: var(--po-field) !important; border-radius: 3px !important; }
html:root #bugReportModal input[type='file']::file-selector-button { color: var(--po-ink); background: transparent; border: 1px solid var(--po-line); border-radius: 3px; min-height: 44px; font: inherit; }
html:root :is(#voiceNoteModal, #writtenNoteModal, #fileNoteModal) :is(.voice-mic-ring, .voice-playback, .written-note-preview, .file-note-drop) { border-radius: 3px !important; background-color: var(--po-field) !important; }

html:root :is(#drawerBackdrop .drawer-panel, .month-drawer) { border-radius: 0 !important; }
html:root #drawerBackdrop :is(.drawer-header, .drawer-section) { border-color: var(--po-line) !important; background: transparent !important; }
html:root #drawerBackdrop .drawer-header { position: sticky; top: 0; z-index: 1; flex-shrink: 0; padding: 24px 22px 18px; background: var(--po-paper) !important; }
html:root #drawerBackdrop .drawer-panel { width: min(320px, var(--po-width)) !important; max-width: var(--po-width) !important; overflow-x: hidden; }
html:root #drawerBackdrop .drawer-item { min-height: 48px; color: var(--po-ink) !important; border-radius: 3px; }
html:root #drawerBackdrop .drawer-item > span { min-width: 0; }
html:root #drawerBackdrop :is(.drawer-icon, .drawer-zoom-summary, .drawer-motion-summary, .drawer-section-label) { color: var(--po-gold) !important; }
html:root #drawerBackdrop .drawer-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
html:root #drawerBackdrop .drawer-item:is(:hover, :active) { background: var(--po-hover) !important; }
html:root :is(#dashboardNotifyPanel, .messages-audio-menu, .comms-popup-thread-menu, .therapist-group-action-menu) { max-width: var(--po-width); max-height: var(--po-height); overflow-y: auto; }
/* The home bell's wrapper has zero width; anchor its panel to the viewport. */
html:root .next-first-notification-host #dashboardNotifyPanel {
  position: fixed;
  top: calc((62px + env(safe-area-inset-top, 0px)) / var(--dayview-user-zoom, 1));
  right: calc(14px / var(--dayview-user-zoom, 1));
  left: auto;
  width: min(312px, var(--po-width));
  max-height: calc((100dvh - 90px) / var(--dayview-user-zoom, 1));
  zoom: var(--dayview-user-zoom, 1);
  transform: none;
}
html:root #dashboardNotifyPanel :is(.dashboard-notify-head, .dashboard-notify-tabs, .dashboard-notify-item) { background: transparent !important; border-color: var(--po-line) !important; }
html:root #dashboardNotifyPanel :is(.dashboard-notify-title, .dashboard-notify-item-title) { color: var(--po-ink) !important; }
html:root #dashboardNotifyPanel :is(.dashboard-notify-empty, .dashboard-notify-item-body, .dashboard-notify-time) { color: var(--po-muted) !important; }
html:root :is(.messages-audio-menu, .therapist-group-action-menu, .comms-popup-thread-menu) button { color: var(--po-ink) !important; border-radius: 3px !important; background: transparent !important; }
html:root .messages-audio-menu::after { background: var(--po-paper) !important; border-color: var(--po-edge) !important; }
html:root .therapist-group-action-menu button.danger { color: var(--po-danger) !important; }
html:root .therapist-group-action-menu button[aria-pressed='true'] { color: var(--po-gold-hi) !important; background: var(--po-hover) !important; outline: 1px solid var(--po-gold); }
html:root .comms-popup-card .comms-popup-btn.danger { color: var(--po-danger) !important; background: var(--po-danger-field) !important; }
html:root :is(#dayviewZoomOverlay, .dayview-zoom-overlay) .dayview-zoom-card { color: var(--po-ink) !important; }
html:root .dayview-zoom-heading h2 { font: 400 22px/1.3 var(--po-serif); }
html:root :is(.comms-mandatory-card, .comms-permission-help-card) { overflow-y: auto; }
html:root :is(.comms-mandatory-title, .comms-permission-help-title, .comms-popup-title) { font: 400 22px/1.3 var(--po-serif); color: var(--po-ink) !important; }
html:root :is(.comms-mandatory-copy, .comms-permission-help-copy, .comms-permission-help-steps, .comms-mandatory-status) { color: var(--po-muted) !important; }
html:root .comms-mandatory-warn { color: var(--po-danger) !important; }
html:root .comms-mandatory-ok { color: var(--po-success) !important; }
html:root :is(.comms-mandatory-btn, .comms-permission-help-btn) { min-height: 44px; border-radius: 3px !important; background: transparent !important; color: var(--po-gold-hi) !important; border: 1px solid var(--po-line) !important; }
html:root :is(.comms-mandatory-btn, .comms-permission-help-btn).primary { background: var(--po-button) !important; color: var(--po-button-ink) !important; }

html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .drawer-panel, .month-drawer, .dashboard-notify-panel, .comms-popup-card, .comms-popup-thread-menu, .therapist-group-action-menu, .messages-audio-menu, .comms-mandatory-card, .comms-permission-help-card) ::-webkit-scrollbar,
html:root :is(#appointmentActionsBody, #blockExtensionBody, .modal-content, .voice-modal-content, .confirm-card, .drawer-panel, .month-drawer, .dashboard-notify-panel, .messages-audio-menu)::-webkit-scrollbar { display: none; width: 0; height: 0; }
@media (prefers-reduced-motion: reduce) {
  html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .drawer-panel) { animation: none !important; transition: none !important; }
}

/* R&R portal look (Oct 2026): 5px panels, 4px gradient actions, portal-sidebar menu items. */
html:root body :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .dashboard-notify-panel, .dayview-zoom-card, .comms-popup-card, .comms-popup-thread-menu, .therapist-group-action-menu, .messages-audio-menu, .comms-mandatory-card, .comms-permission-help-card):not(.cd-modal) {
  border-color: var(--po-line) !important;
  border-radius: 5px !important;
  box-shadow: inset 0 1px 0 rgba(246, 241, 233, .05), 0 24px 48px -24px rgba(0, 0, 0, .85) !important;
}
html[data-theme='light'] body :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .dashboard-notify-panel, .dayview-zoom-card, .comms-popup-card):not(.cd-modal) {
  box-shadow: 0 24px 48px -24px rgba(32, 28, 25, .35) !important;
}
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .comms-popup-card, .comms-popup-thread-menu) :is(.btn, .appt-action, .extend-btn, .confirm-btn, .voice-btn, .voice-redo-btn, .voice-save-btn, .file-action-btn, .comms-popup-btn, .written-note-page-btn) {
  border-radius: 4px !important;
  font-weight: 600;
}
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .comms-popup-card) :is(.btn.primary, .confirm-btn.primary, .voice-save-btn, .comms-popup-btn.primary) {
  border-color: rgba(255, 236, 196, .45) !important;
  box-shadow: inset 0 1px 0 rgba(246, 241, 233, .28), 0 6px 18px -8px rgba(0, 0, 0, .6);
}
html:root #drawerBackdrop .drawer-panel { background: #0d0f12 !important; border-color: var(--po-line) !important; }
html[data-theme='light'] #drawerBackdrop .drawer-panel { background: #F6F1E9 !important; }
html:root #drawerBackdrop .drawer-header { background: inherit !important; }
html:root #drawerBackdrop .drawer-title { font: 400 15px/1.2 var(--po-serif); letter-spacing: 2px; text-transform: uppercase; color: var(--po-gold-hi) !important; }
html:root #drawerBackdrop .drawer-item { gap: 14px; border: 1px solid transparent; border-radius: 6px; font: 500 14px/1.3 var(--po-sans); }
html:root #drawerBackdrop .drawer-item:is(:hover, :active):not(:disabled) { background: rgba(224, 197, 132, .07) !important; border-color: rgba(224, 197, 132, .14); }
html[data-theme='light'] #drawerBackdrop .drawer-item:is(:hover, :active):not(:disabled) { background: #E6DACB !important; border-color: #D5C9BE; }
html:root #pageBody.messages-coming-soon-page { display: grid; place-items: center; min-height: 60vh; padding: 32px 24px; }
html:root .messages-coming-soon { max-width: 320px; padding: 28px 24px; border: 1px solid var(--po-line); border-radius: 5px; background: var(--po-paper); text-align: center; }
html:root .messages-coming-soon h2 { margin: 0 0 10px; font: 400 26px/1.15 var(--po-serif); color: var(--po-ink); }
html:root .messages-coming-soon p { margin: 0; font: 400 15px/1.6 var(--po-sans); color: var(--po-muted); }
html:root .messages-coming-soon-contacts { margin-top: 18px; min-height: 44px; padding: 0 18px; border: 1px solid rgba(221, 229, 239, .2); border-radius: 4px; background: linear-gradient(135deg, #2d333b 0%, #1d2127 60%, #16191d 100%); color: #eef0f3; font: 600 14px/1 var(--po-sans); cursor: pointer; }
html[data-theme='light'] .messages-coming-soon-contacts { border-color: #D5C9BE; background: linear-gradient(135deg, #E6DACB 0%, #D9C7B5 100%); color: #201C19; }
/* Owner decision 2026-10-03: every button uses black text on a lighter fill. */
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .comms-popup-card, .comms-popup-thread-menu) :is(.btn, .appt-action, .extend-btn, .confirm-btn, .voice-btn, .voice-redo-btn, .voice-save-btn, .file-action-btn, .comms-popup-btn, .written-note-page-btn):not(.primary):not(.voice-save-btn):not(.danger) {
  background: linear-gradient(135deg, #f1e8db 0%, #ddccb6 100%) !important;
  border-color: #cdbba3 !important;
  color: #15120c !important;
}
html:root :is(#appointmentActionsModal, #blockExtensionModal, .modal-content, .voice-modal-content, .confirm-card, .comms-popup-card) :is(.btn.primary, .confirm-btn.primary, .voice-save-btn, .comms-popup-btn.primary) { color: #15120c !important; }
html:root .messages-coming-soon-contacts { border-color: #cdbba3; background: linear-gradient(135deg, #f1e8db 0%, #ddccb6 100%); color: #15120c; }

/* Intake quick view (Oct 2026): solid panel, plain readable text, answers as a two-column list,
   alerts as a tinted callout, slim buttons with drawn icons and black text. */
html:root body #summaryModal .modal-content { background: #15181c !important; border-color: rgba(221, 229, 239, .16) !important; }
html:root #summaryModal .modal-title { font: 400 26px/1.15 var(--po-serif) !important; color: var(--po-ink) !important; letter-spacing: -.3px; }
html:root #summaryModal .summary-subtitle { margin: -6px 0 18px; font: 400 13px/1.5 var(--po-sans); color: var(--po-muted); }
html:root #summaryModal .detail-section { margin: 0 0 20px !important; padding: 0 !important; }
html:root #summaryModal .detail-section-title { margin: 0 0 10px !important; font: 400 18px/1.3 var(--po-serif) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--po-ink) !important; }
html:root #summaryModal .notes-content { padding: 0 !important; margin: 0 0 12px !important; font: 400 14px/1.6 var(--po-sans) !important; font-style: normal !important; color: #d6dae0 !important; }
html:root #summaryModal .file-list { display: grid; gap: 8px; }
html:root #summaryModal .file-item { padding: 0 0 10px !important; margin: 0 !important; background: none !important; border: 0 !important; border-bottom: 1px solid var(--po-line) !important; border-radius: 0 !important; }
html:root #summaryModal .file-name { font: 600 15px/1.35 var(--po-sans) !important; color: var(--po-ink) !important; }
html:root #summaryModal .file-meta { font: 400 13px/1.5 var(--po-sans) !important; color: var(--po-muted) !important; }
html:root #summaryModal .detail-section:has(.summary-alert) .file-item { padding: 10px 12px !important; border: 1px solid rgba(217, 111, 111, .45) !important; border-radius: 5px !important; background: rgba(127, 29, 29, .16) !important; }
html:root #summaryModal .detail-section:has(.summary-alert) .file-name { color: #f2c6c0 !important; }
html:root #summaryModal .detail-section:has(.summary-alert) .file-meta { color: #f6e1de !important; font-size: 14px !important; }
html:root #summaryModal .detail-row { display: grid !important; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 0 !important; margin: 0 !important; background: none !important; border: 0 !important; border-bottom: 1px solid var(--po-line) !important; border-radius: 0 !important; }
html:root #summaryModal .detail-row:last-child { border-bottom: 0 !important; }
html:root #summaryModal .detail-label { font: 400 12px/1.4 var(--po-sans) !important; color: var(--po-muted) !important; text-align: left !important; }
html:root #summaryModal .detail-value { font: 400 14px/1.5 var(--po-sans) !important; font-style: normal !important; color: var(--po-ink) !important; text-align: left !important; }
html:root #summaryModal .empty-files, html:root #summaryModal .status-line { font: 400 13px/1.5 var(--po-sans) !important; color: var(--po-muted) !important; }
html:root body #summaryModal .modal-content .btn.summary-action {
  display: inline-flex !important; align-items: center; gap: 7px; min-height: 34px !important; height: 34px; padding: 0 12px !important;
  border-radius: 4px !important; font: 600 13px/1 var(--po-sans) !important; color: #11131a !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 12px -8px rgba(0, 0, 0, .7) !important;
}
html:root body #summaryModal .modal-content .btn.summary-speak { border: 1px solid rgba(255, 236, 196, .45) !important; background: linear-gradient(135deg, #f0d7a2 0%, #dcba7e 48%, #b88f55 100%) !important; }
html:root body #summaryModal .modal-content .btn.summary-refresh { border: 1px solid rgba(205, 212, 222, .6) !important; background: linear-gradient(135deg, #eef1f5 0%, #d3d9e1 100%) !important; }
html:root #summaryModal .btn.summary-action::before { content: ''; width: 15px; height: 15px; flex: 0 0 15px; background: currentColor; -webkit-mask: var(--summary-icon) center / contain no-repeat; mask: var(--summary-icon) center / contain no-repeat; }
html:root #summaryModal .btn.summary-speak { --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5Z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E"); }
html:root #summaryModal .btn.summary-refresh { --summary-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7v5h-5M4 17v-5h5M6 6a8 8 0 0 1 13 3M18 18A8 8 0 0 1 5 15'/%3E%3C/svg%3E"); }
html:root body #summaryModal #summaryModalBody .btn.summary-action.summary-speak { border: 1px solid rgba(255, 236, 196, .45) !important; background: linear-gradient(135deg, #f0d7a2 0%, #dcba7e 48%, #b88f55 100%) !important; color: #11131a !important; }
html:root body #summaryModal #summaryModalBody .btn.summary-action.summary-refresh { border: 1px solid rgba(205, 212, 222, .6) !important; background: linear-gradient(135deg, #eef1f5 0%, #d3d9e1 100%) !important; color: #11131a !important; }
html:root body #summaryModal #summaryModalBody .detail-row > .detail-label, html:root body #summaryModal #summaryModalBody .detail-row > .detail-value { width: auto !important; max-width: none !important; flex: none !important; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) { html:root body #summaryModal #summaryModalBody .detail-row { grid-template-columns: 104px minmax(0, 1fr); } }
html:root body #summaryModal #summaryModalBody .btn.summary-action.summary-refresh { border: 1px solid rgba(160, 195, 245, .55) !important; background: linear-gradient(115deg, #a9c8f2 0%, #86ade6 55%, #6a96d9 100%) !important; color: #0b1220 !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px -8px rgba(0, 0, 0, .7) !important; }
html:root body #summaryModal #summaryModalBody .btn.summary-action:hover { filter: brightness(1.08) saturate(1.05); }
html:root body #summaryModal #summaryModalBody .btn.summary-action:active { transform: translateY(1px); filter: brightness(.97); }
html:root body #summaryModal #summaryModalBody .btn.summary-action:focus-visible { outline: 2px solid #dfbf85; outline-offset: 2px; }
html:root #pageBody.messages-coming-soon-page { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 18px; min-height: 0; padding: 16px; }
html:root #pageBody.messages-coming-soon-page .messages-pinned { display: block; }
html:root #pageBody.messages-coming-soon-page .messages-pinned .therapist-group-strip { position: static; border: 1px solid var(--po-line); border-radius: 5px; }
html:root #pageBody.messages-coming-soon-page .messages-coming-soon { max-width: none; align-self: stretch; }
/* Messages: client conversations replaced by one notice row, styled like a conversation in the list. */
html:root .messages-client-soon { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--dm-line, rgba(221, 229, 239, .13)); }
html:root .messages-client-soon-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(157, 184, 224, .14); color: #9db8e0; }
html:root .messages-client-soon-avatar svg { width: 20px; height: 20px; }
html:root .messages-client-soon-copy { display: grid; gap: 2px; min-width: 0; }
html:root .messages-client-soon-copy strong { font: 600 15px/1.3 var(--po-sans); color: var(--po-ink); }
html:root .messages-client-soon-copy span { font: 400 13px/1.45 var(--po-sans); color: var(--po-muted); }

/* Messages (Oct 2026, option A): portal palette and type; inbox header, Pinned / Clients sections. */
html:root .dayview-messages {
  --dm-canvas: #0b0d10; --dm-bg: #0b0d10; --dm-surface: rgba(25, 29, 34, .76); --dm-surface-2: #1b1f24;
  --dm-line: rgba(221, 229, 239, .13); --dm-line-strong: rgba(221, 229, 239, .2);
  --dm-ink: #eef0f3; --dm-muted: #b3b8c0; --dm-faint: #8e949c; --dm-accent: #dfbf85; --dm-accent-hover: #f0d7a2;
  font: 400 14px/1.45 'Nunito Sans', 'Segoe UI', sans-serif !important;
  background: radial-gradient(ellipse at 80% 0, rgba(139, 157, 178, .08), transparent 65%), var(--dm-canvas);
}
html[data-theme='light'] .dayview-messages {
  --dm-canvas: #EDE8E1; --dm-bg: #EDE8E1; --dm-surface: #EEE4D8; --dm-surface-2: #E6DACB;
  --dm-line: #DED4C8; --dm-line-strong: #D5C9BE; --dm-ink: #201C19; --dm-muted: #4B433E; --dm-faint: #655A52; --dm-accent: #7d5c2c; --dm-accent-hover: #6a4d24;
  background: var(--dm-canvas);
}
html:root .dayview-messages .dm-rail { background: transparent; }
html:root .dayview-messages .dm-inbox-head { padding: 14px 16px 6px; border: 0; }
html:root .dayview-messages .dm-inbox-top { display: flex; align-items: center; justify-content: space-between; margin: 0 -8px 2px; }
html:root .dayview-messages .dm-back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--dm-accent); font-weight: 600; font-size: 14px; }
html:root .dayview-messages .dm-back-link svg { width: 18px; height: 18px; }
html:root .dayview-messages .dm-inbox-top .dm-icon-button { color: var(--dm-accent); background: none; border: 0; }
html:root .dayview-messages .dm-inbox-title { margin: 2px 0 0; font: 400 34px/1.05 'Lora', Georgia, serif; color: var(--dm-ink); letter-spacing: -.4px; }
html:root .dayview-messages .dm-inbox-sub { margin: 6px 0 14px; font-size: 13px; color: var(--dm-muted); }
html:root .dayview-messages .dm-search { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--dm-line-strong); border-radius: 4px; background: var(--dm-surface-2); color: var(--dm-muted); }
html:root .dayview-messages .dm-search svg { width: 18px; height: 18px; flex: 0 0 18px; }
html:root .dayview-messages .dm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--dm-ink); font-size: 16px; }
html:root .dayview-messages .dm-search:focus-within { border-color: var(--dm-accent); }
html:root .dayview-messages .dm-section-label { padding: 18px 16px 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dm-faint); }
html:root .dayview-messages .dm-pinned { margin: 0 16px; border: 1px solid var(--dm-line); border-radius: 5px; overflow: hidden; background: linear-gradient(145deg, rgba(246, 241, 233, .025), rgba(246, 241, 233, 0) 65%), var(--dm-surface); box-shadow: inset 0 1px 0 rgba(246, 241, 233, .05), 0 14px 36px -26px rgba(0, 0, 0, .8); }
html:root .dayview-messages .therapist-group-strip { position: static; min-height: 74px; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; border: 0; background: transparent; text-align: left; }
html:root .dayview-messages .therapist-group-avatar { width: 46px !important; height: 46px !important; border: 1px solid rgba(235, 205, 153, .58); background: transparent !important; color: #f0ca85 !important; font: 400 16px 'Lora', Georgia, serif !important; }
html[data-theme='light'] .dayview-messages .therapist-group-avatar { color: #7d5c2c !important; border-color: #b8914f; }
html:root .dayview-messages .therapist-group-strip-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--dm-ink); }
html:root .dayview-messages .therapist-group-pin { width: 13px !important; height: 13px !important; color: var(--dm-accent); stroke-width: 1.6; }
html:root .dayview-messages .therapist-group-strip-preview { font-size: 13px; color: var(--dm-muted); }
html:root .dayview-messages .therapist-group-unread { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, #f0d7a2, #b88f55); color: #1a140b; font-size: 12px; font-weight: 700; }
html:root .dayview-messages .messages-client-soon { grid-template-columns: 24px minmax(0, 1fr); align-items: start; padding: 8px 16px 14px; border: 0; }
html:root .dayview-messages .messages-client-soon-avatar { width: 24px; height: 24px; background: none; color: #9db8e0; }
html:root .dayview-messages .messages-client-soon-copy strong { font-size: 14px; color: var(--dm-ink); }
html:root .dayview-messages .dm-mobile-nav { background: #0d0f12; border-top: 1px solid var(--dm-line); }
html[data-theme='light'] .dayview-messages .dm-mobile-nav { background: #F6F1E9; }
html:root .dayview-messages .dm-mobile-nav button { font-weight: 600; }
html:root .dayview-messages .dm-mobile-nav button[aria-current="page"] { color: var(--dm-accent); }
/* Pinned Therapist Group card: photo of whoever posted last. */
html:root .dayview-messages .therapist-group-photo { overflow: hidden; padding: 0; }
html:root .dayview-messages .therapist-group-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
