/* Tasks (kb-*, mt-*, tk-*) and Calendar (cal-*) views */


/* ============================================================ boards overview */
.kb-ov{display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:20px; align-items:start;}
.kb-bgrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px;}
.kb-bcard{--bc:#5b7cfa; position:relative; overflow:hidden; display:flex; flex-direction:column; gap:10px; padding:16px 18px; min-height:176px;
  transition:transform .3s var(--ease), border-color .3s, box-shadow .3s;}
.kb-bcard::before{content:""; position:absolute; inset:0 0 auto 0; height:3px; background:linear-gradient(90deg,var(--bc),color-mix(in srgb,var(--bc) 40%,transparent));}
.kb-bcard-glow{position:absolute; width:180px; height:180px; right:-70px; top:-90px; border-radius:50%; background:var(--bc); opacity:.09; filter:blur(30px); transition:opacity .35s, transform .5s var(--ease); pointer-events:none;}
.kb-bcard:hover{transform:translateY(-3px); border-color:color-mix(in srgb,var(--bc) 45%,var(--border));}
.kb-bcard:hover .kb-bcard-glow{opacity:.2; transform:scale(1.2);}
.kb-bcard h3{font-size:16.5px;}
.kb-bdesc{font-size:12.5px; color:var(--text-2); line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:36px;}
.kb-bcard .progress{margin-top:auto;}
.kb-anim-bar > i{animation:kbGrow 1s var(--ease) both;}
@keyframes kbGrow{from{width:0;}}
.kb-bicon{--bc:#5b7cfa; width:38px; height:38px; border-radius:11px; display:inline-grid; place-items:center; font-size:19px; flex-shrink:0;
  background:color-mix(in srgb,var(--bc) 16%,var(--surface-2)); border:1px solid color-mix(in srgb,var(--bc) 25%,transparent);}
.kb-bcard .kb-bicon{background:color-mix(in srgb,var(--bc) 16%,var(--surface-2));}
.kb-bicon.sm{width:28px; height:28px; font-size:14px; border-radius:8px;}
.kb-bicon.lg{width:46px; height:46px; font-size:23px; border-radius:13px;}
.kb-bnew{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:176px; border-radius:var(--radius-lg);
  border:1.5px dashed var(--border-strong); color:var(--muted); font-weight:600; transition:all .25s var(--ease);}
.kb-bnew:hover{color:var(--accent-text); border-color:var(--accent); background:var(--accent-soft); transform:translateY(-2px);}
.kb-bnew .ic{transition:transform .35s var(--ease-spring);} .kb-bnew:hover .ic{transform:rotate(90deg) scale(1.1);}
.kb-ov-empty .empty-state{padding:56px 20px;}
.kb-arch{margin-top:22px;}
.kb-arch h3{margin-bottom:10px;}
.kb-arch-row{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:11px; border:1px solid var(--border); background:var(--surface); margin-bottom:8px;}
.kb-arch-row a{font-weight:600;} .kb-arch-row a:hover{color:var(--accent-text);}

.kb-mine{position:sticky; top:16px; max-height:calc(100dvh - var(--topbar-h) - 40px); display:flex; flex-direction:column;}
.kb-mine .card-body{overflow-y:auto; padding-top:8px;}
.kb-mine-empty{display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; padding:22px 8px; color:var(--good);}
.kb-mine-empty b{color:var(--text);}
.mt-group + .mt-group{margin-top:12px;}
.mt-gh{display:flex; align-items:center; justify-content:space-between; font-size:11px; font-weight:700; letter-spacing:.7px; text-transform:uppercase; color:var(--muted); padding:6px 4px;}
.mt-gh span{font-variant-numeric:tabular-nums;} .mt-gh.bad{color:var(--bad);} .mt-gh.warn{color:var(--warn);}
.mt-row{display:flex; align-items:center; gap:10px; padding:8px; border-radius:10px; cursor:pointer; transition:background .15s, opacity .25s, transform .25s;}
.mt-row:hover{background:var(--hover);}
.stagger-row{animation:fadeUp .4s var(--ease) both; animation-delay:calc(var(--i,0) * 30ms);}
.mt-title{font-size:13.5px; font-weight:500;}
.mt-sub{display:flex; align-items:center; gap:8px; font-size:11.5px; color:var(--muted); margin-top:2px; min-width:0;}
.mt-leaving{opacity:0; transform:translateX(16px);}
.mt-leaving .mt-title{text-decoration:line-through;}

