/* Scoped additions to shared V407 battle-card styling. */
.sg489-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:0 0 12px}
.sg489-dialog{width:min(960px,calc(100vw - 28px));max-height:calc(100dvh - 28px)}
.sg489-dialog .bc407-dialog-body{max-height:calc(100dvh - 132px)}
.sg489-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.sg489-card{border:1px solid #d3e2ed;border-radius:13px;overflow:hidden;padding:16px;color:#173b57;background:#fff;min-width:0}
.sg489-card-head{background:#e9f4fb;margin:-16px -16px 15px;padding:13px 16px;display:flex;flex-direction:column;gap:3px}
.sg489-speed{font-size:1.24rem;font-weight:800;color:#075c8d}.sg489-unit{font-size:.75rem;color:#526f83}
.sg489-card h3{font-size:1.04rem;margin:0 0 6px}.sg489-fit{color:#08679c;font-weight:700;font-size:.9rem;margin:0 0 13px}
.sg489-detail{margin:12px 0 0}.sg489-detail h4{font-size:.84rem;margin:0 0 4px;color:#173b57}.sg489-detail p,.sg489-advice p{font-size:.9rem;line-height:1.55;margin:0;color:#435e72;white-space:pre-line;overflow-wrap:anywhere}
.sg489-advice{border:1px solid #cee3ef;border-radius:12px;background:#f0f7fb;padding:16px;margin-top:18px}.sg489-advice h3{margin:0 0 8px;font-size:1rem}
#sg489-editor{background:#fff;border:1px solid #d7e6ee;border-radius:15px;padding:22px;margin:22px 0;color:#173e58}
.sg489-editor-tiers,.sg489-editor-tier{display:grid;gap:12px}.sg489-editor-tier{padding:16px;background:#f5f9fc;border:1px solid #dbe8f0;border-radius:12px}
.sg489-editor-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.sg489-editor-head h4{margin:0!important;flex:1}.sg489-editor-head .bc407-confirm{margin:0}.sg489-reorder{display:flex;gap:6px;flex-wrap:wrap}.sg489-reorder button:disabled{opacity:.45;cursor:default}
@media(max-width:650px){.sg489-grid{grid-template-columns:1fr}.sg489-dialog .bc407-dialog-body{max-height:calc(100dvh - 138px)}#sg489-editor{padding:13px}.sg489-editor-head{align-items:flex-start}.sg489-editor-head h4{flex-basis:100%}}
/* Keep the header visible and the entire form scrollable even with a long edited heading. */
.sg489-dialog[open]{display:flex;flex-direction:column}.sg489-dialog .bc407-dialog-header{flex:0 0 auto}.sg489-dialog .bc407-dialog-body{box-sizing:border-box;flex:1 1 auto;min-height:0;max-height:none}
