/* Scoped addition: existing HUD, bench, shop and drag targets keep their geometry. */
#coach-btn{margin-top:3px;color:#f6dda0}#coach-btn:disabled{opacity:.45}
.coach-settings{border:1px solid #526582;border-radius:9px;padding:12px;margin:15px 0;color:#cbd9e9}.coach-settings legend{color:#ffdf91;font-weight:800}.coach-settings p,.coach-settings small{font-size:12px;display:block}.coach-settings label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:9px 0}.coach-settings select{background:#20344e;color:white;border:1px solid #6a809e;border-radius:5px;max-width:65%;padding:6px}
#coach-result{border:1px solid #607d9c;border-radius:9px;background:#172a42;padding:10px;margin:12px 0;text-align:left;color:#e3eaf2}#coach-result[hidden]{display:none}#coach-result h3{font-size:14px;margin:0 0 7px;color:#f6dfa2}#coach-result h3 small{font-size:10px;color:#adbdce;float:right}#coach-result dl{margin:0;max-height:166px;overflow:auto;overscroll-behavior:contain}#coach-result dt{font-size:11px;color:#8ed8c9;font-weight:800;margin-top:7px}#coach-result dd{font-size:12px;line-height:1.6;margin:2px 0 7px}#coach-result button{display:block;margin:8px 0 0;width:100%;padding:7px;border:1px solid #7586a1;border-radius:6px;background:#29405c;color:#fff}
#combat-result.has-coach{position:fixed;top:50%;left:50%;width:min(490px,calc(100vw - 32px));max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;box-sizing:border-box;z-index:90}#combat-result.has-coach #result-continue{position:sticky;bottom:0;z-index:1;display:block;width:100%;margin-top:8px}
.coach-content{font-size:13px;line-height:1.7;color:#d5e0ef}.coach-content p{overflow-wrap:anywhere}.coach-disclosure,.coach-note{color:#aebed3;font-size:12px}.coach-actions{display:flex;gap:8px;flex-wrap:wrap}.coach-actions button,.coach-content summary{padding:9px;background:#223750;border:1px solid #56708e;border-radius:6px;color:#e9f1ff;cursor:pointer}.coach-actions button:disabled{opacity:.4;cursor:default}.coach-summary{color:#f1d895}.coach-advice,.coach-diagnosis{border:1px solid #4c6485;background:#182940;border-radius:9px;margin:10px 0;padding:12px}.coach-advice h3,.coach-diagnosis h3{font-size:14px;margin:0 0 5px;color:#f4dfa3}.coach-advice p{margin:0}.coach-diagnosis{border-color:#b47d76}.coach-delta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.coach-delta span{background:#213d48;padding:3px 7px;border-radius:4px;font-size:12px}.coach-delta b{color:#92e1c3}.coach-content details{margin:12px 0}.coach-unit-list{display:grid;gap:6px}.coach-unit-list>span{background:#20334a;padding:6px;border-radius:5px}.coach-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}.coach-roster article{background:#21334b;border:1px solid #425b7b;border-radius:6px;padding:10px}.coach-roster p{font-size:12px}
@media(max-height:500px){#combat-result.has-coach{padding:10px 16px}#combat-result.has-coach .result-sparkles{display:none}#combat-result.has-coach h2{font-size:25px;margin:2px}#combat-result.has-coach #result-description{font-size:10px;margin:5px}#combat-result.has-coach .result-rewards{margin:6px;gap:5px;flex-wrap:wrap}#coach-result dl{max-height:110px}.coach-content{font-size:12px}.coach-advice{padding:9px}}
@media(prefers-reduced-motion:reduce){#coach-result{animation:none}}
#strategy-overlay:has(.coach-content) .strategy-panel>header{position:sticky;top:-20px;background:#26344f;z-index:2;padding-bottom:6px}
@media(max-height:500px){body.playing #combat-result.has-coach #result-title{font-size:30px;letter-spacing:-1px;margin:3px 0}#coach-result dl{max-height:160px}#coach-result dd{font-size:11px}}
@media(max-height:500px) and (min-width:600px){
 #combat-result.has-coach{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:5px 12px;width:min(770px,calc(100vw - 36px));padding:10px 14px}
 #combat-result.has-coach #result-overline{grid-column:1;grid-row:1;margin:0;font-size:9px}
 #combat-result.has-coach #result-title{grid-column:1;grid-row:2}
 #combat-result.has-coach #result-description{grid-column:1;grid-row:3;max-height:95px;overflow:auto;line-height:1.4;margin:0}
 #combat-result.has-coach #result-rewards{grid-column:1;grid-row:4;font-size:10px;margin:2px;flex-wrap:wrap}
 #combat-result.has-coach #result-rewards span{padding:4px 6px}
 #combat-result.has-coach #battle-analysis-btn{grid-column:1;grid-row:5;padding:5px}
 #combat-result.has-coach #coach-result{grid-column:2;grid-row:1 / span 5;margin:0;padding:9px;text-shadow:none}
 #combat-result.has-coach #coach-result dl{max-height:195px}
 #combat-result.has-coach #result-continue{grid-column:1 / -1;grid-row:6;margin-top:3px;padding:8px}
}
.coach-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:10px 0}.coach-tabs button{background:#223750;color:#dce6f4;border:1px solid #56708e;border-radius:6px;padding:9px 4px;font-size:12px;font-weight:700;cursor:pointer}.coach-tabs button[aria-selected=true]{color:#ffe3a0;border-color:#e0bf78;background:#354462}.coach-tabs button:focus-visible{outline:2px solid #9de5f5;outline-offset:2px}.coach-compare{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;font-size:12px}.coach-compare b{color:#a9e8d0;text-align:right}.coach-content li{margin:5px 0;overflow-wrap:anywhere}.coach-content small{color:#aebed3}.coach-content #coach-tabpanel{min-width:0}.coach-content #coach-tabpanel>h3{font-size:13px;color:#ecdaa7}.coach-content [role=tabpanel] .coach-advice p+p{border-top:1px solid #445775;padding-top:8px;margin-top:8px}
@media(max-height:500px){.coach-tabs button{padding:7px 2px;font-size:11px}.coach-tabs{gap:3px}.coach-content .coach-compare{font-size:11px}.coach-content>.coach-advice{padding:7px;margin:6px 0}}
.coach-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:8px}.coach-overview>.coach-advice{min-width:0}
@media(max-height:500px){#strategy-overlay:has(.coach-content) .strategy-panel>header{padding-bottom:4px}#strategy-overlay:has(.coach-content) #strategy-title{font-size:20px;margin:3px 0}.coach-disclosure{font-size:10px;line-height:1.25;margin:3px 0}.coach-disclosure br{display:none}.coach-actions button{padding:5px 8px;font-size:11px}.coach-summary{font-size:10px;line-height:1.3;margin:4px 0}.coach-overview{gap:5px}.coach-overview>.coach-advice{margin:3px 0;padding:6px}.coach-overview h3{font-size:12px;margin-bottom:2px}.coach-overview p{font-size:11px;line-height:1.4}.coach-tabs{position:sticky;top:45px;z-index:1;background:#26344f;padding:3px 0;margin:3px 0}}
