/* LemonLime · Tasks + generated Roadmap. Shares tokens, .btn, .panel, .card, .field, #toast, #peers and #aiPanel with style.css. */
.tl {
  --line: rgba(0, 0, 0, .07);
  --line-2: rgba(0, 0, 0, .12);
  --card: #fff;
  --late: #e5484d;
  --late-soft: rgba(229, 72, 77, .09);
  --doing: #2f6df6;
  --review: #d97706;
  --ai: #6e56cf;
  --top-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  overflow: hidden; height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg);
}
.tl .grow { flex: 1; }
.tl kbd { font: 600 11px/1 var(--mono); padding: 3px 5px; border-radius: 5px; background: var(--lemon-soft); color: #5c4a00; }
.tl .hint { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.tl input, .tl select, .tl textarea { outline: none; }
.tl input:focus-visible, .tl textarea:focus-visible { box-shadow: none; }
.tl .seg { margin: 0; display: inline-flex; background: rgba(0,0,0,.05); border-radius: 9px; padding: 2px; gap: 2px; }
.tl .seg button { height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tl .seg button .ic { width: 15px; height: 15px; }
.tl .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.tl .seg button:hover:not(.on) { color: var(--ink); }

/* ---------------------------------------------------------------- top bar */
.tl-top { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px; padding-top: env(safe-area-inset-top, 0px); background: rgba(244,243,238,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.tl #appBtn { height: 38px; font-size: 15px; }
.tl #appBtn .nm { display: inline; }
.tl #appBtn.open { background: rgba(0,0,0,.06) !important; color: var(--ink) !important; }
.tl-search { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; margin-left: 8px; width: 240px; border-radius: 9px; background: rgba(0,0,0,.05); color: var(--muted); border: 1.5px solid transparent; transition: width .15s, background .15s; }
.tl-search:focus-within { background: #fff; border-color: var(--ink); width: 300px; color: var(--ink); }
.tl-search .ic { width: 16px; height: 16px; }
.tl-search input { border: 0; background: transparent; flex: 1; min-width: 0; font-size: 13.5px; }
.tl-search input::-webkit-search-cancel-button { cursor: pointer; }
.tl #status { margin: 0 2px; }
.tl #peers { padding: 0 4px; }
.tl #peers .avatar { width: 26px; height: 26px; font-size: 11px; }
.tl #peers .avatar.ai { display: inline-grid; place-items: center; }
.tl #peers .avatar[data-peer] { cursor: pointer; }
.tl #peers .avatar.ai .ic { width: 13px; height: 13px; color: #fff; }
.tl-hb .ic { width: 17px; height: 17px; }
#searchBtn { display: none; }
.tl-ask { color: var(--ai); }
.tl .tl-ask.open, .tl .tl-ask.busy { background: var(--ai) !important; color: #fff !important; }
.tl-ask.busy .ic { animation: spin 1.4s linear infinite; }
.tl-ask.off { opacity: .55; }
.tl-more { position: relative; }
.tl-menu { position: absolute; right: 0; top: 42px; min-width: 300px; padding: 0; display: none; flex-direction: column; z-index: 60; }
.tl-menu.show { display: flex; }

/* ---------------------------------------------------------------- views */
.tl-main { flex: 1; min-height: 0; position: relative; display: flex; }
.tl-tasks { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.tl-roadview { display: none; flex: 1; min-height: 0; flex-direction: column; }
.tl[data-layout="roadmap"] .tl-roadview { display: flex; }
.tl-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.tl.ready .tl-empty#loading { display: none; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--lime-soft); border-top-color: var(--lime-deep); animation: spin .8s linear infinite; }
@media (min-width: 1240px) { .tl.detail-open .tl-main { padding-right: 432px; } }

/* ---------------------------------------------------------------- add + filters */
.tl-bar { flex: none; width: 100%; max-width: 960px; margin: 0 auto; padding: 16px 20px 0; position: relative; z-index: 12; }
.tl-add { display: flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 4px 4px 4px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .12s, box-shadow .12s; }
.tl-add:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--lime-soft); }
.tl-add .plus { color: var(--lime-deep); width: 20px; height: 20px; }
.tl-add input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; font-size: 15px; }
.tl-add input::placeholder { color: #a8a59c; }
.tl-add .btn { height: 38px; border-radius: 10px; }
.tl-add .btn.icon { width: 38px; }
.tl-add #addDump { color: var(--muted); }
.tl-add .btn.primary { opacity: .35; pointer-events: none; transition: opacity .12s; }
.tl-add.has .btn.primary { opacity: 1; pointer-events: auto; }
.tl-chips { position: absolute; left: 24px; right: 24px; top: 74px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; font-size: 12.5px; color: var(--muted); min-height: 26px; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.tl-chips .chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; background: #fff; border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; }
.tl-chips .chip.warn { border-color: #f0b3b5; color: var(--late); }
.tl-chips .chip .av { width: 18px; height: 18px; font-size: 9px; margin-left: -5px; }
.tl-chips .btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
.tl-chips .btn.primary { height: 28px; }
.pp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.pp { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 99px; border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pp .ic { width: 14px; height: 14px; }
.pp:hover { color: var(--ink); border-color: #b9b6ac; }
.pp.set { border-style: solid; border-color: var(--line-2); background: #fff; color: var(--ink); }
.pp.open { border-style: solid; border-color: var(--ink); color: var(--ink); background: #fff; }
.pp .av { width: 20px; height: 20px; font-size: 9px; margin-left: -5px; }
.pp .lbl { height: 18px; cursor: inherit; }
.pp i { font-style: normal; font-size: 15px; line-height: 1; margin: 0 -3px 0 2px; color: var(--muted); padding: 0 2px; border-radius: 4px; }
.pp i:hover { color: var(--ink); background: rgba(0,0,0,.06); }
.pp[data-prop="top"].set { background: var(--lemon-soft); border-color: transparent; color: #5c4a00; }
.pp-hint { margin-left: auto; font-size: 12px; color: #a8a59c; }
.pp-hint code { font: 600 11px var(--mono); background: rgba(0,0,0,.05); padding: 2px 5px; border-radius: 5px; color: var(--muted); }
.pp-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; width: 100%; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line); }
.pp-menu button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); }
.pp-menu button:hover { border-color: var(--ink); }
.pp-menu button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pp-menu button.lblb { padding: 0 5px; } .pp-menu button.lblb.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.pp-menu button small { color: var(--muted); font-weight: 500; }
.pp-menu .av { width: 22px; height: 22px; font-size: 9px; margin-left: -6px; }
.pp-menu input { height: 32px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 10px; font-size: 13px; background: #fff; }
.pp-menu input:focus { border-color: var(--ink); }
.pp-note { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ai); margin-left: 4px; }
.pp-note .ic { width: 13px; height: 13px; }
.late-b { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; background: var(--late-soft); color: var(--late); font-size: 11px; font-weight: 700; white-space: nowrap; }
.tl-add input.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tl-chips .who-pop { display: flex; gap: 4px; flex-wrap: wrap; }
.tl-chips .who-pop button { height: 26px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; padding: 0 10px 0 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.tl-chips .who-pop button.on { border-color: var(--ink); }

/* ---------------------------------------------------------------- plan strip */
.tl-strip { flex: none; width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.tl-strip:empty { display: none; }
.tl-strip .pill { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 500; }
.tl-strip .pill .ic { width: 16px; height: 16px; flex: none; }
.tl-strip .pill > span { line-height: 1.35; }
.tl-strip .pill b { font-weight: 700; }
.tl-strip .ok { color: #2d6a00; } .tl-strip .ok .ic { color: var(--lime-deep); }
.tl-strip .bad { color: var(--late); background: var(--late-soft); border-color: transparent; }
.tl-strip .pill.link { cursor: pointer; }
.tl-strip .pill.link:hover { border-color: var(--line-2); }
.tl-strip .pill.ai { color: var(--ai); cursor: pointer; }
.tl-strip .pill.ai:hover { background: rgba(110,86,207,.08); }
.tl-strip .muted { color: var(--muted); }

/* ---------------------------------------------------------------- list */
.tl-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tl[data-layout="board"] .tl-scroll, .tl[data-layout="roadmap"] .tl-scroll { display: none; }
.tl[data-layout="board"] .tl-kanban { display: grid; }
.tl-list { max-width: 960px; margin: 0 auto; padding: 0 20px calc(120px + var(--safe-b)); }
.sec { margin-bottom: 14px; }
.sec.empty-sec { display: none; }
body.dragging .sec.empty-sec { display: block; }
body.dragging .sec.empty-sec .rows:empty { display: block; min-height: 44px; border-style: dashed; }
.sec-h { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); user-select: none; position: sticky; top: 0; z-index: 3; background: linear-gradient(var(--bg) 75%, transparent); }
.sec-h .n { font-weight: 600; color: #a8a59c; }
.sec-h .tog { border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.sec-h .tog .ic { width: 14px; height: 14px; transition: transform .15s; }
.sec.collapsed .sec-h .tog .ic { transform: rotate(-90deg); }
.sec.collapsed .rows, .sec.collapsed .more { display: none; }
.sec-h .sub { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.rows { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.rows:empty { display: none; }
.sec-empty { padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.more { display: block; margin: 6px auto 0; height: 30px; padding: 0 12px; border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; border-radius: 8px; }
.more:hover { background: rgba(0,0,0,.05); color: var(--ink); }

.row { -webkit-touch-callout: none; position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px 6px 6px; border-top: 1px solid var(--line); cursor: default; content-visibility: auto; contain-intrinsic-size: auto 44px; touch-action: pan-y; -webkit-user-select: none; user-select: none; background: var(--card); }
.row:first-child { border-top: 0; border-radius: 14px 14px 0 0; }
.row:last-child { border-radius: 0 0 14px 14px; }
.row:only-child { border-radius: 14px; }
.row:hover { background: #fbfbf8; }
.row.cur { box-shadow: inset 3px 0 0 var(--ink); }
.row.sel { background: var(--accent-soft) !important; }
.row.open { background: var(--lime-soft) !important; }
.row.ghosted { opacity: .25; }
.row .grip { width: 16px; display: grid; place-items: center; color: #c4c1b8; opacity: 0; cursor: grab; flex: none; }
.row .grip .ic { width: 14px; height: 14px; }
.row:hover .grip { opacity: 1; }
.row .num { width: 20px; text-align: right; font: 600 11px/1 var(--mono); color: #b9b6ac; flex: none; }
.row .main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.row .title { font-size: 14px; line-height: 1.35; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row.done .title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.row .meta { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--muted); font-size: 12px; }
.row .meta .ic { width: 13px; height: 13px; }
.lbl { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--c-bg, #f0efe9); color: var(--c-fg, #55524a); white-space: nowrap; cursor: pointer; }
.lbl:hover { filter: brightness(.96); }
.row .right { display: flex; align-items: center; gap: 10px; flex: none; }
.eta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 54px; text-align: right; }
.eta.late { color: var(--late); font-weight: 600; }
.eta.due { color: #b54708; font-weight: 600; }
.eta.rev { color: var(--review); font-weight: 600; }
.est { font: 600 12px/1 var(--mono); color: var(--ink); padding: 4px 6px; border-radius: 6px; background: rgba(0,0,0,.045); min-width: 34px; text-align: center; white-space: nowrap; cursor: pointer; }
.est.none { color: #b9b6ac; background: transparent; border: 1px dashed var(--line-2); }
.est.ai { background: rgba(110,86,207,.1); color: var(--ai); }
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; flex: none; background: var(--c, #8a8a80); letter-spacing: -.02em; }
.av.none { background: transparent; border: 1.5px dashed #cfccc3; }
.row .peerring { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--pc); pointer-events: none; }
.row .peerring::after { content: attr(data-n); position: absolute; right: 8px; top: -9px; font-size: 10px; font-weight: 700; color: #fff; background: var(--pc); padding: 1px 6px; border-radius: 5px; }
.row.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: var(--fc, var(--lime-soft)); } 100% { background: var(--card); } }

/* status circle */
.st { --s: 20px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; border: 2px solid #b9b6ac; background: transparent; padding: 0; position: relative; transition: transform .1s; }
.st:hover { transform: scale(1.12); border-color: var(--ink); }
.st.backlog { border-style: dashed; border-color: #cfccc3; }
.st.doing { border-color: var(--doing); background: conic-gradient(var(--doing) 0 50%, transparent 50% 100%); background-clip: content-box; padding: 2px; }
.st.review { border-color: var(--review); background: conic-gradient(var(--review) 0 75%, transparent 75% 100%); background-clip: content-box; padding: 2px; }
.st.done { border-color: var(--lime-deep); background: var(--lime); }
.st.done::after { content: ""; position: absolute; left: 50%; top: 45%; width: 5px; height: 9px; border: solid var(--lime-ink); border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg); }

/* cut line */
.cut { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--late-soft); color: var(--late); font-size: 12px; font-weight: 700; border-top: 1px solid rgba(229,72,77,.25); border-bottom: 1px solid rgba(229,72,77,.25); }
.cut .ic { width: 15px; height: 15px; }
.cut span { font-weight: 500; }
.row.late .title { color: #8c2a2d; }

/* drag */
.tl-ghost { position: fixed; z-index: 200; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.1); border-radius: 12px !important; transform: rotate(1.2deg); opacity: .96; background: #fff; }
.tl-dropline { position: fixed; z-index: 150; height: 3px; border-radius: 3px; background: var(--lime-deep); pointer-events: none; box-shadow: 0 0 0 3px var(--lime-soft); }
.tl-dropline::before { content: ""; position: absolute; left: -5px; top: -3.5px; width: 10px; height: 10px; border-radius: 50%; background: var(--lime-deep); }
body.dragging, body.dragging * { cursor: grabbing !important; }

/* swipe (touch) */
.row .swipe-bg { position: absolute; inset: 0; display: none; align-items: center; padding: 0 18px; font-size: 13px; font-weight: 700; color: #fff; border-radius: inherit; z-index: 0; }
.row.swiping .swipe-bg { display: flex; }
.row.swiping > :not(.swipe-bg) { position: relative; z-index: 1; }
.row.swiping { background: transparent !important; overflow: hidden; }
.row .swipe-in { display: contents; }

/* ---------------------------------------------------------------- kanban */
.tl-kanban { flex: 1; min-height: 0; display: none; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; padding: 0 20px 20px; overflow-x: auto; max-width: 1400px; width: 100%; margin: 0 auto; }
.col { display: flex; flex-direction: column; min-height: 0; background: rgba(0,0,0,.035); border-radius: 14px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.col-h .st { --s: 14px; border-width: 1.5px; pointer-events: none; }
.col-h .n { color: #a8a59c; font-weight: 600; }
.col-h .add { margin-left: auto; width: 26px; height: 26px; border: 0; background: none; border-radius: 7px; color: var(--muted); display: grid; place-items: center; }
.col-h .add:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.col-h .add .ic { width: 16px; height: 16px; }
.cards { flex: 1; min-height: 60px; overflow-y: auto; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.card-t { -webkit-touch-callout: none; position: relative; background: #fff; border-radius: 11px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.07); border: 1px solid transparent; touch-action: pan-y; -webkit-user-select: none; user-select: none; cursor: grab; content-visibility: auto; contain-intrinsic-size: auto 72px; }
.card-t:hover { border-color: var(--line-2); }
.card-t.open { border-color: var(--lime-deep); box-shadow: 0 0 0 3px var(--lime-soft); }
.card-t.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card-t.late { box-shadow: inset 3px 0 0 var(--late), 0 1px 2px rgba(0,0,0,.07); }
.card-t .title { font-size: 13.5px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-t.done .title { color: var(--muted); }
.card-t .lbls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.card-t .foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 12px; color: var(--muted); }
.card-t .foot .eta { min-width: 0; text-align: left; }
.card-t .foot .av { margin-left: auto; width: 22px; height: 22px; }
.card-t .foot .ic { width: 13px; height: 13px; }
.card-t .peerring { position: absolute; inset: -1px; border-radius: 11px; box-shadow: inset 0 0 0 2px var(--pc); pointer-events: none; }
.card-t.flash { animation: flash 1.6s ease-out; }
.col .cut { border-radius: 8px; margin: 2px 0; border: 0; }
.kb-tabs { display: none; }

/* ---------------------------------------------------------------- detail panel */
.tl-detail { position: fixed; right: 12px; top: calc(var(--top-h) + 12px); bottom: 12px; width: 420px; z-index: 40; display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; }
.dt-grab { display: none; }
.dt-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 12px 6px 18px; }
.dt-head .st { --s: 22px; margin-top: 4px; }
#dtTitle { flex: 1; border: 0; resize: none; font-size: 18px; font-weight: 650; line-height: 1.35; padding: 2px 0; background: transparent; min-height: 30px; overflow: hidden; letter-spacing: -.01em; }
.dt-head .btn { flex: none; width: 32px; height: 32px; }
.dt-when { padding: 0 18px 10px 50px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.dt-when b { color: var(--ink); font-weight: 600; }
.dt-when .late { color: var(--late); }
.dt-when .ai-chip { color: var(--ai); }
.dt-body { flex: 1; overflow-y: auto; padding: 4px 18px 16px; overscroll-behavior: contain; }
.dt-row { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); }
.dt-row > label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.dt-status { width: 100%; }
.dt-status button { flex: 1; padding: 0 4px; }
.dt-status button.on[data-s="doing"] { color: var(--doing); }
.dt-status button.on[data-s="done"] { color: #2d6a00; }
.dt-status button.on[data-s="review"] { color: var(--review); }
.tl-bulk select, .dp-list select, .dp-where select { height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; background: #fff; font-size: 13.5px; max-width: 100%; }
.dt-est { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dt-est input { width: 74px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 9px; font: 600 13.5px var(--mono); flex: none; }
.dt-quick { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.dt-quick button { flex: none; height: 28px; padding: 0 8px; border-radius: 7px; border: 0; background: rgba(0,0,0,.045); font: 600 12px var(--mono); color: var(--muted); }
.dt-quick button:hover { color: var(--ink); background: rgba(0,0,0,.08); }
.dt-quick button.on { background: var(--ink); color: #fff; }
.dt-ai { color: var(--ai); flex: none; height: 32px; }
.dt-ai.icon, #dtEstAi { width: 34px; padding: 0; }
.dt-ai:hover { background: rgba(110,86,207,.09); }
.dt-ai.sm { height: 28px; font-size: 12px; padding: 0 9px; }
.dt-ai.busy .ic { animation: spin 1.2s linear infinite; }
.dt-why { margin: 6px 0 2px 92px; font-size: 12px; color: var(--ai); line-height: 1.4; }
.dt-labels { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 34px; padding: 3px 0; }
.dt-labels .lbl { gap: 4px; }
.dt-labels .lbl i { font-style: normal; opacity: .55; font-size: 13px; line-height: 1; }
.dt-labels input { border: 0; background: transparent; min-width: 70px; flex: 1; height: 26px; font-size: 13px; }
.dt-due { display: flex; align-items: center; gap: 4px; }
.dt-due input { height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; background: #fff; font-size: 13.5px; }
.dt-due .btn { width: 30px; height: 30px; color: var(--muted); }
.dt-sec { padding-top: 14px; }
.dt-sec-h { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.dt-sec-h b { font-weight: 600; color: #a8a59c; margin-left: 4px; }
.dt-check { list-style: none; margin: 0; padding: 0; }
.dt-check li { display: flex; align-items: flex-start; gap: 8px; padding: 5px 2px; border-radius: 7px; }
.dt-check li:hover { background: rgba(0,0,0,.03); }
.dt-check input[type=checkbox] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--lime-deep); flex: none; }
.dt-check .tx:focus { background: rgba(0,0,0,.04); box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.dt-check .tx { flex: 1; font-size: 13.5px; line-height: 1.4; outline: none; border-radius: 4px; word-break: break-word; }
.dt-check li.done .tx { color: var(--muted); text-decoration: line-through; }
.dt-check .x { border: 0; background: none; color: #b9b6ac; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; opacity: 0; flex: none; }
.dt-check .x .ic { width: 13px; height: 13px; }
.dt-check li:hover .x { opacity: 1; }
.dt-check .x:hover { color: var(--ink); background: rgba(0,0,0,.06); }
#dtCheckIn { width: 100%; height: 34px; border: 0; border-bottom: 1px dashed var(--line-2); background: transparent; font-size: 13.5px; padding: 0 2px; }
#dtNotes { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; font-size: 13.5px; line-height: 1.5; background: #fcfcfa; }
#dtNotes:focus { border-color: var(--ink); background: #fff; }
.dt-meta { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.dt-foot { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--line); }
.dt-foot .btn { height: 34px; font-size: 12.5px; }
.tl-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(20,20,10,.28); }
@media (min-width: 761px) { .tl-scrim { display: none; } }

/* ---------------------------------------------------------------- bulk bar */
.tl-bulk { position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: #fff; max-width: calc(100vw - 20px); overflow-x: auto; }
.tl-bulk b { font-size: 13px; white-space: nowrap; }
.tl-bulk .btn { height: 32px; }

/* ---------------------------------------------------------------- dump */
.tl-dump { width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; padding: 22px 22px 18px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; }
.dp-head h2 { margin: 0; }
.dp-head .btn { width: 32px; height: 32px; }
#dpInputStep, #dpReviewStep { display: flex; flex-direction: column; min-height: 0; }
#dpInputStep[hidden], #dpReviewStep[hidden] { display: none; }
.tl-dump .sub { margin: 6px 0 14px !important; }
#dpText { width: 100%; min-height: 220px; resize: vertical; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; background: #fcfcfa; }
#dpText:focus { border-color: var(--ink); background: #fff; }
.dp-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.dp-actions .hint { flex: 1; }
.dp-actions .btn { height: 40px; padding: 0 16px; }
.dp-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 10px 0; min-height: 22px; }
.dp-status .ic { width: 16px; height: 16px; color: var(--ai); }
.dp-status .ic.spin { animation: spin 1s linear infinite; }
.dp-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; min-height: 120px; border: 1px solid var(--line); border-radius: 12px; }
.dp-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 10px; padding: 10px 12px; border-top: 1px solid var(--line); animation: dpIn .25s ease-out; }
.dp-list li:first-child { border-top: 0; }
.dp-list li.off { opacity: .45; }
@keyframes dpIn { from { opacity: 0; transform: translateY(4px); } }
.dp-list input[type=checkbox] { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--lime-deep); }
.dp-list .t { border: 0; font-size: 14px; font-weight: 600; padding: 2px 0; background: transparent; width: 100%; }
.dp-list .t:focus { box-shadow: 0 1px 0 var(--ink); }
.dp-list .n { grid-column: 2 / 4; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.dp-list .r { display: flex; align-items: center; gap: 6px; }
.dp-list .r input { width: 56px; height: 30px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 6px; font: 600 12.5px var(--mono); text-align: center; }
.dp-list .r select { height: 30px; font-size: 12.5px; max-width: 130px; }
.dp-list .x2 { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dp-list .dup { font-size: 12px; color: #b54708; font-weight: 600; }
.dp-list .steps { font-size: 12px; color: var(--muted); }
.dp-where { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- settings, keys, activity */
.tl-settings, .tl-keys { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
.tl .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tl .field select { height: 42px; border: 1.5px solid rgba(0,0,0,.12); border-radius: 10px; padding: 0 10px; background: #fafaf8; font-size: 15px; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.days button { width: 44px; height: 36px; border-radius: 9px; border: 1.5px solid var(--line-2); background: #fff; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.days button.on { background: var(--lime); border-color: var(--lime-deep); color: var(--lime-ink); }
.st-people { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; max-height: 260px; overflow-y: auto; }
.st-people li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.st-people li:first-child { border-top: 0; }
.st-people li.off { color: var(--muted); }
.st-people li.off .av { opacity: .4; }
.st-people input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--lime-deep); }
.st-people .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-people select { height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 13px; padding: 0 6px; }
.tl-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 12px 0 16px; font-size: 14px; }
.tl-keys dt { white-space: nowrap; }
.tl-keys dd { margin: 0; color: #3b3935; }
.tl-keys code { font: 600 12px var(--mono); background: rgba(0,0,0,.05); padding: 2px 5px; border-radius: 5px; }
.tl-log { position: fixed; right: 12px; top: calc(var(--top-h) + 8px); width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - var(--top-h) - 24px); z-index: 50; display: flex; flex-direction: column; background: #fff; }
.tl-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px 14px; font-weight: 700; font-size: 13px; }
.tl-pop-head .btn { width: 30px; height: 30px; }
#logList { list-style: none; margin: 0; padding: 0 14px 12px; overflow-y: auto; font-size: 13px; }
#logList li { padding: 7px 0; border-top: 1px solid var(--line); line-height: 1.4; }
#logList li b { font-weight: 650; }
#logList li .t { color: var(--muted); font-size: 11.5px; margin-left: 4px; }

/* ---------------------------------------------------------------- assistant panel on this page */
.tl #aiPanel { right: 12px; top: calc(var(--top-h) + 8px); bottom: auto; z-index: 55; max-height: calc(100dvh - var(--top-h) - 24px); }
.tl #aiPanel .ai-thread { max-height: min(460px, calc(100dvh - 300px)); }
.tl #aiPanel .msg .txt { flex: 1; min-width: 0; }
.tl #aiPanel .opts { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 22px; }
.tl #aiPanel .opt { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(110,86,207,.35); background: #fff; color: var(--ai); font-size: 12.5px; font-weight: 600; }
.tl #aiPanel a.loc { color: var(--accent); font-weight: 600; }
.tl #toast { bottom: calc(28px + var(--safe-b)); }
.tl #toast.act { pointer-events: auto; display: flex; align-items: center; gap: 10px; }
.tl #toast .go { height: 26px; padding: 0 10px; border-radius: 6px; border: 0; background: var(--lime); color: var(--lime-ink); font-weight: 700; font-size: 12px; }
.tl-tip { position: fixed; z-index: 300; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.45; padding: 7px 10px; border-radius: 8px; max-width: 280px; box-shadow: var(--shadow); }
.tl-tip b { font-weight: 650; }
.tl-tip .m { color: #c9c7bf; }

/* ---------------------------------------------------------------- roadmap */
.rd-wrap { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; margin: 0 20px 20px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px; position: relative; }
#road { position: relative; }
.rd-head { position: sticky; top: 0; z-index: 6; background: #fff; border-bottom: 1px solid var(--line); height: 50px; }
.rd-corner { position: sticky; left: 0; z-index: 8; background: #fff; width: var(--lw); height: 50px; border-right: 1px solid var(--line); display: flex; align-items: flex-end; padding: 0 12px 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); overflow: hidden; white-space: nowrap; }
.rd-mo { position: absolute; top: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--ink); }
.rd-day { position: absolute; top: 28px; font-size: 11px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rd-day.today { color: #fff; background: var(--ink); border-radius: 6px; font-weight: 700; }
.rd-day.off { color: #c4c1b8; }
.rd-body { position: relative; }
.rd-bg { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.rd-bg.off { background: repeating-linear-gradient(135deg, rgba(0,0,0,.025) 0 6px, transparent 6px 12px); }
.rd-bg.wk { border-left: 1px solid var(--line); }
.rd-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); z-index: 4; pointer-events: none; opacity: .75; }
.rd-dl { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--late); z-index: 4; pointer-events: none; }
.rd-dlh { position: absolute; top: 4px; transform: translateX(-100%); background: var(--late); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px 6px 0 6px; white-space: nowrap; z-index: 2; }
.rd-dlh::after { content: ""; position: absolute; right: -1px; top: 100%; height: 30px; border-right: 2px dashed var(--late); }
.rd-past { position: absolute; top: 0; bottom: 0; left: 0; background: rgba(0,0,0,.02); pointer-events: none; }
.rd-lane { position: relative; border-bottom: 1px solid var(--line); }
.rd-lab { position: sticky; left: 0; z-index: 5; width: var(--lw); height: 100%; background: #fff; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.rd-lab .nm { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-lab .sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rd-lab .sub.late { color: var(--late); font-weight: 600; }
.rd-lab > div { min-width: 0; }
.bar { position: absolute; height: 26px; border-radius: 7px; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; cursor: pointer; z-index: 2; background: var(--lime-soft); border: 1px solid rgba(91,179,0,.45); color: #1f3a07; transition: filter .1s; }
.bar:hover { filter: brightness(.96); z-index: 3; }
.bar .ic { width: 13px; height: 13px; flex: none; }
.bar span { overflow: hidden; text-overflow: ellipsis; }
.bar.doing { background: #dfe8fe; border-color: rgba(47,109,246,.5); color: #12307a; }
.bar.un { border-style: dashed; background: #fbfdf6; }
.bar.unest { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.035) 6px 12px); }
.bar.late { background: #fdecec; border-color: rgba(229,72,77,.55); color: #8c2a2d; }
.bar.review { background: #fdf0dc; border-color: rgba(217,119,6,.5); color: #7a4300; }
.bar.review .ic { color: var(--review); }
.bar.done { background: #f0efe9; border-color: transparent; color: var(--muted); }
.bar.done .ic { color: var(--lime-deep); }
.bar.open { box-shadow: 0 0 0 2px var(--ink); }
.bar.flash { animation: barflash 1.6s ease-out; }
@keyframes barflash { 0% { box-shadow: 0 0 0 3px var(--fc, var(--lime)); } 100% { box-shadow: 0 0 0 0 transparent; } }
.bar .pr { position: absolute; inset: -2px; border-radius: 9px; box-shadow: 0 0 0 2px var(--pc); pointer-events: none; }
.rd-emptyrow { position: absolute; font-size: 12.5px; color: var(--muted); top: 50%; transform: translateY(-50%); }

/* vertical roadmap (phones) */
.rv { display: none; }
.rv-wk { margin: 0 0 16px; }
.rv-wk h3 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 10px 4px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: linear-gradient(var(--bg) 80%, transparent); display: flex; justify-content: space-between; }
.rv-wk h3 span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.rv-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rv-it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
.rv-it:first-child { border-top: 0; }
.rv-it .when { width: 62px; flex: none; font-size: 12px; color: var(--muted); line-height: 1.3; font-variant-numeric: tabular-nums; }
.rv-it .when b { display: block; color: var(--ink); font-size: 13px; }
.rv-it .mid { flex: 1; min-width: 0; }
.rv-it .tt { font-size: 14px; font-weight: 550; line-height: 1.35; }
.rv-it .mm { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.rv-it .rail { width: 4px; align-self: stretch; border-radius: 4px; background: var(--lime); flex: none; }
.rv-it.doing .rail { background: var(--doing); }
.rv-it.late .rail { background: var(--late); }
.rv-it.un .rail { background: repeating-linear-gradient(var(--lime) 0 4px, transparent 4px 7px); }
.rv-it.done .rail { background: #d8d6cd; }
.rv-it.review .rail { background: var(--review); }
.rv-it.done .tt { color: var(--muted); }
.rv-dl { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; color: var(--late); font-size: 12.5px; font-weight: 700; }
.rv-dl::before, .rv-dl::after { content: ""; flex: 1; border-top: 2px dashed rgba(229,72,77,.5); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .tl-search { width: 180px; } .tl-search:focus-within { width: 220px; }
}
@media (max-width: 900px) {
  .tl-hb span { display: none; }
  .tl-hb { width: 36px; padding: 0; }
  .tl-search { display: none; }
  #searchBtn { display: inline-flex; }
  .tl.searching .tl-search { display: flex; position: absolute; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 10px); width: auto; z-index: 5; margin: 0; background: #fff; border-color: var(--ink); height: 38px; }
}
@media (max-width: 760px) {
  .tl { --top-h: 52px; }
  .tl-top { gap: 4px; padding: 0 6px; padding-top: env(safe-area-inset-top, 0px); }
  .tl #peers { display: none; }
  #dumpBtn { display: none; }

  /* add bar sits at the bottom, under the thumb */
  .tl-bar { padding: 8px 12px 0; display: contents; }
  .tl-add { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); z-index: 35; box-shadow: 0 6px 24px rgba(0,0,0,.14); border-radius: 16px; }
  .tl-add input { font-size: 16px; height: 44px; }
  .tl-chips { position: fixed; top: auto; left: 8px; right: 8px; bottom: calc(66px + var(--safe-b)); z-index: 35; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-radius: 12px; padding: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
  .pp-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pp-row::-webkit-scrollbar { display: none; }
  .pp { flex: none; }
  .tl-strip { padding: 0 12px 8px; gap: 6px; font-size: 12.5px; }
  .tl-strip .pill { min-height: 30px; padding: 3px 10px; }
  .tl-list { padding: 0 8px calc(96px + var(--safe-b)); }
  .row { min-height: 56px; gap: 10px; padding: 8px 12px 8px 12px; align-items: center; contain-intrinsic-size: auto 58px; }
  .row .grip, .row .num { display: none; }
  .row .st { --s: 24px; }
  .row .main { flex-direction: column; align-items: stretch; gap: 3px; }
  .row .title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; }
  .row .meta { flex-wrap: wrap; }
  .row .right { flex-direction: column; align-items: flex-end; gap: 5px; }
  .row .eta { min-width: 0; font-size: 11.5px; }
  .row .right .est { order: 2; }
  .row .right .av { position: absolute; display: none; }
  .row .meta .av { display: inline-grid; width: 18px; height: 18px; font-size: 8px; }
  .sec-h { top: 0; }

  /* kanban: one column at a time, tabs on top */
  .tl-kanban { flex-direction: column; padding: 0 8px; gap: 0; overflow: hidden; }
  .tl[data-layout="board"] .tl-kanban { display: flex; }
  .kb-tabs { display: flex; gap: 4px; padding: 0 4px 8px; flex: none; overflow-x: auto; scrollbar-width: none; }
  .kb-tabs button { flex: 1; height: 34px; border-radius: 9px; border: 0; background: rgba(0,0,0,.05); font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; padding: 0 8px; }
  .kb-tabs button.on { background: var(--ink); color: #fff; }
  .kb-tabs button span { opacity: .6; margin-left: 3px; font-weight: 600; }
  .col { display: none; flex: 1; background: transparent; }
  .col.on { display: flex; }
  .col-h { display: none; }
  .cards { padding: 0 2px calc(96px + var(--safe-b)); }

  /* detail = bottom sheet */
  .tl-detail { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: min(88dvh, 760px); border-radius: 18px 18px 0 0; padding-bottom: var(--safe-b); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
  .tl-detail.drag { transition: none; }
  .dt-grab { display: block; flex: none; width: 40px; height: 5px; border-radius: 5px; background: #d8d6cd; margin: 8px auto 0; }
  .dt-head { padding-top: 10px; }
  .dt-row { grid-template-columns: 72px 1fr; }
  .dt-why { margin-left: 82px; }
  .dt-est input, .dt-due input, #dtCheckIn, #dtNotes, .dt-owner select, .dt-labels input, #dtTitle { font-size: 16px; }
  .dt-check .x { opacity: 1; }
  .tl-bulk { bottom: calc(76px + var(--safe-b)); left: 8px; right: 8px; transform: none; }
  .tl-bulk .seg button { padding: 0 7px; }
  .tl-bulk #bulkEst span { display: none; }

  .tl-dump { padding: 18px 16px 14px; }
  #dpText { font-size: 16px; min-height: 200px; }
  .dp-list li { grid-template-columns: 22px 1fr; }
  .dp-list .r { grid-column: 2; }
  .dp-list .n { grid-column: 2; }
  .tl .row2 { grid-template-columns: 1fr; gap: 0; }
  .tl #aiPanel { left: 8px; right: 8px; width: auto; top: auto; bottom: calc(8px + var(--safe-b)); }
  .tl #aiInput { font-size: 16px; }

  /* roadmap goes vertical */
  .rd-wrap { display: none; }
  .rv { display: block; padding: 0 10px calc(96px + var(--safe-b)); overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
}
@media (hover: none) { .row:hover, .card-t:hover { background: var(--card); border-color: transparent; } .row.cur { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .row.flash, .card-t.flash, .bar.flash { animation: none; } }

/* ---------------------------------------------------------------- same chrome as the board: floating panels at the same spots (app switcher top-left, people top-right) */
.tl { --top-h: 68px; }
.tl-top { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; padding: 0 14px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); align-items: flex-start; height: calc(var(--top-h) + env(safe-area-inset-top, 0px)); gap: 8px; }
.tl-top > *, .tl-top .tl-more > .btn { flex: none; }
.tl-top .grow { flex: 1; }
.tl #appBtn { height: 44px; font-size: 14px; }
.tl #appBtn.open { background: var(--lime) !important; color: var(--lime-ink) !important; }
.tl-top .panel.btn, .tl-top .tl-search { height: 44px; }
.tl-top .btn.icon.panel, .tl-top .tl-hb.panel:not(:has(span)) { width: 44px; }
.tl-top .tl-search { margin-left: 0; background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 0 12px; }
.tl-top .tl-search:focus-within { background: #fff; border-color: var(--ink); }
.tl #peers { height: 44px; padding: 5px 8px; }
.tl #peers:empty { display: none; }
.tl #peers .avatar { width: 28px; height: 28px; font-size: 12px; }
.tl #peers .avatar.me { cursor: default; }
.tl #status { align-self: center; margin-top: 0; height: 8px; position: relative; top: 18px; }
.tl-menu { top: 50px; }
.tl .tl-bar { padding-top: 6px; }
@media (max-width: 900px) { .tl-top .tl-hb.panel { width: 44px; padding: 0; } }
@media (max-width: 760px) {
  .tl { --top-h: 64px; }
  .tl-top { padding: 0 10px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); gap: 6px; }
  .tl.searching .tl-search { top: calc(env(safe-area-inset-top, 0px) + 10px); height: 44px; }
}

/* ---------------------------------------------------------------- view tabs + filter in the top bar (no separate filter row) */
.tl-nav { display: contents; }
.tl-views { display: flex; height: 44px; padding: 0 6px; gap: 2px; }
.tl-views button { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 11px; border: 0; background: none; font: 600 13.5px var(--font); color: var(--muted); }
.tl-views button .ic { width: 16px; height: 16px; }
.tl-views button:hover { color: var(--ink); }
.tl-views button.on { color: var(--ink); }
.tl-views button.on .ic { color: var(--lime-deep); }
.tl-views button.on::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--lime-deep); }
.tl-filter { position: relative; }
#filterBtn { height: 44px; color: var(--muted); }
#filterBtn .ic { width: 17px; height: 17px; }
#filterBtn.active { color: var(--ink); background: var(--lime-soft); }
.tl-filtermenu { position: absolute; left: 0; top: 50px; min-width: 240px; max-height: min(70dvh, 520px); overflow-y: auto; display: none; z-index: 60; }
.tl-filtermenu.show { display: block; }
.set-menu .ck { margin-left: auto; opacity: 0; color: var(--lime-deep); }
.set-menu .on .ck { opacity: 1; }
.set-menu .av { width: 24px; height: 24px; font-size: 10px; }
.set-menu .av .ic { width: 13px; height: 13px; }
.av.none .ic { width: 12px; height: 12px; color: #a8a59c; }
.av.more { background: #e9e7df; color: var(--muted); font-size: 9.5px; }
/* owners on a task: click to assign; several people stack */
.owners { display: inline-flex; align-items: center; flex: none; cursor: pointer; border-radius: 99px; padding: 2px; margin: -2px; }
.owners[data-act]:hover { background: rgba(0,0,0,.07); }
.owners.many .av + .av { margin-left: -5px; box-shadow: 0 0 0 2px #fff; }
.card-t .foot .owners { margin-left: auto; } .card-t .foot .owners .av { margin-left: 0; } .card-t .foot .owners.many .av + .av { margin-left: -8px; }
.row .meta .owners .av { width: 18px; height: 18px; font-size: 8px; display: inline-grid; }
.tl-assign { position: fixed; z-index: 120; width: 250px; max-height: min(60dvh, 420px); overflow-y: auto; background: #fff; }
.as-h { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.as-h span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.dt-ownerbtn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 3px 8px 3px 4px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 13.5px; text-align: left; }
.dt-ownerbtn:hover { border-color: var(--ink); }
.dt-ownerbtn .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-ownerbtn .muted { color: var(--muted); }
.tl .tl-bar { padding-top: 4px; }
@media (max-width: 1280px) { .tl-top .tl-search { width: 170px; } .tl-top .tl-search:focus-within { width: 200px; } }
@media (max-width: 1120px) {
  .tl-search { display: none; } #searchBtn { display: inline-flex; }
  .tl.searching .tl-search { display: flex; position: absolute; left: 14px; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 14px); width: auto; z-index: 5; margin: 0; background: #fff; border-color: var(--ink); height: 44px; }
  .tl-hb span { display: none; } .tl-top .tl-hb.panel { width: 44px; padding: 0; }
}
@media (max-width: 900px) { #filterBtn span { display: none; } #filterBtn.active span { display: inline; max-width: 90px; overflow: hidden; text-overflow: ellipsis; } .tl-views button { padding: 0 9px; } }
@media (max-width: 760px) {
  .tl-top { flex-wrap: wrap; height: auto; padding-bottom: 8px; row-gap: 8px; }
  .tl-nav { display: flex; order: 10; width: 100%; gap: 6px; }
  .tl-views { flex: 1; height: 40px; } .tl-views button { flex: 1; justify-content: center; }
  #filterBtn { height: 40px; } .tl-filtermenu { left: auto; right: 0; top: 46px; }
  .tl .tl-bar { display: contents; }
  .tl-strip { padding-top: 2px; }
}
.tl .tl-bar { padding-bottom: 10px; }
@media (min-width: 761px) { .tl .tl-chips { top: 60px; } }

/* ---------------------------------------------------------------- conversation on a task */
.cm-thread { display: grid; gap: 12px; padding: 2px 0 4px; }
.cm { display: flex; gap: 9px; align-items: flex-start; } .cm.pending { opacity: .6; }
.cm > .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 700; flex: none; margin-top: 1px; }
.cm-b2 { min-width: 0; flex: 1; }
.cm-h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; } .cm-h span { color: var(--muted); font-size: 12px; }
.cm-x { margin-left: auto; border: 0; background: none; padding: 2px; border-radius: 6px; color: var(--muted); opacity: 0; align-self: center; } .cm-x .ic { width: 14px; height: 14px; display: block; }
.cm:hover .cm-x, .cm-x:focus-visible { opacity: 1; } .cm-x:hover { color: var(--danger); background: rgba(0,0,0,.05); }
@media (hover: none) { .cm-x { opacity: .6; } }
.cm-t { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 1px; } .cm-t a { color: var(--accent); } .cm-t .at { color: var(--lime-deep); font-weight: 600; }
.cm-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cm-imgs img { max-width: 100%; max-height: 190px; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); cursor: zoom-in; display: block; background: #f4f3ee; }
.cm-imgs img:not(:only-child) { height: 96px; width: 96px; object-fit: cover; }
.cm-empty { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.cm-form { display: flex; align-items: flex-end; gap: 6px; margin-top: 10px; padding: 5px 5px 5px 12px; border: 1.5px solid rgba(0,0,0,.12); border-radius: 14px; background: #fafaf8; }
.cm-form:focus-within { border-color: var(--ink); background: #fff; }
.cm-form textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; resize: none; font-size: 14.5px; line-height: 1.4; padding: 6px 0; max-height: 160px; box-shadow: none !important; }
.cm-form .btn.icon { width: 34px; height: 34px; flex: none; } .cm-form .cm-send { background: var(--lime); color: var(--lime-ink); }
.cm-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cm-atts .att { position: relative; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: #f4f3ee; display: grid; place-items: center; } .cm-atts img { width: 100%; height: 100%; object-fit: cover; }
.cm-atts .att button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; padding: 0; } .cm-atts .att button .ic { width: 12px; height: 12px; }
.cm-atts .up .ic { width: 18px; height: 18px; color: var(--muted); } .ic.spin { animation: spin 1s linear infinite; }
.tl-detail.drop { outline: 3px dashed var(--lime-deep); outline-offset: -6px; }
.cm-b { display: inline-flex; align-items: center; gap: 3px; } .cm-b.new { color: var(--lime-ink); background: var(--lime); border-radius: 99px; padding: 0 7px 0 5px; font-weight: 700; }
.cm-light { z-index: 300; background: rgba(20,20,18,.86); cursor: zoom-out; backdrop-filter: none; } .cm-light img { max-width: 94vw; max-height: 92vh; border-radius: 8px; }
.dt-refs { display: grid; gap: 4px; }
.dt-refs .ref { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f4f3ee; color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.dt-refs .ref:hover { background: var(--lime-soft); } .dt-refs .ref .ic { width: 16px; height: 16px; color: var(--muted); } .dt-refs .ref small { margin-left: auto; color: var(--muted); font-weight: 500; }
.dt-refs .ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dtToBoard { text-decoration: none; }

/* ---------------------------------------------------------------- tools menu + clean-up review */
.tl-tools { position: relative; flex: none; } .tl-tools .chev { width: 13px; height: 13px; color: var(--muted); margin-left: -2px; }
#toolsMenu { min-width: 290px; } #toolsMenu .set-menu small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.tl-clean { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.cu-list { overflow-y: auto; display: grid; gap: 12px; align-content: start; min-height: 80px; padding: 2px; overscroll-behavior: contain; }
.cu-g { border: 1px solid rgba(0,0,0,.1); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.cu-g.done { display: flex; align-items: center; gap: 8px; font-size: 14px; background: var(--lime-soft); border-color: transparent; } .cu-g.done .ic { width: 18px; height: 18px; color: var(--lime-deep); } .cu-g.done .btn { margin-left: auto; height: 30px; padding: 0 10px; background: #fff; font-size: 13px; }
.cu-h { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); }
.cu-k { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: #fde3e1; color: #a1241d; } .cu-k.overlap { background: var(--lemon-soft); color: #6b5300; }
.cu-t { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 10px; cursor: pointer; } .cu-t:hover { background: #f4f3ee; } .cu-t:has(input:checked) { background: var(--lime-soft); }
.cu-t input { width: 16px; height: 16px; accent-color: var(--lime-deep); flex: none; } .cu-t .st { flex: none; pointer-events: none; }
.cu-t .tt { display: grid; min-width: 0; flex: 1; font-size: 14px; } .cu-t .tt b { font-weight: 600; overflow-wrap: anywhere; } .cu-t .tt small { color: var(--muted); font-size: 12px; }
.cu-g .btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; background: #fff; border: 1px solid rgba(0,0,0,.1); flex: none; }
.cu-m { display: grid; gap: 4px; } .cu-m label { font-size: 12px; font-weight: 600; color: var(--muted); }
.cu-m input { height: 38px; border-radius: 10px; border: 1.5px solid rgba(0,0,0,.12); padding: 0 11px; font-size: 14.5px; background: #fafaf8; min-width: 0; }
.cu-a { display: flex; justify-content: flex-end; gap: 8px; } .cu-a .btn { height: 36px; padding: 0 13px; font-weight: 600; font-size: 13.5px; } .cu-a .btn:not(.primary) { background: #f4f3ee; }
.tl-clean .dp-foot { display: flex; gap: 8px; padding-top: 12px; } .tl-clean .dp-foot .btn { height: 40px; padding: 0 16px; font-weight: 600; } .tl-clean .dp-foot .btn:not(.primary) { background: #f4f3ee; }
@media (max-width: 760px) { .tl-tools #toolsBtn .chev { display: none; } #toolsMenu { position: fixed; left: 10px; right: 10px; top: 62px; min-width: 0; } }
@media (max-width: 1120px) { .tl-tools .chev { display: none; } }
@media (max-width: 760px) { .tl #aiBtn { display: none; } } /* "Ask the assistant" is in the Tools menu on phones */

/* glimpses of the board spots linked to a task */
.dt-refs:has(.pic) { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dt-refs .ref.pic { position: relative; display: block; padding: 0; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid rgba(0,0,0,.1); background: #f4f3ee; }
.dt-refs .ref.pic:hover { border-color: var(--ink); background: #f4f3ee; }
.dt-refs .ref.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-refs .ref.pic span { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 5px; padding: 16px 8px 6px; color: #fff; font-size: 12px; background: linear-gradient(transparent, rgba(0,0,0,.66)); }
.dt-refs .ref.pic span .ic { width: 13px; height: 13px; color: #fff; flex: none; }
.dt-refs .ref:not(.pic) { grid-column: 1 / -1; }
.dt-status button { white-space: nowrap; padding: 0 2px; font-size: 12.5px; letter-spacing: -.01em; } /* "To do" stays on one line */
.tl-top { position: relative; z-index: 45; } /* its menus open over the task panel */
.rd-peek { position: fixed; z-index: 80; width: 264px; padding: 4px; background: #fff; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.08); pointer-events: none; }
.rd-peek img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: #f4f3ee; }
.rd-peek span { display: block; padding: 5px 6px 3px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
