@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&display=swap');
:root{
--paper:#eaaaea;--paper-2:#eaecee;--canvas:#eaecee;--surface:#FFFFFF;--surface-sunk:#F1F5F9;
--ink:#0F172A;--ink-2:#334155;--ink-deep:#0B132B;--muted:#64748B;--faint:#94A3B8;
--line:#F8FAFC;--line-soft:#F8FAFC;--line-strong:#F8FAFC;
--rail:#0B1914;--rail-hover:#132A22;--rail-line:rgba(255,255,255,.08);--rail-text:#E2E8F0;--rail-muted:#94A3B8;--rail-dim:#64748B;--rail-strong:#FFFFFF;
--accent:#059669;--accent-dark:#047857;--accent-line:#E2E8F0;--accent-soft:#F0FDF4;--accent-soft-2:#DCFCE7;
--accent-green:#059669;--accent-green-dark:#047857;--accent-green-line:#E2E8F0;--accent-green-soft:#F0FDF4;--accent-green-soft-2:#DCFCE7;
--p0:#DC2626;--p1:#D97706;--p1-ink:#92400E;--p2:#059669;
--success:#059669;--success-dark:#047857;--success-soft:#F0FDF4;--success-line:#E2E8F0;--success-ink:#047857;
--warn:#D97706;--warn-soft:#FFFBEB;--warn-line:#E2E8F0;
--danger:#DC2626;--danger-dark:#B91C1C;--danger-line:#E2E8F0;--danger-ink:#991B1B;--danger-soft:#FEF2F2;--danger-soft-2:#FEE2E2;
--c-coral-soft:#FFF1F2;--c-coral-line:#E2E8F0;--c-coral-ink:#BE123C;
--c-blue-soft:#F0F9FF;--c-blue-line:#E2E8F0;--c-blue-ink:#0369A1;--c-blue:#0284C7;
--c-green-soft:#F0FDF4;--c-green-line:#E2E8F0;--c-green-ink:#047857;--c-green:#059669;
--c-teal-soft:#F0FDFA;--c-teal-line:#E2E8F0;--c-teal-ink:#0F766E;--c-teal:#0D9488;
--c-purple-soft:#FAF5FF;--c-purple-line:#E2E8F0;--c-purple-ink:#6B21A8;--c-purple:#7E22CE;
--c-gold-soft:#FFFBEB;--c-gold-line:#E2E8F0;--c-gold-ink:#92400E;
--font-sans:'Inter','DM Sans',-apple-system,BlinkMacSystemFont,'PingFang SC','Hiragino Sans GB','Noto Sans SC','Microsoft YaHei';
--shadow:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
--shadow-sm:0 1px 2px rgba(0,0,0,.05);
--shadow-md:0 4px 6px -1px rgba(0,0,0,.07),0 2px 4px -2px rgba(0,0,0,.05);
--shadow-lg:0 10px 15px -3px rgba(0,0,0,.08),0 4px 6px -4px rgba(0,0,0,.04);
--ease:cubic-bezier(.22,.61,.36,1);--ease-out:cubic-bezier(.16,.84,.44,1);--ease-spring:cubic-bezier(.34,1.30,.64,1);
--t-fast:150ms;--t:200ms;--t-slow:280ms;
--r-sm:6px;--r:8px;--r-lg:10px;--r-xl:12px;
}*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font-family:'DM Sans','Noto Sans SC';font-size:15px}button,input,textarea{font:inherit}button{cursor:pointer;border:0;background:none;color:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:252px;background:var(--rail);color:var(--rail-text);padding:28px 18px 18px;display:flex;flex-direction:column;flex-shrink:0}.brand{display:flex;align-items:center;gap:10px;color:var(--surface);letter-spacing:-.02em;line-height:1.02;font-size:15px}.brand strong{font-weight:700}.brand-mark{width:30px;height:30px;border-radius:6px;background:var(--accent);display:grid;place-items:center;font-weight:700;color:var(--surface)}.workspace-switcher{display:flex;align-items:center;gap:10px;border:1px solid var(--rail-line);border-radius:8px;padding:10px 11px;margin:28px 0 25px}.avatar{width:30px;height:30px;border-radius:50%;background:var(--accent);color:var(--surface);display:grid;place-items:center;font-weight:700}.workspace-switcher small{display:block;color:var(--rail-muted);font-size:11px;margin-bottom:2px}.workspace-switcher strong{font-size:13px;color:var(--rail-strong)}.chevron{margin-left:auto;color:var(--rail-muted)}.nav-list{display:grid;gap:4px}.nav-item,.filter-link{height:42px;border-radius:6px;display:flex;align-items:center;gap:12px;padding:0 12px;color:var(--rail-text);text-align:left;width:100%}.nav-item .icon-slot{font-size:18px;width:18px;text-align:center}.nav-item.active{background:var(--rail-hover);color:var(--surface)}.nav-item b,.filter-link b{margin-left:auto;font-size:12px;color:var(--rail-muted);font-weight:500}.sidebar-section{border-top:1px solid var(--rail-line);margin-top:25px;padding-top:21px}.section-label{font-size:11px;text-transform:uppercase;letter-spacing:.11em;color:var(--rail-dim);padding:0 12px;display:block;margin-bottom:7px}.filter-link{font-size:13px}.filter-link:hover,.nav-item:hover{background:var(--ink);color:var(--surface)}.dot{width:8px;height:8px;border-radius:50%;display:inline-block}.p0{background:var(--p0)}.inprogress{background:var(--c-blue)}.deferred{background:var(--c-purple)}.sidebar-footer{margin-top:auto}.focus-card{background:var(--ink-deep);padding:15px;border-radius:8px;margin-bottom:12px}.focus-card span,.focus-card small{display:block;color:var(--faint);font-size:12px}.focus-card strong{display:block;color:var(--surface);font-size:25px;letter-spacing:-.04em;margin:4px 0}.progress{height:5px;background:var(--line-soft);border-radius:99px;overflow:hidden}.progress i{display:block;height:100%;width:0;background:var(--accent);border-radius:inherit;transition:width .3s}.focus-card .progress{background:var(--rail-hover);margin-top:11px}.focus-card .progress i{background:var(--accent)}.help-row{font-size:12px;color:var(--muted);padding:0 6px}.help-row span{border:1px solid var(--ink-2);padding:2px 5px;border-radius:2px;margin-right:7px}.help-row kbd{float:right;border:1px solid var(--ink-2);padding:2px 6px;border-radius:2px}.main-content{flex:1;min-width:0}.topbar{height:76px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(24px,4vw,58px)}.breadcrumbs{font-size:13px;color:var(--muted)}.breadcrumbs span:last-child{color:var(--ink);margin-left:9px}.top-actions{display:flex;align-items:center;gap:11px}.icon-btn{width:35px;height:35px;border:1px solid var(--line);border-radius:6px;color:var(--ink-2);font-size:22px;position:relative}.notification-dot{width:5px;height:5px;background:var(--accent);border-radius:50%;position:absolute;right:7px;top:7px}.primary-btn,.secondary-btn{height:38px;border-radius:4px;padding:0 15px;font-weight:600;font-size:13px}.primary-btn{background:var(--accent);color:var(--surface);box-shadow:var(--shadow-sm)}.primary-btn:hover{background:var(--accent-dark)}.secondary-btn{border:1px solid var(--line);background:var(--surface)}.secondary-btn:hover{border-color:var(--line-strong)}.view{padding:36px clamp(24px,4vw,58px) 70px;max-width:1140px;margin:auto;display:none}.active-view{display:block}.page-intro{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:28px}.eyebrow{font-size:12px;color:var(--accent);font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin-bottom:8px}.page-intro h1{font-size:32px;letter-spacing:-.04em;margin:0 0 7px}.page-intro p{color:var(--muted);margin:0}.date-chip{height:38px;border:1px solid var(--line);border-radius:6px;background:var(--surface);display:flex;align-items:center;gap:13px;padding:0 8px;font-weight:600;font-size:13px}.date-chip button{font-size:20px;color:var(--faint);width:25px}.daily-progress{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:15px 18px;display:grid;grid-template-columns:150px 1fr 50px;align-items:center;gap:18px;margin-bottom:22px}.daily-progress span,.daily-progress strong{display:block}.daily-progress span{font-size:12px;color:var(--muted)}.daily-progress strong{font-size:13px;margin-top:3px}.progress.wide{height:8px}.progress-percent{text-align:right;font-weight:700;color:var(--accent-green-dark)}.quick-tabs{display:flex;border-bottom:1px solid var(--line);gap:24px;margin-bottom:17px}.quick-tab{padding:0 0 12px;color:var(--muted);font-size:13px;position:relative}.quick-tab.active{color:var(--ink);font-weight:700}.quick-tab.active:after{content:'';position:absolute;bottom:-1px;height:2px;background:var(--accent);left:0;right:0}.quick-tab b{background:var(--line-soft);border-radius:6px;padding:2px 6px;font-size:11px;margin-left:5px}.task-list{display:grid;gap:10px}.task-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:16px 18px;display:grid;grid-template-columns:4px 1fr auto;gap:15px;align-items:center;transition:transform .18s,box-shadow .18s}.task-card:hover{transform:translateY(-1px);box-shadow:var(--shadow)}.task-stripe{width:4px;height:100%;min-height:52px;border-radius:2px}.task-stripe.P0{background:var(--p0)}.task-stripe.P1{background:var(--p1)}.task-stripe.P2{background:var(--p2)}.task-main{min-width:0}.task-topline{display:flex;align-items:center;gap:8px;margin-bottom:6px}.priority{font-size:11px;font-weight:700;border-radius:2px;padding:3px 5px;line-height:1}.priority.P0{color:var(--danger);background:var(--danger-soft)}.priority.P1{color:var(--p1-ink);background:var(--warn-soft)}.priority.P2{color:var(--success);background:var(--success-soft)}.task-name{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-desc{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-meta{display:flex;align-items:center;gap:12px;color:var(--faint);font-size:12px;margin-top:9px}.defer-target{color:var(--c-purple);font-weight:600}.project-tag{color:var(--ink-2);background:var(--surface-sunk);padding:3px 7px;border-radius:2px}.task-status{font-size:12px;color:var(--ink-2);white-space:nowrap}.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:5px;background:var(--faint)}.status-dot.doing{background:var(--c-blue)}.status-dot.done{background:var(--success)}.status-dot.defer{background:var(--c-purple)}.task-arrow{font-size:21px;color:var(--line-strong)}.fixed-badge{font-size:11px;color:var(--c-purple-ink);background:var(--c-purple-soft);padding:3px 6px;border-radius:2px}.empty-state{text-align:center;background:var(--surface);border:1px dashed var(--line-strong);border-radius:8px;padding:56px 20px}.empty-icon{width:45px;height:45px;background:var(--success-soft);color:var(--success);display:grid;place-items:center;border-radius:50%;margin:0 auto 13px;font-size:22px}.empty-state h3{margin:0 0 6px}.empty-state p{color:var(--muted);margin:0 0 19px;font-size:13px}.hidden{display:none!important}.mini-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;margin-bottom:28px}.day-cell{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:13px;min-height:148px;cursor:pointer}.day-cell.today{border:1px solid var(--line-strong);padding:13px}.day-cell:hover{box-shadow:var(--shadow)}.day-head{display:flex;justify-content:space-between;font-size:12px;margin-bottom:13px}.day-head strong{font-size:18px}.day-count{background:var(--accent-green-soft);color:var(--accent-green-dark);padding:3px 6px;border-radius:2px;font-size:11px}.day-task{font-size:11px;padding:5px 6px;border-left:3px solid var(--p2);background:var(--surface-sunk);margin:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.day-task.P0{border-left-color:var(--p0)}.day-task.P1{border-left-color:var(--p1)}.more-tasks{color:var(--accent);font-size:11px;margin-top:6px}.week-overview{display:grid;gap:8px}.week-row{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:13px 16px;display:grid;grid-template-columns:95px 1fr auto;align-items:center;gap:20px}.week-row.today{border-color:var(--line-strong)}.week-date strong{display:block}.week-date span{font-size:11px;color:var(--muted)}.week-summary{display:flex;gap:14px;color:var(--muted);font-size:12px}.week-summary b{color:var(--ink)}.summary-layout{display:grid;grid-template-columns:1fr 220px;gap:20px}.summary-editor{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:24px}.draft-badge{display:inline-flex;background:var(--accent-soft-2);color:var(--accent);font-weight:700;font-size:11px;padding:5px 8px;border-radius:2px;margin-bottom:20px}.summary-editor label{display:block;font-size:13px;font-weight:700;margin-bottom:17px}.summary-editor textarea{display:block;width:100%;border:1px solid var(--line);border-radius:4px;padding:11px 12px;resize:vertical;min-height:72px;margin-top:8px;color:var(--ink);line-height:1.6;outline:none}.summary-editor textarea:focus{border-color:var(--accent)}.editor-actions{display:flex;justify-content:space-between;align-items:center;margin-top:6px}.save-status{color:var(--muted);font-size:12px}.summary-side{display:grid;gap:10px;align-content:start}.stat-card{background:var(--surface);border:1px solid var(--line);padding:17px;border-radius:8px}.stat-card span,.stat-card small{display:block;color:var(--muted);font-size:12px}.stat-card strong{display:block;font-size:29px;letter-spacing:-.05em;margin:7px 0 3px}.stat-card.warm{background:var(--surface);border-color:var(--line)}.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:25px}.project-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:17px}.project-title{display:flex;justify-content:space-between;align-items:start}.project-title h3{font-size:15px;margin:0}.project-status{font-size:11px;color:var(--success);background:var(--success-soft);border-radius:2px;padding:4px 6px}.project-card p{font-size:12px;color:var(--muted);margin:9px 0 17px;min-height:32px}.project-progress{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-bottom:7px}.project-progress b{color:var(--ink)}.project-card .progress{height:6px}.assignment-panel{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:20px}.panel-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:13px}.panel-heading h2{font-size:19px;margin:0}.count-badge{background:var(--accent-soft-2);color:var(--accent);font-size:11px;padding:3px 6px;border-radius:6px;vertical-align:middle}.muted{font-size:12px;color:var(--muted)}.suggestion{display:flex;align-items:center;gap:11px;border-top:1px solid var(--line);padding:14px 0}.suggestion-icon{width:29px;height:29px;background:var(--accent-soft-2);color:var(--accent);border-radius:4px;display:grid;place-items:center}.suggestion-copy{flex:1}.suggestion-copy strong{font-size:13px}.suggestion-copy p{font-size:12px;color:var(--muted);margin:4px 0 0}.ghost-btn{border:1px solid var(--line);border-radius:4px;padding:7px 10px;font-size:12px}.ghost-btn:hover{border-color:var(--accent);color:var(--accent)}.drawer-backdrop,.modal-backdrop{position:fixed;inset:0;background:rgba(11,19,43,.4);z-index:10}.task-drawer{position:absolute;right:0;top:0;bottom:0;width:min(470px,100%);background:var(--surface);padding:33px 32px;overflow:auto;animation:slide .22s ease}.modal{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--surface);width:min(480px,calc(100% - 32px));border-radius:8px;padding:30px;box-shadow:0 22px 55px rgba(11,19,43,.22);animation:pop .18s ease}.close-btn{position:absolute;right:18px;top:14px;font-size:25px;color:var(--faint)}.drawer-kicker{color:var(--accent);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.drawer-title{font-size:25px;letter-spacing:-.04em;margin:8px 0 8px}.drawer-description{color:var(--muted);line-height:1.6;font-size:13px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;background:var(--surface-sunk);padding:14px;border-radius:6px;margin:22px 0}.detail-grid span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}.detail-grid strong{font-size:13px}.history{border-top:1px solid var(--line);padding-top:18px}.history h3{font-size:13px;margin:0 0 13px}.history-item{display:flex;gap:10px;font-size:12px;color:var(--muted);margin:10px 0}.history-item i{width:7px;height:7px;border-radius:50%;background:var(--success);margin-top:4px;flex-shrink:0}.drawer-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}.complete-btn{background:var(--success)}.complete-btn:hover{background:var(--success)}.defer-btn{border:1px solid var(--line);color:var(--danger);background:var(--danger-soft)}.modal h2{font-size:22px;margin:0 0 7px;letter-spacing:-.03em}.modal p{font-size:13px;color:var(--muted);margin:0 0 20px;line-height:1.55}.form-field{display:block;font-size:12px;font-weight:700;margin:15px 0}.form-field textarea,.form-field input,.form-field select{display:block;width:100%;padding:10px;border:1px solid var(--line);border-radius:4px;margin-top:7px;outline:none}.form-field textarea:focus,.form-field input:focus,.form-field select:focus{border-color:var(--accent)}.modal-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.toast{position:fixed;right:25px;bottom:25px;background:var(--ink-deep);color:var(--surface);border-radius:4px;padding:11px 14px;font-size:13px;opacity:0;transform:translateY(10px);pointer-events:none;transition:.22s;z-index:30}.toast.show{opacity:1;transform:translateY(0)}@keyframes slide{from{transform:translateX(20px);opacity:.6}to{transform:none;opacity:1}}@keyframes pop{from{opacity:0;transform:translate(-50%,-48%) scale(.98)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(max-width:900px){.sidebar{width:206px}.project-grid{grid-template-columns:1fr 1fr}.mini-calendar{grid-template-columns:repeat(4,1fr)}.day-cell:nth-child(n+5){display:none}}
@media(max-width:640px){.app-shell{display:block}.sidebar{width:100%;height:auto;padding:13px 15px;display:block}.brand{display:inline-flex}.workspace-switcher,.sidebar-section,.sidebar-footer{display:none}.nav-list{display:flex;gap:5px;margin-top:14px;overflow:auto}.nav-item{width:auto;white-space:nowrap;height:36px;padding:0 12px;font-size:12px}.nav-item b{display:none}.topbar{height:58px;padding:0 16px}.breadcrumbs{font-size:12px}.top-actions .icon-btn{display:none}.top-actions .primary-btn{height:34px;padding:0 11px}.view{padding:25px 16px 50px}.page-intro{align-items:start;gap:15px;margin-bottom:22px}.page-intro h1{font-size:27px}.page-intro p{font-size:13px}.date-chip{flex-shrink:0}.daily-progress{grid-template-columns:1fr auto;gap:8px}.daily-progress .progress{grid-column:1/-1;grid-row:2}.progress-percent{grid-column:2;grid-row:1}.task-card{grid-template-columns:4px 1fr auto;padding:13px}.task-meta{gap:7px;flex-wrap:wrap}.task-status{display:none}.mini-calendar{grid-template-columns:repeat(2,1fr)}.day-cell:nth-child(n){display:block;min-height:115px}.week-row{grid-template-columns:1fr auto;gap:9px}.week-summary{grid-column:1/-1}.summary-layout{grid-template-columns:1fr}.summary-side{grid-template-columns:repeat(3,1fr)}.stat-card{padding:12px}.stat-card strong{font-size:23px}.project-grid{grid-template-columns:1fr}.assignment-panel{padding:15px}.suggestion{flex-wrap:wrap}.suggestion-copy{min-width:calc(100% - 44px)}.suggestion .ghost-btn{margin-left:40px}.task-drawer{padding:30px 20px}.modal{padding:27px 20px}}
/* Vertical week axis with horizontal day rails */
.week-gesture-hint{display:flex;gap:10px;margin:-12px 0 13px;color:var(--faint);font-size:12px}.week-gesture-hint span{background:var(--surface);border:1px solid var(--line);padding:6px 9px;border-radius:4px}.week-carousel{height:min(690px,calc(100vh - 225px));min-height:470px;overflow-y:auto;padding:18px 10px 35px 2px;scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent}.week-panel{background:var(--surface);border:1px solid var(--line);border-radius:8px;margin:0 auto 15px;width:min(860px,100%);padding:18px 18px 16px;transition:transform .28s,box-shadow .28s,opacity .28s}.compact-week{opacity:.58;transform:scale(.94)}.focus-week{border-color:var(--line-strong);box-shadow:var(--shadow-md);transform:scale(1)}.week-panel-header{display:flex;justify-content:space-between;align-items:center;padding:1px 3px 14px}.week-kicker{color:var(--accent);font-size:11px;font-weight:700;letter-spacing:.09em;text-transform:uppercase}.week-panel-header h2{font-size:19px;margin:4px 0 0;letter-spacing:-.03em}.week-totals{text-align:right;color:var(--muted);font-size:11px}.week-totals strong{display:block;font-size:24px;color:var(--ink);line-height:1}.week-days{overflow-x:auto;overscroll-behavior-x:contain;padding:5px 2px 11px;scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent}.week-days-track{display:flex;gap:10px;min-width:max-content}.axis-day{position:relative;flex:0 0 126px;min-height:91px;border:1px solid var(--line-soft);border-radius:11px;background:var(--surface-sunk);padding:12px;cursor:pointer;transition:flex-basis .28s,min-height .28s,transform .28s,box-shadow .28s,border-color .28s,background .28s;}.axis-day:hover{transform:translateY(-3px);background:var(--surface);box-shadow:var(--shadow);border-color:var(--line-strong);z-index:2}.axis-day.selected-day{flex-basis:315px;min-height:220px;background:var(--surface);border:1px solid var(--ink);padding:12px;box-shadow:var(--shadow);z-index:1}.axis-day.selected-day:before{content:'Selected';position:absolute;top:-10px;right:11px;background:var(--ink);color:var(--surface);font-size:10px;font-weight:700;border-radius:4px;padding:3px 7px}.axis-day.today-day .axis-day-head strong{color:var(--accent)}.axis-day-head{display:flex;align-items:baseline;gap:7px}.axis-day-head span{font-size:11px;color:var(--muted)}.axis-day-head strong{font-size:23px;letter-spacing:-.04em}.axis-day-head em{font-style:normal;color:var(--accent);font-size:10px;font-weight:700;margin-left:auto}.axis-day-count{font-size:11px;color:var(--muted);margin-top:7px}.selected-day .axis-day-count{color:var(--ink)}.axis-task-list{display:grid;gap:6px;margin-top:13px}.axis-task{width:100%;display:grid;grid-template-columns:auto 1fr auto;gap:6px;align-items:center;text-align:left;background:var(--surface-sunk);border:1px solid var(--line-soft);border-radius:4px;padding:7px 8px;font-size:11px}.axis-task:hover{border-color:var(--line-strong);background:var(--surface-sunk)}.axis-task small{grid-column:2/-1;color:var(--muted);font-size:10px}.axis-task.P0{border-left:3px solid var(--p0)}.axis-task.P1{border-left:3px solid var(--p1)}.axis-task.P2{border-left:3px solid var(--p2)}.axis-empty{font-size:12px;color:var(--muted);background:var(--surface-sunk);border-radius:4px;padding:14px;margin-top:12px;text-align:center}
@media(max-width:640px){.week-carousel{height:calc(100vh - 240px);min-height:480px;padding-left:0;padding-right:0}.week-panel{padding:14px 12px}.axis-day{flex-basis:112px}.axis-day.selected-day{flex-basis:275px}.week-gesture-hint{font-size:11px;gap:6px}.week-gesture-hint span{padding:5px 6px}}
.hover-peek{position:absolute;left:9px;right:9px;bottom:8px;background:var(--ink-deep);color:var(--surface);border-radius:4px;padding:7px 8px;display:grid;grid-template-columns:auto 1fr;gap:4px 6px;opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .2s,transform .2s}.axis-day:hover .hover-peek{opacity:1;transform:translateY(0)}.hover-peek strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hover-peek small{grid-column:1/-1;color:var(--rail-muted);font-size:10px}
.axis-day:not(.selected-day) .axis-task-list{display:none}.axis-day:hover .hover-peek{display:none}.week-days,.week-days-track{overflow:visible}.week-carousel{overflow-y:auto;overflow-x:visible}@keyframes floatIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
/* hover lift must sit above the rail and adjacent cards */
.week-carousel{overflow-y:auto;overflow-x:visible}
.week-days,.week-days-track{overflow:visible}
.week-days{padding-bottom:26px}
.axis-day{z-index:1}
/* the floating preview is rendered outside the scroll container */
.week-days{overflow-x:auto;overflow-y:hidden}
.week-days-track{overflow:visible}
.floating-day-card{position:fixed;z-index:1000;width:270px;min-height:185px;background:var(--surface);border:1px solid var(--line-strong);border-radius:8px;padding:14px;box-shadow:var(--shadow-lg);pointer-events:auto;opacity:0;transform:scale(.86) translateY(12px);transform-origin:center bottom;transition:opacity .18s,transform .22s}.floating-day-card.has-add{padding-top:40px}.floating-day-card.show{opacity:1;transform:scale(1) translateY(0)}.floating-day-card .floating-head{display:flex;justify-content:space-between;align-items:baseline}.floating-day-card .floating-head strong{font-size:20px}.floating-day-card .floating-head span{font-size:11px;color:var(--muted)}.floating-day-card .floating-meta{font-size:11px;color:var(--muted);margin:6px 0 12px}.floating-day-card .floating-task{font-size:11px;padding:7px 8px;background:var(--surface-sunk);border-radius:4px;margin:5px 0;border-left:3px solid var(--p2)}.floating-day-card .floating-task.P0{border-left-color:var(--p0)}.floating-day-card .floating-task.P1{border-left-color:var(--p1)}.floating-add-task{position:absolute;top:9px;right:9px;padding:5px 8px;border:1px solid var(--line);border-radius:4px;background:var(--surface);color:var(--accent);font-size:11px;font-weight:700;white-space:nowrap}.floating-add-task:hover{border-color:var(--line-strong);background:var(--surface-sunk)}
.account-banner{display:flex;align-items:center;gap:13px;background:var(--ink-deep);color:var(--surface);border-radius:8px;padding:17px 18px;margin-bottom:15px}.account-banner .avatar{background:var(--accent);color:var(--surface)}.account-banner strong,.account-banner span{display:block}.account-banner span{font-size:12px;color:var(--rail-text);margin-top:4px}.account-banner .permission-pill{margin-left:auto}.account-banner .secondary-btn{color:var(--ink);margin-left:8px}.avatar.large{width:38px;height:38px}.permission-pill{display:inline-flex;align-items:center;background:var(--success-soft);color:var(--success);border-radius:4px;padding:6px 9px;font-size:11px;font-weight:700;white-space:nowrap}.account-list{display:grid;gap:9px;margin-bottom:18px}.account-item{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:13px 15px;display:flex;align-items:center;gap:11px}.account-item.current-account{border-color:var(--line-strong)}.account-copy{flex:1}.account-copy strong,.account-copy span,.account-copy small{display:block}.account-copy strong{font-size:14px}.account-copy span{font-size:12px;margin-top:3px}.account-copy small{font-size:11px;color:var(--muted);margin-top:4px}.repeat-admin-panel{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:18px;margin:18px 0}.repeat-list{display:grid;gap:8px}.repeat-admin-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 0}.repeat-admin-item div{display:grid;gap:3px}.repeat-admin-item span,.repeat-admin-item small{font-size:12px;color:var(--muted)}.automation-actions{display:flex;gap:8px;flex-wrap:wrap}.automation-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:18px;display:flex;align-items:center;justify-content:space-between;gap:18px}.automation-card h2{margin:0;font-size:18px}.automation-card p{font-size:12px;color:var(--muted);line-height:1.6;margin:7px 0 0}.inbox-list{display:grid;gap:9px}.inbox-item{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:15px;display:flex;align-items:flex-start;gap:12px;cursor:pointer;transition:.2s}.inbox-item:hover{transform:translateX(4px);box-shadow:var(--shadow)}.inbox-item.unread{border-left:3px solid var(--line-strong)}.inbox-icon{width:34px;height:34px;border-radius:6px;background:var(--surface-sunk);color:var(--accent);display:grid;place-items:center;font-size:17px;flex-shrink:0}.inbox-copy{flex:1}.inbox-copy strong{font-size:13px}.inbox-copy p{font-size:12px;color:var(--muted);line-height:1.5;margin:5px 0}.inbox-copy small{font-size:11px;color:var(--faint)}.unread-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin:0 0 2px 7px}
@media(max-width:640px){.account-banner{flex-wrap:wrap}.account-banner .permission-pill{margin-left:0}.account-banner .secondary-btn{margin-left:49px}.automation-card{display:block}.automation-card .secondary-btn{margin-top:14px}.inbox-item{padding:13px}.inbox-icon{width:30px;height:30px}}
.edit-request-summary{background:var(--surface-sunk);border:1px solid var(--line);border-radius:6px;padding:13px;margin:18px 0}.edit-request-summary>strong{display:block;font-size:13px;color:var(--ink)}.edit-request-summary>small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:4px}.edit-request-summary ul{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:6px}.edit-request-summary li{display:flex;justify-content:space-between;gap:12px;font-size:12px;border-top:1px solid var(--line-soft);padding-top:6px}.edit-request-summary li b{color:var(--muted);font-weight:600}.edit-request-summary li span{text-align:right;max-width:70%;word-break:break-word}
.auth-locked .app-shell{display:none}.auth-screen{min-height:100vh}.auth-locked{background:var(--paper)}.auth-card{width:min(420px,calc(100% - 32px));margin:12vh auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:32px;box-shadow:0 22px 60px rgba(11,19,43,.12)}.auth-card .brand{color:var(--ink);margin-bottom:35px}.auth-card h1{font-size:30px;letter-spacing:-.04em;margin:0 0 8px}.auth-card p{color:var(--muted);font-size:14px;margin:0 0 25px}.auth-card label{display:block;font-size:13px;font-weight:700;margin:15px 0}.auth-card input{display:block;width:100%;margin-top:7px;border:1px solid var(--line);border-radius:4px;padding:11px;outline:none}.auth-card input:focus{border-color:var(--accent)}.auth-card .primary-btn{width:100%;margin-top:9px}.auth-card small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:20px}.login-error{min-height:20px;color:var(--danger);font-size:12px;margin-top:8px}

