/* 文件功能：紧凑工作台桌面预览与响应式画布尺寸样式定义。 */
/* Reversible desktop preview: remove this stylesheet to restore the existing layout. */
/* Keep the live editor usable when an expanded checklist contains long rows.
   On short viewports the existing canvas scrolls instead of collapsing the pad. */
body.app-student-workspace-mode #stage-canvas-s2 { min-height:560px; }
body.app-student-workspace-mode #stage-canvas-s2 .word-editor-container { min-height:220px!important; }
body.app-student-workspace-mode #body-action-plan-items,
body.app-student-workspace-mode #body-stage3-revplan-items { min-height:0; }
@media (max-width:700px) {
  body.app-student-workspace-mode .main-content { grid-template-rows:minmax(600px,70vh) minmax(400px,65vh); }
}
@media (min-width: 1101px) {
  body.app-student-workspace-mode .app-header { padding:5px 10px 0; gap:4px 10px; }
  body.app-student-workspace-mode .app-header .stage-nav { margin:0 -10px; padding:4px 10px; }
  body.app-student-workspace-mode .canvas-panel { padding:5px 7px; gap:6px; }
  body.app-student-workspace-mode #stage-canvas-s2 > .card { padding:5px 7px!important; }
}
@media (min-width: 1440px) {
  body.app-student-workspace-mode .app-header .stage-btn { padding:6px 9px; font-size:12px; }
  body.app-student-workspace-mode .main-content:not(.etherpad-editor-expanded) { grid-template-columns:minmax(0,1fr) 420px; }
}

/* Three desktop columns: compact identity, complete centered stage names, controls. */
@media (min-width:1101px) {
  body.app-student-workspace-mode .app-header {grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);padding:6px 10px;gap:10px;}
  body.app-student-workspace-mode .app-header .brand-section {grid-column:1;grid-row:1;min-width:0;gap:8px;}
  body.app-student-workspace-mode .app-header .workspace-identity {display:flex;flex-direction:column;align-items:flex-start;flex-wrap:nowrap;gap:2px;min-width:0;}
  body.app-student-workspace-mode .workspace-member-line,
  body.app-student-workspace-mode .workspace-task-line {display:flex;align-items:center;gap:7px;min-width:0;width:100%;}
  body.app-student-workspace-mode .workspace-member-line > span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
  body.app-student-workspace-mode .workspace-task-title {display:block;flex:1 1 auto;min-width:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:0;border:0;font-size:11.5px;}
  body.app-student-workspace-mode .workspace-task-kind {display:inline-flex;flex:none;white-space:nowrap;font-size:11px;}
  body.app-student-workspace-mode .workspace-task-target {display:block;flex:none;white-space:nowrap;font-size:11px;}
  body.app-student-workspace-mode .app-header .stage-nav {grid-column:2;grid-row:1;margin:0;padding:3px;justify-self:center;flex-wrap:nowrap;border:1px solid #e2e8f0;border-radius:10px;gap:3px;}
  body.app-student-workspace-mode .app-header .stage-btn {flex:none;white-space:nowrap;padding:7px 9px;font-size:12px;}
  body.app-student-workspace-mode .app-header .header-controls {grid-column:3;grid-row:1;min-width:0;justify-self:end;justify-content:flex-end;flex-wrap:wrap;gap:5px;}
}

/* Keep task type directly above its word target in the compact identity. */
@media (min-width:1101px) {
  body.app-student-workspace-mode .workspace-task-line {display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:7px;row-gap:1px;}
  body.app-student-workspace-mode .workspace-task-title {grid-column:1;grid-row:1 / span 2;align-self:center;width:100%;}
  body.app-student-workspace-mode .workspace-task-kind {grid-column:2;grid-row:1;}
  body.app-student-workspace-mode .workspace-task-target {grid-column:2;grid-row:2;}
}

/* Keep the type/word pair next to the title, never at the right edge of column one. */
@media (min-width:1101px) {
  body.app-student-workspace-mode .app-header .workspace-identity {flex:0 1 auto;width:max-content;max-width:calc(100% - 110px);}
  body.app-student-workspace-mode .workspace-task-line {display:flex;width:max-content;max-width:100%;gap:7px;}
  body.app-student-workspace-mode .workspace-task-title {flex:0 1 auto;width:auto;max-width:200px;}
}
.workspace-task-meta {display:inline-flex;flex-direction:column;align-items:flex-start;flex:none;gap:1px;}

/* Compact the three-column header without clipping its two-line task metadata. */
@media (min-width:1101px) {
  body.app-student-workspace-mode .app-header {padding:3px 10px;}
  body.app-student-workspace-mode .app-header .workspace-identity {gap:0;line-height:1.2;}
  body.app-student-workspace-mode .workspace-member-line {line-height:1.15;}
  body.app-student-workspace-mode .workspace-task-meta {gap:0;line-height:1.15;}
  body.app-student-workspace-mode .app-header .stage-nav {padding:2px;}
  body.app-student-workspace-mode .app-header .stage-btn {padding:5px 9px;}
}

/* Align identity and task metadata on the same two rows. */
@media (min-width:1101px) {
  body.app-student-workspace-mode .app-header .workspace-identity {display:grid;grid-template-columns:minmax(0,200px) max-content;grid-template-rows:auto auto;column-gap:7px;row-gap:2px;align-items:center;}
  body.app-student-workspace-mode .workspace-member-line {grid-column:1;grid-row:1;}
  body.app-student-workspace-mode .workspace-task-line,
  body.app-student-workspace-mode .workspace-task-meta {display:contents;}
  body.app-student-workspace-mode .workspace-task-title {grid-column:1;grid-row:2;align-self:center;}
  body.app-student-workspace-mode .workspace-task-kind {grid-column:2;grid-row:1;}
  body.app-student-workspace-mode .workspace-task-target {grid-column:2;grid-row:2;}
}
