/* Time tools follow the olive-and-lemon desktop reference. The controls and
   their state continue to come from the existing timer and scheduling code. */
body:is([data-current-view="timers"], [data-current-view="countdowns"], [data-current-view="countups"], [data-current-view="focus"]) {
  --time-accent: #746000;
  --countdown-muted: var(--muted);
  --countup-muted: var(--muted);
}
html[data-theme="dark"] body:is([data-current-view="timers"], [data-current-view="countdowns"], [data-current-view="countups"], [data-current-view="focus"]) {
  --time-accent: var(--yellow);
}

/* Saved timers and independent runs use the same two-column rhythm. */
body[data-current-view="timers"] #timer-results .timer-grid,
body[data-current-view="timers"] .timer-runs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
body[data-current-view="timers"] #timer-results .timer-card,
body[data-current-view="timers"] :is(.timer-run-card, .timer-run-preset) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: none;
}
body[data-current-view="timers"] #timer-results .timer-card { min-height: 238px; }
body[data-current-view="timers"] #timer-results .timer-card-header { min-height: 36px; align-items: start; }
body[data-current-view="timers"] #timer-results .timer-card-header h3,
body[data-current-view="timers"] :is(.timer-run-card h4, .timer-run-preset h4) {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: -.35px;
}
body[data-current-view="timers"] #timer-results .timer-value,
body[data-current-view="timers"] .timer-run-clock {
  margin: 10px 0 5px;
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -1.8px;
  font-variant-numeric: tabular-nums;
  text-align: left;
  overflow-wrap: anywhere;
}
body[data-current-view="timers"] #timer-results .timer-caption { min-height: 28px; margin: 6px 0 12px; font-size: 12px; }
body[data-current-view="timers"] #timer-results .timer-actions {
  align-items: center;
  gap: 8px;
  min-height: 0;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
body[data-current-view="timers"] #timer-results .timer-actions > .button { flex: 1 1 150px; max-width: 230px; font-size: 13px; }
body[data-current-view="timers"] #timer-results .timer-actions > .time-split { flex: 1 1 130px; }
body[data-current-view="timers"] #timer-results .timer-definition-actions { gap: 2px; }
body[data-current-view="timers"] #timer-results .timer-definition-actions :is(.timer-edit-button, .icon-button) {
  min-height: 36px;
  height: 36px;
  min-width: 36px;
  font-size: 12px;
}
body[data-current-view="timers"] #timer-results .timer-card.finished,
body[data-current-view="timers"] .timer-run-card[data-run-status="finished"] {
  border-color: var(--time-accent);
  background: color-mix(in srgb, var(--paper) 94%, var(--yellow));
}
body[data-current-view="timers"] #timer-results .timer-card.finished .timer-value,
body[data-current-view="timers"] .timer-run-card[data-run-status="finished"] .timer-run-clock { color: var(--time-accent); }
body[data-current-view="timers"] #timer-results .timer-card.running .timer-caption { color: var(--ink); }
body[data-current-view="timers"] #timer-results .timer-card.running .timer-caption::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #7aa676;
}
.timer-dashboard-toolbar, .timer-runs-filters {
  position: static;
  padding: 0 0 12px;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.timer-dashboard-toolbar > label, .timer-runs-filters label { gap: 5px; font-size: 12px; color: var(--muted); }
.timer-dashboard-toolbar :is(input, select), .timer-runs-filters :is(input, select) {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 13px;
  background: var(--paper);
}
#timer-content .timer-result-count { margin: 0 0 14px; font-size: 12px; }
.timer-runs-toolbar { align-items: start; }
.timer-runs-toolbar h2 { font-size: 17px; }
.timer-runs-toolbar p, .timer-runs-notice { font-size: 12px; }
.timer-runs-section-heading h3 { font-size: 15px; font-weight: 600; }
.timer-runs-section-heading > span { font-size: 12px; }
.timer-run-meta { margin-bottom: 8px; font-size: 11px; }
.timer-run-meta > span:last-child { padding: 3px 8px; border-radius: 12px; background: var(--surface-hover); color: var(--ink); }
.timer-run-caption { min-height: 0; margin: 5px 0 14px; font-size: 12px; }
.timer-run-card > .timer-runs-actions, .timer-run-preset > .timer-runs-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.timer-run-preset > p { margin: 12px 0 20px; font-size: 28px; line-height: 1.2; color: var(--ink); font-variant-numeric: tabular-nums; }
.timer-runs-actions .subtle-link { min-width: 44px; min-height: 44px; margin: 0; padding: 7px 4px; font-size: 12px; }
.timer-run-notes summary { min-height: 44px; padding-block: 12px; }
.timer-run-adjustment { gap: 10px; margin-top: 12px; }
.timer-run-adjustment label, .timer-run-adjustment-note { font-size: 12px; }

/* Counters retain their filters and details, with the large number leading. */
body:is([data-current-view="countdowns"], [data-current-view="countups"]) .counter-dashboard-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr);
  align-items: end;
  column-gap: 16px;
  row-gap: 8px;
  position: static;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}