/* One member scope shared by today, the week rail, and date details. */
.schedule-scope{max-width:1024px;margin:24px auto 0;padding:14px 18px;background:var(--surface);border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.schedule-scope strong{display:block;font-size:14px}.schedule-scope span{display:block;font-size:12px;color:var(--muted);margin-top:4px}
.schedule-scope label{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.schedule-scope select{font:inherit;color:var(--ink);background:var(--surface-sunk);border:1px solid var(--line);border-radius:4px;padding:9px 30px 9px 10px;max-width:230px}
.assignee-tag{color:var(--c-blue-ink);background:var(--c-blue-soft);border-radius:2px;padding:3px 7px;font-weight:600}
.axis-members{display:flex;gap:3px;flex-wrap:wrap;margin-top:8px;max-width:105px}.axis-members span{color:var(--ink-2);background:var(--c-blue-soft);border-radius:2px;padding:2px 4px;font-size:10px}.axis-members small{color:var(--muted);font-size:10px;align-self:center}
.floating-assignee{display:block;color:var(--muted);font-size:10px;margin-top:3px}
.project-date-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}

/* A single scroll surface keeps the date axis and all project bars aligned. */
.timeline-view{max-width:none}
.timeline-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.timeline-toolbar strong{font-size:13px}.timeline-toolbar #timelineVisibleRange{display:block;font-size:11px;color:var(--muted);margin-top:5px;font-variant-numeric:tabular-nums}
.timeline-controls{display:flex;gap:6px}.timeline-controls .secondary-btn{height:34px}.timeline-controls button:first-child,.timeline-controls button:last-child{padding:0;width:34px}
.timeline-scroll{width:100%;overflow:auto;max-height:calc(100vh - 300px);min-height:300px;border:1px solid var(--line);border-radius:8px;background:var(--surface);scrollbar-color:var(--line-strong) var(--surface-sunk);scrollbar-width:auto;overscroll-behavior-x:contain;outline-offset:4px}
.gantt-grid{--label-width:220px;width:calc(var(--label-width) + var(--track-width));min-height:300px}
.gantt-header,.gantt-row{display:grid;grid-template-columns:var(--label-width) var(--track-width)}
.gantt-header{position:sticky;top:0;z-index:5;background:var(--surface);border-bottom:1px solid var(--line);height:85px}
.gantt-corner{position:sticky;left:0;z-index:6;background:var(--surface-sunk);border-right:1px solid var(--line);padding:24px 18px 15px;box-shadow:4px 0 8px rgba(15,23,42,.03)}
.gantt-corner strong{font-size:12px}.gantt-corner small{display:block;font-size:10px;color:var(--muted);margin-top:6px}
.gantt-axis{width:var(--track-width)}.gantt-months{height:30px;position:relative;border-bottom:1px solid var(--line-soft);background:var(--surface-sunk)}
.gantt-months>span{position:absolute;height:30px;line-height:30px;border-right:1px solid var(--line);white-space:nowrap;padding:0 10px;font-size:11px;color:var(--ink-2)}.gantt-months b{font-weight:600;position:sticky;left:calc(var(--label-width) + 10px);display:inline-block}
.gantt-dates{display:flex;height:54px}.gantt-date{width:var(--day-width);flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-right:1px solid var(--line-soft);font-size:11px}
.gantt-date strong{font-size:12px;font-weight:500}.gantt-date small{font-size:10px;color:var(--faint)}.gantt-date.weekend{background:var(--surface-sunk);color:var(--faint)}.gantt-date.is-today{background:var(--accent-soft-2);color:var(--danger)}.gantt-date.is-today strong{background:var(--accent);color:var(--surface);border-radius:4px;width:24px;height:23px;display:grid;place-items:center}.gantt-date.is-today small{color:var(--danger)}
.gantt-row{min-height:96px;border-bottom:1px solid var(--line-soft)}.gantt-row:last-child{border-bottom:0}
.gantt-project{position:sticky;left:0;z-index:3;padding:17px 18px;background:var(--surface);border-right:1px solid var(--line);box-shadow:4px 0 8px rgba(15,23,42,.04);overflow:hidden}
.gantt-project>div{display:flex;align-items:center;gap:8px;min-width:0}.gantt-project strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gantt-project small{display:block;font-size:10px;margin:7px 0 5px 16px;color:var(--ink-2)}.gantt-project small span{color:var(--faint)}.gantt-range{display:block;font-size:10px;color:var(--faint);white-space:nowrap;margin-left:16px}
.project-color{width:8px;height:8px;flex:none;border-radius:3px;background:var(--bar-ink)}
.gantt-track{position:relative;background-image:repeating-linear-gradient(to right,transparent 0,transparent calc(var(--day-width) - 1px),var(--line-soft) calc(var(--day-width) - 1px),var(--line-soft) var(--day-width));isolation:isolate}
.gantt-today-line{position:absolute;top:0;bottom:0;width:1px;background:var(--accent);z-index:0;pointer-events:none}
.gantt-bar{position:absolute;top:25px;height:40px;border:1px solid var(--bar-border);border-radius:4px;background:var(--bar-bg);color:var(--bar-ink);box-shadow:0 3px 7px rgba(15,23,42,.05);display:flex;align-items:center;padding:0 12px;white-space:nowrap;font-size:11px;font-weight:600;transition:box-shadow .18s,filter .18s;z-index:1}
.gantt-bar span{overflow:hidden;text-overflow:ellipsis;display:block;position:sticky;left:calc(var(--label-width) + 12px);max-width:100%}
.gantt-bar:hover,.gantt-bar:focus-visible{filter:saturate(1.3);box-shadow:0 5px 14px rgba(15,23,42,.12);outline:2px solid var(--bar-border);outline-offset:2px;z-index:2}
.gantt-bar.open-ended{border-style:dashed;background:repeating-linear-gradient(135deg,transparent 0 6px,rgba(255,255,255,.3) 6px 12px),var(--bar-bg);border-radius:4px 0 0 8px}
.gantt-bar.open-ended:after{content:'→';position:absolute;right:5px;font-size:19px}.gantt-bar.awaiting{opacity:.65;border-style:dashed}
.coral{--bar-bg:var(--c-coral-soft);--bar-border:var(--c-coral-line);--bar-ink:var(--danger)}.blue{--bar-bg:var(--c-blue-soft);--bar-border:var(--c-blue-line);--bar-ink:var(--c-blue-ink)}.green{--bar-bg:var(--c-green-soft);--bar-border:var(--c-green-line);--bar-ink:var(--c-green-ink)}.purple{--bar-bg:var(--c-purple-soft);--bar-border:var(--c-purple-line);--bar-ink:var(--c-purple-ink)}.gold{--bar-bg:var(--c-gold-soft);--bar-border:var(--c-gold-line);--bar-ink:var(--c-gold-ink)}
.gantt-invalid{display:block;margin:32px 18px;font-size:12px;color:var(--danger)}
.timeline-legend{display:flex;align-items:center;flex-wrap:wrap;gap:18px;margin-top:16px;font-size:11px;color:var(--muted)}.timeline-legend>span{display:flex;align-items:center;gap:6px}.legend-today{height:12px;width:2px;background:var(--accent)}.legend-range{width:18px;height:9px;background:var(--c-blue-soft);border:1px solid var(--c-blue-line);border-radius:3px}.legend-open{width:18px;height:9px;border:1px dashed var(--c-blue-line)}.timeline-scroll-hint{margin-left:auto;color:var(--faint)}
@media(max-width:1400px){.schedule-scope{margin-left:clamp(24px,4vw,58px);margin-right:clamp(24px,4vw,58px)}}
@media(max-width:800px){.gantt-grid{--label-width:174px}.gantt-project{padding-left:12px;padding-right:10px}.gantt-project strong{font-size:11px}.gantt-project small{margin-left:0}.gantt-range{margin-left:0;font-size:10px}.schedule-scope{align-items:flex-start;flex-wrap:wrap}.timeline-view .page-intro{align-items:flex-start}.timeline-view .page-intro .primary-btn{white-space:nowrap}.timeline-scroll-hint{margin-left:0}}
@media(max-width:640px){.schedule-scope{margin:16px 16px 0;padding:12px}.schedule-scope label{justify-content:space-between;width:100%}.timeline-toolbar{gap:8px}.timeline-toolbar #timelineVisibleRange{font-size:10px}.timeline-controls{gap:4px}.timeline-controls .secondary-btn{font-size:11px;padding:0 8px}.timeline-scroll{max-height:60vh}.timeline-view .page-intro{flex-wrap:wrap}.timeline-legend{gap:12px}.project-date-fields{grid-template-columns:1fr;gap:0}}
@media(prefers-reduced-motion:reduce){.gantt-bar{transition:none}}
.inbox-actions{display:flex;gap:8px;margin-top:12px}.inbox-actions .primary-btn,.inbox-actions .secondary-btn{height:32px;font-size:11px;padding:0 11px}.request-inbox-item{align-items:flex-start}.member-checkboxes{border:1px solid var(--line);border-radius:6px;padding:11px 12px;display:grid;gap:8px;margin-top:14px}.member-checkboxes legend{font-size:12px;font-weight:700;padding:0 4px}.member-checkboxes label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:500;background:var(--surface-sunk);border-radius:4px;padding:8px}.member-checkboxes label:hover{background:var(--accent-soft-2)}.member-checkboxes input{accent-color:var(--accent)}.member-checkboxes small{color:var(--muted);margin-left:auto;font-size:10px}.project-members{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;color:var(--muted);font-size:11px}.project-members .ghost-btn{font-size:10px;padding:6px 8px;white-space:nowrap}
.task-form-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:12px}.task-form-grid .form-field{margin-top:10px}.task-kind-switch{display:flex;gap:6px;margin:2px 0 12px}.task-kind-btn{border:1px solid var(--line);background:var(--surface);border-radius:6px;padding:8px 14px;font-size:12px;font-weight:700;color:var(--muted)}.task-kind-btn.active{background:var(--ink-deep);color:var(--surface);border-color:var(--ink-deep)}
@media(max-width:640px){.task-form-grid{grid-template-columns:1fr}.task-form-grid .form-field{margin-top:6px}}

