/* Reuse Citra's app-modal and Workspace explorer primitives from main.css. */
.keep-dialog.app-modal__panel { position: fixed; inset: 0; margin: auto; width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overscroll-behavior: contain; }
.keep-dialog::backdrop { background: #17171799; }
.keep-dialog.app-modal__panel h2 { padding: 24px 28px 12px; margin: 0; }
.keep-dialog__body { padding: 8px 28px; overflow-wrap: anywhere; }
.keep-dialog__body > p { margin: 0 0 16px; }
.keep-dialog input { font: 400 14px 'Work Sans', sans-serif; max-width: 100%; }
.keep-dialog__actions, .keep-dialog__footer, .keep-selection-toolbar, .keep-selection-launcher { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.keep-dialog [hidden], .keep-selection-toolbar[hidden], .keep-selection-launcher[hidden], .keep-selection-launcher [hidden], .keep-image-checkbox[hidden] { display: none !important; }
.keep-dialog__actions { margin: 16px 0; }
.keep-dialog__footer { position: sticky; bottom: 0; padding: 16px 28px; background: #f7f7f7; border-top: 1px solid #ddd; }
.keep-dialog__completion-actions { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 10px; width: min(100%, 260px); }
.keep-dialog__completion-actions .dashboard-action-btn { min-width: 0; flex: 1 1 0; }
.keep-dialog.app-modal__panel .keep-dialog__status { padding: 12px 28px 20px; font-size: 14px; }
.keep-dialog__status:empty { display: none; }
.keep-dialog.app-modal__panel .keep-dialog__status[data-tone='error'] { color: #a32323; }
.keep-dialog.app-modal__panel .keep-dialog__path { padding: 10px 12px; background: #eee; border: 1px solid #ddd; font-size: 13px; }
.keep-dialog__list { display: grid; gap: 0; }
.keep-dialog__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ddd; font: 400 13px/1.4 'Work Sans', sans-serif; }
.keep-dialog__row > img { width: 48px; height: 56px; object-fit: cover; flex: none; }
.keep-dialog__row > div { flex: 1; min-width: 0; }
.keep-dialog__row strong { font-weight: 600; }
.keep-dialog__duplicates { margin-top: 16px; font: 400 14px/1.5 'Work Sans', sans-serif; }
.keep-dialog__duplicates > summary { cursor: pointer; padding: 8px 0; }
.keep-dialog__choices { display: flex; flex-wrap: wrap; gap: 12px; border: 0; padding: 0; margin: 0; }
.keep-dialog__choices label { display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.keep-dialog__choices input { width: 18px; height: 18px; accent-color: #515151; }
.keep-dialog.app-modal__panel .keep-dialog__summary { margin-top: 16px; }
.keep-conflict-actions { display: grid; gap: 8px; }
.keep-dialog .keep-conflict-action { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid #ccc; background: #fff; color: #292929; text-align: left; font: 600 15px/1.4 'Work Sans', sans-serif; cursor: pointer; }
.keep-conflict-action > span { font-size: 22px; }
.keep-conflict-action:hover { background: #eee; }
.keep-dialog .dashboard-action-btn, .keep-selection-toolbar button { white-space: normal; min-height: 44px; height: auto; width: auto; padding: 10px 16px; line-height: 1.4; }
.keep-dialog .dashboard-action-btn { font-family: 'Work Sans', sans-serif; }
.keep-dialog button:disabled, .keep-selection-toolbar button:disabled { opacity: .5; cursor: not-allowed; }
.keep-dialog :focus-visible, .keep-selection-toolbar :focus-visible, .keep-selection-launcher :focus-visible { outline: 3px solid #6951b5; outline-offset: 3px; }
.keep-selection-available .discovery-page { padding-bottom: 160px; }
.keep-selection-launcher { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); right: 24px; z-index: 90; padding: 10px 12px; border: 1px solid #ddd; border-radius: 18px; background: #f7f7f7; box-shadow: 0 8px 32px #0003; max-width: calc(100vw - 32px); box-sizing: border-box; }
.keep-selection-hint { font: 400 13px/1.4 'Work Sans', sans-serif; color: #515151; }
.keep-selection-toolbar { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 90; width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 12px 16px; background: #f7f7f7; border: 1px solid #ddd; border-radius: 18px; box-shadow: 0 8px 32px #0003; font-family: 'Work Sans', sans-serif; }
.keep-selection-all { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14px; }
.keep-selection-all input { width: 22px; height: 22px; accent-color: #6d46c4; cursor: pointer; }
.keep-selection-toolbar .keep-selection-close { border: 0; border-radius: 50%; background: transparent; color: #515151; font-size: 26px; width: 44px; padding: 0; cursor: pointer; }
.keep-selection-toolbar span { font-size: 14px; }
.keep-image-choice { position: relative; min-width: 0; }
.keep-image-choice.is-selected { outline: 3px solid #6d46c4; outline-offset: 3px; border-radius: 8px; }
.keep-image-checkbox { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; accent-color: #6d46c4; cursor: pointer; }
.keep-image-checkbox:disabled { cursor: not-allowed; }
.keep-browser.workspace-explorer { min-height: 0; }
.keep-browser .workspace-explorer__topbar { padding: 10px 12px; gap: 12px; grid-template-columns: 1fr; }
.keep-browser__toolbar { justify-content: flex-start; }
.keep-browser__toolbar .workspace-explorer__action { min-height: 30px; }
.keep-browser__crumb[aria-current] { font-weight: 600; }
.keep-browser__name-heading { padding: 7px 24px; font: 400 13px/1.3 'Work Sans', sans-serif; }
.keep-browser__folders { min-height: 170px; max-height: 270px; overflow-y: auto; padding: 0 0 8px; }
.keep-dialog .keep-browser__folder { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 34px; padding: 7px 24px; border: 0; background: #fff; color: #515151; font: 400 13px/1.3 'Work Sans', sans-serif; text-align: left; cursor: pointer; }
.keep-dialog .keep-browser__folder:hover { background: rgba(66, 153, 225, .18); box-shadow: inset 0 1px rgba(66, 153, 225, .45), inset 0 -1px rgba(66, 153, 225, .45); }
.keep-browser__folder-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.keep-browser__arrow { color: #515151; }
.keep-browser__empty { margin: 24px 16px !important; font-size: 13px !important; }
.keep-browser__destination { display: grid; gap: 5px; padding: 12px 16px; background: #f7f7f7; border-top: 1.5px solid #515151; font: 400 12px/1.4 'Work Sans', sans-serif; }
.keep-browser__destination strong { font-weight: 600; overflow-wrap: anywhere; }
.keep-browser__editor { padding: 16px; background: #f7f7f7; border-bottom: 1px solid #ddd; font: 400 13px/1.4 'Work Sans', sans-serif; }
.keep-browser__editor label { display: block; font-weight: 600; margin-bottom: 8px; }
.keep-browser__editor input { width: 100%; min-height: 44px; padding: 10px; border: 1px solid #aaa; border-radius: 4px; box-sizing: border-box; }
.keep-browser__editor .keep-dialog__actions { margin-bottom: 0; }
.keep-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .keep-selection-launcher { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); gap: 8px; }
  .keep-selection-hint { max-width: 180px; }
  .keep-selection-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; width: calc(100vw - 24px); max-width: none; gap: 4px 8px; padding: 10px 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .keep-selection-all { grid-column: 1 / 3; }
  .keep-selection-all input { flex: none; }
  .keep-selection-toolbar > span { grid-row: 2; font-size: 12px; }
  .keep-selection-toolbar .dashboard-action-btn { grid-row: 2; grid-column: 2; }
  .keep-selection-toolbar .keep-selection-close { grid-column: 3; grid-row: 1 / 3; }
  .keep-dialog__choices { flex-basis: 100%; }
  .keep-dialog__body { padding: 8px 16px; }
  .keep-dialog__footer { padding: 12px 16px; }
  .keep-dialog.app-modal__panel h2 { padding: 20px 16px 8px; }
  .keep-dialog.app-modal__panel .keep-dialog__status { padding: 8px 16px 16px; }
  .keep-browser__toolbar { flex-direction: row; }
  .keep-browser__toolbar .workspace-explorer__action { min-height: 44px; width: auto; }
  .keep-dialog .keep-browser__folder { min-height: 44px; }
}