.counter-dashboard-controls :is(.countdown-toolbar, .countups-toolbar) { gap: 10px; margin: 0; }
.counter-dashboard-controls :is(label, .search-scope, .countups-sort-label > span) { font-size: 11px; font-weight: 500; color: var(--muted); }
.counter-dashboard-controls select { min-height: 36px; margin-top: 4px; border-radius: 5px; font-size: 12px; }
.counter-dashboard-controls .countdown-zones { flex: 1 1 160px; gap: 6px; font-size: 12px; }
.counter-dashboard-controls .countdown-zones button { min-height: 36px; font-size: 12px; }
.counter-dashboard-controls .countdown-search { padding: 0; }
.counter-dashboard-controls :is(.search-field, .countups-search-control) { min-height: 36px; padding-left: 10px; border-radius: 5px; gap: 6px; }
.counter-dashboard-controls :is(.search-field input, .countups-search-control input) { min-height: 36px; font-size: 12px; }
.counter-dashboard-controls :is(.search-field > button, .countups-search-control > button) { width: 36px; height: 36px; flex-basis: 36px; }
.counter-dashboard-controls :is(.counter-result-count, #countups-count) { grid-column: 1 / -1; margin: 0; font-size: 11px; color: var(--muted); }
body[data-current-view="countdowns"] #countdown-list,
body[data-current-view="countups"] #countups-rows {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
body[data-current-view="countdowns"] .countdown-row,
body[data-current-view="countups"] .countup-row {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--paper);
}
body[data-current-view="countdowns"] .countdown-row { gap: 8px; min-height: 260px; }
body[data-current-view="countdowns"] .countdown-name { min-height: 36px; gap: 8px; }
body[data-current-view="countdowns"] .countdown-name h2 { font-size: 17px; line-height: 1.45; letter-spacing: -.25px; }
.countdown-next { padding: 3px 6px; font-size: 10px; border-radius: 4px; }
body[data-current-view="countdowns"] .countdown-clock { min-height: 0; margin: 8px 0 3px; }
body[data-current-view="countdowns"] .countdown-time,
body[data-current-view="countdowns"] .countdown-row.is-reached .countdown-time {
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -1.2px;
  color: var(--time-accent);
}
body[data-current-view="countdowns"] .countdown-date { min-height: 0; margin: 3px 0 10px; font-size: 12px; line-height: 1.6; }
.counter-scope, .counter-status, .countup-status { font-size: 11px; line-height: 1.5; }
body[data-current-view="countdowns"] .countdown-actions { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); gap: 8px; }
body[data-current-view="countdowns"] .countdown-actions button { flex: 1 1 100px; min-height: 38px; padding: 7px 8px; border-radius: 5px; font-size: 12px; }
.countdown-details, .countup-details { margin-top: 8px; padding-top: 12px; font-size: 12px; }
.countdown-detail-content, .countup-details .item-description, .countup-details-date { font-size: 12px; }
body[data-current-view="countups"] .countup-row { min-height: 220px; }
body[data-current-view="countups"] .countup-row-main { gap: 8px; }
body[data-current-view="countups"] .countup-moment { min-height: 50px; }
body[data-current-view="countups"] .countup-name { min-height: 36px; font-size: 16px; font-weight: 600; }
body[data-current-view="countups"] .countup-time { min-height: 0; margin-top: 6px; }
body[data-current-view="countups"] .countup-elapsed { font-size: clamp(28px, 2.7vw, 38px); line-height: 1.2; letter-spacing: -1px; font-weight: 650; }
body[data-current-view="countups"] .countup-start { min-height: 0; margin-top: 4px; font-size: 12px; line-height: 1.6; }
.countup-more { width: 36px; height: 36px; border-radius: 5px; }
.countup-menu { border-radius: 6px; box-shadow: 0 8px 20px #0002; }
.countup-menu button { font-size: 12px; }
.counter-description { margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--border); color: var(--ink); font-size: 13px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.counter-alert-state { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.counter-alert-state .icon { width: 17px; height: 17px; }
.countdown-summary, .countup-summary { min-width: 0; }
.countup-summary { margin-top: 12px; }
.countdown-preferences, .countups-utilities { margin-top: 22px; border-radius: 6px; padding: 14px; }
.countdown-preferences h2, .countups-utility strong { font-size: 13px; }
.countdown-preferences p, .countups-utility small { font-size: 12px; }
.countdown-daily { font-size: 12px; }

/* Focus is a single centered work area, with the actual interval preview. */
body[data-current-view="focus"] .page-intro { max-width: none; margin-bottom: 20px; }
#focus-page { max-width: 860px; margin: 0 auto; }
#focus-page .focus-setup { gap: 0; }
#focus-page .focus-task-group { margin-bottom: 12px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); }
#focus-page .focus-label { margin: 0 0 8px; font-size: 13px; font-weight: 500; letter-spacing: 0; }
#focus-page .focus-task-row { grid-template-columns: minmax(0, 1fr) 130px; gap: 12px; align-items: start; }
#focus-page .focus-task-field { grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; padding: 6px 12px; border-radius: 5px; background: var(--control); }
#time-focus-task { height: 44px; padding: 8px 0; font-size: 14px; background: transparent; }
#focus-page .focus-task-field > .icon { width: 20px; height: 20px; }
#time-focus-list { font-size: 11px; }
#time-focus-add { min-height: 44px; border-radius: 5px; border-color: var(--border); font-size: 13px; }
#focus-page .focus-mode-group { padding: 12px 14px 0; border: 1px solid var(--border); border-bottom: 0; border-radius: 7px 7px 0 0; background: var(--paper); }
#focus-page #time-focus-question { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#focus-page .time-techniques { grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 5px; }
#focus-page .time-technique { min-height: 58px; padding: 9px 6px; }
#focus-page .time-technique strong { font-size: 12px; line-height: 1.4; }
#focus-page .time-technique small { font-size: 10px; line-height: 1.4; }
#focus-page .time-technique[aria-pressed="true"] { border-radius: 4px; background: var(--sage); box-shadow: inset 0 0 0 1px var(--green); }
#focus-page .focus-duration-row { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px 20px 10px; border: 1px solid var(--border); border-top: 0; border-bottom: 0; background: var(--paper); }
#focus-page .focus-duration-copy { align-self: stretch; text-align: center; }
#focus-page .focus-duration-copy .focus-label { margin-bottom: 4px; font-size: 12px; }
#time-focus-explainer { max-width: 64ch; margin: 0 auto; font-size: 12px; }
#focus-page .focus-preview-clock { display: block; max-width: 100%; font-size: clamp(42px, 6vw, 66px); font-weight: 650; letter-spacing: -2px; line-height: 1.1; font-variant-numeric: tabular-nums; text-align: center; overflow-wrap: anywhere; }
#focus-page .focus-duration-control { min-height: 40px; border-radius: 5px; }
#focus-page .focus-duration-control > button { width: 50px; min-height: 42px; font-size: 13px; }
#focus-page .focus-duration-control > div { padding: 0 8px; }
#time-focus-duration { min-height: 42px; width: 56px; font-size: 16px; }
#focus-page .focus-duration-control > div > span { font-size: 12px; }
#time-focus-settings { min-height: 40px; font-size: 12px; }
#focus-page .focus-start-row { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 12px 20px 20px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 7px 7px; background: var(--paper); text-align: center; }
#focus-page .focus-ready h2 { font-size: 13px; margin: 0 0 3px; }
#time-focus-summary { font-size: 12px; }
#time-start-focus { order: -1; width: min(100%, 340px); min-height: 44px; border-radius: 5px; font-size: 15px; }
#time-start-focus .icon { width: 19px; height: 19px; }
#focus-page #time-focus-error { margin: 0; padding: 12px 20px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--paper); text-align: center; font-size: 13px; }
#focus-page[data-focus-state="empty"] .focus-start-row { border: 1px solid var(--border); border-radius: 7px; padding: 24px; }
#focus-page .time-current { padding: 24px; margin-bottom: 14px; border-radius: 7px; background: var(--paper); text-align: center; }
#focus-page .time-current h3 { font-size: 20px; }
#focus-page .time-current .time-focus-value { margin: 18px 0 10px; font-size: clamp(44px, 6vw, 68px); }
#focus-page .time-current .time-controls { justify-content: center; }
#focus-page #time-focus-state { font-size: 13px; }

@media (max-width: 1180px) {
  body[data-current-view="countdowns"] #countdown-list,
  body[data-current-view="countups"] #countups-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:is([data-current-view="countdowns"], [data-current-view="countups"]) .counter-dashboard-controls { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  body[data-current-view="timers"] #timer-results .timer-grid,
  body[data-current-view="timers"] .timer-runs-grid,
  body[data-current-view="countdowns"] #countdown-list,
  body[data-current-view="countups"] #countups-rows { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body[data-current-view="timers"] #timer-results .timer-card,
  body[data-current-view="timers"] :is(.timer-run-card, .timer-run-preset),
  body[data-current-view="countdowns"] .countdown-row,
  body[data-current-view="countups"] .countup-row { padding: 16px; }
  .counter-dashboard-controls :is(.countdown-toolbar, .countups-toolbar) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counter-dashboard-controls .countdown-zones { grid-column: 1 / -1; }
  #focus-page .focus-task-group { padding: 14px; }
  #focus-page .focus-task-row { grid-template-columns: minmax(0, 1fr); }
  #time-focus-add { justify-self: start; min-height: 44px; }
  #focus-page .time-techniques { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #focus-page .time-technique:nth-child(2) { border-right: 0; }
  #focus-page .time-technique:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  #focus-page .time-technique { min-height: 62px; }
  #focus-page .time-technique strong { font-size: 13px; }
  #focus-page .time-technique small { font-size: 11px; }
  #focus-page .focus-duration-row, #focus-page .focus-start-row { padding-left: 14px; padding-right: 14px; }
  #focus-page .focus-duration-control { width: auto; max-width: 100%; }
  #focus-page .focus-duration-control > div { flex: 1; }
  .timer-runs-filters { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse), (max-width: 760px) {
  body[data-current-view="timers"] #timer-results .timer-definition-actions :is(.timer-edit-button, .icon-button),
  .countup-more { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
  .timer-dashboard-toolbar :is(input, select), .timer-runs-filters :is(input, select),
  .counter-dashboard-controls select, .counter-dashboard-controls .countdown-zones button,
  body[data-current-view="countdowns"] .countdown-actions button,
  #focus-page .focus-duration-control > button, #time-focus-duration, #time-focus-settings { min-height: 44px; }
  .counter-dashboard-controls :is(.search-field input, .countups-search-control input) { min-height: 44px; font-size: 16px; }
  .counter-dashboard-controls :is(.search-field > button, .countups-search-control > button) { min-height: 44px; height: 44px; width: 44px; flex-basis: 44px; }
  .timer-dashboard-toolbar :is(input, select), .timer-runs-filters :is(input, select),
  .counter-dashboard-controls select, #time-focus-task { font-size: 16px; }
}

/* Dashboard density follows the space available to the collection. One or two
   items keep generous cards; four items never leave an isolated fourth row. */
#counter-content { container: counter-collection / inline-size; }
#timer-content, .timer-presets-section { container: timer-collection / inline-size; min-width: 0; }
:is(#countdown-list, #countups-rows, #timer-results .timer-grid, .timer-presets-grid) { --card-columns: 1; }
body:is([data-current-view="timers"], [data-current-view="countdowns"], [data-current-view="countups"]) :is(#countdown-list, #countups-rows, #timer-results .timer-grid, .timer-presets-grid) {
  grid-template-columns: repeat(var(--card-columns), minmax(0, 1fr));
  gap: 16px;
}
@container counter-collection (min-width: 560px) {
  :is(#countdown-list, #countups-rows):has(> :nth-child(2)) { --card-columns: 2; }
}
@container counter-collection (min-width: 800px) {
  :is(#countdown-list, #countups-rows):has(> :nth-child(3)):not(:has(> :nth-child(4))),
  :is(#countdown-list, #countups-rows):has(> :nth-child(5)) { --card-columns: 3; }
}
@container counter-collection (min-width: 1080px) {
  :is(#countdown-list, #countups-rows):has(> :nth-child(4)) { --card-columns: 4; }
}
@container timer-collection (min-width: 500px) {
  :is(.timer-presets-grid, #timer-results .timer-grid):has(> :nth-child(2)) { --card-columns: 2; }
}
@container timer-collection (min-width: 740px) {
  :is(.timer-presets-grid, #timer-results .timer-grid):has(> :nth-child(3)):not(:has(> :nth-child(4))),
  :is(.timer-presets-grid, #timer-results .timer-grid):has(> :nth-child(5)) { --card-columns: 3; }
}
@container timer-collection (min-width: 940px) {
  :is(.timer-presets-grid, #timer-results .timer-grid):has(> :nth-child(4)) { --card-columns: 4; }
}
body[data-current-view="countdowns"] .countdown-row,
body[data-current-view="countups"] .countup-row { min-height: 216px; padding: 18px; }
body[data-current-view="countdowns"] .countdown-time,
body[data-current-view="countdowns"] .countdown-row.is-reached .countdown-time { color: var(--ink); }
body[data-current-view="countdowns"] .countdown-row.is-reached { border-color: var(--time-accent); }
body[data-current-view="countdowns"] .countdown-row.is-reached .countdown-time { color: var(--time-accent); }
body[data-current-view="countdowns"] #countdown-list:not(:has(> :nth-child(3))) > .countdown-row,
body[data-current-view="countups"] #countups-rows:not(:has(> :nth-child(3))) > .countup-row,
body[data-current-view="timers"] :is(.timer-presets-grid, #timer-results .timer-grid):not(:has(> :nth-child(3))) > :is(.timer-run-preset, .timer-card) {
  min-height: 292px;
  padding: 24px;
}
body[data-current-view="countdowns"] #countdown-list:not(:has(> :nth-child(3))) .countdown-time,
body[data-current-view="countups"] #countups-rows:not(:has(> :nth-child(3))) .countup-elapsed,
body[data-current-view="timers"] .timer-presets-grid:not(:has(> :nth-child(3))) .timer-preset-duration {
  font-size: clamp(40px, 4.5vw, 60px);
  line-height: 1.15;
}
body[data-current-view="countdowns"] .countdown-actions button,
body[data-current-view="countups"] :is(.countup-more, .counter-edit-action),
.timer-source-filters button, .timer-panel-close { min-width: 44px; min-height: 44px; }
.timer-dashboard-layout { min-width: 0; }
.timer-presets-section .timer-runs-grid { margin: 12px 0 20px; }
body[data-current-view="timers"] .timer-run-preset { min-height: 208px; padding: 16px; }
body[data-current-view="timers"] .timer-run-preset h4 { font-size: 16px; }
body[data-current-view="timers"] .timer-run-preset .timer-preset-duration { margin: 14px 0 8px; font-size: 34px; font-weight: 650; letter-spacing: -.9px; line-height: 1.1; }
body[data-current-view="timers"] .timer-run-preset .timer-preset-list { margin: 0 0 8px; font-size: 12px; color: var(--muted); line-height: 1.5; }
body[data-current-view="timers"] .timer-run-preset .timer-source-status { display: flex; align-items: center; gap: 7px; align-self: start; margin: 0 0 12px; padding: 4px 8px; border-radius: 20px; color: var(--ink); background: var(--surface-hover); font-size: 12px; line-height: 1.5; }
.timer-source-status::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--muted); }
[data-source-state="running"] .timer-source-status::before { background: #79bb7a; }
body[data-current-view="timers"] .timer-run-preset.is-selected { border-color: var(--time-accent); box-shadow: inset 0 0 0 1px var(--time-accent); }
.timer-run-preset > .timer-runs-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; border: 0; }
.timer-run-preset > .timer-runs-actions .button { flex: 1 1 100px; min-width: 0; min-height: 44px; padding: 7px 10px; border-radius: 5px; font-size: 12px; white-space: normal; }
.timer-run-preset > .timer-runs-actions .subtle-link { min-height: 44px; }
.timer-source-filters { display: flex; flex-wrap: wrap; gap: 4px; align-self: end; padding: 3px; border: 1px solid var(--border); border-radius: 6px; background: var(--paper); }
.timer-source-filters button { flex: 1 1 auto; padding: 7px 10px; border-radius: 4px; font-size: 13px; white-space: nowrap; }
.timer-source-filters button[aria-pressed="true"] { color: var(--ink); background: var(--sage); box-shadow: inset 0 0 0 1px var(--border); }
.timer-source-filters button span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.timer-runs-workspace > .timer-runs-filters { grid-template-columns: minmax(180px, 1fr) auto; align-items: end; padding: 12px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); }
.timer-runs-workspace > .timer-runs-filters input { min-height: 44px; }
.timer-source-runs { min-width: 0; }
.timer-source-runs .timer-runs-section-heading { align-items: start; }
.timer-source-runs .timer-runs-section-heading p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.timer-run-filter-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.timer-run-filter-label select { min-height: 44px; min-width: 150px; max-width: 100%; padding: 8px 30px 8px 10px; border: 1px solid var(--border); border-radius: 5px; color: var(--ink); background: var(--control); font: inherit; }
.timer-panel-close { display: grid; place-items: center; flex: 0 0 44px; padding: 0; border: 1px solid var(--border); border-radius: 5px; font-size: 26px; line-height: 1; }
.timer-source-runs.is-panel { padding: 18px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); }
body[data-current-view="timers"] .timer-source-runs.is-panel .timer-runs-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 0; }
body[data-current-view="timers"] .timer-source-runs.is-panel .timer-run-card { padding: 16px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; }
body[data-current-view="timers"] .timer-source-runs.is-panel .timer-run-clock { font-size: 34px; }
body[data-current-view="timers"] .timer-source-runs.is-panel .timer-run-card h4 { font-size: 14px; }
.timer-source-runs.is-panel .timer-runs-actions .button { min-height: 44px; padding: 7px 10px; font-size: 12px; }
.timer-source-runs.is-panel .timer-runs-actions .subtle-link { min-height: 44px; }
.timer-source-runs.is-panel .timer-run-adjustment { padding-top: 10px; }
@media (min-width: 1240px) {
  .timer-dashboard-layout.has-run-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 350px); align-items: start; gap: 18px; }
  .timer-source-runs.is-panel { position: sticky; top: calc(var(--workspace-header-height, 60px) + 16px); max-height: calc(100dvh - var(--workspace-header-height, 60px) - 32px); overflow: auto; overscroll-behavior: contain; }
}
@media (max-width: 1239px) {
  .timer-dashboard-layout.has-run-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .timer-dashboard-layout.has-run-panel .timer-source-runs { grid-row: 1; }
}
@media (max-width: 700px) {
  .timer-runs-workspace > .timer-runs-filters { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  body[data-current-view="countdowns"] #countdown-list:not(:has(> :nth-child(3))) > .countdown-row,
  body[data-current-view="countups"] #countups-rows:not(:has(> :nth-child(3))) > .countup-row,
  body[data-current-view="timers"] :is(.timer-presets-grid, #timer-results .timer-grid):not(:has(> :nth-child(3))) > :is(.timer-run-preset, .timer-card) { min-height: 248px; padding: 18px; }
  .timer-source-runs.is-panel { padding: 14px; }
}

/* Embedded list runs reuse the same actions and inherit their list width. */
.timer-runs-compact .timer-runs-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.timer-runs-compact .timer-run-card { border-radius: 7px; padding: 16px; }
.timer-runs-compact .timer-run-clock { font-size: 34px; }
.timer-runs-compact .timer-runs-status:empty { display: none; }
.timer-runs-compact .timer-runs-empty { margin: 0; padding: 12px 0; font-size: 13px; }

:is([data-source-state="paused"], [data-source-state="finished"]) .timer-source-status::before { background: var(--time-accent); }
