/* Reading order: task, schedule, consequence, then bonuses and controls. */
:is(#commitList .task,.task.commit-drag-card){grid-template-columns:34px minmax(0,1fr) 30px;gap:6px 10px;align-items:start;padding:14px 14px 4px;border-radius:12px;}
:is(#commitList .task,.task.commit-drag-card).geass{border:1px solid #9333ea;box-shadow:inset 0 0 0 3px #9333ea;background:linear-gradient(110deg,#a879ef0b,transparent 65%),var(--panel);}
:is(#commitList .task,.task.commit-drag-card).done{border-color:var(--gain);box-shadow:none;}
:is(#commitList .task,.task.commit-drag-card).geass.done{box-shadow:inset 0 0 0 3px var(--gain);}
:is(#commitList .task,.task.commit-drag-card) .geass-fulfill-label{top:calc(50% - 38px);}
/* Reuse the existing completion layer and cleanup; only its paint changes. */
:is(#commitList .task,.task.commit-drag-card):not(.geass) .clear-glow{box-shadow:0 0 24px 3px #22c55e99,0 0 52px 12px #22c55e59;opacity:0;animation:regularCompletionAura 1.05s cubic-bezier(.23,1,.32,1) forwards;}
@keyframes regularCompletionAura{0%{opacity:0}18%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){:is(#commitList .task,.task.commit-drag-card):not(.geass) .clear-glow{animation:none;opacity:.18;}}
/* Not due today: dimmed, as style.css's `.task.off{opacity:.45}` always did. This sheet loads
   last and the #commitList id inside :is() outranks that bare class rule, so the line here
   decides it: `opacity:1` (copied from the mobile-layout preview at v3.0) silently undid the
   dimming until B restored it (Tin, 2026-10-15). Borders keep their hue under the dim. */
:is(#commitList .task,.task.commit-drag-card).off{opacity:.45;}
:is(#commitList .task,.task.commit-drag-card).off .name{color:#aaa5b5;}
:is(#commitList .task,.task.commit-drag-card) .task-kind{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:600;letter-spacing:.06em;color:#c4a2ff;}
:is(#commitList .task,.task.commit-drag-card) .task-title{display:flex;align-items:flex-start;gap:10px;min-width:0;}
:is(#commitList .task,.task.commit-drag-card) .task-title .emoji{flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;font-size:19px;line-height:1;background:#ffffff06;border-radius:8px;margin-top:-4px;}
:is(#commitList .task,.task.commit-drag-card) .task-title .name-text{min-width:0;}
:is(#commitList .task,.task.commit-drag-card) .task-bonuses{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px 8px;min-width:0;margin-right:auto;}
:is(#commitList .task,.task.commit-drag-card) .check{grid-column:3;grid-row:1;margin-top:2px;justify-self:end;}
:is(#commitList .task,.task.commit-drag-card) .name{grid-column:1/3;grid-row:1;line-height:1.45;font-size:16px;font-weight:600;letter-spacing:0;}
/* Row 2: the schedule, with room kept on the right for the pencil and × under the checkbox. */
:is(#commitList .task,.task.commit-drag-card) .sched{grid-column:2/-1;grid-row:2;min-width:0;padding-right:68px;overflow-wrap:anywhere;font-size:13px;line-height:1.5;letter-spacing:0;color:#aaa5b5;}
:is(#commitList .task,.task.commit-drag-card) .sched span{white-space:normal;}
/* Batch 2 B (Tin 2026-10-16): Edit is a pencil and sits with the delete × top right, under the
   checkbox, the same place on every card. Each button is 28px to look at; its ::before makes
   the tap area 36px square, extended sideways and DOWN only, so it never reaches up into the
   checkbox's own 44px hit area. The negative block margin keeps the schedule line its height. */
:is(#commitList .task,.task.commit-drag-card) .task-tools{grid-column:2/-1;grid-row:2;justify-self:end;align-self:start;display:flex;align-items:center;gap:8px;margin:-4px 0 -4px 0;position:relative;z-index:1;}
:is(#commitList .task,.task.commit-drag-card) .task-tools :is(.edit-btn,.del){position:relative;display:grid;place-items:center;width:28px;min-width:28px;height:28px;min-height:28px;margin:0;padding:0;background:none;border:0;border-radius:7px;font:500 19px/1 'DM Sans',sans-serif;color:#aaa5b5;opacity:1;}
:is(#commitList .task,.task.commit-drag-card) .task-tools :is(.edit-btn,.del)::before{content:'';position:absolute;inset:0 -4px -8px -4px;}
:is(#commitList .task,.task.commit-drag-card) .task-tools .edit-pencil{width:16px;height:16px;display:block;}
:is(#commitList .task,.task.commit-drag-card) .task-tools .del.armed{width:auto;padding:0 4px;font-size:12px;font-weight:600;color:var(--loss);}
:is(#commitList .task,.task.commit-drag-card) .task-tools :is(.edit-btn,.del):focus-visible{outline:2px solid var(--rank);outline-offset:-2px;}
@media(hover:hover) and (pointer:fine){:is(#commitList .task,.task.commit-drag-card) .task-tools .edit-btn:hover{color:var(--rank);background:#ffffff08;}
 :is(#commitList .task,.task.commit-drag-card) .task-tools .del:hover{color:#dc2626;background:#ffffff08;}}
/* Row 3 (Geass only): the Geass word and the red wing, right-aligned. No penalty text. */
:is(#commitList .task,.task.commit-drag-card) .geass-row{grid-column:2/-1;grid-row:3;margin:0;display:flex;justify-content:flex-end;align-items:center;min-width:0;}
:is(#commitList .task,.task.commit-drag-card) .geass-mark{display:flex;align-items:center;gap:7px;white-space:nowrap;}
:is(#commitList .task,.task.commit-drag-card) .task-rules{grid-column:2/-1;grid-row:4;min-width:0;overflow-wrap:anywhere;}
:is(#commitList .task,.task.commit-drag-card) .commit-drag-handle{grid-column:1;grid-row:5;align-self:center;justify-self:center;width:34px;min-width:34px;height:44px;color:#85808f;}
/* The footer is ONE row: bonus pills on the left, "N rules" and "+XP" on the right. */
:is(#commitList .task,.task.commit-drag-card) .task-actions{grid-column:2/-1;grid-row:5;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:0 8px;min-width:0;min-height:44px;border-top:1px solid #ffffff0a;margin-top:4px;}
:is(#commitList .task,.task.commit-drag-card) .task-stats{display:flex;align-items:center;gap:8px;margin-left:auto;white-space:nowrap;}
:is(#commitList .task,.task.commit-drag-card):not(:has(.task-rules)) :is(.task-actions,.commit-drag-handle){grid-row:4;}
:is(#commitList .task,.task.commit-drag-card):not(:has(.task-rules,.geass-row)) :is(.task-actions,.commit-drag-handle){grid-row:3;}
:is(#commitList .task,.task.commit-drag-card) .task-actions .rule-chip{position:static;min-width:0;min-height:44px;margin:0;padding:4px 0;background:none;border:0;border-radius:6px;font:500 12px 'DM Sans',sans-serif;color:#bcb1d2;opacity:1;}
:is(#commitList .task,.task.commit-drag-card) .task-actions .pts{white-space:nowrap;font-size:12px;font-weight:600;color:#d4cddd;margin:0;}
:is(#commitList .task,.task.commit-drag-card) .task-bonuses>*{font-size:11px;line-height:1.5;font-weight:600;letter-spacing:0;margin:0;padding:0;white-space:nowrap;border:0;background:none;}
:is(#commitList .task,.task.commit-drag-card) .geass-keep{color:#c4a2ff;}
:is(#commitList .task,.task.commit-drag-card) .week-pill,.chip.wkbuff b{color:#66dda0;}
.hero>#weekBuffChip{width:fit-content;max-width:100%;margin:0 0 14px auto;padding:3px 0;border:0;background:none;display:flex;gap:6px;flex-wrap:wrap;white-space:normal;font-size:11px;}
.chip.wkbuff.locked b{text-decoration:line-through;}
.chip.wkbuff.locked::after{content:'Suspended';color:var(--loss);}
.hero-character img{position:absolute;inset:auto 0 6%;height:94%;object-position:center bottom;}
.hero-character::after{bottom:calc(6% - 9px);}
/* The Geass stake that used to sit on the card, now at the top of the edit modal's Geass field. */
.edit-stake{margin:0 0 10px;padding:8px 10px;border:1px solid rgba(239,68,68,.35);border-radius:8px;background:rgba(239,68,68,.08);color:var(--loss);font-size:13px;line-height:1.45;overflow-wrap:anywhere;}
.edit-stake[hidden]{display:none;}
