.script-idea-project-view { display: contents; }
.script-idea-project-view[hidden] { display: none !important; }
.script-idea-entry { display: flex; justify-content: flex-end; margin-top: -6px; }
.script-idea-entry .script-idea-trigger { display: inline-flex; gap: 10px; align-items: center; min-height: 40px; border-radius: 10px; padding: 8px 16px; }
.script-idea-trigger span { font-size: 18px; font-weight: 400; }

/* The generator is a project subpage, with its own header and normal page flow. */
.workflow-workbench:has(.script-idea-page) > .workflow-workbench-top,
html body.s1-workspace-lock .student-workflow-view .workflow-workbench.s1-workspace-page:has(.script-idea-page) > .workflow-workbench-top.s1-workspace-header { display: none !important; }
html body.s1-workspace-lock .student-workflow-view .workflow-workbench-main:has(.script-idea-page) { overflow: hidden !important; padding: 0 !important; }
.script-idea-page { display: flex; flex: 1; flex-direction: column; gap: 24px; width: 100%; height: 100%; min-height: 0; box-sizing: border-box; padding: 24px 28px 28px; color: #17212b; background: #f7f8fa; overflow: auto; }
.script-idea-page-header { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 24px; }
.script-idea-page-identity { min-width: 0; }
.script-idea-page .script-idea-back { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: #5b6777; font-size: 14px; line-height: 24px; cursor: pointer; }
.script-idea-back:hover { color: #235dce; }
.script-idea-page h1 { margin: 10px 0 0; font-size: 30px; line-height: 1.3; letter-spacing: -.6px; color: #17212b; }
.script-idea-page h1:focus { outline: none; }
.script-idea-project-name { margin: 7px 0 0; color: #677385; font-size: 14px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.script-idea-page-grid { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); gap: 22px; flex: 1; min-height: 420px; }
.script-idea-brief, .script-idea-draft-panel { display: flex; flex-direction: column; gap: 20px; min-width: 0; min-height: 0; padding: 24px; border: 1px solid #e2e7ee; border-radius: 16px; background: #fff; }
.script-idea-panel-heading h2 { margin: 0; color: #17212b; font-size: 20px; line-height: 1.4; }
.script-idea-panel-heading p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #6b7584; }
.script-idea-page .s1-input { width: 100%; box-sizing: border-box; min-height: 0; padding: 16px; resize: none; border: 1px solid #dce2ea; border-radius: 10px; color: #263445; background: #fff; font-size: 16px; line-height: 1.85; font-weight: 400; }
.script-idea-page .s1-input::placeholder { color: #8793a2; font-weight: 400; }
.script-idea-page .script-idea-brief-editor { flex: 1; min-height: 170px; background: #fafbfd; }
.script-idea-page .script-idea-editor { flex: 1; min-height: 260px; padding: 10px 2px; border: 0; border-radius: 0; font-size: 17px; line-height: 1.95; }
.script-idea-page .s1-button { min-height: 42px; padding: 10px 20px; border-radius: 10px; font-size: 15px; white-space: nowrap; }
.script-idea-generate { flex: none; width: 100%; }
.script-idea-adopt { flex: none; }
.script-idea-message { margin: 0; padding: 10px 12px; border-radius: 8px; color: #875a27; background: #fff7ec; font-size: 14px; line-height: 1.55; }
.script-idea-save-state { margin: 0; color: #8490a0; font-size: 12px; line-height: 1.5; }
.script-idea-page :is(button, textarea):focus-visible { outline: 3px solid rgb(47 108 240 / 35%); outline-offset: 3px; }
@media (max-width: 1400px), (max-height: 850px) {
  .script-idea-page { padding: 18px 22px; gap: 18px; }
  .script-idea-page h1 { font-size: 26px; margin-top: 6px; }
  .script-idea-page-grid { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: 18px; min-height: 380px; }
  .script-idea-brief, .script-idea-draft-panel { padding: 20px; gap: 16px; }
  .script-idea-page .script-idea-editor { font-size: 16px; min-height: 200px; }
}
