.activity-cleanup-toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:12px 0 18px; }
html body #app .activity-cleanup-toolbar > button { width:auto; min-width:0; min-height:36px; margin:0; padding:8px 12px; font-size:14px; border-radius:12px; }
.activity-cleanup-toolbar > span { font-size:14px; margin-right:auto; }
.activity-cleanup-row { display:grid; grid-template-columns:32px minmax(0,1fr); gap:10px; align-items:center; margin-bottom:12px; }
.activity-cleanup-check { display:flex; align-items:center; justify-content:center; margin:0; padding:0; cursor:pointer; }
html body #app .activity-cleanup-check > input { appearance:auto; width:22px; height:22px; min-height:0; margin:0; padding:0; accent-color:var(--accent); cursor:pointer; }
.activity-cleanup-content { min-width:0; }
.activity-cleanup-content > * { margin-bottom:0; }
/* Keep confirmation geometry independent of generic sheet and destructive-button rules. */
html body #sheetRoot .sheet-backdrop > .sheet.activity-cleanup-dialog {
  display:grid; gap:18px; width:min(460px,100%); max-width:460px;
  padding:24px; box-sizing:border-box;
}
html body #sheetRoot .activity-cleanup-dialog > h2 {
  margin:0 !important; font-size:22px; line-height:1.3;
}
html body #sheetRoot .activity-cleanup-dialog > p {
  margin:0 !important; font-size:16px; line-height:1.6;
}
html body #sheetRoot .activity-cleanup-dialog-actions {
  display:flex; flex-wrap:wrap; align-items:stretch; justify-content:center; gap:12px;
  margin:2px 0 0; padding:0;
}
html body #sheetRoot .activity-cleanup-dialog-actions > button {
  display:flex !important; align-items:center !important; justify-content:center !important;
  flex:1 1 160px; width:auto !important; min-width:0 !important; min-height:48px !important;
  margin:0 !important; padding:12px 16px !important; box-sizing:border-box !important;
  border-radius:14px !important; text-align:center !important;
  font-size:16px !important; font-weight:600 !important; line-height:1.25 !important;
  white-space:normal; background-origin:border-box; background-repeat:no-repeat;
}
html body #sheetRoot .activity-cleanup-dialog-actions > button:focus-visible {
  outline:2px solid var(--accent); outline-offset:3px;
}
.activity-cleanup-error:empty { display:none; }
@media (max-width:479px) {
  html body #sheetRoot .sheet-backdrop > .sheet.activity-cleanup-dialog { padding:20px; gap:16px; }
  html body #sheetRoot .activity-cleanup-dialog > h2 { font-size:20px; }
  html body #sheetRoot .activity-cleanup-dialog-actions > button { flex-basis:100%; }
}

/* The existing controls stay on the page canvas; only the list passes underneath. */
html body #app:has(> .activity-cleanup-toolbar[data-cleanup-selecting="true"]) > .page-head {
  position:sticky; top:0; z-index:55;
}
html body #app > .activity-cleanup-toolbar[data-cleanup-selecting="true"] {
  position:sticky; top:var(--activity-cleanup-top,0px); z-index:54;
  margin-top:0; padding:10px 0;
  border:0; border-radius:0; box-shadow:none;
  background-color:var(--system-surface-color);
  background-image:var(--system-surface-background);
  background-position:center top; background-size:100vw 100dvh;
  background-attachment:fixed; background-repeat:no-repeat;
}
