/* Mobile-only density pass for non-game screens. Keep content, hit targets and
 * desktop/tablet desktop layouts intact. Avoid hiding legal information or forms. */
@media (max-width:1024px) {
  /* Home has a real mobile top bar; the hero must not become a second flex column. */
  body.akv-home-body .akv-home.akv-public-shell {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:10px!important;
    min-height:100svh;
    padding:clamp(10px,2.5vw,18px) clamp(12px,2.4vw,24px) 82px!important;
  }
  body.akv-home-body .akv-home-copy {
    align-self:flex-end;
    width:min(660px,100%)!important;
  }
  body.akv-home-body .akv-home-brand {display:none!important}
  body.cq-body:not(.cq-game-body) .cq-nav.akv-site-nav {
    margin-top:6px!important;
    margin-bottom:10px!important;
  }
  body.cq-body:not(.cq-game-body) .akv-site-footer {
    margin-top:16px!important;
  }
}
@media (max-width:760px) {
  /* Generic page rhythm. Never reduce active touch controls below 44px. */
  body.cq-body:not(.cq-game-body) .cq-shell,
  body.cq-body:not(.cq-game-body) .cq-progress-shell {
    width:calc(100% - 16px)!important;
    max-width:100%!important;
  }
  body.cq-body:not(.cq-game-body) .cq-page {
    padding:10px 0 34px!important;
  }
  body.cq-body:not(.cq-game-body) .cq-page-header {
    gap:8px!important;
    margin-bottom:11px!important;
  }
  body.cq-body:not(.cq-game-body) .cq-page-header h1 {
    font-size:clamp(1.38rem,6vw,1.85rem)!important;
    line-height:1.12!important;
  }
  body.cq-body:not(.cq-game-body) .cq-card {
    padding:12px!important;
    border-radius:15px!important;
  }
  body.cq-body:not(.cq-game-body) .akv-site-footer {
    gap:8px!important;
    margin:14px 0 8px!important;
    padding:10px 12px!important;
    font-size:.72rem!important;
    border-radius:12px!important;
  }
  body.cq-body:not(.cq-game-body) .akv-mobile-simple-topbar {
    margin-bottom:8px!important;
    min-height:51px!important;
  }

  /* Landing: keep the invitation, benefits and prize, remove oversized sky/padding. */
  body.akv-home-body .akv-home.akv-public-shell {
    padding:10px 12px 66px!important;
    gap:0!important;
  }
  body.akv-home-body .akv-home-copy.akv-public-panel {
    width:100%!important;
    padding:14px!important;
    border-radius:18px!important;
  }
  body.akv-home-body .akv-home-audience {
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:7px!important;
    margin:0 0 11px!important;
    padding:8px!important;
    border-radius:12px!important;
  }
  body.akv-home-body .akv-home-audience-icon {
    width:34px!important;height:34px!important;
    border-radius:10px!important;font-size:.98rem!important;
  }
  body.akv-home-body .akv-home-audience small {
    font-size:.56rem!important;letter-spacing:.035em!important;
  }
  body.akv-home-body .akv-home-audience strong {
    font-size:.83rem!important;line-height:1.2!important;
  }
  body.akv-home-body .akv-home-audience p {
    margin-top:2px!important;
    font-size:.71rem!important;line-height:1.35!important;
  }
  body.akv-home-body .akv-home-message h1 {
    font-size:clamp(1.65rem,7vw,2.2rem)!important;
    line-height:1.07!important;
  }
  body.akv-home-body .akv-home-message p {
    margin-top:8px!important;
    font-size:.86rem!important;line-height:1.43!important;
  }
  body.akv-home-body .akv-home-actions {
    gap:7px!important;margin-top:13px!important;
  }
  body.akv-home-body .akv-home-actions>.ui-button {
    min-height:44px!important;font-size:.81rem!important;
  }
  body.akv-home-body .akv-home-prize-banner {
    position:relative!important;
    left:auto!important;right:auto!important;bottom:auto!important;
    width:100%!important;
    grid-template-columns:36px minmax(0,1fr) 32px!important;
    gap:8px!important;
    margin:10px 0 55px!important;
    padding:9px!important;border-radius:14px!important;
  }
  body.akv-home-body .akv-home-prize-icon {
    width:34px!important;height:34px!important;
    border-radius:10px!important;font-size:1rem!important;
  }
  body.akv-home-body .akv-home-prize-copy small {font-size:.52rem!important}
  body.akv-home-body .akv-home-prize-copy strong {font-size:.89rem!important}
  body.akv-home-body .akv-home-prize-copy>span {font-size:.73rem!important}
  body.akv-home-body .akv-home-prize-copy em {font-size:.91rem!important}
  body.akv-home-body .akv-home-prize-copy b {font-size:.6rem!important}
  body.akv-home-body .akv-home-prize-cta {
    width:32px!important;height:34px!important;min-height:34px!important;
    padding:0!important;
  }

  /* Login / registration / reset: first usable field higher on the screen. */
  body.akv-auth-body .akv-public-shell.akv-auth-shell {
    display:block!important;
    min-height:100svh!important;
    padding:12px 12px 68px!important;
  }
  body.akv-auth-body .akv-public-panel {
    width:100%!important;
    padding:13px 14px!important;
    border-radius:18px!important;
  }
  body.akv-auth-body .akv-auth-heading {
    margin:11px 0 13px!important;
  }
  body.akv-auth-body .akv-auth-heading h1 {
    font-size:clamp(1.65rem,6.2vw,2rem)!important;
    line-height:1.12!important;
  }
  body.akv-auth-body .akv-auth-heading p {
    margin-top:5px!important;
    font-size:.86rem!important;
    line-height:1.4!important;
  }
  body.akv-auth-body .akv-auth-prize-promo {
    margin-top:9px!important;
    padding:8px!important;
    border-radius:12px!important;
  }
  body.akv-auth-body .akv-auth-card-login {
    padding:12px!important;
    gap:9px!important;
    border-radius:14px!important;
  }
  body.akv-auth-body .akv-login-grid {gap:10px!important}
  body.akv-auth-body .akv-login-fields,
  body.akv-auth-body .akv-auth-card-login .akv-auth-form {
    gap:10px!important;
  }
  body.akv-auth-body .akv-login-intro {
    font-size:.8rem!important;line-height:1.4!important;
  }
  body.akv-auth-body .akv-auth-form .cq-field {gap:5px!important}
  body.akv-auth-body .akv-register-fields {
    gap:5px 11px!important;
  }
  body.akv-auth-body .akv-field-help {
    padding-bottom:5px!important;
    min-height:0!important;
  }
  body.akv-auth-body .akv-register-consent-card,
  body.akv-auth-body .akv-register-benefits {
    margin-top:12px!important;
    padding:11px!important;border-radius:13px!important;
  }
  body.akv-auth-body .akv-register-benefits h2 {margin-bottom:8px!important}
  body.akv-auth-body .akv-benefit-grid {gap:8px!important}
  body.akv-auth-body .akv-auth-form .akv-auth-primary {
    min-height:46px!important;
  }

  /* Lobby: compact hero and smaller decorative rider, never remove game setup. */
  body.cq-lobby-body .cq-lobby-app {
    padding:7px 8px 26px!important;
  }
  body.cq-lobby-body .cq-lobby-topbar {
    gap:5px!important;
    min-height:51px!important;
    margin-bottom:8px!important;
    padding-top:5px!important;padding-bottom:5px!important;
  }
  body.cq-lobby-body .cq-lobby-shell {gap:9px!important}
  body.cq-lobby-body .cq-lobby-stage {min-height:0!important}
  body.cq-lobby-body .cq-lobby-stage-copy {padding:0 0 4px!important}
  body.cq-lobby-body .cq-lobby-stage-copy-panel {
    width:100%!important;
    padding:12px 13px!important;
    border-radius:17px!important;
  }
  body.cq-lobby-body .cq-lobby-stage-brand {display:none!important}
  body.cq-lobby-body .cq-lobby-stage-copy h1 {
    font-size:clamp(1.6rem,6.6vw,2.18rem)!important;
    line-height:1.08!important;
  }
  body.cq-lobby-body .cq-lobby-stage-copy p {
    margin-top:7px!important;
    font-size:.83rem!important;
    line-height:1.42!important;
  }
  body.cq-lobby-body .cq-lobby-stage-figure {
    width:clamp(138px,40vw,207px)!important;
    margin:-3px auto -8px!important;
  }
  body.cq-lobby-body .cq-lobby-panel,
  body.cq-lobby-body .cq-lobby-control {
    padding:12px!important;
    border-radius:15px!important;
  }
  body.cq-lobby-body .cq-setup-heading {
    margin-bottom:9px!important;font-size:1.03rem!important;
  }
  body.cq-lobby-body .cq-game-setup-grid {gap:11px!important}
  body.cq-lobby-body .cq-control-label {margin-bottom:5px!important}
  body.cq-lobby-body .cq-mode-choice-grid {gap:5px!important}
  body.cq-lobby-body .cq-mode-choice {
    min-height:44px!important;
    padding:6px 4px!important;
    border-radius:10px!important;
    font-size:.71rem!important;
  }
  body.cq-lobby-body .cq-topic-options {gap:5px!important}
  body.cq-lobby-body .cq-topic-options label>span {
    min-height:44px!important;padding:6px!important;
    font-size:.7rem!important;
  }

  /* Rules: shorten decorative illustrations, preserve explanations and step controls. */
  body.akv-rules-body .akv-rules-main {gap:10px!important;margin-top:8px!important}
  body.akv-rules-body .akv-rules-hero {
    gap:10px!important;
    padding:14px!important;
    border-radius:17px!important;
  }
  body.akv-rules-body .akv-rules-hero h1 {
    margin:8px 0 9px!important;
    font-size:clamp(1.72rem,7vw,2.22rem)!important;
    line-height:1.04!important;
  }
  body.akv-rules-body .akv-rules-hero p {
    font-size:.85rem!important;line-height:1.44!important;
  }
  body.akv-rules-body .akv-rules-hero-actions {
    gap:6px!important;margin-top:11px!important;
  }
  body.akv-rules-body .akv-rules-primary,
  body.akv-rules-body .akv-rules-hero-actions a {
    min-height:44px!important;
  }
  body.akv-rules-body .akv-rules-hero-visual {
    min-height:125px!important;padding:6px!important;border-radius:13px!important;
  }
  body.akv-rules-body .akv-rules-hero-visual svg {max-height:142px!important}
  body.akv-rules-body .akv-rules-flow {padding:6px!important;border-radius:15px!important}
  body.akv-rules-body .akv-rule-step {
    gap:8px!important;padding:11px!important;border-radius:13px!important;
  }
  body.akv-rules-body .akv-rule-copy h2 {
    font-size:1.21rem!important;line-height:1.22!important;
  }
  body.akv-rules-body .akv-rule-copy p,
  body.akv-rules-body .akv-rule-copy li {
    font-size:.83rem!important;line-height:1.45!important;
  }
  body.akv-rules-body .akv-rule-visual {
    min-height:115px!important;padding:5px!important;border-radius:12px!important;
  }
  body.akv-rules-body .akv-rule-visual svg {max-height:135px!important}
  body.akv-rules-body .akv-rules-modes,
  body.akv-rules-body .akv-rules-cheatsheet {
    padding:12px!important;border-radius:16px!important;
  }
  body.akv-rules-body .akv-rules-section-head {margin-bottom:10px!important}
  body.akv-rules-body .akv-rules-mode-grid>article {
    padding:12px!important;border-radius:13px!important;
  }
  body.akv-rules-body .akv-rules-cheat-grid>article {
    padding:10px!important;gap:7px!important;
  }
  body.akv-rules-body .akv-rules-cta {
    gap:9px!important;padding:13px!important;border-radius:16px!important;
  }

  /* Profile and ranking: level + name + rating in a compact header. */
  body.akv-profile-page .cq-profile-hero {
    display:grid!important;
    grid-template-columns:58px minmax(0,1fr) 83px!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    gap:7px!important;
    min-height:0!important;
    margin-top:9px!important;
    padding:11px!important;
    border-radius:17px!important;
  }
  body.akv-profile-page .cq-level-orb {
    grid-column:1!important;grid-row:1!important;
    width:56px!important;height:56px!important;
    border-width:3px!important;font-size:1.24rem!important;
  }
  body.akv-profile-page .cq-level-orb::after {
    bottom:7px!important;font-size:.46rem!important;
  }
  body.akv-profile-page .cq-profile-copy {
    grid-column:2!important;grid-row:1!important;
  }
  body.akv-profile-page .cq-profile-copy h1 {
    margin:3px 0 6px!important;
    font-size:clamp(1.1rem,4.3vw,1.52rem)!important;
    line-height:1.16!important;overflow-wrap:anywhere;
  }
  body.akv-profile-page .cq-profile-rating {
    grid-column:3!important;grid-row:1!important;
    min-width:0!important;width:100%!important;
    justify-self:stretch!important;
    padding:6px 2px!important;border-radius:11px!important;
  }
  body.akv-profile-page .cq-profile-rating strong {font-size:1.18rem!important}
  body.akv-profile-page .cq-profile-rating small {font-size:.54rem!important}
  body.akv-profile-page .cq-profile-rank {
    grid-column:1/-1!important;grid-row:2!important;
    gap:8px!important;padding:6px 9px!important;
    border-radius:11px!important;
  }
  body.akv-profile-page .cq-profile-rank img {
    width:33px!important;height:33px!important;
  }
  body.akv-profile-page .cq-profile-rank strong {font-size:.87rem!important}
  body.akv-profile-page .akv-profile-highlights {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin:10px 0!important;
  }
  body.akv-profile-page .akv-stat-tile {
    min-width:0!important;padding:11px!important;
    border-radius:13px!important;
  }
  body.akv-profile-page .akv-stat-tile strong {
    font-size:1.33rem!important;
  }
  body.akv-profile-page .akv-avatar-editor {
    gap:9px!important;margin:10px 0!important;
    padding:11px!important;border-radius:14px!important;
  }
  body.akv-profile-page .akv-avatar-editor-copy p {font-size:.73rem!important}
  body.akv-profile-page .cq-meta-panel,
  body.akv-profile-page .cq-mode-stats-panel {
    padding:12px!important;border-radius:16px!important;
  }
  body.akv-profile-page .cq-meta-list {gap:6px!important;margin-top:9px!important}
  body.akv-profile-page .cq-meta-card,
  body.akv-profile-page .cq-achievement {
    padding:9px!important;border-radius:12px!important;
  }
  body.akv-profile-page .cq-mode-stats-grid {gap:8px!important;margin-top:9px!important}

  body.akv-leaderboard-page .akv-progression-intro {
    gap:9px!important;padding:13px!important;border-radius:17px!important;
  }
  body.akv-leaderboard-page .akv-progression-intro h1 {
    font-size:clamp(1.48rem,6.3vw,2.1rem)!important;
    line-height:1.12!important;
  }
  body.akv-leaderboard-page .akv-progression-intro p {
    margin-top:5px!important;font-size:.83rem!important;line-height:1.43!important;
  }
  body.akv-leaderboard-page .akv-progression-cta {gap:6px!important}
  body.akv-leaderboard-page .cq-profile-hero {
    grid-template-columns:54px minmax(0,1fr) 76px!important;
    gap:7px!important;
    min-height:0!important;
    padding:11px!important;
    margin-bottom:10px!important;
    border-radius:16px!important;
  }
  body.akv-leaderboard-page .cq-level-orb {
    grid-column:1!important;grid-row:1!important;
    width:52px!important;height:52px!important;
    font-size:1.23rem!important;
  }
  body.akv-leaderboard-page .cq-profile-copy {
    grid-column:2!important;grid-row:1!important;min-width:0!important;
  }
  body.akv-leaderboard-page .cq-profile-copy h1 {
    margin:3px 0 5px!important;
    font-size:clamp(1.04rem,4vw,1.45rem)!important;
    line-height:1.12!important;
    overflow-wrap:anywhere;
  }
  body.akv-leaderboard-page .cq-profile-rating {
    grid-column:3!important;grid-row:1!important;
    align-self:center!important;
    min-width:0!important;width:100%!important;
    justify-self:stretch!important;
    padding:7px 2px!important;
    border-radius:10px!important;
  }
  body.akv-leaderboard-page .cq-profile-rating strong {font-size:1.15rem!important}
  body.akv-leaderboard-page .cq-profile-rating small {font-size:.55rem!important}
  body.akv-leaderboard-page .akv-leaderboard-highlights {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;
    margin:10px 0!important;
  }
  body.akv-leaderboard-page .akv-stat-tile {
    padding:11px!important;border-radius:12px!important;min-width:0!important;
  }
  body.akv-leaderboard-page .akv-stat-tile strong {
    font-size:clamp(.94rem,4vw,1.32rem)!important;
    overflow-wrap:anywhere;
  }
  body.akv-leaderboard-page .cq-leaderboard-panel {
    padding:12px!important;border-radius:16px!important;
  }
  body.akv-leaderboard-page .cq-ranking-table {gap:5px!important;margin-top:8px!important}
  body.akv-leaderboard-page .cq-ranking-row {
    grid-template-columns:34px minmax(0,1fr) 61px!important;
    gap:6px!important;padding:8px!important;
    border-radius:10px!important;
  }
  body.akv-leaderboard-page .cq-ranking-rank {
    width:30px!important;height:30px!important;border-radius:9px!important;
  }

  /* Detailed result: shorter hero, unchanged statistics and actions. */
  body.akv-result-page .cq-result-hero {
    gap:9px!important;padding:13px!important;border-radius:17px!important;
  }
  body.akv-result-page .cq-result-hero-mark {
    width:40px!important;height:40px!important;
    border-radius:12px!important;font-size:1.1rem!important;
  }
  body.akv-result-page .cq-result-hero-copy h1 {
    font-size:clamp(1.65rem,6.5vw,2.2rem)!important;
    line-height:1.08!important;
  }
  body.akv-result-page .cq-result-hero-copy p {
    font-size:.83rem!important;line-height:1.42!important;
  }
  body.akv-result-page .cq-result-hero-actions {
    gap:7px!important;margin-top:5px!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.akv-result-page .cq-result-hero-actions a {min-height:44px!important;padding:6px!important}
  body.akv-result-page .akv-result-highlights {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;
  }
  body.akv-result-page .akv-stat-tile {padding:10px!important}
  body.akv-result-page .akv-podium-section {padding:11px!important}
  body.akv-result-page .cq-podium-card {
    padding:11px!important;border-radius:14px!important;
  }

  /* Question submission: less whitespace, inputs and answers retain touch sizes. */
  body.akv-question-submit-body .akv-question-submit-hero {
    grid-template-columns:37px minmax(0,1fr)!important;
    gap:9px!important;
    margin-top:4px!important;
    padding:12px!important;border-radius:16px!important;
  }
  body.akv-question-submit-body .akv-question-submit-hero-icon {
    width:36px!important;height:36px!important;font-size:1rem!important;border-radius:10px!important;
  }
  body.akv-question-submit-body .akv-question-submit-hero h1 {
    margin:2px 0!important;font-size:1.39rem!important;
  }
  body.akv-question-submit-body .akv-question-submit-hero p {
    font-size:.81rem!important;line-height:1.4!important;
  }
  body.akv-question-submit-body .akv-question-submit-page {gap:9px!important}
  body.akv-question-submit-body .akv-question-submit-layout {gap:9px!important}
  body.akv-question-submit-body .akv-question-step {
    grid-template-columns:29px minmax(0,1fr)!important;
    gap:6px!important;padding:10px!important;
  }
  body.akv-question-submit-body .akv-question-step-index {
    width:28px!important;height:28px!important;font-size:.78rem!important;
  }
  body.akv-question-submit-body .akv-question-step-copy {grid-column:2!important}
  body.akv-question-submit-body .akv-question-step-control {grid-column:1/-1!important}
  body.akv-question-submit-body .akv-question-step-copy h2 {font-size:.87rem!important}
  body.akv-question-submit-body .akv-question-step-copy p {
    margin-top:2px!important;font-size:.72rem!important;
  }
  body.akv-question-submit-body .akv-question-textarea {min-height:88px!important}
  body.akv-question-submit-body .akv-answer-row {gap:5px!important}
  body.akv-question-submit-body .akv-question-submit-footer {
    gap:7px!important;padding:10px!important;
  }
  body.akv-question-submit-body .akv-question-tips header {padding:10px!important}
  body.akv-question-submit-body .akv-question-tips article {
    margin:6px!important;padding:9px!important;border-radius:11px!important;
  }

  /* Legal/prize: retain all legal wording, compact the decorative cards. */
  body.akv-legal-body .akv-legal-page {
    padding:0 2px 32px!important;
  }
  body.akv-legal-body .akv-legal-hero {
    margin:7px 0!important;
    padding:13px!important;
    border-radius:16px!important;
  }
  body.akv-legal-body .akv-legal-hero h1 {
    margin:5px 0!important;font-size:clamp(1.5rem,6.2vw,2rem)!important;
  }
  body.akv-legal-body .akv-legal-hero p {
    margin:5px 0!important;line-height:1.45!important;
  }
  body.akv-legal-body .akv-legal-card {
    margin:8px 0!important;
    padding:13px!important;
    border-radius:15px!important;
  }
  body.akv-legal-body .akv-legal-card h2 {margin-bottom:7px!important}
  body.akv-legal-body .akv-legal-card p,
  body.akv-legal-body .akv-legal-card li {line-height:1.5!important}
  body.akv-legal-body .akv-legal-grid {gap:8px!important}
  body.akv-legal-body .akv-legal-grid article {padding:10px!important;border-radius:11px!important}
  body.akv-legal-body .akv-prize-podium {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
    margin-top:10px!important;
  }
  body.akv-legal-body .akv-prize-podium article {
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:center!important;
    gap:4px!important;
    min-width:0!important;
    padding:8px 3px!important;
    border-radius:11px!important;
    text-align:center!important;
  }
  body.akv-legal-body .akv-prize-podium b {
    width:27px!important;height:27px!important;font-size:.73rem!important;
  }
  body.akv-legal-body .akv-prize-podium strong {
    font-size:clamp(.79rem,3vw,1rem)!important;
  }
  body.akv-legal-body .akv-prize-total {gap:7px!important;padding:9px!important;border-radius:13px!important}

  /* Admin: prevent overly wide tables from destroying the page viewport. */
  body.cq-body:not(.cq-game-body) .akv-admin-summary-grid {gap:7px!important;margin-bottom:10px!important}
  body.cq-body:not(.cq-game-body) .akv-admin-summary-grid article {
    padding:9px!important;border-radius:12px!important;
    min-width:0!important;
  }
  body.cq-body:not(.cq-game-body) .akv-admin-summary-grid strong {
    font-size:1.29rem!important;
  }
  body.cq-body:not(.cq-game-body) .akv-admin-question-toolbar {
    gap:8px!important;padding:9px!important;border-radius:13px!important;
  }
  body.cq-body:not(.cq-game-body) .ui-datatable .ui-datatable-tablewrapper {
    max-width:100%!important;overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  body.cq-body:not(.cq-game-body) .akv-error-page {
    min-height:calc(100svh - 110px)!important;
    padding:10px 0!important;
  }
}
/* A narrow phone still has two compact statistics per line, not a horizontal
   scrollbar. Do not make labels or buttons unreadably small. */
@media(max-width:370px) {
  body.akv-profile-page .cq-profile-hero {
    grid-template-columns:50px minmax(0,1fr) 71px!important;
    gap:5px!important;padding:9px!important;
  }
  body.akv-profile-page .cq-level-orb {width:49px!important;height:49px!important}
  body.akv-leaderboard-page .cq-profile-hero {
    grid-template-columns:47px minmax(0,1fr) 67px!important;
    gap:5px!important;
  }
  body.akv-home-body .akv-home-actions {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.akv-home-body .akv-home-actions>.ui-button {
    padding-inline:4px!important;font-size:.75rem!important;
  }
}
