/* Task sidebar: one shared row geometry for folders, names and hover actions. */
html body .tg-toolbar{display:flex;justify-content:flex-end;margin:0 0 4px}
html body .tg-toolbar button.btn-secondary{font-size:12px;min-height:28px;height:28px;padding:3px 8px;border:0!important;background:transparent!important;color:var(--bc-muted);box-shadow:none!important}
html body .tg-toolbar button.btn-secondary:hover{background:var(--bc-hover)!important;color:var(--bc-text)}
html body .ts-list:has(>.task-group){gap:2px;padding-right:0;scrollbar-gutter:stable}
html body .task-group{flex:none;min-width:0;margin:0 0 6px;border-radius:7px}
html body .tg-header{position:relative;display:flex;align-items:center;min-height:32px;height:auto;padding:0 36px 0 8px;border-radius:7px;color:var(--bc-text);cursor:pointer;transition:background-color .14s ease}
html body .tg-header:has(.tg-add){padding-right:64px}
html body .tg-header:is(:hover,:focus-within,.tg-menu-open){background:var(--bc-hover)}
html body .tg-main{display:flex;align-items:center;gap:8px;flex:1;min-width:0;min-height:32px;outline:none}
html body .tg-main:focus-visible{outline:2px solid var(--bc-ring);outline-offset:-2px;border-radius:5px}
html body .tg-folder{display:flex;align-items:center;justify-content:center;flex:0 0 16px;width:16px;height:20px;color:var(--bc-muted)}
html body .tg-folder svg{width:16px;height:16px;display:block}
html body .tg-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;line-height:20px}
html body .tg-count{position:absolute;right:8px;width:24px;text-align:center;font-size:11px;font-weight:400;line-height:20px;font-variant-numeric:tabular-nums;color:var(--bc-muted);pointer-events:none;transition:opacity .12s ease}
html body .tg-header :is(.tg-add,.tg-more){position:absolute;right:4px;top:2px;display:flex;align-items:center;justify-content:center;width:28px;min-width:28px;height:28px;padding:5px;border:0!important;border-radius:5px;background:transparent!important;color:var(--bc-muted);box-shadow:none!important;transform:none!important;opacity:0;pointer-events:none;transition:opacity .12s ease,background-color .12s ease}
html body .tg-header .tg-add{right:32px}
html body :is(.tg-add,.tg-more) svg{width:16px;height:16px}
html body .tg-header:is(:hover,:focus-within,.tg-menu-open) :is(.tg-add,.tg-more){opacity:1;pointer-events:auto}
html body .tg-header:is(:hover,:focus-within,.tg-menu-open) .tg-count{opacity:0}
html body .tg-header :is(.tg-add,.tg-more):hover{color:var(--bc-text);background:var(--bc-selected)!important}
html body .tg-content{display:block;height:auto;overflow:hidden;contain:layout style}
html body .tg-collapsed .tg-content{height:0}
html body .tg-items{display:flex;flex-direction:column;gap:2px;min-height:0;overflow:hidden}
html body .task-group .task-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,104px);align-items:center;gap:6px;min-height:32px;height:32px;margin:0!important;padding:5px 8px 5px 32px;border:0!important;border-radius:7px;background:transparent!important;box-shadow:none!important;transform:none!important;transition:background-color .14s ease,opacity .14s ease}
html body .task-group .task-card:hover{background:var(--bc-hover)!important}
html body .task-group .task-card.active{padding-left:32px;background:var(--bc-selected)!important}
html body .task-group .task-card .tc-head{display:contents}
html body .task-group .task-card .tc-name{font-size:12px;line-height:20px;font-weight:400;cursor:pointer}
html body .task-group .task-card.pinned .tc-name{font-weight:600}
html body .task-group .task-card .tc-status{min-width:0;width:auto;max-width:104px;padding:0;margin:0;transition:opacity .12s ease}
html body .task-group .task-card .tc-actions{position:absolute;right:5px;top:50%;display:flex;align-items:center;gap:1px;transform:translateY(-50%);opacity:0;pointer-events:none;transition:opacity .12s ease}
html body .task-group .task-card:is(:hover,:focus-within) .tc-actions{opacity:1;pointer-events:auto}
html body .task-group .task-card:is(:hover,:focus-within) .tc-status{opacity:0}
html body .task-group .task-card .tc-actions button{display:flex;align-items:center;justify-content:center;min-width:22px!important;width:22px!important;height:26px;padding:3px!important;border:0!important;border-radius:5px;background:transparent!important;box-shadow:none!important;color:var(--bc-muted);transform:none!important}
html body .task-group .task-card .tc-actions button:hover{color:var(--bc-text);background:var(--bc-selected)!important}
html body .task-group .task-card .tc-actions svg{width:13px;height:13px}
html body .tg-empty{margin:4px 8px 6px 32px;font-size:12px;line-height:20px;color:var(--bc-muted)}
html body .tg-drop>.tg-header{background:var(--bc-selected);box-shadow:inset 0 0 0 1px var(--bc-ring)}
html body .tg-dragging{opacity:.4}
html body .tg-archive-card .tc-head small{font-size:10px;line-height:16px;text-align:right;color:var(--bc-muted);transition:opacity .12s ease}
html body .tg-archive-card:is(:hover,:focus-within) .tc-head small{opacity:0}
html body .tg-name-form{display:flex;align-items:center;flex-wrap:wrap;gap:3px;width:100%;padding:2px 0}
html body .tg-name-form input{flex:1;min-width:0;width:80px;height:28px!important;min-height:28px!important;padding:3px 6px!important;font:inherit;border-radius:5px;border:1px solid var(--bc-ring);background:var(--bc-surface);color:var(--bc-text)}
html body .tg-name-form button{width:22px;min-width:22px;height:26px;padding:0;border:0!important;border-radius:4px;background:transparent!important;color:var(--bc-muted);box-shadow:none!important}
html body .tg-name-form button:hover{background:var(--bc-selected)!important;color:var(--bc-text)}
html body .tg-name-form [role=status]{flex-basis:100%;font-size:12px;white-space:normal;color:var(--bc-error)}
html body .tg-new-name{margin:2px 8px 4px 32px}
html body .tg-menu{position:fixed;inset:auto;margin:0;padding:4px;width:196px;box-sizing:border-box;border:1px solid var(--bc-border);border-radius:8px;background:var(--bc-surface);color:var(--bc-text);box-shadow:0 4px 14px #00000012,0 14px 34px #00000012;transform-origin:top right;animation:tg-menu-in .12s cubic-bezier(.2,.8,.2,1)}
html body .tg-menu button{display:flex;align-items:center;gap:9px;width:100%;height:32px;padding:0 9px;border:0!important;border-radius:5px;background:transparent!important;box-shadow:none!important;color:var(--bc-text);font-size:13px;font-weight:400;line-height:20px;text-align:left;transform:none!important;cursor:pointer}
html body .tg-menu button:is(:hover,:focus-visible){outline:none;background:var(--bc-hover)!important}
html body .tg-menu button svg{width:15px;height:15px;flex:none;color:var(--bc-muted)}
html body .tg-menu button[data-group-action=delete],html body .tg-menu button[data-group-action=delete] svg{color:var(--bc-error)}
html body .tg-menu button:disabled{opacity:.4;cursor:default;background:transparent!important}
html body .tg-menu p{margin:4px 8px;font-size:11px;line-height:18px;color:var(--bc-muted)}
html body .tg-dialog{width:420px;max-width:calc(100vw - 40px);padding:20px;border:1px solid var(--bc-border);border-radius:10px;background:var(--bc-surface);color:var(--bc-text);margin:auto;box-shadow:0 16px 48px #0003}
html body .tg-dialog::backdrop{background:#0006}
html body .tg-confirm-copy{font-size:13px;line-height:1.7;color:var(--bc-muted)}
html body .tg-dialog h3{font-size:16px;margin:0 0 18px}
html body .tg-dialog label{display:flex;align-items:flex-start;gap:10px;margin:14px 0}
html body .tg-dialog small{display:block;line-height:1.6;color:var(--bc-muted);margin-top:5px}
html body .tg-dialog strong{font-size:14px}
html body .tg-dialog input[type=radio]{margin-top:4px}
html body .tg-dialog form>div{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
html body .tg-dialog [role=status]{color:var(--bc-error);font-size:13px}
html body .tg-dialog select{width:100%;height:34px;font:inherit;background:inherit;color:inherit;border:1px solid var(--bc-border);border-radius:6px;padding:4px 8px}
@keyframes tg-menu-in{from{opacity:0;transform:translateY(-3px) scale(.98)}to{opacity:1;transform:none}}
@media (hover:none){html body .tg-header .tg-more,html body .task-group .task-card .tc-actions{opacity:1;pointer-events:auto}html body .tg-count,html body .task-group .task-card .tc-status{opacity:0}}
@media(prefers-reduced-motion:reduce){html body :is(.tg-header,.tg-count,.tg-add,.tg-more,.tg-content,.tg-menu,.task-group .task-card,.task-group .tc-status,.task-group .tc-actions){transition:none;animation:none}}

html body .task-group .tg-removing{opacity:.6}html body .task-group .tg-removing :is(.tc-status,.tc-actions){visibility:hidden}html body .task-group .tg-removing::after{content:'删除中…';position:absolute;right:8px;font-size:10px;color:var(--bc-muted)}
html body .tg-restoring .tc-actions{visibility:hidden}
