/* Only functional additions; confirmed sixth-preview layout remains the base. */
.avatar-media{width:100%;height:245px;margin:8px 0;position:relative}.avatar-media svg,.avatar-media video{width:100%;height:100%;object-fit:contain}.avatar-media video{border-radius:10px}.avatar-stage{overflow:hidden}.avatar-stage p{margin:6px 0}#notice[hidden]{display:none}#mainBody{min-width:0}.student-head{background:#eaf4e5}.chat-message .message-bubble{white-space:pre-wrap;overflow-wrap:anywhere}.teacher .board .card{display:flex;flex-direction:column;margin-bottom:0}.teacher-record-scroll th:first-child{width:40%}.teacher-record-scroll th{white-space:normal}.teacher-flow .flow-bank p{display:none}.teacher-flow #flowResult .flow-feedback{position:static;margin:4px 0}.rocket-overlay .rocket-vessel{font-size:85px;text-align:center;height:140px;line-height:140px}.check-circle.failed{color:#b63025;background:#ffe5df}#popupNotice:empty{display:none}dialog{max-height:90vh;overflow:auto}#popupBody{min-width:0}.pair-row label{width:100%;min-width:0}.pair-row textarea{width:100%}.boardfoot{gap:10px}.boardfoot p{max-width:65%}.ai-composer textarea{width:100%}.score-buttons{display:flex;align-items:center}.workspacebar{gap:10px}.sync-note{font-size:12px}#restoreDraft{background:#fff0c9}input[type=checkbox]{width:auto}#settingsGroups textarea{min-height:110px}header button{min-height:36px;padding:8px 12px}.teacher .rating-line .stars{white-space:nowrap}button:disabled{cursor:not-allowed}.chat-layout>div{min-width:0}.chat-avatar{flex-shrink:0}.chat-message{align-items:flex-start}#popup [data-chat-kind]{margin-bottom:8px}@media(max-width:700px){.chat-layout,.feedback-layout .chat-layout{grid-template-columns:110px minmax(0,1fr);gap:10px}.avatar-stage{padding:8px}.avatar-media{height:190px}.avatar-stage .name{font-size:15px}.rating-inline{white-space:normal;gap:6px}.teacher .board{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:240px}.join-grid{grid-template-columns:repeat(2,1fr);min-height:580px}.join-grid button{font-size:23px}.experience-layout{grid-template-columns:1fr}.group-list{grid-template-columns:repeat(2,1fr)}.teacher-record-scroll{height:330px}.card-head h2{font-size:17px}.center-count strong{font-size:54px}.config-grid{grid-template-columns:1fr}.feedback-title .rating-inline{flex-wrap:wrap}}
.teacher #notice{position:fixed;right:20px;top:12px;z-index:50;max-width:580px;box-shadow:0 3px 15px #1232;padding:8px 14px;margin:0}.teacher #notice.error{top:82px}.teacher .boardfoot{min-height:46px}

