/* Branch F10 layout: every cluster has its own zone so nothing overlaps.
   left column  : settlers (scrolls), objective pinned bottom-left
   top band     : resources between the settler column and the clock
   top right    : speed + clock, then the icon menu strip
   right column : alerts and selection, under the menu strip
   bottom right : floor selector
   bottom centre: build bar */

body.hud-f{--col-left:186px;--col-right:300px}

/* Settler column. */
body.hud-f .main-grid>.sidebar:first-child{left:10px!important;top:10px!important;width:var(--col-left)!important;max-width:none!important;max-height:calc(100% - 190px)!important;overflow:visible!important}
body.hud-f .settler-panel{padding:6px!important;max-height:100%;display:flex;flex-direction:column;min-height:0}
body.hud-f .settler-panel .panel-title{display:flex!important;font-size:11px;margin-bottom:5px}
body.hud-f #colonist-list{flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;max-height:calc(100vh - 240px)!important;gap:4px!important;padding-right:2px}
body.hud-f .colonist-row{display:grid!important;grid-template-columns:36px 1fr!important;grid-template-rows:auto auto auto;column-gap:7px;align-items:center!important;width:auto!important;min-width:0!important;padding:4px 5px!important;text-align:left}
body.hud-f .colonist-row .hf-portrait{grid-row:1/4;width:36px!important;height:36px!important}
body.hud-f .colonist-row>span:first-of-type{text-align:left!important}
body.hud-f .colonist-row strong{font-size:12px!important;text-align:left}
body.hud-f .colonist-row .colonist-state{display:block!important;grid-column:2;font-size:10.5px!important;color:var(--muted)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left!important}
body.hud-f .colonist-row .hf-mood{grid-column:2;width:auto!important;margin-top:2px!important}

/* Objective pinned bottom-left, collapsible. */
body.hud-f .objective-panel{position:fixed!important;left:10px;bottom:10px;width:var(--col-left)!important;z-index:15;cursor:pointer;padding:8px 10px!important}
body.hud-f .objective-panel .objective-title{font-size:13px!important}
body.hud-f .objective-panel .objective-copy{font-size:11px!important;max-height:6.2em}
body.hud-f .objective-panel.hf-collapsed .objective-copy{display:none}
body.hud-f .objective-panel .eyebrow::after{content:' ▾';color:var(--muted)}
body.hud-f .objective-panel.hf-collapsed .eyebrow::after{content:' ▸'}

/* Resources fill the gap between the settler column and the clock cluster. */
body.hud-f .resource-overlay{left:calc(var(--col-left) + 20px)!important;right:430px!important;transform:none!important;margin:0 auto!important;width:fit-content!important;max-width:none!important}
body.hud-f .resource-overlay-grid{padding:5px 10px!important;gap:2px 10px!important}

/* Top right: speed, then clock, on one row. */
body.hud-f .world-status-float{top:10px!important;right:10px!important;height:44px!important}
body.hud-f .world-status-float>div{padding:5px 11px!important}
body.hud-f #speed-controls{top:10px!important;right:252px!important;height:44px;align-items:center}
body.hud-f #speed-controls button{width:34px!important;height:30px!important}

/* Icon menu strip under the clock. */
body.hud-f .top-actions{top:62px!important;right:10px!important;bottom:auto!important;max-width:none!important;flex-wrap:nowrap!important;gap:3px!important;padding:4px!important}
body.hud-f .top-actions button{width:34px!important;height:32px!important;padding:0!important;font-size:0!important;color:transparent!important;background-repeat:no-repeat!important;background-position:center!important;background-size:20px 20px!important;position:relative}
body.hud-f .top-actions button>*{display:none!important}
body.hud-f .top-actions button:hover::after{content:attr(data-tip);position:absolute;top:38px;right:0;white-space:nowrap;font:600 12px var(--body);color:var(--text);background:var(--wood-solid);border:1px solid var(--brass);border-radius:4px;padding:4px 8px;z-index:40;pointer-events:none}

/* Floors bottom-right. */
body.hud-f #layer-controls{top:auto!important;bottom:10px!important;right:10px!important;height:40px}

/* Right column under the menu strip, clear of the floor selector. */
body.hud-f .main-grid>.sidebar:last-of-type{top:108px!important;right:10px!important;width:var(--col-right)!important;max-height:calc(100% - 176px)!important}

/* Build bar keeps clear of both bottom corners. */
body.hud-f .toolbar-wrap{max-width:calc(100% - 2 * var(--col-left) - 60px)!important}

@media (max-width:1180px){
  body.hud-f{--col-left:62px;--col-right:270px}
  body.hud-f .colonist-row{grid-template-columns:36px!important}
  body.hud-f .colonist-row>span,body.hud-f .colonist-row .colonist-state,body.hud-f .colonist-row .hf-mood{display:none!important}
  body.hud-f .settler-panel .panel-title{display:none!important}
  body.hud-f .objective-panel{display:none!important}
  body.hud-f .resource-overlay{right:10px!important;top:108px!important;bottom:auto!important;left:calc(var(--col-left) + 20px)!important}
  body.hud-f .main-grid>.sidebar:last-of-type{top:150px!important}
}

