/* frontend/styles/tasks.css — 원본 tasks.css 의 작업 페이지 전용 클래스 이식
   (전역/토큰/상단바는 tokens.css·globals.css 가 제공) */

/* ====================== 본문: 사이드바 + 메인 ====================== */
.twork {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-top: 12px;
}

/* -------- 서브 메뉴 사이드바 -------- */
.subnav {
  width: 252px;
  flex-shrink: 0;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 104px);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glass-hi);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
}
.sn-title {
  font-family: var(--font-disp);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 4px 8px 12px;
}
.sn-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  margin: 0 -4px;
  padding: 0 4px;
  scrollbar-width: thin;
}
.sn-scroll::-webkit-scrollbar {
  width: 6px;
}
.sn-scroll::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 99px;
}

/* 중첩 트리 */
.tree-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
.tree-row:hover {
  background: var(--glass-2);
  color: var(--ink);
}
.tree-row.on {
  background: var(--glass-2);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--glass-brd);
}
.tree-chev {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.16s, background 0.13s;
}
.tree-chev .ic {
  width: 13px;
  height: 13px;
}
.tree-chev:hover {
  background: var(--line);
}
.tree-chev.open {
  transform: rotate(90deg);
}
.tree-chev-spacer {
  width: 18px;
  flex-shrink: 0;
}
.tree-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tree-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-count {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tree-pin {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.13s, color 0.13s;
}
.tree-pin .ic {
  width: 14px;
  height: 14px;
}
.tree-row:hover .tree-pin {
  opacity: 1;
}
.tree-pin.on {
  opacity: 1;
  color: var(--amber);
}
.tree-pin:hover {
  color: var(--amber);
}
.tree-add {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 10px;
  transition: background 0.13s, color 0.13s;
}
.tree-add .ic {
  width: 15px;
  height: 15px;
}
.tree-add:hover {
  background: var(--glass-2);
  color: var(--ink);
}

.sn-foot {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sn-foot .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--violet));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  border: none;
}
.sn-foot .txt {
  min-width: 0;
  flex: 1;
}
.sn-foot .txt b {
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.sn-foot .txt span {
  font-size: 11.5px;
  color: var(--muted);
}

/* -------- 메인 영역 -------- */
.tmain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 9px;
  white-space: nowrap;
}
.crumbs button,
.crumbs .cur {
  white-space: nowrap;
}
.crumbs button {
  color: var(--muted);
  transition: color 0.13s;
}
.crumbs button:hover {
  color: var(--ink);
}
.crumbs .sep {
  width: 13px;
  height: 13px;
  color: var(--faint);
  display: inline-flex;
}
.crumbs .sep .ic {
  width: 13px;
  height: 13px;
}
.crumbs .cur {
  color: var(--ink-2);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.crumbs .c-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.thead-slim {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.ts-ic {
  display: inline-flex;
}
.ts-ic .ic {
  width: 16px;
  height: 16px;
}
.ts-meta {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.th-pin {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  transition: color 0.14s;
}
.th-pin .ic {
  width: 15px;
  height: 15px;
}
.th-pin:hover {
  color: var(--ink);
}
.th-pin.on {
  color: var(--amber);
}

/* 툴바 */
.ttoolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.view-seg {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.view-seg button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.14s, color 0.14s;
}
.view-seg button .ic {
  width: 15px;
  height: 15px;
}
.view-seg button:hover {
  color: var(--ink);
}
.view-seg button.on {
  background: var(--fill);
  color: var(--on-fill);
}

.t-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 230px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s;
}
.t-search:focus-within {
  box-shadow: 0 0 0 4px rgba(79, 114, 224, 0.12);
}
.t-search .ic {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.t-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-size: 13.5px;
  color: var(--ink);
}
.t-search input::placeholder {
  color: var(--faint);
}

.t-new {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  background: var(--fill);
  color: var(--on-fill);
  box-shadow: var(--shadow-sm);
  transition: filter 0.14s, transform 0.12s;
}
.t-new .ic {
  width: 16px;
  height: 16px;
}
.t-new:hover {
  transform: translateY(-1px);
}

/* ====================== 공통 작은 요소 ====================== */
.av {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--card);
}
.ktag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  flex: 0 1 auto;
  min-width: 0;
}
.ktag .pdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ktag span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.due {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.due .ic {
  width: 13px;
  height: 13px;
}
.due.soon {
  color: var(--coral);
  font-weight: 600;
}
.prio-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
}
.prio-flag .ic {
  width: 12px;
  height: 12px;
}
.prio-높음 {
  color: var(--coral);
}
.prio-보통 {
  color: var(--amber);
}
.prio-낮음 {
  color: var(--muted);
}
.bar {
  height: 5px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  flex: 1;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--ink-2);
}

