/* ROTTAMI0.7 — arena orizzontale, azioni grandi e pannelli finiti. */
body.phone-game .command-nav { grid-template-rows: repeat(6,minmax(0,1fr)); }
#arena-view { min-height:0; height:100%; display:flex; flex-direction:column; gap:6px; }
#arena-view[hidden],.arena-menu-page[hidden],.arena-field[hidden],.arena-field [hidden]{display:none!important}
#arena-view .hub-heading{flex:0 0 27px;margin:0;min-height:0}
#arena-view .hub-heading h1{font-size:23px;margin:0}
.arena-mode-label{font-size:9px;color:#d1dbcd}
.arena-segments{margin:0!important;flex:0 0 32px;min-height:0}
.arena-segments button{display:flex;align-items:center;justify-content:center;gap:6px}
.arena-segments .ui-icon{width:17px;height:17px}
.arena-menu-page{flex:1;min-height:0;display:grid;grid-template-columns:38% minmax(0,1fr);gap:12px;overflow:hidden}
.arena-intro-art{display:flex;flex-direction:column;min-height:0;justify-content:center;border:1px solid #91aaa1;border-radius:12px;background:radial-gradient(circle at 50% 45%,#63857b66,transparent 64%),repeating-linear-gradient(0deg,transparent 0 29px,#91aaa119 30px),repeating-linear-gradient(90deg,#304447 0 29px,#91aaa119 30px);overflow:hidden}
.arena-intro-art canvas{display:block;min-height:0;width:100%;height:calc(100% - 24px);object-fit:contain}
.arena-intro-art>span{text-align:center;flex:0 0 24px;font-size:8px;letter-spacing:.7px;padding:5px}
.arena-intro-copy{min-width:0;min-height:0;display:flex;flex-direction:column;gap:6px}
.arena-intro-copy h2{font-size:17px;line-height:1.15;margin:0;color:#f4f1df}
.arena-intro-copy p{font-size:11px;line-height:1.4;margin:0;color:#d1dbcd}
.arena-preset-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:1;min-height:0}
.arena-preset{border:1px solid #91aaa1;border-radius:9px;background:#42595d;color:#f4f1df;padding:7px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:5px;min-width:0;min-height:0;text-align:center}
.arena-preset>.ui-icon{width:24px;height:24px;color:#dfab67}
.arena-preset b{display:block;font-size:10px}.arena-preset small{display:block;font-size:9px;line-height:1.25;margin-top:4px;color:#d1dbcd}
.arena-lobby-actions{display:flex;gap:7px;flex:0 0 40px;min-height:0}
.arena-lobby-actions button{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:5px 8px;font-size:10px}
.arena-lobby-actions .ui-icon{width:18px;height:18px}
.arena-message{flex:0 0 14px;min-height:0;font-size:9px;line-height:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#f1cc93}
.arena-build-left{min-height:0;display:flex;flex-direction:column;align-items:center;gap:5px}
.arena-build-slots{display:flex;gap:5px;width:100%;height:29px;flex:0 0 29px}
.arena-build-slots button{flex:1;font-size:9px;padding:4px;background:#42595d;color:#f4f1df;border:1px solid #91aaa1;border-radius:6px}
.arena-build-slots [aria-pressed=true]{background:#dfab67;color:#182c2e}
.arena-build-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));width:168px;height:168px;flex:0 0 168px;gap:3px;padding:3px;background:#263e42;border:1px solid #91aaa1;border-radius:8px}
.arena-build-cell{position:relative;display:grid;place-items:center;min-width:0;min-height:0;border:1px solid #91aaa15c;border-radius:4px;padding:0;background:#4d6063;color:#d1dbcd;font-size:16px;overflow:hidden}
.arena-build-cell canvas{display:block;width:100%;height:100%;pointer-events:none}.arena-build-cell.can-place{background:#537c72}.arena-build-cell.selected{border:2px solid #dfab67}
.arena-build-bottom{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:26px;width:100%;font-size:9px}
.arena-build-bottom button{min-height:26px;font-size:8px;padding:3px 7px}
.arena-build-right{display:flex;flex-direction:column;gap:5px;min-height:0}
.arena-build-tools{display:flex;align-items:center;justify-content:space-between;gap:5px;flex:0 0 28px;font-size:10px}
.arena-build-tools>div{display:flex;align-items:center;gap:6px;font-size:9px}
.arena-build-tools button{display:grid;place-items:center;width:30px;height:28px;min-height:28px;padding:4px;border:1px solid #91aaa1;border-radius:6px;background:#42595d;color:#f4f1df}
.arena-build-tools .ui-icon{width:16px;height:16px}
.arena-parts-list{flex:1;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:5px}
.arena-part-option{display:flex;align-items:center;gap:7px;min-width:0;min-height:0;overflow:hidden;padding:4px 7px;border:1px solid #91aaa1;border-radius:7px;background:#42595d;color:#f4f1df;text-align:left}
.arena-part-option[aria-pressed=true]{background:#dfab67;color:#182c2e}.arena-part-option canvas{width:36px;height:34px;flex:0 0 36px;object-fit:contain}.arena-part-option b{font-size:10px;display:block}.arena-part-option small{font-size:9px;display:block;margin-top:3px}
#arena-view .arena-part-option canvas{width:42px!important;height:30px!important;max-width:42px!important;flex:0 0 42px;aspect-ratio:3/2!important}
#arena-view .arena-part-option>span{min-width:0;flex:1}
#arena-view .arena-part-option b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.phone-game #arena-view .arena-lobby-actions button{height:38px;min-height:38px;padding:5px 8px;font-size:10px;box-shadow:none}
.arena-build-feedback{font-size:9px;line-height:1.2;min-height:12px;flex:0 0 12px;overflow:hidden;color:#f1cc93}
.arena-online-page{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.arena-room-form{display:flex;flex-direction:column;gap:5px;min-height:0}.arena-room-form label{font-size:9px;letter-spacing:.5px}.arena-room-form input{height:32px;min-height:32px;width:100%;border:1px solid #91aaa1;border-radius:7px;background:#263e42;color:#f4f1df;padding:5px 9px;font:700 13px sans-serif}
.arena-room-form>button{min-height:34px;font-size:10px;display:flex;align-items:center;justify-content:center;gap:8px}.arena-room-form .ui-icon{width:17px;height:17px}
.arena-room-join{display:flex;gap:6px}.arena-room-join input{min-width:0;letter-spacing:3px;text-transform:uppercase}.arena-room-join button{min-height:32px;font-size:10px;padding:4px 12px}
.arena-room-form p{font-size:10px;line-height:1.4;margin:4px 0;color:#d1dbcd}
.arena-room-state{min-height:0;display:flex;flex-direction:column;gap:6px}.arena-room-state h2{font-size:18px;margin:0}.arena-room-state p{font-size:10px;line-height:1.3;margin:0}.arena-room-state .arena-lobby-actions{margin-top:auto}
#arena-room-roster{display:grid;grid-template-columns:1fr 1fr;gap:5px;min-height:0}.arena-room-slot{display:flex;align-items:center;gap:5px;border:1px solid #91aaa16b;border-radius:6px;padding:6px;font-size:9px;min-width:0}.arena-room-slot b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arena-room-slot .ui-icon{width:15px;height:15px}.team-0{color:#70dfd0}.team-1{color:#ffbc70}
body.in-arena .command-header,body.in-arena .command-nav,body.in-arena .frontier-footer{display:none!important}
.arena-field{position:fixed;inset:0;z-index:70;background:#304447;overflow:hidden;touch-action:none}
#arena-canvas{display:block;width:100%;height:100%;outline:none;touch-action:none}
.arena-score-hud{position:absolute;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:13px;padding:6px 14px;border:1px solid #91aaa1;border-radius:10px;background:#263e42ec;pointer-events:none}
.arena-score-hud>strong{font-size:23px;min-width:35px;text-align:center;color:#70dfd0}.arena-score-hud>strong:last-child{color:#ffbc70}.arena-score-hud>div{text-align:center}.arena-score-hud span{display:block;font-size:15px;font-weight:800}.arena-score-hud small{display:block;font-size:7px;letter-spacing:.6px}
.arena-self-hud{position:absolute;top:max(9px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));width:132px;pointer-events:none;display:flex;flex-direction:column;gap:4px;padding:8px;border:1px solid #91aaa18a;border-radius:8px;background:#263e42dd;font-size:10px}.arena-self-hud small{font-size:8px;color:#d1dbcd}.arena-core-track{height:5px;background:#182c2e;border-radius:3px;overflow:hidden}.arena-core-track i{display:block;height:100%;background:#70dfd0}
.arena-radar{position:absolute;top:max(8px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));width:116px;border:1px solid #91aaa1;border-radius:8px;background:#263e42e8;padding:4px;pointer-events:none}.arena-radar>span{display:block;font-size:7px;letter-spacing:1px;text-align:center;margin-bottom:3px}.arena-radar canvas{display:block;width:100%;height:auto;aspect-ratio:2000/1300}
.arena-menu-button{position:absolute;top:100px;right:max(10px,env(safe-area-inset-right));display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:7px;background:#263e42ed;border:1px solid #91aaa1;border-radius:9px;color:#f4f1df}
.arena-menu-button .ui-icon{width:20px;height:20px}
.arena-field-actions{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));right:max(14px,env(safe-area-inset-right));display:flex;align-items:flex-end;gap:8px}
.arena-field-actions button{width:54px;min-height:54px;padding:6px;border:1px solid #91aaa1;border-radius:12px;background:#263e42ec;color:#f4f1df;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;touch-action:none}.arena-field-actions .ui-icon{width:23px;height:23px}.arena-field-actions span{font-size:7px;letter-spacing:.5px}.arena-field-actions #arena-dash{width:67px;min-height:67px;background:#dfab67;color:#182c2e;border-color:#efc58d}
body[data-controls=left] .arena-field-actions{right:auto;left:max(14px,env(safe-area-inset-left))}
.arena-touch-stick{position:fixed;width:80px;height:80px;margin:-40px 0 0 -40px;display:grid;place-items:center;border:2px solid #f4f1df99;border-radius:50%;background:#91aaa133;pointer-events:none}.arena-touch-stick i{display:block;width:28px;height:28px;border-radius:50%;background:#dfab67cc;border:1px solid #f4f1df}
.arena-base-actions{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(390px,52%);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:7px;background:#263e42ee;border:1px solid #91aaa1;border-radius:10px}.arena-base-actions>span{grid-column:1/-1;text-align:center;font-size:8px;letter-spacing:.8px}.arena-base-actions button{min-height:32px;font-size:8px;border:1px solid #91aaa1;border-radius:6px;background:#42595d;color:#f4f1df;padding:4px}.arena-base-actions #arena-deposit{grid-column:span 2;background:#dfab67;color:#182c2e}
.arena-respawn{position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);background:#263e42ee;border:1px solid #91aaa1;border-radius:12px;padding:15px;font-weight:800;font-size:17px;text-align:center}
.arena-round-toast{position:absolute;top:calc(110px + var(--phone-safe-top,0px));left:calc(10px + var(--phone-safe-left,0px));max-width:min(230px,31vw);max-height:52px;overflow:hidden;border:1px solid #91aaa1;border-radius:8px;padding:6px 9px;background:#fff9eef5;font:700 12px/17px system-ui,sans-serif;color:#293b3f;pointer-events:none}
.arena-round-toast:empty{display:none}
.arena-round-toast{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:48px}
.in-arena #arena-touch-stick{left:calc(78px + var(--phone-safe-left,0px));right:auto;top:auto;bottom:calc(74px + var(--phone-safe-bottom,0px));width:92px;height:92px;margin:0;transform:translate(-50%,50%);border:2px solid #e4f2deaa;background:#243e4280;opacity:.7}
.in-arena[data-controls="left"] #arena-touch-stick{left:auto;right:calc(78px + var(--phone-safe-right,0px));transform:translate(50%,50%)}
.in-arena #arena-touch-stick[data-active="true"]{opacity:1}
.in-arena #arena-touch-stick i{left:29px;top:29px;width:30px;height:30px;border:2px solid #fff6d9;background:#ffc95ee8}
.arena-modal{position:absolute;inset:0;display:grid;place-items:center;padding:12px;background:#22383ce8;z-index:8}.arena-modal>div{display:flex;flex-direction:column;gap:10px;padding:18px 24px;border:1px solid #91aaa1;border-radius:14px;background:#3c5153;width:min(580px,95%);max-height:100%;overflow:hidden}.arena-modal h2{font-size:25px;line-height:1.1;margin:0;color:#f4f1df}.arena-modal p{font-size:12px;line-height:1.4;margin:0}.arena-modal ol{font-size:13px;line-height:1.65;padding-left:22px;margin:0}.arena-modal>div>button{min-height:37px;font-size:11px}.arena-modal>div>span{font-size:9px;letter-spacing:1px}
#arena-scoreboard{display:grid;grid-template-columns:1fr 1fr;gap:5px}.arena-score-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;font-size:10px;border:1px solid #91aaa16b;padding:7px;border-radius:6px}.arena-score-row b{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
@media(max-height:380px){#arena-view .hub-heading{flex-basis:24px}#arena-view .hub-heading h1{font-size:20px}.arena-intro-copy h2{font-size:15px}.arena-intro-copy p{font-size:10px}.arena-preset small{font-size:8px}.arena-build-grid{width:146px;height:146px;flex-basis:146px}.arena-build-slots{height:26px;flex-basis:26px}.arena-build-tools{flex-basis:25px}.arena-part-option canvas{width:31px;height:27px;flex-basis:31px}.arena-parts-list{gap:4px}.arena-build-feedback{font-size:8px}.arena-modal>div{gap:8px;padding:14px 20px}.arena-modal h2{font-size:22px}.arena-modal ol{font-size:12px}}

#arena-room-resume{min-height:26px!important;height:26px;padding:3px 7px;font-size:9px!important;box-shadow:none;display:flex;align-items:center;justify-content:center;gap:6px}
#arena-room-resume .ui-icon{width:13px;height:13px}

#arena-view .arena-build-tools>.arena-selected-detail{width:auto;max-width:65%;height:28px;min-height:28px;padding:3px 7px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:10px;color:#f4f1df}
#arena-view .arena-build-tools>.arena-selected-detail:disabled{opacity:.8;border-color:transparent;background:transparent}

/* 0.8.3 — pannelli Arena finiti: titolo e schede condividono la stessa riga.
   Lo scope supera menu.css, caricato dopo questo foglio. Il campo di gioco
   conserva i propri comandi grandi, indipendenti dai cataloghi del menu. */
body.phone-game #hub-screen #arena-view {
  position:relative;display:grid;grid-template-rows:40px minmax(0,1fr) auto;
  gap:6px;min-width:0;min-height:0;height:100%;overflow:hidden;
}
body.phone-game #hub-screen #arena-view>.hub-heading {
  position:absolute;left:0;top:0;width:148px;height:40px;min-height:40px;
  margin:0;display:flex;align-items:center;pointer-events:none;
}
body.phone-game #hub-screen #arena-view>.hub-heading h1 { font-size:18px;line-height:1.1;letter-spacing:-.5px; }
body.phone-game #hub-screen #arena-view .arena-mode-label { display:none; }
body.phone-game #hub-screen #arena-view .arena-segments {
  grid-row:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  height:40px;min-height:40px;margin:0 0 0 154px!important;padding:0;gap:6px;
}
body.phone-game #hub-screen #arena-view .arena-segments button {
  height:40px;min-height:40px;padding:4px 8px;font-size:10px;line-height:1.1;gap:6px;
}
body.phone-game #hub-screen #arena-view .arena-menu-page {
  grid-row:2;min-height:0;min-width:0;height:100%;gap:10px;
  grid-template-columns:minmax(210px,35%) minmax(0,1fr);overflow:hidden;
  background:transparent;border:0;
}
body.phone-game #hub-screen #arena-view .arena-message {
  grid-row:3;min-height:0;max-height:16px;line-height:16px;font-size:10px;
  margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body.phone-game #hub-screen #arena-view .arena-message:empty { display:none; }
body.phone-game #hub-screen #arena-view .arena-intro-art { border-radius:12px;min-height:0; }
body.phone-game #hub-screen #arena-view .arena-intro-art canvas { flex:1;min-height:0;width:100%;height:0;object-fit:contain; }
body.phone-game #hub-screen #arena-view .arena-intro-art>span { flex:0 0 22px;padding:5px 3px;font-size:8px;line-height:12px;letter-spacing:.1px; }
body.phone-game #hub-screen #arena-view .arena-intro-copy { gap:5px;overflow:hidden; }
body.phone-game #hub-screen #arena-view .arena-intro-copy h2 { flex:0 0 auto;font-size:16px;line-height:18px;margin:0; }
body.phone-game #hub-screen #arena-view .arena-intro-copy>p { flex:0 0 auto;font-size:10px;line-height:13px;margin:0; }
body.phone-game #hub-screen #arena-view .arena-preset-list {
  flex:1 1 0;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:6px;
}
body.phone-game #hub-screen #arena-view .arena-preset {
  min-height:44px;padding:5px 6px;gap:4px;overflow:hidden;justify-content:center;
  color:#293b3f;background:#fffcf5;border:1px solid #b6c5b5;border-radius:10px;
}
body.phone-game #hub-screen #arena-view .arena-preset[aria-pressed=true] { background:#ffedb8;border-color:#d2a959;box-shadow:inset 0 -2px #d2a959; }
body.phone-game #hub-screen #arena-view .arena-preset>.ui-icon { width:24px;height:24px;flex:0 0 24px;color:#47776a; }
body.phone-game #hub-screen #arena-view .arena-preset b { font-size:11px;line-height:14px; }
body.phone-game #hub-screen #arena-view .arena-preset small { font-size:9px;line-height:12px;margin-top:3px; }
body.phone-game #hub-screen #arena-view .arena-lobby-actions { flex:0 0 40px;min-height:40px;gap:7px; }
body.phone-game #hub-screen #arena-view .arena-lobby-actions button { height:40px;min-height:40px;padding:5px 8px;font-size:10px;box-shadow:none; }
body.phone-game #hub-screen #arena-view .arena-build-left {
  display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:minmax(0,1fr) 40px;
  gap:6px;align-items:stretch;min-height:0;padding:6px;border:1px solid #b7c7b3;border-radius:12px;
}
body.phone-game #hub-screen #arena-view .arena-build-slots {
  grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:5px;width:44px;height:100%;min-height:0;
}
body.phone-game #hub-screen #arena-view .arena-build-slots button {
  flex:1 1 0;min-height:0;min-width:0;padding:3px 2px;font-size:8px;line-height:12px;box-shadow:none;
}
body.phone-game #hub-screen #arena-view .arena-build-grid {
  grid-column:2;grid-row:1;align-self:center;justify-self:center;
  width:auto;height:100%;max-width:100%;max-height:100%;aspect-ratio:1;
  min-height:0;min-width:0;flex:none;gap:3px;padding:3px;border-radius:8px;
}
body.phone-game #hub-screen #arena-view .arena-build-cell { min-width:0;min-height:0;border-radius:4px;box-shadow:none; }
body.phone-game #hub-screen #arena-view .arena-build-cell.selected { border:2px solid #c4943e;background:#fff0bf; }
body.phone-game #hub-screen #arena-view .arena-build-cell.can-place { background:#c6e4bd;border-color:#6eaa72; }
body.phone-game #hub-screen #arena-view .arena-build-bottom { grid-column:1/-1;grid-row:2;min-height:40px;font-size:9px;line-height:12px; }
body.phone-game #hub-screen #arena-view .arena-build-bottom button { min-height:40px;height:40px;padding:5px 9px;font-size:9px;box-shadow:none; }
body.phone-game #hub-screen #arena-view .arena-build-budget { min-width:0; }
body.phone-game #hub-screen #arena-view .arena-build-right { gap:6px;min-height:0; }
body.phone-game #hub-screen #arena-view .arena-build-tools { flex:0 0 40px;min-height:40px;gap:6px;background:transparent; }
body.phone-game #hub-screen #arena-view .arena-build-tools>div { flex:0 0 auto;gap:5px; }
body.phone-game #hub-screen #arena-view .arena-build-tools button { width:40px;height:40px;min-height:40px;padding:7px;box-shadow:none; }
body.phone-game #hub-screen #arena-view .arena-build-tools .arena-selected-detail {
  flex:1;max-width:none;min-width:0;width:auto;height:40px;min-height:40px;padding:5px 9px;font-size:11px;
}
body.phone-game #hub-screen #arena-view .arena-build-tools .arena-selected-detail:disabled { background:transparent!important;color:#53675f!important;border-color:transparent!important; }
body.phone-game #hub-screen #arena-view .arena-parts-list { min-height:0;gap:6px; }
body.phone-game #hub-screen #arena-view .arena-part-option { min-height:0;gap:5px;padding:5px;box-shadow:none; }
body.phone-game #hub-screen #arena-view .arena-part-option b { font-size:11px;line-height:13px;white-space:normal;overflow-wrap:anywhere; }
body.phone-game #hub-screen #arena-view .arena-part-option small { font-size:11px;line-height:12px;margin-top:3px; }
body.phone-game #hub-screen #arena-view .arena-build-feedback { flex:0 0 auto;min-height:0;max-height:26px;font-size:10px;line-height:13px; }
body.phone-game #hub-screen #arena-view .arena-build-feedback:empty { display:none; }
body.phone-game #hub-screen #arena-view .arena-online-page { grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px; }
body.phone-game #hub-screen #arena-view .arena-room-form {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:13px 40px 40px 13px 40px minmax(0,1fr);
  gap:5px 7px;padding:8px;border:1px solid #b7c7b3;border-radius:12px;align-content:start;overflow:hidden;
}
body.phone-game #hub-screen #arena-view .arena-room-form>label { grid-column:1/-1;line-height:13px;font-size:9px; }
body.phone-game #hub-screen #arena-view #arena-player-name { grid-column:1/-1; }
body.phone-game #hub-screen #arena-view .arena-room-form input { min-height:40px;height:40px;font-size:13px; }
body.phone-game #hub-screen #arena-view .arena-room-form>button,
body.phone-game #hub-screen #arena-view #arena-room-resume { min-height:40px!important;height:40px!important;padding:4px 6px;font-size:10px!important;box-shadow:none; }
body.phone-game #hub-screen #arena-view .arena-room-join { grid-column:1/-1;min-width:0; }
body.phone-game #hub-screen #arena-view .arena-room-join button { min-height:40px;height:40px;padding:4px 12px;font-size:10px; }
body.phone-game #hub-screen #arena-view .arena-room-form>p { grid-column:1/-1;min-height:0;margin:0;font-size:9px;line-height:12px; }
body.phone-game #hub-screen #arena-view .arena-room-state { padding:8px;border:1px solid #b7c7b3;border-radius:12px;gap:5px;overflow:hidden; }
body.phone-game #hub-screen #arena-view .arena-room-state h2 { font-size:16px;line-height:19px; }
body.phone-game #hub-screen #arena-view .arena-room-state p { font-size:10px;line-height:13px; }
body.phone-game #hub-screen #arena-view #arena-room-roster { flex:1;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:5px;min-height:0; }
body.phone-game #hub-screen #arena-view #arena-room-roster:empty { display:none; }
body.phone-game #hub-screen #arena-view .arena-room-slot { min-height:0;padding:5px;font-size:10px;box-shadow:none; }
body.phone-game #hub-screen #arena-view .arena-room-state .arena-lobby-actions:has(>button:not([hidden])) { margin-top:auto; }

@media (orientation:landscape) and (max-height:500px) {
  body.phone-game #hub-screen #arena-view .arena-parts-list { grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr); }
  body.phone-game #hub-screen #arena-view .arena-part-option { flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center; }
  body.phone-game #hub-screen #arena-view .arena-part-option canvas { width:48px!important;height:38px!important;max-width:48px!important;flex:0 0 38px; }
  body.phone-game #hub-screen #arena-view .arena-part-option>span { flex:0 1 auto;width:100%;min-width:0; }
}
@media (max-height:370px) {
  body.phone-game #hub-screen #arena-view .arena-intro-copy>p { font-size:9px;line-height:12px; }
  body.phone-game #hub-screen #arena-view .arena-preset { flex-direction:row;gap:5px;padding:4px; }
  body.phone-game #hub-screen #arena-view .arena-preset>.ui-icon { width:20px;height:20px;flex-basis:20px; }
  body.phone-game #hub-screen #arena-view .arena-preset small { font-size:8px;line-height:11px; }
  body.phone-game #hub-screen #arena-view .arena-room-form { grid-template-rows:12px 40px 40px 12px 40px;gap:4px 6px;padding:5px; }
  body.phone-game #hub-screen #arena-view .arena-room-form>p { display:none; }
}

/* Un solo ingresso grande all'ispezione: nessun tap del canvas sottratto alla guida. */
.arena-components-button { position:absolute;top:100px;right:calc(58px + env(safe-area-inset-right,0px));display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:8px;border:1px solid #91aaa1;border-radius:9px;background:#263e42ed;color:#f4f1df; }
.arena-components-button .ui-icon { width:23px;height:23px; }
.arena-menu-button { width:40px;height:40px;min-height:40px; }
body.phone-game .arena-components-dialog { width:min(650px,calc(100% - 28px));max-height:calc(100dvh - 24px);padding:14px 18px;overflow:hidden; }
body.phone-game .arena-components-dialog #part-detail-content>h2 { margin:0 42px 10px 0;font-size:18px;line-height:22px; }
.arena-components-layout { display:grid;grid-template-columns:224px minmax(0,1fr);gap:16px;align-items:center;min-height:0; }
.arena-components-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:3px;padding:3px;width:224px;height:224px;background:#d6e0d0;border:1px solid #a7bba2;border-radius:9px; }
.arena-components-cell { min-width:0;min-height:0;padding:0;border:1px solid #b4c3ae;border-radius:5px;background:#edf2e6;display:grid;place-items:center;overflow:hidden; }
.arena-components-cell[aria-pressed=true] { background:#ffedb8;border:2px solid #c49640; }
.arena-components-cell canvas { display:block;width:100%;height:100%;pointer-events:none; }
.arena-components-info { min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px; }
.arena-components-info h3 { font-size:18px;line-height:22px;margin:0; }
.arena-components-info>canvas { width:96px!important;height:64px!important;object-fit:contain; }
.arena-components-info p { font-size:12px;line-height:17px;margin:0; }
.arena-components-info strong { font-size:11px;line-height:15px; }
body.phone-game .arena-components-dialog .arena-components-notice { font-size:10px;line-height:13px;margin:7px 0 0; }

body.phone-game #hub-screen #arena-view .arena-online-page.server-unavailable { display:flex; align-items:center; justify-content:center; }
body.phone-game #hub-screen #arena-view .arena-online-page.server-unavailable :is(.arena-room-form,.arena-room-state) { display:none; }
body.phone-game .arena-server-notice { max-width:620px; padding:10px 16px; border:1px solid #b9c4ba; border-radius:12px; background:#fffcf7; color:#293b3f; }
body.phone-game .arena-server-notice h2 { margin:0 0 6px; font-size:19px; }
body.phone-game .arena-server-notice p { margin:5px 0; font-size:11px; line-height:15px; }
body.phone-game .arena-server-notice>div { display:flex; gap:10px; margin-top:9px; }
body.phone-game .arena-server-notice button { flex:1; min-height:44px; font-size:11px; padding:6px; }
