.form3d {
  position: relative;
  min-width: 0;
  margin: 24px 0;
  text-align: center;
}
.vis3d-scene {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(
    110% 85% at 50% 30%,
    #fffdf8 0%,
    #f1ebde 60%,
    #e2d8c4 100%
  );
}
.vis3d-laerred {
  display: block;
  width: 100%;
  height: 420px;
  touch-action: none;
  cursor: grab;
}
.vis3d-laerred:active {
  cursor: grabbing;
}
.vis3d-laerred:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.vis3d-maerke {
  position: absolute;
  top: 16px;
  left: 18px;
  font:
    500 12px "IBM Plex Mono",
    monospace;
  color: #6e6a62;
  background: rgba(255, 255, 255, 0.7);
  padding: 5px 9px;
  border-radius: 999px;
  pointer-events: none;
}
.vis3d-segment {
  display: inline-flex;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  margin-top: 16px;
  border-radius: 14px;
  background: rgba(35, 32, 27, 0.06);
}
.vis3d-segment button {
  background: transparent;
  color: var(--tekst);
  box-shadow: none;
  padding: 10px 16px;
}
.vis3d-segment button[aria-pressed="true"] {
  background: white;
  color: #23201b;
  box-shadow: 0 2px 8px #23201b14;
}
.vis3d-maal {
  margin: 14px 0 4px;
  font-size: 13px;
}
.vis3d-hjaelp {
  margin: 0;
  font-size: 13px;
}
.vis3d-fejl {
  padding: 24px 16px;
}
.kort3d-laerred {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 680px;
  height: 520px;
  pointer-events: none;
}
.kortbillede3d {
  background: #f1ebde;
}
@media (max-width: 767px) {
  .vis3d-laerred {
    height: 310px;
  }
}
@media (prefers-color-scheme: dark) {
  .vis3d-scene {
    background: radial-gradient(
      110% 85% at 50% 30%,
      #2b2925 0%,
      #25231f 60%,
      #1f1d1a 100%
    );
  }
  .vis3d-maerke {
    color: #beb6a9;
    background: rgba(0, 0, 0, 0.25);
  }
  .vis3d-segment {
    background: rgba(255, 255, 255, 0.07);
  }
}

@media (min-width: 900px) {
  /* Bredde/højde holder lange emner store med plads til hele rotationen. */
  .form3d {
    max-width: 588px;
    margin-inline: auto;
  }
  .form-visning {
    display: grid;
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: 24px;
    margin-block: 24px;
    align-items: stretch;
  }
  .form-visning > .form3d {
    max-width: none;
    width: 100%;
    margin: 0;
  }
  .form-visning > section:not(.form3d) {
    min-width: 0;
  }
  .form-visning > section:not(.form3d) > h2 {
    margin-top: 0;
  }
  .form-visning .vis3d-laerred,
  .form-visning .ark {
    height: 460px;
  }
}
