/* Overlays share the compact navy/gold game HUD; the board and its hit plane are unchanged. */
#strategy-overlay,#patch-notes{z-index:390;background:#030b1cbd;backdrop-filter:blur(2px);padding:12px;}
.strategy-panel,.patch-panel{width:min(880px,94vw);max-height:92dvh;overflow:auto;color:#edf3ff;border:2px solid #8392af;border-radius:18px;padding:20px;background:linear-gradient(140deg,#2d385e,#111a35 72%);box-shadow:inset 0 2px #ffffff40,0 15px 50px #0009;font-size:14px;}
.strategy-panel header{position:relative}.strategy-panel h2,.patch-panel h2{color:#ffe4a3;margin:6px 30px 10px 0}.strategy-panel small,.patch-panel small{color:#b6c8df}.strategy-panel p{line-height:1.5}.strategy-panel button,.patch-panel button{font:inherit;color:#f3f7ff;cursor:pointer}.strategy-panel button:focus-visible,.patch-panel button:focus-visible{outline:3px solid #ffe48e;outline-offset:3px;}
.strategy-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.strategy-cards.routes{grid-template-columns:repeat(2,minmax(0,1fr));}
.strategy-card{position:relative;min-height:205px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;text-align:center;gap:8px;padding:20px 12px 14px;border:2px solid #9bb6da;border-radius:12px;background:radial-gradient(ellipse at 50% 12%,#698a8990,transparent 62%),linear-gradient(#263253,#18243e);box-shadow:inset 0 2px #ffffff50,0 5px 0 #0b1225,0 10px 15px #0004;transition:transform .12s,border-color .12s;}
.strategy-card:hover{transform:translateY(-3px);border-color:#ffe6a1}.strategy-card .type-icon{width:42px;height:42px}.strategy-card h3{margin:2px;color:#fff1d5;font-size:18px}.strategy-card p{font-size:13px;margin:0;color:#d8e5f3}.strategy-card b{padding:7px 12px;border-radius:7px;color:#372407;background:linear-gradient(#ffed95,#e4ab3b);box-shadow:inset 0 1px white,0 2px #926123;}.strategy-card.risk{background:radial-gradient(ellipse at 50% 10%,#ce744875,transparent 60%),#261f38}.trait-summary{text-align:center;padding:20px}.trait-summary .type-icon{width:48px;height:48px;}
#trait-btn{max-width:100%;font-size:11px;padding:5px 8px}#route-choice{font-size:10px;color:#ffdf9a;border:1px solid #c4a86b;border-radius:9px;background:#19283df5;padding:3px 8px;max-width:100%;line-height:1.3}#route-choice:disabled{opacity:1;color:#bee8c9;}#route-choice[hidden]{display:none;}
#battle-analysis-btn{margin-right:10px;background:linear-gradient(#44649b,#263b64);border:1px solid #aac4df;border-radius:8px;padding:9px 18px;color:#fff;font-weight:bold;cursor:pointer;}
.analysis-tabs{display:flex;gap:8px}.analysis-tabs button{padding:5px 18px;border:1px solid #8397b7;border-radius:7px;background:#324966}.strategy-note{font-size:11px;color:#c4d0e2}.analysis-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.analysis-row{border:1px solid #63799c;background:#111e35;border-radius:10px;padding:10px}.analysis-row.mvp{border-color:#ead187;box-shadow:inset 0 0 18px #fddf8620}.analysis-row header{display:flex;align-items:center;gap:7px;min-height:42px}.analysis-row header img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}.analysis-row header strong{flex:1;font-size:13px}.analysis-row header b{color:#ffdb81;font-size:10px}.damage-track{height:23px;border-radius:5px;background:#091321;position:relative;overflow:hidden;margin:5px 0 8px}.damage-track i{position:absolute;height:100%;left:0;background:linear-gradient(90deg,#447b8c,#6db7b2)}.damage-track b{position:relative;padding:0 6px;font-size:12px;line-height:23px;text-shadow:0 1px 3px #000}.analysis-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.analysis-metrics span{font-size:10px;color:#b6c8dd;background:#26354c;padding:4px;border-radius:4px}.analysis-metrics b{display:block;font-size:13px;color:#fff}.analysis-row>small{display:block;font-size:10px;margin-top:7px;line-height:1.5}
.patch-panel{width:min(670px,94vw)}.patch-panel h3{font-size:16px;margin:7px 0}.patch-panel article+article{margin-top:18px;padding-top:10px;border-top:1px solid #597094}.patch-panel ul{padding-left:20px;margin:12px 0;line-height:1.6}.patch-panel li{margin:5px 0}.patch-build{font-family:monospace}#patch-save-note{font-size:11px;color:#becbdf}#patch-confirm{display:block;margin:14px auto 0;border:1px solid #fff1b3;background:linear-gradient(#ffe58b,#dfaa41);color:#352706;border-radius:8px;padding:10px 30px;font-weight:900;box-shadow:0 3px #83612f}#patch-content{max-height:65dvh;overflow:auto;}#patch-history-btn,#analysis-history-btn{margin:4px;}
@media(max-height:520px){.strategy-panel,.patch-panel{padding:12px 16px;font-size:12px;max-height:94dvh;border-radius:12px}.strategy-panel h2,.patch-panel h2{font-size:19px;margin:3px 30px 5px 0}.strategy-panel p{margin:5px 0}.strategy-card{min-height:160px;padding:10px 8px;gap:4px}.strategy-card .type-icon{width:29px;height:29px}.strategy-card h3{font-size:16px}.strategy-card p{font-size:12px}.strategy-cards{margin-top:10px}.patch-panel ul{font-size:12px;line-height:1.4;margin:6px 0}.patch-panel li{margin:3px 0}#patch-confirm{padding:7px 20px;margin:8px auto 0}#patch-content{max-height:61dvh}#trait-btn{font-size:9px;padding:3px}#route-choice{font-size:9px;padding:2px 5px}}
@media(max-width:570px) and (min-height:521px){.strategy-cards,.strategy-cards.routes,.analysis-list{grid-template-columns:1fr}.strategy-card{min-height:150px}}
@media(prefers-reduced-motion:reduce){.strategy-card{transition:none}.strategy-card:hover{transform:none}}

#patch-notes{z-index:420}#route-choice.risk:disabled{color:#ffbf92;border-color:#d58b56}


.analysis-secondary{display:grid;gap:3px;margin:6px 0;font-size:10px}.analysis-secondary span{display:flex;align-items:center;gap:5px}.analysis-secondary i{height:5px;background:#71bba5;border-radius:3px}.analysis-secondary span+span i{background:#b9a2db}.analysis-secondary b{margin-left:auto;color:#e2edff}
.strategy-panel>header{position:sticky;top:-20px;z-index:2;background:#263251;padding:4px 0 8px;}
