.gmc{--gmc-gold:#d8bf83;overflow:hidden;border:1px solid #ccb583;border-radius:18px;background:#172c27;color:#f7efd8;box-shadow:0 12px 36px #17271c24;font-family:Georgia,'Times New Roman',serif;isolation:isolate}

.gmc *{box-sizing:border-box}

.workspace.with-teacher-stage .teacher-portrait{display:none}

.gmc-toolbar,.gmc-footer{display:flex;align-items:center;gap:12px;padding:11px 18px;background:linear-gradient(90deg,#1b352e,#253e30);font-family:system-ui,sans-serif;flex-shrink:0}

.gmc-brand{margin-right:auto;color:#efdfb7;font-weight:650;font-size:14px;letter-spacing:.04em}

.gmc select,.gmc button{width:auto;min-height:36px;margin:0;padding:6px 12px;border:1px solid #bda77180;border-radius:8px;background:#243b32;color:#fff5d9;font:inherit;font-size:13px;cursor:pointer}

.gmc button:disabled{opacity:.5;cursor:default}

.gmc button:hover:not(:disabled),.gmc select:hover{background:#385544}

.gmc :focus-visible{outline:3px solid #ffdb7f;outline-offset:3px}

.gmc-scene{position:relative;aspect-ratio:1672/941;overflow:hidden;container-type:inline-size;background:#253d31}

.gmc-background{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}

/* Coordinates measured against the supplied 1672 × 941 classroom plate. */

.gmc-board{position:absolute;left:8.3732%;top:14.8778%;width:56.8182%;height:45.6961%;padding:1.15% 1.6%;overflow:auto;scrollbar-color:#b5c09d80 transparent;color:#f6f2d9;text-shadow:0 1px 2px #0008;overscroll-behavior:contain}

.gmc-title{margin:0 0 .65em;color:#f4dc9a;font:600 clamp(12px,2.45cqw,38px)/1.18 Georgia,'Times New Roman',serif;white-space:pre-wrap;overflow-wrap:anywhere}

.gmc-title:empty{display:none}

.gmc-writing{font-size:clamp(11px,1.85cqw,30px);line-height:1.4}

.gmc-line{margin:0 0 .7em;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;letter-spacing:.01em}

.gmc-line[hidden]{display:none!important}

.gmc-question-list{font-size:1.65cqw;line-height:1.3;margin-bottom:0}

.gmc-question-instructions{display:block;margin-bottom:.45em}

.gmc-question-examples{display:block;columns:2;column-gap:1.3em}

.gmc-question-example{display:block;break-inside:avoid;margin-bottom:.18em}

.gmc-line[data-kind=heading]{color:#f4dc9a;font-weight:700;font-size:1.14em}

.gmc-line[data-kind=example]{padding-left:.7em;border-left:2px solid #e8cf8966;font-style:italic}

.gmc-line[data-kind=rule]{border:1px solid #e6d7a673;padding:.45em .65em;border-radius:4px}

.gmc-line[data-zone=center]{text-align:left}

.gmc-line[data-zone=right]{text-align:right}

.gmc-board[data-density=medium] .gmc-writing{font-size:clamp(11px,1.6cqw,25px)}

.gmc-board[data-density=dense] .gmc-writing{font-size:clamp(11px,1.4cqw,22px)}

.gmc-character{position:absolute;right:6%;bottom:-2%;width:36%;height:85.3%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 10px 10px #081a1744)}

.gmc-character.gmc-character-wide{width:48%;right:0%}

.gmc-particles{position:absolute;left:12%;top:33%;width:55%;height:8%;pointer-events:none;opacity:0}

.gmc-particles i{position:absolute;left:calc(var(--i)*7%);top:calc(mod(var(--i),3)*20%);width:5px;height:5px;border-radius:50%;background:#fff3bb;box-shadow:0 0 7px 3px #f4ce78,0 0 22px #cbeefa}

.gmc-particles.gmc-sparking{opacity:1}

.gmc-sparking i{animation:gmc-spark .75s ease-out both;animation-delay:calc(var(--i)*18ms)}

@keyframes gmc-spark{0%{opacity:0;transform:translate(50px,0) scale(.4)}25%{opacity:1}100%{opacity:0;transform:translate(-35px,-38px) scale(.1)}}

.gmc-status{flex:1;font-size:13px;color:#e7e6cf}

.gmc-footer{flex-wrap:wrap}

.gmc-oral-controls{display:flex;flex-wrap:wrap;gap:8px;flex-basis:100%;padding-top:2px}

.gmc-oral-controls .gmc-oral-command{min-height:36px;font-size:12px}

.gmc-oral-controls [data-intent=start-oral]{border-color:#dfc582;background:#385544}

.gmc[data-style=immersive] .gmc-toolbar{background:#101f1bcc}

.gmc[data-style=immersive] .gmc-scene{box-shadow:inset 0 0 80px #071a1855}

.gmc[data-style=immersive] .gmc-background{filter:saturate(1.12) brightness(.95)}

.gmc[data-style=focus] .gmc-scene{aspect-ratio:16/10}

.gmc[data-style=focus] .gmc-background{filter:brightness(.55) blur(2px)}

.gmc[data-style=focus] .gmc-board{left:4%;top:6%;width:74%;height:87%;padding:3%;border:5px ridge #b99958;background:#171c1cee;box-shadow:0 6px 30px #0004;border-radius:5px}

.gmc[data-style=focus] .gmc-character{width:29%;height:69%;right:-3%;bottom:-1%}

.gmc[data-style=focus] .gmc-character.gmc-character-wide{width:38.6666667%;right:-7.8333333%}

.gmc[data-style=focus] .gmc-writing{font-size:clamp(14px,2.3cqw,33px)}

.gmc:fullscreen{width:100vw;height:100dvh;border:0;border-radius:0;display:flex;flex-direction:column;justify-content:safe center;background:#101c17;overflow:auto}

.gmc:fullscreen .gmc-scene{flex:none;width:min(100vw,calc((100dvh - 164px)*1672/941));margin:auto;max-height:calc(100dvh - 164px)}

.gmc:fullscreen[data-style=focus] .gmc-scene{width:min(100vw,calc((100dvh - 164px)*1.6))}

@media(max-width:600px){.gmc-toolbar,.gmc-footer{padding:8px;gap:7px;flex-wrap:wrap}.gmc-brand{flex-basis:100%;font-size:12px}.gmc select,.gmc button{font-size:12px}.gmc-status{font-size:12px}.gmc-board{padding:1%}.gmc-title{font-size:clamp(11px,2.7cqw,18px)}}

@media(prefers-reduced-motion:reduce){.gmc-particles{display:none}.gmc *{animation:none!important;transition:none!important}}



.gmc.gmc-viewport-fullscreen{position:fixed;inset:0;z-index:10000;width:100vw;height:100dvh;margin:0;border:0;border-radius:0;display:flex;flex-direction:column;background:#101c17;overflow:auto}

.gmc-viewport-fullscreen .gmc-scene{flex:none;width:min(100vw,calc((100dvh - 164px)*1672/941));margin:auto;max-height:calc(100dvh - 164px)}



/* Decorative word illustration gets its own column; source text remains intact. */

.gmc-illustration[hidden]{display:none}

.gmc-board[data-illustrated]{display:grid;grid-template-columns:minmax(0,1fr) minmax(35px,21%);column-gap:3%;align-content:start;align-items:start}

.gmc-board[data-illustrated] .gmc-title{grid-column:1 / -1}

.gmc-board[data-illustrated] .gmc-writing{grid-column:1;grid-row:2;min-width:0}

.gmc-illustration{grid-column:2;grid-row:2;margin:0;position:sticky;top:0;text-align:center;align-self:start}

.gmc-illustration img{display:block;width:100%;height:auto;max-height:180px;object-fit:contain;filter:drop-shadow(0 2px 4px #0005)}

.gmc-illustration figcaption{font:600 clamp(10px,1.35cqw,19px)/1.2 Georgia,serif;color:#f4dc9a;text-shadow:0 1px 2px #000}


.gmc[data-motion90=active] .gmc-character{display:none!important}
.gmc-motion-target{position:absolute;pointer-events:none;border-bottom:2px solid #efce79;border-radius:2px;box-shadow:0 2px 5px #edcf7040;z-index:4}
.gmc-motion-target[hidden]{display:none}


.gmc-footer [hidden]{display:none!important}



/* Les images GPU des réponses remplacent le personnage de pointage. */

.gmc.gmc-realtime-lipsync .gm90-canvas,

.gmc.gmc-realtime-lipsync .gmc-motion-target{visibility:hidden!important}

.gmc.gmc-realtime-lipsync .gmc-character{display:block!important;z-index:5}



/* La scène complète est opaque ; seuls les textes restent au-dessus. */

.gmc.gmc-fullscene .gmc-character.gmc-character-fullscene{left:0;top:0;right:auto;bottom:auto;width:100%;height:100%;object-fit:fill;filter:none;z-index:1}

.gmc.gmc-fullscene .gmc-board{z-index:2}

.gmc.gmc-fullscene .gmc-particles{z-index:3}


/* Approved lesson-3 plate: safe writing rectangle measured on 2304 x 1296.
   Select it before health resolves, so loading and live replies match the film.
   Focus retains its deliberately independent enlarged-board presentation. */
.gmc[data-asset-profile="cm1-lesson3-v1"]:not([data-style=focus]) .gmc-board{left:8.897569%;top:17.361111%;width:59.027778%;height:52.854938%;padding:0}
.gmc[data-asset-profile="cm1-lesson3-v1"]:not([data-style=focus]) .gmc-scene{aspect-ratio:16/9}
.gmc[data-asset-profile="cm1-lesson3-v1"]:not([data-style=focus]) .gmc-background{filter:none}

/* Smartphone fullscreen: controls overlay the picture, never reserve a footer row. */
@media (max-width:600px), (pointer:coarse) and (max-height:600px) {
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen){position:fixed;inset:0;overflow:hidden;justify-content:center;height:100dvh}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-scene{flex:none;width:min(100vw,calc(100dvh * 1672 / 941));max-height:100dvh;margin:auto}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen)[data-style=focus] .gmc-scene{width:min(100vw,calc(100dvh * 1.6))}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-toolbar{position:absolute;z-index:50;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));padding:0;background:none}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-toolbar .gmc-brand,
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-toolbar .gmc-style{display:none}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-footer{position:absolute;z-index:50;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));width:min(360px,calc(100% - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)));display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px;border-radius:12px;background:#10251de6;max-height:calc(100dvh - 76px);overflow:auto}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-oral-controls{display:contents}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) button{min-height:44px;font-size:12px;line-height:1.2;padding:8px;white-space:normal;touch-action:manipulation}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-question-shortcut{grid-column:1/-1;background:#385544;font-weight:600}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-status{grid-column:1/-1;font-size:11px}
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-footer>label,
 .gmc:is(:fullscreen,.gmc-viewport-fullscreen) .gmc-footer>.muted{display:none}
}

/* Voice-only replies retain lesson 5's approved close classroom framing. */
.gmc[data-dialogue-decor="close-v1"]:not([data-style=focus]) .gmc-board{left:4.1%;top:13.4%;width:65.7%;height:75.1%}
.gmc[data-dialogue-decor="close-v1"]:not([data-style=focus]) .gmc-background{filter:none}
