/* A single phone/tablet menu for every public, account, lobby and rules screen. */
.akv-global-mobile-nav { display:none; }
@media(max-width:1024px) {
  body:not(.cq-game-body) .akv-global-mobile-nav {
    position:fixed; z-index:9550; top:calc(10px + env(safe-area-inset-top));
    right:10px; display:block; max-width:calc(100vw - 20px);
  }
  .akv-global-nav-toggle {
    display:inline-flex; align-items:center; justify-content:center; gap:7px;
    min-width:44px; height:42px; padding:0 12px; border:1px solid #c9def4;
    border-radius:13px; color:#17477e; background:rgba(250,253,255,.98);
    box-shadow:0 9px 25px rgba(29,71,132,.15); cursor:pointer;
    font:inherit; font-size:.78rem; font-weight:850;
  }
  .akv-global-nav-toggle .pi { font-size:1.12rem; }
  .akv-global-nav-toggle:focus-visible, .akv-global-nav-link:focus-visible,
  .akv-global-nav-logout-button:focus-visible { outline:3px solid #568af3; outline-offset:2px; }
  .akv-global-nav-panel {
    position:absolute; top:calc(100% + 5px); right:0;
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px; width:min(340px,calc(100vw - 20px));
    max-height:calc(100dvh - 80px - env(safe-area-inset-top));
    box-sizing:border-box; padding:9px; overflow-y:auto;
    overscroll-behavior:contain; border:1px solid #c9def4; border-radius:16px;
    background:rgba(249,252,255,.98); box-shadow:0 21px 52px rgba(20,60,123,.25);
    -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px);
  }
  .akv-global-nav-panel[hidden] {display:none!important}
  .akv-global-nav-link,.akv-global-nav-logout-button {
    display:flex; gap:8px; align-items:center; justify-content:flex-start;
    box-sizing:border-box; min-height:44px; min-width:0; padding:8px 10px;
    border:1px solid transparent; border-radius:10px; background:#f0f7ff;
    color:#17477e!important; font:inherit; font-size:.74rem; font-weight:800;
    line-height:1.2; text-decoration:none!important; white-space:normal;
    overflow-wrap:anywhere; cursor:pointer; text-align:left;
  }
  .akv-global-nav-link .pi{font-size:.92rem;flex:0 0 auto}
  .akv-global-nav-link.is-active {background:linear-gradient(105deg,#754aff,#18b7ed); color:#fff!important}
  .akv-global-nav-link.is-active .pi{color:#fff!important}
  .akv-global-nav-logout {margin:0!important;display:block}
  .akv-global-nav-logout-button {width:100%;height:100%;background:#fff3f5;color:#9d3756!important}
  /* Do not keep a second horizontally overflowing menu behind the mobile button. */
  .cq-nav.akv-site-nav {
    display:flex!important; align-items:center!important;
    flex-wrap:nowrap!important; min-height:54px!important;
    padding-right:84px!important; overflow:visible!important;
  }
  .cq-nav.akv-site-nav .akv-nav-actions{display:none!important}
  .cq-nav.akv-site-nav>.cq-brand{min-width:0!important}
  .cq-lobby-topbar {grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;padding-right:79px!important}
  .cq-lobby-topbar .cq-lobby-nav {display:none!important}
  .cq-lobby-topbar .cq-lobby-brand {min-width:0!important}
  .cq-lobby-topbar .cq-lobby-top-actions {grid-column:2;grid-row:1;min-width:0}
  .akv-rules-topbar {grid-template-columns:minmax(0,1fr) auto!important;padding-right:82px!important}
  .akv-rules-topbar .akv-rules-nav {display:none!important}
  .akv-rules-topbar .akv-rules-userbar {grid-column:2;grid-row:1}
  .akv-auth-card-brandline .akv-auth-back{display:none!important}
}
@media(max-width:680px) {
  .cq-lobby-topbar .cq-lobby-connection,.cq-lobby-topbar .cq-lobby-logout-form {display:none!important}
  .akv-rules-topbar .akv-rules-userbar {display:none!important}
}
@media(max-width:420px) {
  .akv-global-nav-toggle {width:42px;padding:0}
  .akv-global-nav-toggle>span:not(.pi){display:none}
  .cq-nav.akv-site-nav,.akv-rules-topbar {padding-right:55px!important}
  .cq-lobby-topbar {padding-right:50px!important}
}


/* Homepage and access-denied screen need a real small top bar, not a
   floating button without a header. JS attaches the shared button inside it. */
.akv-mobile-simple-topbar { display:none; }

@media(max-width:1024px) {
  body:not(.cq-game-body) .akv-global-mobile-nav.is-header-anchored {
    position:absolute!important;
    top:50%!important;
    right:8px!important;
    bottom:auto!important;
    left:auto!important;
    width:auto!important;
    max-width:calc(100% - 16px)!important;
    margin:0!important;
    transform:translateY(-50%)!important;
    display:block!important;
    z-index:95!important;
  }
  body:not(.cq-game-body) .akv-global-mobile-nav.is-header-anchored .akv-global-nav-panel {
    top:calc(100% + 8px)!important;
    right:0!important;
    left:auto!important;
    width:min(340px,calc(100vw - 24px))!important;
  }
  /* All toolbar types reserve room for the hamburger's entire hit box. */
  body:not(.cq-game-body) .cq-nav.akv-site-nav,
  body:not(.cq-game-body) .cq-lobby-topbar,
  body:not(.cq-game-body) .akv-rules-topbar {
    padding-right:91px!important;
    overflow:visible!important;
  }
  body:not(.cq-game-body) .cq-nav.akv-site-nav {
    display:flex!important;align-items:center!important;
    min-height:54px!important;
  }
  body:not(.cq-game-body) .cq-lobby-topbar {
    align-items:center!important;
    min-height:54px!important;
  }
  body:not(.cq-game-body) .cq-lobby-topbar .cq-lobby-top-actions {
    justify-self:end;align-self:center;
    gap:5px!important;
  }
  body:not(.cq-game-body) .akv-rules-topbar {
    min-height:54px!important;
    align-items:center!important;
  }
  body.akv-auth-body .akv-auth-card-brandline {
    position:relative!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    min-height:46px!important;
    padding-right:91px!important;
    overflow:visible!important;
  }
  body.akv-auth-body .akv-auth-logo{
    min-width:0!important;
    max-width:100%!important;
  }
  .akv-mobile-simple-topbar {
    display:flex!important;
    position:relative;
    z-index:90;
    align-items:center;
    box-sizing:border-box;
    width:100%;
    min-height:54px;
    padding:6px 91px 6px 10px;
    margin-bottom:10px;
    border:1px solid rgba(218,234,250,.94);
    border-radius:15px;
    background:rgba(248,252,255,.95);
    box-shadow:0 10px 28px rgba(30,74,135,.13);
    overflow:visible;
  }
  .akv-mobile-simple-brand {
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden;
    text-decoration:none!important;
  }
  .akv-mobile-simple-brand .akv-brand-mark {
    width:30px!important;height:32px!important;max-width:30px!important;
  }
  .akv-mobile-simple-brand .akv-brand-word {
    font-size:1.17rem!important;
  }
}
@media(max-width:420px) {
  body:not(.cq-game-body) .cq-nav.akv-site-nav,
  body:not(.cq-game-body) .cq-lobby-topbar,
  body:not(.cq-game-body) .akv-rules-topbar,
  body.akv-auth-body .akv-auth-card-brandline {
    padding-right:57px!important;
  }
  body:not(.cq-game-body) .akv-global-mobile-nav.is-header-anchored {right:7px!important}
  .akv-mobile-simple-topbar {padding-right:57px}
  body.cq-lobby-body .cq-lobby-topbar .cq-lobby-player-link{padding:3px}
}
