/* A guide over A26 and the current combat, never a second game layout. */
.academyEntry{margin:10px auto;display:block;color:#ffe4a6;background:#102a3fe6;border:1px solid #bda26a;border-radius:20px;padding:9px 18px;font:15px Cambria,Georgia,serif}
#academyDialog{box-sizing:border-box;width:min(660px,94vw);max-height:90dvh;overflow:auto;border:1px solid #d4b570;border-radius:30px 10px;background:radial-gradient(ellipse at top,#274b67,#091d32 80%);color:#fff2d0;padding:28px;font:18px/1.45 Cambria,Georgia,serif;box-shadow:0 15px 60px #0009}
#academyDialog::backdrop{background:#041323c9;backdrop-filter:blur(3px)}
#academyDialog h1{font-size:clamp(24px,3vw,34px);color:#ffdf91;margin:6px 0 14px}#academyDialog small{color:#dfc38c;font-size:12px;letter-spacing:.08em}#academyDialog p{margin:12px 0}.academyVerso{width:110px;height:170px;object-fit:contain;float:left;margin:4px 20px 12px 0;filter:drop-shadow(0 0 12px #64c8e666)}
.academyDialogActions{display:flex;gap:8px;flex-wrap:wrap;clear:both;padding-top:10px}.academyDialogActions button{min-height:44px;flex:1 1 130px;font:600 15px Cambria,Georgia,serif;white-space:normal;padding:8px 14px}.academyError{color:#ffcdaf!important}
#academyCoach[hidden]{display:none!important}#academyCoach{box-sizing:border-box;display:grid;grid-template-columns:46px minmax(0,1fr);gap:5px 7px;padding:10px 8px;margin:0 0 12px;border:1px solid #c4a96a;border-radius:20px 7px;background:linear-gradient(140deg,#183e59f5,#0b2238f5);color:#fff3d6;font:14px/1.35 Cambria,Georgia,serif;position:relative;z-index:120;text-shadow:0 1px 2px #0008;max-width:100%}
#academyCoach>img{width:46px;height:82px;object-fit:contain;align-self:start;filter:drop-shadow(0 0 6px #49c8ff55)}#academyCoach small{font-size:10px;color:#d9bd82}#academyCoach h2{font-size:16px;line-height:1.2;margin:3px 0 7px;color:#ffe4a0}#academyCoach p{font-size:14px;margin:0;line-height:1.35}.academyCoachActions{grid-column:1/-1;display:flex;gap:4px;flex-wrap:wrap}.academyCoachActions button{min-height:32px;padding:4px 7px;font:13px Cambria,Georgia,serif;flex:1 1 auto;white-space:normal;color:#fff0c9;background:#16364f;border:1px solid #a58a56;border-radius:9px}.academyCoachActions button[data-next]{background:linear-gradient(#f8df99,#d8ac55);color:#20190b;font-weight:700}
#academyCoach.academyFloating{position:fixed;left:16px;bottom:16px;width:300px;max-height:42dvh;overflow:auto;z-index:1700;margin:0}
.academyTarget{outline:3px solid #fadd88!important;outline-offset:3px!important;animation:academyGuidePulse 1.8s ease-in-out infinite!important}
@keyframes academyGuidePulse{50%{outline-color:#fff5cb;outline-offset:5px}}
body.academyMode #roomLink{display:none!important}
@media(max-height:600px) and (orientation:landscape){#academyCoach.academyFloating{left:6px;bottom:48px;width:min(260px,35vw);max-height:46dvh;padding:6px;grid-template-columns:30px minmax(0,1fr);gap:3px 5px}#academyCoach>img{width:30px;height:58px}#academyCoach h2{font-size:13px;margin:1px 0 4px}#academyCoach p{font-size:12px;line-height:1.2}#academyCoach small{font-size:9px}.academyCoachActions button{font-size:11px;min-height:30px;padding:3px 4px}#academyDialog{max-height:94dvh;padding:14px;font-size:15px}.academyVerso{width:70px;height:110px;margin-right:12px}#academyDialog p{margin:7px 0}}
@media(max-width:700px) and (orientation:portrait){body.academyMode #academyCoach{display:none!important}}
@media(prefers-reduced-motion:reduce){.academyTarget{animation:none!important}}
body.reducedMotion .academyTarget{animation:none!important}
#academyCoach :focus-visible,#academyDialog :focus-visible{outline:3px solid #fff0b0;outline-offset:3px}

body.academyComplete::before{content:''!important;position:fixed!important;inset:0!important;background:linear-gradient(#06182a55,#06182aaa),url('accueil01-pc.jpg?v=accueil01-c3') center/cover!important;z-index:0!important;pointer-events:none}

@media(max-height:600px) and (orientation:landscape){#academyCoach.academyFloating.academyRight{left:auto;right:6px}}
/* A touch must not move its own handle before pointerup; keyboard/mouse retain the fan lift. */
@media(hover:none),(pointer:coarse){body.academyMode.a26-prep #game #a26Scene #hand .collectionCard:hover,body.academyMode.a26-prep #game #a26Scene #hand .collectionCard:focus-within{transform:translateY(var(--fan-y)) rotate(var(--fan-angle))!important}}
/* Route des Maîtres: a traversable landscape of official places and portraits. */
#academyDialog.academyRoute{width:min(1280px,96vw);height:min(920px,94dvh);max-height:94dvh;padding:22px;background:linear-gradient(#06192dda,#0b2239d9),url('a26/salle.png') center/cover;border-radius:28px 8px;color:#fff4d3}
.academyRouteHeading{display:flex;gap:18px;align-items:center}.academyRouteHeading>img{width:80px;height:100px;object-fit:contain;filter:drop-shadow(0 0 10px #3ec5ff66)}.academyRouteHeading>div{flex:1}.academyRouteHeading h1{margin:2px 0!important}.academyRouteHeading p{font-size:16px;margin:3px 0!important}.academyRouteHeading>button{align-self:start;font-size:14px;min-height:40px}
.academyPath{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:26px 20px;padding:18px 10px 12px;isolation:isolate;min-height:390px}.academyPath>svg{position:absolute;inset:28px 5% 30px;width:90%;height:calc(100% - 58px);z-index:-1;overflow:visible}.academyPath path{fill:none;stroke:#d8b565;stroke-width:4;stroke-dasharray:5 9;filter:drop-shadow(0 0 5px #f6d38566)}
.academyPlace{display:flex;flex-direction:column;align-items:center;justify-content:start;gap:3px;border:0!important;background:none!important;box-shadow:none!important;border-radius:40px 40px 12px 12px;padding:5px;color:#fff0ce;font:15px Cambria,Georgia,serif;min-width:0;position:relative;text-shadow:0 2px 3px #000}.academyPlace:nth-of-type(n+5){direction:ltr}.academyPlace b{font-size:17px;line-height:1.15}.academyPlace small{font-size:12px!important;letter-spacing:0!important}.academyMedallion{position:relative;width:88px;height:88px;display:block;border:3px solid #c8a961;border-radius:50%;box-shadow:0 0 0 5px #07192bbf,0 5px 16px #000a;overflow:hidden;background:#0e2d45}.academyMedallion>img{width:100%;height:100%;object-fit:cover;object-position:50% 30%}.academyMedallion>strong{position:absolute;left:2px;bottom:1px;width:25px;line-height:25px;background:#102b46;border:1px solid #e1bf76;border-radius:50%;font-size:16px;color:#ffdf8d}.academyPlaceState{position:absolute;right:3px;bottom:3px;color:#b6f5cb;font-weight:700;font-size:20px;text-shadow:0 1px 2px #000}.academyPlace.isLocked{filter:saturate(.3);opacity:.64}.academyPlace[aria-pressed=true] .academyMedallion{border-color:#fff2b9;box-shadow:0 0 0 5px #dbb64d55,0 0 23px #fdd68777}.academyPlace.isCompleted .academyMedallion{border-color:#a4e9c4}.academyPlaceHint{display:none;position:absolute;bottom:0;transform:translateY(100%);background:#092137f7;border:1px solid #c6a35e;border-radius:10px;padding:8px;z-index:5;font-size:13px;max-width:250px}.academyPlace:hover .academyPlaceHint,.academyPlace:focus-visible .academyPlaceHint{display:block}
.academySelected{padding:12px 18px 4px;text-align:center;border-top:1px solid #ceaf6d88;background:radial-gradient(ellipse,#0b263dc9,transparent 76%)}.academySelected h2{margin:4px;font-size:23px;color:#ffe09a}.academySelected p{font-size:16px;margin:4px!important}.academySelected .academyDialogActions{justify-content:center}.academySelected button{flex:0 1 250px}.academyDistinctions{font-size:13px;margin-top:10px}.academyDistinctions p{font-size:13px!important}
/* Verso grows when speaking, then returns to a readable compact guide. */
#academyCoach{transition:padding .2s ease,border-color .2s ease;grid-template-columns:44px minmax(0,1fr);font-size:16px;max-height:min(480px,65dvh);overflow:auto;scrollbar-width:thin}
#academyCoach>img{width:44px;height:68px;transition:width .2s ease,height .2s ease}#academyCoach h2{font-size:17px}#academyCoach p{font-size:16px;line-height:1.4}#academyCoach.isSpeaking{grid-template-columns:1fr;border-color:#ffe6a1;padding:12px 10px;box-shadow:0 0 18px #e7c57444}#academyCoach.isSpeaking>img{width:90px;height:92px;justify-self:center}#academyCoach.isSpeaking h2{font-size:20px;line-height:1.2}#academyCoach.isSpeaking p{font-size:20px;line-height:1.35;color:#fff6df}
#academyCoach .academyCoachActions{position:sticky;bottom:-10px;background:#102d43f5;padding-top:5px;z-index:2}#academyCoach .academyCoachActions button{font-size:14px;min-height:34px}.academyAnswers{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px}.academyAnswers button{min-height:40px;padding:7px;font:600 15px Cambria,Georgia,serif;background:#ddbc72;color:#182235;border:1px solid #fff0b0;border-radius:12px}.academyChecklist{grid-column:1/-1;font-size:13px!important;color:#bce8cb!important;margin:3px 0!important}
/* A reserved speech rail keeps advice away from the combat cards and controls. */
body.academyHasCombatGuide{--academy-rail-height:100px;--academy-rail-top:76px}
#academyCoach.academyCombatRail{position:fixed;left:12px;right:12px;top:76px;bottom:auto;width:auto;max-height:125px;display:grid;grid-template-columns:50px minmax(0,1fr) 230px;gap:6px 12px;align-items:center;margin:0;z-index:1700;padding:8px 12px}
#academyCoach.academyCombatRail>img{width:44px;height:54px}#academyCoach.academyCombatRail.isSpeaking{grid-template-columns:90px minmax(0,1fr) 230px}#academyCoach.academyCombatRail.isSpeaking>img{width:84px;height:92px}#academyCoach.academyCombatRail .academyCoachActions{grid-column:3;position:static;background:none;padding:0}#academyCoach.academyCombatRail .academyAnswers,#academyCoach.academyCombatRail .academyChecklist{display:none}
body.academyHasCombatGuide .bv-sceneStage{top:calc(var(--academy-rail-top) + var(--academy-rail-height) + 6px)!important;height:calc(100dvh - var(--academy-rail-top) - var(--academy-rail-height) - 6px)!important}
@media(max-height:600px) and (orientation:landscape){
#academyDialog.academyRoute{padding:10px 12px;height:96dvh;max-height:96dvh}.academyRouteHeading{gap:8px}.academyRouteHeading>img{width:44px;height:55px}.academyRouteHeading h1{font-size:24px!important}.academyRouteHeading p{font-size:13px}.academyRouteHeading>button{font-size:12px;min-height:34px}.academyPath{gap:14px 18px;min-height:260px;padding:14px 5px}.academyMedallion{width:62px;height:62px}.academyPlace b{font-size:13px}.academyPlace small{font-size:10px!important}.academySelected h2{font-size:20px}.academySelected p{font-size:14px}.academyPlaceHint{font-size:12px}
body.academyMode #game #a26Scene #a26Left #academyCoach{width:100%;max-width:100%;max-height:calc(100dvh - 132px);padding:6px 5px;margin-bottom:5px;grid-template-columns:1fr;position:relative;left:auto;right:auto;top:auto;bottom:auto}
#academyCoach>img{width:32px;height:36px;justify-self:center}#academyCoach small{font-size:10px}#academyCoach h2{font-size:14px;margin:2px 0 4px}#academyCoach p{font-size:14.5px;line-height:1.3}#academyCoach.isSpeaking>img{width:64px;height:68px}#academyCoach.isSpeaking h2{font-size:16px}#academyCoach.isSpeaking p{font-size:16.5px;line-height:1.3}
#academyCoach .academyCoachActions{bottom:-5px;gap:3px}#academyCoach .academyCoachActions button{font-size:12px;min-height:32px;padding:4px}#academyCoach .academyAnswers button{font-size:13px;width:100%;min-height:36px}
#academyCoach.academyCombatRail{left:5px;right:5px;top:62px;max-height:112px;grid-template-columns:35px minmax(0,1fr) 170px;padding:5px 7px;gap:4px 6px}
#academyCoach.academyCombatRail.isSpeaking{grid-template-columns:62px minmax(0,1fr) 170px}#academyCoach.academyCombatRail>img{width:30px;height:35px}#academyCoach.academyCombatRail.isSpeaking>img{width:60px;height:70px}#academyCoach.academyCombatRail h2{font-size:13px}#academyCoach.academyCombatRail p{font-size:14.5px}#academyCoach.academyCombatRail.isSpeaking h2{font-size:15px}#academyCoach.academyCombatRail.isSpeaking p{font-size:16.5px}body.academyHasCombatGuide{--academy-rail-top:62px}
}
@media(max-width:700px) and (orientation:portrait){.academyPath{grid-template-columns:repeat(2,minmax(0,1fr));min-height:650px}.academyRouteHeading{align-items:start}.academyRouteHeading h1{font-size:25px!important}.academyRouteHeading p{font-size:14px}.academyRouteHeading>button{font-size:12px}.academyRouteHeading>img{width:45px;height:70px}}
@media(prefers-reduced-motion:reduce){#academyCoach,#academyCoach>img{transition:none!important}}body.reducedMotion #academyCoach,body.reducedMotion #academyCoach>img{transition:none!important}

@media(min-width:701px),(orientation:landscape){.academyPlace[data-chapter='5']{grid-column:4;grid-row:2}.academyPlace[data-chapter='6']{grid-column:3;grid-row:2}.academyPlace[data-chapter='7']{grid-column:2;grid-row:2}.academyPlace[data-chapter='8']{grid-column:1;grid-row:2}}
body.academyHasCombatGuide .bv-sceneStage{min-height:0!important;max-height:calc(100dvh - var(--academy-rail-top) - var(--academy-rail-height) - 6px)!important}
.academyDistinctionGallery{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;padding:12px}.academyDistinctionGallery figure{margin:0;width:150px;text-align:center;color:#ffe4a4;font-size:14px}.academyDistinctionGallery img{display:block;object-fit:contain;width:66px;height:66px;border:2px solid #d7b86d;border-radius:50%;background:radial-gradient(#274964,#0a2037);padding:7px;box-shadow:0 0 12px #d3ac5555;margin:0 auto 7px}
/* Combat: reserve a bottom speech area, keeping the native header controls free. */
#academyCoach.academyCombatRail{top:auto!important;bottom:42px!important}
body.academyMode.academyHasCombatGuide #game.combatMode .bv-sceneHost .bv-sceneStage{inset:0 0 auto!important;top:0!important;bottom:auto!important;min-height:0!important;height:calc(100dvh - var(--academy-rail-height) - 42px)!important;max-height:calc(100dvh - var(--academy-rail-height) - 42px)!important}
body.academyMode.academyHasCombatGuide #game.combatMode .bv-sceneLayout>aside{bottom:calc(var(--academy-rail-height) + 42px)!important;overflow:auto!important;min-height:0!important}
#academyCoach.academyCombatRail .academyCoachActions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;align-items:center}
#academyCoach.academyCombatRail [data-repeat]{grid-area:1/1}#academyCoach.academyCombatRail [data-fold]{grid-area:1/2}#academyCoach.academyCombatRail [data-quit]{grid-area:1/3}#academyCoach.academyCombatRail [data-next]{grid-area:2/1/3/4}
body.academyMode.academyHasCombatGuide #combat .bv-sceneHost{animation:none!important;transform:none!important}
@media(max-height:600px) and (orientation:landscape){
body.academyMode.a26-prep #game #a26Scene{grid-template-columns:180px minmax(0,1fr)!important}
body.academyMode #game #a26Scene #a26Left #academyCoach{flex:0 0 auto;max-height:calc(100dvh - 96px)}
body.academyMode #a26Left #academyCoach .academyCoachActions{position:static}
body.academyMode #a26Left #academyCoach>img{height:28px;width:28px}
body.academyMode #a26Left #academyCoach.isSpeaking>img{height:48px;width:48px}
body.academyMode #a26Left #academyCoach small{display:none}
}
