.erh-game{max-width:900px;margin:20px auto;background:#152b26;color:#f9efd8;padding:16px;border:5px solid #6f5135;border-radius:10px;font-family:monospace}.erh-game canvas{width:100%;height:auto;display:block;image-rendering:pixelated;background:#508c52;outline:0}.erh-game canvas:focus{box-shadow:0 0 0 3px #d8b16d}.erh-game .erh-dialogue{background:#f4e4b9;color:#30271f;border:3px solid #82643e;padding:12px;margin:10px 0;font-size:15px}.erh-game .erh-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:10px}.erh-game button{background:#c4a26c;color:#1c2d26;border:0;border-radius:5px;padding:12px 17px;font-weight:bold;cursor:pointer}.erh-game .erh-pad{display:grid;grid-template-columns:repeat(3,48px);gap:4px}.erh-game .erh-pad button:first-child{grid-column:2}.erh-game .erh-pad button:nth-child(2){grid-column:1}.erh-game .erh-pad button:nth-child(3){grid-column:2}.erh-game .erh-pad button:nth-child(4){grid-column:3}

.erh-stage{width:100%;aspect-ratio:3/2;overflow:hidden;background:#568b53;border:3px solid #80623f}.erh-stage canvas{display:block!important;width:100%!important;height:100%!important;object-fit:contain;image-rendering:pixelated}.erh-status{padding:8px 0;font-weight:bold;color:#f1dba5}

.erh-rpg-panels{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#273f31;border:2px solid #927149;padding:9px;margin:6px 0 10px;font-size:13px}.erh-inventory{font-weight:bold;color:#f7db91}.erh-journal{color:#e7e3c9}.erh-game button:focus-visible{outline:3px solid #fff0b4;outline-offset:2px}

.erh-dialogue-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.erh-dialogue-actions button{background:#72512e;color:#fff4d2;border:2px solid #ae8850}.erh-save-status{font-size:12px;color:#bfe5c2;padding:4px 0}

.erh-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}.erh-map-panel{padding:12px;border:3px solid #c6a46c;background:#263c32;margin:8px 0}.erh-map-panel[hidden]{display:none}.erh-map-panel canvas{display:block;width:100%;max-width:504px;height:auto;margin:10px auto;image-rendering:pixelated;border:2px solid #d8c08d}.erh-map-panel button{float:right}.erh-map-caption{font-size:13px}.erh-game .erh-dialogue[hidden]{display:none}

.erh-document{background:#eedcb4;color:#45301f;border:4px double #84643d;padding:16px;max-width:620px;margin:auto;box-shadow:inset 0 0 28px #c6ab78}.erh-document h3{text-align:center;margin:0 0 10px;font-size:21px}.erh-document-art{margin:10px auto;max-width:420px}.erh-document-art svg{display:block;width:100%;height:auto;image-rendering:pixelated}.erh-document p{line-height:1.5;font-size:15px}.erh-document button{display:block;margin:12px auto 0}

/* v1.4 — documents à pages et énigmes manipulables */
.erh-puzzle,.erh-archive{background:repeating-linear-gradient(0deg,#f1dfb6,#f1dfb6 16px,#ecd5a7 17px);border:5px ridge #8a6338;border-radius:3px;max-width:680px}
.erh-puzzle-illustration,.erh-archive-art{font-size:45px;text-align:center;letter-spacing:15px;background:#dfc596;border:2px solid #b3925c;padding:16px;margin:12px auto;max-width:450px}
.erh-puzzle-question{font-weight:bold;font-size:17px!important}.erh-puzzle-feedback{color:#843d2d;font-weight:bold;min-height:20px}
.erh-page-count{text-align:right;font-size:12px!important}.erh-archive h4{text-align:center;font-size:18px;margin:10px 0}
.erh-document .erh-dialogue-actions button{margin:4px 0}.erh-document button:disabled{opacity:.4;cursor:not-allowed}.erh-puzzle-close{background:#d3b888!important}

/* v1.5 — conseil historique et décisions documentées */
.erh-council{max-width:720px}.erh-council-map svg{width:100%;max-width:460px;display:block;margin:10px auto;border:3px solid #947348}.erh-council-options{display:grid;grid-template-columns:1fr;gap:8px}.erh-council-options button{width:100%;text-align:left;margin:0!important;padding:11px 14px}.erh-council-options button.erh-selected{outline:3px solid #3c7a54;background:#386a4d;color:#fff}.erh-council .erh-puzzle-feedback{min-height:40px}

/* v1.6 — table des preuves historiques */
.erh-evidence-source{background:#dfc69a;border:3px solid #8a6338;padding:14px;margin:12px 0;box-shadow:inset 0 0 12px #c3a674}.erh-evidence-source>span{font-size:34px;float:left;margin-right:12px}.erh-evidence-source strong{font-size:17px}.erh-evidence-source p{margin:8px 0}.erh-source-details{background:#e5d0a4;border:2px solid #9c7c4c;padding:10px;margin:10px 0}.erh-source-details summary{cursor:pointer;font-weight:bold}.erh-source-details p{border-bottom:1px solid #bda274;padding:5px 0}

/* Conseil de survie : choix lisibles et bilan accessible. */
.erh-winter-council .erh-dialogue-actions{display:grid;gap:9px}.erh-winter-council .erh-selected{outline:3px solid #c99b43;background:#f4dfb4;color:#2d251b}.erh-winter-bars{display:grid;gap:12px;margin:14px 0}.erh-winter-bars>div{display:grid;gap:4px}.erh-winter-bars progress{width:100%;height:18px;accent-color:#608767}.erh-winter-council button:disabled{opacity:.5;cursor:not-allowed}

/* v1.8 — atelier cartographique accessible au clavier et au toucher */
.erh-site-map{position:relative;max-width:560px;margin:14px auto;border:4px solid #866740;overflow:hidden;background:#d8c69d}.erh-site-map svg{display:block;width:100%;height:auto}.erh-site-map .erh-site-pin{position:absolute;transform:translate(-50%,-50%);border:3px solid #fff1c4;border-radius:50%;width:40px;height:40px;padding:0;background:#6b5738;color:#fff;font-size:18px;box-shadow:0 2px 8px #30271b}.erh-site-map .erh-site-pin.is-active{background:#275e49;outline:4px solid #f9ce55}.erh-site-choices{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.erh-site-choices button{margin:2px!important}.erh-site-choices button.erh-selected{background:#275e49;color:#fff}.erh-site-analysis{padding:10px 15px;background:#dfc79b;border:2px solid #947348;margin:12px 0}.erh-site-analysis h4{margin:3px 0}.erh-site-justification{border:2px solid #947348;padding:12px;display:grid;gap:10px}.erh-site-justification label{display:block;line-height:1.4;cursor:pointer}.erh-site-justification input{width:17px;height:17px;vertical-align:middle}

/* v1.9 : chantier manipulable, clavier et écran tactile */
.erh-build{max-width:760px}.erh-build-board{border:4px solid #80613d;background:#d4bf91;margin:12px 0}.erh-build-board svg{width:100%;height:auto;display:block}.erh-build-progress{font-weight:bold;background:#d7bb86;padding:8px}.erh-build-pieces,.erh-build-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.erh-build-pieces button,.erh-build-slots button{margin:0!important;min-width:0;white-space:normal}.erh-build-pieces button.erh-selected{background:#346a51;color:#fff;outline:3px solid #b18a45}.erh-build-slots button:disabled{background:#8baf83;color:#203b2b;opacity:1}.erh-build .erh-puzzle-feedback{min-height:28px}@media(max-width:530px){.erh-build-pieces,.erh-build-slots{grid-template-columns:1fr}}

/* v2.2 : expedition et carte de navigation */
.erh-expedition{max-width:720px}.erh-route-map{background:#e2cca0;border:3px solid #927449;margin:12px auto;padding:8px}.erh-route-map svg{display:block;width:100%;height:auto}.erh-route-map small{display:block;text-align:center;color:#5a4931}.erh-expedition .erh-council-options button{white-space:normal}.erh-expedition .erh-archive-art{font-size:38px}

/* v2.4 : UX classe, contraste et progression */
.erh-game{max-width:1020px;box-sizing:border-box}.erh-game *{box-sizing:border-box}
.erh-ux-guide{border:2px solid #a88d59;background:#203a31;padding:12px 14px;margin:12px 0;border-radius:8px}
.erh-ux-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:15px}
.erh-ux-step{color:#f0dba9}.erh-ux-progress{height:12px;border-radius:12px;background:#0c211c;border:1px solid #8e7752;overflow:hidden;margin:9px 0}
.erh-ux-progress span{display:block;background:#e9bd69;height:100%;width:0;transition:width .3s ease}
.erh-ux-tip{font-size:13px;line-height:1.5;margin:4px 0;color:#f5e7c8}
.erh-game button{min-height:44px;touch-action:manipulation}.erh-toolbar button{flex:1 1 150px}
.erh-nearby{background:#f5d48a;color:#302516;padding:8px 12px;text-align:center;font-weight:bold;border-radius:5px;margin-top:8px}
.erh-nearby[hidden]{display:none}.erh-dialogue{line-height:1.6;white-space:pre-line}.erh-rpg-panels{line-height:1.5}
@media(max-width:600px){.erh-game{padding:9px;border-width:3px}.erh-game .erh-pad{grid-template-columns:repeat(3,56px)}.erh-game .erh-pad button{min-width:56px;min-height:52px}.erh-game .erh-controls>[data-action]{flex:1}.erh-ux-top{font-size:13px}}
@media(prefers-reduced-motion:reduce){.erh-ux-progress span{transition:none}}

/* v2.7 : événement scénarisé accessible au clavier et au toucher */
.erh-incident{max-width:740px}.erh-incident-cards,.erh-incident-decision{display:grid;gap:10px;margin:12px 0}.erh-incident-card,.erh-incident-decision button{display:block!important;width:100%;margin:0!important;text-align:left;white-space:normal;line-height:1.5}.erh-incident-card.is-read{background:#366c51!important;color:#fff!important}.erh-incident-counter{font-weight:bold}.erh-incident-decision[hidden]{display:none}

/* v2.9 — scènes historiques en panneaux, navigation manuelle et motion réduite */
.erh-stage{position:relative}.erh-cinematic{position:absolute;inset:0;z-index:120;background:rgba(10,23,27,.94);display:flex;align-items:center;justify-content:center;padding:16px;color:#f5e5bf;overflow-y:auto}.erh-cinematic-panel{width:min(100%,570px);border:3px solid #b89a60;background:#243a39;box-shadow:0 0 0 5px #162727,0 12px 36px #071416;padding:16px 20px;text-align:center}.erh-cinematic-kicker{font-size:11px;letter-spacing:.12em;color:#e9c886;margin:0 0 8px}.erh-cinematic-art{height:105px;display:flex;align-items:center;justify-content:center;font-size:62px;background:linear-gradient(135deg,#3a7185,#173c50);border:2px solid #a0b7ae;text-shadow:0 4px 8px #14292a}.erh-cinematic-art[data-scene=snow]{background:linear-gradient(135deg,#afc4c9,#496977)}.erh-cinematic-art[data-scene=fire]{background:linear-gradient(135deg,#986746,#4b3029)}.erh-cinematic-art[data-scene=store]{background:linear-gradient(135deg,#9c7950,#483c2b)}.erh-cinematic h3{color:#f7dc9e;font-size:22px;margin:12px 0 8px}.erh-cinematic-story{font-size:15px;line-height:1.5;margin:0 auto 14px;max-width:490px}.erh-cinematic-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.erh-cinematic-counter{color:#d3c7a9;font-size:12px}.erh-cinematic button{background:#e4bf75!important;color:#30251a!important;font-weight:bold;border:2px solid #f7dfaa;padding:8px 18px;border-radius:4px;cursor:pointer}.erh-cinematic button:focus-visible{outline:3px solid white;outline-offset:3px}@media(max-width:500px){.erh-cinematic{padding:7px}.erh-cinematic-panel{padding:10px}.erh-cinematic-art{height:65px;font-size:38px}.erh-cinematic h3{font-size:17px;margin:7px 0}.erh-cinematic-story{font-size:12px;line-height:1.35}.erh-cinematic-kicker{font-size:9px}}

/* v3.0 : commandes et rythme de jeu */
.erh-dialog-close{display:block;margin:12px 0 0 auto!important;padding:7px 15px!important;min-height:40px!important;background:#e8cf9d!important;color:#302819!important;border-radius:5px!important}.erh-cinematic .erh-cinematic-skip{background:transparent!important;color:#f3e3bc!important;border-color:#8a9b94!important;font-weight:normal;font-size:12px;padding:7px 9px}.erh-cinematic-footer{flex-wrap:wrap}.erh-dialogue-actions button:focus-visible,.erh-dialog-close:focus-visible{outline:3px solid #e5c476;outline-offset:2px}

/* v3.3 : sprint tactile, fatigue lisible et accessibilité */
.erh-sprint-button{background:#345c49!important;color:#fff5d8!important;border:2px solid #c8ae71!important;border-radius:6px!important;padding:9px 16px!important;font-weight:700;touch-action:none;user-select:none;min-width:112px}.erh-sprint-button:active{background:#597e56!important}.erh-sprint-button:focus-visible{outline:3px solid #f2ce70;outline-offset:3px}

/* v4.0 — navigation jouable au clavier et sur mobile */
.erh-river-game{position:absolute;inset:0;z-index:160;display:flex;justify-content:center;align-items:center;background:rgba(8,25,29,.96);padding:10px;overflow:auto;color:#f6e8c7}.erh-river-panel{max-width:690px;width:100%;text-align:center;border:3px solid #c3a56d;background:#1d3b41;padding:12px}.erh-river-panel h3{margin:0 0 6px;color:#f7da91;font-size:20px}.erh-river-panel p{font-size:12px;line-height:1.4;margin:6px 0}.erh-river-panel canvas{display:block;width:100%;max-height:44vh;object-fit:contain;background:#267e9b;image-rendering:pixelated;border:2px solid #d7c291}.erh-river-buttons{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;margin-top:9px}.erh-river-buttons button{background:#e7c582!important;color:#2c2a20!important;border:2px solid #f3e4ba!important;padding:7px 10px!important;min-height:40px!important;touch-action:none;user-select:none}.erh-river-result{color:#ffe5a5;font-weight:700;min-height:28px}.erh-river-info{font-weight:700;color:#b7e5e3}@media(max-width:600px){.erh-river-game{padding:3px}.erh-river-panel{padding:6px}.erh-river-panel h3{font-size:16px}.erh-river-panel p{font-size:11px}.erh-river-buttons button{font-size:12px;padding:5px!important;min-height:42px!important}}

/* v4.1 — atelier de construction tactile et accessible */
.erh-assembly-game canvas{touch-action:none;cursor:grab}.erh-assembly-game canvas:active{cursor:grabbing}.erh-assembly-options{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin-top:9px}.erh-assembly-options button{background:#e6c992!important;color:#30271c!important;border:2px solid #a07d47!important;border-radius:5px;padding:6px 9px!important;font-size:12px;min-height:42px!important}.erh-assembly-options button[aria-pressed=true]{outline:3px solid #72b7a0}.erh-assembly-options button:disabled{opacity:.6}.erh-assembly-game .erh-river-panel canvas{max-height:42vh}

/* v4.6 : cargaison manipulable, utilisable à la souris, au clavier et au toucher */
.erh-trade-workshop{max-width:640px;margin:auto;color:#f9ebcc}.erh-trade-workshop h3{margin:0 0 10px;color:#f7d68e}.erh-trade-intro{line-height:1.5}.erh-trade-goods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}.erh-trade-workshop button{min-height:43px!important;margin:4px!important;padding:9px!important;cursor:pointer}.erh-trade-good[aria-pressed=true]{background:#447b61!important;outline:3px solid #f6d17d}.erh-trade-slots{padding:10px;background:#314b41;border:1px dashed #e8c67f}.erh-trade-feedback{min-height:26px;color:#ffdf97}.erh-trade-workshop button:focus-visible{outline:3px solid #fff2c6;outline-offset:2px}@media(max-width:460px){.erh-trade-goods{grid-template-columns:1fr}.erh-trade-workshop button{font-size:12px!important}}

/* v4.7 : rappel narratif des choix du chapitre précédent */
.erh-expedition-memory{background:#eaf4e8;border-left:4px solid #538364;padding:10px 12px;color:#233f32;border-radius:5px;line-height:1.45}

/* v5.1 — Journal d’aventurier, lisible au clavier sur Chromebook. */
.erh-adventure-journal{background:#f1dfb7;color:#30271d;border:5px double #9a7546;border-radius:6px;padding:18px;margin:12px 0;box-shadow:inset 0 0 25px #d8bf8b;font-family:Georgia,serif}
.erh-adventure-journal[hidden]{display:none!important}
.erh-journal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:2px solid #b89b6b;padding-bottom:12px}
.erh-journal-header small{letter-spacing:.13em;color:#755b36;font-size:11px}.erh-journal-header h3{font-size:25px;margin:5px 0;color:#49331f}
.erh-journal-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.erh-adventure-journal button{background:#755334;color:#fff1d1;border:2px solid #a78756;min-height:42px}
.erh-journal-tabs button[aria-pressed=true]{background:#254d3d;border-color:#254d3d;color:#fff}
.erh-journal-body{max-height:460px;overflow-y:auto;padding:3px 7px;line-height:1.5}.erh-journal-body h4{font-size:18px;margin:12px 0 6px}.erh-journal-lead{background:#e0c99c;padding:10px;border-left:4px solid #76512e}.erh-journal-count{font-weight:bold;color:#3d6247}
.erh-journal-mission-list{list-style:none;padding:0;display:grid;gap:9px}.erh-journal-mission-list li{padding:10px 12px;border:1px solid #b59b6e;background:#ead5aa}.erh-journal-mission-list li.is-done{background:#d7e3c6;border-color:#7b9c70}.erh-journal-mission-list li p{margin:3px 0 0;font-size:14px}.erh-journal-chapter{border-bottom:1px solid #b89b6b;padding:8px 0}.erh-journal-chapter p{margin:5px 0}.erh-journal-note{font-size:13px;font-style:italic;color:#695338}.erh-journal-resource{display:flex;justify-content:space-between;gap:14px;border-bottom:1px dotted #a48b60;padding:7px 0}.erh-journal-resource span{text-align:right}
@media(max-width:600px){.erh-adventure-journal{padding:10px}.erh-journal-header h3{font-size:21px}.erh-journal-body{max-height:360px}}

/* v5.2 — inventaire graphique, sélection au clavier et lecture sur Chromebook */
.erh-visual-inventory{background:#ead5a8;color:#312619;border:5px double #947143;border-radius:7px;padding:18px;margin:12px 0;font-family:Georgia,serif;box-shadow:inset 0 0 28px #ccb17c}
.erh-visual-inventory[hidden]{display:none!important}.erh-visual-inventory .erh-journal-header h3{color:#49331f}.erh-visual-inventory button{background:#6b4d30;color:#fff2d2;border:2px solid #9d7b4e;border-radius:5px;cursor:pointer}
.erh-inventory-intro{font-size:14px;margin:12px 0}.erh-inventory-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);gap:16px}
.erh-inventory-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;align-content:start}
.erh-inventory-item{display:flex;flex-direction:column;align-items:center;gap:5px;min-height:112px!important;padding:10px 6px!important;text-align:center;line-height:1.2;overflow-wrap:anywhere}
.erh-inventory-item[aria-pressed=true]{background:#285741!important;border-color:#f4d28c!important;outline:3px solid #b18845;outline-offset:1px}
.erh-inventory-icon{font-size:32px;line-height:1.2}.erh-inventory-item strong{font-size:13px}.erh-inventory-item small{font-size:11px;color:#f0ddba}
.erh-inventory-details{background:#f2e3c1;border:2px solid #b99b69;padding:14px;line-height:1.5;min-height:255px}.erh-inventory-details h4{font-size:19px;margin:0 0 12px}.erh-inventory-details p{font-size:14px;margin:8px 0}.erh-inventory-note{font-style:italic;color:#705637}.erh-inventory-details button{width:100%;margin-top:8px;padding:8px}
.erh-visual-inventory button:focus-visible{outline:3px solid #2b6b58;outline-offset:3px}
@media(max-width:700px){.erh-inventory-layout{grid-template-columns:1fr}.erh-inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.erh-inventory-item{min-height:96px!important}}

.erh-equipped-notice{font-size:12px;padding:7px 10px;border-radius:7px;background:#223c31;color:#f3e9c9;margin:5px 0}.erh-inventory-equip{background:#366449;color:#fff7df;border:1px solid #a3c29a;border-radius:7px;padding:9px 13px;cursor:pointer}.erh-inventory-equip:disabled{opacity:.45;cursor:not-allowed}

/* v6.5.1 — Dialogues visibles DANS la zone de jeu, indépendants de la page. */
.erh-stage>.erh-dialogue:not([hidden]){position:absolute;inset:0;z-index:150;display:flex;flex-direction:column;align-items:stretch;justify-content:center;overflow-y:auto;box-sizing:border-box;margin:0;padding:clamp(12px,3vw,30px);background:rgba(18,34,34,.94);border:3px solid #e2c38b;color:#fff1cf;white-space:pre-line;font-size:clamp(12px,1.8vw,17px);line-height:1.55;box-shadow:inset 0 0 0 5px #203a38;}
.erh-stage>.erh-dialogue:not([hidden]) button{flex-shrink:0;}
.erh-stage>.erh-dialogue .erh-dialog-close{background:#eac57e!important;color:#2e2419!important;font-size:15px!important;font-weight:800!important;min-height:46px!important;padding:10px 18px!important;}
.erh-stage>.erh-dialogue .erh-dialogue-actions{max-height:52%;overflow-y:auto;align-content:start;}
.erh-stage>.erh-dialogue .erh-dialogue-actions button{min-height:42px;}
.erh-game-toast:not([hidden]){position:absolute;z-index:130;top:12px;left:50%;transform:translateX(-50%);width:min(88%,560px);padding:11px 15px;box-sizing:border-box;text-align:center;background:rgba(18,42,41,.96);border:2px solid #e4c382;color:#fff2cf;font-weight:700;font-size:clamp(11px,1.6vw,15px);line-height:1.4;pointer-events:none;box-shadow:0 5px 18px #142522a8;}
@media(max-width:560px){.erh-stage>.erh-dialogue:not([hidden]){padding:9px;font-size:12px;line-height:1.3}.erh-stage>.erh-dialogue .erh-dialogue-actions{max-height:56%;gap:4px}.erh-stage>.erh-dialogue .erh-dialogue-actions button{padding:6px 9px;font-size:12px}.erh-stage>.erh-dialogue .erh-dialog-close{padding:6px 10px!important;font-size:12px!important;min-height:36px!important}}

/* v6.5.6 — écran Chromebook / mode immersif */
.erh-game:fullscreen,#erh-standalone:fullscreen{width:100vw!important;height:100dvh!important;max-width:none!important;margin:0!important;padding:5px!important;border:0!important;border-radius:0!important;overflow:auto;background:#102823!important;}
.erh-game:fullscreen .erh-stage,#erh-standalone:fullscreen .erh-stage{width:min(100%,calc((100dvh - 175px)*1.5))!important;max-height:calc(100dvh - 175px)!important;margin:0 auto;}
.erh-game:fullscreen>h2,.erh-game:fullscreen>p:first-of-type,#erh-standalone:fullscreen .erh-game>h2,#erh-standalone:fullscreen .erh-game>p:first-of-type{display:none;}
.erh-game:fullscreen .erh-toolbar,#erh-standalone:fullscreen .erh-toolbar{margin:3px 0;gap:4px;}
.erh-game:fullscreen .erh-toolbar button,#erh-standalone:fullscreen .erh-toolbar button{min-height:32px;padding:5px 8px;font-size:12px;}
@media(max-height:650px){.erh-game:fullscreen .erh-stage,#erh-standalone:fullscreen .erh-stage{width:min(100%,calc((100dvh - 135px)*1.5))!important;max-height:calc(100dvh - 135px)!important;}}

/* v6.5.7 — Mode Chromebook compact, sans defilement de page. */
#erh-standalone{height:100dvh;overflow:hidden}
#erh-standalone .erh-game{height:100dvh!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;align-items:stretch;gap:3px;padding:4px 8px!important}
#erh-standalone .erh-game>h2,#erh-standalone .erh-game>p,#erh-standalone .erh-play-link{display:none!important}
#erh-standalone .erh-status{order:0;flex:none;padding:1px 0;font-size:12px;line-height:1.2;min-height:0}
#erh-standalone .erh-rpg-panels{order:1;flex:none;display:block;max-height:31px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;padding:3px 6px!important;margin:0!important;font-size:11px;line-height:1.3}
#erh-standalone .erh-rpg-panels>*{display:inline;margin-right:12px}
#erh-standalone .erh-ux-guide{order:2;flex:none;margin:0!important;padding:3px 8px!important;border-width:1px;border-radius:5px}
#erh-standalone .erh-ux-top{font-size:11px;line-height:1.2}
#erh-standalone .erh-ux-progress{height:5px;margin:3px 0}
#erh-standalone .erh-ux-tip{font-size:11px;line-height:1.25;margin:2px 0 0}
#erh-standalone .erh-stage{order:3;flex:none!important;align-self:center;position:relative;aspect-ratio:3/2;width:100%;height:auto;max-height:none!important;margin:0 auto!important;min-height:0;border-width:2px}
#erh-standalone .erh-toolbar{order:4;flex:none;display:flex;flex-wrap:nowrap;gap:4px!important;margin:0!important;overflow-x:auto;overflow-y:hidden;padding:1px 0}
#erh-standalone .erh-toolbar button{flex:1 0 auto;min-width:0;min-height:30px!important;padding:4px 7px!important;font-size:11px!important;white-space:nowrap}
#erh-standalone .erh-equipped-notice{display:none}
#erh-standalone .erh-nearby{order:5;flex:none;margin:0;padding:2px 5px;font-size:11px}
#erh-standalone .erh-save-status{order:6;flex:none;padding:0;font-size:10px;line-height:1.2}
#erh-standalone .erh-controls{order:7;flex:none;display:none!important}
#erh-standalone .erh-dialogue{order:8}
#erh-standalone .erh-adventure-journal:not([hidden]),#erh-standalone .erh-visual-inventory:not([hidden]),#erh-standalone .erh-map-panel:not([hidden]){position:fixed!important;z-index:1000;inset:8px;max-width:900px;width:calc(100% - 16px);max-height:calc(100dvh - 16px);margin:auto!important;overflow:auto;box-shadow:0 0 0 100vmax #071510db}
#erh-standalone:fullscreen{overflow:hidden!important;padding:0!important}
#erh-standalone:fullscreen .erh-stage{max-height:none!important}
@media(max-height:680px){#erh-standalone .erh-ux-progress{display:none}#erh-standalone .erh-rpg-panels{max-height:24px}#erh-standalone .erh-toolbar button{min-height:26px!important;padding:3px 5px!important;font-size:10px!important}}

/* v6.5.13 — Carte illustrée plus détaillée et lisible sur Chromebook */
.erh-map-panel{background:linear-gradient(155deg,#263e35,#162920);border:2px solid #cbb482;border-radius:12px;color:#f5e8c6;padding:14px 18px;box-shadow:0 14px 40px #07130d66}
.erh-map-panel>strong{font-family:Georgia,serif;font-size:clamp(17px,2.5vw,24px);letter-spacing:.03em}
.erh-map-panel canvas{width:100%;max-width:756px;max-height:min(69dvh,540px);object-fit:contain;image-rendering:auto;border:4px solid #927a52;border-radius:4px;background:#d6c49a;box-shadow:0 3px 15px #091b18a8}
.erh-map-panel .erh-map-caption{color:#f5e6be;text-align:center;font-size:clamp(11px,1.6vw,14px);line-height:1.5;margin:8px auto}
.erh-map-panel [data-map-close]{float:right;background:#d7bc88;color:#23362d;border-radius:7px;padding:6px 12px;font-weight:700}
@media(max-width:620px){.erh-map-panel{padding:9px}.erh-map-panel canvas{max-height:63dvh}.erh-map-panel>strong{font-size:17px}}

/* v6.5.15 — carnet illustré, responsive, sans images externes */
.erh-journal-illustration{background:linear-gradient(145deg,#c3a16c,#eddaae 55%,#c7ad7b);border:2px solid #9a7748;border-radius:5px;text-align:center;padding:12px 8px;margin:4px 0 12px;box-shadow:inset 0 0 18px #9a774833}
.erh-journal-cover-art{font-size:32px;letter-spacing:.12em;line-height:1.6;filter:sepia(.35)}
.erh-journal-cover-caption{font-size:11px;font-weight:bold;letter-spacing:.14em;color:#674829}
.erh-journal-illustrated-card{position:relative;min-height:70px;padding-left:62px!important}
.erh-journal-card-symbol{position:absolute;left:8px;top:12px;font-size:30px;width:42px;height:42px;display:grid;place-items:center;background:#e0c79a;border:1px solid #b29364;border-radius:5px}
@media(max-width:600px){.erh-journal-cover-art{font-size:24px}.erh-journal-illustrated-card{padding-left:55px!important}}

/* v6.5.16 — souvenirs dérivés des étapes sauvegardées */
.erh-reward-shelf{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.erh-reward-card{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;padding:13px 9px;border:2px solid #a78955;background:#e8d2a5;border-radius:7px;min-width:0}
.erh-reward-card small{font-size:12px;line-height:1.35}.erh-reward-card.is-locked{opacity:.65;filter:grayscale(.65)}
.erh-reward-icon{font-size:34px}.erh-reward-flash{pointer-events:none;position:absolute;top:25%;left:50%;transform:translateX(-50%);z-index:999;color:#ffe6a1;font-size:40px;text-shadow:0 2px 10px #2c2b17;animation:erhRewardPop 1.4s ease-out forwards}
@keyframes erhRewardPop{0%{opacity:0;transform:translate(-50%,20px) scale(.6)}30%{opacity:1;transform:translate(-50%,-8px) scale(1.1)}100%{opacity:0;transform:translate(-50%,-35px) scale(1)}}
@media(max-width:480px){.erh-reward-shelf{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.erh-reward-flash{animation:none;display:none}}

/* v6.5.26 — Guide de bienvenue : lisible sur Chromebook et en plein écran. */
.erh-game{position:relative}
.erh-onboarding{position:absolute;inset:0;z-index:9999;background:rgba(10,29,27,.94);display:flex;align-items:center;justify-content:center;padding:12px;box-sizing:border-box;overflow:auto}
.erh-onboarding-card{width:min(620px,100%);max-height:100%;overflow:auto;background:#f3e7c8;color:#2c3429;border:3px solid #a97c44;border-radius:15px;box-shadow:0 14px 50px #0008;font-family:system-ui,sans-serif}
.erh-onboarding-heading{padding:13px 18px 8px;background:#e4d1a5;border-bottom:1px solid #b99b6e}
.erh-onboarding-heading small{display:block;font-size:10px;font-weight:800;letter-spacing:.11em;color:#665234}
.erh-onboarding-heading h2{font-size:clamp(17px,2.8vw,23px);margin:5px 0;color:#283e31;line-height:1.2}
.erh-onboarding-body{padding:12px 18px}.erh-onboarding-intro{font-size:14px;line-height:1.4;margin:0 0 12px}
.erh-onboarding-keys{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.erh-onboarding-keyrow{display:flex;align-items:center;gap:9px;background:#fff9e8;border:1px solid #d4c19c;border-radius:8px;padding:7px;font-size:12px;line-height:1.3}
.erh-onboarding-keyrow kbd{flex:0 0 auto;min-width:44px;text-align:center;background:#254c3d;color:white;border-radius:5px;padding:5px 7px;font:700 12px system-ui,sans-serif}
.erh-onboarding-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 18px;background:#e4d1a5;border-top:1px solid #b99b6e}
.erh-onboarding-footer button{background:#fff9e8;color:#253e32;border:1px solid #8c7654;border-radius:7px;padding:9px 12px;font-weight:700;cursor:pointer}
.erh-onboarding-footer button.erh-onboarding-next{background:#27644c;color:#fff;border-color:#27644c}
.erh-onboarding-footer button:disabled{opacity:.4;cursor:default}
.erh-onboarding-dots{font-size:11px;letter-spacing:1px;color:#5c6248;white-space:nowrap}
@media(max-width:650px),(max-height:560px){.erh-onboarding{padding:5px}.erh-onboarding-heading{padding:8px 12px 5px}.erh-onboarding-body{padding:8px 12px}.erh-onboarding-keys{gap:5px}.erh-onboarding-keyrow{padding:5px;font-size:11px}.erh-onboarding-footer{padding:6px 12px}}
@media(max-width:460px){.erh-onboarding-keys{grid-template-columns:1fr}}

/* v6.5.29 — Bilans pédagogiques, sans modification du moteur Phaser */
.erh-learning-section{margin:12px 0;padding:14px;border:1px solid #ae986b;border-radius:12px;background:rgba(255,244,210,.08)}
.erh-learning-section h4{margin:0 0 10px}.erh-learning-section blockquote{margin:10px 0;padding:12px;border-left:3px solid #caa65e;background:rgba(255,239,193,.12);white-space:normal}
.erh-learning-question{margin:12px 0;padding:10px;border-top:1px solid rgba(175,153,112,.45)}
.erh-learning-answer{display:block;width:100%;text-align:left;margin:6px 0;padding:9px 12px;white-space:normal;line-height:1.4;border-radius:8px;cursor:pointer}
.erh-learning-answer[aria-pressed="true"]{outline:2px solid #d5ac54;outline-offset:1px}
.erh-learning-feedback{padding:9px;border-left:3px solid #87b89a;background:rgba(127,171,143,.12);line-height:1.5}

/* v6.5.43 — comparaisons pixel art accessibles et adaptatives */
.erh-evolution-compare{margin:12px 0;padding:10px;border:1px solid rgba(150,125,76,.4);border-radius:9px;background:rgba(18,39,34,.3)}
.erh-evolution-compare h5{margin:0 0 8px;font-size:1rem}
.erh-evolution-scenes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.erh-evolution-scene{min-width:0;display:flex;flex-direction:column;gap:5px}
.erh-evolution-scene canvas{width:100%;height:auto;aspect-ratio:16/9;image-rendering:pixelated;border:2px solid #7b6c4d;border-radius:4px;background:#a9c2ae}
@media(max-width:440px){.erh-evolution-scenes{gap:5px}.erh-evolution-compare{padding:6px}}

/* v6.5.44 : comparaison accessible, sans changement de sauvegarde */
.erh-evolution-controls{display:flex;flex-wrap:wrap;gap:8px;margin:9px 0}
.erh-evolution-controls button{padding:7px 10px;border:1px solid #a08b5d;border-radius:6px;background:#29493e;color:#fff;cursor:pointer}
.erh-evolution-controls button:focus-visible{outline:3px solid #f2d88b;outline-offset:2px}
.erh-evolution-scenes.erh-evolution-focus{grid-template-columns:minmax(0,1fr);max-width:430px;margin:auto}
.erh-evolution-scenes.erh-evolution-focus canvas{max-width:100%}

/* v6.5.77 — inspection visuelle accessible des objets */
.erh-object-inspection .erh-object-illustration{width:100%;max-width:440px;margin:12px auto;border:3px solid #72543b;border-radius:10px;overflow:hidden;background:#d5b98b;box-shadow:0 6px 16px rgba(24,19,12,.2)}
.erh-object-inspection .erh-object-illustration svg{display:block;width:100%;height:auto;image-rendering:pixelated}
.erh-object-inspection .erh-object-state{font-weight:700;color:#d2b577}
.erh-object-inspection .erh-dialogue-actions{display:flex;flex-wrap:wrap;gap:10px}
.erh-object-inspection button:focus-visible{outline:3px solid #e9ca79;outline-offset:3px}
@media(max-width:600px){.erh-object-inspection .erh-object-illustration{max-width:300px}}

/* v6.5.78 — dialogues RPG, portraits vectoriels pixelisés et réactions douces */
.erh-rpg-conversation{display:flex;align-items:flex-start;gap:16px;white-space:normal;animation:erhDialogueEnter .22s ease-out}
.erh-rpg-character{display:flex;flex:0 0 92px;flex-direction:column;align-items:center;gap:5px;font-weight:700;font-size:12px;text-align:center}
.erh-portrait-art{display:block;width:88px;height:88px;image-rendering:pixelated;border:3px solid #b48b56;background:#293d41;box-shadow:3px 3px 0 #27251d;animation:erhPortraitBreathe 3s ease-in-out infinite}
.erh-rpg-lines{flex:1;min-width:0}.erh-rpg-lines p{margin:8px 0;white-space:pre-wrap;line-height:1.6}
.erh-rpg-mood{display:inline-block;font-size:11px;letter-spacing:.04em;opacity:.85}
.erh-rpg-selected{outline:2px solid #e9ca79;outline-offset:2px}
.erh-rpg-choice-feedback{font-size:12px;align-self:center;color:#d9e9bb}
@keyframes erhDialogueEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes erhPortraitBreathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@media(max-width:550px){.erh-rpg-conversation{gap:10px}.erh-rpg-character{flex-basis:64px}.erh-portrait-art{width:62px;height:62px}}
@media(prefers-reduced-motion:reduce){.erh-rpg-conversation,.erh-portrait-art{animation:none}}

/* v6.5.79 — conseil collectif : mouvements CSS peu coûteux, aucun sprite Phaser supplémentaire. */
.erh-council-scene{white-space:normal;max-width:740px}
.erh-council-scene h3{margin:0 0 12px}
.erh-council-cast{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin:8px 0 14px}
.erh-council-member{display:flex;flex-direction:column;align-items:center;gap:4px;opacity:.55;transform:translateY(2px);transition:opacity .2s ease,transform .2s ease;min-width:88px;font-size:12px}
.erh-council-member .erh-portrait-art{width:72px;height:72px;image-rendering:pixelated;animation:none}
.erh-council-speaking{opacity:1;transform:translateY(-4px)}
.erh-council-speaking .erh-portrait-art{outline:3px solid #e9c887;outline-offset:2px;animation:erhCouncilBreath 1.9s ease-in-out infinite alternate}
.erh-council-speech{padding:12px;background:rgba(27,46,35,.75);border-left:3px solid #d9b675;min-height:80px;white-space:pre-wrap;line-height:1.6}
.erh-council-scene .erh-dialogue-actions{display:flex;flex-wrap:wrap;gap:9px}
@keyframes erhCouncilBreath{from{transform:translateY(0)}to{transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){.erh-council-member,.erh-council-speaking .erh-portrait-art{transition:none;animation:none}}

/* v6.5.82 : mini-débrief historique non bloquant, sans effet sur les missions */
.erh-history-debrief-prompt{position:absolute;z-index:70;right:14px;bottom:88px;max-width:min(90%,320px);padding:11px 15px;border:2px solid #c9a363;border-radius:9px;background:#293c32;color:#fff0ce;box-shadow:0 5px 14px #0006;cursor:pointer}
.erh-history-debrief{position:absolute;z-index:75;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92%,540px);max-height:80%;overflow:auto;padding:20px;background:#f3e3bc;color:#342719;border:4px solid #775433;border-radius:12px;box-shadow:0 12px 40px #0009}
.erh-history-debrief h3{margin:0 0 12px;color:#49331f}
.erh-history-debrief-options{display:grid;gap:8px;margin:12px 0}
.erh-history-debrief button{padding:10px;text-align:left;border-radius:6px;border:2px solid #886744;background:#fff7e3;color:#30271c;cursor:pointer}
.erh-history-debrief button:disabled{opacity:.7;cursor:default}
.erh-history-debrief button:focus-visible,.erh-history-debrief-prompt:focus-visible{outline:3px solid #3b8f80;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.erh-history-debrief,.erh-history-debrief-prompt{animation:none!important;transition:none!important}}