/* Icon menu strip icons. */
body.hud-f #save-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%204h11l3%203v13H5z%22%2F%3E%3Cpath%20d%3D%22M8%204v5h7V4%22%2F%3E%3Crect%20x%3D%228%22%20y%3D%2213%22%20width%3D%228%22%20height%3D%225%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #load-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207h6l2%202h10v10H3z%22%2F%3E%3Cpath%20d%3D%22M12%2017v-6M9%2014l3%203%203-3%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #research-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%206c-2-1.5-5-2-8-1.5V19c3-.5%206%200%208%201.5%202-1.5%205-2%208-1.5V4.5c-3-.5-6%200-8%201.5z%22%2F%3E%3Cpath%20d%3D%22M12%206v14.5%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #workforce-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%223%22%2F%3E%3Ccircle%20cx%3D%2216.5%22%20cy%3D%229%22%20r%3D%222.5%22%2F%3E%3Cpath%20d%3D%22M3%2019c0-3%202.5-5%205-5s5%202%205%205M13.5%2019c.3-2.5%201.5-4%203-4s3%201.5%203.5%204%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #rooms-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2011l9-7%209%207%22%2F%3E%3Cpath%20d%3D%22M5%2010v10h14V10%22%2F%3E%3Cpath%20d%3D%22M10%2020v-6h4v6%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #trade-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204v16M5%2020h14M4%208h16%22%2F%3E%3Cpath%20d%3D%22M4%208l-2%206h6zM20%208l-2%206h6z%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #hf-colony-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2020V9l3-2%203%202v11M10%2020v-7l4-3%204%203v7M3%2020h18%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #draft-all-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M5%204l10%2010M4%205l1-1M15%2014l2%202-1.5%201.5L14%2016zM19%204L9%2014M20%205l-1-1M9%2014l-2%202%201.5%201.5L10%2016z%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #sound-toggle{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2010v4h4l5%204V6l-5%204z%22%2F%3E%3Cpath%20d%3D%22M16%209c1.3%201.6%201.3%204.4%200%206M18.5%207c2.5%202.8%202.5%207.2%200%2010%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #hf-more-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%226%22%20cy%3D%2212%22%20r%3D%221.3%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.3%22%2F%3E%3Ccircle%20cx%3D%2218%22%20cy%3D%2212%22%20r%3D%221.3%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #hf-fullscreen-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%209V4h5M20%209V4h-5M4%2015v5h5M20%2015v5h-5%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #export-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2015V4M8%208l4-4%204%204%22%2F%3E%3Cpath%20d%3D%22M4%2014v6h16v-6%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #import-btn{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%204v11M8%2011l4%204%204-4%22%2F%3E%3Cpath%20d%3D%22M4%2014v6h16v-6%22%2F%3E%3C%2Fsvg%3E")!important}
body.hud-f #debug-toggle{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23e3c27c%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223%22%2F%3E%3Cpath%20d%3D%22M12%202v3M12%2019v3M2%2012h3M19%2012h3M5%205l2%202M17%2017l2%202M5%2019l2-2M17%207l2-2%22%2F%3E%3C%2Fsvg%3E")!important}

body.hud-f .top-actions button{background-color:#2f2216!important}
body.hud-f .top-actions button.active,body.hud-f .top-actions button.hf-on{box-shadow:0 0 0 1px var(--brass-hi),inset 0 0 8px rgba(227,194,124,.35)!important;background-color:#4a3519!important}
body.hud-f .top-actions button:disabled{opacity:.38}

/* Build bar: compact category tabs that always fit inside the frame. */
body.hud-f .toolbar-wrap{width:auto!important;padding:5px 6px!important}
body.hud-f #toolbar{flex-wrap:nowrap!important;gap:4px!important;overflow:visible}
body.hud-f .tool-menu-trigger,body.hud-f .tool-quick-button{height:36px!important;padding:0 10px!important;font-size:11.5px!important;gap:6px!important;min-width:0!important;white-space:nowrap}
body.hud-f .tool-menu-trigger b{display:none!important}
body.hud-f .tool-menu-trigger small{font-size:10px!important;min-width:18px;height:18px;line-height:18px;padding:0 4px!important;border-radius:9px}
body.hud-f .tool-help{font-size:10.5px!important;margin-top:3px!important}
@media (max-width:1380px){body.hud-f .tool-menu-trigger small{display:none!important}body.hud-f .tool-menu-trigger,body.hud-f .tool-quick-button{padding:0 8px!important}}

/* Alerts above the selection panel so they are never pushed off screen. */
body.hud-f .main-grid>.sidebar:last-of-type{display:flex!important;flex-direction:column}
body.hud-f .alerts-panel-v370{order:1;flex:none;max-height:180px;overflow:auto}
body.hud-f .selection-wrap{order:2;min-height:0}
body.hud-f.hf-has-selection .selection-wrap{max-height:none!important;flex:1 1 auto;overflow:auto}

/* Settler heading on one line. */
body.hud-f .settler-panel .panel-title{justify-content:space-between;align-items:baseline;white-space:nowrap}
body.hud-f .settler-panel .panel-title .muted{font-size:10px;letter-spacing:0;text-transform:none;font-family:var(--body)}
@media (max-width:1600px){
  body.hud-f .tool-menu-trigger,body.hud-f .tool-quick-button{font-family:var(--body)!important;font-weight:700!important;letter-spacing:.02em!important;font-size:12.5px!important}
  body.hud-f .tool-menu-trigger small{display:none!important}
}
@media (max-width:1180px){
  body.hud-f .main-grid>.sidebar:last-of-type{max-height:calc(100% - 270px)!important;width:250px!important}
  body.hud-f .toolbar-wrap{max-width:calc(100% - 2 * var(--col-left) - 180px)!important;left:calc(var(--col-left) + 20px)!important;transform:none!important}
  body.hud-f .tool-menu-trigger,body.hud-f .tool-quick-button{padding:0 6px!important;font-size:11.5px!important}
  body.hud-f .tool-help{display:none!important}
  body.hud-f #layer-controls #layer-label{display:none}
}

/* The old layout forced a 1050px minimum; the floating HUD adapts instead. */
body.hud-f #app{min-width:0!important}