/* dialogs: templates, emoji, swatches */
.kb-tpls{display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:10px;}
.kb-tpl{display:flex; flex-direction:column; align-items:flex-start; gap:4px; text-align:left; padding:12px 13px; border-radius:12px; border:1.5px solid var(--border); background:var(--surface-2); transition:all .2s var(--ease);}
.kb-tpl:hover{border-color:var(--border-strong); transform:translateY(-1px);}
.kb-tpl.on{border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 3px var(--accent-soft);}
.kb-tpl-icon{font-size:20px; margin-bottom:2px;}
.kb-tpl b{font-size:13.5px;}
.kb-tpl-cols{display:flex; flex-wrap:wrap; gap:3px; margin-top:4px;}
.kb-tpl-cols i{font-style:normal; font-size:10.5px; padding:1px 6px; border-radius:5px; background:var(--surface-4); color:var(--text-2);}
.kb-emoji{display:flex; flex-wrap:wrap; gap:4px; align-items:center;}
.kb-emoji button{width:34px; height:34px; border-radius:9px; font-size:17px; display:grid; place-items:center; transition:background .15s, transform .2s var(--ease-spring);}
.kb-emoji button:hover{background:var(--hover); transform:scale(1.12);}
.kb-emoji button.on{background:var(--accent-soft); box-shadow:inset 0 0 0 1.5px var(--accent);}
.kb-emoji-in{width:86px;}
.kb-swatches{display:flex; flex-wrap:wrap; gap:7px; align-items:center;}
.kb-swatches button{width:26px; height:26px; border-radius:50%; background:var(--sw); box-shadow:0 0 0 2px var(--surface); transition:transform .2s var(--ease-spring), box-shadow .2s;}
.kb-swatches button:hover:not(:disabled){transform:scale(1.15);}
.kb-swatches button.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--sw);}
.kb-swatches.sm button{width:22px; height:22px;}
.kb-swatches .kb-sw-none{background:var(--surface-3); color:var(--muted); display:grid; place-items:center;}
.kb-swatches .kb-sw-none .ic{width:12px; height:12px;}
.kb-swatches .kb-sw-none.on{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--border-strong);}