/* ====================== 칸반 ====================== */
.kboard {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(264px, 1fr);
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.kboard::-webkit-scrollbar {
  height: 8px;
}
.kboard::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 99px;
}
.kcol {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glass-hi);
  padding: 12px 11px;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  transition: box-shadow 0.16s, border-color 0.16s;
}
.kcol.over {
  border-color: color-mix(in oklab, var(--blue) 50%, var(--glass-brd));
  box-shadow: var(--shadow), 0 0 0 2px rgba(79, 114, 224, 0.25);
}
.kcol-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 11px;
  white-space: nowrap;
}
.kcol-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kcol-label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.kcol-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.kcol-add {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.13s, color 0.13s;
}
.kcol-add .ic {
  width: 15px;
  height: 15px;
}
.kcol-add:hover {
  background: var(--glass-2);
  color: var(--ink);
}
.kcol-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 30px;
}
.kcol-empty {
  font-size: 12px;
  color: var(--faint);
  text-align: center;
  padding: 18px 8px;
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
}

.kcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 12px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.12s, box-shadow 0.14s;
}
.kcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.kcard.dragging {
  opacity: 0.5;
}
.kcard.done-card {
  opacity: 0.72;
}
.kcard.done-card .kcard-title {
  text-decoration: line-through;
  color: var(--muted);
}
.kcard-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kmore {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--faint);
  flex-shrink: 0;
}
.kmore .ic {
  width: 15px;
  height: 15px;
}
.kmore:hover {
  background: var(--glass-2);
  color: var(--ink);
}
.kcard-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.ksub {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ksub-num {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ksub-num .ic {
  width: 12px;
  height: 12px;
}
.kfoot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 1px;
}
.kfoot .av {
  margin-left: auto;
}
.kfoot .prio-flag {
  flex-shrink: 0;
}

.quickadd {
  margin-bottom: 9px;
}
.quickadd input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--blue) 45%, var(--glass-brd));
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 114, 224, 0.12);
}
.quickadd input::placeholder {
  color: var(--faint);
}

/* ====================== 리스트 ====================== */
.lgroups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lgroup-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
}
.lgroup-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lgroup-label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.lgroup-count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  border-radius: 999px;
  padding: 1px 8px;
}
.lempty {
  text-align: center;
  color: var(--faint);
  font-size: 13.5px;
  padding: 60px 0;
}
.ltable {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--glass-hi);
  overflow: hidden;
}
.lhead,
.lrow {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) 1.1fr 70px 70px 86px 40px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}
.lhead {
  height: 42px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}