.avatar-stage{background:#fff;padding:0;position:relative;min-height:330px;align-self:stretch}
.avatar-media{position:absolute;inset:0;width:100%;height:100%;margin:0;display:flex;align-items:center;justify-content:center}
.avatar-media [hidden]{display:none!important}
.avatar-media canvas{width:100%;height:100%;object-fit:cover}
.chat-avatar canvas{width:100%;height:100%;border-radius:9px}
@media(max-width:700px){.avatar-stage{padding:0}.avatar-media{height:100%}.avatar-media canvas{object-fit:contain}}
.python-preparation{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0 0;color:#3f6655;font-size:14px}.python-preparation button{min-height:36px;padding:6px 12px}.python-preparation [role="status"]{flex:1;min-width:220px}

/* Trial corrections: state remains readable and medals keep their original colors. */
.tools-row .record-button{font-size:17px;padding:11px 18px;min-height:46px;background:#dcecbc;border:2px solid #7caa54;font-weight:700;color:#234728}
.teacher .works-card.not-generated{background:#edf0eb;border-color:#d5dbd2}
.works-card.not-generated h2,.works-card.not-generated h3,.works-card.not-generated p{color:#819087}
.works-card.not-generated .upload-state{background:#e0e5dd;color:#849088}
.works-card.not-generated .medal{opacity:1;filter:drop-shadow(0 3px 4px #2b442028)}
.rocket-overlay{background:transparent}.rocket-overlay .rocket-vessel{font-size:initial;line-height:normal}
.upgrade-step small{display:block;color:#6b7d6f;font-size:14px;margin-top:5px}
#popupBody>progress{width:100%;height:18px;margin-top:20px}

.flow-token[data-answer="小朋友的答案跟语料库中的答案一致吗？"] svg{height:100px}
.mascot{display:block;width:100%;height:100%}.avatar-stage>.mascot-body{position:absolute;inset:0;padding:14px;object-fit:contain}.chat-avatar>.mascot-head{border-radius:9px;background:white}
.teacher .works-card h3,.teacher .works-card>p{padding-right:120px}.uploaded-rocket{position:absolute;right:90px;top:20px;width:48px;height:92px;pointer-events:none}.uploaded-rocket svg{display:block;width:100%;height:100%}.upload-state.legacy-upload{background:#f0eee5;color:#766c4e}
.teacher #notice{position:static;max-width:none;margin:10px 0 14px;box-shadow:none}.avatar-stage>.mascot-body{padding:0}

.history-group-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:24px 0}.history-group-grid button{padding:20px 10px;line-height:1.8}.history-chooser>button{margin-top:14px}@media(max-width:750px){.history-group-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.teacher .works-card .card-head h2{max-width:calc(100% - 140px)}

/* 判断步骤按自己的高宽比展示，避免固定65px把形状和文字缩小。 */
.teacher-flow .flow-token.shaped-token svg,.flow-panel .flow-token.shaped-token svg{height:auto}

/* 2026-10-08 cues occupy normal layout, without absolute labels. */
button.next-action{background:#dfedba;border:2px solid #80ab45;color:#244d35;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
button.next-action:before{content:attr(data-next);font-size:14px;padding:3px 8px;border-radius:8px;background:#7fa846;color:white;white-space:nowrap}
.action-end,.boardfoot{gap:12px;flex-wrap:wrap}.locked-entry{opacity:.55}.flow-group-card{display:flex;flex-direction:column;gap:18px}.flow-group-card button{margin-top:auto}.pending-flow{background:#eff2eb;color:#758377}.flow-done{border-top:3px solid #82ae55}
.flow-panel .flow-canvas{min-height:0;height:52vh;max-height:52vh}.flow-panel .lesson-flow{width:100%;height:100%;max-height:52vh}.flow-slot.mark-pending polygon,.flow-slot.mark-pending rect{fill:#f8cba8;stroke:#718c81}#popupBody>.lesson-flow{display:block;width:100%;max-height:65vh}
@media(max-width:700px){button.next-action{font-size:15px}.action-end{align-items:stretch}.action-end button{max-width:100%}}

/* 2026-10-09: teacher group cards must contain their controls at every row height. */
.teacher .board{grid-template-rows:none;grid-auto-rows:minmax(234px,auto);align-items:stretch}
.teacher .flow-progress-board .flow-group-card{gap:12px;min-width:0}
.teacher .flow-progress-board .flow-group-card>h2{margin:0;overflow-wrap:anywhere}
.teacher .flow-progress-board .flow-group-card>.notice{margin:0}
.teacher .flow-progress-board .flow-group-card>p{margin:0!important;overflow-wrap:anywhere}
.teacher .flow-progress-board .flow-group-card>button{flex-shrink:0;margin-top:auto}

/* Shared help state accents the whole teacher group card without changing its layout. */
.teacher .board .card.help-requested{border-color:#e34a4a;box-shadow:0 0 0 2px #e34a4a,0 0 16px 3px #ef444455}
