#crew-upgrade { width:min(700px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; overflow:auto; background:#111f29; color:var(--ink); border:1px solid #a88443; border-radius:12px; box-shadow:0 20px 70px #0009; }
#crew-upgrade::backdrop { background:#070e17c9; }
#crew-upgrade header { display:flex; justify-content:space-between; align-items:center; padding:10px 22px; border-bottom:1px solid #344853; }
#crew-upgrade [data-content],#crew-upgrade footer { padding:12px 22px; }
#crew-upgrade h2 { margin:0 0 12px; }
#crew-upgrade h3 { color:#adc0cc; margin:12px 0 6px; }
#crew-upgrade p { margin:6px 0; line-height:1.4; }
.crew-upgrade-identity { display:flex; align-items:center; gap:18px; }
.crew-upgrade-comparison { display:flex; justify-content:space-between; gap:12px; padding:12px; border:1px solid #425965; border-radius:6px; }
#crew-upgrade table { width:100%; border-collapse:collapse; }
#crew-upgrade th,#crew-upgrade td { text-align:left; padding:8px; border-bottom:1px solid #344853; }
#crew-upgrade table { table-layout:fixed; }
#crew-upgrade th:first-child { width:44%; }
#crew-upgrade tbody td { padding:3px 0; border:0; }
#crew-upgrade .crew-resource-link,#crew-upgrade .crew-resource-row { display:grid; grid-template-columns:44% repeat(3,minmax(0,1fr)); align-items:center; gap:0; width:100%; padding:10px 8px; text-align:left; box-sizing:border-box; }
#crew-upgrade .crew-resource-link { background:#12232d; border:1px solid #425965; border-radius:5px; cursor:pointer; }
#crew-upgrade .crew-resource-link span:first-child { font-weight:700; }
#crew-upgrade .crew-cost-met { color:#7edecb; }
#crew-upgrade .crew-cost-unmet { color:#ffc08a; }
#crew-upgrade .crew-resource-link:hover { border-color:#dfb456; background:#283025; box-shadow:0 0 12px #e9b44544; }
#crew-upgrade footer { border-top:1px solid #344853; }
#crew-upgrade footer button { width:100%; margin-top:6px; }
#crew-upgrade [data-confirm]:not(:disabled) { background:#d29d34; color:#111b23; border-color:#f3ca6c; cursor:pointer; }
#crew-upgrade [data-confirm]:hover:not(:disabled) { background:#e3af47; box-shadow:0 0 18px #e9b44577; }
#crew-upgrade button:focus-visible,[data-crew-briefing]:focus-visible { outline:3px solid #82e4d0; outline-offset:3px; }
[data-crew-briefing] { width:100%; border-color:#a88443; }
[data-crew] details[hidden] { display:none !important; }