.lhead > div.center,
.lrow > div.center {
  justify-self: center;
}
.lhead > div.right,
.lrow > div.right {
  justify-self: end;
}
.lrow {
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.13s;
}
.lrow:last-child {
  border-bottom: none;
}
.lrow:hover {
  background: var(--glass-2);
}
.lrow.done-row {
  opacity: 0.66;
}
.lrow.done-row .lt-title {
  text-decoration: line-through;
  color: var(--muted);
}
.lt {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.lt-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lt-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lcell {
  min-width: 0;
  display: flex;
  align-items: center;
}
.lprog {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.lprog .n {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* ====================== 상세 패널 ====================== */
.dp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(26, 22, 18, 0.34);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade 0.18s ease;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.dpanel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: 60vw;
  min-width: 600px;
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px -20px rgba(26, 22, 18, 0.4);
  display: flex;
  flex-direction: column;
  animation: slidein 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes slidein {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.dp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.dp-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.13s, color 0.13s;
}
.dp-close .ic {
  width: 17px;
  height: 17px;
}
.dp-close:hover {
  background: var(--card-2);
  color: var(--ink);
}
.dp-up {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.13s, color 0.13s;
}
.dp-up .ic {
  width: 17px;
  height: 17px;
}
.dp-up:hover {
  background: var(--card-2);
  color: var(--ink);
}
.dp-crumbs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}
.dp-crumbs .cz {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  transition: color 0.13s;
}
.dp-crumbs button.cz:hover {
  color: var(--ink);
}
.dp-crumbs .cz.cur {
  color: var(--ink);
  font-weight: 600;
  flex-shrink: 0;
}
.dp-crumbs .cz-sep {
  width: 13px;
  height: 13px;
  color: var(--faint);
  flex-shrink: 0;
  display: inline-flex;
}
.dp-crumbs .cz-sep .ic {
  width: 13px;
  height: 13px;
}

.dp-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.dp-title-row .dp-title {
  margin: 0;
}
.dp-check {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  border: 2px solid var(--line-2);
  display: grid;
  place-items: center;
  color: transparent;
  flex-shrink: 0;
  margin-top: 3px;
  cursor: pointer;
  transition: all 0.13s;
}
.dp-check .ic {
  width: 15px;
  height: 15px;
}
.dp-check.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.dp-title.done {
  color: var(--muted);
  text-decoration: line-through;
}

.subrow {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink);
  transition: background 0.12s;
}
.subrow:hover {
  background: var(--card-2);
}
.subrow:hover .sub-drill {
  opacity: 1;
}
.subrow.done .sub-title {
  color: var(--faint);
  text-decoration: line-through;
}
.sub-twist {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.16s, background 0.12s, color 0.12s;
}
.sub-twist .ic {
  width: 14px;
  height: 14px;
}
.sub-twist:hover {
  background: var(--line);
  color: var(--ink);
}
.sub-twist.open {
  transform: rotate(90deg);
}
.sub-twist-sp {
  width: 22px;
  flex-shrink: 0;
}
.sub-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.sub-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sub-chip .ic {
  width: 12px;
  height: 12px;
}
.sub-chip.est {
  color: var(--violet);
}
.sub-drill {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--faint);
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
}
.sub-drill .ic {
  width: 15px;
  height: 15px;
}
.sub-drill:hover {
  background: var(--line);
  color: var(--ink);
  opacity: 1;
}
.subkids {
  display: flex;
  flex-direction: column;
}
.subempty {
  font-size: 12.5px;
  color: var(--faint);
  padding: 8px 10px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}
.subempty .ic {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.dp-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}
.dp-main {
  overflow-y: auto;
  padding: 24px 28px 32px;
  min-width: 0;
}
.dp-rail {
  overflow-y: auto;
  padding: 24px 22px 28px;
  border-left: 1px solid var(--line);
  background: var(--card-2);
}
.dp-title {
  font-family: var(--font-disp);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin: 0 0 20px;
}
.dp-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.dp-mi .ml {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.dp-mi .ml .ic {
  width: 14px;
  height: 14px;
}
.dp-mv {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--card-2);
  border: 1px solid var(--line);
  cursor: pointer;
}
.status-pill .pdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-pill .ic {
  width: 13px;
  height: 13px;
  color: var(--muted);
}
.status-wrap {
  position: relative;
}
.status-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 5;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 5px;
  min-width: 150px;
}
.status-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.status-menu button .pdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-menu button:hover {
  background: var(--card-2);
  color: var(--ink);
}

.dp-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  margin: 22px 0 11px;
}
.dp-label .ic {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.dp-label .cnt {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.subs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sub-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font-size: 13px;
  color: var(--muted);
  border-radius: 9px;
  width: 100%;
  transition: background 0.12s, color 0.12s;
}
.sub-add .ic {
  width: 14px;
  height: 14px;
}
.sub-add:hover {
  background: var(--card-2);
  color: var(--ink);
}
.sub-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid color-mix(in oklab, var(--blue) 40%, var(--line));
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 114, 224, 0.1);
}

