/* Keep the expanded/mobile history as the existing always-visible list. */
#sidebar-timer-region .timer-workflow-recent > summary { list-style: none; pointer-events: none; }
#sidebar-timer-region .timer-workflow-recent > summary::-webkit-details-marker { display: none; }
#sidebar-timer-region .timer-workflow-recent > summary > svg { display: none; }
.sidebar-popup-notes-label { display: none; }

@media (min-width: 1024px) {
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer {
    position: fixed; left: calc(var(--sidebar-rail-width) + 8px); top: var(--sidebar-popup-top, 12px); bottom: auto;
    display: block; width: 280px; max-width: calc(100vw - var(--sidebar-rail-width) - 20px);
    max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain;
    padding: 10px; border: 1px solid #d9dcd3; border-radius: 12px; background: var(--color-paper);
    box-shadow: 0 8px 24px rgb(28 25 23 / .12);
  }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer[hidden] { display: none; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .sidebar-drawer-heading {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px;
  }
  .sidebar-popup-brand { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 14px; font-weight: 600; }
  .sidebar-popup-logo { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; background: #526549; color: white; }
  .sidebar-popup-tools { display: flex; align-items: center; gap: 2px; }
  .sidebar-popup-tools button { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 6px; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer #sidebar-timer-region { display: block; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-slot { margin: 0 0 8px; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-card { padding: 12px; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer [data-workflow-popout] { display: none; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-heading { padding-right: 0; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-readout { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin: 8px 0; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-clock { order: initial; margin: 0; min-width: 0; width: auto; flex: 1; max-width: calc(100% - 82px) !important; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-clock-digits, .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-clock-colored { font-size: 23px !important; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-controls { order: initial; align-self: center; margin: 0; gap: 1px; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-controls button { width: 26px; height: 28px; padding: 5px; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .sidebar-popup-notes-label { display: block; order: 2; margin: 0 0 4px; color: #625d58; font-size: 11px; font-weight: 500; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-notes { order: 3; height: 64px; min-height: 64px; max-height: 160px; margin: 0; padding: 8px; opacity: 1; overflow: auto; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-recent { display: block; border: 1px solid #e7e5e4; border-radius: 8px; padding: 0 8px; background: #fff; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-recent > summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; margin: 0; pointer-events: auto; cursor: pointer; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-recent > summary > svg { display: block; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-recent[open] > summary > svg { transform: rotate(90deg); }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .timer-workflow-recent-list { max-height: 220px; }
  .app-shell[data-nav-collapsed="true"] #sidebar-timer-drawer .sidebar-recent-empty { margin: 0 0 8px; }
}
