/* Scoped player for threebodyorbits.com orbit embeds. */

.threebody-orbit {
  --tbo-bg: #100d0c;
  --tbo-ink: #fff4f0;
  --tbo-muted: rgba(255, 244, 240, 0.62);
  --tbo-credit-pad: 1.3rem; /* 0.55 + 0.75 */
  --tbo-credit-line: calc(0.78rem * 1.35);
  --tbo-credit-height: calc(var(--tbo-credit-pad) + var(--tbo-credit-line));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 1.6em 0;
  background: var(--tbo-bg);
  border-radius: 12px;
  overflow: hidden;
  color: var(--tbo-ink);
  max-width: 100%;
}

.threebody-orbit,
.threebody-orbit * {
  box-sizing: border-box;
}

/* Platzhalter vor JS: 1:1-Bühne + Credit-Zeile, damit der Artikel nicht springt. */
.threebody-orbit::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: none;
  background: var(--tbo-bg);
}

.threebody-orbit::after {
  content: "";
  display: block;
  height: var(--tbo-credit-height);
  flex: none;
}

.threebody-orbit:has(> .threebody-orbit__stage)::before,
.threebody-orbit:has(> .threebody-orbit__credit)::after,
.threebody-orbit.is-error::before,
.threebody-orbit.is-error::after {
  content: none;
  display: none;
}

.threebody-orbit__stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: none;
  margin: 0;
  background: var(--tbo-bg);
}

.threebody-orbit canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.threebody-orbit__credit {
  margin: 0;
  padding: 0.55rem 0.85rem 0.75rem;
  min-height: var(--tbo-credit-height);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--tbo-muted);
}

.threebody-orbit__credit a {
  color: var(--tbo-ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.threebody-orbit.is-error {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
}

.threebody-orbit.is-error p {
  margin: 0;
  color: var(--tbo-muted);
}
