/* ============================================================================
   视图 3 · 筹备计划 + 视图 4 · 计划日历（已停用，保留样式）+ 视图 5 · 卡点看板
   约定：只消费 css/app.css 的设计令牌与通用类（.card/.btn/.seg/.chip/.tbl…），
        不修改 app.css；竖屏时甘特 / 日历横向滚动，图例折行。
   ========================================================================== */

/* ------------------------------------------------------------------ 通用小节 */
.plan-sec { margin-top: 16px; }
.plan-page .page-head,
.cal-page .page-head { margin-bottom: 14px; }

.plan-intro-card .card-b { padding: 13px 16px; }
.plan-intro p {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
  margin: 0 0 8px;
}
.plan-intro p:last-child { margin-bottom: 0; }
.plan-intro-key {
  border-left: 3px solid var(--warn-line);
  background: var(--warn-soft);
  color: var(--ink-2);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.8px;
  line-height: 1.7;
}

/* ------------------------------------------------------------------ 关键横幅（A2） */
.callout {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.callout.warn {
  background: linear-gradient(180deg, var(--warn-soft), var(--surface) 62%);
  border-color: var(--warn-line);
}
.callout-h {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
}
.callout-ic { color: var(--st-doing); font-size: 16px; line-height: 1; }
.callout-b {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-2);
}
.callout-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.a2-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--warn-line);
  background: var(--surface);
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  transition: 0.15s;
}
.a2-chip:hover { border-color: var(--st-doing); background: var(--warn-soft); color: var(--ink); }
.a2-chip .mono { font-weight: 700; }
.a2-chip-d { color: var(--muted); font-family: var(--mono); font-size: 10.5px; }

/* ------------------------------------------------------------------ 阶段甘特 */
.plan-gantt-card .card-h,
.plan-kanban-card .card-h { flex-wrap: wrap; gap: 6px 8px; }
.plan-gantt-card .card-b.tight { padding: 0; }
.pg-scroll { overflow-x: auto; scrollbar-width: thin; }
.pg-scroll::-webkit-scrollbar { height: 8px; }
.pg-inner { min-width: 820px; padding: 12px 14px 16px; }
.pg-axis {
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.pg-axis-label {
  width: 168px;
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.pg-axis-track { position: relative; flex: 1; height: 20px; }
.pg-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line-soft);
  padding-left: 5px;
}
.pg-tick.last { border-left-color: transparent; }
.pg-tick-l {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
}
.pg-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 0;
}
.pg-row:last-child { border-bottom: 0; }
.pg-label { width: 168px; flex: none; padding-right: 12px; min-width: 0; }
.pg-label-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pg-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-label-sub { margin-top: 2px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.pg-prog {
  height: 4px;
  border-radius: 99px;
  background: var(--line-soft);
  margin-top: 5px;
  overflow: hidden;
}
.pg-prog i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.3s; }
.pg-track { position: relative; flex: 1; min-height: 38px; }
.pg-grid {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed var(--line-soft);
  pointer-events: none;
}
.pg-bar {
  position: absolute;
  top: 8px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: filter 0.15s;
}
.pg-bar:hover { filter: brightness(1.08); }
.pg-bar:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.pg-bar-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.pg-bar.st-todo { background: var(--st-todo); }
.pg-bar.st-doing { background: var(--st-doing); }
.pg-bar.st-done { background: var(--st-done); }
.pg-bar.st-block { background: var(--st-block); }
.pg-bar.key { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45), 0 0 0 2px var(--accent-line); }
.pg-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed var(--st-block);
  opacity: 0.75;
  pointer-events: none;
}
.pg-flat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.pg-flat:last-child { border-bottom: 0; }
.pg-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}
.pg-legend .lg,
.cal-legend .lg { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
  flex: none;
}
.sw.st-todo { background: var(--st-todo); }
.sw.st-doing { background: var(--st-doing); }
.sw.st-done { background: var(--st-done); }
.sw.st-block { background: var(--st-block); }
.sw.a2 { background: transparent; border: 2px solid var(--st-doing); }
.sw.cp { background: var(--ink); }
.sw.today { background: transparent; border-left: 2px dashed var(--st-block); width: 4px; border-radius: 0; height: 12px; }

