@media (max-width: 900px) {
  .app-shell {
    width: min(680px, calc(100% - 28px));
  }

  .start-screen {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 8px 0 22px;
  }

  .start-copy {
    text-align: center;
  }

  .start-copy h1,
  .start-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .eyebrow {
    margin-top: 26px;
  }

  .preview-cards {
    justify-content: center;
    margin-top: 24px;
    padding: 0;
  }

  .setup-card {
    width: min(100%, 460px);
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .home-link {
    top: 11px;
    left: 11px;
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .app-shell {
    width: min(100% - 20px, 520px);
    padding: 11px 0 18px;
  }

  .start-screen {
    gap: 14px;
    padding-top: 0;
  }

  .start-copy .brand {
    margin-top: 2px;
  }

  .start-copy h1 {
    font-size: clamp(2.75rem, 14vw, 4.2rem);
  }

  .eyebrow {
    margin-top: 18px;
    margin-bottom: 9px;
  }

  .start-lead {
    margin-top: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .preview-cards {
    display: none;
  }

  .setup-card {
    padding: 18px;
    border-radius: 23px;
  }

  .setup-card__header {
    padding-bottom: 13px;
  }

  .mode-picker {
    gap: 7px;
    margin: 13px 0;
  }

  .mode-option {
    min-height: 57px;
    padding: 8px 11px;
  }

  .game-header {
    min-height: 44px;
    margin-bottom: 8px;
  }

  .brand--compact .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand--compact > span:last-child {
    display: none;
  }

  .game-actions {
    gap: 6px;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .game-meta {
    gap: 6px;
    margin-bottom: 6px;
  }

  .stat-card {
    min-height: 51px;
    padding: 7px 9px;
  }

  .stat-card span {
    font-size: 0.59rem;
  }

  .stat-card strong {
    font-size: 1.16rem;
  }

  .status-line {
    margin-bottom: 6px;
    font-size: 0.7rem;
  }

  .memory-board {
    gap: 6px;
  }

  .game-screen[data-mode="easy"] .memory-board {
    --board-max: 360px;
  }

  .game-screen[data-mode="medium"] .memory-board {
    --columns: 5;
    --board-max: 410px;
  }

  .game-screen[data-mode="hard"] .memory-board {
    --columns: 5;
    --board-max: 410px;
  }

  .memory-card__back {
    grid-template-columns: repeat(2, 6px);
    grid-template-rows: repeat(2, 6px);
    gap: 4px;
  }

  .match-check {
    right: 3px;
    bottom: 3px;
    width: 19px;
    height: 19px;
    border-width: 1px;
    font-size: 0.64rem;
  }

  .game-dialog {
    width: min(100% - 20px, 370px);
    padding: 26px 21px;
  }
}

@media (max-width: 350px) {
  .mode-option {
    grid-template-columns: 29px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mode-best {
    font-size: 0.6rem;
  }
}

@media (max-height: 700px) and (min-width: 621px) {
  .app-shell {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .game-header {
    margin-bottom: 7px;
  }

  .game-meta {
    margin-bottom: 5px;
  }

  .status-line {
    margin-bottom: 5px;
  }

  .game-screen[data-mode="hard"] .memory-board {
    --board-max: 540px;
  }
}

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