/* Diary weekly view and member notebooks */
.diary-week,.diary-admin{display:grid;gap:18px}.diary-week-toolbar,.notebook-shelf-heading{display:flex;justify-content:space-between;align-items:end;gap:14px}.diary-week-toolbar h2,.notebook-shelf-heading h2{margin:3px 0 0;font-size:20px}.diary-week-track{display:flex;gap:12px;overflow-x:auto;padding:8px 4px 18px;}.diary-day-card{flex:0 0 178px;min-height:170px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:12px;transition:transform .18s,box-shadow .18s,border-color .18s}.diary-day-card:hover,.diary-day-card:focus-visible{transform:translateY(-3px);border-color:var(--line-strong);box-shadow:var(--shadow);outline:none}.diary-day-card.today{border:1px solid var(--line-strong);padding:16px}.diary-day-top{display:flex;justify-content:space-between;align-items:center}.diary-day-top b{font-size:13px}.diary-day-top strong{font-size:19px}.diary-day-status{font-size:11px;color:var(--accent);font-weight:700}.diary-day-preview{font-size:12px;color:var(--muted);line-height:1.6;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.diary-stat-strip{display:flex;gap:10px;flex-wrap:wrap}.diary-stat-strip span{background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:10px 14px;font-size:12px;color:var(--muted)}.diary-stat-strip b{font-size:17px;color:var(--ink);margin-left:5px}.notebook-shelf{display:flex;gap:14px;overflow-x:auto;padding:8px 4px 16px;}.member-notebook{flex:0 0 160px;display:grid;gap:8px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:13px;transition:.18s}.member-notebook:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--line-strong)}.notebook-cover{height:84px;border-radius:4px;background:var(--surface-sunk);border:1px solid var(--line);color:var(--accent);font-size:35px;display:grid;place-items:center}.member-notebook strong{font-size:14px}.member-notebook small{color:var(--muted);font-size:11px}.diary-admin-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:16px}.diary-log-panel,.diary-load-panel{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:18px}.diary-log-list{display:grid;gap:0}.diary-log-item{display:grid;grid-template-columns:8px 1fr auto;gap:10px;align-items:center;padding:11px 0;border-top:1px solid var(--line-soft);font-size:12px}.diary-log-item i{width:7px;height:7px;border-radius:50%;background:var(--accent)}.diary-log-item span{color:var(--ink)}.diary-log-item small{color:var(--muted)}.diary-load-row{display:grid;grid-template-columns:75px 85px 1fr 40px;gap:9px;align-items:center;border-top:1px solid var(--line-soft);padding:13px 0;font-size:12px}.diary-load-row .progress{height:7px}.diary-load-row .progress i{background:var(--success)}.diary-load-row>b{text-align:right;color:var(--accent)}.diary-notebook{max-width:760px;margin:0 auto}.notebook-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.notebook-toolbar h2{font-size:24px;margin:4px 0}.notebook-state{font-size:11px;padding:5px 8px;border-radius:2px;background:var(--success-soft);color:var(--success)}.notebook-paper{background:var(--surface);border:1px solid var(--line-strong);border-radius:4px;padding:28px 32px;box-shadow:0 12px 26px rgba(15,23,42,.08);background-image:linear-gradient(var(--line-soft) 1px,transparent 1px);background-size:100% 34px}.notebook-date{color:var(--accent-dark);font-size:14px;margin-bottom:20px}.notebook-paper label{display:block;font-size:13px;font-weight:700;margin:20px 0}.notebook-paper textarea{display:block;width:100%;min-height:82px;resize:vertical;border:0;border-bottom:1px solid var(--line-strong);background:transparent;padding:8px 2px;font-family:inherit;line-height:1.8;outline:none}.notebook-paper textarea:focus{border-bottom-color:var(--accent)}.notebook-footer{display:flex;justify-content:space-between;align-items:center;margin-top:20px}
@media(max-width:760px){.diary-admin-grid{grid-template-columns:1fr}.diary-week-toolbar,.notebook-shelf-heading{align-items:flex-start;flex-direction:column}.diary-day-card{flex-basis:155px}.notebook-paper{padding:22px 18px}.diary-load-row{grid-template-columns:65px 72px 1fr 36px}}

