@layer interface {
  @media screen {
    html[data-theme] .bootstrap-panel.state-card.seed-error-strip {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      align-items: center;
      gap: 4px;
      min-height: 0;
      width: 100%;
      margin: 0;
      padding: 0 4px 0 12px;
      border: 1px solid color-mix(in srgb, var(--muted) 45%, var(--line));
      border-radius: 8px;
      background: var(--paper);
      color: var(--ink);
      box-shadow: none;
    }
    html[data-theme] .seed-error-strip .seed-error-message {
      min-width: 0;
      margin: 0;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: .88rem;
      line-height: 1.3;
    }
    html[data-theme] .seed-error-strip .button {
      min-width: 40px;
      min-height: 40px;
      padding: 0 8px;
      font-size: .88rem;
    }
    html[data-theme="oled"]:not([data-appearance="light"]) .bootstrap-panel.state-card.seed-error-strip {
      border-color: rgba(245, 158, 11, .42);
      background: var(--bg-surface);
    }
    html[data-theme] .focus-timer-panel .focus-clock-digits {
      font-size: 2.25rem;
      line-height: 1.12;
      letter-spacing: -.02em;
    }
    html[data-theme] .focus-progress-track {
      appearance: none;
      display: block;
      width: 100%;
      height: 4px;
      padding: 0;
      border: 0;
      border-radius: 999px;
      background: var(--line);
      color: var(--accent, var(--forest));
    }
    html[data-theme] .focus-progress-track[hidden] { display: none; }
    .focus-progress-track { overflow: hidden; }
    .focus-progress-fill { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--accent, var(--forest)); }
    .focus-progress-track > progress { display: block; width: 100%; height: 100%; appearance: none; border: 0; }
    html[data-theme] .focus-progress-track > progress::-webkit-progress-bar { background: var(--line); }
    html[data-theme] .focus-progress-track > progress::-webkit-progress-value { border-radius: inherit; background: var(--accent, var(--forest)); }
    html[data-theme] .focus-progress-track > progress::-moz-progress-bar { border-radius: inherit; background: var(--accent, var(--forest)); }
    html[data-theme] .focus-timer-panel .focus-controls { gap: 8px; }
    .focus-primary-controls {
      display: flex;
      align-items: center;
      justify-content: inherit;
      gap: 4px;
      flex-basis: 100%;
    }
    html[data-theme] .focus-primary-controls .button {
      min-width: 40px;
      min-height: 40px;
      padding: 4px 8px;
      white-space: nowrap;
    }
    html[data-theme] .focus-primary-controls [data-focus-preset] {
      font-family: var(--font-mono, ui-monospace), monospace;
      font-variant-numeric: tabular-nums;
    }
    html[data-theme] .focus-primary-controls [aria-pressed="true"] {
      border-color: var(--accent, var(--forest));
      color: var(--ink);
    }
    html[data-theme] .app-shell[data-view="today"] :is(.today-disclosure, .focus-options, .focus-history-fold, .state-first-panel) > summary {
      display: flex;
      align-items: center;
      gap: 8px;
      list-style: none;
    }
    .app-shell[data-view="today"] :is(.today-disclosure, .focus-options, .focus-history-fold, .state-first-panel) > summary::-webkit-details-marker {
      display: none;
    }
    .app-shell[data-view="today"] :is(.today-disclosure, .focus-options, .focus-history-fold, .state-first-panel) > summary::before {
      content: "";
      box-sizing: border-box;
      flex: 0 0 7px;
      height: 7px;
      border-block-end: 1.5px solid currentColor;
      border-inline-end: 1.5px solid currentColor;
      transform: rotate(-45deg);
    }
    .app-shell[data-view="today"] :is(.today-disclosure, .focus-options, .focus-history-fold, .state-first-panel)[open] > summary::before {
      transform: rotate(45deg);
    }
    .day-fold-status {
      display: inline-flex;
      flex: none;
      align-items: center;
      gap: 8px;
      margin-inline-start: auto;
      color: var(--muted);
      font: .78125rem/1.35 var(--font-mono, ui-monospace), monospace;
      font-variant-numeric: tabular-nums;
    }
    .day-fold-status.has-pending::after {
      content: "";
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--accent, var(--forest));
    }
  }
  @media screen and (forced-colors: none) {
    .app-shell[data-view="today"][data-focus-active="true"] :is(#main > details:not([open]), .today-main-steps, .compact-footer):not(:hover):not(:focus-within) {
      opacity: .45;
    }
  }
  @media screen and (prefers-reduced-motion: no-preference) {
    .app-shell[data-view="today"] :is(#main > details, .today-main-steps, .compact-footer) { transition: opacity 140ms ease; }
  }
  @media screen and (forced-colors: active) {
    .day-fold-status.has-pending::after { background: Highlight; forced-color-adjust: none; }
    html[data-theme] .focus-progress-track { outline: 1px solid CanvasText; }
    html[data-theme] .focus-progress-fill { background: Highlight; forced-color-adjust: none; }
  }
}
@media screen {
  .today-bar:has(.day-rhythm-bar) { position: relative; }
  .day-rhythm-label { margin-inline-start: auto; font: 12px/1.4 ui-monospace, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .day-rhythm-bar { position: absolute; inset: auto 0 0; width: 100%; height: 3px; border: 0; border-radius: 0 0 8px 8px; appearance: none; overflow: hidden; }
  .day-rhythm-bar::-webkit-progress-bar { background: var(--line); }
  .day-rhythm-bar::-webkit-progress-value { background: var(--accent, var(--forest)); }
  .day-rhythm-bar::-moz-progress-bar { background: var(--accent, var(--forest)); }
  .task-clear-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: clamp(22px, 4vw, 36px) 16px;
    text-align: center;
  }
  .task-clear-state::before {
    content: '';
    width: 0;
    border: 3px solid var(--accent, var(--forest));
    border-radius: 50%;
  }
  .task-clear-state > p { max-width: 32ch; margin: 0; text-wrap: balance; }
  .completion-echo { position: fixed; inset: 0 auto auto 0; z-index: 10; pointer-events: none; max-width: 85vw; padding: 8px 12px; border-inline-start: 3px solid var(--accent, var(--forest)); background: var(--paper); color: var(--ink); text-decoration: line-through; }
  .task-done .task-title, .task-row.done .task-title-line strong { text-decoration: line-through; opacity: .55; }
  .today-habit-pill.is-done, .habit-card:has([data-habit-check-today][aria-pressed="true"]) .habit-card-title strong { text-decoration: line-through; opacity: .55; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  @keyframes discipline-completed {
    from { border-inline-start-color: var(--accent, var(--forest)); opacity: 1; }
    to { border-inline-start-color: transparent; opacity: .55; }
  }
  .completion-flash { animation: discipline-completed 180ms ease-out; }
}
