/* Orbit Rumble's hangar, gear and arena: its own deep space (game-hub-D27, approved 2026-10-13 "B with a hangar").
   The engine's space colour, each ship's own accent (--ship, from SHOOTER_DATA) and light that glows instead of ink. */

body[data-screen="smenu"],
body[data-screen="sgear"],
body[data-screen="shooter"] {
  background:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 50%, transparent 60%), radial-gradient(1.2px 1.2px at 78% 9%, #fff 50%, transparent 60%),
    radial-gradient(1.6px 1.6px at 64% 42%, #cfe3ff 50%, transparent 60%), radial-gradient(1.1px 1.1px at 30% 66%, #fff 50%, transparent 60%),
    radial-gradient(1.3px 1.3px at 88% 78%, #fff 50%, transparent 60%), radial-gradient(1px 1px at 46% 92%, #fff 50%, transparent 60%),
    radial-gradient(1.2px 1.2px at 6% 48%, #fff 50%, transparent 60%), radial-gradient(1px 1px at 92% 36%, #cfe3ff 50%, transparent 60%),
    radial-gradient(120% 70% at 75% 10%, #27306b 0, #0d1336 45%, #04050d 100%) fixed;
  color-scheme: dark;
}
body[data-screen="smenu"] main,
body[data-screen="sgear"] main { width: min(520px, 100% - 32px); min-height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; padding: 14px 0 20px; margin-top: 0; }

.orbit-home,
#screen-shooter {
  --ship: #fde047;
  --glass: rgb(255 255 255 / 0.07);
  --glass-line: rgb(255 255 255 / 0.18);
  color: #e8ecff;
  font-family: "Fredoka", system-ui, sans-serif;
}
.orbit-home { flex: 1; gap: 12px; }
:is(.orbit-home, #screen-shooter) :is(.back, .coins, .glass, .pill, .hud-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  min-width: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--glass-line);
  border-radius: 999px;
  outline: 0;
  background: var(--glass);
  color: #fff;
  box-shadow: none;
  font: 600 16px/1 "Fredoka", system-ui, sans-serif;
  translate: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:is(.orbit-home, #screen-shooter) :is(.icon-btn, .fs-btn, .hud-btn) { width: 42px; padding: 0; }
:is(.orbit-home, #screen-shooter) :is(.back, .glass, .pill, .hud-btn):active { transform: scale(0.95); }
:is(.orbit-home, #screen-shooter) .coin { width: 18px; height: 18px; box-shadow: 0 0 10px rgb(253 224 71 / 0.7); }
:is(.orbit-home, #screen-shooter) :is(button, [tabindex]):focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; }
/* the frame's gear beside the Tacs, a glass disc like the hangar's arrows (game-hub-D123) */
.orbit-home .topbar-right { gap: 8px; }
.orbit-home .frame-gear svg { width: 22px; height: 22px; }
.orbit-title { margin: 2px 0 0; color: #fff; font: 700 clamp(26px, 7.5vw, 32px)/1 "Fredoka", system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; text-shadow: 0 0 14px rgb(56 189 248 / 0.55), 0 0 2px #fff; }
.orbit-title-sm { font-size: clamp(22px, 6vw, 26px); }

/* The bay: the chosen ship on a ring of light, arrows either side; a swipe changes it too. */
.bay { position: relative; display: flex; justify-content: space-between; align-items: center; flex: 1 1 150px; min-height: 130px; max-height: 260px; touch-action: pan-y; user-select: none; }
.bay-ship { position: absolute; inset: 0 44px; display: grid; place-items: center; }
.bay-ship svg { position: absolute; inset: 0; width: 100%; height: 100%; max-height: 260px; margin: auto; overflow: visible; }
.bay-ring { fill: none; stroke: #38bdf8; stroke-opacity: 0.55; stroke-width: 2; filter: drop-shadow(0 0 6px #38bdf8); }
.bay-pool { fill: rgb(56 189 248 / 0.12); }
.bay-flame path { fill: var(--ship); filter: blur(4px); }
.bay-flame .core { fill: #fff; filter: blur(2px); }
.bay-flame { opacity: 0.9; animation: flame 0.18s ease-in-out infinite alternate; }
.bay-hull path { fill: var(--ship); stroke: #fff; stroke-opacity: 0.6; stroke-width: 0.5; stroke-linejoin: round; filter: drop-shadow(0 0 0.6px var(--ship)) drop-shadow(0 0 1.4px var(--ship)); }
.bay-craft { animation: hover 2.6s ease-in-out infinite; }
@keyframes hover { 50% { translate: 0 -6px; } }
@keyframes flame { to { scale: 1 1.18; opacity: 0.6; } }
.bay-ship.from-r svg { animation: from-r 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.bay-ship.from-l svg { animation: from-l 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes from-r { from { translate: 60px 0; opacity: 0; } }
@keyframes from-l { from { translate: -60px 0; opacity: 0; } }
.bay-arr { position: relative; z-index: 1; width: 42px; height: 42px; border: 1.5px solid rgb(255 255 255 / 0.3); border-radius: 50%; background: none; color: #fff; font: 600 24px/1 "Fredoka", system-ui, sans-serif; padding: 0 0 3px; -webkit-tap-highlight-color: transparent; }
.bay-arr:active { background: var(--glass); }

.shipinfo { display: grid; justify-items: center; gap: 6px; text-align: center; }
.shipinfo b { color: var(--ship); font: 700 26px/1 "Fredoka", system-ui, sans-serif; text-shadow: 0 0 12px color-mix(in srgb, var(--ship), transparent 50%); }
.shipinfo small { color: #b9c2ec; font-size: 14px; }
.ship-stats { display: flex; justify-content: center; gap: 26px; margin-top: 4px; }
.st { display: grid; justify-items: center; gap: 5px; }
.st svg { width: 30px; height: 30px; }
.st svg path { fill: var(--ship); stroke: #fff; stroke-opacity: 0.5; stroke-width: 1; stroke-linejoin: round; filter: drop-shadow(0 0 4px var(--ship)); }
.st-bar { display: flex; gap: 3px; }
.st-bar i { width: 9px; height: 5px; border-radius: 3px; background: rgb(255 255 255 / 0.16); }
.st-bar i.on { background: var(--ship); box-shadow: 0 0 6px var(--ship); }
.st-name { color: #9aa6d8; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.bay-dots { display: flex; gap: 8px; margin-top: 2px; }
.bay-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 0.25); }
.bay-dots i.on { background: var(--ship); box-shadow: 0 0 8px var(--ship); }

/* Two match cards, each one tap; the quick one glows in the ship's colour. */
.matches { display: grid; gap: 10px; }
.mcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1.5px solid rgb(255 255 255 / 0.16); border-radius: 18px; background: rgb(255 255 255 / 0.05); color: #fff; font: inherit; text-align: left; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 0.08s; }
.mcard:active { transform: scale(0.98); }
.mcard.hot { border-color: var(--ship); background: color-mix(in srgb, var(--ship), transparent 93%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ship), transparent 60%) inset, 0 0 22px color-mix(in srgb, var(--ship), transparent 78%); }
.mc-ic { display: flex; align-items: center; justify-content: center; flex: none; width: 52px; height: 48px; border: 1.5px solid var(--glass-line); border-radius: 14px; background: var(--glass); }
.mc-ic .ship-svg { width: 26px; height: 26px; }
#brawl-ic .ship-svg { width: 15px; height: 15px; margin: 0 -1px; }
.mc-text { display: grid; gap: 2px; min-width: 0; }
.mc-text b { font-size: 19px; font-weight: 700; }
.mc-text small { color: #9aa6d8; font-size: 13.5px; }
.mc-go { margin-left: auto; padding: 11px 16px; border-radius: 12px; background: var(--ship); color: #1a1405; box-shadow: 0 0 16px color-mix(in srgb, var(--ship), transparent 55%); font-size: 17px; font-weight: 700; }
.orbit-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; }
.orbit-foot .orbit-gear-btn { width: 42px; padding: 0; font-size: 20px; }
.orbit-foot .orbit-gear-btn { margin-left: auto; }
.orbit-home .online-btn { align-self: center; }

/* The gear. */
.orbit-sheet { display: grid; gap: 14px; padding: 16px; border: 1.5px solid var(--glass-line); border-radius: 22px; background: rgb(255 255 255 / 0.05); text-align: left; }
.orbit-sheet .label { color: #9aa6d8; }
.orbit-sheet .seg { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.orbit-sheet .seg button { min-width: 64px; padding: 9px 14px; border: 1.5px solid var(--glass-line); border-radius: 999px; outline: 0; background: var(--glass); color: #fff; box-shadow: none; font: 600 16px/1 "Fredoka", system-ui, sans-serif; transform: none; }
.orbit-sheet .seg button:hover { transform: none; box-shadow: none; }
.orbit-sheet .seg button[aria-pressed="true"] { border-color: var(--ship); background: color-mix(in srgb, var(--ship), transparent 85%); color: #fff; box-shadow: 0 0 14px color-mix(in srgb, var(--ship), transparent 60%); transform: none; }
.ship2-picks button { min-width: 0; padding: 8px 12px; }
.ship2-picks .ship-svg { width: 26px; height: 26px; }

/* The controls are rings of light under the thumbs: a stick whose knob glows in the ship's colour, fire in the ship's
   colour, the special in cyan with its name. */
#screen-shooter .pad { align-items: center; padding: 6px 4px 0; }
.duel-stick { position: relative; flex: none; display: grid; place-items: center; width: 118px; height: 118px; border: 1.5px solid rgb(255 255 255 / 0.28); border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.07) 0, rgb(255 255 255 / 0.02) 70%); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.duel-stick.held { border-color: color-mix(in srgb, var(--ship), transparent 40%); box-shadow: 0 0 18px color-mix(in srgb, var(--ship), transparent 70%); }
.duel-stick i { width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff7c2, var(--ship) 60%); box-shadow: 0 0 18px color-mix(in srgb, var(--ship), transparent 40%); pointer-events: none; }
.duel-stick:not(.held) i { transition: translate 0.12s ease-out; }
#screen-shooter .duel-btns { align-items: flex-end; gap: 14px; }
#screen-shooter .act-btn.special, #screen-shooter .act-btn.attack { display: grid; place-items: center; padding: 0; border-radius: 50%; box-shadow: none; translate: none; font-family: "Fredoka", system-ui, sans-serif; }
#screen-shooter .act-btn.attack { width: 86px; height: 86px; border: 2px solid var(--ship); background: color-mix(in srgb, var(--ship), transparent 88%); color: var(--ship);
  box-shadow: 0 0 22px color-mix(in srgb, var(--ship), transparent 65%); font-size: 1.6rem; font-weight: 700; }
#screen-shooter .act-btn.special { width: 62px; height: 62px; border: 2px solid #38bdf8; background: rgb(56 189 248 / 0.1); color: #38bdf8;
  box-shadow: 0 0 16px rgb(56 189 248 / 0.3); font-size: 0.8rem; font-weight: 600; }
#screen-shooter .act-btn.held { transform: scale(0.93); filter: brightness(1.3); }
#screen-shooter .keys-hint { color: #b9c2ec; }

/* The tall arena (an upright phone): the screen is exactly the viewport, and the arena takes the room the topbar, the
   hint and the pad leave, so the pad never falls below the screen. A canvas box a little off the arena's shape is
   letterboxed by the engine. */
body[data-screen="shooter"] main:has(#screen-shooter.tall:not([hidden])) { height: 100dvh; min-height: 0; }
#screen-shooter.tall:not([hidden]) { display: flex; flex-direction: column; min-height: 0; }
#screen-shooter.tall .stage { flex: 1 1 0; min-height: 0; display: flex; justify-content: center; }
#screen-shooter.tall .stage canvas { width: auto; height: 100%; max-width: 100%; }

/* The arena's overlay (pause, a round's end, the match's end) in the arena's own dark glass, not the hub's paper card.
   Play in the player's ship colour; the Hangar in glass. */
#shooter-overlay { background: rgb(4 5 13 / 0.9); backdrop-filter: blur(8px); color: #fff; text-align: center; }
#shooter-overlay .overlay-title { color: #fff; text-transform: uppercase; letter-spacing: 0.05em; font-size: clamp(1.45rem, 7vw, 2.3rem); text-shadow: 0 0 18px color-mix(in srgb, var(--won, var(--ship)), transparent 30%), 0 0 2px #fff; }
#shooter-overlay .overlay-text { color: #c9d0f2; }
#shooter-overlay .overlay-text b { color: #fff; }
.overlay-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#shooter-overlay .play-btn { min-width: 0; padding: 14px 22px; border: 0; border-radius: 16px; background: var(--ship); color: #1a1405; box-shadow: 0 0 20px color-mix(in srgb, var(--ship), transparent 50%); font: 700 1.15rem/1 "Fredoka", system-ui, sans-serif; }
#screen-shooter .alt-btn { padding: 14px 22px; border: 1.5px solid var(--glass-line); border-radius: 16px; background: var(--glass); color: #fff; font: 700 1.15rem/1 "Fredoka", system-ui, sans-serif; cursor: pointer; }
#screen-shooter .alt-btn:active { transform: scale(0.95); }
/* A round's end (the target page's "Round won"): see-through, so the winner's loop through its ring stays in view
   above the words, which sit low in the arena. --won is the winner's colour as the arena draws it. */
#shooter-overlay.round { justify-content: flex-end; gap: 8px; padding: 14px 12px 6%; backdrop-filter: none;
  background: radial-gradient(circle at 50% 27%, color-mix(in srgb, var(--won), transparent 84%) 0, transparent 34%), linear-gradient(to bottom, transparent 42%, rgb(4 5 13 / 0.78) 78%); }
#shooter-overlay.round .overlay-text { margin: 0 0 4px; font: 600 0.95rem/1.35 "Fredoka", system-ui, sans-serif; }
/* The tall arena is narrower than its stage: the overlay takes the arena's width (the stage's height times the arena's
   400:640, SHOOTER_DATA.PORTRAIT), so its buttons never hang past the arena's edges. */
#screen-shooter.tall .stage { position: relative; container-type: size; }
#screen-shooter.tall #shooter-overlay { inset: 0 auto 0 50%; width: min(100cqw, 100cqh * 0.625); translate: -50% 0; box-sizing: border-box; }
#screen-shooter.tall #shooter-overlay .play-btn, #screen-shooter.tall .alt-btn { padding: 12px 16px; font-size: 1.05rem; }

/* A short phone: the bay gives up room first. */
@media (max-height: 700px) {
  .duel-stick { width: 100px; height: 100px; }
  .duel-stick i { width: 44px; height: 44px; }
  #screen-shooter .act-btn.attack { width: 74px; height: 74px; }
  #screen-shooter .act-btn.special { width: 56px; height: 56px; }
  .orbit-home { gap: 8px; }
  .bay { min-height: 100px; }
  .mcard { padding: 9px 12px; }
  .mc-ic { height: 42px; }
  .ship-stats { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bay-craft, .bay-flame, .bay-ship.from-r svg, .bay-ship.from-l svg { animation: none; }
}