/* ------------------------------------------------------------------ 行动项看板 */
.kan-pad { padding: 12px; }
.kan {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.kan::-webkit-scrollbar { height: 8px; }
.kan-col {
  flex: 0 0 258px;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}
.kan-h { display: flex; align-items: center; gap: 6px; padding: 2px 2px 8px; min-width: 0; }
.kan-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kan-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}
.kan-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  transition: 0.15s;
  outline: none;
}
.kan-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.kan-card:focus-visible { box-shadow: 0 0 0 2px var(--accent-line); }
.kan-card.a2 { border-left-color: var(--st-doing); }
.kan-top { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kan-title { font-size: 12.8px; font-weight: 600; line-height: 1.45; margin-top: 5px; color: var(--ink); word-break: break-word; }
.kan-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.kan-owner { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.kan-date { font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.kan-deliv {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kan-a2-tag { font-size: 10.5px; font-weight: 600; color: var(--st-doing); margin-top: 4px; }
.kan-empty { padding: 14px 6px; text-align: center; font-size: 12px; color: var(--faint); }
.plan-hint { white-space: nowrap; }

/* 行动项管理面板（弹出式表格） */
.plan-admin-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-admin-bar select {
  flex: none; width: auto; min-width: 132px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
  padding: 7px 10px; font-size: 13px; outline: none; transition: 0.15s;
}
.plan-admin-bar select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-admin-bar .input { flex: 1 1 220px; min-width: 180px; width: auto; }
.plan-admin-wrap {
  max-height: min(58vh, 540px); overflow: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.plan-admin-tbl thead th { position: sticky; top: 0; z-index: 1; }
.plan-admin-tbl .plan-admin-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-admin-tbl .plan-admin-owner { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-admin-tbl .plan-admin-deliv {
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 12px;
}
.plan-admin-tbl .plan-admin-date { color: var(--muted); font-size: 12px; }
.plan-admin-tbl tbody tr:hover td { background: var(--surface-2); }

/* 看板维护：新增按钮 + 卡片「⋯」菜单 */
.kan-add {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: 0.15s;
}
.kan-add:hover { border-color: var(--accent-line); color: var(--ink); background: var(--surface); }
.kan-menu-btn {
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  font-size: 13px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}
.kan-menu-btn:hover { border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.kan-menu-pop {
  position: fixed;
  z-index: 130;
  min-width: 188px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.kan-menu-t {
  padding: 4px 8px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kan-menu-i {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.kan-menu-i:hover:not(:disabled) { background: var(--surface-2); }
.kan-menu-i:disabled { color: var(--faint); cursor: not-allowed; }
.kan-menu-i.danger { color: var(--danger); }
.kan-menu-sep { height: 1px; margin: 4px 0; background: var(--line); }

/* 从材料拆解台面包屑按阶段定位过来的高亮列 */
.kan-col.focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.plan-focus-chip {
  cursor: pointer;
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
}
.plan-focus-chip:hover { background: var(--accent); color: var(--on-accent); }

/* ------------------------------------------------------------------ 自查核对表 */
.plan-check-card .card-h { flex-wrap: wrap; gap: 6px 8px; }
.chk-progress { display: inline-flex; align-items: center; gap: 8px; }
.chk-bar {
  display: inline-block;
  width: 104px;
  height: 6px;
  border-radius: 99px;
  background: var(--line-soft);
  overflow: hidden;
}
.chk-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.3s; }
.chk-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}
.chk-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  align-self: start;
}
.chk-gh {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}
.chk-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.12s;
}
.chk-item:last-child { border-bottom: 0; }
.chk-item:hover { background: var(--hover-tint); }
.chk-item input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}
.chk-item.on .chk-t { color: var(--muted); text-decoration: line-through; }

/* ------------------------------------------------------------------ 静态区块 */
.plan-static-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.plan-static-t { font-size: 15px; font-weight: 700; }
.acc {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.acc-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  user-select: none;
}
.acc-h::-webkit-details-marker { display: none; }
.acc-h:hover { background: var(--surface-2); }
.acc-ic { color: var(--muted); font-size: 11px; transition: transform 0.18s; }
.acc[open] .acc-ic { transform: rotate(90deg); }
.acc-b { padding: 0 16px 16px; }

.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  scrollbar-width: thin;
}
.tbl-wrap .tbl { min-width: 520px; }
.tbl-wrap .tbl th { background: var(--surface-2); }
.ledger-tbl { min-width: 640px; }
.risk-tbl { min-width: 620px; }

.bounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 10px;
}
.bound {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 12px 13px;
}
.bound-h { font-size: 12.5px; font-weight: 700; margin-bottom: 7px; color: var(--ink); }
.bound-list {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.div-matrix { display: flex; flex-direction: column; gap: 14px; }
.div-block-h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}
.role-tag {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

/* ---- 主责选择器（参考区块：可任选现有成员，默认「待选择」）----
   这组类名最早写给原生 <select>（height 锁高 30px + 边框外观）。控件换成多选
   .ms 后，面板是就地展开、靠占位撑开布局的：容器一旦锁死高度，展开的勾选
   面板就不再占布局空间，直接浮盖住下方的卡片 / 表格行 —— 遮挡事故的根因。
   所以这里只保留宽度收窄与字号，高度交回内容流；按钮外观统一在 .ms-btn。 */
.ref-owner {
  width: 100%;
  max-width: 160px;
  font-size: 12.5px;
  cursor: pointer;
}

.bound-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.bound-owner-label {
  flex: none;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.dec-proc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.dec-proc-title {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.dec-proc-label {
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 6px;
}
.dec-proc .ref-owner { max-width: 132px; }
/* 决策卡按钮只有 132px 宽且 dec-proc 是 flex wrap：面板若保底 200px 会把按钮挤换行。
   人名单列 132px 放得下，这里让面板回到容器宽，布局保持稳定。 */
.dec-proc .ref-owner .ms-panel { min-width: 0; }

.dec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 10px;
}
.dec-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 12px 13px;
}
.dec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.dec-t { font-size: 12.8px; font-weight: 700; color: var(--ink); }
.dec-body { display: flex; flex-direction: column; gap: 3px; }
.dec-line { font-size: 12.2px; line-height: 1.6; color: var(--ink-2); word-break: break-word; }

/* ============================================================================
   视图 4 · 计划日历
   ========================================================================== */
.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cal-tools { display: inline-flex; align-items: center; gap: 7px; }
.cal-meta { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-seg button { padding: 4px 9px; font-size: 12px; }
.cal-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.cal-hint { margin-bottom: 10px; line-height: 1.6; }

.cal-wrap { --labw: 150px; }
.cal-scroll {
  position: relative;
  overflow: auto;
  max-height: min(70vh, 760px);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.cal-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.cal-inner { position: relative; display: inline-block; min-width: 100%; }

.cal-hrow {
  display: flex;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 6;
  height: 34px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.cal-hlabel {
  position: sticky;
  left: 0;
  z-index: 7;
  width: var(--labw);
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.cal-ticks { position: relative; height: 100%; flex: none; }
.cal-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line);
}
.cal-tick-l {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}
.cal-week {
  position: absolute;
  top: 58%;
  bottom: 0;
  width: 0;
  border-left: 1px solid var(--line-soft);
}
.cal-today-h {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px dashed var(--st-block);
  z-index: 2;
}

.cal-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-soft); }
.cal-rowlabel {
  position: sticky;
  left: 0;
  z-index: 4;
  width: var(--labw);
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 7px 10px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.cal-rl-top { display: flex; align-items: center; gap: 5px; min-width: 0; }
.cal-rl-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-rl-sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-lane { position: relative; flex: none; }
.cal-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px solid var(--line-soft);
  z-index: 0;
  pointer-events: none;
}
.cal-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed var(--st-block);
  opacity: 0.75;
  z-index: 3;
  pointer-events: none;
}
.cal-band-row { background: var(--surface-2); }
.cal-band-row .cal-rowlabel { background: var(--surface-2); font-size: 11px; color: var(--muted); }
.cal-band-lane { height: 44px; }
.cal-band-title {
  position: absolute;
  left: 6px;
  top: 2px;
  font-size: 10px;
  color: var(--muted);
  z-index: 1;
}

.cal-bar {
  position: absolute;
  height: 17px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 4px;
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: grab;
  z-index: 2;
  outline: none;
  /* 触屏：任务条自身接管手势，保证横向拖动可被 pointer 事件接收；
     页面纵向滚动/日历横向滚动可在泳道空白处进行 */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.cal-bar:hover { filter: brightness(1.1); z-index: 3; }
.cal-bar:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.cal-bar.dragging { cursor: grabbing; z-index: 5; opacity: 0.92; }
.cal-bar-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.cal-bar.st-todo { background: var(--st-todo); }
.cal-bar.st-doing { background: var(--st-doing); }
.cal-bar.st-done { background: var(--st-done); }
.cal-bar.st-block { background: var(--st-block); }
.cal-bar.phase { background: var(--accent); opacity: 0.5; z-index: 1; }
.cal-bar.phase.key { opacity: 0.72; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }
.cal-bar.cp { box-shadow: 0 0 0 2px var(--ink); z-index: 2; }
.cal-bar.a2 { box-shadow: 0 0 0 2px var(--st-doing); }
.cal-bar.cp.a2 { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px rgba(180, 83, 9, 0.4); }

.cal-tip {
  position: fixed;
  z-index: 300;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.cal-dlg { gap: 9px; }
.cal-dlg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-dlg-title { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.cal-dlg .form-grid { margin-top: 2px; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1080px) {
  .pg-axis-label,
  .pg-label { width: 140px; }
}
@media (max-width: 860px) {
  .plan-intro p { font-size: 12.8px; }
  .pg-inner { min-width: 700px; }
  .pg-axis-label,
  .pg-label { width: 118px; }
  .pg-name { font-size: 11.5px; }
  .pg-bar-t { font-size: 10px; }
  .plan-hint { display: none; }
  .kan { display: block; overflow: visible; }
  .kan-col { width: 100%; margin-bottom: 10px; }
  .kan-body { max-height: none; overflow: visible; }
  .chk-body { grid-template-columns: 1fr; padding: 12px; }
  .cal-wrap { --labw: 106px; }
  .cal-scroll { max-height: 64vh; }
  .cal-rowlabel { padding: 6px 7px; }
  .cal-rl-name { font-size: 11px; }
  .cal-rl-sub { font-size: 9.5px; }
  .cal-hlabel { padding: 0 7px; font-size: 10.5px; }
  .cal-legend { gap: 8px; }
  .cal-toolbar { gap: 7px; }
  .callout { padding: 12px 13px; }
}
@media (max-width: 520px) {
  .pg-inner { min-width: 620px; }
  .pg-axis-label,
  .pg-label { width: 98px; }
  .cal-wrap { --labw: 84px; }
  .cal-seg button { padding: 4px 7px; font-size: 11.5px; }
  .cal-legend { font-size: 10.5px; gap: 7px; }
  .cal-meta .chip { font-size: 10.5px; }
  .chk-progress .chk-bar { width: 70px; }
  .plan-static-t { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-prog i,
  .chk-bar i,
  .acc-ic { transition: none; }
}

/* ------------------------------------------------------------------ 视图 5 · 卡点看板 */
.blk-page .page-head { margin-bottom: 14px; }
.blk-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.blk-filters .field { min-width: 176px; }
.blk-filters .field select { width: 100%; }
.blk-scroll { overflow-x: auto; }
.blk-tbl { min-width: 780px; }
.blk-row { cursor: pointer; }
.blk-item-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.blk-item-title { font-weight: 600; color: var(--ink); }
.blk-item-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.blk-deps { display: flex; flex-direction: column; gap: 4px; }
.blk-dep { display: flex; align-items: center; gap: 6px; }
.blk-dep-title {
  font-size: 12.5px; color: var(--ink-2);
  max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.blk-dep.dead .blk-dep-title { color: var(--danger); }
.blk-due { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.blk-due.overdue { color: var(--danger); font-weight: 700; }
.blk-count { display: flex; align-items: baseline; gap: 4px; }
.blk-count strong { font-size: 17px; font-weight: 700; }
.blk-dependents { display: flex; flex-wrap: wrap; gap: 5px; }
.blk-dep-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 11.5px; color: var(--ink-2); cursor: pointer;
}
.blk-dep-chip:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.blk-dep-chip.done { opacity: 0.55; }
.blk-foot { padding: 10px 16px 14px; font-size: 11.5px; color: var(--faint); }

@media (max-width: 860px) {
  .blk-filters { gap: 8px; }
  .blk-filters .field { min-width: 128px; flex: 1 1 128px; }
  .blk-dep-title { max-width: 180px; }
  .blk-tbl { min-width: 620px; }
}