/* Project nodes own their task rows and permission-aware actions. */
#projectGrid{grid-template-columns:1fr;gap:20px}.project-node{padding:22px}.project-node-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.project-node .project-title{gap:14px;justify-content:flex-start;align-items:center}.project-node .project-title h3{font-size:18px}.project-node p{min-height:0;margin:10px 0;color:var(--muted);line-height:1.6}.project-node-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0}.project-node .project-members{font-size:13px;flex-wrap:wrap;line-height:1.7}.project-task-tree{border-left:2px solid var(--line-soft);margin:22px 0 0 9px;padding-left:20px}.project-tree-label{font-size:14px;font-weight:600;color:var(--ink-2);margin-bottom:12px}.project-tree-label span{margin-left:6px;font-size:12px;background:var(--line-soft);border-radius:2px;padding:2px 6px}.project-child-row{position:relative;display:flex;align-items:center;gap:10px;border:1px solid var(--line-soft);border-radius:6px;background:var(--surface-sunk);margin-top:8px;padding:8px 12px}.project-child-row:before{content:'';position:absolute;left:-22px;top:50%;width:21px;border-top:2px solid var(--line-soft)}.project-task-open{display:flex;align-items:center;gap:12px;flex:1;min-width:0;text-align:left;padding:9px 0}.project-task-open strong{font-size:14px;flex:1;min-width:0;overflow-wrap:anywhere}.project-task-open>span:not(.priority){font-size:12px;color:var(--muted);white-space:nowrap}.project-task-open .child-assignee{color:var(--c-blue-ink)!important}.project-child-row .ghost-btn{flex-shrink:0;background:white;font-size:13px}.project-child-row:hover{border-color:var(--line-strong);background:var(--surface-sunk)}.project-task-empty{font-size:14px;padding:8px 0}.modal{max-height:calc(100dvh - 40px);overflow-y:auto}.notification-detail{white-space:pre-wrap;overflow-wrap:anywhere}.project-node .secondary-btn,.project-node .primary-btn{font-size:14px}.project-node .project-status{font-size:12px;white-space:nowrap}
@media(max-width:1050px){.project-node-heading{flex-direction:column;gap:8px}.project-node-actions{justify-content:flex-start;flex-shrink:1}.project-task-open .child-date{display:none}}
@media(max-width:640px){.project-node{padding:16px}.project-task-tree{padding-left:12px}.project-child-row{flex-wrap:wrap;padding:8px}.project-child-row:before{left:-14px;width:13px}.project-task-open{flex-wrap:wrap;gap:8px;width:100%}.project-task-open strong{min-width:55%}.project-node .project-members{display:block}.project-node .project-members>span{display:block}.project-node-actions{width:100%}.project-node-actions button{flex:1}.project-child-row .ghost-btn{margin-left:auto}}

