/* The app header (t-p15-w88yyp, owner 2026-10-19). Left to right: Menu, logo, the Jump-to-anything bar (headerBar.js), then pushed to
   the far right: Refresh, the HUD strip, the waiting-on-you badge, and the avatar last. The bar is inserted right after the logo, so
   the tab order is Menu, logo, search, then the right-hand buttons. Loaded after hud.css; it only adds, nothing above is edited. */
.hdr-search{order:0;flex:1 1 200px;min-width:0;max-width:560px;margin:0 12px;display:flex;align-items:center;gap:10px;
  height:clamp(26px,calc(var(--hud-hdr,54px) - 8px),36px);padding:0 12px;border:1px solid var(--border);border-radius:8px;
  background:var(--surface2);color:var(--text-muted);font:inherit;font-size:13px;text-align:left;cursor:pointer;transition:border-color .15s,color .15s}
.hdr-search .hud-ic{flex:none;color:var(--accent)}
.hdr-search .hdr-search-txt{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hdr-search kbd{flex:none;font:inherit;font-size:11px;padding:1px 6px;border:1px solid var(--border);border-radius:4px;color:var(--text-muted);background:var(--bg)}
.hdr-search:hover{border-color:var(--accent);color:var(--text)}
.hdr-search:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Everything after the bar sits at the right edge: .header-links (Refresh) carries margin-left:auto, so Refresh, #hdr-right (the HUD
   strip, then the avatar) follow it as one group. A short bar leaves the free space on its right; the group never leaves the header. */
.header .hdr-right{flex:none;margin-left:0}
/* On a HUD page hud.css hides Refresh and the strip, so the avatar group takes the auto margin itself and stays at the right edge. */
body.hud-page .header .hdr-right{margin-left:auto}

/* Narrow: the bar is an icon-only button (the words and the keys hide, the aria-label stays) and the header never scrolls sideways. */
@media (max-width:720px){
  .hdr-search{flex:0 0 auto;margin:0 0 0 auto;width:36px;padding:0;justify-content:center;gap:0}
  .hdr-search .hdr-search-txt,.hdr-search kbd{display:none}
  body.hud-page .header .hdr-right{margin-left:0}
}
@media (max-width:480px){
  .header{gap:8px;padding-left:10px;padding-right:10px}
  .header .logo{font-size:18px;letter-spacing:.5px}
  .header .hdr-right{gap:6px;min-width:0}
  /* The count leads the words, so the badge shrinks to the number (the title and the link stay); it never pushes the avatar out. */
  .header #owner-badge{max-width:44px;padding:4px 6px;overflow:hidden;text-overflow:ellipsis}
  .header #owner-badge .ob-words{display:none}
}
/* Phone width (t-p6-rycta7, finding 54): the right-hand group may shrink and its icons never push past the screen edge. */
@media (max-width:640px){
  .header{max-width:100vw;box-sizing:border-box}
  .header .hdr-right{flex:0 1 auto;max-width:100%;min-width:0}
}