/* 리치 노트 */
.rich {
  border: 1px solid var(--line-2);
  border-radius: 13px;
  overflow: hidden;
  background: var(--card);
}
.rich-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
}
.rt-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: background 0.12s, color 0.12s;
}
.rt-btn .ic {
  width: 16px;
  height: 16px;
}
.rt-txt {
  font-size: 12.5px;
  font-weight: 700;
}
.rt-btn:hover {
  background: var(--glass-2);
  color: var(--ink);
}
.rich-edit {
  padding: 14px 16px;
  min-height: 140px;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  word-break: break-word;
}
.rich-edit:empty::before {
  content: attr(data-ph);
  color: var(--faint);
}
.rich-edit h3 {
  font-family: var(--font-disp);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 12px 0 6px;
}
.rich-edit h3:first-child {
  margin-top: 0;
}
.rich-edit p {
  margin: 0 0 8px;
}
.rich-edit ul,
.rich-edit ol {
  margin: 6px 0 10px;
  padding-left: 22px;
}
.rich-edit li {
  margin: 3px 0;
}
.rich-edit blockquote {
  margin: 8px 0;
  padding: 4px 14px;
  border-left: 3px solid var(--coral);
  color: var(--ink-2);
  font-style: italic;
}
.rich-edit a {
  color: var(--blue);
}

/* 코멘트 */
.cmt {
  display: flex;
  flex-direction: column;
}
.cmt-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 6px;
}
.cmt-empty {
  font-size: 12.5px;
  color: var(--faint);
  padding: 8px 2px;
  line-height: 1.5;
}
.cmt-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.cmt-row .av {
  width: 26px;
  height: 26px;
  border: none;
  font-size: 11px;
  margin-top: 1px;
}
.cmt-bub {
  min-width: 0;
  flex: 1;
}
.cmt-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 3px;
}
.cmt-top b {
  font-size: 12.5px;
  font-weight: 700;
}
.cmt-top .t {
  font-size: 11px;
  color: var(--faint);
}
.cmt-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  word-break: break-word;
}
.cmt-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cmt-compose .av {
  width: 26px;
  height: 26px;
  border: none;
  font-size: 11px;
  flex-shrink: 0;
}
.cmt-compose input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.cmt-compose input::placeholder {
  color: var(--faint);
}
.cmt-compose input:focus {
  border-color: color-mix(in oklab, var(--blue) 50%, var(--line-2));
  box-shadow: 0 0 0 3px rgba(79, 114, 224, 0.12);
}
.cmt-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--on-fill);
  background: var(--fill);
  transition: filter 0.13s, opacity 0.13s;
}
.cmt-send .ic {
  width: 15px;
  height: 15px;
}
.cmt-send:disabled {
  opacity: 0.4;
  cursor: default;
}
.cmt-send:not(:disabled):hover {
  filter: brightness(1.12);
}

.dp-foot {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.dp-foot .btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  transition: filter 0.13s, background 0.13s;
}
.dp-foot .btn .ic {
  width: 16px;
  height: 16px;
}
.dp-foot .danger {
  color: var(--coral);
  background: color-mix(in oklab, var(--coral) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--coral) 28%, transparent);
  flex: 0 0 auto;
  padding: 12px 16px;
}
.dp-foot .danger:hover {
  background: color-mix(in oklab, var(--coral) 18%, transparent);
}
.dp-foot .primary {
  background: var(--fill);
  color: var(--on-fill);
}
.dp-foot .ghost {
  flex: 0 0 auto;
  padding: 12px 16px;
  color: var(--ink-2);
  background: var(--card-2);
  border: 1px solid var(--line);
}
.dp-foot .ghost:hover {
  background: var(--card-3);
  color: var(--ink);
}

/* 위임 칩 */
.deleg-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--violet);
  background: color-mix(in oklab, var(--violet) 13%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
}
.deleg-chip .ic {
  width: 11px;
  height: 11px;
}
.kfoot .deleg-chip + .av {
  margin-left: 4px;
}

