/* Field controls and preparation use real layout areas, never cover the model. */
.loadout-screen,.mobile .loadout-screen{overflow-y:auto;background:#101c1c;padding:20px max(20px,4vw) 30px;animation:none}
.prep-title,.mobile .prep-title{margin:15px 0}.prep-title h2,.mobile .prep-title h2{font-size:28px;margin:6px 0;letter-spacing:1px}
.prep-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(250px,1.2fr) minmax(220px,1fr);gap:30px;align-items:start}
.preview-panel{grid-column:2;grid-row:1;min-width:0;position:relative}.map-panel,.mobile .map-panel{grid-column:1;grid-row:1}.operator-panel,.mobile .operator-panel{grid-column:3;grid-row:1}
.prep-grid .map-panel,.prep-grid .operator-panel{position:static;float:none;width:auto;margin:0}.prep-grid .loadout-label{margin-bottom:12px}
#operator-preview{position:relative;height:360px;touch-action:none;cursor:grab;overflow:hidden;background:#152424}#operator-preview:active{cursor:grabbing}
#game-canvas.preview-canvas{position:absolute;inset:0;width:100%;height:100%;image-rendering:auto}
.preview-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;font:7px var(--mono);color:var(--muted)}.preview-tools button{width:44px;height:44px;background:transparent;color:var(--gold);font-size:24px}
.preview-panel .operator-caption,.mobile .preview-panel .operator-caption{display:flex;align-items:center;justify-content:center;position:static;transform:none;max-width:none;text-align:center;margin:0}.preview-panel .operator-caption strong{font-size:24px;margin:0;letter-spacing:3px}.preview-panel .operator-caption>.palestine-flag{margin:0 12px 0 0}
.prep-footer,.mobile .prep-footer{position:static;display:flex;gap:24px;margin-top:22px;padding-top:18px;background:none;clear:both}.weapon-panel{min-width:0}
#weapon-options{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}#weapon-options .loadout-option{min-width:0;padding:10px 8px}#weapon-options strong{font-size:18px}#weapon-options small,.mobile #weapon-options small{display:block;font-size:7px;letter-spacing:0;line-height:1.5}
#weapon-options .locked{border:1px dashed #d6b57a55}#arsenal-balance{font-weight:400;color:var(--gold)}#arsenal-message{font-size:11px;color:var(--muted);line-height:1.6;margin:12px 0 0}.weapon-panel .loadout-label span,.mobile .weapon-panel .loadout-label span{display:inline}#deploy,.mobile #deploy{width:220px;margin:0}
#field-phase{position:absolute;top:20px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:12px 16px;background:#122620e8;border:1px solid #d6b57a66;max-width:65%;text-align:center;font:10px var(--mono)}#phase-label{color:var(--gold);white-space:nowrap}#phase-detail{color:var(--paper);font-size:9px;line-height:1.5}#ready-field{pointer-events:auto;background:var(--gold);color:var(--dark);font:9px var(--mono);padding:12px;white-space:nowrap;min-height:44px}#ready-field:disabled{cursor:default}#score-hud{position:absolute;left:32px;top:220px;font:10px var(--mono);color:var(--gold)}#score-value{font-size:19px}#score-gain{display:inline-block;color:#b4dfbe;margin-left:10px}#weapon-slots .unavailable{opacity:.3}
#mobile-settings{border-top:1px solid var(--line);margin:15px 0;padding:15px 0}#mobile-settings h3{font:12px var(--mono);color:var(--gold)}#mobile-settings p{font:11px/1.7 Arial;color:var(--muted)}#mobile-settings input[type=checkbox]{width:22px;height:22px}#touch-edit{color:var(--gold);margin-top:12px}
#touch-controls .touch-node,#touch-editor .touch-node{position:absolute;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;display:grid;place-items:center;pointer-events:auto;touch-action:none;-webkit-touch-callout:none;border:1px solid #eee6cf99;border-radius:50%;background:#17251eb8;color:#fff9e5;box-shadow:0 2px 8px #0003;font:9px var(--mono);transition:background .12s,box-shadow .12s;user-select:none}
.touch-node span{text-align:center;max-width:95%;overflow-wrap:anywhere}.touch-node[data-control=stick] i{position:absolute!important;left:calc(50% - 18px)!important;top:calc(50% - 18px)!important;width:36px!important;height:36px!important;border-radius:50%;background:#e7cc9699;border:1px solid #f7e5b9}.touch-node[data-control=stick] span{align-self:end;margin-bottom:12px;font-size:7px}
#touch-controls .touch-node[data-control=fire],#touch-editor .touch-node[data-control=fire]{border:2px solid #efd5a6;background:#675735a8;font-size:12px}#touch-controls .touch-node[data-control=leftfire]{background:#19262075}
#touch-controls .touch-node.active,#touch-controls .touch-node.pressed{background:#b9944bc9;box-shadow:0 0 0 3px #ffe8bc33}#touch-controls .touch-node.available{background:#b9944be0;border-color:#ffe2a9;opacity:1!important}#touch-controls .touch-node[data-control=pickup]:not(.available){opacity:.32!important}
#touch-editor{position:fixed;inset:0;z-index:40;background:#0c1815d9;backdrop-filter:blur(4px);touch-action:none}.editor-surface{position:absolute;inset:0;background-image:linear-gradient(#c6d6c50b 1px,transparent 1px),linear-gradient(90deg,#c6d6c50b 1px,transparent 1px);background-size:5vw 5vh}.editor-toolbar{position:absolute;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(680px,78%);background:#12231cf5;border:1px solid var(--line);padding:12px 16px;display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;font:9px var(--mono)}.editor-toolbar>div:first-child{width:100%;display:flex;justify-content:space-between;color:var(--gold)}.editor-toolbar label{display:flex;align-items:center;gap:8px}.editor-toolbar input{width:110px;accent-color:var(--gold)}.editor-actions{display:flex;gap:5px;margin-left:auto}.editor-actions button{background:#2b3d30;color:var(--paper);min-height:40px;padding:8px;font:9px var(--mono)}.editor-actions #editor-save{background:var(--gold);color:var(--dark)}#touch-editor .touch-node.selected{outline:2px solid var(--gold);outline-offset:5px;opacity:1!important}
.mobile #field-phase{top:12px;max-width:65%;gap:6px;padding:8px;flex-wrap:wrap;justify-content:center}.mobile #phase-label{font-size:10px}.mobile #phase-detail{font-size:8px}.mobile #ready-field{padding:7px;font-size:8px;min-height:36px}.mobile #score-hud{top:165px;left:18px;font-size:8px}.mobile #score-value{font-size:15px}.mobile #squad-status{display:none}.mobile #notification{min-width:0;max-width:90%;top:36%}.mobile #notification-title{font-size:18px}.mobile .bottom-hud{pointer-events:none}.mobile #interaction{bottom:22%;max-width:65%;font-size:9px;line-height:1.6;text-shadow:0 1px 4px #000;background:#102018b0;padding:5px}
@media(max-width:1000px){.prep-grid{grid-template-columns:minmax(180px,1fr) minmax(220px,1fr);gap:20px}.preview-panel{grid-column:1}.operator-panel,.mobile .operator-panel{grid-column:2}.map-panel,.mobile .map-panel{grid-row:2;grid-column:1/-1}#map-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}#operator-preview{height:285px}.prep-footer,.mobile .prep-footer{display:block}#deploy,.mobile #deploy{width:100%;margin-top:16px}.prep-header .micro:last-child{display:none}}
@media(max-width:520px){.loadout-screen,.mobile .loadout-screen{padding:12px 16px 25px}.prep-title h2,.mobile .prep-title h2{font-size:24px}.prep-grid{grid-template-columns:1fr;gap:20px}.preview-panel{grid-row:1;grid-column:1}.operator-panel,.mobile .operator-panel{grid-row:2;grid-column:1}.map-panel,.mobile .map-panel{grid-row:3;grid-column:1}#operator-preview{height:285px}#operator-options{display:flex;gap:5px}#operator-options .loadout-option{padding:10px 5px;justify-content:center}#operator-options .operator-symbol,#operator-options b{display:none}#operator-options strong{font-size:16px}#operator-options small{font-size:6px;letter-spacing:0}#weapon-options,.mobile #weapon-options{grid-template-columns:1fr 1fr}#weapon-options strong{font-size:18px}.mobile #field-phase{top:195px;max-width:92%;width:92%}.mobile #notification{top:46%}.mobile #score-hud{top:145px}.editor-toolbar{width:82%;padding:10px}.editor-actions{margin-left:0;width:100%;justify-content:space-between}.editor-toolbar>div:first-child{font-size:8px}.editor-toolbar label{font-size:8px}}
@media(max-height:500px) and (orientation:landscape){#operator-preview{height:260px}.prep-grid{gap:14px}.mobile #field-phase{max-width:54%;top:8px}.mobile .objective{top:58px;max-width:42%}.mobile .objective strong{font-size:15px}.mobile #score-hud{top:138px}.editor-toolbar{width:65%;gap:7px;padding:8px}.editor-toolbar>div:first-child{width:auto;gap:15px}.editor-toolbar input{width:85px}.editor-actions{margin-left:0}}
.prep-grid .map-brief{display:none}.prep-grid .map-option{padding:12px 8px}.prep-grid .map-option strong{font-size:20px}.prep-grid .map-panel>p{margin:12px 0}
#field-phase{z-index:2}#touch-controls{z-index:1}
#touch-controls{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#touch-controls .touch-node,#touch-editor .touch-node{padding:0;letter-spacing:0}.touch-node span{width:100%;max-width:100%;overflow-wrap:normal;font-size:8px}.touch-node[data-control=pickup] span{font-size:7px}.editor-actions button{min-height:44px}
