.pc-board { min-width: 0; display: grid; gap: 8px; }
.pc-view-switch { display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.pc-view-switch button { min-width: 64px; height: 28px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.pc-view-switch button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }
.pc-view-switch button:focus-visible { outline: 2px solid var(--ink-2); outline-offset: 2px; }
.pc-gantt { min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pc-gantt-head, .pc-gantt-row { display: grid; grid-template-columns: 128px minmax(0,1fr); }
.pc-gantt-head { min-height: 34px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; }
.pc-gantt-head > span { align-self: center; padding-left: 9px; }
.pc-gantt-track { position: relative; display: grid; grid-template-columns: repeat(var(--pc-days), minmax(0,1fr)); min-width: 0; border-left: 1px solid var(--line); }
.pc-gantt-tick { display: grid; place-items: center; font-size: 10px; }
.pc-gantt-tick:last-child { justify-items: end; padding-right: 2px; }
.pc-gantt-tick.weekend, .pc-gantt-gridline.weekend { background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
.pc-gantt-row { min-height: 52px; border-top: 1px solid var(--line); }
.pc-gantt-name { display: grid; align-content: center; gap: 4px; min-width: 0; padding: 8px 9px; border: 0; text-align: left; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.pc-gantt-name span, .pc-gantt-name small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pc-gantt-name small { font-size: 10px; color: var(--ink-2); }
.pc-gantt-name:hover { background: var(--surface-2); }
.pc-gantt-gridline { border-right: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.pc-gantt-bar.pc-event { position: absolute; top: 14px; height: 24px; min-width: 0; padding: 0; justify-content: center; border-left-width: 0; border-radius: 3px; overflow: hidden; z-index: 2; }
.pc-gantt-bar.fuzzy { border: 1px dashed currentColor; background: var(--surface); }
.pc-gantt-bar span { white-space: nowrap; font-size: 10px; }
.pc-gantt-bar:not(.fuzzy) { outline: 1px solid currentColor; outline-offset: -1px; }
.pc-gantt-today { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--crit); z-index: 3; pointer-events: none; opacity: .8; }
@media (max-width: 480px) { .pc-gantt-head, .pc-gantt-row { grid-template-columns: 96px minmax(0,1fr); } .pc-gantt-tick { font-size: 9px; } }
.pc-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-toolbar input { width: 190px; min-width: 0; max-width: calc(100% - 108px); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; padding: 6px 8px; }
.pc-nav { display: flex; gap: 4px; flex-shrink: 0; }
.pc-nav [aria-label] { width: 30px; height: 30px; padding: 0; font-size: 22px; line-height: 1; }
.pc-grid { min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pc-weekdays, .pc-week { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.pc-weekdays { background: var(--surface-2); text-align: center; color: var(--ink-2); font-size: 11px; padding: 5px 0; }
.pc-day { min-width: 0; height: 82px; padding: 3px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); overflow: hidden; }
.pc-day:last-child { border-right: 0; }
.pc-day.other { background: var(--surface-2); color: var(--ink-3); }
.pc-day.selected { box-shadow: inset 0 0 0 2px var(--ink-2); }
.pc-date { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; padding: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.pc-day.today .pc-date { background: var(--ink); color: var(--surface); font-weight: 700; }
.pc-date:hover { outline: 1px solid var(--ink-3); }
.pc-day-events { display: grid; gap: 2px; margin-top: 2px; }
.pc-day-events .pc-event { height: 18px; padding: 2px 3px; line-height: 14px; }
.pc-day-events .pc-more { height: 12px; line-height: 12px; }
.pc-event { display: flex; align-items: center; gap: 4px; min-width: 0; width: 100%; padding: 4px 5px; border: 0; border-left: 2px solid #557b98; border-radius: 3px; background: #edf4f8; color: #28475d; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.pc-event.milestone { background: #fff1eb; color: #974a27; border-left-color: #e58155; }
.pc-event.st-doing { background: #e9f5ef; color: #246a4a; border-left-color: #3e916a; }
.pc-event.st-blocked { background: #ffeded; color: #a53030; border-left-color: #d65151; }
.pc-event.st-done { background: var(--surface-2); color: var(--ink-3); border-left-color: var(--line-strong); }
.pc-event-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.pc-event:hover { filter: brightness(.96); }
.pc-event small { flex-shrink: 0; font-size: 11px; }
.pc-more { padding: 0; border: 0; background: transparent; text-align: left; color: var(--ink-2); font: inherit; font-size: 10px; cursor: pointer; }
.pc-flexible, .pc-agenda { display: grid; gap: 6px; }
.pc-flexible .pc-event, .pc-agenda .pc-event { font-size: 12px; padding: 7px 8px; }
.pc-label { font-size: 11px; color: var(--ink-2); }
.pc-footer { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--ink-2); }
@media (max-width: 1100px) { .pc-event { gap: 2px; padding: 3px 2px; } }
@media (max-width: 480px) { .pc-event { font-size: 10px; } }

/* Shared action status colors; independent of project-level status badges. */
:root {
  --plan-todo-ink: #697586; --plan-todo-accent: #98a2b3; --plan-todo-bg: #f3f4f6;
  --plan-doing-ink: #a94b08; --plan-doing-accent: #f28c28; --plan-doing-bg: #fff1df;
  --plan-done-ink: #237347; --plan-done-accent: #36a164; --plan-done-bg: #eaf7ef;
}
.pitem.st-todo { background: var(--plan-todo-bg); }
.pitem.st-doing { background: var(--plan-doing-bg); }
.pitem.st-done { background: var(--plan-done-bg); }
.pitem.st-todo .ptitle, .pitem.st-todo .pmark, .pitem.st-todo .pwhen:not(.late) { color: var(--plan-todo-ink); }
.pitem.st-doing .ptitle, .pitem.st-doing .pmark { color: var(--plan-doing-ink); }
.pitem.st-done .ptitle, .pitem.st-done .pmark { color: var(--plan-done-ink); }
.pitem.st-todo .pmark i { border-color: var(--plan-todo-accent); background: var(--plan-todo-accent); }
.pitem.st-doing .pmark i { border-color: var(--plan-doing-accent); background: var(--plan-doing-accent); }
.pitem.st-done .pmark i { border-color: var(--plan-done-accent); background: var(--plan-done-accent); }
select.pst.todo, .chip.plan-todo { color: var(--plan-todo-ink); border-color: var(--plan-todo-accent); background: var(--plan-todo-bg); }
select.pst.doing, .chip.plan-doing { color: var(--plan-doing-ink); border-color: var(--plan-doing-accent); background: var(--plan-doing-bg); }
select.pst.done, .chip.plan-done { color: var(--plan-done-ink); border-color: var(--plan-done-accent); background: var(--plan-done-bg); }
.chip.plan-blocked { color: var(--crit); background: var(--crit-soft); }
.pc-event.st-todo { color: var(--plan-todo-ink); border-left-color: var(--plan-todo-accent); background: var(--plan-todo-bg); }
.pc-event.st-doing { color: var(--plan-doing-ink); border-left-color: var(--plan-doing-accent); background: var(--plan-doing-bg); }
.pc-event.st-done { color: var(--plan-done-ink); border-left-color: var(--plan-done-accent); background: var(--plan-done-bg); }
.pd-plan-gantt .st-todo, .gantt .g-ms.st-todo, .gantt .g-fz.st-todo { fill: var(--plan-todo-bg); stroke: var(--plan-todo-accent); }
.pd-plan-gantt .st-doing, .gantt .g-ms.st-doing, .gantt .g-fz.st-doing { fill: var(--plan-doing-bg); stroke: var(--plan-doing-accent); }
.pd-plan-gantt .st-done, .gantt .g-ms.st-done, .gantt .g-fz.st-done { fill: var(--plan-done-bg); stroke: var(--plan-done-accent); }
.pg-legend .lg-doing { background: var(--plan-doing-accent); }
.pg-legend .lg-done { background: var(--plan-done-accent); }