/* Daily work is a project tree: parent project cards contain clickable task children. */
.daily-project-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:16px 18px 14px;margin-bottom:12px;box-shadow:0 5px 16px rgba(15,23,42,.04)}
.daily-project-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 2px 12px;border-bottom:1px solid var(--line-soft)}.daily-project-kicker{font-size:11px;color:var(--accent);font-weight:700;letter-spacing:.08em}.daily-project-heading h3{font-size:17px;margin:3px 0 0;letter-spacing:-.02em}.daily-project-meta{font-size:12px;color:var(--muted);text-align:right;white-space:nowrap}.daily-project-tasks{border-left:2px solid var(--line-soft);margin:13px 0 0 8px;padding-left:14px;display:grid;gap:9px}.daily-project-tasks .task-card{position:relative;border-radius:6px;padding:13px 15px}.daily-project-tasks .task-card:before{content:'';position:absolute;left:-16px;top:50%;width:14px;border-top:2px solid var(--line-soft)}.daily-project-tasks .task-card:hover{transform:translateX(2px) translateY(-1px)}.unattached-project{background:var(--surface-sunk);border-style:dashed}.unattached-project .daily-project-kicker{color:var(--faint)}
@media(max-width:640px){.daily-project-card{padding:13px}.daily-project-heading{align-items:flex-start;flex-direction:column;gap:4px}.daily-project-meta{text-align:left}.daily-project-tasks{margin-left:5px;padding-left:10px}.daily-project-tasks .task-card:before{left:-12px;width:10px}.daily-project-tasks .task-meta{font-size:11px}}
.daily-project-tasks .project-tag{display:none}
.status-dot.pending-approval{background:var(--p1);box-shadow:0 0 0 3px var(--warn-soft)}.status-dot.rejected{background:var(--danger)}.approval-pending-note{background:var(--warn-soft);border:1px solid var(--warn-line);padding:10px 12px;border-radius:4px;margin-top:18px}.rejection-note{background:var(--danger-soft);border:1px solid var(--danger-line);color:var(--danger);padding:10px 12px;border-radius:4px;margin-top:18px;font-size:13px}.approval-actions{grid-template-columns:1fr 1fr}
.completion-summary{margin-top:18px;padding:12px 14px;background:var(--surface-sunk);border-radius:6px;border:1px solid var(--line)}.completion-summary span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.completion-summary p{margin:0;font-size:13px;line-height:1.55}
/* Calendar-level task controls */
.axis-day-add{position:absolute;top:10px;right:10px;width:auto;margin:0;padding:6px 8px;border:1px dashed var(--line-strong);border-radius:4px;color:var(--muted);background:var(--surface);box-shadow:0 4px 12px rgba(15,23,42,.08);font-size:11px;text-align:center;opacity:0;transform:translateY(-4px);pointer-events:none;transition:opacity .18s,transform .18s;z-index:3}.axis-day:hover .axis-day-add,.axis-day.selected-day .axis-day-add{opacity:1;transform:none;pointer-events:auto}.axis-day-add:hover{border-color:var(--line-strong);color:var(--accent-dark);background:var(--surface-sunk)}.danger-btn{margin-top:10px;color:var(--danger);border-color:var(--danger-line);background:var(--danger-soft)}.danger-btn:hover{border-color:var(--danger-dark);color:var(--danger-dark)}
.diary-projects{border-top:1px solid var(--line);margin-top:17px;padding-top:14px}.diary-projects h3{font-size:14px;margin:0 0 8px}.diary-project-progress{display:grid;grid-template-columns:1fr auto;gap:4px 10px;border-top:1px solid var(--line-soft);padding:9px 0}.diary-project-progress strong{font-size:12px}.diary-project-progress span{font-size:11px;color:var(--accent)}.diary-project-progress small{grid-column:1/-1;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.diary-week-actions{display:flex;gap:8px}.diary-week-actions .secondary-btn{height:34px;font-size:12px}
.assignee-load-hint{margin-top:7px;padding:8px 10px;border-radius:4px;background:var(--surface-sunk);color:var(--muted);font-size:11px;line-height:1.55}
.diary-date-nav,.diary-log-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 auto 14px;max-width:760px}.diary-date-nav span{font-size:12px;color:var(--muted)}.diary-log-toolbar{max-width:none;justify-content:flex-end}.diary-log-toolbar label{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}.diary-log-toolbar input{border:1px solid var(--line);border-radius:4px;padding:7px 9px;background:var(--surface);color:var(--ink)}.diary-log-project{display:block;color:var(--muted);font-size:11px;margin-top:3px}.diary-notebook textarea[readonly]{color:var(--ink-2);cursor:default}.diary-notebook textarea[readonly]:focus{border-bottom-color:var(--line-strong)}
@media(max-width:760px){.diary-date-nav{max-width:none}.diary-log-toolbar{justify-content:space-between;align-items:flex-start}.diary-log-toolbar label{flex-direction:column;align-items:flex-start}}
.diary-log-button{width:100%;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit}
.diary-log-button:hover{background:var(--surface-sunk);border-radius:4px;padding-left:8px;padding-right:8px}
.diary-log-button>span{display:flex;flex-direction:column;gap:3px}
.diary-log-project{color:var(--muted);font-size:11px}

