/*! Solar System Repair Co. | Source: https://orbitalforest.com */
/* Portrait notices use the empty upper world, clear of the walking strip.
   Flight notices also clear the route and instrument panels. */
body:has(#game-shell[data-ui-layout="portrait"]) #toast {
  top: calc(76px + var(--safe-top)); bottom: auto;
  width: max-content; max-width: min(280px, calc(100% - 40px));
  padding: 6px 8px; border-width: 2px; border-radius: 4px;
  font-size: 12px; line-height: 1.35; text-align: center;
  box-shadow: 0 2px 8px #0008;
}
body:has(#game-shell[data-ui-layout="portrait"][data-scene="workshop"]) #toast:not(:empty) {
  --workshop-frame-size: 6px;
  border-width: 6px; border-image-width: 6px;
}
body:has(#game-shell[data-ui-layout="portrait"]:is([data-scene="flight"], [data-scene="return"])) #toast {
  top: calc(192px + var(--safe-top));
}
#game-shell[data-ui-layout="portrait"] #flight-impact-alert {
  top: min(calc(50% + 52px), calc(100% - 160px));
  width: min(260px, calc(100% - 48px));
  font-size: 11px; line-height: 1.35;
}

@media (max-aspect-ratio: 4/5) {
  /* Reuse the decoded illustration as a quiet full-screen backdrop. The
     sharper, smaller foreground is panned around each ship's measured bounds.
     Both layers share one URL; no extra artwork or download is needed. */
  #mission-launch-card picture::before {
    content: ""; position: absolute; inset: -18px;
    background: var(--launch-art-image, none) center / cover no-repeat;
    filter: blur(16px) brightness(.48); opacity: .9;
  }
  #mission-launch-card #launch-art-image {
    position: absolute; width: var(--launch-art-width); height: auto;
    max-width: none; max-height: none;
    left: var(--launch-art-left); top: var(--launch-art-top);
    mask-image: linear-gradient(90deg, transparent, #000 6% 94%, transparent), linear-gradient(0deg, transparent, #000 12% 90%, transparent);
    mask-composite: intersect;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6% 94%, transparent), linear-gradient(0deg, transparent, #000 12% 90%, transparent);
    -webkit-mask-composite: source-in;
  }
  #mission-launch-card::after {
    background: linear-gradient(0deg, #020810f2, #020810a6 22%, transparent 58%);
  }
  #mission-launch-card .launch-caption {
    padding: 12px; bottom: max(16%, 104px);
  }
  #mission-launch-card .launch-caption h1 { margin: 8px 0; }
}
