/* v1.6.9. Hover feedback belongs on compact controls, not content surfaces. */
#appShell.knowledgeMode .diarySidebar #viewTitle {
  font-size:38px;
  letter-spacing:-.043em;
  line-height:1.08;
  max-width:100%;
  overflow-wrap:normal;
}
@media (max-width:820px) {
  #appShell.knowledgeMode .diarySidebar #viewTitle {
    font-size:28px;
    letter-spacing:-.03em;
  }
}
@media (hover:hover) and (pointer:fine) {
  #appShell .diarySidebar .topActions .iconButton:not(.active):not(:disabled):hover,
  #appShell .diarySidebar .brandControls .themeToggle:not(.active):not(:disabled):hover,
  #appShell .diarySidebar .brandControls .workspaceToggle:not(.active):not(:disabled):hover {
    background:var(--soft)!important;
    border-color:var(--line)!important;
    color:var(--text)!important;
    box-shadow:none!important;
    outline:none!important;
  }
  #appShell :is(
    .directoryActionsMenu>summary,
    .memoryContextActions button,
    .quickFormatToolbar button,
    .editorFormatToolbar button,
    .taskTextToolbar button,
    .handwritingTools button,
    .journalTrashButton,
    .eventMenuButton,
    .taskDetailExpandButton,
    .noteBodyExpandButton,
    .textStepClearButton,
    .textComposerClearButton,
    .markerRemove,
    .markerMore,
    .diaryDayActions button
  ):not(.active):not(:disabled):hover {
    background:var(--soft)!important;
    border-color:var(--line)!important;
    color:var(--text)!important;
    box-shadow:none!important;
    outline:none!important;
  }
}

/* Editor toolbars are often mounted in dialogs next to #appShell.
   Match the actual editor surfaces, not descendants of #appShell. */
@media (hover:hover) and (pointer:fine) {
  body :is(
    #quickCapture,
    #editDialog,
    #calendarEventDialog,
    #noteEditor,
    #noteBodyDialog,
    #taskDialog,
    #taskDetailDialog
  ) :is(
    .quickFormatToolbar,
    .editorFormatToolbar,
    .taskTextToolbar,
    .sharedEditorFormatGroup,
    .chronikLeftTools,
    .chronikRightActions,
    .sharedEditorInputTools,
    .calendarEventInputTools,
    .noteCompactDesktopActions,
    .calendarEventActions
  ) :is(button,label):not(.primaryButton):not(.quickSave):not(.recording):not(:disabled):hover,
  body :is(
    #quickCapture,
    #editDialog,
    #calendarEventDialog,
    #noteEditor,
    #noteBodyDialog,
    #taskDialog,
    #taskDetailDialog
  ) :is(
    .sharedEditorActions,
    .chronikEntryActions,
    .noteAttachmentToolbar
  ) button:not(.primaryButton):not(.quickSave):not(.recording):not(:disabled):hover,
  body :is(
    #noteAttachmentButtonCompactDesktop,
    #journalTextVoiceButton,
    #journalTextClearTop
  ):not(:disabled):hover {
    background:var(--soft)!important;
    color:var(--text)!important;
    border-color:var(--line)!important;
    box-shadow:none!important;
    outline:none!important;
  }
}

/* The fullscreen editor uses stronger ID-based reset rules than the regular
   Chronik toolbar. Override only icon buttons, without modifying tool layout. */
@media (hover:hover) and (pointer:fine) {
  body #quickCapture.chronikFullscreen #quickFormatToolbar button:not(:disabled):hover,
  body #editDialog.editorFullscreen #editFormatToolbar button:not(:disabled):hover,
  body #editDialog.editorFullscreen .chronikEditToolbarRow .editorFormatToolbar button:not(:disabled):hover,
  body #calendarEventDialog.calendarEventEditorFullscreen #calendarEventNoteToolbar button:not(:disabled):hover,
  body #noteBodyDialog[open] #noteBodyFullscreenToolbar button:not(:disabled):hover,
  body #taskDetailDialog[open] #taskDetailFullscreenToolbar button:not(:disabled):hover,
  body #noteEditor #noteFormatToolbar button:not(:disabled):hover,
  body #taskDialog #taskTextToolbar button:not(:disabled):hover,
  body #quickCapture.chronikFullscreen :is(.chronikLeftTools,.chronikRightActions) :is(button,label):not(.quickSave):not(.primaryButton):hover,
  body #editDialog.editorFullscreen :is(.chronikLeftTools,.chronikRightActions) :is(button,label):not(.primaryButton):hover {
    background-color:var(--soft)!important;
    background:var(--soft)!important;
    border-color:var(--line)!important;
    color:var(--text)!important;
    box-shadow:none!important;
    outline:none!important;
  }
}
