/* Today's plan: drag handle (My order) and the focus timer button on each row. */
.chop-drag, .chop-focus { display: inline-grid; place-items: center; width: 32px; height: 32px; min-width: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--o-muted, #8a8f98); cursor: pointer; }
.chop-drag { cursor: grab; touch-action: none; }
.chop-drag svg, .chop-focus svg { width: 18px; height: 18px; }
.chop-drag:hover, .chop-focus:hover, .chop-drag:focus-visible, .chop-focus:focus-visible { color: var(--o-ink, #f4f4f5); background: var(--o-raise-2, rgba(255,255,255,.07)); }
[data-task-row].is-dragging { opacity: .85; box-shadow: 0 10px 30px rgba(0,0,0,.35); position: relative; z-index: 2; background: var(--o-raise, #121214); border-radius: 12px; }
body:has([data-task-row].is-dragging) { user-select: none; cursor: grabbing; }
.capture-focus svg { width: 18px; height: 18px; }

/* The timer: everything else fades out behind it. */
.focus-timer { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--o-line-strong, #2c2c31); border-radius: 22px; background: var(--o-raise, #111114); color: var(--o-ink, #f4f4f5); box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: auto; }
.focus-timer::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: ft-fade .5s ease both; }
.focus-timer[open] { animation: ft-rise .35s ease both; }
@keyframes ft-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ft-rise { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .focus-timer::backdrop, .focus-timer[open] { animation: none; } }
.ft-inner { position: relative; padding: 26px 24px 24px; text-align: center; }
#focusTimer .ft-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: none; color: var(--o-muted, #a1a1aa); font-size: 22px; cursor: pointer; }
.ft-close:hover { background: var(--o-raise-2, #1d1d21); color: var(--o-ink, #fff); }
.ft-kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--o-muted, #a1a1aa); }
.ft-inner h2 { margin: 6px 36px 18px; font-size: 21px; line-height: 1.3; font-weight: 650; overflow-wrap: anywhere; }
.ft-field { display: grid; gap: 8px; margin: 0 0 14px; text-align: left; }
.ft-field > span { font-size: 14px; color: var(--o-muted, #a1a1aa); }
.ft-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#focusTimer .ft-chips button, #focusTimer .ft-custom input { box-shadow: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; background: none; color: var(--o-ink, #f4f4f5); font: inherit; font-size: 15px; cursor: pointer; }
#focusTimer .ft-chips button[aria-checked="true"] { background: var(--o-accent, #3b9eff); border-color: var(--o-accent, #3b9eff); color: #fff; font-weight: 600; }
.ft-custom input { width: 92px; cursor: text; }
.ft-summary { margin: 4px 0 18px; font-size: 14.5px; color: var(--o-ink-2, #d4d4d8); }
.ft-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#focusTimer .ft-actions button { min-height: 46px; min-width: 104px; padding: 0 20px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; background: none; color: var(--o-ink, #f4f4f5); font: inherit; font-size: 16px; cursor: pointer; }
#focusTimer .ft-actions button.primary { background: var(--o-accent, #3b9eff); border-color: var(--o-accent, #3b9eff); color: #fff; font-weight: 650; }
.ft-ring { position: relative; width: min(240px, 66vw); aspect-ratio: 1; margin: 0 auto 22px; }
.ft-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ft-ring circle { fill: none; stroke-width: 10; }
.ft-track { stroke: var(--o-raise-2, #222227); }
.ft-bar { stroke: var(--o-accent, #3b9eff); stroke-linecap: round; transition: stroke-dashoffset .5s linear; }
.ft-break .ft-bar { stroke: #34c77b; }
.ft-time { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(44px, 14vw, 58px); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ft-paused { position: absolute; left: 0; right: 0; bottom: 26%; font-size: 13px; color: var(--o-muted, #a1a1aa); }
#focusTimer .ft-complete-link { box-shadow: none; margin-top: 16px; min-height: 40px; padding: 0 12px; border: 0; background: none; color: var(--o-muted, #a1a1aa); font: inherit; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ft-done-line { margin: 0 0 20px; font-size: 17px; color: var(--o-ink-2, #d4d4d8); }
#focusTimerPill { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px)); min-height: 44px; padding: 0 18px 0 14px; border: 1px solid var(--o-line-strong, #333338); border-radius: 999px; background: var(--o-raise-2, #1c1c1f); color: var(--o-ink, #f4f4f5); font: inherit; font-size: 15px; box-shadow: 0 12px 30px rgba(0,0,0,.4); cursor: pointer; }
#focusTimerPill[hidden] { display: none; }
.ft-pill-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: var(--o-accent, #3b9eff); }
.ft-pill-dot.ft-break { background: #34c77b; }
.ft-pill-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.ft-pill-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--o-ink-2, #d4d4d8); }
html[data-theme="light"] .focus-timer, html[data-theme="light"] #focusTimerPill { background: #fff; color: #18181b; border-color: #e4e4e7; }
html[data-theme="light"] #focusTimer .ft-chips button, html[data-theme="light"] #focusTimer .ft-actions button:not(.primary), html[data-theme="light"] #focusTimer .ft-custom input { color: #18181b; border-color: #d4d4d8; }
html[data-theme="light"] .focus-timer::backdrop { background: rgba(250,250,250,.8); }
html[data-theme="light"] .ft-track { stroke: #ececef; }
.chop-row-tools { display: inline-flex; align-items: center; gap: 2px; }
