/* Primary game HUD shared by desktop and touch layouts. */
.game-shell>header{gap:12px}
.game-shell>header .header-status{display:flex;flex:0 1 auto;align-items:stretch;gap:8px;margin-left:4px;overflow:visible}
.header-status .goal{min-width:210px}
.header-game-controls{display:flex;flex:0 0 auto;align-items:center;gap:7px}
.header-primary,.header-restart{width:auto;min-width:76px;height:42px;margin:0;padding:0 15px;border-radius:10px;white-space:nowrap}
.header-restart{border:1px solid #b8aa89;background:#fffdf7;color:#5c5548;font-weight:800;cursor:pointer}
.header-restart:hover,.header-restart:focus-visible{border-color:#9a7525;background:#fff4c8;color:#3f2f0c}
.game-speed-controls{display:flex;height:42px;padding:3px;border:1px solid #b8aa89;border-radius:11px;background:#eee7d7;box-shadow:inset 0 1px 3px #51462818}
.game-speed-controls button{min-width:42px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:#625b4d;font-size:12px;font-weight:900;cursor:pointer}
.game-speed-controls button:hover,.game-speed-controls button:focus-visible{background:#fff9e8;color:#27251f}
.game-speed-controls button[aria-pressed="true"]{background:#27251f;color:#fff;box-shadow:0 2px 5px #0003}
.header-primary:focus-visible,.header-restart:focus-visible,.game-speed-controls button:focus-visible{outline:3px solid #efb829;outline-offset:2px}

.board-status{position:absolute;z-index:36;left:50%;bottom:14px;display:flex;align-items:stretch;gap:8px;transform:translateX(-50%);pointer-events:none}
.board-status .resource{min-width:116px;min-height:50px;padding:7px 11px;border-color:#c9bea588;background:rgb(255 253 242 / 48%);box-shadow:0 5px 18px #1029142b}
.board-status .resource[hidden]{display:none!important}
.board-status .resource>span{font-size:20px}
.board-status .resource small{font-size:8px;font-weight:900;color:#111;opacity:1;text-shadow:0 1px 0 #fff8}
.board-status .resource b{font-size:13px;white-space:nowrap}
.board-status .worker-population>span{color:#347ec1}
.board-status .guard-population>span{color:#d34b4b}
.toast{bottom:78px}

@media (max-width:1360px){
  .game-shell>header{padding-left:16px;padding-right:16px;gap:9px}
  .header-status .goal{min-width:190px;padding-left:10px;padding-right:10px}
  .header-primary,.header-restart{min-width:68px;padding:0 11px;font-size:12px}
  .game-speed-controls button{min-width:38px;padding:0 6px}
}

@media (max-width:1180px),(max-height:760px){
  .game-shell>header .header-status{gap:6px;margin-left:0}
  .header-status .goal{display:flex;min-width:170px;max-width:205px}
  .header-status .goal b{line-height:1.1}
  .header-primary,.header-restart{height:44px;min-width:62px;padding:0 9px;font-size:11px}
  .game-speed-controls{height:44px}
  .game-speed-controls button{min-width:36px;font-size:11px}
  .header-dev-tools{gap:5px}
  .switch-level-toggle{padding:8px 10px;font-size:10px}
  .board-status{bottom:12px;gap:6px}
  .board-status .resource{min-width:105px;min-height:46px;padding:6px 9px}
}

@media (max-width:940px){
  .brand{gap:7px}.brand-mark{font-size:23px!important}.brand b{font-size:14px!important}.brand small{display:none}
  .header-status .goal{min-width:148px;max-width:170px}
  .header-status #waxResource{display:none!important}
  .header-primary,.header-restart{min-width:54px;padding:0 7px}
  .game-speed-controls button{min-width:32px;padding:0 4px}
  .switch-level-toggle{max-width:72px;line-height:1.05}
  .board-status .resource{min-width:98px}
}

@media (max-width:820px){
  .header-status .goal{display:flex!important}
  .tablet-controls-toggle b{display:none}
  .tablet-controls-toggle{padding:0!important;width:44px!important;min-width:44px!important}
  .board-status{width:max-content;max-width:calc(100% - 20px)}
}