/* Superadmin project achievements archive */
.achievement-scope-note{font-size:12px;color:var(--muted);padding:8px 11px;border:1px solid var(--line);border-radius:4px;background:var(--surface)}
.achievement-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}
.achievement-stat{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:15px 17px}.achievement-stat span,.achievement-stat small{display:block;color:var(--muted);font-size:11px}.achievement-stat strong{display:block;font-size:26px;letter-spacing:-.04em;margin:5px 0 2px;color:var(--ink)}
.achievement-grid{display:grid;gap:16px}.achievement-card{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:20px 22px;box-shadow:0 5px 16px rgba(15,23,42,.04)}.achievement-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.achievement-kicker{font-size:10px;color:var(--accent);font-weight:800;letter-spacing:.1em;text-transform:uppercase}.achievement-card h2{font-size:20px;margin:4px 0 5px;letter-spacing:-.03em}.achievement-card-head p{font-size:12px;color:var(--muted);margin:0;line-height:1.5}.achievement-status{font-size:11px;color:var(--success);background:var(--success-soft);border-radius:2px;padding:5px 8px;white-space:nowrap}.achievement-meta{display:flex;gap:18px;flex-wrap:wrap;border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft);margin-top:17px;padding:11px 0;color:var(--muted);font-size:12px}.achievement-meta b{color:var(--ink);font-weight:700}.achievement-lifecycle{display:flex;align-items:flex-start;list-style:none;padding:21px 4px 13px;margin:0;overflow-x:auto}.achievement-lifecycle li{position:relative;display:flex;align-items:flex-start;gap:8px;min-width:130px;flex:1}.achievement-lifecycle li:last-child{min-width:112px;flex:0}.achievement-lifecycle li i{width:15px;height:15px;border-radius:50%;border:2px solid var(--line-strong);background:var(--surface);display:block;flex:none;z-index:1}.achievement-lifecycle li.is-complete i{border-color:var(--accent);background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft-2)}.achievement-lifecycle li span{display:grid;gap:3px;margin-top:-2px}.achievement-lifecycle li b{font-size:12px;white-space:nowrap}.achievement-lifecycle li small{font-size:10px;color:var(--muted);white-space:nowrap}.achievement-lifecycle li em{position:absolute;left:15px;right:8px;top:6px;height:2px;background:var(--line)}.achievement-lifecycle li.is-complete em{background:var(--line-strong)}.achievement-report{padding:12px 14px;background:var(--surface-sunk);border:1px solid var(--line);border-radius:4px;margin-top:2px}.achievement-report span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.achievement-report p{margin:0;color:var(--ink);font-size:12px;line-height:1.6;white-space:pre-wrap}.achievement-actions{display:flex;justify-content:flex-end;margin-top:14px}.achievement-open{height:34px;font-size:12px}
@media(max-width:640px){.achievement-stats{grid-template-columns:1fr}.achievement-card{padding:16px}.achievement-card-head{flex-direction:column;gap:8px}.achievement-lifecycle li{min-width:116px}.achievement-meta{gap:8px 14px}}

.danger-eyebrow{color:var(--p0)!important}.danger-panel{background:var(--danger-soft);border:1px solid var(--danger-line);border-radius:6px;padding:14px 16px;margin:14px 0}.danger-panel p{margin:0;font-size:13px;line-height:1.7;color:var(--danger-ink)}.danger-impact{margin:10px 0 0;padding-left:18px;display:grid;gap:4px;font-size:12px;color:var(--danger-ink)}.danger-impact strong{color:var(--p0)}.danger-check{display:flex;align-items:flex-start;gap:9px;background:var(--surface-sunk);border:1px solid var(--line);border-radius:6px;padding:11px 13px;font-size:13px;font-weight:500;line-height:1.5}.danger-check input{margin-top:2px;accent-color:var(--p0)}.danger-confirm{display:grid;gap:7px;margin-top:12px;font-size:13px;font-weight:600}.danger-confirm code{background:var(--surface-sunk);border-radius:2px;padding:1px 5px;font-size:12px}.danger-confirm input{height:38px;border:1px solid var(--line);border-radius:4px;padding:0 11px;font-size:13px;background:var(--surface);color:var(--ink)}.danger-confirm input:focus{outline:none;border-color:var(--p0);box-shadow:0 0 0 3px rgba(239,68,68,.15)}.danger-btn{height:38px;padding:0 16px;border:none;border-radius:4px;background:var(--p0);color:var(--surface);font-size:13px;font-weight:700;cursor:pointer}.danger-btn:hover:not(:disabled){background:var(--danger-dark)}.danger-btn:disabled{opacity:.45;cursor:not-allowed}
.account-group{margin-bottom:18px}.account-group-heading{display:flex;align-items:center;gap:9px;margin:0 0 9px;padding:0 2px}.account-group-heading strong{font-size:13px;color:var(--ink-2)}.account-group-heading span{background:var(--line-soft);color:var(--ink-2);border-radius:2px;padding:1px 7px;font-size:11px;font-weight:700}.account-group-heading small{color:var(--muted);font-size:11px;margin-left:auto}.role-select{height:30px;border:1px solid var(--line);border-radius:4px;background:var(--surface);color:var(--ink);font-size:12px;padding:0 6px;font-weight:600}.role-select:focus{outline:none;border-color:var(--accent)}

/* ==========================================================================
   Work Calendar · Design layer
   Solid enterprise canvas, green-leaning palette, restrained motion.

   Loaded after styles.css. Every override here wins by source order alone -
   no !important, no structural rewrites, interaction logic untouched.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · Typography & paper
   -------------------------------------------------------------------------- */

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Neutral flat canvas without ambient gradient washes. */
body::before {
  display: none;
}

/*
 * Bound the app shell to the full viewport height using dynamic viewport units
 * (100dvh) with a 100vh fallback, preventing layout jumps when mobile address
 * bars toggle between expanded and collapsed states.
 */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.page-intro h1,
.auth-card h1,
.brand {
  font-weight: 800;
  letter-spacing: -.015em;
}

.page-intro h1 { letter-spacing: -.02em; }
.page-intro p { color: var(--muted); line-height: 1.65; }

.eyebrow {
  letter-spacing: .14em;
  font-size: 11px;
  opacity: .9;
}

/* Numbers line up in stat strips, counters and the gantt axis. */
.achievement-stat strong,
.stat-card strong,
.week-totals strong,
.diary-stat-strip b,
.progress-percent,
.gantt-date strong {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   2 · Focus
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   3 · Motion primitives
   -------------------------------------------------------------------------- */

@keyframes wcViewIn    { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes wcRiseIn    { from { opacity: 0; transform: translateY(8px);  } to { opacity: 1; transform: none; } }
@keyframes wcModalIn   { from { opacity: 0; transform: translate(-50%, -46%) scale(.972); }
                         to   { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes wcDrawerIn  { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes wcFadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes wcToastIn   { from { opacity: 0; transform: translateY(14px) scale(.97); }
                         to   { opacity: 1; transform: none; } }

/* Views swap via display, so animate on the class rather than transitioning. */
.view.active-view { animation: wcViewIn var(--t-slow) var(--ease-out) both; }

/* --------------------------------------------------------------------------
   4 · Buttons
   -------------------------------------------------------------------------- */

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn,
.quick-tab,
.filter-link,
.nav-item {
  transition:
    background var(--t) var(--ease),
    color var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    transform var(--t) var(--ease);
}

.primary-btn:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow);
}
.primary-btn:active { transform: translateY(0) scale(.985); }

.secondary-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-sunk);
}
.secondary-btn:active { transform: scale(.985); }

.ghost-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-sunk);
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-sunk);
  transform: translateY(-1px);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.finish-project-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: auto;
  transform: none;
}
.primary-btn:disabled:hover,
.secondary-btn:disabled:hover,
.ghost-btn:disabled:hover,
.finish-project-btn:disabled:hover {
  transform: none;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}

.quick-tab { transition: color var(--t) var(--ease); }
.quick-tab:hover { color: var(--ink); }
.quick-tab.active:after { border-radius: 2px 2px 0 0; }

/* --------------------------------------------------------------------------
   5 · Cards & surfaces
   -------------------------------------------------------------------------- */

.task-card,
.project-node,
.achievement-card,
.account-item,
.inbox-item,
.stat-card,
.daily-project-card,
.diary-day-card,
.member-notebook,
.week-panel,
.repeat-admin-panel,
.automation-card {
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.task-card:hover,
.inbox-item:hover,
.account-item:hover,
.achievement-card:hover,
.daily-project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.project-node:hover,
.repeat-admin-panel:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

/* --------------------------------------------------------------------------
   6 · Sidebar rail
   -------------------------------------------------------------------------- */

/*
 * Keep the navigation rail permanently pinned in the viewport while the main
 * content view scrolls. In this flexbox app shell, align-self: flex-start
 * prevents the sidebar from stretching to the dynamic height of long content pages,
 * while height and max-height bound it to 100dvh (with a 100vh fallback).
 * Independent vertical scrolling (overflow-y: auto) ensures all navigation items
 * and the focus card footer remain reachable on constrained displays, while
 * overscroll-behavior: contain prevents scroll chaining to the outer document.
 */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--rail-line) transparent;
  background: var(--rail);
  border-right: 1px solid rgba(0, 0, 0, .08);
  font-size: 13.5px;
  line-height: 1.4;
  z-index: 25;
}

/*
 * Custom scrollbar styling matching the dark rail palette for WebKit runtimes
 * that do not fully honor standard scrollbar-color declarations.
 */
.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--rail-line);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--rail-muted);
}

.brand {
  font-size: 14px;
  line-height: 1.25;
}

.nav-item,
.filter-link {
  position: relative;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
}

.nav-item:hover,
.filter-link:hover {
  background: var(--rail-hover);
  color: var(--rail-strong);
}

.nav-item.active {
  background: var(--rail-hover);
  color: var(--rail-strong);
  box-shadow: inset 0 0 0 1px var(--rail-line);
}

.nav-item .icon-slot {
  width: 18px;
  height: 18px;
  font-size: 18px;
  flex: none;
}

