/* One compact headmaster bubble; existing tutorial input cues remain authoritative. */
#match #tutorial-coach.entrance-exam{left:176px;bottom:24px!important;top:auto;transform:none;width:min(430px,calc(100vw - 40px));padding:12px 15px;gap:12px;border:1px solid #c9ad7e;border-radius:16px 16px 16px 4px;background:linear-gradient(125deg,#30293fed,#191d32f5);box-shadow:0 5px 18px #09091755;align-items:center}
#tutorial-coach.entrance-exam .exam-portrait{position:relative;flex:0 0 68px;width:68px;height:86px;overflow:hidden;border-radius:24px 24px 12px 12px;background:radial-gradient(ellipse,#7f629d77,#26243d);border-bottom:2px solid #c9ad7e}
#tutorial-coach.entrance-exam .exam-portrait img{position:absolute;width:190px;max-width:none;height:228px;left:-62px;top:-42px;object-fit:contain}
#tutorial-coach.entrance-exam .exam-copy{flex:1;min-width:0}
#tutorial-coach.entrance-exam small{color:#d9c397;font:700 9px/1.3 system-ui;letter-spacing:.1em}
#tutorial-coach.entrance-exam .exam-dialogue{margin:4px 0 8px;font:15px/1.3 Georgia,serif;color:#fff3df}
#tutorial-coach.entrance-exam strong{display:flex;align-items:center;gap:7px;font:700 14px/1.2 system-ui;margin:2px 0 4px;color:#e2dcff}
#tutorial-coach.entrance-exam .tutorial-picture{width:26px;height:26px;flex:0 0 26px}
#tutorial-coach.entrance-exam .tutorial-arrows{font-size:25px;line-height:1}
#tutorial-coach.entrance-exam .tutorial-keys{font:12px/1.3 system-ui;flex-wrap:wrap;color:#e3e6ef}
#tutorial-coach.entrance-exam .tutorial-keys kbd{font-size:12px;padding:3px 6px}
#tutorial-coach.entrance-exam progress{display:none}
#tutorial-coach.entrance-exam .tutorial-dots{position:absolute;right:12px;top:11px;gap:3px}
#tutorial-coach.entrance-exam .tutorial-dots i{width:7px;height:7px;font-size:0;border-width:1px}
#tutorial-coach.entrance-exam .tutorial-dots .complete{background:#e6c58c;border-color:#e6c58c}
#match #tutorial-coach.entrance-exam[data-waiting=true]{left:50%!important;transform:translateX(-50%)!important;width:min(430px,calc(100vw - 40px))!important;border-color:#f2dc9f!important}
.exam-result{display:flex;align-items:center;gap:12px;max-width:360px;margin:12px auto;padding:9px 13px;border:1px solid #b9a17c66;border-radius:14px;background:#282238;color:#eee0ca;font:14px/1.35 Georgia,serif;text-align:left}
.exam-result img{width:48px;height:55px;object-fit:cover;object-position:center 25%;border-radius:8px}
@media(max-height:600px),(max-width:1100px){
#match #tutorial-coach.entrance-exam{top:68px!important;bottom:auto!important;left:50%!important;transform:translateX(-50%)!important;width:min(375px,48vw)!important;padding:8px 10px!important;gap:8px!important;border-width:1px!important}
#tutorial-coach.entrance-exam .exam-portrait{width:47px;height:63px;flex-basis:47px}
#tutorial-coach.entrance-exam .exam-portrait img{width:145px;height:174px;left:-50px;top:-33px}
#match #tutorial-coach.entrance-exam small{display:block!important;font-size:8px!important;line-height:10px!important;margin:0!important}
#tutorial-coach.entrance-exam .exam-dialogue{font-size:12px;margin:3px 0 5px;line-height:1.2}
#match #tutorial-coach.entrance-exam strong{font-size:12px!important;line-height:15px!important;display:flex!important;margin:0 0 2px!important}
#match #tutorial-coach.entrance-exam .tutorial-picture{width:21px!important;height:21px!important;min-width:21px!important;flex:0 0 21px!important}
#match #tutorial-coach.entrance-exam .tutorial-picture>*{width:21px!important;height:21px!important}
#match #tutorial-coach.entrance-exam .tutorial-keys{font-size:10px!important;line-height:12px!important}
#match #tutorial-coach.entrance-exam[data-waiting=true]{top:50%!important;transform:translate(-50%,-50%)!important;width:min(370px,55vw)!important}
#tutorial-coach.entrance-exam .tutorial-dots{display:none}
}
@media(prefers-reduced-motion:reduce){#tutorial-coach.entrance-exam{animation:none}}
/* The small-screen coach occupies the timer's otherwise competing space. */
@media(max-height:600px),(max-width:1100px){#match:has(#tutorial-coach.entrance-exam:not([hidden])) .timer{visibility:hidden}}
/* Full transparent cutout beside the bubble, not an inset avatar. */
#match #tutorial-coach.entrance-exam{left:310px;overflow:visible}
#match #tutorial-coach.entrance-exam .exam-portrait{position:absolute;left:-132px;bottom:-1px;width:124px;height:158px;overflow:visible;border:0;border-radius:0;background:none;pointer-events:none}
#match #tutorial-coach.entrance-exam .exam-portrait img{position:static;display:block;width:100%;height:100%;max-width:100%;object-fit:contain;filter:drop-shadow(0 3px 4px #100d2455)}
#match #tutorial-coach.entrance-exam[data-waiting=true]{left:calc(50% + 58px)!important;width:min(430px,calc(100vw - 180px))!important}
@media(max-height:600px),(max-width:1100px){
#match #tutorial-coach.entrance-exam{left:calc(50% + 42px)!important;width:min(375px,48vw)!important}
#match #tutorial-coach.entrance-exam .exam-portrait{left:-94px;width:88px;height:112px;bottom:-1px}
#match #tutorial-coach.entrance-exam[data-waiting=true]{left:calc(50% + 42px)!important;width:min(370px,calc(100vw - 126px))!important}
}
/* Readable action cues: larger keys and a visible pointing hand. */
#match #tutorial-coach.entrance-exam .tutorial-keys{align-items:center;gap:9px;font-size:14px!important;line-height:1.5!important;margin-top:8px;padding-bottom:5px}
#match #tutorial-coach.entrance-exam .tutorial-keys kbd{position:relative;display:inline-block;min-width:40px;padding:8px 11px;font:bold 19px/1.1 system-ui!important;text-align:center;border:2px solid #fff1bc;box-shadow:0 4px #8f7145,0 0 12px #f6d98066;animation:exam-key 1.6s ease-in-out infinite}
#match #tutorial-coach.entrance-exam[data-waiting=true] .tutorial-keys kbd{font-size:24px!important;min-width:72px;padding:12px 16px}
#tutorial-coach.entrance-exam .tutorial-keys kbd:last-child::after{content:'';position:absolute;width:36px;height:42px;right:-24px;top:-15px;background:url('art/ui-glove-glyph.svg') center/contain no-repeat;filter:drop-shadow(0 2px 2px #171126);animation:exam-point 1.6s ease-in-out infinite}
#match #tutorial-coach.entrance-exam .tutorial-keys:has(kbd){padding-right:26px}
#match:has(#tutorial-coach.entrance-exam:not([hidden])) #touch-controls .tutorial-target{outline:3px solid #fff0ad;outline-offset:4px;box-shadow:0 0 24px #ffe6a6aa!important}
#match:has(#tutorial-coach.entrance-exam:not([hidden])) .touch-lesson-cue::after{width:60px!important;height:70px!important}
@keyframes exam-key{0%,35%,100%{transform:translateY(0)}50%,65%{transform:translateY(3px);background:#fff5cb;box-shadow:0 1px #8f7145,0 0 18px #f6d98099}}
@keyframes exam-point{0%,35%,100%{transform:translate(5px,-5px)}50%,65%{transform:translate(0,2px)}}
@media(max-height:600px),(max-width:1100px){
#match #tutorial-coach.entrance-exam .tutorial-keys{font-size:12px!important;line-height:1.35!important;margin-top:6px}
#match #tutorial-coach.entrance-exam .tutorial-keys kbd{font-size:16px!important;min-width:31px;padding:6px 8px}
#match #tutorial-coach.entrance-exam[data-waiting=true] .tutorial-keys kbd{font-size:21px!important;min-width:65px;padding:9px 14px}
}
@media(prefers-reduced-motion:reduce){#match #tutorial-coach.entrance-exam .tutorial-keys kbd,#tutorial-coach.entrance-exam .tutorial-keys kbd::after{animation:none!important}}
/* Keycap enhancement replaces LMB text with SVG; retain the same large key treatment. */
#match #tutorial-coach.entrance-exam .tutorial-keys kbd.hex-keycap{display:inline-flex!important;align-items:center;justify-content:center;min-width:44px!important;min-height:42px!important;background:#f4e7ba!important;border:2px solid #fff1bc!important;border-radius:8px!important;padding:6px 10px!important;color:#292337!important}
#match #tutorial-coach.entrance-exam .tutorial-keys kbd .hex-ui-icon{width:29px!important;height:29px!important;max-width:none!important;color:#42384f!important}
#match #tutorial-coach.entrance-exam .tutorial-keys[hidden]{display:none!important}
#tutorial-coach.entrance-exam .exam-continue{pointer-events:auto;margin-top:10px;padding:9px 18px;border:1px solid #f2d699;border-radius:8px;background:#efd7a4;color:#30283e;font:700 15px system-ui;cursor:pointer;box-shadow:0 3px #8d7151}
#tutorial-coach.entrance-exam .exam-continue:focus-visible{outline:3px solid white;outline-offset:3px}
#tutorial-coach.entrance-exam[data-opening=true] .tutorial-dots{display:none}
/* Use the open lower-left area as a readable, full-size conversation stage. */
@media(min-width:1101px) and (min-height:601px){
 body:not(.touch-device) #match:not([hidden]) #tutorial-coach.entrance-exam:not([data-waiting=true]){left:360px!important;bottom:28px!important;width:min(430px,calc(100vw - 850px))!important;min-width:360px;padding:20px 24px!important;border-width:2px}
 #match #tutorial-coach.entrance-exam .exam-portrait{left:-195px;width:188px;height:260px;bottom:-6px}
 #match #tutorial-coach.entrance-exam .exam-dialogue{font-size:25px;line-height:1.32;margin:8px 0 14px}
 #match #tutorial-coach.entrance-exam small{font-size:11px}
 #match #tutorial-coach.entrance-exam strong{font-size:19px!important;line-height:1.3!important}
 #match #tutorial-coach.entrance-exam[data-waiting=true]{left:calc(50% + 85px)!important;transform:translateX(-50%)!important;width:500px!important}
}
#match #tutorial-coach.entrance-exam .exam-continue{display:block;width:100%;min-height:58px;padding:14px 20px;margin-top:16px;border:2px solid #fff1be;border-radius:12px;background:linear-gradient(120deg,#fff0b9,#e9b85e);color:#30213f;font:900 19px/1.2 system-ui;letter-spacing:.025em;box-shadow:0 5px 0 #8d6438,0 0 25px #eabf6470;animation:exam-ready-glow 1.8s ease-in-out infinite}
#match #tutorial-coach.entrance-exam .exam-continue:hover{background:#fff4ce;transform:translateY(-2px)}
@keyframes exam-ready-glow{50%{box-shadow:0 5px 0 #8d6438,0 0 38px #eabf64b0}}
@media(max-height:600px),(max-width:1100px){#match #tutorial-coach.entrance-exam .exam-continue{min-height:44px;font-size:15px;margin-top:8px;padding:9px 12px}}
@media(prefers-reduced-motion:reduce){#match #tutorial-coach.entrance-exam .exam-continue{animation:none}}
.exam-result:has(.exam-property){max-width:510px;position:relative;min-height:100px;padding-right:145px}
.exam-property{position:absolute;right:5px;bottom:0;width:140px;pointer-events:none;overflow:hidden}
.exam-property svg{display:block;width:100%;height:auto}
.exam-dust,.exam-crack,.exam-crash{opacity:0}
.exam-tower{transform-origin:105px 70px}
.broken .exam-tower{animation:exam-collapse .65s ease-in forwards}
.broken .exam-crack{opacity:1}
.broken .exam-dust{animation:exam-dust 1.5s ease-out forwards}
.broken .exam-crash{animation:exam-crash 1.7s ease-out forwards}
@keyframes exam-collapse{35%{transform:rotate(12deg)}100%{transform:translate(25px,40px) rotate(65deg)}}
@keyframes exam-dust{0%{opacity:0;transform:translateY(12px)}25%{opacity:.9}100%{opacity:0;transform:translateY(-18px)}}
@keyframes exam-crash{0%{opacity:0}18%,70%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.broken .exam-tower{animation:none;transform:translate(25px,40px) rotate(65deg)}.broken .exam-dust{animation:none}.broken .exam-crash{animation:none;opacity:1}}

.exam-extra-hint{margin:8px 0 0;padding:7px 9px;border-left:2px solid #e7cc90;background:#d9bc7220;color:#fff1ce;font:600 12px/1.35 system-ui}.exam-extra-hint[hidden]{display:none}
/* Put graduation at the top of the result panel so the crash cannot hide below rewards. */
.exam-result.exam-graduation{display:grid;grid-template-columns:64px 1fr;max-width:560px;min-height:0;padding:16px;margin:0 auto 16px;border:2px solid #e7c47f;background:linear-gradient(140deg,#463155,#211d35);box-shadow:0 0 28px #d9b76630;font-size:clamp(15px,2vw,19px)}
.exam-graduation>img{width:64px;height:90px;object-fit:contain}
.exam-graduation .exam-property{position:relative;right:auto;bottom:auto;grid-column:1/-1;width:min(260px,65vw);margin:-8px auto 0}
.exam-graduation .broken{filter:drop-shadow(0 0 12px #ffd08060)}
@media(max-height:550px){.exam-result.exam-graduation{grid-template-columns:48px 1fr 140px;padding:10px;font-size:14px}.exam-graduation>img{width:48px;height:64px}.exam-graduation .exam-property{grid-column:3;grid-row:1;width:140px;margin:0}}

#overlay #headmaster-exam-result.exam-graduation{grid-column:1 / -1;justify-self:center;align-self:start;width:min(560px,100%);max-width:560px;box-sizing:border-box;margin:0 auto 16px!important}
/* The action cue now lives in the arena; the mentor never jumps into the fight. */
@media(min-width:1101px) and (min-height:601px){#match #tutorial-coach.entrance-exam[data-waiting=true]{left:360px!important;bottom:28px!important;top:auto!important;transform:none!important;width:min(430px,calc(100vw - 850px))!important;min-width:360px}}
@media(max-height:600px),(max-width:1100px){#match #tutorial-coach.entrance-exam[data-waiting=true]{top:68px!important;bottom:auto!important;left:50%!important;transform:translateX(-50%)!important;width:min(375px,48vw)!important}}
/* Teach one action before introducing the full match HUD. */
body:is([data-exam-ui=welcome],[data-exam-ui=lesson]) #academy-team-hud,
body:is([data-exam-ui=welcome],[data-exam-ui=lesson]) #mobile-arena-map,
body:is([data-exam-ui=welcome],[data-exam-ui=lesson]) #match .timer,
body:is([data-exam-ui=welcome],[data-exam-ui=lesson]) .academy-player-health{display:none!important}
body[data-exam-ui=welcome] #match .bottom,
body[data-exam-ui=welcome] #touch-controls .touch-spells{visibility:hidden!important;pointer-events:none!important}
body[data-exam-ui] :is([data-spell=ultimate],[data-touch=ultimate]){display:none!important}
body[data-exam-ui]:not([data-exam-spells~=dash]) :is([data-spell=dash],[data-touch=dash]),
body[data-exam-ui]:not([data-exam-spells~=fire]) :is([data-spell=fire],[data-touch=fire]),
body[data-exam-ui]:not([data-exam-spells~=reflect]) :is([data-spell=reflect],[data-touch=reflect]){display:none!important}
body[data-exam-ui] #tutorial-coach.entrance-exam :is(.exam-copy>strong,.tutorial-keys,.tutorial-dots){display:none!important}
body[data-exam-ui] #tutorial-coach.entrance-exam .exam-dialogue{margin:0;line-height:1.35}
@media(min-width:1101px) and (min-height:601px){body[data-exam-ui] #match #tutorial-coach.entrance-exam{left:245px!important;width:370px!important;min-width:0;bottom:24px!important;padding:16px 20px!important}body[data-exam-ui] #match #tutorial-coach.entrance-exam .exam-portrait{left:-150px;width:145px;height:195px}body[data-exam-ui] #match #tutorial-coach.entrance-exam .exam-dialogue{font-size:21px}}
body[data-exam-ui] #match #tutorial-coach.entrance-exam .exam-copy>strong,body[data-exam-ui] #match #tutorial-coach.entrance-exam .tutorial-keys{display:none!important}
@media(max-height:600px),(max-width:1100px){body[data-exam-ui] #match #tutorial-coach.entrance-exam .exam-dialogue{font-size:14px!important;line-height:1.35!important}body[data-exam-ui] #match #tutorial-coach.entrance-exam{width:min(420px,calc(100vw - 150px))!important}}
@media(max-height:550px){body[data-exam-ui=welcome] #match:not([hidden]) #tutorial-coach.entrance-exam{top:auto!important;bottom:10px!important;left:50%!important;transform:translateX(-50%)!important;width:min(380px,calc(100vw - 180px))!important}body[data-exam-ui=welcome] #match:not([hidden]) #tutorial-coach.entrance-exam .exam-portrait{height:98px!important;width:70px!important;left:-74px!important}body[data-exam-ui=welcome] #match:not([hidden]) #tutorial-coach.entrance-exam .exam-portrait img{width:100%!important;height:100%!important;left:0!important;top:0!important}}

/* Frozen action cues are painted in the arena: never dim them behind the mentor. */
body[data-exam-ui] #match #tutorial-coach.entrance-exam[data-waiting=true]:not([hidden]){box-shadow:0 5px 18px #09091755!important}

#overlay.exam-intermission .modal{display:grid!important;place-items:center!important;grid-template-columns:1fr!important;grid-template-rows:1fr!important}
#overlay.exam-intermission .modal>:not(#headmaster-exam-result){display:none!important}
#overlay.exam-intermission #headmaster-exam-result{grid-column:1/-1;display:flex;flex-direction:column;gap:12px;align-items:center;text-align:center;width:min(440px,85vw);padding:28px;background:radial-gradient(ellipse at top,#604878,#272138 75%);border:2px solid #cbb58b;border-radius:28px;box-shadow:0 12px 0 #17132166,0 0 90px #aa87d322;font:18px Georgia,serif}
.exam-stamp-seal{display:grid;place-items:center;width:90px;height:90px;border:5px double #f0db9b;border-radius:50%;background:#635074;color:#fff0b9;font:bold 48px Georgia;box-shadow:0 0 0 6px #b6997230;animation:exam-stamp-in .35s ease-out}
.exam-stamp strong{font-size:30px;color:#f5dfaa}.exam-stamp small{color:#c9bbdb;font:14px sans-serif}
#overlay.exam-final #description,#overlay.exam-final #hint{display:none!important}
@keyframes exam-stamp-in{from{transform:scale(1.35) rotate(-12deg);opacity:0}to{transform:scale(1);opacity:1}}
@media(max-height:500px){#overlay.exam-intermission #headmaster-exam-result{gap:7px;padding:15px}.exam-stamp-seal{width:60px;height:60px;font-size:34px}.exam-stamp strong{font-size:24px}}
@media(prefers-reduced-motion:reduce){.exam-stamp-seal{animation:none}}

/* Graduation has its own stage, rather than squeezing above match statistics. */
#overlay.exam-final .modal{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:minmax(0,1fr) auto!important;gap:14px!important;max-width:980px!important;width:calc(100% - 32px)!important;height:min(700px,calc(100dvh - 32px))!important;margin:auto!important;padding:20px!important;box-sizing:border-box}
#overlay.exam-final .modal>:not(#headmaster-exam-result):not(#start):not(#overlay-menu){display:none!important}
#overlay.exam-final #headmaster-exam-result.exam-graduation{display:grid!important;grid-template-columns:100px minmax(0,1fr) 180px!important;grid-template-rows:auto minmax(0,1fr) auto!important;align-items:center!important;gap:16px!important;grid-row:1!important;grid-column:1/-1!important;width:100%!important;max-width:none!important;min-height:0!important;height:100%!important;margin:0!important;padding:24px!important;border-radius:24px;background:radial-gradient(ellipse at 50% 0,#654b78,#282238 70%);overflow:hidden}
.exam-diploma{grid-column:1/-1;grid-row:1;text-align:center}.exam-diploma small{font:12px sans-serif;letter-spacing:.18em;color:#d1c2e5}.exam-diploma h2{margin:8px 0 14px!important;font:bold clamp(26px,4vw,46px) Georgia!important;color:#ffe6ae}
.exam-earned-stamps{display:flex;justify-content:center;gap:14px}.exam-earned-stamps span{display:grid;place-items:center;width:42px;height:42px;border:3px double #cdbb85;border-radius:50%;background:#8b739833;color:#f9e3ae}
#overlay.exam-final .exam-graduation>img{grid-row:2;grid-column:1;width:90px;height:110px;object-fit:contain}
#overlay.exam-final .exam-graduation>span{grid-row:2;grid-column:2;font:clamp(14px,1.7vw,19px)/1.5 Georgia;color:#e2d8ec}
#overlay.exam-final .exam-graduation .exam-property{grid-row:2!important;grid-column:3!important;width:170px!important;margin:0!important}
.exam-welcome-gift{grid-row:3;grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:22px;border-top:1px solid #bda17a55;padding-top:14px}.exam-welcome-gift>img{width:100px;height:90px;object-fit:contain;filter:drop-shadow(0 0 18px #d7b26b55)}.exam-welcome-gift strong{font:bold 23px Georgia;color:#ffe6ae}.exam-welcome-gift p{margin:6px 0;font:15px sans-serif}.exam-welcome-gift small{font:13px sans-serif;color:#c8c2db}.exam-replay-seal{font-size:44px;color:#b6e9c3}
#overlay.exam-final #start{grid-row:2!important;grid-column:1!important;position:static!important;width:100%!important;margin:0!important;min-height:52px;animation:exam-next-glow 2s ease-in-out infinite}
#overlay.exam-final #overlay-menu{grid-row:2!important;grid-column:2!important;position:static!important;margin:0!important}
@keyframes exam-next-glow{50%{box-shadow:0 0 20px #dfc98755}}
@media(max-height:550px){#overlay.exam-final .modal{padding:6px!important;gap:8px!important;height:calc(100dvh - 16px)!important}#overlay.exam-final #headmaster-exam-result.exam-graduation{padding:12px 18px!important;gap:8px!important;grid-template-columns:60px minmax(0,1fr) 100px!important}.exam-diploma h2{font-size:26px!important;margin:3px 0 6px!important}.exam-earned-stamps span{width:26px;height:26px;font-size:12px}#overlay.exam-final .exam-graduation>img{width:52px;height:64px}#overlay.exam-final .exam-graduation>span{font-size:13px}#overlay.exam-final .exam-graduation .exam-property{width:95px!important}.exam-welcome-gift{gap:14px;padding-top:6px}.exam-welcome-gift>img{width:66px;height:54px}.exam-welcome-gift strong{font-size:18px}.exam-welcome-gift p{font-size:12px;margin:3px 0}.exam-welcome-gift small{font-size:11px}#overlay.exam-final #start{min-height:42px}}
@media(prefers-reduced-motion:reduce){#overlay.exam-final #start{animation:none}}

#mobile-match-options [data-skip-tutorial],#hub-content [data-skip-tutorial]{background:linear-gradient(#594268,#30233f);color:#eadcc7;border:1px solid #aa9270;border-radius:12px;padding:10px 18px;min-height:44px}

/* Combat controls must not cover any tutorial result, including retries. */
body:where([data-overlay-open][data-overlay-exam]):not(#_o):not(#_e):not(._o) #match#match .bottom,
body:where([data-overlay-open][data-overlay-exam]):not(#_o):not(#_e):not(._o) #touch-controls{display:none!important;pointer-events:none!important}
