/* Shared game bar. Games may override these variables on the host or :root. */
.gn-host{--gn-bg:var(--game-nav-bg,#f3f2ee);--gn-fg:var(--game-nav-fg,#263e48);--gn-line:var(--game-nav-line,#879a9e);--gn-btn:var(--game-nav-button,#faf9f5);--gn-hover:var(--game-nav-hover,#e1eae4);--gn-focus:var(--game-nav-focus,#148d9a);
  position:sticky;top:0;z-index:1000;box-sizing:border-box;background:var(--gn-bg);color:var(--gn-fg);border-bottom:1px solid var(--gn-line);
  padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) 0 env(safe-area-inset-left,0);font:600 14px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif}
.gn-host *{box-sizing:border-box}
.gn-bar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px;height:48px;max-width:1120px;margin:0 auto;padding:0 8px}
.gn-link,.gn-btn,.gn-item,.gn-select{min-height:44px;font:inherit;color:inherit;background:var(--gn-btn);border:1px solid var(--gn-line);border-radius:10px;cursor:pointer}
.gn-link,.gn-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:44px;padding:0 10px;text-decoration:none;white-space:nowrap}
.gn-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;font-size:16px;font-weight:750}
.gn-right{display:flex;gap:6px}
.gn-link:hover,.gn-btn:hover:not(:disabled),.gn-item:hover{background:var(--gn-hover)}
.gn-btn:disabled{opacity:.5;cursor:default}
.gn-host :is(a,button,select):focus-visible{outline:3px solid var(--gn-focus);outline-offset:2px}
.gn-panel{position:absolute;top:100%;right:max(8px,env(safe-area-inset-right,0));width:min(320px,calc(100vw - 16px));max-height:calc(100vh - 64px);max-height:calc(100dvh - 48px - env(safe-area-inset-top,0) - 16px);overflow-y:auto;overscroll-behavior:contain;
  display:flex;flex-direction:column;gap:6px;margin-top:6px;padding:10px;background:var(--gn-bg);border:1px solid var(--gn-line);border-radius:14px;box-shadow:0 12px 30px #0003}
.gn-panel[hidden]{display:none}
.gn-panel:focus{outline:none}
.gn-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.gn-label{flex:none}
.gn-select{flex:1;min-width:0;padding:0 8px}
.gn-item{display:flex;align-items:center;width:100%;padding:0 12px;text-align:start;text-decoration:none}
@media(max-width:380px){.gn-menu-text,.gn-arrow{display:none}}
@media(prefers-reduced-motion:no-preference){.gn-link,.gn-btn,.gn-item{transition:background-color .15s}}
/* legacy three-link group for games that have not adopted the adapter */
.game-return-links{display:flex;flex-wrap:wrap;gap:6px;align-items:center;max-width:100%;font:600 13px/1.25 system-ui,sans-serif;letter-spacing:normal;color:#263e48}
.game-return-links a{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;max-width:100%;padding:8px 10px;border:1px solid #879a9e;border-radius:9px;background:#f1f4ef;color:#263e48;text-decoration:none;white-space:normal;box-shadow:none}
.game-return-links a:hover{background:#e1eae4}
.game-return-links a:focus-visible{outline:3px solid #148d9a;outline-offset:2px}
.game-return-links .game-nav-full{display:inline}
.game-return-links .game-nav-short{display:none}
nav:has(>.game-return-links){flex-wrap:wrap;gap:8px}
header:has(>.game-return-links){row-gap:10px;flex-wrap:wrap}
@media(max-width:700px){
  .game-return-links{gap:5px;font-size:12px}
  .game-return-links a{padding:8px 9px}
  .game-return-links .game-nav-full{display:none}
  .game-return-links .game-nav-short{display:inline}
  header>.game-return-links{grid-column:1/-1;flex:1 1 100%;justify-content:center}
  nav>.game-return-links{flex:1 1 100%}
}