/* Auto-Scaffolding */
.scaffold-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 13px;
  background: linear-gradient(
      100deg,
      color-mix(in oklab, var(--violet) 11%, transparent),
      transparent 70%
    ),
    var(--card-2);
  border: 1px solid color-mix(in oklab, var(--violet) 26%, var(--line));
  transition: border-color 0.14s, transform 0.12s;
}
.scaffold-trigger:hover {
  border-color: color-mix(in oklab, var(--violet) 45%, var(--line));
  transform: translateY(-1px);
}
.scaffold-trigger .st-ic {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--violet);
  color: #fff;
}
.scaffold-trigger .st-ic .ic {
  width: 16px;
  height: 16px;
}
.scaffold-trigger .st-tx {
  flex: 1;
  min-width: 0;
}
.scaffold-trigger .st-tx b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.scaffold-trigger .st-tx span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}
.scaffold-trigger > .ic {
  width: 16px;
  height: 16px;
  color: var(--violet);
  flex-shrink: 0;
}
.scaffold-panel {
  margin-bottom: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--violet) 32%, var(--line));
  background: var(--card);
  box-shadow: var(--shadow-sm);
  animation: rise 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(
      100deg,
      color-mix(in oklab, var(--violet) 13%, transparent),
      transparent 75%
    ),
    var(--card-2);
  border-bottom: 1px solid var(--line);
}
.sp-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--violet);
  color: #fff;
}
.sp-ic .ic {
  width: 16px;
  height: 16px;
}
.sp-h {
  flex: 1;
  min-width: 0;
}
.sp-h b {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sp-h span {
  font-size: 11.5px;
  color: var(--muted);
}
.sp-x {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.13s, color 0.13s;
}
.sp-x .ic {
  width: 15px;
  height: 15px;
}
.sp-x:hover {
  background: var(--card-3);
  color: var(--ink);
}
.sp-items {
  padding: 6px 8px;
}
.sp-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 8px;
  border-radius: 9px;
}
.sp-item + .sp-item {
  border-top: 1px solid var(--line);
}
.sp-num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--violet);
  background: color-mix(in oklab, var(--violet) 13%, transparent);
}
.sp-title {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sp-est {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.sp-est .ic {
  width: 13px;
  height: 13px;
}
.sp-foot {
  display: flex;
  gap: 9px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--card-2);
}
.sp-ghost {
  padding: 10px 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  transition: background 0.13s;
}
.sp-ghost:hover {
  background: var(--card-3);
}
.sp-apply {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  background: var(--violet);
  color: #fff;
  transition: filter 0.13s;
}
.sp-apply .ic {
  width: 15px;
  height: 15px;
}
.sp-apply:hover {
  filter: brightness(1.08);
}

/* 위임 추천 / 위임됨 */
.delegate-sug {
  margin-top: 22px;
  padding: 14px;
  border-radius: 13px;
  background: linear-gradient(
      100deg,
      color-mix(in oklab, var(--violet) 12%, transparent),
      transparent 75%
    ),
    var(--card);
  border: 1px solid color-mix(in oklab, var(--violet) 30%, var(--line));
}
.ds-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--violet);
  margin-bottom: 8px;
}
.ds-head .ic {
  width: 14px;
  height: 14px;
}
.delegate-sug p {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 12px;
}
.delegate-sug p b {
  color: var(--ink);
  font-weight: 700;
}
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--violet);
  color: #fff;
  transition: filter 0.13s;
}
.ds-btn .ic {
  width: 15px;
  height: 15px;
}
.ds-btn:hover {
  filter: brightness(1.08);
}
.delegated-note {
  margin-top: 22px;
  padding: 13px 14px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: linear-gradient(
      100deg,
      color-mix(in oklab, var(--violet) 11%, transparent),
      transparent 75%
    ),
    var(--card);
  border: 1px solid color-mix(in oklab, var(--violet) 28%, var(--line));
}
.delegated-note .av {
  width: 30px;
  height: 30px;
  font-size: 12px;
  border: none;
}
.dn-tx {
  min-width: 0;
}
.dn-tx b {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dn-tx span {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.entered .twork > * {
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.entered .tmain {
  animation-delay: 0.05s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 폴더(업무/개인) & 인라인 생성 */
.tree-row.folder {
  background: var(--glass-2);
  color: var(--ink);
  border: 1px solid var(--glass-brd);
  margin-top: 6px;
  border-radius: 11px;
}
.tree-row.folder:first-child {
  margin-top: 0;
}
.tree-row.folder .tree-name {
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tree-row.folder .tree-fold,
.tree-row.folder .tree-chev {
  color: var(--muted);
}
.tree-row.folder:hover {
  background: var(--card-2);
  color: var(--ink);
}
.tree-row.folder .tree-badge {
  background: var(--card);
  color: var(--muted);
}
.tree-row.folder.on {
  background: var(--fill);
  color: var(--on-fill);
  border-color: transparent;
  box-shadow: none;
}
.tree-row.folder.on .tree-fold,
.tree-row.folder.on .tree-chev {
  color: var(--on-fill);
}
.tree-row.folder.on .tree-badge {
  background: rgba(244, 239, 230, 0.18);
  color: var(--on-fill);
  border-color: transparent;
}
.tree-fold {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.tree-row.folder.on .tree-fold {
  color: var(--on-fill);
}
.tree-fold .ic {
  width: 14px;
  height: 14px;
}
.tree-addrow {
  padding: 3px 10px 3px 0;
}
.tree-addrow input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 7px 11px;
  outline: none;
}
.tree-addrow input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--blue) 14%, transparent);
}
.tree-addrow input::placeholder {
  color: var(--faint);
}

/* 즐겨찾기 빈 상태 */
.sn-empty {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  padding: 12px 10px;
}
.sn-empty .ic {
  width: 14px;
  height: 14px;
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 1px;
}

/* 폴더 행 배지 */
.tree-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.tree-row.on .tree-badge {
  background: rgba(244, 239, 230, 0.18);
  color: var(--on-fill);
  border-color: transparent;
}

/* ====================== 리스크 레이더 ====================== */
.rradar {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 14px;
  padding: 13px 16px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm), var(--glass-hi);
}
.rr-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}
.rr-ic {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--coral);
  flex-shrink: 0;
}
.rr-ic .ic {
  width: 18px;
  height: 18px;
}
.rr-ht {
  line-height: 1.25;
}
.rr-ht b {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rr-ht span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.rr-items {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.rr-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: color-mix(in oklab, var(--rrc) 7%, var(--card));
  border: 1px solid color-mix(in oklab, var(--rrc) 22%, transparent);
}
.rr-item.t-coral {
  --rrc: var(--coral);
}
.rr-item.t-amber {
  --rrc: var(--amber);
}
.rr-item.t-violet {
  --rrc: var(--violet);
}
.rr-item-ic {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in oklab, var(--rrc) 16%, transparent);
  color: var(--rrc);
  margin-top: 1px;
}
.rr-item-ic .ic {
  width: 13px;
  height: 13px;
}
.rr-body {
  flex: 1;
  min-width: 0;
}
.rr-kind {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rrc);
  margin-bottom: 2px;
}
.rr-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
}
.rr-text b {
  color: var(--ink);
}
.rr-cta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  align-self: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px 5px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--rrc) 35%, transparent);
  color: color-mix(in oklab, var(--rrc) 75%, var(--ink));
  white-space: nowrap;
  transition: background 0.13s;
}
.rr-cta .ic {
  width: 12px;
  height: 12px;
}
.rr-cta:hover {
  background: color-mix(in oklab, var(--rrc) 13%, transparent);
}

