/* Raket: garage, launch and hangar (needs /shared/base.css). */
body { background: #19205a; }
#garage, #hangar {
  background: radial-gradient(#fff 1.2px, transparent 1.6px) 0 0 / 70px 70px,
              radial-gradient(#fff 1px, transparent 1.4px) 33px 21px / 53px 53px,
              linear-gradient(#191e55, #502d7d);
}

/* --- garage ---------------------------------------------------------------------- */
#garage { display: grid; grid-template-columns: auto 1fr minmax(240px, 34vw); gap: clamp(8px, 1.4vw, 18px); }
.steps { display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; padding: 0 6px; --b: min(10.5vh, 6vw, 88px); }
.steps .round.small { --b: min(8.5vh, 5vw, 72px); }
.step { background: #fff; }
.step canvas { pointer-events: none; }
.bay { position: relative; min-width: 0; min-height: 0; }
.bay canvas.rocket { position: absolute; inset: 0; touch-action: none; }
.launch { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: #969fb0; --b: min(19vh, 150px); }
.launch:active { transform: translateX(-50%) scale(.92); }
.launch.ready { background: #46be5a; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.07); } }
.tray {
  background: rgba(255, 255, 255, .16); border-radius: 36px; padding: clamp(10px, 1.6vw, 20px);
  display: flex; flex-direction: column; justify-content: center; min-height: 0;
}
.cards { display: flex; flex-direction: column; gap: clamp(10px, 2vh, 22px); height: 100%; }
.card {
  flex: 1; min-height: 0; width: 100%; background: #ebf0ff; border-radius: 28px; border: 7px solid #fff;
  box-shadow: 0 6px 0 rgba(20, 10, 60, .35); touch-action: none;
}
.card.selected { border-color: var(--gold); }
.card canvas { pointer-events: none; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.6vw, 18px); justify-items: center; }
.swatch {
  width: min(11vh, 6.4vw, 90px); aspect-ratio: 1; border-radius: 50%;
  border: 5px solid #fff; box-shadow: 0 4px 0 rgba(20, 10, 60, .3);
}
.swatch.selected { box-shadow: 0 0 0 7px var(--gold), 0 4px 0 rgba(20, 10, 60, .3); }
.hint { display: flex; justify-content: center; padding-top: 4vh; animation: bob 1.6s ease-in-out infinite; }
.hint svg { width: min(18vh, 140px); height: min(18vh, 140px); }
@keyframes bob { 50% { transform: translateY(-10px); } }
.hint.hidden { display: none; }
.fxlayer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.floating { position: fixed; left: 0; top: 0; width: 200px; height: 200px; pointer-events: none; z-index: 20; }

@media (orientation: portrait) {
  #garage { grid-template-columns: 1fr; grid-template-rows: auto 1fr minmax(180px, 26vh); }
  .steps { flex-direction: row; padding: 6px 0; --b: min(8.5vw, 7vh, 84px); }
  .steps .round.small { --b: min(7vw, 6vh, 70px); }
  .cards { flex-direction: row; }
  .swatches { grid-template-columns: repeat(8, 1fr); }
  .hint { display: none !important; }
}

/* --- launch ------------------------------------------------------------------------ */
#launch { padding: 0; }
#launch canvas { position: absolute; inset: 0; touch-action: none; }
#launch .home, #launch .garage { position: absolute; left: max(14px, env(safe-area-inset-left)); --b: min(9vh, 74px); }
#launch .home { top: max(14px, env(safe-area-inset-top)); }
#launch .garage { top: calc(max(14px, env(safe-area-inset-top)) + min(9vh, 74px) + 22px); }

/* --- hangar ------------------------------------------------------------------------ */
#hangar { display: flex; flex-direction: column; gap: 14px; }
#hangar header { display: flex; align-items: center; justify-content: space-between; --b: min(10vh, 84px); }
#hangar .title svg { width: min(13vh, 110px); height: min(13vh, 110px); }
#hangar .grid {
  flex: 1; overflow-y: auto; touch-action: pan-y; display: grid; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 40vw), 1fr)); gap: clamp(12px, 2vw, 26px); padding: 6px;
}
#hangar .card { aspect-ratio: 5 / 6; flex: none; }
#hangar .empty { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: 10vh; opacity: .5; }
#hangar .empty svg { width: 30vmin; height: 30vmin; }
