.result-viewer {
  box-sizing: border-box;
  width: min(680px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 52px 12px 12px;
  border: 0;
  border-radius: 16px;
  background: var(--cream, #efe7da);
  color: var(--ink, #263c32);
}
.result-viewer::backdrop { background: rgb(20 28 24 / 78%); }
.result-viewer img {
  display: block;
  width: 100%;
  height: min(70dvh, calc(100dvh - 150px));
  object-fit: contain;
}
.result-viewer button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 22px;
}
.result-viewer .viewer-close { position: absolute; top: 5px; right: 8px; }
.viewer-controls { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 8px; }
.viewer-controls button[aria-disabled="true"] { opacity: .45; }

/* Let the treatment use all available space beside the session count. */
body #resultater #gallery .facts {
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 14px 24px;
  align-items: start;
}
body #resultater #gallery .facts > div {
  min-width: 0;
  max-width: none;
  overflow-wrap: break-word;
}
body #resultater #gallery .facts > .case-treatment {
  grid-column: 1;
  grid-row: 1;
  text-align: left;
}
body #resultater #gallery .facts > .case-treatment:only-child {
  grid-column: 1 / -1;
}
body #resultater #gallery .facts > .case-sessions {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}
body #resultater #gallery .facts > .case-timing {
  grid-column: 1 / -1;
  text-align: left;
}
@media(max-width:800px){
  body #resultater #gallery .facts{column-gap:18px}
}
