/* Paper instructions, moving invitations, and stationary aim are separate layers. */
#tutorialCoach{position:fixed;inset:0;z-index:35;pointer-events:none}
.coach-paper{position:fixed;width:max-content;max-width:248px;padding:7px 11px;border:2px solid #704b32;border-radius:12px 12px 12px 3px;background:linear-gradient(135deg,#fff6dc,#f2dfb7);box-shadow:0 3px 0 #3f291b55,0 5px 14px #20140c3d,inset 0 0 0 2px #fff9e8;color:#49301f;text-shadow:none;font-size:13px;line-height:1.45;font-weight:800;white-space:pre-line;text-align:center}
.coach-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.coach-leader{fill:none;stroke:#fbe4b4;stroke-width:2;stroke-dasharray:3 4;filter:drop-shadow(0 1px 1px #402819)}
.coach-route{fill:none;stroke:#fff4d5;stroke-width:5;stroke-dasharray:6 7;stroke-linecap:round;filter:drop-shadow(0 1px 2px #5c3626);opacity:.75}
.coach-pointer{fill:#fff7dfb8;stroke:#775238;stroke-width:2;filter:drop-shadow(0 2px 2px #20130880)}
#tutorialCoach[data-kind=success] .coach-paper{border-color:#436856;color:#2e523c;background:#f4f4d6}
#tutorialCoach[data-kind=success] .coach-leader{display:none}
.story-mode.in-battle .enemy.tutorial-target{outline:none;box-shadow:none}
.enemy-guide-arrow{display:none;position:absolute;left:calc(50% - 12px);top:-27px;font-size:25px;line-height:25px;color:#fff0b6;text-shadow:0 2px #74442d,1px 0 #74442d,-1px 0 #74442d;pointer-events:none}
.enemy.tutorial-target .enemy-guide-arrow{display:block;animation:coach-arrow 1.4s ease-in-out infinite}
.enemy.tutorial-target .enemy-art{animation:coach-breathe 1.8s ease-in-out infinite}
@keyframes coach-arrow{50%{transform:translateY(6px)}}
@keyframes coach-breathe{50%{opacity:.83}}
.in-battle .enemy.selected .enemy-art{filter:drop-shadow(0 1px 2px #0006)}
.in-battle .enemy.selected .mini-bar{outline:2px solid #a8e3d1;outline-offset:2px}
.in-battle .enemy.selected .enemy-turn{outline:none}
.enemy-aim{display:none;position:absolute;bottom:-2px;left:0;padding:1px 4px;border:1px solid #a8e3d1;border-radius:4px;background:#254b43;color:#f4ffeb;text-shadow:none;font-size:10px;line-height:15px;white-space:nowrap}
.enemy.selected .enemy-aim{display:block}
.enemy-aim-mark{display:inline-block;width:10px;height:10px;border:1px solid currentColor;border-radius:50%;vertical-align:-1px;margin-right:3px;position:relative}
.enemy-aim-mark::before,.enemy-aim-mark::after{content:"";position:absolute;background:currentColor;left:50%;top:50%;transform:translate(-50%,-50%)}
.enemy-aim-mark::before{width:14px;height:1px}.enemy-aim-mark::after{width:1px;height:14px}
.in-battle .item.coach-focus{outline:3px solid #f7de9b;outline-offset:2px}
.in-battle .enemy-prediction.coach-advantage{font-weight:900;color:#faffdf;background:#355a35;border:1px solid #d0e99f;border-radius:4px;padding:2px}
@media(prefers-reduced-motion:reduce){.enemy.tutorial-target .enemy-guide-arrow,.enemy.tutorial-target .enemy-art{animation:none}.coach-route{stroke-dasharray:none;opacity:.55}}
@media(max-width:360px){.coach-paper{font-size:12px;line-height:1.3;padding:4px 9px}.enemy-aim{font-size:9px;padding-inline:2px}}

.story-mode.in-battle .board .tile.coach-focus:not(.tutorial-cell){outline:2px dashed #f7dea0;outline-offset:-2px}

/* Keep the magnet coach beside its item after the sheet finishes sliding in. */
.story-mode.in-battle.coach-tool-open .battle-sheet .sheet-head{margin-bottom:48px}

.coach-copy,.coach-result,.coach-result b,.coach-result span{display:block}
.coach-result{margin-top:4px;padding-top:3px;border-top:1px solid #a48759;color:#30554a;font-size:12px;line-height:1.35}
.coach-result b{font-size:13px;color:#49301f}

/* Compact overlays fit available space without changing layout height.
   The detailed reaction copy remains available to assistive technology and
   in the regular spell preview; the visible recipe still names its result. */
.coach-paper[data-layout=wide]{display:flex;align-items:center;gap:6px;padding:1px 6px;font-size:12px;line-height:1.2}
.coach-paper[data-layout=wide] .coach-copy{flex:none}
.coach-paper[data-layout=wide] .coach-result{flex:1;min-width:62px;margin:0;padding:0 0 0 6px;border-top:0;border-left:1px solid #a48759}
.coach-paper[data-layout=wide] .coach-result b{font-size:12px;line-height:1.2}
.coach-paper[data-layout=narrow]{padding:4px 5px;font-size:12px;line-height:1.2}
.coach-paper[data-layout=narrow] .coach-result b{font-size:12px;line-height:1.2}
.coach-paper:is([data-layout=wide],[data-layout=narrow]) .coach-result span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

/* A stationary role label identifies the summoner without telling the player
   to select it. It stays separate from both the moving arrow and fixed aim. */
.enemy-role{position:absolute;top:-21px;left:50%;transform:translateX(-50%);padding:2px 5px;border:1px solid #806346;border-radius:5px;background:#f5e6c8;color:#59412d;font-size:11px;line-height:15px;white-space:nowrap;text-shadow:none;pointer-events:none}
