/* STARZ / ORBITAL SALVAGE — fixed viewport scene, isolated to /minigames. */
body.orbital-frigate-page {
  --frigate-void: #070a0d;
  --frigate-steel: #b8c0be;
  --frigate-signal: #e3474b;
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background-color: var(--frigate-void);
}

body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) > .aurora {
  z-index: -3;
  background: #070a0d !important;
}
body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) > .aurora::before,
body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) > .aurora::after { content: none !important; }
body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) > .grid-overlay {
  z-index: -1;
  opacity: .12 !important;
}

.orbital-frigate-scene {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 75% 23%, rgba(83, 28, 31, .2), transparent 39rem),
    linear-gradient(180deg, #070a0d 0%, #0b0e12 62%, #120e0e 100%);
}
.orbital-frigate-stars {
  position: absolute;
  inset: -8%;
  opacity: .66;
  background-image:
    radial-gradient(1px 1px at 7% 18%, #d5d2c7 98%, transparent),
    radial-gradient(1px 1px at 16% 72%, #c7c5bd 98%, transparent),
    radial-gradient(1.2px 1.2px at 24% 33%, #e5e1d6 98%, transparent),
    radial-gradient(1px 1px at 36% 11%, #b8c0bf 98%, transparent),
    radial-gradient(1.5px 1.5px at 48% 64%, #dfd9cc 98%, transparent),
    radial-gradient(1px 1px at 63% 26%, #d6d4ca 98%, transparent),
    radial-gradient(1px 1px at 76% 13%, #b9c0c1 98%, transparent),
    radial-gradient(1.3px 1.3px at 89% 53%, #dfd9cf 98%, transparent),
    radial-gradient(1px 1px at 95% 84%, #c7c5bd 98%, transparent);
  background-size: 443px 337px;
  animation: frigate-star-drift 110s linear infinite;
}
.orbital-frigate-stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 32% 48%, #eee5d3 98%, transparent),
    radial-gradient(1px 1px at 58% 87%, #d5d0c7 98%, transparent),
    radial-gradient(1px 1px at 83% 39%, #ded9ce 98%, transparent);
  background-size: 271px 229px;
  opacity: .52;
  animation: frigate-star-shimmer 7.6s ease-in-out infinite alternate;
}
.orbital-frigate-planet {
  position: absolute;
  z-index: 1;
  top: var(--frigate-planet-top, 50vh);
  left: 50%;
  width: 180vw;
  height: 120vh;
  transform: translateX(-50%);
  border-radius: 50%;
  overflow: hidden;
  opacity: .9;
  background: #321c1b;
  box-shadow: 0 -15px 48px rgba(201, 101, 68, .12);
}
.orbital-frigate-planet::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  border-top: 1px solid rgba(255, 192, 145, .44);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 174, 120, .34), rgba(239, 107, 73, .13) 3%, transparent 8%),
    linear-gradient(180deg, rgba(255, 206, 164, .11), rgba(22, 13, 14, .08) 8%, rgba(6, 8, 10, .42) 100%),
    linear-gradient(90deg, rgba(9, 11, 13, .24), transparent 25% 75%, rgba(9, 11, 13, .28));
  box-shadow: inset 0 2px 10px rgba(255, 193, 146, .15);
  pointer-events: none;
}
.orbital-frigate-planet img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: inherit;
  object-fit: cover;
  object-position: center 52%;
  filter: saturate(.91) contrast(1.12) brightness(.78);
}
.orbital-frigate-ship {
  position: absolute;
  z-index: 2;
  top: var(--frigate-ship-top, 180px);
  left: 50%;
  width: min(90vw, 980px, calc((var(--frigate-frame-height, 47vh) - 32px) * 1.4126));
  aspect-ratio: 962 / 681;
  transform: translateX(-50%);
  animation: frigate-drift 44s ease-in-out infinite alternate;
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, .48));
}
.orbital-frigate-ship::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 18%;
  right: 12%;
  bottom: 6%;
  height: 18%;
  background: radial-gradient(ellipse, rgba(177, 49, 42, .25), rgba(119, 35, 34, .08) 44%, transparent 72%);
  opacity: .65;
  animation: frigate-engine-breathe 8.5s ease-in-out infinite alternate;
}
.orbital-frigate-hull {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  filter: contrast(1.08) saturate(.82) brightness(.91)
    drop-shadow(0 1px 0 rgba(242, 230, 207, .18))
    drop-shadow(0 12px 22px rgba(0, 0, 0, .38));
}
.frigate-beacon {
  position: absolute;
  z-index: 2;
  display: block;
  width: clamp(4px, .48vw, 7px);
  height: clamp(4px, .48vw, 7px);
  border-radius: 50%;
  background: #ff514d;
  box-shadow: 0 0 3px 1px rgba(255, 64, 56, .86), 0 0 10px 4px rgba(234, 46, 40, .42);
  animation: frigate-beacon-pulse 4.8s ease-in-out infinite;
}
.frigate-beacon--bridge { left: 43.7%; top: 18.2%; animation-delay: -1.8s; }
.frigate-beacon--engine-roof { left: 81%; top: 30.3%; animation-delay: -.7s; }
.frigate-beacon--truss { left: 53.2%; top: 72.2%; animation-delay: -2.6s; }
.frigate-beacon--engine-belly { left: 81%; top: 73.8%; animation-delay: -3.4s; }
.frigate-window {
  position: absolute;
  z-index: 2;
  width: clamp(5px, .62vw, 9px);
  height: clamp(3px, .38vw, 5px);
  border-radius: 1px;
  background: #ffc17c;
  box-shadow: 0 0 4px 1px rgba(249, 151, 77, .55), 0 0 10px 2px rgba(225, 98, 49, .23);
  animation: frigate-window-flicker 8.2s ease-in-out infinite;
}
.frigate-window--forward { left: 7.3%; top: 48.5%; animation-delay: -2.4s; }
.frigate-window--midship { left: 19.2%; top: 57.2%; animation-delay: -5.1s; }
.frigate-engine-glow {
  position: absolute;
  z-index: 1;
  left: 96%;
  width: 5%;
  height: 10%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(220, 82, 43, .34), rgba(159, 46, 35, .12) 38%, transparent 74%);
  opacity: .54;
  animation: frigate-nozzle-breathe 7.4s ease-in-out infinite alternate;
}
.frigate-engine-glow--upper { top: 38%; }
.frigate-engine-glow--middle { top: 54%; animation-delay: -2.3s; }
.frigate-engine-glow--lower { top: 67%; animation-delay: -4.1s; }
.orbital-motion-toggle {
  position: fixed;
  z-index: 12;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 64px);
  padding: 9px 12px;
  border: 1px solid rgba(183, 193, 194, .35);
  border-radius: 2px;
  color: #d7d9d4;
  background: rgba(12, 16, 19, .82);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 5px 18px rgba(0,0,0,.32);
  font: 500 10px/1.2 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .04em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.orbital-motion-toggle:hover { border-color: #c84c50; color: #fff; }
.orbital-motion-toggle:focus-visible { outline: 2px solid #e35a5e; outline-offset: 3px; }

/* The foreground remains interactive while the orbit stays a fixed viewport
   plate. Preserve existing card art but let the hero and lobby reveal it. */
body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) .hero {
  background:
    linear-gradient(90deg, rgba(7,10,13,.88) 0%, rgba(7,10,13,.67) 36%, rgba(7,10,13,.22) 72%, rgba(7,10,13,.08) 100%) !important;
}
body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) .game-lobby {
  background:
    linear-gradient(90deg, rgba(11,15,18,.91), rgba(14,18,20,.76)) !important;
}
body.orbital-frigate-page .orbital-motion-toggle { position: fixed; }
body.orbital-frigate-page .orbital-frigate-scene,
body.orbital-frigate-page .orbital-frigate-scene * { pointer-events: none; }
.orbital-observation-deck {
  display: block;
  height: clamp(330px, 47vh, 560px);
  min-height: 330px;
  background: transparent;
  pointer-events: none;
}
body.orbital-frigate-page:is([class*="panel-"], [class*="bg-"], [class*="backdrop-"]) :is(.orbital-frigate-scene, .orbital-motion-toggle, .orbital-observation-deck) {
  display: none;
}

@keyframes frigate-drift {
  from { transform: translate3d(calc(-50% - 17px), 5px, 0); }
  to { transform: translate3d(calc(-50% + 17px), -8px, 0); }
}
@keyframes frigate-engine-breathe {
  from { opacity: .28; transform: scale(.94); }
  to { opacity: .72; transform: scale(1.04); }
}
@keyframes frigate-nozzle-breathe {
  from { opacity: .28; transform: translate(-50%, -50%) scale(.94); }
  to { opacity: .72; transform: translate(-50%, -50%) scale(1.04); }
}
@keyframes frigate-beacon-pulse {
  0%, 19%, 31%, 100% { opacity: .25; }
  23%, 27% { opacity: 1; }
}
@keyframes frigate-window-flicker {
  0%, 24%, 33%, 100% { opacity: .76; }
  27%, 30% { opacity: 1; }
  72% { opacity: .55; }
}
@keyframes frigate-star-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-22px, 10px, 0); }
}
@keyframes frigate-star-shimmer {
  from { opacity: .24; }
  to { opacity: .68; }
}
body.orbital-frigate-page.orbital-motion-paused .orbital-frigate-scene *,
body.orbital-frigate-page.orbital-motion-paused .orbital-frigate-scene *::before,
body.orbital-frigate-page.orbital-motion-paused .orbital-frigate-scene *::after,
body.orbital-frigate-page.orbital-motion-paused .orbital-frigate-scene {
  animation-play-state: paused !important;
}
@media (max-width: 767px) {
  .orbital-frigate-ship {
    width: min(90vw, 620px, calc((var(--frigate-frame-height, 43vh) - 32px) * 1.4126));
  }
  .orbital-frigate-planet {
    width: 220vw;
    height: 100vh;
    opacity: .84;
  }
  .orbital-frigate-planet img { object-position: center 50%; }
  .orbital-observation-deck {
    height: clamp(320px, 47vh, 440px);
    min-height: 320px;
  }
  body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) .hero {
    background: linear-gradient(180deg, rgba(7,10,13,.34), rgba(7,10,13,.53) 42%, rgba(7,10,13,.9) 100%) !important;
  }
  body.orbital-frigate-page:where(:not([class*="panel-"]):not([class*="bg-"]):not([class*="backdrop-"])) .game-lobby {
    background: rgba(11,15,18,.82) !important;
  }
  .orbital-motion-toggle { font-size: 9px; padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .orbital-frigate-scene *,
  .orbital-frigate-scene *::before,
  .orbital-frigate-scene *::after,
  .orbital-frigate-scene,
  .orbital-motion-toggle { animation: none !important; scroll-behavior: auto !important; }
}