.nav-item span:not(.icon-slot) {
  font-size: 13.5px;
  font-weight: 500;
  width: auto;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.filter-link {
  font-size: 13px;
}

.filter-link span:not(.dot) {
  font-size: 13px;
  font-weight: 500;
  width: auto;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.nav-item b,
.filter-link b {
  font-size: 11.5px;
  font-weight: 600;
  margin-left: auto;
  color: var(--rail-muted);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
}

.workspace-switcher {
  border-radius: var(--r);
  background: var(--rail-hover);
  border-color: var(--rail-line);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.workspace-switcher:hover { border-color: var(--rail-muted); }

.avatar {
  background: var(--accent);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
}

.workspace-switcher small {
  font-size: 11px;
}

.workspace-switcher strong {
  font-size: 13px;
  font-weight: 600;
}

.brand-mark {
  background: var(--accent);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}

.focus-card {
  border-radius: var(--r);
  border-color: var(--rail-line);
}

.focus-card span {
  font-size: 11.5px;
  font-weight: 500;
}

.focus-card strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.focus-card small {
  font-size: 11px;
}

.help-row {
  font-size: 11.5px;
}

.help-row span,
.help-row kbd {
  font-size: 11px;
}

/*
 * Narrow viewports (<= 640px) collapse the sidebar into a horizontal nav strip
 * positioned in normal document flow above the page, unsetting sticky viewport
 * constraints and vertical height bounds.
 */
@media (max-width: 640px) {
  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    align-self: auto;
    overflow-y: visible;
    overflow-x: visible;
    z-index: auto;
  }

  .nav-item span:not(.icon-slot) {
    font-size: 12px;
  }
}

/* --------------------------------------------------------------------------
   7 · Topbar
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, .85);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   8 · Overlays
   -------------------------------------------------------------------------- */

.modal-backdrop,
.drawer-backdrop {
  animation: wcFadeIn var(--t) var(--ease-out) both;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  animation: wcModalIn var(--t-slow) var(--ease-spring) both;
}

.task-drawer {
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--line);
  animation: wcDrawerIn var(--t-slow) var(--ease-out) both;
  font-size: 13.5px;
}

.close-btn {
  border-radius: 8px;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.close-btn:hover {
  background: var(--surface-sunk);
  transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   9 · Toast
   -------------------------------------------------------------------------- */

.toast {
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-weight: 500;
  letter-spacing: .01em;
}
.toast.show { animation: wcToastIn var(--t-slow) var(--ease-spring) both; }

/* --------------------------------------------------------------------------
   10 · Progress & inline feedback
   -------------------------------------------------------------------------- */

.progress i,
.progress.wide i {
  transition: width var(--t-slow) var(--ease-out), background var(--t) var(--ease);
}

.notification-dot { animation: notifyPulse 2.4s var(--ease) infinite; }

/* --------------------------------------------------------------------------
   11 · Forms
   -------------------------------------------------------------------------- */

input,
textarea,
select {
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.member-checkboxes label:hover { background: var(--surface-sunk); }

/* --------------------------------------------------------------------------
   12 · Multi-day tasks & the DDL badge
   -------------------------------------------------------------------------- */

/* A quiet countdown, not an alarm - until the date is actually missed. */
.task-ddl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}

.task-ddl em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  opacity: .7;
}
.task-ddl b { font-weight: 600; }

/* Single-day tasks keep the old, undecorated date. */
.task-ddl.plain {
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 12px;
}

.task-ddl.left    { color: var(--accent-dark); background: var(--accent-soft); border-color: var(--line); }
.task-ddl.due     { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.task-ddl.due em  { opacity: .85; }
.task-ddl.overdue { color: var(--danger-ink); background: var(--danger-soft); border-color: var(--line); }
.task-ddl.settled { color: var(--success-ink); background: var(--success-soft); border-color: var(--line); }

/* "3 天" chip beside the task name. */
.span-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.overdue-text { color: var(--danger); }

/* Lineage marks: an occurrence replaced by its successor, or a carried task. */
.superseded-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.carried-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
}
.carried-badge .icon { width: 12px; height: 12px; stroke-width: 2.1; }

/* Week rail: a compact "3天" mark on multi-day rows. */
.axis-span {
  font-style: normal;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 5px;
  font-size: 12px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   12 · Staggered entry for refreshed lists
   -------------------------------------------------------------------------- */

.task-list > *,
.inbox-list > * {
  animation: wcRiseIn var(--t-slow) var(--ease-out) both;
}
.task-list > *:nth-child(2),
.inbox-list > *:nth-child(2) { animation-delay: 40ms; }
.task-list > *:nth-child(3),
.inbox-list > *:nth-child(3) { animation-delay: 80ms; }
.task-list > *:nth-child(4),
.inbox-list > *:nth-child(4) { animation-delay: 120ms; }
.task-list > *:nth-child(5),
.inbox-list > *:nth-child(5) { animation-delay: 160ms; }
.task-list > *:nth-child(n + 6),
.inbox-list > *:nth-child(n + 6) { animation-delay: 200ms; }

/* --------------------------------------------------------------------------
   13 · Recurring-rule panel
   -------------------------------------------------------------------------- */

/* The entry point sits with the rules it manages, not in the page header. */
.panel-heading .secondary-btn { flex-shrink: 0; }

/* Helper lines under a field label, e.g. how a span or a 31st behaves. */
.form-field small.muted {
  display: block;
  margin-top: 6px;
  font-weight: 400;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
}

/* --------------------------------------------------------------------------
   17 · Room channels, mentions and links
   -------------------------------------------------------------------------- */

/* An unread count per room: the room badge says something happened, this says
   where. */
.chat-channel-badge {
  display: inline-block;
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--surface);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.chat-channel.is-on .chat-channel-badge { background: var(--accent); color: var(--surface); }

/* Broadcast mentions (@everyone). */
.chat-mention-all { background: var(--surface-sunk); border-color: var(--line); color: var(--ink); }
.chat-mention-option.is-everyone .icon { color: var(--accent-dark); }

/* A pasted link, kept inside the bubble however long it is. */
.chat-link {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.chat-link:hover { text-decoration-color: var(--accent-dark); }

/* --------------------------------------------------------------------------
   15 · Account names & avatars
   -------------------------------------------------------------------------- */

.account-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.account-name strong { font-size: 14px; }

/* 中文名称 is the formal name, 昵称 the personal one, and the account id stays
   visible as a quiet mono chip so operators can still match the login. */
.name-tag {
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.name-tag.nick {
  color: var(--ink-2);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
}
.name-tag.code {
  color: var(--muted);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  font-family: monospace;
}

/* Fallback avatar: a stable hue per account showing the name's first glyph. */
.avatar {
  background: hsl(var(--avatar-hue, 215) 55% 50%);
  color: var(--surface);
  overflow: hidden;
  /* Avatars are fixed-size marks: without this a long name in the same flex
     row shrinks them, and a squashed box is no longer a circle. */
  flex: none;
  transition: background var(--t) var(--ease);
}
.account-banner .avatar,
.workspace-switcher .avatar { background: hsl(var(--avatar-hue, 215) 55% 50%); }

.avatar.has-image { background: var(--surface-sunk); }

/* Fixed-size marks must never be squeezed by a long sibling label - a squashed
   circle stops reading as a circle. `.project-color` already carried this. */
.brand-mark,
.status-dot,
.dot,
.legend-today,
.legend-range,
.legend-open {
  flex: none;
}

.avatar.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-editor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.avatar-editor .avatar {
  width: 46px;
  height: 46px;
  font-size: 17px;
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   16 · Vector icons
   -------------------------------------------------------------------------- */

/* Inline-block so an icon sits correctly inside a run of text; it still behaves
   as a flex item wherever a button or row turns out to be a flex container. */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Static markup points at an icon by name; JS fills the slot on boot. */
.icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 18px;
  flex: none;
}

/* Buttons lay their icon and label out with a gap, so labels carry no padding. */
.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.axis-day-add,
.floating-add-task {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.icon-btn,
.close-btn,
.date-chip button,
.timeline-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-arrow,
.defer-target,
.fixed-badge,
.span-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Per-context optical sizes. */
.close-btn .icon-slot { width: 17px; height: 17px; font-size: 17px; }
.empty-icon .icon-slot { width: 30px; height: 30px; font-size: 30px; }
.empty-icon { color: var(--line-strong); }
.primary-btn .icon-slot,
.secondary-btn .icon-slot,
.ghost-btn .icon-slot,
.danger-btn .icon-slot { width: 15px; height: 15px; font-size: 15px; }
.inbox-icon .icon-slot { width: 16px; height: 16px; font-size: 16px; }
.inbox-icon { display: inline-flex; align-items: center; justify-content: center; }
.chevron .icon { stroke-width: 2; }

/* Small glyphs need a slightly heavier stroke to hold their shape. */
.task-arrow .icon,
.defer-target .icon,
.fixed-badge .icon,
.span-badge .icon,
.inbox-icon .icon { stroke-width: 2.1; }

/* --------------------------------------------------------------------------
   17 · Workspace account menu
   -------------------------------------------------------------------------- */

.workspace-slot { position: relative; margin: 28px 0 25px; }
.workspace-slot .workspace-switcher { margin: 0; cursor: pointer; }

.workspace-switcher .chevron { transition: transform var(--t) var(--ease); }
.workspace-switcher[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.workspace-switcher[aria-expanded="true"] {
  border-color: var(--line-strong);
  background: var(--rail-hover);
}

@keyframes wcMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: min(72vh, 520px);
  overflow-y: auto;
  transform-origin: top center;
  animation: wcMenuIn var(--t) var(--ease-out) both;
}
.account-menu.hidden { display: none; }

.account-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 11px;
  border-bottom: 1px solid var(--line);
}
.account-menu-head .avatar.large { width: 36px; height: 36px; font-size: 15px; }
.account-menu-identity { min-width: 0; }
.account-menu-identity strong { display: block; font-size: 13px; color: var(--ink); }
.account-menu-identity .name-tag { margin-top: 4px; }
.account-menu-identity small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

.account-menu-group { display: grid; gap: 1px; padding: 5px 0; }
.account-menu-group + .account-menu-group { border-top: 1px solid var(--line-soft); }

.account-menu-label {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--faint);
  padding: 5px 10px 4px;
  text-transform: uppercase;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.account-menu-item:hover { background: var(--surface-sunk); color: var(--ink); }
.account-menu-item > small { margin-left: auto; font-size: 11px; color: var(--faint); }

.account-menu-item.danger { color: var(--danger); }
.account-menu-item.danger:hover { background: var(--danger-soft); }

.account-menu-item.switch .avatar { width: 22px; height: 22px; font-size: 11px; }
.account-menu-item.switch > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.account-menu-item.switch small { color: var(--faint); font-size: 11px; }

/* On the mobile rail the switcher is hidden, so its slot must not leave a gap. */
@media (max-width: 640px) {
  .workspace-slot { display: none; }
}

/* --------------------------------------------------------------------------
   18 · Week rail scrolling
   -------------------------------------------------------------------------- */

/* Free scrolling, no snapping. The rail used to snap each week to centre, and
   measuring it showed 720px of intended scroll landing after only 21px - the
   gesture kept being pulled back. */
.week-carousel {
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.week-panel {
  /* No content-visibility here: off-screen panels would report an estimated
     height, and the rail needs their real positions to know which week sits
     under the centre. Thirty-one panels is a price worth paying for that. */
  transition: opacity var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

/* Tell the current week apart with tone and elevation instead of a scale
   transform. Scaling every panel promoted all 31 of them to composited layers,
   so the rail looked like it was breathing while you scrolled. */
/* Depth is gone: the rail is a flat stack of cards again. What keeps it
   legible while scrolling is that only one week reads as current. */
.compact-week {
  opacity: .68;
  box-shadow: none;
}
.focus-week {
  opacity: 1;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

/* Same story horizontally - the day rail scrolls freely too. */
.week-days {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* --------------------------------------------------------------------------
   19 · Scrollbars
   -------------------------------------------------------------------------- */

* { scrollbar-color: var(--line-strong) transparent; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 3px solid var(--paper);
  border-radius: 99px;
  transition: background var(--t) var(--ease);
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* While the week rail is in motion its scrollbar picks up the accent, then
   settles back - the track is the thing you are actually turning. */
.week-carousel.scrolling { scrollbar-color: var(--accent) transparent; }
.week-carousel.scrolling::-webkit-scrollbar-thumb { background: var(--accent); }

/* --------------------------------------------------------------------------
   20 · 沟通区 (team chat)
   -------------------------------------------------------------------------- */

/* The entry point sits at the right end of the brand row. */
.brand { display: flex; width: 100%; }

.brand-chat {
  position: relative;
  margin-left: auto;
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--rail-muted);
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.brand-chat:hover {
  background: var(--rail-hover);
  border-color: var(--rail-line);
  color: var(--rail-strong);
}
/* A count, not a dot: the number is what tells you whether it is worth going in. */
.brand-chat .chat-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--accent);
  color: var(--surface);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 1.5px var(--rail);
  animation: wcPop var(--t) var(--ease-spring) both;
}
.chat-hint { font-size: 12px; color: var(--faint); }

.chat-room {
  display: flex;
  flex-direction: row;
  height: min(620px, calc(100vh - 235px));
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 18px 20px 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-log::-webkit-scrollbar-thumb { border-color: var(--surface); }

.chat-day {
  align-self: center;
  font-size: 11px;
  color: var(--faint);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 10px;
}

.chat-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 78%;
}
.chat-message.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-message .avatar { flex: none; width: 30px; height: 30px; font-size: 13px; }
.chat-body { min-width: 0; }
.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--faint);
}
.chat-message.mine .chat-meta { flex-direction: row-reverse; }
.chat-meta strong { font-weight: 600; color: var(--ink-2); }
.chat-meta time { font-variant-numeric: tabular-nums; }
.chat-text {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 11px;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-message.mine .chat-text {
  background: var(--accent-soft);
  border-color: var(--line);
}
.chat-empty {
  margin: auto;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}

.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-sunk);
}
.chat-compose textarea {
  flex: 1;
  min-height: 38px;
  max-height: 120px;
  resize: none;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--t) var(--ease);
}
.chat-compose textarea:focus {
  border-color: var(--accent);
  outline: none;
}

@media (max-width: 640px) {
  .chat-message { max-width: 92%; }
}

/* The archived room, opened from 成果库. */
.achievement-actions { margin: 0 0 14px; }
.chat-log.chat-archive {
  flex: none;
  max-height: 46vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-sunk);
  padding: 14px 16px;
}

/* Channels, presence and @ completion. */
.chat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sunk);
}
.chat-channels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px 10px;
}
.chat-channels::-webkit-scrollbar { display: none; }
.chat-channel {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 8px 9px;
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.chat-channel:hover { background: var(--surface); }
.chat-channel.is-on {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.chat-members {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.chat-online { font-size: 11px; color: var(--faint); margin-right: 4px; white-space: nowrap; }
.chat-presence {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  filter: saturate(.35);
  opacity: .55;
  transition: opacity var(--t) var(--ease), filter var(--t) var(--ease);
}
.chat-presence.is-on { filter: none; opacity: 1; }
.chat-presence.is-on::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 1.5px var(--surface-sunk);
}
.chat-presence .avatar { flex: none; width: 22px; height: 22px; font-size: 12px; }

/* The mention picked out of the message body. */
.chat-mention {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0 3px;
}

/* @ completion, floating above the composer. */
.chat-compose { position: relative; }
.chat-mention-menu {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 6px);
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: wcRiseIn var(--t) var(--ease-out) both;
}
.chat-mention-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-align: left;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--ink);
}
.chat-mention-option + .chat-mention-option { border-top: 1px solid var(--line-soft); }
.chat-mention-option.is-on { background: var(--accent-soft); }
.chat-mention-option .avatar { flex: none; width: 22px; height: 22px; font-size: 12px; }
.chat-mention-option small { margin-left: auto; color: var(--faint); font-size: 11px; }

