@media (max-width: 920px) {
  .nav-toggle {
    display: grid;
  }

  .nav {
    position: absolute;
    top: 76px;
    right: 20px;
    left: 20px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: grid;
  }

  .nav a {
    border-radius: 12px;
  }

  .nav-account {
    margin-left: 0;
  }

  .account-button {
    width: 100%;
    justify-content: flex-start;
  }

  .account-menu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
  }

  .hero-layout,
  .split-grid,
  .settings-grid,
  .mode-grid,
  .profile-hero,
  .fun-game-grid,
  .fun-game-card.featured {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .lobby-grid {
    grid-template-columns: 1fr;
  }

  .vs {
    width: 82px;
    height: 82px;
  }

  .game-hud,
  .duel-hud {
    grid-template-columns: 1fr;
    left: 12px;
    right: 12px;
    top: 10px;
  }

  .hud-left,
  .hud-center,
  .hud-right {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hp-card {
    width: 100%;
    min-width: 0;
  }

  #guess-map-panel {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    height: 312px;
    border-radius: 20px;
  }

  #guess-map-panel:hover {
    width: auto;
    height: 312px;
  }

  #guess-map-panel.map-expanded,
  #guess-map-panel.map-expanded:hover {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    height: calc(100vh - 112px);
    transform: none;
  }

  #guess-map,
  #guess-map-panel:hover #guess-map {
    height: 232px;
  }

  #guess-map-panel.map-expanded #guess-map,
  #guess-map-panel.map-expanded:hover #guess-map {
    height: calc(100% - 70px);
  }

  .game-back {
    left: 12px;
    bottom: 338px;
  }

  .hint-panel {
    display: none;
  }

  .duel-status {
    bottom: 334px;
    border-radius: 18px;
  }

  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .section,
  .page-shell {
    padding: 44px 0;
  }

  .hero {
    padding: 48px 0;
  }

  .hero-actions,
  .button-row,
  .footer-inner,
  .fun-footer-inner,
  .fun-footer-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .mini-stats,
  .stats-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .streetguess-live-preview {
    min-height: 250px;
  }

  .fun-orbit-card {
    min-height: 300px;
  }

  .modal-card {
    padding: 20px;
  }

  #result-map {
    height: 280px;
  }

  .hud-pill {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .timer-pill {
    min-width: 96px;
    font-size: 1.1rem;
  }

  #guess-map-panel {
    height: 290px;
  }

  #guess-map-panel.map-expanded,
  #guess-map-panel.map-expanded:hover {
    height: calc(100vh - 102px);
  }

  #guess-map,
  #guess-map-panel:hover #guess-map {
    height: 210px;
  }

  #guess-map-panel.map-expanded #guess-map,
  #guess-map-panel.map-expanded:hover #guess-map {
    height: calc(100% - 70px);
  }

  .game-back,
  .duel-status {
    bottom: 314px;
  }
}
