/* One action location across stages, using the adopted create-project overview pattern. */
.kids-workshop.kids-shell .kids-creator-view .kids-workbench[data-workflow-actions="overview"] { container: kids-workbench / inline-size; }
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] > .kids-workbench-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 310px;
  grid-template-areas: "heading actions" "tabs actions" "content actions";
  grid-template-rows: auto auto 1fr;
  min-height: calc(100dvh - 110px);
  align-items: start;
  gap: 16px 20px;
}
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .kids-short-page-heading {
  display: block; grid-area: heading; margin: 0;
}
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] > .kids-workbench-layout > .kids-short-page-tabs { grid-area: tabs; margin: 0; }
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .kids-result-lead { display: block; }
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .creator-plan-layout { grid-template-columns: minmax(0, 1fr); }
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .creator-plan-edit-panel { position: static; width: auto; min-width: 0; }
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .creator-visual-summary { grid-template-columns: minmax(0, 1fr); }
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .kids-workflow-overview {
  grid-area: actions; position: sticky; top: 80px; align-self: start; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 14px; min-width: 0; width: 100%;
  height: min(620px, calc(100dvh - 240px)); min-height: 360px; padding: 18px;
  border: 1px solid var(--kids-line); border-radius: 14px; background: var(--kids-card); color: var(--kids-ink);
}
.kids-workflow-overview-heading { flex: none; }
.kids-workflow-overview-heading h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.5; }
.kids-workflow-overview-heading p { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; }
.kids-workflow-overview-heading p span { color: var(--kids-mute); }
.kids-workflow-overview .kids-reference-progress { margin: 0 0 14px; }
.kids-workflow-overview .kids-workbench-progress { padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; }
.kids-workflow-timing { margin-block: 12px; font-size: 13px; }
.kids-workflow-overview-content { flex: 1 1 auto; min-height: 50px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.kids-workflow-overview-summary { padding: 10px; border-radius: 8px; background: var(--kids-soft); font-size: 13px; line-height: 1.6; }
.kids-workflow-overview-summary p { margin: 5px 0 0; color: var(--kids-mute); }
.kids-workflow-overview-actions { flex: none; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--kids-line); max-height: 65%; overflow: auto; }
.kids-workflow-overview-actions [data-workflow-action-slot]:empty { display: none; }
.kids-workshop.kids-shell .kids-workflow-overview-actions :is(.kids-step-actions,.kids-workbench-actions,.kids-run-actions,.kids-plan-confirmation-actions) { display: flex; flex-flow: column nowrap; flex: 0 0 auto; align-items: stretch; gap: 8px; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; min-width: 0; }
.kids-workshop.kids-shell .kids-workflow-overview-actions :is(button,a) { box-sizing: border-box; display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.kids-workshop.kids-shell .kids-workflow-overview-actions .kids-primary { min-height: 46px; font-weight: 700; }
.kids-workflow-overview-actions :is(.kids-step-action-copy,.kids-muted) { margin: 0; font-size: 12px; line-height: 1.6; }
.kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .kids-workflow-overview-actions :is(.kids-step-action-copy,.kids-muted) {
  flex: 0 0 auto; min-height: 0; max-height: 64px; overflow: auto;
  margin: 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere;
}
.kids-workflow-overview-actions [hidden] { display: none !important; }
.kids-workshop.kids-shell .kids-workflow-overview-actions .kids-plan-confirmation-reason { order: -1; flex: 0 0 auto; max-height: 64px; overflow: auto; }
.kids-workflow-overview:has([data-plan-confirmation] button) [data-workflow-fallback="plan"] { display: none; }
.kids-workflow-overview [data-workflow-action-slot="visual-update"]:not(:empty) { border-bottom: 1px solid var(--kids-line); padding-bottom: 8px; }
.kids-workflow-overview .kids-stage-escape-actions { margin: 0; }
.kids-workflow-overview .kids-stage-escape-actions textarea { width: 100%; box-sizing: border-box; }
/* Measure the space left after both navigation columns, not the whole workspace. */
@container kids-workbench (max-width: 740px) {
  .kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] > .kids-workbench-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "actions" "tabs" "content";
    grid-template-rows: auto;
    min-height: 0;
  }
  .kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .kids-workflow-overview { position: static; height: auto; min-height: 0; max-height: none; }
  .kids-workflow-overview-content { max-height: 180px; }
  .kids-workflow-overview-actions { max-height: none; }
}
@media (max-height: 600px) {
  .kids-workshop.kids-shell .kids-creator-view .kids-workbench.kids-workbench-short-page[data-workflow-actions="overview"][data-stage-id][data-workspace-view] .kids-workflow-overview { position: static; height: auto; min-height: 0; }
}

.kids-workflow-overview-actions [data-workflow-action-slot] { display: flex; flex-flow: column nowrap; flex: 0 0 auto; gap: 8px; }
.kids-plan-action-anchor:empty { display: none; }
