html.dui-surface,
html.dui-surface body {
  min-height: 100%;
  overflow: auto;
  background: #111213;
}

.preview-stage {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 100vh;
  padding: 8px;
}

.bed-bezel {
  position: relative;
  width: min(100%, 1177px, calc((100dvh - 70px) * 1.48545));
  min-width: 650px;
  aspect-ratio: 1634 / 1100;
  background: url('./bezel.png') 50% 73.3333% / 110.1591% 113.6364% no-repeat;
}

.bed-screen {
  position: absolute;
  inset: 9.5455% 6.4871%;
  container-type: inline-size;
}

.bed-screen .monitor {
  width: 100%;
  height: 100%;
  font-size: clamp(9px, 1.17cqw, 12px);
}

.bed-screen .primary-value { font-size: clamp(58px, 9.375cqw, 96px); }
.bed-screen .saturation .primary-value { font-size: clamp(54px, 8.6cqw, 88px); }
.bed-screen .pressure-values strong { font-size: clamp(28px, 4.68cqw, 48px); }

.bezel-key {
  position: absolute;
  z-index: 2;
  top: calc((var(--key-y) - 110) * 100% / 1100);
  left: calc((var(--key-x) - 83) * 100% / 1634);
  width: max(32px, 4.15%);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.bezel-key:hover,
.bezel-key:focus-visible {
  outline: 2px solid #ffbda3;
  outline-offset: 2px;
}

.bezel-key:active { background: #eec3ab38; }
.bezel-power { --key-x: 139; --key-y: 305; }
.bezel-pressure { --key-x: 139; --key-y: 470; }
.bezel-audio { --key-x: 139; --key-y: 636; }
.bezel-reset { --key-x: 139; --key-y: 813; }
.bezel-select { --key-x: 139; --key-y: 1005; }

.bezel-info,
.bezel-trend,
.bezel-exit {
  --key-y: 1160;
  width: 12%;
  min-height: 30px;
  aspect-ratio: 3.1;
  border-radius: 6px;
}

.bezel-info { --key-x: 505; }
.bezel-trend { --key-x: 900; }
.bezel-exit { --key-x: 1295; }

.preview-reopen {
  display: grid;
  width: 100%;
  min-height: 70vh;
  place-items: center;
}

.preview-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  max-width: 100%;
  color: #ece5e2;
  font: 600 13px/1.3 system-ui, sans-serif;
}

.preview-actions :is(select, button),
.preview-reopen button {
  min-height: 38px;
  padding: 5px 10px;
  border: 1px solid #786259;
  border-radius: 6px;
  background: #231b18;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.preview-actions :is(select, button):focus-visible,
.preview-reopen button:focus-visible {
  outline: 2px solid #ffbda3;
  outline-offset: 2px;
}
