.teacher-atomic-buttons{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.teacher-writing-panel{margin-top:24px;padding:22px;border:1px solid #d9d9d9;border-radius:22px;background:#f9f8f3}
.teacher-writing-panel h3,.student-writing-panel h3{font-size:24px;margin:0 0 16px}
.teacher-writing-panel h4{font-size:16px;margin:20px 0 8px}
.teacher-writing-panel label{display:block;font-weight:700;margin:12px 0 8px}
.teacher-writing-panel select,.teacher-writing-panel textarea{width:100%;box-sizing:border-box}
.writing-response,.writing-comments{display:grid;gap:12px;margin:14px 0}
.writing-response article,.writing-comments article{padding:14px 16px;border:1px solid #ddd;border-radius:14px;background:#fff}
.writing-response strong,.writing-response small,.writing-comments small{display:block}
.writing-response small,.writing-comments small{color:#62656c;margin-top:4px}
.writing-response p,.writing-comments p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;margin:9px 0 0}
.student-writing-panel{padding:20px 24px;border-top:1px solid #ddd;background:#f9f8f3;max-height:280px;overflow:auto}
.student-writing-panel h3{font-size:18px}
/* Reserve visible space for feedback in both legacy and JSON Atomic viewers. */
#viewer:has(#studentWritingPanel:not([hidden]))[open]{display:flex;flex-direction:column}
#viewer:has(#studentWritingPanel:not([hidden])) .viewer-head,
#viewer:has(#studentWritingPanel:not([hidden])) .viewer-progress,
#viewer:has(#studentWritingPanel:not([hidden])) .viewer-actions{flex-shrink:0}
#viewer:has(#studentWritingPanel:not([hidden])) #extensionFrame{flex:1;min-height:0;height:auto}
#viewer .student-writing-panel{flex:0 1 auto;max-height:min(280px,35%);min-height:0}
