/* MIT License: see LICENSE at project root. */
/* Het brede smalschermblok overschrijft regels uit meerdere onderdelen. Het laadt
   daarom als laatste; eerder inladen verandert de cascade. Smallere mediaqueries
   staan bij het onderdeel waar ze bij horen. */

@media (max-width: 720px) {
  .topbar {
    padding: 0.7rem 0.95rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand-sub {
    display: none;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-meta {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
  }

  main {
    padding: 1.1rem 0.85rem 1.6rem;
  }

  .hero,
  .panel-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .panel-toggle {
    display: flex;
  }

  .mobile-show-games #lobby-panel {
    display: none;
  }

  .mobile-show-lobby #games-panel {
    display: none;
  }

  .viewing-board main {
    max-width: 100%;
    padding: 0.75rem 0.6rem 1rem;
    padding-top: 0.6rem;
  }

  .viewing-board .topbar {
    display: none;
  }

  .viewing-board #board-panel {
    padding: 0.85rem;
  }

  .viewing-board .board-actions-wrapper button {
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
  }

  .viewing-board .board-detail {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .viewing-board .board-view {
    order: -1;
    padding: 0.6rem;
    min-height: 60vh;
  }

  .viewing-board .board-summary {
    margin-bottom: 0;
    padding: 0.75rem;
  }

  .viewing-board.current-game-mobile main {
    height: 100dvh;
    padding: 0;
  }

  .viewing-board.current-game-mobile #board-panel {
    min-height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--game-surface);
  }

  .viewing-board.current-game-mobile #board-panel .section-header,
  .viewing-board.current-game-mobile .board-summary {
    display: none;
  }

  .viewing-board.current-game-mobile #log-section {
    display: none;
  }

  .viewing-board.current-game-mobile .board-detail {
    min-height: 100dvh;
    gap: 0;
  }

  .viewing-board.current-game-mobile .board-view {
    min-height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
}
