/* Game library overlay: one searchable directory, one persistent utility shelf. */
#hamburgerBtn.hamburger-menu { display:inline-flex; flex-direction:row; gap:9px; align-items:center; justify-content:center; width:auto; min-width:126px; height:43px; padding:0 15px; border-radius:11px; border-color:#d4dffb; background:#edf2ff; color:#244db0; font-size:12px; font-weight:750; white-space:nowrap; }
#hamburgerBtn.hamburger-menu:hover,#hamburgerBtn.hamburger-menu[aria-expanded="true"] { border-color:#a8beee; background:#e4ecff; }
.menu-trigger-bars { width:17px; flex:0 0 17px; display:grid; grid-template-rows:repeat(3,2px); gap:4px; }
#hamburgerBtn .hamburger-line { width:100%; height:2px; border-radius:3px; background:#315de1; }
.menu-trigger-label { color:#244db0; }
.menu-trigger-suffix { color:#53647b; }
#main-menu .game-hub-shell { width:100%; max-width:970px; max-height:min(860px,calc(100dvh - 30px)); padding:0; overflow-y:auto; border:1px solid #d8e0f0; border-radius:19px; background:#ffffff; box-shadow:0 28px 95px #1727443b,0 0 0 1px #315de108; }
#main-menu .game-hub-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; position:sticky; top:0; z-index:4; margin:0; padding:25px 30px 17px; background:#ffffff; border-bottom:0; }
.game-hub-heading-copy { min-width:0; }
.game-hub-brand { display:block; color:#53647b; font-size:11px; font-weight:650; margin:0 0 5px; }
#main-menu #game-hub-title { margin:0 0 5px; color:#25344e; font-size:clamp(21px,3vw,27px); line-height:1.3; letter-spacing:-.04em; font-weight:850; text-shadow:none; }
#game-hub-intro { font-size:12px; color:#65738b; margin:0; line-height:1.6; }
#main-menu .game-hub-heading .close-modal-button { margin:0; background:#edf2ff; color:#425d99; border:1px solid #ccd8ef; border-radius:11px; }
#main-menu .game-hub-heading .close-modal-button:hover { color:#244db0; background:#dfe8ff; }
.game-hub-search-wrap { padding:0 30px 23px; background:#ffffff; }
.game-hub-search { display:flex; gap:10px; align-items:center; min-height:47px; padding:0 14px; background:#f7f9ff; border:1px solid #cbd5e7; border-radius:11px; color:#65738b; transition:border-color .15s,box-shadow .15s; }
.game-hub-search:focus-within { border-color:#315de1; box-shadow:0 0 0 3px #315de120; }
.game-hub-search svg { flex:0 0 19px; width:19px; height:19px; }
.game-hub-search input { min-width:0; flex:1; padding:12px 0; background:transparent; border:0; outline:0; box-shadow:none; color:#25344e; font:inherit; font-size:13px; }
.game-hub-search input::placeholder { color:#65738b; opacity:1; }
.game-hub-search input::-webkit-search-cancel-button { cursor:pointer; }
.game-hub-search kbd { display:grid; place-items:center; width:23px; height:23px; border-radius:5px; border:1px solid #ccd8ef; font:12px system-ui,sans-serif; color:#53647b; }
.game-hub-content { display:grid; grid-template-columns:215px minmax(0,1fr); min-height:330px; border-block:1px solid #dbe3f1; }
.game-hub-categories { display:flex; flex-direction:column; gap:4px; padding:21px 13px 20px 20px; background:#f2f5fd; border-right:1px solid #dbe3f1; }
.game-hub-category { min-height:45px; width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; background:transparent; color:#53647b; border:1px solid transparent; border-radius:9px; text-align:left; cursor:pointer; font-size:13px; font-weight:700; }
.game-hub-category:hover { color:#244db0; background:#e7edfb; }
.game-hub-category[aria-pressed="true"] { background:#315de1; border-color:#315de1; color:#ffffff; }
.game-hub-category-count { color:inherit; opacity:.7; font-variant-numeric:tabular-nums; font-size:11px; }
.game-hub-results { min-width:0; padding:20px 26px 25px; background:#ffffff; }
.game-hub-results-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 8px; }
.game-hub-results-heading h3 { margin:0; color:#25344e; font-size:15px; font-weight:800; letter-spacing:-.02em; }
#game-hub-count { color:#53647b; font-size:11px; white-space:nowrap; }
.game-hub-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 12px; }
.game-hub-game { display:flex; gap:11px; align-items:center; text-align:left; min-width:0; min-height:78px; padding:12px 8px; font:inherit; background:transparent; border:0; border-bottom:1px solid #e3e8f3; border-radius:0; color:#25344e; text-decoration:none; cursor:pointer; }
.game-hub-game:hover,.game-hub-game:focus-visible { background:#edf2ff; border-radius:8px; border-bottom-color:#a8beee; color:#244db0; }
.game-hub-game-icon { display:grid; place-items:center; width:40px; height:40px; flex:0 0 40px; background:#edf2ff; color:#244db0; border:1px solid #d8e1f4; border-radius:11px; font-size:21px; }
.game-hub-game-copy { min-width:0; flex:1; display:flex; flex-direction:column; gap:4px; }
.game-hub-game-title { display:block; font-size:13px; line-height:1.35; color:#25344e; font-weight:800; overflow-wrap:anywhere; }
.game-hub-game-desc { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; color:#65738b; font-size:11px; line-height:1.5; }
.game-hub-game-tail { flex:0 0 15px; display:grid; align-items:center; justify-items:end; gap:7px; color:#536ba1; }
.game-hub-game-tail small { display:none; }
.game-hub-game-arrow { font-size:17px; font-weight:500; }
.game-hub-empty { padding:36px 10px; color:#65738b; text-align:center; font-size:13px; }
.game-hub-empty[hidden] { display:none !important; }
.game-hub-utilities { padding:22px 30px 25px; background:#ffffff; }
.game-hub-utilities h3 { font-size:12px; color:#53647b; font-weight:700; margin:0 0 12px; }
#main-menu .game-hub-utilities .menu-buttons { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0; }
#main-menu .game-hub-utilities .menu-button { min-width:0; min-height:55px; display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:9px; padding:10px 12px; margin:0; border:1px solid #d8e1f4; border-radius:10px; background:#f3f6fd; color:#344663; font-size:12px; box-shadow:none; transition:background .15s,border-color .15s; }
#main-menu .game-hub-utilities .menu-button:hover { background:#e4ecff; border-color:#a8beee; color:#244db0; transform:none; }
#main-menu .game-hub-utilities .menu-button-icon { font-size:20px; margin:0; }
#main-menu .game-hub-utilities .menu-button-text { min-width:0; font-weight:750; }
@media(max-width:700px) {
  #main-menu .game-hub-shell { max-height:calc(100dvh - 16px); }
  #main-menu .game-hub-heading { padding:14px 16px 10px; gap:12px; }
  .game-hub-brand { font-size:10px; margin:0 0 2px; }
  #main-menu #game-hub-title { font-size:18px; margin:0 0 2px; }
  #game-hub-intro { font-size:11.5px; line-height:1.4; }
  .game-hub-search-wrap { padding:0 16px 12px; }
  .game-hub-search { min-height:42px; padding:0 12px; gap:8px; }
  .game-hub-search input { padding:9px 0; font-size:14px; }
  .game-hub-content { grid-template-columns:1fr; }
  .game-hub-categories { flex-direction:row; overflow-x:auto; padding:8px 14px; gap:6px; border-right:0; border-bottom:1px solid #dbe3f1; scrollbar-width:thin; }
  .game-hub-category { min-height:34px; width:auto; flex:0 0 auto; white-space:nowrap; padding:6px 10px; font-size:12px; border-color:#d8e1f4; background:#f4f7ff; }
  .game-hub-results { padding:12px 14px 16px; }
  .game-hub-utilities { padding:12px 14px 14px; }
  .game-hub-utilities h3 { font-size:11px; margin:0 0 8px; }
}
@media(max-width:520px) {
  #hamburgerBtn.hamburger-menu { min-width:38px; padding:0 10px; gap:7px; }
  .menu-trigger-suffix { display:none; }
  #main-menu .game-hub-shell { border-radius:14px; }
  #main-menu .game-hub-heading .close-modal-button { min-width:38px; width:38px; height:38px; min-height:38px; }
  .game-hub-list { grid-template-columns:1fr; }
  .game-hub-game { min-height:62px; padding:9px 6px; gap:10px; }
  .game-hub-game-icon { width:36px; height:36px; flex:0 0 36px; font-size:18px; border-radius:9px; }
  #main-menu .game-hub-utilities .menu-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  #main-menu .game-hub-utilities .menu-button { min-height:42px; padding:7px 10px; font-size:11.5px; gap:7px; }
  #main-menu .game-hub-utilities .menu-button-icon { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) { .game-hub-search,#main-menu .game-hub-utilities .menu-button { transition:none; } }

/* Keep game browsing separate from utility actions: the game list scrolls, not the whole menu. */
#main-menu .game-hub-shell { display:flex; flex-direction:column; overflow:hidden; height:min(800px,calc(100dvh - 30px)); }
#main-menu .game-hub-heading, .game-hub-search-wrap, .game-hub-utilities { flex:0 0 auto; }
#main-menu .game-hub-heading { position:relative; top:auto; }
.game-hub-content { flex:1 1 auto; min-height:0; overflow:hidden; }
.game-hub-results { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-color:#9bacca #ffffff; }
@media(max-width:700px) {
  #main-menu .game-hub-shell { height:calc(100dvh - 20px); }
  .game-hub-content { display:flex; flex-direction:column; }
  .game-hub-categories { flex:0 0 auto; }
  .game-hub-results { flex:1 1 auto; }
}

.game-portal #main-menu :is(button,a,input):focus-visible { outline:3px solid #315de1; outline-offset:3px; }
.game-portal #main-menu .game-hub-search input:focus-visible { outline:none; }
