:root { color-scheme: light dark; }

body {
  container-type: inline-size;
  position: relative;
  margin: 0;
  box-sizing: border-box;
  display: grid;
  min-height: 100svh;
  background-color: var(--motion-canvas, Canvas);
  overflow-x: clip;
  color: CanvasText;
  font: 16px / 1.5 system-ui, sans-serif;
}

.about-disclosure,
.about-postcard,
.about-error {
  grid-area: 1 / 1;
}

.about-postcard {
  z-index: 0;
}

.about-postcard:not([hidden]) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.about-postcard .postcard .motion-table-camera {
  --motion-view-height: 100svh;
  --motion-scene-scale: min(
    var(--motion-width-scale),
    calc(100svh / var(--motion-resting-height))
  );
}

.about-postcard .motion-table-plane .motion-stage {
  flex: none;
  height: calc(100svh / var(--motion-scene-scale));
}

.about-error {
  align-self: start;
  z-index: 1;
  margin: 0;
  padding: 0.5rem 1rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.about-error:not([hidden]):has(+ .about-postcard[hidden]) {
  margin: auto;
  max-inline-size: min(100%, 60ch);
  box-sizing: border-box;
  text-align: center;
}
