/* Bonus: una scelta nell'officina esistente, senza aprire altri dialog. */
#run-perk-panel { min-width:0; font-family:system-ui,-apple-system,'Segoe UI',sans-serif; color:#293b3f; }
#run-perk-panel[hidden] { display:none!important; }
#run-perk-panel .run-perk-heading { min-height:0; min-width:0; }
#run-perk-panel .run-perk-heading h3 { margin:0; color:#293b3f; font:950 20px/24px system-ui,sans-serif; letter-spacing:0; }
#run-perk-panel .run-perk-heading p { margin:3px 0 0; color:#53675f; font:700 10px/14px system-ui,sans-serif; }
#run-perk-panel .run-perk-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; min-height:0; min-width:0; }
#run-perk-panel .run-perk-card { min-width:0; min-height:132px; margin:0; padding:8px; display:grid; grid-template-rows:32px auto minmax(0,1fr) 18px; justify-items:center; align-items:center; gap:4px; border:2px solid #9eb5a2; border-top:4px solid var(--run-perk-accent,#d9aa53); border-radius:12px; background:#fffcf5; box-shadow:0 3px #c4d1bf; color:#293b3f; text-align:center; font-family:system-ui,sans-serif; letter-spacing:0; touch-action:manipulation; }
#run-perk-panel .run-perk-card:active { background:#ffedb6; box-shadow:0 1px #b5c7af; }
#run-perk-panel .run-perk-icon { display:grid; place-items:center; width:32px; height:32px; color:#344f50; background:#e5eee1; border:1px solid #bdcbb5; border-radius:8px; }
#run-perk-panel .run-perk-icon .ui-icon { width:23px; height:23px; }
#run-perk-panel .run-perk-name { max-width:100%; margin:0; color:#293b3f; font:900 13px/16px system-ui,sans-serif; }
#run-perk-panel .run-perk-description { max-width:100%; color:#496756; font:500 11px/14px system-ui,sans-serif; align-self:center; }
#run-perk-panel .run-perk-select { justify-self:stretch; min-width:0; padding:2px 5px; border-radius:5px; background:#ffe09a; color:#493b20; font:900 10px/14px system-ui,sans-serif; }
#run-perk-panel .run-perk-card:focus-visible { outline:3px solid #39a3ce; outline-offset:2px; }
#run-perk-panel .run-perk-active-row { display:flex; align-items:center; gap:5px; min-width:0; height:18px; }
#run-perk-panel .run-perk-chip { display:flex; align-items:center; gap:3px; flex:0 1 auto; min-width:0; max-width:100%; height:18px; padding:1px 4px 1px 2px; border:1px solid #b2c5ad; border-left:3px solid var(--run-perk-accent,#d9aa53); border-radius:5px; background:#eaf1df; color:#3c5f4b; }
#run-perk-panel .run-perk-chip>.run-perk-icon { flex:0 0 12px; width:12px; height:12px; background:none; border:0; border-radius:0; }
#run-perk-panel .run-perk-chip .ui-icon { width:12px; height:12px; }
#run-perk-panel .run-perk-chip>span:last-child { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font:800 8px/12px system-ui,sans-serif; }
#workshop-dialog[data-perk-pending='true'] :is(.workshop-strip,.workshop-body,.workshop-tabs,.workshop-intro,.workshop-route-inline,.workshop-feedback,.workshop-warning,#remove-button) { display:none!important; }
#workshop-dialog[data-perk-pending='true'] .workshop-actions { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important; }
#workshop-dialog[data-perk-pending='true'] .workshop-actions button { min-height:44px; height:44px; }
#workshop-dialog[data-perk-pending='true'] #run-perk-panel { display:grid; grid-template-rows:42px minmax(0,1fr); gap:8px; margin:12px 0; }
#workshop-dialog[data-perk-active='true'] #run-perk-panel { margin:6px 0; }
body.phone-game #workshop-dialog[data-perk-pending='true'][open] { grid-template-columns:minmax(0,1fr); grid-template-rows:36px minmax(0,1fr) 44px; gap:8px; }
body.phone-game #workshop-dialog[data-perk-pending='true'] .workshop-heading { grid-column:1; grid-row:1; align-self:stretch; height:auto; }
body.phone-game #workshop-dialog[data-perk-pending='true'] #run-perk-panel { grid-column:1; grid-row:2; align-self:stretch; height:100%; min-height:0; margin:0; }
body.phone-game #workshop-dialog[data-perk-pending='true'] .workshop-actions { grid-column:1; grid-row:3; align-self:stretch; }
body.phone-game #workshop-dialog[data-perk-pending='true'] #continue-button { min-width:0; padding:5px 8px; font-size:11px; line-height:15px; }
body.phone-game.frontier #workshop-dialog[data-perk-active='true'][open] { grid-template-rows:44px minmax(0,1fr) 44px 18px 44px; }
body.phone-game #workshop-dialog[data-perk-active='true'] #run-perk-panel { grid-column:1 / -1; grid-row:4; align-self:center; height:18px; margin:0; }
@media(max-height:370px) {
 #run-perk-panel .run-perk-cards { gap:8px; }
 #run-perk-panel .run-perk-card { padding:6px; gap:3px; border-radius:10px; }
 #run-perk-panel .run-perk-heading h3 { font-size:18px; line-height:22px; }
 #run-perk-panel .run-perk-heading p { margin-top:2px; }
}
@media(prefers-reduced-motion:no-preference) { #run-perk-panel .run-perk-card { transition:background-color .12s ease,box-shadow .12s ease; } }
