@media (max-width: 767.98px), (pointer: coarse) {
  .game-shell {
    gap: 7px;
    padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom));
  }

  .game-topbar {
    min-height: 48px;
    padding-left: 52px !important;
  }

  .brand-kicker,
  .utility-button span {
    display: none;
  }

  .utility-button {
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .game-card {
    border-radius: 20px;
  }

  .hud {
    min-height: 52px;
    grid-template-columns: 0.8fr 1fr 1.35fr 1.85fr;
  }

  .hud-stat {
    flex-direction: column;
    gap: 2px;
    padding: 6px 5px;
  }

  .hud-stat--best {
    display: none;
  }

  .hud-stat--hull {
    justify-content: center;
  }

  .hud-stat--energy {
    align-items: stretch;
    gap: 5px;
  }

  .hud-stat strong {
    font-size: 0.8rem;
    text-align: center;
  }

  .hud-stat > span:first-child {
    font-size: 0.53rem;
  }

  .hull-pips {
    gap: 2px;
  }

  .hull-pips i {
    width: 7px;
    height: 13px;
    border-width: 1px;
  }

  .stage-wrap {
    width: 100%;
    height: clamp(212px, 64vw, 250px);
    min-height: 0;
    aspect-ratio: auto;
  }

  .game-overlay {
    padding: 9px;
  }

  .overlay-panel {
    padding: 16px;
    border-radius: 18px;
  }

  .overlay-panel h2 {
    font-size: clamp(1.55rem, 8vw, 2.35rem);
  }

  .overlay-copy {
    display: none;
  }

  .enemy-strip {
    display: none;
  }

  .enemy-strip > span {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    padding: 4px 2px;
  }

  .enemy-strip b {
    font-size: 0.48rem;
  }

  .quick-rules {
    margin-bottom: 9px;
  }

  .quick-rules span {
    flex-direction: column;
    gap: 1px;
    padding: 6px 3px;
  }

  .quick-rules b,
  .quick-rules small {
    font-size: 0.49rem;
  }

  .primary-button {
    min-width: 160px;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .upgrade-options {
    gap: 6px;
    margin-top: 9px;
  }

  .upgrade-card {
    min-height: 105px;
    padding: 10px;
    border-radius: 13px;
  }

  .upgrade-card__group {
    margin-bottom: 10px;
    font-size: 0.48rem;
  }

  .upgrade-card__key {
    top: 8px;
    right: 8px;
    width: 19px;
    height: 19px;
  }

  .upgrade-card strong {
    font-size: 0.82rem;
  }

  .upgrade-card small {
    margin-top: 5px;
    font-size: 0.49rem;
    line-height: 1.2;
  }

  .upgrade-card__rank {
    padding-top: 6px;
    font-size: 0.5rem;
  }

  .game-footer {
    min-height: 35px;
    padding: 5px 9px;
  }

  .game-footer p {
    font-size: 0.61rem;
  }

  .keyboard-hint {
    display: none;
  }

  .touch-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 374.98px) {
  .brand-lockup h1 {
    font-size: 1.15rem;
  }

  .home-link {
    top: 10px;
    left: 10px;
    width: 42px;
    height: 42px;
  }

  .game-topbar {
    padding-left: 47px !important;
  }

  .stage-wrap {
    height: 212px;
  }

  .overlay-panel {
    padding: 12px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 0.52rem;
  }

  .enemy-strip i {
    width: 22px;
    height: 22px;
  }

  .touch-controls button {
    min-width: 50px;
    min-height: 50px;
  }
}

@media (min-width: 768px) and (max-height: 760px) {
  .game-shell {
    padding-block: 8px;
  }

  .game-topbar {
    min-height: 44px;
  }

  .game-card {
    width: min(940px, 100%);
    margin-inline: auto;
  }

  .hud {
    min-height: 48px;
  }
}