/* 로딩 스켈레톤 */
.tsk-skel {
  border-radius: 14px;
  background: linear-gradient(100deg, var(--glass-2), var(--card-2), var(--glass-2));
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* 에러 배너 */
.tsk-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--coral) 8%, var(--card));
  border: 1px solid color-mix(in oklab, var(--coral) 26%, transparent);
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 14px;
}
.tsk-error button {
  margin-left: auto;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--fill);
  color: var(--on-fill);
}

/* ====================== 반응형 ====================== */
@media (max-width: 1080px) {
  .subnav {
    display: none;
  }
  .rradar {
    flex-direction: column;
    gap: 10px;
  }
  .rr-head {
    border-right: none;
    padding-right: 0;
  }
}
@media (max-width: 860px) {
  .dpanel {
    width: 100vw;
    min-width: 0;
  }
  .dp-grid {
    display: block;
    overflow-y: auto;
  }
  .dp-main,
  .dp-rail {
    overflow: visible;
  }
  .dp-rail {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 760px) {
  .lhead > .hide-sm,
  .lrow > .hide-sm {
    display: none;
  }
  .lhead,
  .lrow {
    grid-template-columns: minmax(0, 2.2fr) 70px 60px 36px;
  }
  /* 툴바: 좁은 화면에서 줄바꿈 + 검색창 가변폭 (가로 스크롤 방지) */
  .ttoolbar {
    flex-wrap: wrap;
  }
  .t-search {
    width: auto;
    flex: 1 1 140px;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entered .twork > *,
  .dpanel,
  .dp-backdrop,
  .scaffold-panel,
  .tsk-skel {
    animation: none !important;
  }
}
