/* Fenêtres communes : la mission conserve ses couleurs, ses visuels et ses états. */
dialog.matheo-support-dialog{box-sizing:border-box;width:min(720px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);padding:20px;border:2px solid #d6b36c;border-radius:20px;background:#e5f4fa;color:#17394e;overflow:auto;overscroll-behavior:contain;font:16px/1.5 Nunito,Arial,sans-serif;box-shadow:0 20px 70px #0006}
dialog.matheo-support-dialog::backdrop{background:#080f28b8}
dialog.matheo-support-dialog[open]{display:flex;flex-direction:column;overflow:hidden;margin:auto;inset:0}
.matheo-support-dialog .support-heading{flex:0 0 auto}
.matheo-support-dialog .support-heading>button{flex:0 0 44px;width:44px;height:44px;padding:0;font-size:28px;line-height:1}
.matheo-support-dialog .support-heading h2{align-self:center}
.matheo-support-dialog .support-content{overflow:auto;overscroll-behavior:contain;min-height:0;padding:2px}
.matheo-support-dialog form>.support-send{position:sticky;bottom:0;box-shadow:0 -5px 12px #e5f4fa}
.matheo-support-dialog *, .matheo-support-dialog *::before,.matheo-support-dialog *::after{box-sizing:border-box}
.matheo-support-dialog h2{font-size:24px;color:#183b55;margin:0}
.matheo-support-dialog .support-heading{display:flex;justify-content:space-between;gap:12px;align-items:start;margin-bottom:16px}
.matheo-support-dialog button,.support-entry{font:inherit;min-height:44px;padding:9px 14px;border:1px solid #7e9dae;border-radius:11px;background:#f6fbfd;color:#17394e;cursor:pointer}
.matheo-support-dialog button:focus-visible,.support-entry:focus-visible{outline:3px solid #a7770c;outline-offset:2px}
.matheo-support-dialog .support-send{background:#173f5c;color:#fff;border-color:#173f5c}
.matheo-support-dialog button:disabled{opacity:.5;cursor:wait}
.matheo-support-dialog .support-check{display:flex;gap:12px;align-items:center;min-height:44px;padding:6px 0;margin:0}
.matheo-support-dialog input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;accent-color:#216d89}
.matheo-support-dialog textarea{font:inherit;width:100%;min-height:75px;resize:vertical;margin:8px 0;padding:10px;border:1px solid #7e9dae;border-radius:8px;color:#17394e;background:#fff}
.matheo-support-dialog .support-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}
.matheo-support-dialog .support-note{font-size:14px;color:#365a70}
.matheo-support-dialog .support-error{color:#9b2222}
.matheo-support-dialog .support-content{min-width:0;overflow-wrap:anywhere}
.matheo-support-dialog .support-content img,.matheo-support-dialog .support-content svg,.matheo-support-dialog .support-content canvas{max-width:100%;height:auto}
.matheo-support-dialog .support-content .feedback{margin:0;padding:12px;background:#f5fbfe;color:#183b55;max-width:100%;min-width:0}
.matheo-support-dialog .support-content .feedback-content{min-width:0;width:100%}
.matheo-support-dialog .support-content .visual-wrap{max-width:100%;overflow:auto}
.matheo-support-dialog .support-content table{max-width:100%}
.support-compact-actions{display:flex;gap:10px;flex-wrap:nowrap;align-items:stretch;margin-top:12px}
.support-compact-actions>.support-entry{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:0;min-height:44px;padding:6px 10px;font-size:14px;border:1px solid #b59042;border-radius:8px;background:#e5f4fa;color:#17394e;text-decoration:none}
.support-entry.support-flag{display:inline-flex;align-items:center;gap:7px;background:#e5f4fa;border:1px solid #b59042;border-radius:8px;box-shadow:none;text-decoration:none;color:#17394e;font:inherit;font-size:14px;min-height:44px;padding:6px 8px;cursor:pointer}
.support-entry.support-flag:hover,.support-entry.support-flag:focus{ text-decoration:none }
.support-entry.support-flag img{display:block;width:28px;height:28px;object-fit:contain;flex:0 0 28px;transform:none}
.support-entry.support-flag:focus-visible{outline:3px solid #a7770c;outline-offset:2px}
.support-sync-status{font-size:13px;line-height:1.5;margin:8px 0;color:inherit}
.support-panel{padding:16px;margin:16px 0;border:1px solid #8cabbc;border-radius:14px;background:#e5f4fa;color:#17394e}
.support-panel article{padding:12px 0;border-bottom:1px solid #a9bfcb}
.support-panel select{font:inherit;max-width:100%;min-height:44px}
@media(max-width:520px){dialog.matheo-support-dialog{padding:15px}.matheo-support-dialog h2{font-size:21px}.matheo-support-dialog .support-content .feedback{padding:8px}.matheo-support-dialog .support-content .feedback-shell{display:block}.matheo-support-dialog .support-content .feedback-mascot{display:none}.matheo-support-dialog .support-content .temperature-student-result,.matheo-support-dialog .support-content .metronomia-clock-comparison{grid-template-columns:1fr;flex-wrap:wrap}}

#support-admin-list .support-panel{display:grid;gap:12px}
#support-admin-list .support-panel h2,#support-admin-list .support-panel p{margin:0}
#support-admin-list .support-panel label{display:flex;align-items:center;gap:12px;min-height:44px}
#support-admin-list input[type=checkbox]{width:22px;height:22px}

/* Isoler la fenêtre des règles globales des formulaires parent/enseignant. */
.matheo-support-dialog form{display:block;margin:0}
.matheo-support-dialog label{min-width:0}
.matheo-support-dialog .support-check{flex-direction:row;flex:none;width:100%}
.matheo-support-dialog input[type=checkbox]{min-height:20px;padding:0;margin:0;width:20px;height:20px}
.matheo-support-dialog .support-heading h2{min-width:0;width:auto}

dialog.support-report-dialog{width:min(520px,calc(100vw - 24px))}
.support-report-dialog .support-note:empty{display:none}
@media(max-width:400px){.support-compact-actions{gap:6px}.support-compact-actions>.support-entry{font-size:13px;padding:6px}.support-compact-actions>.support-flag{gap:4px}.support-compact-actions .support-flag img{width:24px;height:24px;flex-basis:24px}}

/* Champ de précision : contour doré complet, y compris pendant la saisie. */
.matheo-support-dialog.support-report-dialog textarea{border:2px solid #b59042;border-radius:8px;background:#fffdf7;color:#17394e;box-shadow:none}
.matheo-support-dialog.support-report-dialog textarea:focus{border-color:#9a711e;outline:2px solid #d6b36c;outline-offset:-4px;box-shadow:none}

.support-retained-answer{margin:16px 0}.support-retained-answer .choice-btn:disabled{opacity:1;cursor:default}.support-retained-answer .support-chosen-answer{border:2px solid #2589ab;background:#def4fa;color:#17394e}.support-written-answer{padding:12px 14px;border:1px solid #b59042;border-radius:10px;background:#f6fbfd;color:#17394e;overflow-wrap:anywhere}.feedback .verdict.support-correct-answer{color:#21683f!important}

/* Relecture : conserver la construction et les choix, sans nouvelle saisie. */
.support-frozen-answer{margin:12px 0;min-width:0;pointer-events:none}
.support-frozen-answer :is(button,input,select,textarea):disabled{opacity:1;cursor:default;-webkit-text-fill-color:currentColor}
.support-frozen-answer .support-chosen-answer{border:2px solid #2589ab!important;background:#def4fa!important;color:#17394e!important;box-shadow:0 0 0 2px #2589ab44}
.support-frozen-answer input{color:#17394e;background:#f4faff}
.support-dialog-footer{flex:0 0 auto;display:flex;justify-content:center;padding-top:12px}
.support-explanation-dialog .support-content{scrollbar-gutter:stable}
.support-explanation-dialog .support-content .feedback-answer-visual>svg{display:block;margin-inline:auto}
.support-explanation-dialog .speak-btn-inline{min-height:32px;width:32px;height:32px;padding:5px;margin-bottom:8px}
.support-explanation-dialog .speak-btn-inline img{width:22px;height:22px}
@media(max-width:520px){.support-explanation-dialog .support-content{font-size:14px}.support-explanation-dialog .support-heading h2{font-size:19px}}

.support-explanation-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;margin:0 0 10px}.support-explanation-dialog .support-explanation-toolbar .speak-btn-inline{margin:0;flex:0 0 36px;width:36px;height:36px}

/* Le corrigé garde les styles de sa planète, sans répéter le parchemin. */
html body .matheo-support-dialog .quiz-card.support-explanation-context{display:block!important;position:relative!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;transform:none!important;color:inherit}
html body .matheo-support-dialog .quiz-card.support-explanation-context::before,html body .matheo-support-dialog .quiz-card.support-explanation-context::after{display:none!important}

/* Le moment de la journée reste dans le cadre de l’horloge sur téléphone. */
@media(max-width:520px){html body .quiz-card .metronomia-question-day{grid-template-columns:minmax(0,1fr);justify-items:center;box-sizing:border-box;max-width:100%}html body .quiz-card .metronomia-question-day>b{max-width:100%;box-sizing:border-box}}

/* Les points et le robot du repère ne sont pas des boutons pleine largeur. */
html body .quiz-card .cartesian-coordinate-board button.cartesian-point-cell{width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;max-width:26px!important;max-height:26px!important}
html body .quiz-card .cartesian-coordinate-board button.cartesian-draggable-token{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;max-width:48px!important;max-height:48px!important}

/* Les choix illustrés du corrigé restent lisibles dans une fenêtre étroite. */
@media(max-width:600px){html body .support-explanation-dialog .space-pattern-choice-grid{grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important}html body .support-explanation-dialog .space-pattern-choice-grid>.space-pattern-choice{width:100%!important;max-width:100%!important;min-width:0!important;aspect-ratio:auto!important}}

/* Explications aérées : titres séparés, dessins conservés. */
.support-explanation-dialog .matheo-explanation>.block,.support-explanation-dialog .feedback-procedure-line,.support-explanation-dialog .feedback-answer-line{margin-top:1rem;margin-bottom:1rem;line-height:1.65}
.support-explanation-dialog .matheo-explanation>.block>b:first-child,.support-explanation-dialog .feedback-procedure-line>b:first-child,.support-explanation-dialog .feedback-answer-line>b:first-child{display:block;margin-bottom:.45rem}

.matheo-support-dialog.support-report-dialog textarea{box-sizing:border-box;display:block;max-width:100%;}

/* Keep keyboard focus visible inside the report field despite the global accessibility outline. */
.matheo-support-dialog.support-report-dialog textarea:focus-visible{outline:2px solid #d6b36c!important;outline-offset:-4px!important}

/* Shared text layout for every planet and satellite, including chrono review.
   Only text sections are targeted; illustration dimensions are untouched. */
html body .matheo-explanation>.block,
html body .feedback-content>.feedback-procedure-line,
html body .feedback-content>.feedback-answer-line,
html body .chrono-review-answer,
html body .chrono-review-method{margin-block:1rem;line-height:1.65;overflow-wrap:break-word}
html body .matheo-explanation>.block>b:first-child,
html body .feedback-content>.block>b:first-child,
html body .chrono-review-answer>b:first-child,
html body .chrono-review-method>b:first-child,
html body .chrono-review-question details>p>b:first-child{display:block;margin-bottom:.45rem}


/* Common action bar; explicit specificity overrides historical planet styles. */
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) {display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;padding:6px 10px!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;height:auto!important;min-height:54px!important;max-height:none!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) > * {min-width:0!important;box-sizing:border-box!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) > [data-support-lab] {order:-10!important;flex:0 0 auto!important;align-self:center!important;margin:0!important;height:auto!important;min-height:44px!important;padding:4px 8px!important;gap:5px!important;width:auto!important;font-size:.78rem!important;line-height:1.2!important;white-space:nowrap!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) > [data-support-lab] img {width:22px!important;height:22px!important;flex:none!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) > [data-lab-new] {order:10!important;margin:0 0 0 auto!important;flex:0 0 auto!important;width:auto!important;height:auto!important;min-height:44px!important;padding:5px 9px!important;font-size:.78rem!important;line-height:1.2!important;white-space:normal!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) > .support-lab-content {display:flex!important;flex:1 1 0!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;min-width:0!important;width:auto!important;max-width:none!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content > span {display:none!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content > :is(p,strong,small) {display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;padding:4px 6px!important;height:auto!important;min-height:0!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.2!important;text-align:center!important;font-size:.78rem!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content > :is(p,strong,small):empty {display:none!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content > div {display:flex!important;justify-content:center!important;flex-wrap:wrap!important;gap:4px!important;min-width:0!important;max-width:100%!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content .is-correct {background:#dff4e8!important;color:#176b42!important;border:2px solid #4b9b70!important;border-radius:10px!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content .is-incorrect {background:#fff0cf!important;color:#714900!important;border:2px solid #d9a441!important;border-radius:10px!important;}
@media(max-width:560px){
 html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) {gap:4px!important;padding:5px 6px!important;}
 html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) > [data-lab-new] {max-width:100px!important;}
 html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content > :is(p,strong,small){font-size:.7rem!important;padding:3px!important;}
 html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content button{min-width:32px!important;min-height:36px!important;padding:4px 6px!important;}
}

@media(max-width:560px){
 html body #mesurium-laboratory .mesurium-mass-comparison {flex-shrink:0!important;gap:6px!important;min-height:max-content!important;}
 html body #mesurium-laboratory .mesurium-mass-comparison > b {line-height:1.25!important;margin-bottom:4px!important;}
}
@media(max-width:360px){
 html body #decimalys-position-lab .decimalys-lab-measure-chip {width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
 html body #decimalys-lab-stage svg {max-width:100%!important;}
 html body #decimoria-operation-lab {--matheo-decimoria-align-cell:32px!important;}
 html body #decimoria-operation-lab .is-choosing .decimoria-alignment-option .decimoria-alignment-head {grid-template-columns:16px 6px repeat(5,32px) 6px!important;}
 html body #decimoria-operation-lab .is-choosing .decimoria-alignment-option .decimoria-alignment-row {grid-template-columns:6px repeat(5,32px) 6px!important;}
}
@media(max-width:360px){
 html body #volumera-laboratory .volumera-three-workshop {grid-template-columns:minmax(0,1fr)!important;min-width:0!important;max-width:100%!important;}
 html body #volumera-laboratory .volumera-three-scene,
 html body #volumera-laboratory .volumera-three-panel {min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
 html body #volumera-laboratory .volumera-three-panel input {min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
}
@media(max-width:360px){
 html body #decimoria-operation-lab .decimoria-block-place-head>div,
 html body #decimoria-operation-lab .decimoria-compact-blocks,
 html body #decimoria-operation-lab .decimoria-compact-blocks.is-unknown {grid-template-columns:minmax(0,1.2fr) 10px minmax(0,1fr) minmax(0,1fr) 44px!important;min-width:0!important;}
}
@media(max-width:560px){
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer {display:flex!important;flex-direction:column!important;gap:4px!important;width:100%!important;min-width:0!important;}
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer>label {display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:3px!important;width:100%!important;min-width:0!important;font-size:10px!important;}
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer input {width:30px!important;min-width:30px!important;height:32px!important;min-height:32px!important;padding:2px!important;font-size:16px!important;box-sizing:border-box!important;}
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer>span {display:none!important;}
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer>button {width:100%!important;}
}

@media(max-width:360px){
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .decimoria-block-place-head small {font-size:9px!important;white-space:normal!important;overflow-wrap:anywhere!important;min-width:0!important;}
}
@media(max-width:560px){
 html body #decimoria-operation-lab .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer):has(.decimoria-place-answer){display:grid!important;grid-template-columns:1fr 1fr!important;}
 html body #decimoria-operation-lab .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer):has(.decimoria-place-answer)>.support-lab-content{grid-column:1/-1!important;grid-row:1!important;width:100%!important;}
 html body #decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer)>[data-support-lab]{grid-row:2;grid-column:1;justify-self:start;}
 html body #decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer)>[data-lab-new]{grid-row:2;grid-column:2;justify-self:end;}
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer{flex-direction:row!important;align-items:end!important;}
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer>label{flex-direction:column!important;width:auto!important;flex:1!important;}
 html body #decimoria-operation-lab:is(#decimoria-operation-lab) .support-lab-footer .decimoria-place-answer>button{width:auto!important;}
}

/* The response is in a column: its flex basis controls height, not width. */
#volumera-laboratory .support-lab-content > [data-lab-feedback] { flex: none; }


/* Feedback occupies only the space its text needs; hidden choices reserve no row. */
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content > :is(p,small,strong):not(:empty) {
 display:grid!important;place-items:center!important;flex:none!important;width:fit-content!important;max-width:min(100%,66ch)!important;margin:0 auto!important;text-align:center!important;
}
html body #decimalys-position-lab .support-lab-footer #decimalys-lab-choices[style*="visibility: hidden"]{display:none!important}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer)>[data-lab-new]{min-width:0!important;inline-size:max-content!important;}
html body #decimalys-position-lab#decimalys-position-lab #decimalys-lab-choices[style*="visibility: hidden"]{display:none!important}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content>div:empty{display:none!important}
/* Equal side tracks keep the result on the centerline of the whole bar. */
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer){
 display:grid!important;grid-template-columns:min(29%,110px) minmax(0,1fr) min(29%,110px)!important;
}
html body .support-lab-footer>[data-support-lab]{grid-column:1;grid-row:1;justify-self:start}
html body .support-lab-footer>.support-lab-content{grid-column:2;grid-row:1}
html body .support-lab-footer>[data-lab-new]{grid-column:3;grid-row:1;justify-self:end;max-width:100%!important}
@media(max-width:560px){
 html body #decimoria-operation-lab .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer):has(.decimoria-place-answer){grid-template-columns:min(29%,100px) minmax(0,1fr) min(29%,100px)!important}
 html body #decimoria-operation-lab .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer):has(.decimoria-place-answer)>.support-lab-content{display:contents!important}
 html body #decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer) #decimoria-lab-choices{grid-column:1/-1;grid-row:1}
 html body #decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer) #decimoria-lab-feedback{grid-column:2;grid-row:2}
 html body #decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer)>[data-lab-new]{grid-column:3}
}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer){grid-template-areas:none!important;grid-template-rows:auto!important;}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer)>[data-support-lab]{grid-area:1 / 1!important}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer)>.support-lab-content{grid-area:1 / 2!important;justify-self:stretch!important}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer)>[data-lab-new]{grid-area:1 / 3!important}
@media(max-width:560px){
html body #decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer):is(#lab-footer-layout,.support-lab-footer)>[data-support-lab]{grid-area:2 / 1!important}
html body #decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer):is(#lab-footer-layout,.support-lab-footer)>[data-lab-new]{grid-area:2 / 3!important}
}
@media(max-width:560px){
 html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer)>[data-lab-new]{max-width:100%!important;inline-size:fit-content!important;margin:0!important;justify-self:end!important}
 html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer)>[data-support-lab]{max-width:100%!important;padding-inline:4px!important}
 html body #decimoria-operation-lab#decimoria-operation-lab .support-lab-footer:has(.decimoria-place-answer) #decimoria-lab-feedback{grid-area:2 / 2!important;justify-self:center!important;align-self:center!important}
}
html body #decimoria-operation-lab#decimoria-operation-lab.is-fullscreen{grid-template-rows:auto auto auto minmax(0,1fr) auto max-content!important}

/* Use the full space between the two actions for the response. */
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer){
 grid-template-columns:max-content minmax(0,1fr) max-content!important;column-gap:4px!important;
}
html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer) .support-lab-content>:is(p,small,strong):not(:empty){
 width:100%!important;max-width:none!important;text-align:center!important;place-items:center!important;
}
@media(max-width:560px){
 html body .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer)>[data-lab-new]{max-width:100px!important}
}
@media(max-width:560px){
 html body #decimoria-operation-lab .support-lab-footer:is(#lab-footer-layout,.support-lab-footer):is(#lab-footer-layout,.support-lab-footer):has(.decimoria-place-answer){grid-template-columns:max-content minmax(0,1fr) max-content!important}
}

/* Thermoria : la consigne et les commandes occupent leur hauteur réelle. */
html body #thermoria-laboratory #thermoria-lab-stage {
  min-height: 0;
  overflow-y: auto !important;
}
html body #thermoria-laboratory .thermoria-lab-workspace {
  height: auto !important;
  min-height: 100% !important;
  grid-auto-rows: auto;
}
html body #thermoria-laboratory .thermoria-lab-panel {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  height: auto !important;
  overflow: visible !important;
}
html body #thermoria-laboratory .thermoria-lab-panel > * {
  flex: 0 0 auto;
}
html body #thermoria-laboratory .thermoria-lab-controls {
  align-content: start;
  grid-auto-rows: max-content;
}

.support-flag-tip[popover] {
  position: fixed; inset: auto; margin: 0; padding: 4px 8px;
  border: 1px solid #87cddd; border-radius: 6px;
  background: #12283e; color: white; font: 600 13px/1.4 system-ui;
  white-space: nowrap; pointer-events: none;
}
/* Une vue complète : la sonde utilise la hauteur disponible après les commandes. */
html body #thermoria-laboratory #thermoria-lab-stage {
  display:grid;grid-template-rows:minmax(0,1fr);box-sizing:border-box;
}
html body #thermoria-laboratory .thermoria-lab-workspace {
  grid-template-rows:minmax(0,1fr)!important;
  min-height:0!important;height:100%!important;box-sizing:border-box;
}
html body #thermoria-laboratory .thermoria-lab-panel {
  padding:8px!important;gap:6px!important;
}
html body #thermoria-laboratory .thermoria-lab-controls {gap:6px!important;}
html body #thermoria-laboratory .thermoria-choice-row {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;
}
@media (max-width:700px) {
  html body #thermoria-laboratory .thermoria-lab-workspace {
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr) max-content!important;
  }
  html body #thermoria-laboratory .thermoria-lab-visual:is(:has(svg),:not(:has(svg))) {
    height:100%!important;min-height:0!important;box-sizing:border-box;
  }
}
