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

  .start-screen {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 16px 0 26px;
  }

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

  .eyebrow {
    margin-top: 30px;
  }

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

  .rule-sketch {
    display: none;
  }

  .setup-card {
    width: min(470px, 100%);
    margin-inline: 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: 18px;
    padding-top: 5px;
  }

  .brand {
    font-size: 0.7rem;
  }

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

  .eyebrow {
    margin-top: 19px;
  }

  .start-copy h1 {
    margin-top: 7px;
    font-size: clamp(3.2rem, 16vw, 4.8rem);
  }

  .start-lead {
    max-width: 350px;
    margin-top: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
  }

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

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

  .setup-fieldset {
    margin-top: 11px;
  }

  .setup-option {
    min-height: 54px;
    padding: 7px 8px;
  }

  .setup-option--wide {
    gap: 7px;
  }

  .setup-option svg {
    width: 21px;
    height: 21px;
  }

  .setup-option--level {
    min-height: 45px;
  }

  .setup-option--level {
    gap: 6px;
  }

  .primary-button {
    margin-top: 14px;
  }

  .game-header {
    min-height: 48px;
    padding-bottom: 8px !important;
  }

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

  .game-actions {
    gap: 6px;
  }

  .match-bar {
    grid-template-columns: 1fr auto 1fr;
    gap: 5px;
    margin: 8px auto 7px;
  }

  .player-card,
  .turn-status {
    min-height: 54px;
    border-radius: 12px;
  }

  .player-card {
    gap: 6px;
    padding: 6px 7px;
  }

  .player-swatch {
    width: 7px;
    height: 25px;
  }

  .player-card small {
    font-size: 0.48rem;
  }

  .player-card strong {
    max-width: 62px;
    overflow: hidden;
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-card b {
    font-size: 1.45rem;
  }

  .turn-status {
    min-width: 92px;
    padding: 6px 8px;
  }

  .turn-status strong {
    max-width: 82px;
    overflow: hidden;
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .turn-status small {
    font-size: 0.5rem;
  }

  .turn-status__dot {
    top: 6px;
    left: 6px;
    width: 6px;
    height: 6px;
  }

  .board-stage {
    padding: 7px;
    border-radius: 18px;
  }

  .game-screen[data-size="3"] .board-stage { width: min(330px, 100%); }
  .game-screen[data-size="5"] .board-stage { width: min(375px, 100%); }
  .game-screen[data-size="7"] .board-stage { width: 100%; }

  .dots-board {
    padding: 3px;
    border-radius: 12px;
  }

  .board-box {
    margin: 2px;
  }

  .game-footer {
    margin-top: 4px;
  }

  .game-footer p {
    max-width: 72%;
  }
}

@media (max-width: 360px) {
  .app-shell {
    width: calc(100% - 16px);
  }

  .setup-card {
    padding: 14px;
  }

  .setup-option--wide small {
    display: none;
  }

  .setup-option--center strong {
    font-size: 1rem;
  }

  .setup-option--level {
    flex-direction: column;
    gap: 2px;
  }

  .level-bars {
    display: none;
  }

  .player-card strong {
    max-width: 48px;
  }

  .turn-status {
    min-width: 84px;
  }
}

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

  .match-bar {
    margin-top: 10px;
    margin-bottom: 8px;
  }

  .game-screen[data-size="7"] .board-stage {
    width: min(520px, 100%);
  }
}

@media (max-height: 760px) and (min-width: 881px) {
  .app-shell {
    padding-block: 12px;
  }

  .eyebrow {
    margin-top: 34px;
  }

  .start-copy h1 {
    font-size: clamp(4rem, 7vw, 5.8rem);
  }

  .rule-sketch {
    width: 100px;
    height: 100px;
    margin-top: 30px;
  }

  .sketch-line--top,
  .sketch-line--bottom {
    width: 88px;
  }

  .sketch-line--left,
  .sketch-line--right {
    height: 88px;
  }
}

@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;
  }
}