/* --------------------------------------------------------------------------
   21 · Accessibility: honour reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* The room reads like a messenger: every channel is a conversation down the
   left, and the unread count sits on the conversation that owns it. */
.chat-side {
  flex: none;
  width: 208px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border-right: 1px solid var(--line);
  background: var(--surface-sunk);
}
.chat-side-title {
  padding: 12px 14px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--faint);
  flex: none;
}
.chat-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.chat-current {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* The mark left of each conversation: an icon for the standing rooms, the
   project's first glyph otherwise. */
.chat-mark {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}
.chat-mark .icon { width: 16px; height: 16px; }
.chat-channel.is-on .chat-mark { border-color: var(--line-strong); color: var(--accent-dark); }
.chat-mark.is-project {
  background: hsl(var(--avatar-hue, 215) 55% 50%);
  border-color: transparent;
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
}

.chat-channel-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-channel-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-channel-preview {
  font-size: 11px;
  line-height: 1.4;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-channel-idle { font-style: italic; opacity: .8; }

.chat-channel-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.chat-channel-time {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Narrow screens stack the list above the messages, and each row sheds the
   preview so it fits a horizontal strip. */
@media (max-width: 720px) {
  .chat-room { flex-direction: column; }
  .chat-side {
    width: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .chat-side-title { display: none; }
  .chat-channels { flex-direction: row; padding: 8px; }
  .chat-channel { width: auto; flex: none; }
  .chat-channel-body { flex: none; }
  .chat-channel-preview { display: none; }
  .chat-channel-side { flex-direction: row; align-items: center; gap: 6px; }
  .chat-mark { width: 22px; height: 22px; border-radius: 7px; }
}

/* Everyone in the room, with whoever is away left dimmed by .chat-presence. */
.chat-members {
  max-width: 62%;
  overflow-x: auto;
  scrollbar-width: none;
}
.chat-members::-webkit-scrollbar { display: none; }
.chat-presence-more {
  flex: none;
  font-size: 11px;
  color: var(--faint);
  padding: 0 2px;
  white-space: nowrap;
}

/* The collaborator list inside the invite dialog. */
.member-checkboxes .member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-sunk);
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
}
.member-checkboxes .member-row strong { font-weight: 600; }
.member-checkboxes .member-row small { margin-left: auto; color: var(--muted); font-size: 12px; }
.member-checkboxes .member-row .remove-member {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  flex: none;
}
.member-checkboxes .member-row .remove-member.is-armed {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-soft);
}

/* --------------------------------------------------------------------------
   21 · 周视图 · 交互定稿
   --------------------------------------------------------------------------
   This block supersedes every .axis-day:hover rule above it. The card no
   longer resizes or lifts on hover - past attempts scaled it, grew it and
   floated a second preview over it, all at once. Now: a flat card that states
   the day, a quiet highlight under the pointer, and one unfold panel that
   carries the tasks.
   -------------------------------------------------------------------------- */

/* Five-day work week (Monday through Friday) across the panel. */
.week-carousel { overflow-x: visible; }
.week-days {
  overflow: visible;
  padding: 6px 2px 2px;
}
.week-days-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.week-panel { width: min(940px, 100%); }

.axis-day:not(.selected-day) {
  flex: none !important;
  width: auto;
  min-height: 88px !important;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transform: none !important;
  box-shadow: var(--shadow-sm) !important;
  border-color: var(--line-soft) !important;
  background: var(--surface-sunk) !important;
  z-index: 1 !important;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.axis-day:hover:not(.selected-day),
.axis-day:focus-visible:not(.selected-day),
.axis-day.pinned:not(.selected-day) {
  border-color: var(--line-strong) !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow) !important;
  outline: none;
}
.axis-day.today-day {
  background: var(--surface) !important;
  border-color: var(--line-strong) !important;
}
.axis-day.today-day:hover,
.axis-day.today-day.pinned { background: var(--surface-sunk) !important; }

.axis-day-head { display: flex; align-items: baseline; gap: 5px; }
.axis-day-head span { font-size: 14px; color: var(--muted); }
.axis-day-head strong { font-size: 20px; letter-spacing: -.04em; }
.axis-day-head em {
  font-style: normal; color: var(--accent); font-size: 12px; font-weight: 700;
  margin-left: auto;
}
.axis-day-count { font-size: 14px; color: var(--muted); line-height: 1.35; }
.axis-day.today-day .axis-day-count { color: var(--accent-dark); }

/* Who is booked that day - one glyph per member instead of full account names
   that overflowed a 110px card. */
.axis-members { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin-top: auto; }
.axis-members i {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft-2); color: var(--accent-dark);
  font-size: 12px; font-weight: 700; font-style: normal;
  display: grid; place-items: center;
}
.axis-members small { font-size: 12px; color: var(--faint); }

.axis-task-list, .hover-peek, .axis-day-add { display: none !important; }

/* The unfold panel, fixed to the viewport so no scroll container can clip it. */
.day-peek {
  position: fixed;
  z-index: 1200;
  width: 268px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 13px 13px 11px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transform-origin: top center;
  transition: opacity .16s var(--ease), transform .18s var(--ease);
}
.day-peek.flip { transform-origin: bottom center; transform: translateY(6px) scale(.985); }
.day-peek.show { opacity: 1; transform: none; }

.peek-head { display: flex; align-items: baseline; gap: 7px; flex: none; }
.peek-head span { font-size: 12px; color: var(--muted); }
.peek-head strong { font-size: 17px; letter-spacing: -.03em; }
.peek-head em {
  font-style: normal; margin-left: auto; background: var(--accent);
  color: var(--surface); font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 3px 7px;
}
.peek-meta { font-size: 11px; color: var(--muted); margin-top: 5px; flex: none; }
.peek-tasks { display: grid; gap: 5px; margin-top: 10px; flex: 1 1 auto; min-height: 0; overflow: auto; }
.peek-task {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr; gap: 3px 7px; align-items: center;
  background: var(--surface-sunk);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 8px;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.peek-task:hover { border-color: var(--line-strong); background: var(--surface); }
.peek-task.P0 { border-left-color: var(--p0); }
.peek-task.P1 { border-left-color: var(--p1); }
.peek-task.P2 { border-left-color: var(--p2); }
.peek-task b { font-size: 12px; font-weight: 600; line-height: 1.35; }
.peek-task small { grid-column: 2; font-size: 12px; color: var(--muted); }
.peek-empty {
  font-size: 12px; color: var(--muted);
  background: var(--surface-sunk); border-radius: 8px; padding: 15px; text-align: center;
}
.peek-actions { display: flex; gap: 6px; margin-top: 10px; flex: none; }
.peek-actions button {
  flex: 1; height: 30px; border-radius: 7px;
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.peek-add { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.peek-add:hover { border-color: var(--line-strong); color: var(--ink); }
.peek-detail { background: var(--accent); color: var(--surface); }
.peek-detail:hover { background: var(--accent-dark); color: var(--surface); }
.peek-detail .icon { width: 13px; height: 13px; }

@media (max-width: 760px) {
  .week-days-track { gap: 4px; }
  .axis-day:not(.selected-day) { padding: 7px 6px; min-height: 74px !important; }
  .axis-day-head strong { font-size: 16px; }
  .axis-day-head span { font-size: 12px; }
  .axis-day-count { font-size: 12px; }
  .axis-members { display: none; }
}
@media (max-width: 480px) {
  .week-days-track { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 6px; }
}

/* 22 · Internationalization (i18n) controls and language-specific overrides */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  padding: 0 11px;
}
.lang-toggle-btn .icon-slot {
  display: inline-flex;
  align-items: center;
}
.lang-toggle-btn .icon {
  width: 16px;
  height: 16px;
}
html[lang="en"] .axis-day.selected-day:before {
  content: 'Selected';
}

