.erhm-root{max-width:920px;margin:18px auto;border:3px solid #56452f;border-radius:10px;overflow:hidden;background:#f3e6c7;color:#2b251c;font:16px system-ui,sans-serif}.erhm-stage{width:100%;aspect-ratio:16/9;background:#cbb48a}.erhm-stage canvas{display:block;max-width:100%}.erhm-ui{padding:16px}.erhm-objective{font-weight:600}.erhm-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.erhm-actions button,.erhm-reset{border:1px solid #755a3a;border-radius:5px;padding:9px 12px;background:#fff6df;color:#28251d;cursor:pointer}.erhm-actions small{width:100%}.erhm-message{min-height:1.4em}.erhm-reset{margin-top:8px}
.erhm-prompt{min-height:1.5em;font-weight:700;color:#244c3b}.erhm-inventory{font-size:14px;border-top:1px solid #a99270;padding-top:9px}.erhm-choices{display:grid;gap:8px;width:100%;margin:8px 0}.erhm-choices button{text-align:left}.erhm-ui details{margin:10px 0;padding:8px;border:1px solid #b69d78;border-radius:6px}.erhm-ui summary{cursor:pointer;font-weight:650}.erhm-dev{background:#e5efe5}.erhm-dev select{max-width:100%;padding:7px}.erhm-dev button{margin-left:8px}.erhm-ui button:focus-visible,.erhm-ui select:focus-visible{outline:3px solid #256b84;outline-offset:2px}
.erhm-creator{max-width:780px;padding:22px;background:#f5e9ce;border:2px solid #735c3b;border-radius:12px;color:#2a271f}.erhm-creator form{display:grid;gap:14px}.erhm-creator label{display:grid;gap:5px;font-weight:600}.erhm-creator input,.erhm-creator textarea,.erhm-creator select{width:100%;box-sizing:border-box;padding:10px;border:1px solid #806a49;border-radius:5px;background:#fff;color:#222}.erhm-creator textarea{min-height:90px}.erhm-creator button{padding:12px;background:#275c4e;color:#fff;border:0;border-radius:6px;font-weight:700;cursor:pointer}

.erhm-creator{max-width:850px}.erhm-creator form{display:grid;gap:12px}.erhm-creator form label{display:grid;gap:4px}.erhm-creator input,.erhm-creator textarea,.erhm-creator select{max-width:100%;padding:8px}.erhm-creator textarea{min-height:100px}.erhm-creator li{margin:12px 0}.erhm-preview-warning{padding:10px;background:#fff2c5;color:#624600;font-weight:bold}

.erhm-private-preview{margin:20px 0;padding:12px;border:2px dashed #6b8475;border-radius:8px}.erhm-preview-warning{font-weight:700;background:#fff3cf;color:#604500;padding:10px}.erhm-creator ul li{margin:6px 0}

.erhm-map-editor{margin:18px 0;padding:12px;border:1px solid #9ca3af;border-radius:8px}.erhm-map-controls{margin:8px 0}.erhm-coordinate{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:5px 0}.erhm-coordinate label{display:inline-flex;align-items:center;gap:4px}.erhm-coordinate input{width:72px!important;min-width:0!important}.erhm-map-grid{display:grid;grid-template-columns:repeat(20,minmax(0,1fr));max-width:800px;aspect-ratio:20/12;border:2px solid #675b4a;background:#e7d7ac}.erhm-map-cell{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;padding:0!important;border:1px solid #c5b18b!important;border-radius:0!important;background:transparent!important;font-size:clamp(8px,1.5vw,18px);cursor:pointer}.erhm-map-cell:hover,.erhm-map-cell:focus-visible{outline:2px solid #0b6e75;outline-offset:-2px;background:#c8e4df!important}.erhm-map-cell.erhm-map-occupied{background:#d1e7ce!important}.erhm-map-error{min-height:1.3em}

.erhm-map-cell.erhm-map-blocked{background:#b7a080!important}.erhm-map-cell.erhm-map-blocked:hover{background:#a48c68!important}

.erhm-route-report{padding:8px;font-weight:600;color:#23613b}.erhm-route-report.erhm-route-invalid{color:#a02f27}.erhm-check-route{margin:8px 0}

.erhm-map-quick-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.erhm-map-quick-actions button{padding:7px 11px}.erhm-map-grid{touch-action:pan-y}.erhm-map-cell{user-select:none;-webkit-user-select:none}

.erhm-interior-editor{margin:18px 0;padding:15px;border:2px solid #8b7659;border-radius:10px}.erhm-interior-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:3px;max-width:520px;margin:12px 0}.erhm-interior-grid .erhm-map-cell{min-width:0;aspect-ratio:1;display:grid;place-items:center;background:#e8d9ba;border:1px solid #b9a47f;border-radius:3px;cursor:pointer}.erhm-interior-grid .erhm-map-cell.erhm-map-occupied{background:#b5d9c5}.erhm-interior-editor label{display:block;margin:8px 0}

.erhm-steps{margin:16px 0;padding:14px;border:1px solid #b6a28a;border-radius:9px}.erhm-step{padding:12px;margin:10px 0;background:#f5f0e6;border-radius:8px}.erhm-step h4{margin:0 0 8px}.erhm-step textarea{min-height:70px}

/* Québec 1608 — cinematic premium entry, scoped to this scenario. */
.erhm-root:has(.erhm-premium-intro){position:relative;border:2px solid #9b7849;border-radius:16px;background:#182e2b;color:#f4e7cc;box-shadow:0 16px 45px #0a1a1980}
.erhm-root:has(.erhm-premium-intro) .erhm-ui{background:linear-gradient(130deg,#203a34,#172a2c);color:#f6ead2}
.erhm-root:has(.erhm-premium-intro) .erhm-objective{color:#f6dc9c}
.erhm-root:has(.erhm-premium-intro) .erhm-prompt{color:#c4e7d1}
.erhm-root:has(.erhm-premium-intro) .erhm-ui details{border-color:#8b795b}
.erhm-premium-intro{position:absolute;inset:0 0 auto 0;aspect-ratio:16/9;z-index:50;display:grid;place-items:center;background:#172d31 url("quebec-1608-premium-cover.svg") center/cover no-repeat;isolation:isolate}
.erhm-premium-intro:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0e222be8 0%,#0e222bd1 38%,#0e222b55 77%,#0e222b38 100%);z-index:-1}
.erhm-premium-veil{width:min(85%,720px);padding:clamp(10px,2.5vw,28px);color:#f5ead4;text-shadow:0 2px 12px #0009}
.erhm-premium-kicker{font-size:clamp(9px,1.1vw,13px);letter-spacing:.22em;color:#e8cb86;font-weight:800}
.erhm-premium-veil h2{font-family:Georgia,serif;font-size:clamp(38px,7vw,90px);line-height:1;margin:12px 0 3px;letter-spacing:.04em;color:#fff1ce}
.erhm-premium-veil h2 em{color:#edcb7e;font-style:normal}
.erhm-premium-subtitle{font:italic clamp(16px,2.3vw,29px) Georgia,serif!important;color:#f0d39d;margin:4px 0 12px!important}
.erhm-premium-veil>p:not(.erhm-premium-subtitle){max-width:530px;font-size:clamp(11px,1.45vw,17px);line-height:1.55;margin:0 0 12px}
.erhm-premium-features{display:flex;flex-wrap:wrap;gap:7px 18px;font-size:clamp(10px,1.2vw,14px);color:#f6dba1;margin:12px 0}
.erhm-premium-play{border:1px solid #f3d797!important;border-radius:8px!important;padding:clamp(10px,1.5vw,16px) clamp(14px,2.5vw,32px)!important;background:linear-gradient(#f2d596,#c69c56)!important;color:#20342f!important;font-size:clamp(11px,1.4vw,16px)!important;font-weight:900!important;letter-spacing:.07em;cursor:pointer;box-shadow:0 4px 0 #76552e,0 9px 20px #0006}
.erhm-premium-play:hover{filter:brightness(1.1)}.erhm-premium-play:focus-visible{outline:3px solid white;outline-offset:4px}
.erhm-premium-veil small{display:block;margin-top:12px;color:#f3e3c7;font-size:clamp(10px,1.1vw,13px)}
.erhm-premium-intro--hidden{display:none}
@media(max-width:550px){.erhm-premium-veil{width:94%;padding:7px}.erhm-premium-veil h2{margin:3px 0}.erhm-premium-features{margin:5px 0}.erhm-premium-veil small{margin-top:6px}}

/* Québec 1608 : historical artifact inspection, scoped to the game. */
.erhm-root .erhm-historical-card{width:100%;box-sizing:border-box;padding:18px 22px;border:2px solid #a87939;border-radius:12px;background:repeating-linear-gradient(0deg,#f5e7c8,#f5e7c8 5px,#f1dfb9 6px);color:#382719;box-shadow:inset 0 0 0 4px #e7c990,0 8px 24px #0004}
.erhm-root .erhm-historical-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.erhm-root .erhm-historical-head h3{font-family:Georgia,serif;font-size:clamp(18px,2.5vw,26px);margin:0}
.erhm-root .erhm-historical-art{display:flex;align-items:center;justify-content:center;margin:10px auto;width:min(100%,240px);height:90px;border-block:1px solid #c4a372;color:#8e6133;font:70px Georgia,serif;background:radial-gradient(ellipse,#fff2cf,#ecd2a0)}
.erhm-root .erhm-historical-copy{font:17px/1.55 Georgia,serif;margin:12px 0}
.erhm-root .erhm-historical-tip{font-size:13px;color:#705537;margin:8px 0 0}
.erhm-root .erhm-historical-close{white-space:nowrap}
@media(max-width:600px){.erhm-root .erhm-historical-card{padding:12px}.erhm-root .erhm-historical-art{height:65px;font-size:48px}}

/* Illustrations historiques premium, dimensionnées pour Chromebook */
.erhm-root .erhm-historical-art:has(img){height:auto;max-width:560px;overflow:hidden;border:3px solid #956a3f;border-radius:9px;background:#4b3326;box-shadow:0 5px 18px #39251766}
.erhm-root .erhm-historical-art img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:cover}
@media(max-width:600px){.erhm-root .erhm-historical-art:has(img){height:auto}}

/* v6.82.9 — question d'exploration consultable dans les fiches historiques */
.erhm-root .erhm-historical-question{border:1px solid #b18b50;border-radius:8px;background:#fff2d6;padding:10px 14px;margin-top:12px;color:#402b1b}
.erhm-root .erhm-historical-question summary{cursor:pointer;font-weight:700;line-height:1.45}
.erhm-root .erhm-historical-question p{margin:9px 0 0;line-height:1.5}

/* v6.83.0 — Repères et commandes de l’atelier intérieur */
.erhm-indoor-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:10px 0}.erhm-indoor-actions button{padding:7px 13px;border-radius:7px;border:1px solid #76654c;background:#fff9ec;color:#2c3028;cursor:pointer}.erhm-indoor-actions button:disabled{opacity:.45;cursor:not-allowed}.erhm-indoor-count{font-weight:600;color:#46584d}.erhm-indoor-grid .erhm-map-cell:focus-visible{outline:3px solid #1473a5;outline-offset:2px;z-index:2}.erhm-indoor-grid .erhm-map-cell.erhm-indoor-door{background:#e3b67c}.erhm-interior-editor .erhm-indoor-status{min-height:1.5em;font-weight:600}

/* Multi-page historical documents — Chromebook-friendly controls */
.erhm-historical-pager{display:flex;gap:.7rem;justify-content:space-between;align-items:center;flex-wrap:wrap;margin:1rem 0}.erhm-historical-pager button{min-height:44px;padding:.55rem .8rem;border-radius:8px}.erhm-historical-pager span{font-weight:700}.erhm-object-pages-help{font-size:.88rem;line-height:1.4}

/* 6.84.11 — interface de jeu visible sans défilement de la page (Chromebook). */
@media (min-width:700px) {
 .erhm-root {display:flex;flex-direction:column;height:min(92dvh,850px);min-height:480px;overflow:hidden;}
 .erhm-root .erhm-stage {flex:1 1 auto;min-height:0;aspect-ratio:auto;display:flex;align-items:center;justify-content:center;overflow:hidden;}
 .erhm-root .erhm-stage canvas {max-width:100%;max-height:100%;width:auto!important;height:auto!important;object-fit:contain;}
 .erhm-root .erhm-ui {flex:0 0 auto;max-height:min(38dvh,310px);overflow-y:auto;overscroll-behavior:contain;padding:12px 16px;}
 .erhm-root .erhm-ui .erhm-actions {position:sticky;bottom:0;z-index:3;padding:8px 0;background:#f3e6c7;}
}
@media (max-width:699px) {
 .erhm-root .erhm-ui {padding:12px;}
}

/* v6.84.13 — Dialogues RPG superposés au monde, contraste élevé. */
.erhm-root .erhm-stage{position:relative;isolation:isolate}
.erhm-root .erhm-stage>.erhm-actions{display:none;position:absolute;z-index:25;left:clamp(8px,3%,28px);right:clamp(8px,3%,28px);bottom:clamp(8px,3%,22px);box-sizing:border-box;max-height:min(56%,330px);overflow-y:auto;overscroll-behavior:contain;padding:clamp(12px,2vw,20px);border:2px solid #d8b77c;border-radius:12px;background:#102b2cF5;color:#fff6df;box-shadow:0 12px 36px #071717c9;align-items:stretch;gap:9px;line-height:1.5}
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open{display:flex;flex-direction:column}
.erhm-root .erhm-stage>.erhm-actions strong{display:block;color:#ffe0a2;font-size:clamp(15px,1.8vw,20px)}
.erhm-root .erhm-stage>.erhm-actions p,.erhm-root .erhm-stage>.erhm-actions small{color:#fff6df!important;opacity:1!important;margin:2px 0;font-size:clamp(13px,1.5vw,17px);line-height:1.55}
.erhm-root .erhm-stage>.erhm-actions button{background:#f5e3b9!important;color:#182a29!important;border:1px solid #b69253!important;border-radius:8px!important;font-size:clamp(12px,1.3vw,15px);font-weight:700;min-height:38px;padding:9px 12px;white-space:normal;text-align:left}
.erhm-root .erhm-stage>.erhm-actions button:hover{background:#fff2d5!important}
.erhm-root .erhm-stage>.erhm-actions button:focus-visible{outline:3px solid #fff!important;outline-offset:2px}
.erhm-root .erhm-stage>.erhm-actions .erhm-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:8px;margin:5px 0}
.erhm-root .erhm-stage>.erhm-actions .erhm-historical-card{max-height:none;overflow:visible;color:#382719}
.erhm-root .erhm-stage>.erhm-actions .erhm-historical-card p{color:#382719!important}
@media(max-width:699px){.erhm-root .erhm-stage>.erhm-actions{max-height:70%;left:7px;right:7px;bottom:7px;padding:10px}.erhm-root .erhm-stage>.erhm-actions button{min-height:40px}}

/* v6.84.20 — Lecteur de découvertes compact, en deux étapes, au-dessus du jeu. */
.erhm-root .erhm-stage>.erhm-actions:has(.erhm-reader){max-height:min(78%,490px);overflow-y:auto;padding:10px;background:#102b2cf5}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader{width:100%;max-height:none;overflow:visible;padding:clamp(12px,2vw,18px);background:#f2e2bd;color:#322519;border:2px solid #cba46b;box-shadow:inset 0 0 0 3px #ead3a0,0 8px 24px #0005}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-historical-head h3{font-size:clamp(17px,2vw,23px);color:#382719}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-historical-art{width:min(100%,310px);max-height:115px;margin:7px auto;overflow:hidden}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-historical-art img{height:110px;aspect-ratio:auto;object-fit:cover}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-historical-copy{font-size:clamp(14px,1.5vw,17px);line-height:1.5;margin:8px 0;color:#322519!important}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-reader-footer{display:flex;justify-content:flex-end;margin-top:12px}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-reader-question h4{color:#302519;font-size:clamp(16px,1.8vw,20px);margin:8px 0 14px}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-reader-question .erhm-reader-kicker{color:#77512c!important;font-weight:700}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-reader-answer{color:#302519!important;background:#fff4d8;padding:12px;border-left:4px solid #a7793e;border-radius:6px}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader button:disabled{opacity:.55;cursor:not-allowed}
.erhm-root .erhm-stage>.erhm-actions .erhm-reader [hidden]{display:none!important}
@media(max-height:650px){.erhm-root .erhm-stage>.erhm-actions:has(.erhm-reader){max-height:85%}.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-historical-art{max-height:70px}.erhm-root .erhm-stage>.erhm-actions .erhm-reader .erhm-historical-art img{height:65px}}

/* 6.84.21 — portrait panel and character differentiation; no physics changes */
.erhm-root .erhm-stage>.erhm-actions .erhm-character-heading{display:flex;align-items:center;gap:14px;padding:8px 12px;border:1px solid #d5af69;border-radius:10px;background:linear-gradient(110deg,#244047,#122c32);color:#f8e6c4}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-details{display:flex;flex-direction:column;gap:3px}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-details small{color:#f0c983!important;font-size:11px;letter-spacing:.12em}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-details strong{color:#ffe0a2;font-size:19px}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-portrait{width:64px;height:64px;flex:none;border-radius:10px;border:2px solid #d7af66;background:radial-gradient(ellipse at 50% 40%,#e6b589 0 15%,transparent 16%),linear-gradient(155deg,#273c6a 25%,#4565a1 55%,#182b44 56%);position:relative;overflow:hidden}
.erhm-root .erhm-stage>.erhm-actions .erhm-portrait-champlain:before{content:'';position:absolute;top:12px;left:10px;width:44px;height:11px;background:#292a38;border-radius:50%;box-shadow:0 -9px 0 -1px #343747}
.erhm-root .erhm-stage>.erhm-actions .erhm-portrait-champlain:after{content:'';position:absolute;top:1px;left:43px;width:7px;height:26px;background:#f3e9c9;transform:rotate(23deg);border-radius:80% 20% 80% 10%}
@media(max-width:600px){.erhm-root .erhm-stage>.erhm-actions .erhm-character-portrait{width:48px;height:48px}.erhm-root .erhm-stage>.erhm-actions .erhm-character-details strong{font-size:16px}}

/* v6.84.22 — Each interior uses the entire Phaser viewport instead of a small room
   surrounded by the exterior's empty canvas. FIT preserves the whole room on Chromebook. */
.erhm-root .erhm-stage canvas{object-fit:contain}

/* v6.84.32 — premium, accessible RPG dialogue layout, reusable for student NPCs */
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open{border:2px solid #d7b36e;border-radius:18px;background:linear-gradient(145deg,rgba(12,31,38,.98),rgba(24,52,56,.97));box-shadow:0 22px 65px #000b, inset 0 0 0 1px #ffffff1b;backdrop-filter:blur(9px);padding:clamp(14px,2vw,24px);gap:12px}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-heading{background:linear-gradient(110deg,#253d45,#122831);border-color:#d2ae6b;border-radius:13px;padding:12px;gap:16px}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-portrait{width:90px;height:90px;background:#233c41;border-radius:12px;display:grid;place-items:center;box-shadow:inset 0 0 0 2px #e7c88933;overflow:hidden}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-portrait img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;display:block}
.erhm-root .erhm-stage>.erhm-actions .erhm-portrait-fallback{background:linear-gradient(145deg,#365a63,#182e36)}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-details small{color:#e8c784!important;font-size:12px;letter-spacing:.1em}
.erhm-root .erhm-stage>.erhm-actions .erhm-character-details strong{font-size:clamp(17px,2vw,23px);line-height:1.25}
.erhm-root .erhm-stage>.erhm-actions>p{font-size:clamp(15px,1.7vw,18px);line-height:1.65}
.erhm-root .erhm-stage>.erhm-actions button{transition:background .15s ease,border-color .15s ease;cursor:pointer}
@media(max-width:650px){.erhm-root .erhm-stage>.erhm-actions .erhm-character-portrait{width:62px;height:62px}.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open{max-height:75%;padding:10px}}
@media(prefers-reduced-motion:reduce){.erhm-root .erhm-stage>.erhm-actions button{transition:none}}

/* v6.84.65 — Dialogue expressions, respects reduced motion. */
.erhm-root .erhm-expression-label{display:inline-block;margin-top:5px;padding:3px 9px;border:1px solid #b9a477;border-radius:12px;color:#f3dca7;font-size:12px}
.erhm-root .erhm-expression-proud{border-color:#f6cd70!important;box-shadow:0 0 0 3px #e2b74a33,0 0 25px #e2b74a55!important;animation:erhm-celebrate .65s ease-out}
.erhm-root .erhm-expression-thoughtful{border-color:#a2c8d2!important;animation:erhm-reflect 2.5s ease-in-out infinite}
.erhm-root .erhm-expression-explaining{border-color:#d9b773!important;animation:erhm-explain .65s ease-out}
@keyframes erhm-celebrate{0%{transform:scale(.92)}60%{transform:scale(1.05)}100%{transform:scale(1)}}
@keyframes erhm-reflect{0%,100%{filter:brightness(1)}50%{filter:brightness(.84)}}
@keyframes erhm-explain{0%{transform:translateY(5px);opacity:.5}100%{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.erhm-root .erhm-expression-proud,.erhm-root .erhm-expression-thoughtful,.erhm-root .erhm-expression-explaining{animation:none}}

/* 6.84.84 : lancement de démonstration et aide toujours accessible */
.erhm-classroom-demo{max-width:1100px;margin:20px auto;font-family:system-ui,sans-serif}
.erhm-classroom-heading{padding:22px 24px;border-radius:16px;background:linear-gradient(125deg,#153b3c,#28534a);color:#fff4d9}
.erhm-classroom-heading h2{margin:8px 0;font-size:clamp(1.5rem,3vw,2.5rem);color:#fff4d9}
.erhm-classroom-eyebrow{font-size:.78rem;letter-spacing:.13em;font-weight:800;color:#e9c783}
.erhm-classroom-controls{font-weight:700;color:#fff0c2}
.erhm-teacher-check{margin:14px 0;padding:14px;border:2px solid #b38a49;border-radius:12px;background:#fff7e6;color:#332916}
.erhm-teacher-check summary{font-weight:800;cursor:pointer}
.erhm-quick-guide{border:2px solid #ba9b65!important;background:#fff4d7;color:#26372e!important;border-radius:10px!important;padding:10px 14px!important}
.erhm-quick-guide summary{color:#173e39!important;font-weight:800!important}
.erhm-quick-guide p{color:#26372e!important;line-height:1.5}
@media(max-width:640px){.erhm-classroom-heading{padding:16px}.erhm-classroom-controls{font-size:.9rem}}

/* v6.85.0 — message de démarrage lisible sur Chromebook */
.erhm-startup-error{display:block;max-width:640px;margin:24px auto;padding:20px;background:#fff7ed;color:#7c2d12;border:2px solid #ea580c;border-radius:12px;font-weight:700;line-height:1.5}

/* v6.85.0 — make both the exterior and full-room interiors use the available stage. */
.erhm-classroom-demo{max-width:1280px;width:100%;}
.erhm-classroom-demo .erhm-root{max-width:1200px;width:100%;box-sizing:border-box;}
.erhm-classroom-demo .erhm-stage{height:auto;min-height:0;overflow:hidden;}
.erhm-classroom-demo .erhm-stage canvas{display:block;max-width:100%;}
@media(min-width:1100px){.erhm-classroom-demo .erhm-root{margin-inline:auto;}}

/* v6.85.0 — Chromebook: never crop dialogue choices outside the playfield.
   The WordPress theme may apply floats, min-widths or inline button widths. */
.erhm-root .erhm-stage{position:relative;min-width:0;overflow:hidden}
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open{
  position:absolute!important;inset:auto 12px 12px 12px!important;
  width:auto!important;min-width:0!important;max-width:none!important;
  max-height:min(82%,520px)!important;overflow-x:hidden!important;
  overflow-y:auto!important;overscroll-behavior:contain;
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  box-sizing:border-box!important;padding:clamp(10px,2vw,18px)!important;
}
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open > *,
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open .erhm-character-heading,
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open .erhm-choices{
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  flex-shrink:0;overflow-wrap:anywhere;
}
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open > button,
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open .erhm-choices button{
  display:block!important;position:static!important;float:none!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin:0!important;box-sizing:border-box!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
  text-align:left!important;height:auto!important;min-height:40px!important;
}
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open .erhm-choices{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;
}
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open .erhm-character-heading{width:100%;gap:10px}
.erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open .erhm-character-details{min-width:0;flex:1}
@media(max-width:700px), (max-height:650px){
 .erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open{inset:auto 6px 6px 6px!important;max-height:88%!important;padding:10px!important;gap:7px!important}
 .erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open .erhm-character-portrait{width:50px;height:50px}
 .erhm-root .erhm-stage>.erhm-actions.erhm-dialog-open>p{font-size:14px;line-height:1.4}
}

/* v6.85.0 — isolate the dialogue layout from WordPress theme button rules.
   Every interaction is a full-width row; the exploration action is last. */
.erhm-root .erhm-stage > .erhm-actions.erhm-dialog-open {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  align-content:start!important;
  justify-items:stretch!important;
  gap:10px!important;
  left:10px!important;right:10px!important;top:auto!important;bottom:10px!important;
  width:calc(100% - 20px)!important;
  max-height:calc(100% - 20px)!important;
  min-width:0!important;
  overflow-x:hidden!important;overflow-y:auto!important;
}
.erhm-root .erhm-stage > .erhm-actions.erhm-dialog-open > * {
  grid-column:1 / -1!important;
  position:relative!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  transform:none!important;float:none!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  margin-left:0!important;margin-right:0!important;
  box-sizing:border-box!important;
}
.erhm-root .erhm-stage > .erhm-actions.erhm-dialog-open > button {
  display:block!important;visibility:visible!important;
  padding:12px 14px!important;
  height:auto!important;min-height:44px!important;
  white-space:normal!important;text-align:left!important;
}
.erhm-root .erhm-stage > .erhm-actions.erhm-dialog-open > .erhm-dialog-close {
  order:99!important;
  background:#eac786!important;color:#17322d!important;
  border:2px solid #ffecbd!important;
  text-align:center!important;font-weight:800!important;
}
@media(max-width:700px){
 .erhm-root .erhm-stage > .erhm-actions.erhm-dialog-open {
   left:5px!important;right:5px!important;bottom:5px!important;
   width:calc(100% - 10px)!important;max-height:calc(100% - 10px)!important;
 }
}

/* v6.85.0: a stable rendering surface, even when entering/leaving rooms. */
.erhm-root .erhm-stage canvas{width:100%!important;height:100%!important;object-fit:contain;}
