@media (max-width: 370px) {
  .screen {
    overflow-y: auto;
  }

  .screen {
    padding-inline: 10px;
  }

  .fab {
    width: 50px;
    height: 50px;
  }

  .fab-sound {
    right: 66px;
  }

  .btn,
  .btn-xl {
    font-size: 1rem;
  }

  .task-options {
    grid-template-columns: 1fr;
  }

  .mascot {
    width: 210px;
    height: 210px;
  }
}

@media (min-width: 600px) {
  .screen {
    padding-inline: 24px;
  }

  .world-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  #btn-back-map-result {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .screen {
    padding-top: calc(92px + env(safe-area-inset-top, 0px));
  }

  .hero-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  #start-mascot {
    width: 430px;
    height: 430px;
    max-width: 44vw;
    max-height: 44vw;
  }

  .game-main {
    grid-template-columns: 300px 1fr;
  }

  .task-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-actions .btn {
    flex: 0 0 auto;
    min-width: 220px;
  }
}

@media (max-width: 768px) {
  .screen {
    padding-inline: 12px;
  }

  .game-hud {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "back stars"
      "center center";
    gap: 8px;
    padding: 10px;
  }

  #btn-back-map {
    grid-area: back;
    width: 100%;
    min-height: 52px;
  }

  .hud-center {
    grid-area: center;
  }

  .hud-stars {
    grid-area: stars;
    justify-self: end;
    font-size: 1.28rem;
  }

  .game-main {
    gap: 10px;
  }

  .mascot-panel {
    padding: 8px;
  }

  #game-mascot {
    width: 180px;
    height: 180px;
  }

  .speech-bubble {
    max-width: 100%;
    font-size: 1.02rem;
  }

  .challenge-panel {
    padding: 12px;
  }

  .challenge-head {
    flex-direction: column;
    align-items: stretch;
  }

  #btn-repeat {
    width: 100%;
    min-height: 52px;
    font-size: 1.02rem;
  }

  .task-visual {
    min-height: 128px;
    margin-bottom: 12px;
    font-size: clamp(1.4rem, 9vw, 2.25rem);
  }

  .task-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .option-btn {
    min-height: 84px;
    font-size: clamp(1.35rem, 8vw, 2rem);
  }
}

@media (orientation: landscape) and (max-width: 920px) {
  .screen {
    overflow-y: auto;
  }

  .screen {
    padding-top: calc(74px + env(safe-area-inset-top, 0px));
  }

  .hero-layout {
    grid-template-columns: 280px 1fr;
    align-items: center;
  }

  .game-main {
    grid-template-columns: 220px 1fr;
  }

  .mascot {
    width: 230px;
    height: 230px;
    max-width: 34vw;
    max-height: 34vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-height: 820px) {
  .screen {
    overflow-y: auto;
  }
}
