
:root{--bg:#f7f7f4;--paper:#fff;--ink:#242b36;--muted:#8b9099;--secondary:#69717d;--line:#e9eae8;--navy:#263547;--gold:#bb842b;--radius:14px;--sidebar:218px;--shadow:0 12px 40px #2934480d;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang TC","Microsoft JhengHei",sans-serif;color:var(--ink);font-size:14px;line-height:1.5;font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;width:100%;min-width:0;overflow-x:clip}body{background:var(--bg)}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button{color:inherit;border:0;background:none}button:disabled{opacity:.3;cursor:default}a{color:inherit;text-decoration:none}input,textarea,select{min-width:0}button:focus-visible,a:focus-visible{outline:2px solid #b98944;outline-offset:3px}input:focus,textarea:focus,select:focus{outline:0;border-color:#a7b3c1;box-shadow:0 0 0 3px #26354709}button, input,textarea,select{transition:background .16s,border-color .16s,color .16s,box-shadow .16s}svg.ico{width:18px;height:18px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:middle}.symbols{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);padding:30px 17px 20px;border-right:1px solid var(--line);background:#fafaf8;display:flex;flex-direction:column;z-index:30;transition:transform .2s}.brand{display:flex;align-items:center;gap:9px;padding:0 8px;margin-bottom:38px}.brand img{width:43px;height:43px;object-fit:contain}.brand b{font-size:21px;font-weight:730;letter-spacing:1px}.brand small{display:block;color:var(--muted);font-size:9px;letter-spacing:1.5px;margin-top:-2px}.sidebar-label{font-size:10px;letter-spacing:1.4px;color:#a3a5aa;padding:0 12px;margin:8px 0 10px}.nav-button{width:100%;display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:9px;color:#7c838b;text-align:left;font-size:13px;margin-bottom:4px}.nav-button.active{background:#eaece9;color:var(--navy);font-weight:650}.nav-button .count{margin-left:auto;font-size:10px;background:#eff0ed;color:#818995;min-width:20px;border-radius:5px;padding:2px 5px;text-align:center}.nav-button.active .count{background:#dde2dd}.sidebar-rule{height:1px;background:var(--line);margin:24px 11px}.week-nav{display:flex;align-items:center;gap:9px;width:100%;padding:9px 12px;color:#969ca2;font-size:12px}.week-nav .week-dot{width:6px;height:6px;border:1px solid #b4b9bc;border-radius:50%}.week-nav.current{color:var(--ink)}.week-nav.current .week-dot{background:#bc8d45;border-color:#bc8d45}.week-nav small{margin-left:auto;font-size:10px}.sidebar-foot{margin-top:auto;padding:20px 10px 0}.local-mode{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--secondary)}.status-dot{width:6px;height:6px;border-radius:50%;background:#82978d;flex:none}.sidebar-foot p{font-size:10px;color:#a4a7ac;margin:7px 0 0}.workspace{margin-left:var(--sidebar);min-width:0;transition:margin-left .2s}.topbar{height:74px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px;gap:18px;background:#f7f7f4eF;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.breadcrumb{display:flex;align-items:center;gap:10px;color:#a0a4ac;font-size:11px}.breadcrumb strong{font-weight:500;color:#67717c}.topbar-right{display:flex;align-items:center;gap:15px}.preview-label{font-size:10px;color:#8f7e61;border:1px solid #e8dfd0;border-radius:5px;padding:3px 7px;white-space:nowrap;background:#faf7f0}.avatar{width:28px;height:28px;display:grid;place-items:center;background:#eceeea;color:#69746b;font-size:10px;border-radius:50%;font-weight:650}.mobile-menu{display:inline-grid}.content{max-width:1600px;margin:0 auto;padding:35px 38px 50px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}.eyebrow{color:#9a9fa5;font-size:10px;letter-spacing:1.4px;margin:7px 0 0}.page-heading h1{font-size:27px;letter-spacing:.6px;font-weight:650;line-height:1.3;margin:0}.page-heading p.subtitle{font-size:11px;color:#959ba3;margin:8px 0 0;letter-spacing:.2px}.heading-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #e0e3e4;border-radius:7px;padding:8px 12px;font-size:11px;white-space:nowrap;background:#fff;color:#626c79;min-height:34px}.btn .ico{width:15px;height:15px}.btn.primary{background:var(--navy);border-color:var(--navy);color:white;box-shadow:0 2px 3px #26354712}.btn.light{background:none;border-color:transparent}.btn.small{padding:5px 9px;min-height:28px;font-size:11px}.btn.danger{color:#b75858;border-color:#ebd9d7}.icon-btn{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:6px;color:#8a929a;flex:none}.icon-btn .ico{width:16px;height:16px}.undo-set{display:flex;gap:0;padding-right:8px;margin-right:3px;border-right:1px solid #e1e3e3}.links-bar{display:flex;align-items:center;gap:10px;white-space:nowrap;overflow-x:auto;scrollbar-width:none;min-height:30px;margin-bottom:22px;color:#9ba0a6}.links-bar::-webkit-scrollbar{display:none}.links-bar>.ico{width:14px;height:14px}.links-label{font-size:10px;flex:none}.quick-link{font-size:10px;color:#7b838c;background:#f0f1ed;display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:5px;max-width:190px}.quick-link span{overflow:hidden;text-overflow:ellipsis}.quick-link .ico{width:10px;height:10px;opacity:.5}.quick-add{font-size:18px;color:#9ba1aa;padding:0 5px}.filters{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.category-track{display:flex;gap:5px;align-items:center;white-space:nowrap;overflow:auto;min-width:0;scrollbar-width:thin;flex:1}.category-track::-webkit-scrollbar{height:3px}.filter-btn{font-size:11px;white-space:nowrap;padding:6px 9px;color:#818994;border-radius:6px;display:flex;align-items:center;gap:6px;flex:none;border:1px solid transparent}.filter-btn.active{color:#3d4756;background:#fff;border-color:#dfe3e4;box-shadow:0 1px 2px #26354704}.category-dot{width:5px;height:5px;border-radius:50%;background:var(--cat-color);display:inline-block;flex:none}.manage-filter{border-left:1px solid #e3e5e4;padding-left:10px;margin-left:5px;display:flex;gap:4px;align-items:center;flex:none;color:#a0a5ad;font-size:10px;white-space:nowrap}.manage-filter .ico{width:13px;height:13px}.filter-tools{display:flex;align-items:center;gap:16px;flex:none}.hide-done{font-size:10px;color:#8c939b;display:flex;gap:6px;align-items:center;white-space:nowrap;cursor:pointer}.hide-done input{accent-color:var(--navy);width:12px;height:12px;margin:0}.searchbox{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:6px;background:#fbfbfa;padding:6px 9px}.searchbox .ico{width:13px;height:13px;color:#a1a7ad}.searchbox input{border:0;outline:0!important;box-shadow:none;background:none;width:100px;font-size:11px;color:var(--ink);padding:0}.searchbox input::placeholder{color:#b0b4b9}.week-card{background:white;border:1px solid #e4e7e6;border-radius:var(--radius);margin-bottom:21px;overflow:hidden;box-shadow:0 3px 5px #29344802}.week-card.current{border-color:#d7ddd9;box-shadow:var(--shadow)}.week-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:15px 21px;border-bottom:1px solid var(--line);background:#fff}.week-card.collapsed .week-head{border-bottom:0;min-height:57px;background:#fafbf9}.week-heading{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.week-index{font-size:15px;letter-spacing:.1px;font-weight:680;color:#485361}.week-index small{font-size:11px;font-weight:400;color:#b0b4ba;margin-right:7px}.week-dates{font-size:11px;color:#9299a2;font-variant-numeric:tabular-nums;letter-spacing:.3px}.current-pill{font-size:9px;color:#a58040;background:#f8f1e4;padding:2px 6px;border-radius:4px}.week-actions{display:flex;align-items:center;gap:8px}.week-count{font-size:10px;color:#a0a6ad;margin-right:8px;white-space:nowrap}.sort-select{font-size:10px;color:#8c949d;border:0;background:none;outline:none;max-width:66px;padding:3px 0;cursor:pointer}.week-actions .icon-btn{width:24px;height:24px}.week-actions .ico{width:13px;height:13px}.week-body{display:grid;grid-template-columns:minmax(245px,.82fr) minmax(340px,1.18fr);padding:0 20px 17px;gap:0}.week-card.collapsed .week-body{display:none}.column{min-width:0;padding-top:17px}.column.events{border-right:1px solid var(--line);padding-right:21px}.column.tasks{padding-left:21px}.column-heading{display:flex;align-items:center;gap:6px;color:#a0a6ac;font-size:10px;margin-bottom:13px}.column-heading .ico{width:13px;height:13px}.column-heading small{margin-left:auto;font-size:10px;color:#bcc0c4}.event-row{display:grid;grid-template-columns:18px minmax(0,1fr) 20px;gap:9px;align-items:start;border:1px solid #e8ebe9;border-radius:8px;padding:11px 9px 11px 11px;margin-bottom:8px;background:#fff}.event-day .ico{width:13px;height:13px;margin-top:3px}.event-day{color:#9a9fa4;font-size:10px;line-height:18px;letter-spacing:.5px;font-variant-numeric:tabular-nums}.item-content{min-width:0;cursor:pointer}.item-copy{display:flex;align-items:flex-start;gap:7px;min-width:0}.tag{font-size:9px;line-height:18px;padding:0 6px;border-radius:4px;color:var(--cat-color);background:var(--cat-bg);white-space:nowrap;display:inline-block;flex:none;margin-top:0}.item-title{font-size:11px;line-height:19px;color:#535d69;overflow-wrap:anywhere;min-width:0;flex:1;letter-spacing:.1px}.item-description{font-size:10px;color:#a3a8ae;margin-top:5px;line-height:1.6}.item-link{display:inline-flex;align-items:center;gap:4px;color:#8493a2;font-size:9px;margin-top:5px;max-width:100%;overflow-wrap:anywhere}.item-link .ico{width:10px;height:10px}.item-links{display:flex;flex-wrap:wrap;gap:0 9px}.task-row{display:grid;grid-template-columns:19px 15px minmax(0,1fr) 20px;gap:8px;align-items:start;min-height:49px;padding:11px 0;border-bottom:1px solid #f0f1ef}.task-row:last-of-type{border-bottom:none}.star{font-family:Arial,sans-serif;font-size:18px;line-height:22px;height:22px;width:22px;padding:0;color:#c4c9ce;border-radius:5px;margin:-1px 0 0 -2px;display:grid;place-items:center}.star.selected{color:#ba8736}.task-check{width:14px;height:14px;border:1.4px solid #c9cfd2;border-radius:4px;background:white;margin-top:2px;display:grid;place-items:center;padding:0}.task-check .ico{width:10px;height:10px;stroke-width:2.5;color:white}.task-row.done .task-check{background:#b9c6bd;border-color:#b9c6bd}.task-row.done .item-title{color:#b0b6bc;text-decoration:line-through}.task-row.done .tag{opacity:.5}.item-actions{position:relative;margin-top:-3px;opacity:0}.item-actions .icon-btn{width:23px;height:24px}.column-add{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;padding:7px;margin-top:8px;border:1px dashed #e4e7e4;border-radius:6px;color:#a2a9ad;font-size:10px;min-height:31px}.column-add .ico{width:12px;height:12px}.empty{font-size:11px;color:#afb4ba;text-align:center;padding:25px 8px}.empty.large{padding:65px 20px;background:#fff;border:1px solid var(--line);border-radius:var(--radius)}.footerline{display:flex;align-items:center;justify-content:space-between;color:#b0b4b9;font-size:9px;padding:3px 3px;gap:12px}.footerline button{font-size:10px;color:#89949c;display:inline-flex;align-items:center;gap:5px}.footerline .ico{width:12px;height:12px}.preview-footer{margin-top:27px;display:flex;justify-content:center;align-items:center;gap:7px;color:#adb2b7;font-size:9px}.preview-footer .ico{width:11px;height:11px}.nav-scrim,.drawer-scrim{position:fixed;inset:0;background:#26354735;z-index:35;backdrop-filter:blur(2px)}.pool-drawer{position:fixed;inset:0 0 0 auto;width:min(410px,95vw);z-index:40;background:#fafbf8;border-left:1px solid #dce2dd;box-shadow:-20px 0 80px #26354716;padding:27px 23px;overflow:auto}.drawer-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.drawer-title h2{font-size:19px;font-weight:630;margin:0}.drawer-sub{font-size:11px;color:#949ba4;margin:0 0 25px}.pool-section-title{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:.5px;color:#8b949d;margin:22px 0 10px}.pool-section-title span{margin-left:auto;color:#b0b7be}.pool-item{background:white;border:1px solid #e4e8e3;border-radius:8px;padding:12px;margin-bottom:8px}.pool-item .item-copy{margin-top:7px}.pool-item-top{display:flex;align-items:center;justify-content:space-between}.pool-item-top .star{margin:0}.pool-place{font-size:9px;color:#9aa5ac;display:flex;align-items:center;gap:4px}.pool-place .ico{width:12px;height:12px}dialog{border:1px solid #e5e7e4;border-radius:16px;padding:0;background:white;color:var(--ink);box-shadow:0 20px 100px #101f3240;width:min(540px,calc(100vw - 28px));max-height:90dvh;overflow:auto}dialog::backdrop{background:#26354755;backdrop-filter:blur(4px)}.modal-box{padding:25px}.modal-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.modal-top h2{font-size:19px;font-weight:640;margin:0}.modal-body{font-size:12px;color:var(--secondary)}.modal-body p{line-height:1.8;margin:10px 0}.form-field{display:block;margin-bottom:16px}.form-field>span{display:block;font-size:11px;color:#7d8792;margin-bottom:6px}.field-input{width:100%;padding:10px 11px;border:1px solid #e0e4e4;border-radius:7px;background:#fdfdfc;font-size:12px;color:var(--ink)}textarea.field-input{resize:vertical;min-height:85px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-check{display:flex;align-items:center;gap:7px;color:#8d743f;font-size:11px;margin:3px 0 17px}.form-check input{accent-color:var(--gold)}.modal-bottom{display:flex;justify-content:flex-end;gap:7px;padding-top:17px;margin-top:20px;border-top:1px solid var(--line)}.modal-hint{font-size:10px;color:#9aa3ab}.link-editor{border:1px solid var(--line);padding:10px;border-radius:8px;margin-top:8px;display:grid;grid-template-columns:minmax(0,1fr) 26px;gap:7px}.link-editor .field-input{padding:7px;font-size:11px;margin-bottom:5px}.category-manager-row{display:flex;align-items:center;gap:9px;padding:9px 0;border-bottom:1px solid var(--line)}.category-manager-row .tag{font-size:10px}.category-manager-row .category-manager-actions{display:flex;align-items:center;gap:4px;margin-left:auto}.category-manager-row select{font-size:10px;border:1px solid var(--line);border-radius:5px;color:#818b96;padding:5px;background:white;max-width:88px}.version-row{border:1px solid var(--line);border-radius:8px;padding:12px;display:flex;align-items:center;gap:10px;margin-bottom:9px}.version-row b{font-size:12px;font-weight:550;display:block;color:#5b6672}.version-row small{font-size:10px;color:#a3aab1}.version-row>.btn{margin-left:auto}.toast{position:fixed;bottom:25px;left:calc(50% + var(--sidebar)/2);transform:translateX(-50%);padding:11px 17px;border-radius:8px;background:#273645;color:#fff;font-size:11px;z-index:100;box-shadow:var(--shadow);max-width:90vw;pointer-events:none}.short-note{padding:12px 13px;border-radius:8px;background:#f5f6f3;color:#8a959c;font-size:11px;line-height:1.8}.mobile-word{display:none}.archived-flag{font-size:9px;color:#929ca5;background:#f0f2ee;border-radius:4px;padding:2px 6px}.archive-block{padding:0 20px 14px}.archive-block .item-title{font-size:11px}.archive-summary{border-top:1px solid var(--line);font-size:11px;color:#9aa3aa;padding:10px 20px}.mobile-status{display:none}.file-input{display:none}
@media(hover:hover) and (pointer:fine){.btn:hover:not(:disabled){background:#f1f3f0;border-color:#d8ddda}.btn.primary:hover{background:#36475b}.nav-button:hover:not(.active){background:#f0f1ed}.week-nav:hover{color:#576576}.icon-btn:hover:not(:disabled){background:#ecefea;color:#455362}.filter-btn:hover{background:#eef0ec}.quick-link:hover{background:#e9ece6}.star:hover{background:#f8efdE;color:#b38235}.event-row:hover{border-color:#d2dacf}.task-row:hover .item-actions,.event-row:hover .item-actions{opacity:1}.column-add:hover{background:#f8faf6;border-color:#cdd7ce;color:#6d8273}.item-link:hover{color:#4f6d89;text-decoration:underline}.pool-place:hover{color:#536c59}}
.data-choice{display:flex;align-items:center;gap:13px;width:100%;padding:15px;border:1px solid var(--line);border-radius:10px;text-align:left;margin-top:10px;background:#fff}.data-choice-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:9px;background:#f0f3ee;color:#7f9081;flex:none}.data-choice b{display:block;font-weight:550;color:#4c5966;font-size:13px}.data-choice small{display:block;color:#a0a7ae;font-size:10px;margin-top:3px}.data-choice>.ico{margin-left:auto;width:14px;color:#a1aab2}.data-choice:hover{background:#fafbf8;border-color:#d6ddd4}
@media(min-width:721px){body.sidebar-collapsed .sidebar{transform:translateX(-100%);visibility:hidden;pointer-events:none}body.sidebar-collapsed .workspace{margin-left:0}body.sidebar-collapsed .toast{left:50%}.topbar .mobile-menu{margin-left:-6px}.topbar .breadcrumb{flex:1}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(min-width:1600px){.content{padding-left:50px;padding-right:50px}.topbar{padding-left:50px;padding-right:50px}.item-title{font-size:12px}.task-row{min-height:51px}}
@media(max-width:1250px){:root{--sidebar:186px}.sidebar{padding-left:12px;padding-right:12px}.content{padding:28px 24px 40px}.topbar{padding:0 24px}.filters{align-items:flex-start;flex-wrap:wrap;gap:12px}.category-track{width:100%;flex-basis:100%}.filter-tools{width:100%;justify-content:flex-end}.heading-actions .optional{display:none}.week-body{grid-template-columns:minmax(210px,.85fr) minmax(270px,1.15fr);padding-left:15px;padding-right:15px}.column.events{padding-right:15px}.column.tasks{padding-left:15px}.item-copy{gap:6px}.task-row{gap:6px}.week-count{display:none}}
@media(max-width:1000px){.week-body{grid-template-columns:1fr}.column.events{border-right:0;border-bottom:1px solid var(--line);padding-right:0;padding-bottom:14px}.column.tasks{padding-left:0}.event-row{grid-template-columns:18px minmax(0,1fr) 20px}.item-title{font-size:12px;line-height:20px}.tag{font-size:10px;line-height:20px}.task-check{margin-top:3px}.column-heading{font-size:11px}.page-heading h1{font-size:25px}.item-actions{opacity:1}}
@media(max-width:720px){:root{--sidebar:0px}.sidebar{width:218px;transform:translateX(-100%);transition:transform .2s;z-index:50}.sidebar.open{transform:translateX(0)}.workspace{margin-left:0}.mobile-menu{display:inline-grid}.topbar{height:58px;padding:0 16px;gap:7px}.breadcrumb{gap:7px;font-size:10px;flex:1}.topbar-right{gap:10px}.avatar{display:none}.preview-label{font-size:9px}.content{padding:25px 16px 30px}.page-heading{align-items:flex-start;gap:9px;margin-bottom:20px}.page-heading h1{font-size:24px}.page-heading .subtitle{max-width:170px;line-height:1.8}.eyebrow{font-size:9px}.heading-actions{gap:4px}.heading-actions>.btn:not(.primary){display:none}.undo-set{padding-right:5px;margin-right:2px;gap:0}.undo-set .icon-btn{width:25px}.btn.primary{padding:8px 10px;min-height:33px}.heading-actions .btn.primary .desktop-word{display:none}.heading-actions .btn.primary .mobile-word{display:inline}.links-bar{gap:7px;margin-bottom:17px}.links-label{display:none}.filters{gap:10px;margin-bottom:19px}.category-track{gap:3px}.filter-btn{font-size:11px;padding:6px 8px}.manage-filter{font-size:10px}.filter-tools{gap:15px;justify-content:space-between}.searchbox{flex:1;max-width:200px}.searchbox input{width:100%}.hide-done{font-size:10px}.week-head{padding:13px 14px;min-height:61px;gap:5px}.week-heading{gap:7px}.week-index{font-size:14px}.week-index small{font-size:10px;margin-right:3px}.week-dates{font-size:10px}.week-actions{gap:4px}.week-head .current-pill{font-size:8px}.week-actions .sort-select{font-size:10px;max-width:43px}.week-body{padding:0 13px 13px}.week-card{margin-bottom:16px;border-radius:11px}.column{padding-top:14px}.column.events{padding-bottom:11px}.column.tasks{padding-top:14px}.column-heading{margin-bottom:9px;font-size:10px}.task-row{grid-template-columns:20px 15px minmax(0,1fr) 20px;gap:6px;padding:10px 0}.item-title{font-size:12px;line-height:21px}.item-copy{gap:6px}.tag{font-size:9px;line-height:20px;padding:0 5px}.task-check{margin-top:3px}.star{margin-top:0}.event-row{padding:10px 8px;gap:6px;grid-template-columns:18px minmax(0,1fr) 20px}.event-day{line-height:20px}.footerline{font-size:9px;align-items:flex-start}.footerline>span{max-width:170px;line-height:1.8}.preview-footer{font-size:9px}.toast{left:50%;bottom:17px;white-space:normal;text-align:center}.modal-box{padding:20px}.field-input,.link-editor .field-input{font-size:16px}.form-grid{gap:10px}.category-manager-row .tag{max-width:110px;white-space:normal}.category-manager-row{gap:5px}.category-manager-actions{gap:1px!important}.category-manager-actions .icon-btn{width:26px}.category-manager-actions select{max-width:70px}.pool-drawer{padding:22px 18px}.column-add{min-height:34px}.mobile-status{display:inline-flex;color:#9aa5aa;align-items:center;gap:5px;font-size:9px}.mobile-status .status-dot{width:5px;height:5px}}
@media(max-width:370px){.heading-actions .undo-set{display:none}.week-dates{flex-basis:100%;margin-left:0}.week-heading{gap:4px 7px}.week-head{min-height:68px}.filter-tools{gap:9px}.preview-label{padding:2px 5px}.breadcrumb>span:first-of-type{display:none}}
.week-card{position:relative;overflow:visible}.week-head{border-radius:14px 14px 0 0}.week-card.collapsed{overflow:hidden}.week-card.collapsed .week-head{border-radius:14px}.week-card:has(.column-sort[open]){z-index:15}.column-heading{position:relative}.column-sort{position:relative;flex:none;margin-left:6px}.column-sort summary{font-size:10px;color:#8f99a3;cursor:pointer;list-style:none;border:1px solid transparent;padding:2px 6px;border-radius:5px;white-space:nowrap;user-select:none}.column-sort summary::-webkit-details-marker{display:none}.column-sort summary::marker{content:''}.column-sort summary>span{font-size:13px;margin-right:3px}.column-sort[open] summary{border-color:#e4e8e1;background:#f6f8f3;color:#5d7062}.column-sort-menu{position:absolute;right:0;top:calc(100% + 7px);width:178px;border:1px solid #e2e7df;border-radius:9px;background:white;box-shadow:0 8px 30px #26354716;padding:5px;z-index:10;color:#657482}.column-sort-menu>button{display:flex;align-items:center;gap:9px;width:100%;text-align:left;padding:9px 8px;border-radius:5px;font-size:11px;line-height:1.5}.column-sort-menu>button>.ico{width:14px;height:14px;color:#8fa18a}.sort-menu-symbol{width:14px;font-size:8px;color:#8fa18a;letter-spacing:-1px;font-weight:600}.sort-menu-foot{font-size:9px;color:#a8afa6;padding:7px 8px 8px;border-top:1px solid #f0f2ed;margin-top:2px}.column-sort-menu>.sort-menu-manage{font-size:10px;color:#9aa39c;padding-top:7px;padding-bottom:7px}.column-sort summary:focus-visible{outline:2px solid #b98944;outline-offset:2px}@media(hover:hover) and (pointer:fine){.column-sort summary:hover{background:#f2f5ee}.column-sort-menu>button:hover{background:#f1f5ec;color:#4c6453}}

/* Compact item density: keep typography and controls, trim surrounding space. */
.week-card{margin-bottom:15px}.week-head{min-height:54px;padding-top:10px;padding-bottom:10px}.week-card.collapsed .week-head{min-height:48px}
.week-body{padding-bottom:11px}.column{padding-top:10px}.column-heading{margin-bottom:6px}
.event-row{padding-top:7px;padding-bottom:7px;margin-bottom:5px;border-radius:7px}
.task-row{min-height:36px;padding-top:6px;padding-bottom:6px}
.item-link{margin-top:3px}.item-description{margin-top:3px}.column-add{padding-top:4px;padding-bottom:4px;margin-top:5px;min-height:26px}
.pool-item{padding:9px 11px;margin-bottom:5px}.pool-item .item-copy{margin-top:3px}.pool-section-title{margin-top:17px;margin-bottom:7px}
@media(min-width:1600px){.task-row{min-height:38px}}
@media(max-width:1000px){.column.events{padding-bottom:9px}.column.tasks{padding-top:10px}}
@media(max-width:720px){.week-card{margin-bottom:12px}.week-head{min-height:51px;padding-top:9px;padding-bottom:9px}.week-body{padding-bottom:10px}.column{padding-top:9px}.column.events{padding-bottom:8px}.column.tasks{padding-top:10px}.column-heading{margin-bottom:5px}.event-row{padding-top:7px;padding-bottom:7px;margin-bottom:5px}.task-row{min-height:36px;padding-top:6px;padding-bottom:6px}.column-add{min-height:29px;padding-top:4px;padding-bottom:4px}}

/* Events share the compact list rhythm used by tasks. */
.event-row{border:0;border-bottom:1px solid #f0f1ef;border-radius:0;background:transparent;min-height:36px;padding:6px 0;margin:0;gap:8px}
.column.events>.event-row:last-of-type{border-bottom:0}
@media(max-width:720px){.event-row{padding:6px 0;margin:0;gap:6px;min-height:36px}}

/* Separate each column heading from its compact item list. */
.column-heading{border-bottom:1px solid #e4e8e3;padding-bottom:7px;margin-bottom:3px}
@media(max-width:720px){.column-heading{padding-bottom:6px;margin-bottom:3px}}

/* Keep the last item on the same spacing rhythm as the other rows. */
.column.events>.event-row:last-of-type,.column.tasks>.task-row:last-of-type{border-bottom:1px solid #f0f1ef;padding-bottom:6px}
.column>.column-add{margin-top:0}
@media(max-width:720px){.column>.column-add{margin-top:0}}

/* Keep essential actions in the sticky top bar at every scroll position. */
.topbar{gap:14px}.topbar>.breadcrumb{flex:1;min-width:0;white-space:nowrap}.topbar-tools{flex:none;gap:7px;margin-left:auto}.topbar-tools .btn{min-height:32px;padding:7px 11px}.topbar-tools .undo-set{margin-right:2px}.page-heading{margin-bottom:24px}.topbar-tools>.btn[data-action="save"]{display:inline-flex}
@media(max-width:900px){.topbar-right{display:none}.topbar>.breadcrumb>span{display:none}.topbar>.breadcrumb{font-size:11px}.topbar{gap:9px}}
@media(max-width:720px){.topbar{padding-left:12px;padding-right:12px;gap:6px}.topbar-tools{gap:5px}.topbar-tools .undo-set{display:flex;gap:0;margin-right:0;padding-right:4px}.topbar-tools .undo-set .icon-btn{width:26px;height:30px}.topbar-tools .btn{padding:7px 9px;min-height:32px;font-size:11px}.topbar-tools .btn.primary .desktop-word{display:none}.topbar-tools .btn.primary .mobile-word{display:inline}.topbar>.breadcrumb{font-size:10px}.page-heading{margin-bottom:20px}.topbar-tools .btn .ico{width:14px;height:14px}}
@media(max-width:350px){.topbar{padding-left:9px;padding-right:9px;gap:4px}.topbar-tools{gap:3px}.topbar-tools .btn{padding-left:7px;padding-right:7px}.topbar-tools .undo-set .icon-btn{width:24px}.topbar>.breadcrumb{font-size:9px}.topbar>.mobile-menu{width:26px}}

/* Pin contextual tools below the persistent main toolbar. */
:root{--topbar-height:74px}.sticky-controls{position:sticky;top:var(--topbar-height);z-index:19;background:var(--bg);padding:10px 0 12px;margin:-10px 0 12px;border-bottom:1px solid #e7eae5;box-shadow:0 5px 10px -10px #26354735}.sticky-controls .links-bar{margin-bottom:9px;min-height:28px}.sticky-controls .filters{margin-bottom:0;gap:12px}.sticky-controls .category-track{scrollbar-width:none}.sticky-controls .category-track::-webkit-scrollbar{display:none}.week-card{scroll-margin-top:220px!important}
@media(max-width:1250px){.sticky-controls .filters{gap:8px}.sticky-controls .filter-tools{gap:12px}}
@media(max-width:720px){:root{--topbar-height:58px}.sticky-controls{padding-top:8px;padding-bottom:10px;margin-top:-8px;margin-bottom:12px}.sticky-controls .links-bar{min-height:26px;margin-bottom:6px}.sticky-controls .filters{gap:7px}.sticky-controls .filter-tools{gap:12px}.week-card{scroll-margin-top:220px!important}}

/* 本週以淡暖色區分，項目與置頂狀態維持原有呈現。 */
.week-card.current{border-color:#ddc797;background:#fffcf5;box-shadow:0 2px 8px #99752c09}
.week-card.current .week-head,.week-card.current.collapsed .week-head{background:#faf3e4;border-bottom-color:#eadfc8}
.week-card.current .week-index{color:#856124}
.week-card.current .week-index small,.week-card.current .week-dates{color:#9a8054}
.week-card.current .current-pill{background:#ebd8ae;color:#78551e;font-weight:600}
.week-card.current .column-heading{border-bottom-color:#eadfc8;color:#99815b}

/* One integrated sticky toolbar, with a compact second row on narrow screens. */
.topbar{height:auto;min-height:64px;padding:12px 24px;display:flex;gap:12px;flex-wrap:nowrap;overflow:visible}
.topbar>.breadcrumb{flex:none}.topbar>.breadcrumb>span,.topbar-right{display:none}
.compact-tools{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.toolbar-menu{position:relative;flex:none;font-size:11px;color:#697581}
.toolbar-menu>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:5px;min-height:32px;white-space:nowrap;border-radius:6px;padding:0 5px}
.toolbar-menu>summary::-webkit-details-marker{display:none}
.toolbar-menu[open]>summary{background:#e9ede8;color:var(--navy)}
.toolbar-menu>summary:focus-visible{outline:2px solid #b98944;outline-offset:2px}
#filter-count{background:#e5d6b9;color:#775a2c;font-size:9px;border-radius:9px;min-width:15px;padding:1px 4px;text-align:center}
.toolbar-popover{position:absolute;top:calc(100% + 9px);left:0;z-index:25;background:#fff;border:1px solid var(--line);border-radius:9px;box-shadow:0 8px 28px #26354718;padding:10px;max-height:65vh;overflow-y:auto;margin:0}
.links-menu .links-bar{display:flex;flex-direction:column;align-items:stretch;gap:5px;width:250px;white-space:normal}
.links-menu .links-bar>.ico,.links-menu .links-label{display:none}
.links-menu .quick-link{max-width:none;background:transparent;padding:7px 8px;font-size:11px;justify-content:space-between}
.links-menu .quick-link:hover{background:#f4f5f1}.links-menu .quick-add{text-align:center;border-top:1px solid var(--line);padding-top:6px}
.category-menu .category-track{display:flex;flex-wrap:wrap;align-items:center;gap:5px;width:280px;white-space:normal}
.category-menu .manage-filter{border:0;border-top:1px solid var(--line);margin:4px 0 0;padding:9px 5px 2px;width:100%}
.compact-tools .hide-done{flex:none}.compact-tools .searchbox{flex:1;min-width:75px;max-width:180px;padding:7px 8px;background:#fff}
.compact-tools .searchbox input{width:100%;min-width:0}
.content{padding-top:18px}.week-card{scroll-margin-top:85px!important}
@media(max-width:1200px){
.topbar{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:8px 10px;padding:10px 20px}
.topbar>.mobile-menu{grid-column:1;grid-row:1}.topbar>.breadcrumb{grid-column:2;grid-row:1}
.topbar-tools{grid-column:3;grid-row:1}.compact-tools{grid-column:1 / -1;grid-row:2;gap:14px;border-top:1px solid #e6e9e3;padding-top:7px}
.compact-tools .searchbox{margin-left:auto;max-width:230px}.week-card{scroll-margin-top:125px!important}
}
@media(max-width:720px){
.topbar{padding:8px 12px;gap:5px 6px}.compact-tools{gap:7px;padding-top:5px}
.toolbar-menu{font-size:10px}.toolbar-menu>summary{padding:0 2px;gap:3px;min-height:29px}
.compact-tools .hide-done{font-size:9px;gap:4px}.compact-tools .searchbox{padding:6px;max-width:none;min-width:55px;gap:4px}
.compact-tools .searchbox input{font-size:10px}.compact-tools .searchbox .ico{width:11px;height:11px}
.category-menu .category-track{left:-70px;width:260px}.content{padding-top:12px}
}
@media(hover:hover) and (pointer:fine){.toolbar-menu>summary:hover{background:#edf0eb}}

/* The toolbar page name doubles as the compact page heading. */
.topbar>.breadcrumb{font-size:18px;line-height:1.3;letter-spacing:.3px}
.topbar>.breadcrumb strong{font-weight:650;color:var(--ink)}
@media(max-width:720px){.topbar>.breadcrumb{font-size:17px}}
@media(max-width:350px){.topbar>.breadcrumb{font-size:16px}}

/* Archive icon follows each week's neutral or warm palette. */
.week-actions .week-archive{color:#88929a}
.week-card.current .week-archive{color:#9a773b}
@media(hover:hover) and (pointer:fine){
.week-actions .week-archive:hover{background:#edf0ec;color:#535f6b}
.week-card.current .week-archive:hover{background:#ebdcbf;color:#78551e}
}

/* Trim the weekly heading height while retaining readable labels. */
.week-head,.week-card.collapsed .week-head{min-height:40px;padding-top:6px;padding-bottom:6px}
@media(max-width:720px){.week-head,.week-card.collapsed .week-head{min-height:38px;padding-top:5px;padding-bottom:5px}}

    .cloud-panel { width:min(94vw,560px); max-height:90dvh; overflow:auto; background:white; border-radius:20px; padding:24px; box-shadow:0 24px 80px #0005; }
    .cloud-panel input { width:100%; border:1px solid #cbd5e1; border-radius:8px; padding:10px; margin:5px 0 12px; font-size:14px; }
    .cloud-panel button { border:1px solid #cbd5e1; border-radius:8px; padding:9px 13px; margin:4px 4px 4px 0; font-size:13px; }
    .cloud-panel .primary { background:#0f172a; color:white; }
    .cloud-panel .cloud-actions {display:grid;grid-template-columns:repeat(var(--cloud-action-columns,3),minmax(0,1fr));gap:10px;border-top:1px solid #e2e8f0;padding-top:16px;margin-top:16px;}
    .cloud-panel .cloud-actions:has(#cloud-signout[hidden]) {--cloud-action-columns:2;}
    .cloud-panel .cloud-actions button {width:100%;min-height:44px;margin:0;padding:10px 8px;line-height:1.4;}
    .cloud-panel .cloud-actions #cloud-signout {color:#be123c;border-color:#fecdd3;background:#fff1f2;}
    @media (max-width:440px) {.cloud-panel .cloud-actions {grid-template-columns:1fr;}}
    .cloud-panel h2 {font-size:20px; font-weight:700; margin-bottom:12px;}
    .cloud-panel p {font-size:13px; line-height:1.8; margin:8px 0;}
    .cloud-overlay {position:fixed; inset:0; background:#0f172aaa; z-index:110; display:flex; align-items:center; justify-content:center; padding:12px;}
    .cloud-overlay[hidden], [data-cloud-hidden] {display:none!important;}
    .cloud-dot {width:8px;height:8px;border-radius:50%;background:#94a3b8;display:inline-block;flex-shrink:0;box-shadow:0 0 0 3px #94a3b81a;}
    #cloud-open[data-sync-state="synced"] .cloud-dot {background:#34d399;box-shadow:0 0 0 3px #34d39920;}
    #cloud-open[data-sync-state="syncing"] .cloud-dot {background:#fbbf24;box-shadow:0 0 0 3px #fbbf2420;animation:cloudSyncPulse 1.3s ease-in-out infinite;}
    #cloud-open[data-sync-state="warning"] .cloud-dot {background:#fbbf24;box-shadow:0 0 0 3px #fbbf2420;}
    #cloud-open[data-sync-state="error"] .cloud-dot {background:#fb7185;box-shadow:0 0 0 3px #fb718520;}
    .cloud-status-card {background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px 14px;margin:12px 0;}
    .cloud-sr {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
    @keyframes cloudSyncPulse {50% {opacity:.4;}}
    @media (prefers-reduced-motion:reduce) {#cloud-open .cloud-dot {animation:none!important;}}

.hidden{display:none!important}.hide-drawer{display:none!important}
.ui-surface{min-width:0}.ui-surface button{font-family:inherit}
.sidebar{overflow-y:auto}.sidebar-foot{padding-bottom:env(safe-area-inset-bottom)}
.topbar{padding-top:calc(12px + env(safe-area-inset-top))}
.topbar-tools button:disabled{opacity:.3}.nav-button.active{background:#eaece9;color:var(--navy);font-weight:650}
.nav-button.active .count{background:#dde2dd}.week-nav{cursor:pointer}
.week-navigation{flex:1;overflow:auto;max-height:34vh;min-height:50px}
.week-body{grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr)}
.week-head .week-index small{display:inline}.week-card{overflow:visible}
.week-body .column{min-width:0}.week-card.collapsed .week-body{display:none}
.event-row,.task-row{position:relative}.task-row{grid-template-columns:19px 15px minmax(0,1fr) 20px}
.item-title{display:block}.item-copy{display:flex;align-items:flex-start;gap:7px}
.item-links{display:flex}.item-title .item-links a{font-weight:400;text-decoration:none}
.item-title .item-links a:hover{text-decoration:underline}.item-content{min-width:0}
.ui-done .item-title{color:#a5abb0}.ui-done .item-text{text-decoration:line-through}
.ui-done .tag{filter:grayscale(1);opacity:.65}
.focus-star{font-family:Arial,sans-serif;line-height:22px;height:22px;width:22px;min-width:22px;min-height:22px;font-size:18px;padding:0;border-radius:5px;margin:-1px 0 0 -2px;display:grid;place-items:center;flex:none}
.focus-star[aria-pressed="false"]{color:#c4c9ce;background:transparent}.focus-star[aria-pressed="true"]{color:#b77d28;background:transparent}
@media (hover:hover) and (pointer:fine) {
.focus-star[aria-pressed]:hover {background:#fef3c7;color:#b45309;}
}
.focus-star:focus-visible{outline:2px solid #b98944;outline-offset:2px}
.task-check{accent-color:var(--navy);width:13px;height:13px;margin:4px 0 0;cursor:pointer}
.row-menu{position:relative;align-self:start;line-height:1;z-index:1}.row-menu[open]{z-index:16}
.row-menu>summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:22px;height:22px;color:#a3aab1;border-radius:4px}
.row-menu>summary::-webkit-details-marker{display:none}.row-menu>summary .ico{width:14px;height:14px}
.row-menu .column-sort-menu{top:26px}.row-menu>summary:hover{background:#edf0eb;color:#5e6875}
.bookmark-entry{display:flex;align-items:center;gap:4px;min-width:0}.bookmark-entry .quick-link{flex:1;min-width:0}
.bookmark-entry button{width:24px;height:28px;color:#adb2b7;flex:none}.bookmark-entry button:hover{color:#b75a53}
.empty{pointer-events:none}.column-sort-menu button{text-align:left;width:100%}
.column-sort-menu button .ico{width:14px;height:14px}.column-sort-menu{z-index:24}
.category-menu .category-track{display:block}.filter-chips{display:flex;flex-wrap:wrap;gap:5px}
.filter-chip{font-size:11px;padding:6px 9px;border:1px solid transparent;border-radius:6px;display:inline-flex;gap:6px;align-items:center;background:var(--cat-bg);color:var(--cat-color)}
.filter-chip.active{border-color:var(--cat-color);font-weight:600}.filter-chip.all{--cat-color:#4d5967;--cat-bg:#f2f3f0}
.toolbar-menu .manage-filter{display:flex;align-items:center;gap:5px}
.links-menu .links-bar{display:block}.links-menu .quick-add{display:block;width:100%;font-size:11px;margin-top:5px;padding:8px}
.links-menu .empty{padding:10px;font-size:11px}.workspace-summary{font-size:10px;color:#a4aab0}
.drawer-scrim{position:fixed;inset:0;background:#26354725;z-index:39}
#backlog-drawer{position:fixed;inset:0 0 0 auto;width:min(400px,94vw);height:100dvh;z-index:40;background:#fff;border-left:1px solid var(--line);padding:24px;box-shadow:-8px 0 35px #2635470b;overflow-y:auto}
#backlog-drawer .drawer-title h2{font-size:20px;font-weight:650}#backlog-drawer .pool-item{display:block}
#storage-warning{margin-left:var(--sidebar);width:auto;max-width:100%;font-size:12px;padding:10px 24px;background:#fbefcb;color:#805f23}
body.sidebar-collapsed #storage-warning{margin-left:0}
.cloud-overlay{max-width:100%!important}.cloud-panel{color:var(--ink)}
.cloud-panel .primary{background:var(--navy)}.cloud-panel label{font-size:12px}
#cloud-lock{z-index:120}#cloud-settings,#cloud-conflict{z-index:110}
.cloud-status-card{background:#f6f7f3;border-color:var(--line)}
/* Keep the existing forms and dialogs; restyle their surfaces consistently. */
[id$="-modal"]>[id$="-box"]{max-height:90dvh;overflow:auto;border-radius:14px;border-color:var(--line);box-shadow:0 15px 60px #26354722}
[id$="-modal"] input:not([type="radio"]):not([type="checkbox"]),[id$="-modal"] textarea,[id$="-modal"] select{border-color:#dbe0dc;border-radius:7px}
@media(max-width:1000px){.week-body{grid-template-columns:1fr}}
@media(max-width:720px){.topbar{padding-top:calc(8px + env(safe-area-inset-top))}#storage-warning{margin-left:0}.topbar>.breadcrumb{white-space:normal}.topbar>.breadcrumb strong{white-space:nowrap}.task-row{gap:6px}.item-copy{gap:6px}#backlog-drawer{padding:20px 16px}.cloud-panel input,[id$="-modal"] input:not([type="radio"]):not([type="checkbox"]),[id$="-modal"] textarea,[id$="-modal"] select{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

@media(max-width:350px){.topbar-tools .save-label{display:none}}

/* Dialogs share the workspace's quiet palette, typography and line icons. */
.popup-overlay{background:rgba(38,53,71,.36)!important;backdrop-filter:blur(3px);padding:24px!important;overscroll-behavior:contain}
.popup-panel{--popup-muted:#7d858e;--popup-border:#e4e7e2;width:100%;max-height:calc(100dvh - 48px)!important;background:#fff!important;border:1px solid var(--popup-border)!important;border-radius:16px!important;padding:24px!important;color:var(--ink);font-family:inherit;font-size:13px;line-height:1.65;box-shadow:0 20px 75px #26354725!important;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d5dbd3 transparent}
.cloud-panel.popup-panel{width:min(100%,520px);margin:0}
.popup-panel .popup-heading{gap:16px;margin:0 0 20px;padding:0 0 16px;border-bottom:1px solid var(--line)}
.popup-panel .popup-title{display:flex;align-items:center;gap:10px;font-size:19px;line-height:1.4;font-weight:650;letter-spacing:.2px;color:var(--ink);margin:0}
.popup-panel .popup-title>.ico{width:19px;height:19px;color:#8c9a91;stroke-width:1.6;flex:none}
.popup-panel .popup-title>span{min-width:0}
.cloud-panel.popup-panel>.popup-title{margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.popup-panel .popup-close{display:inline-grid;place-items:center;flex:none;width:30px;height:30px;min-height:30px;padding:0!important;margin:0!important;border:0!important;border-radius:6px!important;background:transparent!important;color:#939ba3;font-size:16px}
.popup-panel .popup-close>.ico{width:17px;height:17px}
.popup-panel label:not(:has(input[type="radio"])):not(:has(input[type="checkbox"])){font-size:12px;line-height:1.6;font-weight:500;color:#747e87}
.popup-panel input:not([type="radio"]):not([type="checkbox"]),.popup-panel select,.popup-panel textarea{background:#fcfcfa!important;border:1px solid #dce1da!important;border-radius:7px!important;padding:9px 11px!important;font-size:13px;line-height:1.5;color:var(--ink);font-weight:400;min-height:38px;min-width:0;box-shadow:none;transition:border-color .15s,box-shadow .15s}
.popup-panel input::placeholder,.popup-panel textarea::placeholder{color:#a7aeb3;font-weight:400}
.popup-panel input:not([type="radio"]):not([type="checkbox"]):focus,.popup-panel select:focus,.popup-panel textarea:focus{outline:0;border-color:#a5b3a9!important;box-shadow:0 0 0 3px #7d948a12}
.popup-panel input[type="radio"],.popup-panel input[type="checkbox"]{accent-color:var(--navy);width:14px;height:14px;flex:none;cursor:pointer}
.popup-panel textarea{min-height:110px;resize:vertical}
.popup-panel .popup-footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;border-top:1px solid var(--line);padding-top:16px;margin-top:22px}
.popup-panel button:not(.popup-close){font-family:inherit;font-size:12px;font-weight:500;line-height:1.5;box-shadow:none}
.popup-panel .popup-footer>button,.popup-panel .cloud-actions>button,.cloud-panel.popup-panel button:not(.popup-close),.popup-panel #confirm-cancel-btn,.popup-panel .btn{min-height:36px;padding:8px 13px;border:1px solid #dce1da;border-radius:7px;background:#fff;color:#697580;box-shadow:none;transition:background .15s,color .15s,border-color .15s}
.popup-panel .popup-primary,.popup-panel button.primary,.popup-panel button.btn.primary,.popup-panel .popup-footer>button[class*="bg-slate-800"]{background:var(--navy)!important;border:1px solid var(--navy)!important;border-radius:7px;color:#fff!important;font-weight:500;min-height:36px;padding:8px 13px;box-shadow:none!important}
.popup-panel .popup-section,.popup-panel .cloud-status-card{background:#f7f8f4!important;border:1px solid #e5e9e1!important;border-radius:9px!important;padding:13px!important;box-shadow:none}
.popup-panel .popup-notice{background:#faf5e9!important;border:1px solid #eee2c8!important;border-radius:8px;color:#9b7c45!important;font-size:12px;line-height:1.7;padding:11px 13px}
.popup-panel .popup-section>label,.popup-panel #edit-focus-field{color:#69786b!important;font-weight:500!important;font-size:12px!important}
.popup-panel #edit-focus-field{padding-top:2px}
.popup-panel label:has(>input[type="radio"]){background:#fcfcfa;border:1px solid #e0e4dd!important;border-radius:7px;padding:10px;min-width:0;gap:8px;font-weight:400}
.popup-panel label:has(>input[type="radio"]:checked){background:#f5f2e9!important;border-color:#d8c8a3!important;color:#806a3b}
.popup-panel [class*="text-slate-500"],.popup-panel [class*="text-slate-400"],.cloud-panel.popup-panel p{color:var(--popup-muted)}
.popup-panel [class*="text-indigo-600"]{color:#798b7c!important;font-weight:500}
.popup-panel .tag-badge{font-size:10px;line-height:1.6;padding:2px 7px;border-radius:5px;font-weight:500}
.popup-panel #category-manager-list>div,.popup-panel #version-history-list>div,.popup-panel #edit-item-links>div{background:#f9faf7;border-color:#e6e9e3;border-radius:8px;box-shadow:none}
.popup-panel #category-manager-list{max-height:34dvh;padding-right:3px}
.popup-panel #category-manager-list button{border-radius:5px;min-width:28px;min-height:28px;display:inline-grid;place-items:center}
.popup-panel #category-manager-list .ico{width:14px;height:14px}
.popup-panel #category-manager-list select{min-height:28px;padding:4px 6px!important;font-size:11px;max-width:95px}
.popup-panel #new-cat-color-picker{gap:6px}
.popup-panel #new-cat-color-picker button{font-size:10px;font-weight:400;padding:5px 4px;border-radius:5px}
.popup-panel #new-cat-color-picker button span:last-child{white-space:nowrap}
.popup-panel #version-history-list{max-height:52dvh}
.popup-panel #version-history-list .font-bold{font-weight:550;font-size:13px}
.popup-panel #version-history-list button{font-size:11px;min-height:30px;padding:6px 9px}
.popup-panel #confirm-message{font-size:13px;line-height:1.85;color:#7b858f;margin:14px 0 0}
.popup-panel .cloud-actions{border-top-color:var(--line);margin-top:20px;padding-top:16px;gap:8px}
.popup-panel .cloud-actions #cloud-signout{background:#fcf4f1;color:#b47b70;border-color:#eeded7}
.cloud-panel.popup-panel input{margin:6px 0 14px}
.cloud-panel.popup-panel p{font-size:12px;line-height:1.8;margin:10px 0;overflow-wrap:anywhere}
.cloud-panel.popup-panel .cloud-status-card p{margin:6px 0}
.popup-panel #cloud-status{color:#617967;font-weight:500}
.popup-panel #cloud-message{font-size:12px;color:#ac7e44!important}
.popup-panel details>summary{font-size:12px!important;color:#7b8781;line-height:1.7}
.popup-panel button:focus-visible{outline:2px solid #afbea9;outline-offset:3px}
@media(hover:hover) and (pointer:fine){
.popup-panel .popup-close:hover{background:#f1f4ed!important;color:#657567}
.popup-panel .popup-footer>button:hover,.cloud-panel.popup-panel button:not(.primary):hover,.popup-panel .btn:not(.primary):hover{background:#f3f5ef;border-color:#cbd4c7;color:#53634f}
.popup-panel .popup-primary:hover,.popup-panel button.primary:hover,.popup-panel .popup-footer>button[class*="bg-slate-800"]:hover{background:#35485a!important;border-color:#35485a!important}
}
@media(max-width:720px){
.popup-overlay{padding:12px!important}
.popup-panel{padding:20px!important;max-height:calc(100dvh - 24px)!important;border-radius:13px!important}
.popup-panel .popup-title{font-size:18px;gap:9px}.popup-panel .popup-heading{padding-bottom:13px;margin-bottom:16px}
.popup-panel input:not([type="radio"]):not([type="checkbox"]),.popup-panel textarea,.popup-panel select{font-size:16px!important;min-height:40px}
.popup-panel .popup-footer{margin-top:18px;padding-top:14px}.popup-panel .popup-footer>button{min-height:40px}
.popup-panel #new-cat-icon{width:60px;flex:none}.popup-panel #new-cat-name{width:0;min-width:0}
.popup-panel #new-cat-color-picker{grid-template-columns:repeat(3,minmax(0,1fr))}
.popup-panel #category-manager-list select{font-size:16px!important;max-width:95px}
.cloud-panel.popup-panel .cloud-actions{grid-template-columns:1fr}
}

/* Explicit actions keep category swatches in their own selected colors. */
#add-modal .popup-panel,#edit-modal .popup-panel{max-width:520px}
#category-modal .popup-panel{max-width:500px}
.popup-panel .schedule-input{display:block;width:100%}
.popup-panel #confirm-title{font-size:19px;line-height:1.4;font-weight:650;color:var(--ink)}
.popup-panel .popup-section>.font-bold{font-weight:550;color:#6b7770}
#toast-container>div{background:var(--navy);border:1px solid #405265;border-radius:8px;font-size:12px;font-weight:400;box-shadow:0 6px 20px #26354716}
#toast-container>div[class*="bg-rose-"]{background:#916d67;border-color:#916d67}
@media(max-width:720px){.popup-panel #confirm-title{font-size:18px}}

/* Refined dialog family: framed headers, quiet sections and deliberate actions. */
.popup-overlay{background:rgba(30,42,54,.38)!important;backdrop-filter:blur(5px)}
.popup-panel{--popup-muted:#7a858c;--popup-border:#e2e7df;border-radius:20px!important;border-color:#e2e7df!important;box-shadow:0 28px 90px #1e2a362e,0 4px 16px #1e2a360a!important;padding:24px!important;isolation:isolate}
.popup-panel .popup-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:-24px -24px 22px;padding:22px 24px;background:linear-gradient(115deg,#faf8f1,#f5f8f4);border-bottom:1px solid #e8ebe3;border-radius:20px 20px 0 0}
.popup-panel .popup-title{gap:12px;min-width:0;font-size:20px;letter-spacing:.1px}
.popup-panel .popup-title-icon{width:40px;height:40px;display:inline-grid;place-items:center;flex:none;background:#fffdf7;border:1px solid #e9dfc7;border-radius:12px;color:#ad8850;box-shadow:0 2px 5px #ac8d4e05}
.popup-panel .popup-title-icon>.ico{width:19px;height:19px;color:inherit;stroke-width:1.65}
.popup-panel .popup-title-copy{display:block;min-width:0}
.popup-panel .popup-title-copy>span{display:block}
.popup-panel .popup-title-copy>small,.popup-panel .popup-subtitle{display:block;font-size:11px;line-height:1.65;letter-spacing:.1px;font-weight:400;color:#929b95;margin:4px 0 0}
.popup-panel .popup-close{width:30px;height:30px;border:1px solid #e5e9e0!important;background:#ffffffa8!important;color:#8d9891;border-radius:9px!important;align-self:flex-start;margin-top:4px!important}
.popup-panel .popup-close>.ico{width:15px;height:15px}
.popup-panel .popup-confirm-heading{justify-content:flex-start}
.popup-panel .popup-confirm-heading #confirm-title{font-size:20px;line-height:1.4;font-weight:650;margin:0}
.popup-panel .popup-confirm-heading .popup-subtitle{margin-top:4px}
.popup-panel input:not([type="radio"]):not([type="checkbox"]),.popup-panel select,.popup-panel textarea{background:#fff!important;border-color:#dce3d8!important;border-radius:9px!important;min-height:40px;padding:10px 12px!important;box-shadow:0 1px 2px #22332802}
.popup-panel input:not([type="radio"]):not([type="checkbox"]):focus,.popup-panel select:focus,.popup-panel textarea:focus{border-color:#a8b89f!important;box-shadow:0 0 0 3px #9aad8d13}
.popup-panel label:not(:has(input[type="radio"])):not(:has(input[type="checkbox"])){font-size:12px;font-weight:500;color:#657368}
.popup-panel label:has(>input[type="radio"]){border-radius:9px;padding:10px 12px;background:#fff;transition:background .15s,border-color .15s}
.popup-panel label:has(>input[type="radio"]:checked){background:#fbf7ec!important;border-color:#dac79f!important;color:#8a703f}
.popup-panel .popup-section{background:#f8faf5!important;border:1px solid #e6ecdf!important;border-radius:12px!important;padding:14px!important}
.popup-panel .popup-section>.font-bold{font-size:12px;font-weight:550;color:#64715e}
.popup-panel .popup-footer{position:sticky;bottom:-24px;z-index:2;gap:9px;margin:22px -24px -24px;padding:16px 24px;background:#fcfdfa;border-top:1px solid #e9ede4;border-radius:0 0 20px 20px}
.popup-panel .popup-footer>button,.popup-panel .cloud-actions>button{border-radius:9px;min-height:38px;padding:9px 16px;font-weight:500}
.popup-panel .popup-primary,.popup-panel button.primary,.popup-panel .popup-footer>button[class*="bg-slate-800"]{border-radius:9px;box-shadow:0 2px 5px #26354710!important}
.popup-panel .popup-footer .primary{margin:0}
.popup-panel .popup-notice{position:relative;background:#fcf8ee!important;border-color:#eee4cd!important;border-left:3px solid #d6bb80!important;border-radius:9px;font-size:12px;line-height:1.75;padding:11px 13px;color:#968050!important}
.popup-panel #category-manager-list>div{background:#fff;border:1px solid #e6ebe1;border-radius:10px;padding:9px 10px;gap:9px}
.popup-panel #category-manager-list .tag-badge{font-size:11px;font-weight:500;border-radius:6px;padding:3px 7px}
.popup-panel #category-manager-list select{border-radius:6px!important;background:#fafcf8!important;min-height:30px}
.popup-panel #category-manager-list button{border-color:#e4e9df;border-radius:6px;color:#8c998c}
.popup-panel #new-cat-color-picker{gap:6px}
.popup-panel #new-cat-color-picker button{background:#fff;color:#7d8980;border:1px solid #e2e7dc;border-radius:6px;padding:6px 4px;font-size:10px;opacity:1}
.popup-panel #new-cat-color-picker button.ring-2{--tw-ring-color:#d4be8b;--tw-ring-offset-width:1px;background:#fcf8ed;border-color:#d5c08c;color:#90753f}
.popup-panel #version-history-list>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;background:#fff;border-color:#e5eae0;border-radius:11px;padding:13px;margin-bottom:8px}
.popup-panel #version-history-list .font-bold{font-weight:600;color:#4b5b50;margin-bottom:3px}
.popup-panel #version-history-list .text-slate-500{font-variant-numeric:tabular-nums;color:#9aa49b;line-height:1.6}
.popup-panel #version-history-list button{border-radius:7px;padding:7px 10px}
.popup-panel #edit-item-links>div{background:#f9fbf6;border-color:#e5ebde;border-radius:10px;padding:10px}
.popup-panel #edit-item-links input{padding:8px 10px!important;font-size:12px;min-height:34px}
.popup-panel .popup-transfer{display:flex;align-items:center;gap:13px;text-align:left;width:100%;padding:15px;border:1px solid #e2e8dc;border-radius:12px;background:#fff;transition:background .15s,border-color .15s,transform .15s}
.popup-panel .popup-transfer-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:10px;background:#f2f6ec;color:#8c9f79}
.popup-panel .popup-transfer-icon>.ico{width:18px;height:18px}
.popup-panel .popup-transfer>span:nth-child(2){display:block;min-width:0;flex:1}
.popup-panel .popup-transfer strong{display:block;font-size:13px;line-height:1.5;font-weight:550;color:#52624c}
.popup-panel .popup-transfer small{display:block;font-size:11px;line-height:1.7;color:#99a194;margin-top:3px;font-weight:400}
.popup-panel .popup-transfer>.ico{width:14px;height:14px;color:#acb7a5;flex:none}
.popup-panel .popup-help{margin:12px 0;padding:10px 12px;background:#f9faf7;border:1px solid #edf0e8;border-radius:9px}
.popup-panel .popup-help>summary{cursor:pointer;font-size:11px!important;color:#8b9588;line-height:1.8}
.cloud-panel.popup-panel .cloud-status-card{background:#f5f8f0!important;border-color:#dfe8d5!important;border-radius:12px!important;padding:15px!important;margin:16px 0}
.cloud-panel.popup-panel #cloud-status{font-size:13px;font-weight:500;line-height:1.85;color:#6a7e5e;overflow-wrap:anywhere}
.cloud-panel.popup-panel #cloud-account{font-size:12px;color:#939b92;margin:0 0 13px;overflow-wrap:anywhere}
.cloud-panel.popup-panel #cloud-retry{font-size:11px;background:#fff;border-color:#dde5d5;border-radius:8px;min-height:32px;padding:6px 10px;margin:8px 0 0}
.cloud-panel.popup-panel .cloud-status-card .popup-help{padding:0;background:none;border:none;margin:10px 0 0}
.cloud-panel.popup-panel .cloud-status-card .popup-help p{font-size:11px!important;color:#9ba590!important}
.cloud-panel.popup-panel #cloud-password-login,.cloud-panel.popup-panel #cloud-send-code,.cloud-panel.popup-panel #cloud-verify{width:100%;margin:0 0 5px;min-height:40px}
.cloud-panel.popup-panel #cloud-auth-fields>details:not(.popup-help){padding:10px 0;border-top:1px solid var(--line)}
.cloud-panel.popup-panel .cloud-actions{border-top-color:#e7ecdf;margin-top:22px;padding-top:16px}
.cloud-panel.popup-panel #cloud-signout{color:#ac7a71;background:#fcf6f3;border-color:#efdfd8}
#cloud-conflict .popup-panel>button{width:100%;margin:5px 0;min-height:40px}
#cloud-lock .popup-panel{text-align:center;max-width:420px}
#cloud-lock .popup-heading{justify-content:center}
#cloud-lock .popup-title{text-align:left}
@media(hover:hover) and (pointer:fine){
.popup-panel .popup-transfer:hover{background:#f9fcf5;border-color:#cbd9bf;transform:translateY(-1px)}
.popup-panel .popup-close:hover{background:#fff!important;border-color:#cad6c0!important;color:#657957}
.popup-panel #new-cat-color-picker button:hover{border-color:#bdcbaF;background:#f9fbf6}
}
@media(max-width:720px){
.popup-panel{padding:20px!important;border-radius:16px!important}
.popup-panel .popup-heading{margin:-20px -20px 18px;padding:18px 20px;border-radius:16px 16px 0 0;gap:10px}
.popup-panel .popup-title{font-size:18px;gap:10px}.popup-panel .popup-title-icon{width:35px;height:35px;border-radius:10px}
.popup-panel .popup-title-icon>.ico{width:17px;height:17px}
.popup-panel .popup-title-copy>small,.popup-panel .popup-subtitle{font-size:10px;line-height:1.7;margin-top:3px}
.popup-panel .popup-confirm-heading #confirm-title{font-size:18px}
.popup-panel .popup-close{width:28px;height:28px;margin-top:3px!important}
.popup-panel .popup-footer{bottom:-20px;margin:18px -20px -20px;padding:14px 20px;border-radius:0 0 16px 16px}
.popup-panel .popup-footer>button{min-height:40px;padding:9px 15px}
.popup-panel input:not([type="radio"]):not([type="checkbox"]),.popup-panel textarea,.popup-panel select{font-size:16px!important;min-height:42px}
.popup-panel #edit-item-links input{font-size:16px!important;min-height:40px}
.popup-panel .popup-transfer{padding:13px;gap:10px}
.popup-panel .popup-transfer strong{font-size:12px}.popup-panel .popup-transfer small{font-size:10px}
.popup-panel .popup-transfer-icon{width:34px;height:34px;border-radius:9px}
.popup-panel #version-history-list>div{gap:8px;padding:11px}
.popup-panel #version-history-list button{padding:6px 8px}
}

/* Device appearance. Keep overrides scoped so the day palette stays intact. */
.theme-state{margin-left:auto;font-size:10px;color:var(--secondary)}
#theme-toggle .theme-sun{display:none}
:root[data-theme="dark"] #theme-toggle .theme-moon{display:none}
:root[data-theme="dark"] #theme-toggle .theme-sun{display:block}
:root[data-theme="dark"]{
 --bg:#141b24;--paper:#1c2632;--ink:#e3e8ef;--muted:#a2adba;
 --secondary:#b3bfcc;--line:#354252;--navy:#354d68;--gold:#e4b66d;
 --shadow:0 12px 40px #0003;--raised:#24313f;--warm:#302b23;
 color-scheme:dark;
}
:root[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
:root[data-theme="dark"] :is(.sidebar,#backlog-drawer){background:#18212c;border-color:var(--line)}
:root[data-theme="dark"] .topbar{background:#141b24f2;border-color:var(--line)}
:root[data-theme="dark"] :is(.week-card,.week-head,.week-card.collapsed .week-head,.pool-item,.empty.large,.toolbar-popover,.column-sort-menu){background:var(--paper);border-color:var(--line);color:var(--ink)}
:root[data-theme="dark"] :is(.week-card.current,.week-card.current.collapsed){background:#25251f;border-color:#75603d}
:root[data-theme="dark"] :is(.week-card.current .week-head,.week-card.current.collapsed .week-head){background:var(--warm);border-color:#594a34}
:root[data-theme="dark"] :is(.week-card.current .week-index,.week-card.current .week-archive){color:#e4bc7d}
:root[data-theme="dark"] :is(.week-card.current .week-index small,.week-card.current .week-dates,.week-card.current .column-heading){color:#c8b591;border-color:#594a34}
:root[data-theme="dark"] :is(.current-pill,#filter-count){background:#54432a;color:#f0d199}
:root[data-theme="dark"] :is(.item-title,.week-index,.week-nav.current,.drawer-title h2){color:var(--ink)}
:root[data-theme="dark"] :is(.nav-button,.week-nav,.week-dates,.week-count,.column-heading,.column-heading small,.item-description,.item-link,.drawer-sub,.pool-section-title,.sort-menu-foot,.empty,.footerline,.workspace-summary,.sidebar-label,.toolbar-menu,.hide-done,.icon-btn,.row-menu>summary){color:var(--secondary)}
:root[data-theme="dark"] :is(.nav-button.active,.nav-button.active .count,.nav-button .count,.toolbar-menu[open]>summary,.column-sort[open] summary){background:var(--raised);color:var(--ink);border-color:var(--line)}
:root[data-theme="dark"] :is(.column-heading,.event-row,.task-row,.column.events,.column.tasks,.column.events>.event-row:last-of-type,.column.tasks>.task-row:last-of-type,.compact-tools,.undo-set,.sort-menu-foot){border-color:var(--line)}
:root[data-theme="dark"] :is(.btn,.compact-tools .searchbox){background:var(--paper);color:var(--ink);border-color:var(--line)}
:root[data-theme="dark"] .btn.primary{background:var(--navy);border-color:#55769b;color:#fff}
:root[data-theme="dark"] :is(.column-add,.quick-add,.manage-filter){color:var(--secondary);border-color:var(--line)}
:root[data-theme="dark"] :is(input,textarea,select){color-scheme:dark;accent-color:#d1ae70}
:root[data-theme="dark"] .task-check{background:var(--raised);border-color:#8999ac;accent-color:#d1ae70}
:root[data-theme="dark"] :is(input,textarea)::placeholder{color:#91a0b2}
:root[data-theme="dark"] .ui-done .item-title{color:#9ca7b4}
:root[data-theme="dark"] .focus-star[aria-pressed="false"]{color:#9aa8b8}
:root[data-theme="dark"] .focus-star[aria-pressed="true"]{color:#efc16f}
:root[data-theme="dark"] :is(.tag,.filter-chip){color:color-mix(in srgb,var(--cat-color) 45%,white);background:color-mix(in srgb,var(--cat-color) 20%,var(--paper));border-color:transparent}
:root[data-theme="dark"] .filter-chip.active{border-color:currentColor}
:root[data-theme="dark"] .filter-chip.all{color:var(--ink);background:var(--raised)}
:root[data-theme="dark"] :is(.popup-overlay,.cloud-overlay){background:#050a12b8!important}
:root[data-theme="dark"] .popup-panel{--popup-muted:#acb8c6;--popup-border:var(--line);background:var(--paper)!important;border-color:var(--line)!important;color:var(--ink);scrollbar-color:#607086 transparent}
:root[data-theme="dark"] .popup-panel .popup-heading{background:linear-gradient(115deg,#2b2b28,#202e38);border-color:var(--line)}
:root[data-theme="dark"] .popup-panel :is(.popup-title-icon,.popup-transfer-icon){background:#343128;border-color:#635437;color:#e2bb7c}
:root[data-theme="dark"] .popup-panel :is(.popup-title-copy>small,.popup-subtitle,.popup-transfer small,.popup-help>summary){color:var(--secondary)}
:root[data-theme="dark"] .popup-panel .popup-close{background:var(--raised)!important;border-color:var(--line)!important;color:var(--secondary)}
:root[data-theme="dark"] .popup-panel :is(input:not([type="radio"]):not([type="checkbox"]),textarea,select){background:var(--bg)!important;border-color:#526175!important;color:var(--ink)}
:root[data-theme="dark"] .popup-panel :is(input:not([type="radio"]):not([type="checkbox"]),textarea,select):focus{border-color:#d1ae70!important;box-shadow:0 0 0 3px #d1ae7020}
:root[data-theme="dark"] .popup-panel :is(label,.popup-section>.font-bold,.popup-transfer strong,#version-history-list .font-bold){color:var(--ink)}
:root[data-theme="dark"] .popup-panel :is(.popup-section,.cloud-status-card,.popup-help,#edit-item-links>div){background:var(--bg)!important;border-color:var(--line)!important}
:root[data-theme="dark"] .popup-panel :is(.popup-section>label,#edit-focus-field){color:var(--secondary)!important}
:root[data-theme="dark"] .popup-panel .popup-footer{background:#202b36;border-color:var(--line)}
:root[data-theme="dark"] .popup-panel :is(.popup-footer>button,.cloud-actions>button,.btn,.popup-transfer,#category-manager-list>div,#version-history-list>div,#new-cat-color-picker button),
:root[data-theme="dark"] .cloud-panel.popup-panel button:not(.popup-close){background:var(--raised);border-color:#526175;color:var(--ink)}
:root[data-theme="dark"] .popup-panel :is(.popup-primary,button.primary,button.btn.primary,.popup-footer>button[class*="bg-slate-800"]){background:var(--navy)!important;border-color:#55769b!important;color:#fff!important}
:root[data-theme="dark"] .popup-panel :is(label:has(>input[type="radio"]),#category-manager-list select){background:var(--bg)!important;border-color:var(--line)!important;color:var(--ink)}
:root[data-theme="dark"] .popup-panel :is(label:has(>input[type="radio"]:checked),#new-cat-color-picker button.ring-2,.popup-notice){background:var(--warm)!important;border-color:#8f764b!important;color:#efcc94!important}
:root[data-theme="dark"] .popup-panel :is([class*="text-slate-"],[class*="text-indigo-"],#category-manager-list button){color:var(--secondary)!important}
:root[data-theme="dark"] .popup-panel :is(.popup-title,#confirm-title,.popup-primary,button.primary,.popup-footer>button[class*="bg-slate-800"]){color:var(--ink)!important}
:root[data-theme="dark"] .popup-panel .tag-badge{background:var(--raised);border-color:#65768b;color:#e1e8f0}
:root[data-theme="dark"] .cloud-panel.popup-panel :is(#cloud-status,#cloud-account,.cloud-status-card .popup-help p){color:var(--secondary)!important}
:root[data-theme="dark"] .cloud-panel.popup-panel .cloud-actions{border-color:var(--line)}
:root[data-theme="dark"] .cloud-panel.popup-panel #cloud-signout{background:#38272c;border-color:#79515c;color:#f0b8bc}
:root[data-theme="dark"] #storage-warning{background:#45371f;color:#f4d69f}
:root[data-theme="dark"] #toast-container>div{background:#354d68;color:#fff}
@media(hover:hover) and (pointer:fine){
 :root[data-theme="dark"] :is(.nav-button,.icon-btn,.column-add,.quick-link,.toolbar-menu>summary,.column-sort summary,.column-sort-menu>button,.row-menu>summary):hover{background:var(--raised);color:var(--ink)}
 :root[data-theme="dark"] .focus-star[aria-pressed]:hover{background:#514029;color:#f2cf90}
 :root[data-theme="dark"] .popup-panel :is(.popup-transfer,.popup-close,.popup-footer>button,.cloud-actions>button,#new-cat-color-picker button):hover{background:#304253!important;border-color:#7a8ea6!important;color:var(--ink)}
}

/* Preserve category hues in the manager, including legacy Tailwind badges. */
:root[data-theme="dark"] .tag-badge[class*="text-rose-"]{--badge-color:#ae6a72}
:root[data-theme="dark"] .tag-badge[class*="text-amber-"]{--badge-color:#a78345}
:root[data-theme="dark"] .tag-badge[class*="text-emerald-"]{--badge-color:#658d76}
:root[data-theme="dark"] .tag-badge[class*="text-sky-"]{--badge-color:#6a90a4}
:root[data-theme="dark"] .tag-badge[class*="text-indigo-"]{--badge-color:#7989ab}
:root[data-theme="dark"] .tag-badge[class*="text-purple-"]{--badge-color:#9480a9}
:root[data-theme="dark"] .tag-badge[class*="text-pink-"]{--badge-color:#a87593}
:root[data-theme="dark"] .tag-badge[class*="text-teal-"]{--badge-color:#65938d}
:root[data-theme="dark"] .tag-badge[class*="text-orange-"]{--badge-color:#ab815b}
:root[data-theme="dark"] .tag-badge[class*="text-slate-"]{--badge-color:#8c929a}
:root[data-theme="dark"] .popup-panel .tag-badge{color:color-mix(in srgb,var(--badge-color,#8c929a) 45%,white)!important;background:color-mix(in srgb,var(--badge-color,#8c929a) 20%,var(--paper));border-color:color-mix(in srgb,var(--badge-color,#8c929a) 50%,var(--paper))}

/* Give week navigation useful space before letting the whole sidebar scroll. */
.sidebar{padding-top:20px;padding-bottom:14px}
.sidebar>:not(.week-navigation){flex-shrink:0}
.sidebar .brand{margin-bottom:20px}
.sidebar .sidebar-rule{margin-top:12px;margin-bottom:12px}
.sidebar .sidebar-label{margin-top:4px;margin-bottom:6px}
.sidebar .nav-button{padding-top:9px;padding-bottom:9px}
.sidebar .sidebar-foot{padding-top:10px}
.sidebar .week-navigation{flex:1 1 auto;min-height:min(224px,32dvh);max-height:none;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin}
.sidebar .week-nav{padding-top:7px;padding-bottom:7px}

/* Item menus, edit targets and note markers share the compact list rhythm. */
.item-content[role="button"]:focus-visible{outline:2px solid #b98944;outline-offset:3px;border-radius:4px}
.item-content.archived-content{cursor:default}
.note-marker{display:inline-flex;vertical-align:middle;margin-left:5px;color:var(--secondary);line-height:1}
.note-marker .ico{width:13px;height:13px;stroke-width:1.8}
.column-sort-menu .item-delete{color:#b46c68}
.row-menu .column-sort-menu{width:196px}
.row-menu .column-sort-menu button{min-height:34px}
/* Keep category and title on the same line; all secondary actions live in ⋯. */
#backlog-drawer .pool-item{display:grid;grid-template-columns:22px 14px minmax(0,1fr) 24px;align-items:start;gap:6px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--paper)}
#backlog-drawer .pool-item .focus-star{margin:0}
#backlog-drawer .pool-item .task-check{margin-top:4px}
#backlog-drawer .pool-item>.item-content{min-width:0}
#backlog-drawer .pool-item .item-copy{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:5px;margin:0}
#backlog-drawer .pool-item .item-title{width:auto;min-width:0;line-height:19px}
#backlog-drawer .pool-item .tag{max-width:64px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#edit-modal-details{height:auto;max-height:none;overflow-y:hidden;resize:none;transition:border-color .15s,box-shadow .15s}
