.modal:has(.harbor-editor),.modal-box:has(.harbor-editor){width:min(1220px,98vw);max-width:98vw;max-height:94vh;padding:12px;overflow:hidden}
.harbor-editor{width:min(1180px,94vw);max-height:88vh;overflow:auto;color:var(--ink,#e7f0f7);font-family:Cairo,Tahoma,sans-serif}
.harbor-editor header,.harbor-editor footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.harbor-editor h3,.harbor-editor p{margin:0 0 8px}.harbor-editor header p,.harbor-editor>.hint{color:#abc2d3;font-size:12px}.he-workspace{display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px;align-items:start;margin:12px 0}.he-workspace aside{display:grid;gap:8px}.he-workspace label{display:grid;gap:3px;font-size:12px}.he-workspace label:has([type=checkbox]){display:block}.he-workspace .input{width:100%;min-height:36px}.he-workspace .btn{font-size:12px;min-height:36px}.he-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.he-workspace iframe{display:block;width:100%;aspect-ratio:1280/698;border:1px solid #52748b;border-radius:8px;background:#0b1c2c}.harbor-editor footer{justify-content:start;position:sticky;bottom:0;background:#0b2236;padding:10px 0}.harbor-editor #heStatus{font-size:12px;color:#9cd7e7;flex:1;min-width:150px}
@media(max-width:850px){.he-workspace{grid-template-columns:170px minmax(0,1fr);gap:8px}.harbor-editor{max-height:84vh}.he-workspace aside{gap:5px}.harbor-editor header p{display:none}}
.he-fields label{font-size:10px;min-width:0}.he-fields input{padding:5px;text-align:center}.he-workspace aside{max-height:58vh;overflow-y:auto;padding:2px}.he-workspace iframe{align-self:start}
@media(max-height:500px){.harbor-editor{max-height:86vh}.he-workspace aside{max-height:42vh}.harbor-editor>.hint{font-size:10px}.harbor-editor footer{padding:5px 0}.harbor-editor header h3{font-size:16px;margin:0}}
/* Actions stay in normal flow so they cannot cover draggable buildings. */
.harbor-editor footer{position:static}
/* The direct editor reserves a separate band for its controls. */
body.resource-hud-active:has(#frScene.lay-on) #resourceHud{visibility:hidden}
body.resource-hud-active #frScene.lay-on>.fr-command-shell,body.resource-hud-active #frScene.lay-on>.fr-toolbar-toggle,body.resource-hud-active #frScene.lay-on>.fr-view-controls{display:none!important}
body.resource-hud-active #frScene.lay-on>.fr-map-viewport{top:0!important;bottom:var(--layout-toolbar-height,125px)!important}
body.resource-hud-active #frScene.lay-on>.fr-map-viewport>.fr-stage{width:min(100%,calc(var(--harbor-map-height,250px)*1280/698))!important}
#frScene.lay-target-only [data-pb]:not(.lay-picked),#frScene.lay-target-only [data-seasub]{pointer-events:none}
.he-move-actions{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.he-move-actions .btn{font-size:12px;min-height:36px}
