/* Equipaggio locale — ritratti e carta tecnica nello stile dell'officina. */
body.phone-game #hangar-view .workbench-topline.engineer-entry-host { flex:0 0 48px; min-height:48px; height:48px; align-items:center; gap:5px; padding:1px 5px; font-family:system-ui,sans-serif; }
body.phone-game #hangar-view .engineer-entry-host #rover-name { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; font:800 8px/11px system-ui,sans-serif; letter-spacing:0; }
body.phone-game #hangar-view #engineer-open { width:145px; min-width:118px; max-width:65%; min-height:44px; height:44px; display:flex; align-items:center; gap:5px; margin:0; padding:3px 6px; border:2px solid #7d9e8d; border-radius:10px; color:#293b3f; background:#fff2c6; box-shadow:0 2px #c5cdbb; text-align:left; font-family:system-ui,sans-serif; letter-spacing:0; }
.engineer-entry-art { width:32px; height:34px; flex:0 0 32px; }
.engineer-portrait { display:block; width:100%; height:100%; max-width:100%; max-height:100%; }
#engineer-open>span:last-child { min-width:0; }
#engineer-open b { display:block; color:#293b3f; font:900 9px/12px system-ui,sans-serif; }
#engineer-open small { display:block; color:#496c5b; font:700 8px/11px system-ui,sans-serif; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
body.phone-game.frontier #engineer-dialog { --ink:#293b3f; --muted:#53675f; color-scheme:light; position:fixed; inset:calc(6px + var(--phone-safe-top,0px)) calc(6px + var(--phone-safe-right,0px)) calc(6px + var(--phone-safe-bottom,0px)) calc(6px + var(--phone-safe-left,0px)); width:auto; max-width:none; height:auto; max-height:none; min-height:0; margin:0; padding:12px; overflow:hidden; border:2px solid #344d50; border-radius:15px; background:radial-gradient(ellipse at 10% 0%,#fffef8,transparent 70%),#f5f1e7; box-shadow:0 5px #193b3b66; color:#293b3f; font-family:system-ui,-apple-system,'Segoe UI',sans-serif; }
body.phone-game.frontier #engineer-dialog[open] { display:grid; grid-template-rows:40px minmax(0,1fr) 15px 44px; gap:8px; }
#engineer-dialog::backdrop { background:#17383db3; backdrop-filter:blur(3px); }
#engineer-dialog .engineer-head { display:flex; align-items:start; justify-content:space-between; gap:10px; min-width:0; min-height:0; }
body.phone-game #engineer-dialog h2 { margin:0; color:#293b3f; font:950 22px/25px system-ui,sans-serif; letter-spacing:-.5px; }
#engineer-dialog #engineer-current { margin:2px 0 0; color:#53675f; font:700 10px/13px system-ui,sans-serif; }
body.phone-game #engineer-dialog #engineer-close { width:44px; min-width:44px; height:44px; min-height:44px; margin:-4px -4px 0 0; padding:9px; display:grid; place-items:center; border:1px solid #aebfac; border-radius:10px; background:#edf2e6; color:#293b3f; box-shadow:0 2px #d2d7c6; }
#engineer-dialog #engineer-close .ui-icon { width:22px; height:22px; }
#engineer-dialog .engineer-body { display:grid; grid-template-columns:190px minmax(0,1fr); gap:12px; min-width:0; min-height:0; }
#engineer-dialog .engineer-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:7px; min-width:0; min-height:0; }
body.phone-game #engineer-dialog .engineer-choice { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; min-width:0; min-height:0; padding:4px; border:2px solid #b2c3ae; border-radius:12px; color:#293b3f; background:#fffdf7; box-shadow:0 2px #d5dccc; font-family:system-ui,sans-serif; }
#engineer-dialog .engineer-choice .engineer-portrait { width:46px; height:46px; flex:0 1 46px; min-height:32px; }
#engineer-dialog .engineer-choice strong { font:900 13px/15px system-ui,sans-serif; }
#engineer-dialog .engineer-choice>small { font:700 8px/10px system-ui,sans-serif; color:#53675f; }
body.phone-game #engineer-dialog .engineer-choice[aria-pressed='true'] { border-color:#b88831; background:#ffedb4; box-shadow:0 2px #d0aa58; }
#engineer-dialog .engineer-assigned { display:none; position:absolute; top:4px; right:5px; width:17px; height:17px; border:1px solid #457b62; border-radius:50%; background:#bfe3be; color:#315a42; font:900 12px/15px system-ui,sans-serif; text-align:center; }
#engineer-dialog .engineer-choice.is-assigned .engineer-assigned { display:block; }
#engineer-dialog .engineer-detail { display:flex; flex-direction:column; justify-content:space-between; gap:5px; min-width:0; min-height:0; padding:0; color:#293b3f; }
#engineer-dialog .engineer-detail-title { display:flex; align-items:baseline; flex-wrap:wrap; gap:3px 9px; flex:0 0 auto; min-width:0; }
body.phone-game #engineer-dialog #engineer-name { margin:0; color:#293b3f; font:950 22px/25px system-ui,sans-serif; letter-spacing:-.5px; }
#engineer-dialog #engineer-role { color:#53675f; font:800 10px/13px system-ui,sans-serif; }
#engineer-dialog .engineer-passive { flex:0 0 auto; }
#engineer-dialog .engineer-passive>small { display:block; margin-bottom:2px; color:#5c765c; font:900 8px/10px system-ui,sans-serif; letter-spacing:.6px; }
#engineer-dialog .engineer-passive p { margin:0; color:#3f6255; font:700 11px/14px system-ui,sans-serif; }
#engineer-dialog .engineer-active { flex:1 1 auto; min-height:0; padding:6px 8px; border:1px solid #b9c7b0; border-left:4px solid #d5a342; border-radius:8px; background:#fffaf0; }
#engineer-dialog .engineer-active>div { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:2px 6px; }
#engineer-dialog #engineer-ability-name { color:#293b3f; font:900 12px/15px system-ui,sans-serif; }
#engineer-dialog #engineer-timing { color:#85672e; font:800 9px/12px system-ui,sans-serif; }
#engineer-dialog #engineer-ability-description { margin:4px 0 0; color:#53675f; font:500 11px/14px system-ui,sans-serif; }
#engineer-dialog .engineer-preview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; flex:0 0 29px; min-height:29px; }
#engineer-dialog .engineer-preview>span { min-width:0; padding:3px 5px; border:1px solid #c0cbb6; border-radius:6px; background:#eaf0e2; }
#engineer-dialog .engineer-preview small { display:block; font:800 7px/9px system-ui,sans-serif; color:#53675f; }
#engineer-dialog .engineer-preview b { display:block; color:#53675f; font:900 10px/12px system-ui,sans-serif; white-space:nowrap; }
#engineer-dialog .engineer-preview i { font-style:normal; color:#8da390; }
#engineer-dialog .engineer-preview .changed { background:#dcf1d5; border-color:#91b58d; }
#engineer-dialog .engineer-preview .changed b { color:#305f43; }
#engineer-dialog .engineer-context { margin:0; min-width:0; color:#53675f; font:700 9px/13px system-ui,sans-serif; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#engineer-dialog .engineer-actions { display:grid; grid-template-columns:1fr 1.25fr; gap:10px; min-height:44px; }
body.phone-game #engineer-dialog .engineer-actions button { margin:0; min-width:0; min-height:44px; height:44px; padding:6px; display:flex; align-items:center; justify-content:center; border:2px solid #a9bbaa; border-radius:10px; color:#293b3f; background:#fffcf6; box-shadow:0 2px #d2d7c6; font:900 11px/15px system-ui,sans-serif; letter-spacing:0; }
body.phone-game #engineer-dialog .engineer-actions .primary-button { border-color:#344d50; background:#ffd35f; box-shadow:0 3px #cda13e; }
body.phone-game #engineer-dialog button:disabled { opacity:.6; box-shadow:none; }
body.phone-game #engineer-dialog button:focus-visible,body.phone-game #hangar-view #engineer-open:focus-visible { outline:3px solid #55b9dd; outline-offset:2px; }
@media(max-height:370px) and (orientation:landscape) {
 body.phone-game.frontier #engineer-dialog { padding:10px; }
 body.phone-game.frontier #engineer-dialog[open] { grid-template-rows:36px minmax(0,1fr) 13px 44px; gap:7px; }
 #engineer-dialog .engineer-body { grid-template-columns:180px minmax(0,1fr); gap:10px; }
 #engineer-dialog .engineer-detail { gap:4px; }
 #engineer-dialog .engineer-active { padding:5px 6px; }
 #engineer-dialog #engineer-ability-description { font-size:10px; line-height:13px; margin-top:3px; }
 #engineer-dialog .engineer-context { font-size:8px; line-height:12px; }
}