/* ============================================================ board view */
.kb-root{height:100%;}
.page.kb-page{height:100%; display:flex; flex-direction:column; padding:22px 28px 14px; max-width:none;}
.kb-head{display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:14px; flex-shrink:0;}
.kb-head .page-title{font-size:24px;}
.kb-desc{max-width:680px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.kb-toolbar{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; flex-shrink:0;}
.kb-search{width:240px; flex-shrink:0;}
.kb-search .kbd{position:absolute; right:9px; top:50%; transform:translateY(-50%);}
.kb-chips{display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0;}
.kb-chips .chip{max-width:200px;}
.kb-chips .chip .ic:last-child{width:12px; height:12px; opacity:.6;}
.kb-fcount{margin-left:auto;}
.kb-jump{display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding-bottom:10px; flex-shrink:0;}
.kb-jump::-webkit-scrollbar{display:none;}
.kb-jump .chip .muted{font-weight:500;}
.kb-body{flex:1; min-height:0; display:flex; flex-direction:column;}
.kb-body.is-list{overflow-y:auto; display:block;}

.kb-board{flex:1; min-height:0; display:flex; gap:14px; overflow-x:auto; overflow-y:hidden; align-items:flex-start; padding:2px 2px 12px; overscroll-behavior-x:contain;}
.kb-col{--cc:#6f7389; flex:0 0 296px; max-height:100%; display:flex; flex-direction:column; background:var(--bg-2); border:1px solid var(--border);
  border-radius:15px; position:relative;}
.kb-board.anim-in .kb-col{animation:fadeUp .45s var(--ease) both; animation-delay:calc(var(--ci,0) * 50ms);}
:root[data-theme="light"] .kb-col{background:var(--surface-3);}
.kb-col::before{content:""; position:absolute; left:14px; right:14px; top:0; height:3px; border-radius:0 0 3px 3px; background:var(--cc); opacity:.9;}
.kb-col.over{border-color:color-mix(in srgb,var(--bad) 45%,transparent); box-shadow:0 0 0 3px var(--bad-soft);}
.kb-col-head{display:flex; align-items:center; gap:7px; padding:13px 10px 8px 14px; font-size:13.5px; flex-shrink:0;}
.kb-col-dot{width:9px; height:9px; border-radius:50%; background:var(--cc); flex-shrink:0; box-shadow:0 0 0 3px color-mix(in srgb,var(--cc) 22%,transparent);}
.kb-col-done{color:var(--good); display:inline-flex;} .kb-col-done .ic{width:14px; height:14px;}
.kb-count{font-size:12px; font-weight:600; color:var(--text-2); background:var(--surface-3); padding:1px 7px; border-radius:999px;}
.kb-count.bad{color:#fff; background:var(--bad);}
.kb-count.bad .muted{color:rgba(255,255,255,.8);}
.kb-col-head .icon-btn{opacity:.75;} .kb-col-head .icon-btn:hover{opacity:1;}
.kb-wip{display:flex; align-items:center; gap:6px; margin:0 12px 6px; padding:5px 9px; border-radius:8px; font-size:11.5px; font-weight:600; color:var(--bad); background:var(--bad-soft);}
.kb-cards{flex:1; overflow-y:auto; overflow-x:hidden; padding:3px 10px 8px; display:flex; flex-direction:column; gap:8px; min-height:56px; overscroll-behavior:contain;}
.kb-empty{font-size:12.5px; color:var(--muted); text-align:center; padding:16px 8px; border:1.5px dashed var(--border); border-radius:11px;}
.kb-quick{padding:4px 10px 10px; flex-shrink:0;}
.kb-quick .input{background:transparent; border-color:transparent;}
.kb-quick .input:hover{background:var(--surface-2); border-color:var(--border);}
.kb-quick .input:focus{background:var(--surface); border-color:color-mix(in srgb,var(--accent) 70%,transparent);}
.kb-addcol{flex:0 0 220px; height:46px; display:flex; align-items:center; justify-content:center; gap:7px; border-radius:13px; border:1.5px dashed var(--border-strong); color:var(--muted); font-weight:600; transition:all .2s;}
.kb-addcol:hover{color:var(--accent-text); border-color:var(--accent); background:var(--accent-soft);}

/* cards */
.kb-card{position:relative; background:var(--surface); border:1px solid var(--border); border-radius:11px; padding:10px 12px 11px; cursor:grab;
  user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; box-shadow:var(--shadow-sm); flex-shrink:0;
  transition:transform .22s var(--ease), box-shadow .22s, border-color .22s, opacity .2s;}
.kb-cards.stagger > .kb-card{animation:fadeUp .4s var(--ease) both; animation-delay:calc(var(--ci,0) * 50ms + var(--i,0) * 28ms);}
.kb-card:hover{border-color:var(--border-strong); transform:translateY(-1px); box-shadow:0 10px 24px -14px rgba(0,0,0,.6);}
.kb-card:focus-visible{outline:2px solid var(--accent); outline-offset:1px;}
.kb-card.is-done .kb-title{color:var(--muted); text-decoration:line-through; text-decoration-color:color-mix(in srgb,var(--muted) 60%,transparent);}
.kb-card.is-done{background:color-mix(in srgb,var(--surface) 70%,transparent);}
.kb-cover{height:30px; margin:-10px -12px 9px; border-radius:10px 10px 0 0; background:linear-gradient(135deg,var(--cv),color-mix(in srgb,var(--cv) 55%,#000));}
.kb-labels{display:flex; flex-wrap:wrap; gap:4px; margin-bottom:7px;}
.kb-labels .tag{height:19px; font-size:11px; padding:0 7px;}
.kb-title{font-size:13.5px; font-weight:500; line-height:1.42; padding-right:20px; word-break:break-word;}
.kb-done-ic{display:inline-flex; vertical-align:-2px; margin-right:5px; color:var(--good);} .kb-done-ic .ic{width:14px; height:14px; stroke-width:2.6;}
.kb-dprev{font-size:12px; color:var(--muted); line-height:1.45; margin-top:4px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.kb-meta{display:flex; align-items:center; gap:9px; margin-top:9px; flex-wrap:wrap; min-height:22px;}
.kb-mi{display:inline-flex; align-items:center; gap:4px; font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums;}
.kb-mi .ic{width:13px; height:13px;} .kb-mi.good{color:var(--good);}
.kb-meta .prio .ic{width:14px; height:14px;}
.kb-due{display:inline-flex; align-items:center; gap:4px; font-size:11.5px; font-weight:600; color:var(--text-2); padding:1px 7px; border-radius:6px; background:var(--surface-3); white-space:nowrap;}
.kb-due .ic{width:12px; height:12px;}
.kb-due.overdue{color:var(--bad); background:var(--bad-soft);}
.kb-due.soon{color:var(--warn); background:var(--warn-soft);}
.kb-due.done{color:var(--good); background:var(--good-soft);}
.kb-cmenu{position:absolute; top:6px; right:5px; opacity:0; background:var(--surface); transition:opacity .15s;}
.kb-card.has-cover .kb-cmenu{top:4px; background:color-mix(in srgb,var(--surface) 75%,transparent); backdrop-filter:blur(4px);}
.kb-card:hover .kb-cmenu,.kb-card:focus-within .kb-cmenu{opacity:1;}
@media (hover:none){ .kb-cmenu{opacity:.85;} }
.kb-board.compact .kb-card{padding:7px 10px 8px;}
.kb-board.compact .kb-cover{height:6px; margin:-7px -10px 7px;}
.kb-board.compact .kb-title{font-size:13px;}
.kb-board.compact .kb-meta{margin-top:5px; min-height:0;}
.kb-board.compact .kb-labels{margin-bottom:5px;}
.kb-board.compact .kb-labels .tag{height:6px; width:26px; padding:0; font-size:0; background:var(--c); border-radius:4px;}

/* drag & drop */
.kb-pressing{transform:scale(.97) !important; box-shadow:0 0 0 2px var(--accent-soft) !important; transition:transform .26s ease;}
.kb-dragging{display:none !important;}
.kb-ghost{position:fixed !important; left:0; top:0; margin:0; z-index:400; pointer-events:none; cursor:grabbing; opacity:.97;
  box-shadow:0 26px 50px -14px rgba(0,0,0,.65), 0 0 0 1.5px var(--accent) !important; transition:none !important; animation:none !important; will-change:transform;}
.kb-ghost .kb-cmenu{display:none;}
.kb-settle{transition:transform .17s var(--ease) !important;}
.kb-ph{flex-shrink:0; border-radius:11px; border:2px dashed color-mix(in srgb,var(--accent) 55%,transparent); background:var(--accent-soft); animation:kbPh .18s var(--ease);}
@keyframes kbPh{from{opacity:0; transform:scaleY(.6);}}
body.kb-is-dragging,body.kb-is-dragging *{cursor:grabbing !important; user-select:none !important;}
.kb-board.kb-no-snap{scroll-snap-type:none !important;}
.kb-pop{animation:kbPop .6s var(--ease-spring) !important;}
@keyframes kbPop{0%{transform:scale(1);}35%{transform:scale(1.04); box-shadow:0 0 0 4px var(--good-soft), 0 12px 30px -12px rgba(60,207,106,.5);}100%{transform:scale(1);}}
.kb-new{animation:kbNew .45s var(--ease-spring) both !important;}
@keyframes kbNew{from{opacity:0; transform:translateY(-8px) scale(.96);}}

/* list view */
.kb-list{overflow:hidden;}
.kb-table td,.kb-table th{padding:9px 12px;}
.kb-th-check{width:40px;}
.kb-sort{display:inline-flex; align-items:center; gap:4px; font:inherit; color:inherit; letter-spacing:inherit; text-transform:inherit;}
.kb-sort:hover,.kb-sort.on{color:var(--text);}
.kb-sort .ic{width:12px; height:12px;}
.kb-grp td{background:var(--surface-2); padding:0 !important; border-bottom:1px solid var(--border);}
.kb-table tbody tr.kb-grp:hover{background:var(--surface-2);}
.kb-grp-btn{display:flex; align-items:center; gap:8px; width:100%; padding:9px 12px; font-size:13px; text-align:left;}
.kb-grp-btn .ic{width:14px; height:14px; color:var(--muted);}
.kb-row{cursor:pointer;}
.kb-row.is-done .kb-row-t{color:var(--muted); text-decoration:line-through;}
.kb-row-title{min-width:220px; max-width:520px;}
.kb-row-t{font-weight:500; word-break:break-word;}
.kb-row-sub{display:flex; gap:6px; align-items:center; margin-top:4px; flex-wrap:wrap;}
.kb-table .kb-labels{margin:0;}
.kb-addrow td{padding:6px 12px !important;}
.kb-addrow .input{background:transparent; border-color:transparent; max-width:420px;}
.kb-addrow .input:focus{background:var(--surface); border-color:color-mix(in srgb,var(--accent) 70%,transparent);}

/* board settings */
.kb-set-tabs{margin:-6px -20px 16px; padding:0 14px;}
.kb-ed-list{display:flex; flex-direction:column; gap:8px;}
.kb-ed-row{display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:11px; background:var(--surface-2); border:1px solid var(--border);}
.kb-ed-move{display:flex; flex-direction:column;} .kb-ed-move .icon-btn{height:18px;}
.kb-color-in{appearance:none; -webkit-appearance:none; width:28px; height:28px; border:0; border-radius:8px; padding:0; background:none; cursor:pointer; flex-shrink:0;}
.kb-color-in::-webkit-color-swatch-wrapper{padding:0;} .kb-color-in::-webkit-color-swatch{border:none; border-radius:8px;}
.kb-color-in::-moz-color-swatch{border:none; border-radius:8px;}
.kb-wip-in{width:72px; flex-shrink:0;}
.kb-ed-count{min-width:22px; text-align:center;}
.kb-danger{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; border-radius:12px; border:1px solid var(--border); background:var(--surface-2);}
.kb-danger.bad-zone{border-color:color-mix(in srgb,var(--bad) 30%,transparent); background:var(--bad-soft);}
.kb-danger p{margin-top:2px;}

/* ============================================================ task detail */
.tk-modal .modal-head h3{font-size:14px; font-weight:600; color:var(--text-2); font-family:var(--font-body); letter-spacing:0;}
.tk-top{margin-bottom:16px;}
.tk-title{width:100%; resize:none; overflow:hidden; border:1px solid transparent; background:transparent; border-radius:10px; padding:4px 8px; margin:0 -8px;
  font-family:var(--font-display); font-weight:700; font-size:22px; line-height:1.3; letter-spacing:-.02em; color:var(--text); outline:none; transition:background .2s, border-color .2s;}
.tk-title:not([readonly]):hover{background:var(--hover);}
.tk-title:focus{background:var(--surface-2); border-color:color-mix(in srgb,var(--accent) 60%,transparent);}
.tk-crumb{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:4px;}
.tk-status{--cc:#6f7389; display:inline-flex; align-items:center; gap:6px; font-weight:600; color:var(--text); padding:2px 9px; border-radius:999px; background:color-mix(in srgb,var(--cc) 16%,transparent);}
.tk-status::before{content:""; width:7px; height:7px; border-radius:50%; background:var(--cc);}
.tk-grid{display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:26px; align-items:start;}
.tk-main{grid-column:1; grid-row:1; min-width:0; display:flex; flex-direction:column; gap:24px;}
.tk-side{grid-column:2; grid-row:1; display:flex; flex-direction:column; gap:16px; position:sticky; top:0; padding:14px; border-radius:14px; background:var(--surface-2); border:1px solid var(--border);}
.tk-props{display:flex; flex-direction:column; gap:14px;}
.tk-prop{display:flex; flex-direction:column; gap:6px;}
.tk-prop > label{font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--muted);}
.tk-people{display:flex; flex-wrap:wrap; gap:6px; align-items:center;}
.tk-person{display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 4px 0 3px; border-radius:999px; background:var(--surface-3); font-size:12.5px; font-weight:500; max-width:100%;}
.tk-person button{width:20px; height:20px; border-radius:50%; display:grid; place-items:center; color:var(--muted);}
.tk-person button:hover{background:var(--hover); color:var(--text);}
.tk-person button .ic{width:12px; height:12px;}
.tk-labels{display:flex; flex-wrap:wrap; gap:5px;}
.tk-label{--c:#5b7cfa; display:inline-flex; align-items:center; gap:4px; height:24px; padding:0 9px; border-radius:7px; font-size:12px; font-weight:600;
  color:var(--text-2); border:1.5px dashed color-mix(in srgb,var(--c) 45%,transparent); transition:all .18s var(--ease);}
.tk-label .ic{width:12px; height:12px; stroke-width:3;}
.tk-label:hover:not(:disabled){border-style:solid; color:var(--text);}
.tk-label.on{border-style:solid; border-color:transparent; color:color-mix(in srgb,var(--c) 75%,var(--text)); background:color-mix(in srgb,var(--c) 18%,transparent);}
.tk-acts{display:flex; gap:6px; flex-wrap:wrap; padding-top:12px; border-top:1px solid var(--border);}
.tk-sec-head{display:flex; align-items:center; gap:10px; margin-bottom:10px;}
.tk-sec-head h4{font-size:14px; display:flex; align-items:center; gap:7px; flex:1;}
.tk-sec-head h4 .ic{color:var(--muted);}
.tk-editor{border:1px solid var(--border-strong); border-radius:12px; overflow:hidden; background:var(--surface-2);}
.tk-editor .md-toolbar{padding:6px 8px; border-bottom:1px solid var(--border);}
.tk-editor .textarea{border:0; border-radius:0; min-height:180px; background:transparent; box-shadow:none;}
.tk-desc{padding:2px 2px; border-radius:10px; cursor:text;}
.tk-desc-empty{width:100%; display:flex; align-items:center; gap:8px; padding:14px; border-radius:11px; border:1.5px dashed var(--border-strong); color:var(--muted); text-align:left; transition:all .2s;}
.tk-desc-empty:hover{color:var(--text); border-color:var(--accent); background:var(--accent-soft);}
.tk-sec .progress{margin-bottom:10px;}
.tk-cl{list-style:none; display:flex; flex-direction:column; gap:2px;}
.tk-cl-item{display:flex; align-items:center; gap:10px; padding:6px 6px; border-radius:9px; transition:background .15s;}
.tk-cl-item:hover{background:var(--hover);}
.tk-cl-item .icon-btn{opacity:0;} .tk-cl-item:hover .icon-btn{opacity:1;}
@media (hover:none){ .tk-cl-item .icon-btn{opacity:.7;} }
.tk-cl-text{flex:1; font-size:13.5px; min-width:0; word-break:break-word; transition:color .2s;}
.tk-cl-text[data-cl-edit]{cursor:text;}
.tk-cl-item.done .tk-cl-text{color:var(--muted); text-decoration:line-through;}
.tk-cl-item .check input:checked{animation:pop .3s var(--ease-spring);}
.tk-cl-add{margin-top:6px;}
.tk-cl-add .input{background:transparent;}
.tk-comments{display:flex; flex-direction:column; gap:14px; margin-bottom:14px;}
.tk-c{display:flex; gap:10px;}
.tk-c-head{display:flex; align-items:center; gap:8px; margin-bottom:3px; min-height:28px;}
.tk-c-head b{font-size:13.5px;}
.tk-c-head .icon-btn{opacity:0;} .tk-c:hover .tk-c-head .icon-btn{opacity:1;}
@media (hover:none){ .tk-c-head .icon-btn{opacity:.7;} }
.tk-c-body{font-size:13.5px; background:var(--surface-2); border:1px solid var(--border); border-radius:4px 12px 12px 12px; padding:9px 12px;}
.tk-composer{display:flex; gap:10px; align-items:flex-start;}
.tk-composer .textarea{min-height:64px;}
.tk-picker{width:270px; padding:6px;}
.tk-picker-search{padding:2px 2px 6px;}
.tk-picker-list{max-height:280px; overflow-y:auto;}
.tk-picker .menu-item{height:38px;}
.tk-mention{min-width:240px; padding:4px;}
.tk-mention .menu-item.sel{background:var(--accent-soft);}

/* ============================================================ calendar */
.cal-bar{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px;}
.cal-title{font-size:19px; margin-left:6px; min-width:0;}
.cal-filters{display:flex; gap:6px; flex-wrap:wrap;}
.cal-layout{display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:16px; align-items:start;}
.cal-side{position:sticky; top:16px;}
.cal-side .card-body{max-height:min(560px,60vh); overflow-y:auto;}
.cal-legend{display:flex; flex-wrap:wrap; gap:10px 14px; padding:12px 20px 16px; border-top:1px solid var(--border); font-size:11.5px; color:var(--text-2);}
.cal-legend span{display:inline-flex; align-items:center; gap:6px;}
.cal-legend i{width:9px; height:9px; border-radius:3px; background:var(--ec);}
.cal-legend i.tk{border-radius:50%; background:transparent; border:2px solid var(--muted);}

.cal-month{overflow:hidden;}
.cal-wd{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); border-bottom:1px solid var(--border);}
.cal-wd span{padding:10px 10px 8px; font-size:11px; font-weight:700; letter-spacing:.7px; text-transform:uppercase; color:var(--muted);}
.cal-grid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); grid-auto-rows:minmax(112px,auto);}
.cal-cell{position:relative; border-right:1px solid var(--border); border-bottom:1px solid var(--border); padding:6px 6px 8px; min-width:0; cursor:pointer; transition:background .15s;}
.cal-month.anim .cal-cell{animation:fadeIn .4s ease both; animation-delay:calc(var(--i,0) * 6ms);}
.cal-cell:nth-child(7n){border-right:0;}
.cal-cell:nth-last-child(-n+7){border-bottom:0;}
.cal-cell:hover{background:var(--hover);}
.cal-cell.wknd{background:color-mix(in srgb,var(--surface-2) 45%,transparent);}
.cal-cell.wknd:hover{background:var(--hover);}
.cal-cell.out .cal-dn{color:var(--muted); opacity:.55;}
.cal-cell.out .cal-items{opacity:.6;}
.cal-dn{display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; font-size:12.5px; font-weight:600; color:var(--text-2);}
.cal-dn span{width:24px; height:24px; display:grid; place-items:center; border-radius:50%; font-variant-numeric:tabular-nums;}
.cal-cell.today .cal-dn span{background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#fff; box-shadow:0 4px 12px -4px rgba(91,124,250,.8);}
.cal-items{display:flex; flex-direction:column; gap:3px; min-width:0;}
.cal-ev,.cal-tk{--ec:#5b7cfa; display:flex; align-items:center; gap:5px; width:100%; min-width:0; text-align:left; font-size:11.5px; line-height:1.35; padding:2px 6px; border-radius:6px; transition:filter .15s, transform .15s;}
.cal-ev{background:color-mix(in srgb,var(--ec) 17%,transparent); color:color-mix(in srgb,var(--ec) 62%,var(--text)); border-left:3px solid var(--ec); font-weight:600;}
.cal-ev b{font-weight:700; opacity:.85;}
.cal-ev.span{border-radius:0; margin:0 -6px; width:calc(100% + 12px); padding-left:9px;}
.cal-ev.span.start{border-radius:6px 0 0 6px; margin-left:0; width:calc(100% + 6px);}
.cal-ev.span.end{border-radius:0 6px 6px 0; margin-right:0; width:calc(100% + 6px);}
.cal-ev.span.start.end{border-radius:6px; margin:0; width:100%;}
.cal-ev:hover,.cal-tk:hover{filter:brightness(1.15); transform:translateX(1px);}
.cal-tk{color:var(--text-2);}
.cal-tk:hover{background:var(--hover);}
.cal-dot{width:8px; height:8px; border-radius:50%; border:2px solid var(--ec); flex-shrink:0;}
.cal-tk.done{color:var(--muted); text-decoration:line-through;}
.cal-tk.done .cal-dot{background:var(--ec);}
.cal-more{font-size:11px; font-weight:600; color:var(--muted); text-align:left; padding:1px 6px; border-radius:6px;}
.cal-more:hover{color:var(--text); background:var(--hover);}
.cal-dots{display:none;}

.cal-agenda{display:flex; flex-direction:column; gap:14px;}
.cal-aday{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:12px 12px 8px; box-shadow:var(--shadow);}
.cal-aday.today{border-color:color-mix(in srgb,var(--accent) 45%,transparent); box-shadow:0 0 0 3px var(--accent-soft);}
.cal-ah{display:flex; align-items:center; justify-content:space-between; font-size:13.5px; padding:2px 4px 8px; font-family:var(--font-body); letter-spacing:0;}
.cal-aday.today .cal-ah span{color:var(--accent-text);}
.cal-alist{display:flex; flex-direction:column; gap:4px;}
.cal-arow{--ec:#5b7cfa; display:flex; align-items:center; gap:11px; width:100%; text-align:left; padding:9px 10px; border-radius:10px; transition:background .15s, transform .2s var(--ease);}
.cal-arow:hover{background:var(--hover); transform:translateX(2px);}
.cal-arow .ic{color:var(--muted);}
.cal-arow-bar{width:4px; align-self:stretch; border-radius:4px; background:var(--ec); flex-shrink:0;}
.cal-arow-time{min-width:64px; font-size:12px; font-weight:600; color:var(--text-2); display:inline-flex; align-items:center;}
.cal-arow.done b{color:var(--muted); text-decoration:line-through;}
.cal-up{display:flex; flex-direction:column; gap:2px;}
.cal-up .cal-arow{padding:7px 6px;} .cal-up .cal-arow-time{min-width:56px;}
.cal-up-day{font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; color:var(--muted); padding:10px 6px 4px;}
.cal-up-day:first-child{padding-top:0;}
.kb-swatches .cal-auto{font-size:10px; font-weight:800; color:#fff; display:grid; place-items:center;}
.cal-types{display:flex; flex-wrap:wrap; gap:6px;}
.cal-types .chip{--ec:#5b7cfa;}
.cal-tdot{width:8px; height:8px; border-radius:50%; background:var(--ec);}

/* ============================================================ responsive */
@media (max-width:1180px){
  .kb-ov{grid-template-columns:minmax(0,1fr) 320px;}
  .cal-layout{grid-template-columns:1fr;}
  .cal-side{display:none;}
}
@media (max-width:980px){
  .kb-ov{grid-template-columns:1fr;}
  .kb-mine{position:static; max-height:none;}
}
@media (max-width:899px){
  .page.kb-page{padding:14px 0 0;}
  .kb-head,.kb-toolbar,.kb-jump{padding-left:16px; padding-right:16px;}
  .kb-head{margin-bottom:10px; gap:10px;}
  .kb-head > .row{flex:1 1 210px;}
  .kb-head .page-title{font-size:19px;}
  .kb-head .kb-bicon.lg{width:38px; height:38px; font-size:19px;}
  .kb-head .page-actions{flex-wrap:nowrap; gap:6px;}
  .kb-head .page-actions .btn{padding:0 10px;}
  .kb-desc{display:none;}
  .kb-toolbar{flex-wrap:nowrap; overflow:hidden; gap:8px; margin-bottom:10px;}
  .kb-search{width:auto; flex:1 1 120px; min-width:110px;}
  .kb-search .kbd{display:none;}
  .kb-chips{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; flex:0 1 auto;}
  .kb-chips::-webkit-scrollbar{display:none;}
  .kb-fcount{display:none;}
  .kb-board{padding:2px 16px 12px; scroll-snap-type:x mandatory; scroll-padding:0 16px; gap:12px;}
  .kb-col{flex-basis:86vw; scroll-snap-align:start; max-width:380px;}
  .kb-addcol{flex-basis:60vw; scroll-snap-align:start;}
  .kb-body.is-list{padding:0 16px 16px;}
  .kb-row-title{min-width:0;}
  .tk-grid{grid-template-columns:1fr; gap:18px;}
  .tk-main,.tk-side{grid-column:auto; grid-row:auto;}
  .tk-side{position:static; padding:12px;}
  .tk-props{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
  .tk-props .tk-prop:last-child{grid-column:1/-1;}
  .tk-title{font-size:19px;}
}
@media (max-width:640px){
  .kb-bgrid{grid-template-columns:1fr 1fr; gap:10px;}
  .kb-bcard{min-height:150px; padding:14px; gap:8px;}
  .kb-bcard h3{font-size:14.5px;}
  .kb-bcard .kb-bdesc{-webkit-line-clamp:2; min-height:0; font-size:12px;}
  .kb-bnew{min-height:150px;}
  .kb-tpls{grid-template-columns:1fr;}
  .tk-picker.as-sheet{width:auto;}
  .tk-picker.as-sheet .tk-picker-list{max-height:50dvh;}
  .kb-ed-row{flex-wrap:wrap;}
  .kb-ed-row .input.grow{flex:1 1 140px;}
  .kb-danger{flex-direction:column; align-items:stretch;}
  .cal-bar{gap:8px;}
  .cal-bar-r{width:100%; justify-content:space-between;}
  .cal-title{font-size:16px;}
  .cal-wd span{padding:8px 0; text-align:center; font-size:10px;}
  .cal-grid{grid-auto-rows:58px;}
  .cal-cell{padding:4px 2px; display:flex; flex-direction:column; align-items:center;}
  .cal-dn{justify-content:center; margin-bottom:2px;}
  .cal-items{display:none;}
  .cal-dots{display:flex; gap:3px; justify-content:center; flex-wrap:wrap; max-width:100%;}
  .cal-dots i{width:6px; height:6px; border-radius:50%; background:var(--ec);}
  .cal-dots i.tk{background:transparent; border:1.5px solid var(--ec); width:7px; height:7px;}
  .cal-dots i.tk.done{background:var(--ec);}
  .cal-arow-time{min-width:52px; font-size:11.5px;}
}
@media (max-width:420px){
  .kb-bgrid{grid-template-columns:1fr;}
}
