/* Rocket Ladoo Launch — flagship responsive/device pass (2026-09-09) */

/* Respect notches, rounded corners and mobile browser chrome without changing
   the portrait game-world coordinate system. */
.hud {
  padding-top: max(10px, env(safe-area-inset-top));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-left: max(12px, env(safe-area-inset-left));
}

.screen {
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

/* Flagship interaction floor: all primary controls are comfortably tappable. */
.hud-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}

.btn,
.auth-link,
.nn-nudge-signup,
.nn-nudge-later {
  min-height: 44px;
  touch-action: manipulation;
}

.nn-nudge-signup {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Long how-to / leaderboard states must remain usable on short phones and
   landscape tablets instead of disappearing beyond the viewport. */
.panel {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  overflow: hidden;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

/* Previously the identity skin hid sign-in state entirely on phones. Keep the
   account affordance, but compact it so PLAY stays above the fold. */
@media (max-width: 560px) {
  #screen-start .auth-row {
    display: flex;
    width: 100%;
    margin-top: 7px;
    gap: 4px;
    color: #ecd0a0;
  }

  #screen-start .auth-status {
    color: #ecd0a0;
    font-size: 10px;
  }

  #screen-start .auth-link {
    color: #ffd792;
    font-size: 11px;
    padding: 5px 10px;
  }

  #screen-start .controls-hint {
    display: none;
  }
}

/* Live powerups were previously invisible except for a world-space shield ring.
   A compact second HUD row gives the player actionable state without clutter. */
.power-status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  margin-top: 4px;
  pointer-events: none;
}

.power-status.hidden {
  display: none !important;
}

.power-chip {
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(16,24,58,.78);
  color: #fff;
  font: 700 10px/1.2 var(--mono);
  letter-spacing: .08em;
  box-shadow: 0 3px 10px rgba(0,0,0,.24);
}

.power-chip.shield {
  border-color: rgba(41,231,255,.58);
  color: #9ff5ff;
}

.power-chip.magnet {
  border-color: rgba(138,91,255,.62);
  color: #d4c2ff;
}

/* Keep all HUD information legible on narrow devices without shrinking hit
   targets below 44px. */
@media (max-width: 380px) {
  .hud { padding-right: max(7px, env(safe-area-inset-right)); padding-left: max(7px, env(safe-area-inset-left)); }
  .hud-row, .hud-group { gap: 4px; }
  .hud-value { font-size: 18px; }
  .hud-label { font-size: 7px; letter-spacing: 1px; }
  .fuel-chip { font-size: 12px; padding: 4px 6px; }
  .power-chip { font-size: 9px; padding: 3px 6px; }
}

@media (max-height: 700px) {
  .screen { align-items: flex-start; }
  .panel { margin: auto; }
  #screen-gameover .panel,
  #screen-how .panel { padding-top: 16px; padding-bottom: 16px; }
}

@media (orientation: landscape) and (pointer: coarse) and (max-height: 600px) {
  #frame { height: 100dvh; max-height: 100dvh; }
  .screen { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .panel { max-height: calc(100dvh - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .hud,
  .hud-btn,
  .btn { transition: none !important; }
}
