.workspace-nav {display:flex;flex:1;min-height:0;flex-direction:column;overflow:auto}
.workspace-nav .desk-entry {border-radius:9px;min-height:40px;flex-shrink:0}
.desk-entry {display:flex;align-items:center;gap:9px;margin:0 12px 10px;padding:8px 10px;text-align:left;color:var(--text-secondary);font-size:14px}
.desk-entry:hover {background:var(--surface-hover)}
.desk-entry[aria-current="page"] {background:var(--accent-soft);color:var(--accent);font-weight:650}
.desk-entry .icon {width:18px;height:18px;flex:none}
.on-board .conversation {grid-column:2 / -1;position:relative}
.board-card header,.board-card footer {display:flex;align-items:center;gap:8px}
.board-picker-button {flex:none;margin-left:auto;white-space:nowrap}
.slot-hint {color:var(--muted);font-size:14px}
.slot-hint:empty {display:none}
.board-scroll {flex:1;min-height:0;overflow:clip;background:#f6f8f6}
.board-inner {display:flex;flex-direction:column;height:100%;max-width:1440px;margin:auto;padding:clamp(10px,2.2dvh,26px) clamp(14px,2.4vw,36px)}
.board-canvas {flex:1;min-height:0;overflow:clip}
.team-empty {margin:auto;max-width:32rem;padding:24px;text-align:center}
.team-empty h2 {font-size:20px;margin:0 0 8px}
.team-empty p {color:var(--muted);margin:0 0 18px}
.market-browser:has(.team-empty) {display:grid;place-items:center}
.board-pages {display:flex;align-items:center;justify-content:center;gap:12px;padding-top:5px;font-size:13px;color:var(--muted)}
.board-pages button {padding:3px 10px}
.board-pages[hidden],.board-grid .board-card[hidden] {display:none}
.board-heading {display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 clamp(8px,1.6dvh,18px)}
.board-heading>div {display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px}
.board-heading h1 {order:-1;font-size:clamp(22px,2.2vw,30px);letter-spacing:-.04em}
.board-date,.board-scope,.board-sub,.board-empty,.board-card footer {color:var(--muted);font-size:13px}
.board-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(7px,1.4dvh,14px)}
.board-card {
  --widget-wash:#fff;
  position:relative; min-width:0;min-height:0;max-height:var(--slot-limit);
  display:grid;grid-template-columns:minmax(0,1fr) auto auto;
  grid-template-rows:auto minmax(0,1fr);align-items:center;
  gap:5px 9px;padding:clamp(10px,1.7dvh,18px);
  border:1px solid var(--line);border-radius:17px;
  background:linear-gradient(145deg,var(--widget-wash),white 85%);
  container-type:inline-size;
}
.board-card[data-card="income"],.board-card[data-card="trend"] {--widget-wash:#f7f5fc}
.board-card[data-card="low"],.board-card[data-card="stock"] {--widget-wash:#f4faf6}
.board-card[data-card="pending"] {--widget-wash:#fdf9f1}
.board-card.size-small {
  height:clamp(151px,20.5dvh,174px);grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto minmax(0,1fr) auto;
}
.board-card.size-medium,.board-card.size-large {height:clamp(103px,15.5dvh,140px)}
.board-card.size-medium {grid-column:span 2}
.board-card.size-large {grid-column:1 / -1}
.board-card.lower-card {height:clamp(196px,31.5dvh,310px)}
.board-card header {grid-area:1 / 1;min-width:0;margin:0;gap:8px;justify-content:start}
.board-card.size-small header {grid-column:1 / -1}
.board-card.size-small.is-editing header {grid-column:1}
.board-card h2 {min-width:0;font-size:15px;font-weight:650;line-height:1.3;letter-spacing:0}
.board-title-link {padding:0;text-align:left;color:inherit;font:inherit}
.board-title-link:hover {text-decoration:underline}
.board-icon,.skill-tile {display:grid;place-items:center;width:28px;height:28px;border-radius:9px;flex:none}
.board-icon .icon,.skill-tile .icon {width:17px;height:17px}
.tone-amber {background:#f9eed8;color:#805719}.tone-mint {background:#e2f2e9;color:#296447}.tone-violet {background:#eee9fa;color:#665190}.tone-rose {background:#fae8e9;color:#884753}.tone-blue {background:#e4eef7;color:#426281}
.board-card .widget-content {grid-row:2;grid-column:1/-1;align-self:stretch;min-width:0;min-height:0}
.board-card footer {grid-area:1 / 2;justify-self:end;min-width:0;font-size:12px;gap:5px}
.board-card.size-small footer {grid-area:3 / 1;justify-self:start}
.board-card .buddy {width:14px;height:14px;flex:none}
.board-card .buddy i,.board-card .buddy b {width:2px;height:3px}
.board-card .card-more,.board-card-edit {justify-self:end;grid-area:1 / 3}
.board-card .card-more {
  display:inline-flex;align-items:center;justify-content:flex-end;gap:2px;white-space:nowrap;
  font-size:12px;color:var(--accent);min-height:24px;padding:0 2px;
}
.card-more .icon,.board-task .icon {width:14px;height:14px;transform:rotate(-90deg)}
.card-more:hover {text-decoration:underline}
.card-more.item-count {color:var(--muted)}
.size-small .card-more {grid-area:3 / 2}
.board-editing .board-card {border-color:var(--accent-line)}
.board-card-edit {
  min-height:26px;padding:2px 8px;white-space:nowrap;border-radius:8px;
  border:1px solid var(--accent-line);background:var(--accent-soft);color:var(--accent);font-size:12px
}
.size-small .board-card-edit {grid-area:1 / 2}
.board-card-edit:hover {background:var(--surface-hover)}
.board-card :is(button,a):focus-visible,.slot-options label:has(input:focus-visible) {outline:2px solid var(--accent);outline-offset:-2px}
.board-number {min-width:0;max-width:100%;white-space:nowrap;font:650 clamp(21px,2.2vw,32px)/1.15 var(--chat-font);font-variant-numeric:tabular-nums;letter-spacing:-.035em}
.metric-readout {height:100%;display:flex;flex-direction:column;justify-content:center;gap:3px}
.short-body .metric-readout {flex-direction:row;align-items:center;justify-content:start;gap:3px 10px}
.short-body .metric-readout .board-sub {flex:none}
.size-small .metric-readout {display:flex;flex-flow:column nowrap;align-items:start;justify-content:center}
.trend-total {display:flex;align-items:center;justify-content:space-between;gap:5px}
.trend-period {flex:none;font-size:12px;color:var(--muted)}
.trend-range {display:inline-flex;flex:none;gap:2px;padding:2px;background:var(--surface-soft);border:1px solid var(--line);border-radius:8px}
.trend-option {min-height:24px;padding:2px 7px;border-radius:5px;font-size:12px;white-space:nowrap;color:var(--text-secondary)}
.trend-option[aria-pressed="true"] {background:var(--card);color:var(--accent);font-weight:650}
.trend-option:hover {background:var(--accent-soft)}
.trend-option:focus-visible {outline-offset:-2px}
[data-card="trend"] .widget-content {display:flex;flex-direction:column;gap:3px}
.trend-chart {display:flex;flex:1;flex-direction:column;min-height:0}
.board-plot {display:block;width:100%;min-height:0;height:0;flex:1}
.board-detail .board-plot {height:140px;flex:auto}
.board-card .axis {font-size:11px;line-height:1.2;margin-top:2px}
.short-body .axis {display:none}
.board-shortcuts {display:grid;grid-template-columns:repeat(var(--shortcut-columns,1),minmax(0,1fr));gap:6px}
.board-shortcut {
  display:flex;align-items:center;gap:6px;min-width:0;height:var(--preview-row,38px);
  padding:2px 7px;text-align:left;font-size:13px;line-height:1.2;
  border:1px solid var(--line);background:white;border-radius:9px;
}
.board-shortcut .skill-tile {width:24px;height:24px;border-radius:7px}
.board-shortcut:hover,.board-task:hover {background:var(--surface-soft);border-color:var(--control-line)}
.board-card .board-shortcut span:last-child,.board-card .board-task span,.board-card .board-replenishment li :is(strong,span) {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board-card .widget-content:has(.board-shortcuts),.board-card.size-small .widget-content:has(.board-replenishment,.board-task,.board-empty) {display:grid;align-content:center}
.board-card .widget-content:has(.board-task) {display:grid;align-content:start;gap:6px}
.board-task {display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;height:var(--preview-row,36px);gap:6px;padding:4px 0;text-align:left;font-size:14px;border-bottom:1px solid var(--line);border-radius:0}
.board-empty {padding:3px 0}
.board-replenishment {list-style:none;padding:0;margin:0;display:grid;gap:6px}
.board-replenishment li {display:flex;align-items:center;justify-content:space-between;gap:6px;height:var(--preview-row,auto);border-bottom:1px solid var(--line)}
.board-replenishment li:last-child {border-bottom:0}
.board-replenishment li div {display:grid;gap:2px;min-width:0}
.board-replenishment li strong {font-size:14px;font-weight:600}
.board-replenishment li span {font-size:12px;color:var(--muted)}
.board-replenishment li b {white-space:nowrap;font-size:12px;color:#684514;background:#f9eed8;border-radius:6px;padding:2px 6px}
.stock-summary .board-replenishment li span {display:none}
.board-detail {max-height:65dvh;overflow:auto}
.board-detail .trend-total {flex-wrap:wrap}
.board-detail .board-number {white-space:normal;overflow-wrap:anywhere}
.board-detail .board-shortcuts {grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}
.board-detail .board-shortcut,.board-detail .board-task,.board-detail .board-replenishment li {height:auto;min-height:40px;padding-block:6px}
.board-detail .board-task span,.board-detail .board-replenishment li div {overflow-wrap:anywhere}
.board-detail .metric-readout {height:auto}
@container (max-width:230px) {
  .board-card .widget-role {display:none}
  .board-card .board-number {font-size:clamp(18px,11cqi,27px)}
}
@container (max-width:180px) {
  .board-card header {gap:4px}
  .board-card.is-editing header .board-icon {display:none}
  .board-card h2 {font-size:14px}
  .board-card .board-sub,.board-card .board-empty {font-size:12px}
}
@media(max-width:800px){
  .board-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:500px){
  .board-inner{padding:10px}
  .board-card{padding:9px;gap:4px 6px;border-radius:13px}
  .board-card.size-small {height:126px}
  .board-icon {width:24px;height:24px}
  .board-picker-button {padding:5px 8px;font-size:13px}
}

dialog[data-board-widget="slots"] {width:min(600px,calc(100% - 20px));padding:0;overflow:hidden}
dialog[data-board-widget="slots"][open] {display:flex;flex-direction:column}
.board-slot-head {padding:15px 20px 12px;margin:0;border-bottom:1px solid var(--line)}
.board-slot-head h2 {font-size:19px}
.board-slot-head .slot-hint {font-size:12px}
#slot-picker {display:flex;flex-direction:column;min-height:0}
.slot-scroll {min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 20px}
.slot-preview {
  display:grid;place-items:center;min-width:0;padding:8px 0;
  background:var(--surface-soft);border-radius:14px;margin-bottom:12px;
}
.slot-preview .board-card {max-height:none;cursor:default}
#slot-picker fieldset {padding:0;margin:0;border:0;min-width:0}
#slot-picker legend {font-weight:600;font-size:14px;margin-bottom:8px}
.slot-options {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.slot-options label {position:relative;display:flex;align-items:center;gap:6px;padding:6px;min-height:39px;border:1px solid var(--line);border-radius:10px;cursor:pointer;font-size:13px}
.slot-options label:has(:checked) {background:var(--accent-soft);border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.slot-options input {position:absolute;width:1px;height:1px;opacity:0}
#slot-picker>footer {display:flex;align-items:center;gap:8px;padding:10px 20px;border-top:1px solid var(--line)}
#slot-picker>footer .primary {margin-left:auto}
#slot-picker .inlineError:not(:empty) {padding:0 20px 10px}
@media(max-width:480px){
  .slot-options {grid-template-columns:repeat(2,minmax(0,1fr))}
  .slot-scroll,.board-slot-head,#slot-picker>footer {padding-inline:12px}
}
