#k1pool-demo-toolbar{position:fixed;top:10px;left:50%;transform:translateX(-50%);z-index:9999;display:flex;align-items:center;gap:8px;white-space:nowrap;max-width:calc(100vw - 20px);box-sizing:border-box}
#k1pool-demo-toolbar .demo-badge{padding:6px 14px;border-radius:6px;background:rgba(20,20,20,.88);color:#fff;font:700 12px/20px Arial,sans-serif;letter-spacing:.5px;pointer-events:none;box-shadow:0 2px 8px #0003}
#k1pool-demo-toolbar .demo-badge span{margin-left:7px;font-weight:400;opacity:.7;letter-spacing:0}
#k1pool-demo-toolbar .firmware-download-button{display:inline-flex;align-items:center;justify-content:center;padding:6px 14px;border-radius:6px;background:#1677ff;color:#fff!important;font:600 12px/20px Arial,sans-serif;text-decoration:none!important;box-shadow:0 2px 8px #0002;transition:opacity .2s}
#k1pool-demo-toolbar .firmware-download-button:hover{opacity:.85}
/* Compact desktop and landscape screens: avoid covering firmware navigation. */
@media (max-width:1599px), (max-height:850px) {
  #k1pool-demo-toolbar {
    top:auto;
    bottom:calc(12px + env(safe-area-inset-bottom, 0px));
    left:auto;
    right:14px;
    transform:none;
    width:auto;
    max-width:calc(100vw - 28px);
    flex-wrap:nowrap;
    justify-content:flex-end;
    pointer-events:none;
  }
  #k1pool-demo-toolbar .demo-badge { display:none; }
  #k1pool-demo-toolbar .firmware-download-button {
    pointer-events:auto;
    white-space:nowrap;
    padding:9px 16px;
    line-height:20px;
  }
}
/* Phone screens: centre the single download action over the safe area. */
@media (max-width:650px) {
  #k1pool-demo-toolbar {
    left:50%;
    right:auto;
    transform:translateX(-50%);
    justify-content:center;
    bottom:calc(12px + env(safe-area-inset-bottom, 0px));
  }
  #k1pool-demo-toolbar .firmware-download-button { font-size:12px; }
}
