:root{--game-max-width:600px;--navy:#1c2340;--navy-2:#10131f;--text-on-dark:#fdf6e3;--stamp-1:#ffd93d;--neon-pink:#f25fbb;--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);}
  #brandBar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: calc(6px + var(--safe-top)) max(8px, var(--safe-right)) 6px max(8px, var(--safe-left));
    background: var(--navy);
    border-bottom: 2px solid rgba(255,255,255,.08);
    /* Positioning context for .games-menu-panel below -- anchored to the
       whole bar (not the narrow #gamesMenuWrap) so the flyout's right edge
       lines up with the bar's own right edge and never overflows a narrow
       mobile viewport regardless of exactly where the games icon sits
       among its siblings. */
    position: relative;
  }
  #brandLogo {
    font-size: 14px;
    letter-spacing: .02em;
    color: var(--text-on-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  #brandLogo .accent { color: var(--stamp-1); }
  #brandLogo small {
    color: var(--neon-pink);
    font-size: inherit;
    letter-spacing: inherit;
    vertical-align: baseline;
  }
  #brandActions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
  }
  .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-on-dark);
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .icon-btn svg { display: block; pointer-events: none; }
  /* .icon-btn svg's `display: block` above beats the UA stylesheet's
   * `[hidden] { display: none }` (author class-selector outranks the
   * default HTML4 rule), so a hidden icon inside an icon-btn stayed
   * visible — this is what let both sound icons render at once. */
  .icon-btn svg[hidden] { display: none; }
  .icon-btn:hover, .icon-btn:focus-visible {
    background: rgba(255,255,255,.14);
  }
  .icon-btn:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
  }
  .icon-btn[hidden] { display: none; }
  #soundToggle[aria-pressed="true"] { color: var(--stamp-1); }
  #autoToggle[aria-pressed="true"] { color: var(--stamp-1); }

  footer {
    padding: 8px max(12px, var(--safe-right)) calc(8px + var(--safe-bottom)) max(12px, var(--safe-left));
    text-align: center;
    font-size: 10px;
    color: #6b7398;
    background: var(--navy-2);
  }
  /* Deliberately unobtrusive — same size/dimness as the surrounding footer
   * text, just underlined on hover so it doesn't compete with the game UI. */
  footer a#adminLink {
    color: inherit;
    text-decoration: none;
  }
  footer a#adminLink:hover,
  footer a#adminLink:focus-visible {
    text-decoration: underline;
  }


@media(max-width:600px){#youtubeLink,#autoToggle,#homeLink{display:none;}}

#shopToggle .shop-open-icon{display:none;}
#shopToggle[aria-expanded="true"] .shop-closed-icon{display:none;}
#shopToggle[aria-expanded="true"] .shop-open-icon{display:block;}
#shopToggle[aria-expanded="true"]{color:var(--stamp-1);background:#ffffff12;}
