.camera-view {
  position: absolute;
  z-index: 5;
  top: clamp(8px, 1.9%, 23px);
  right: clamp(7px, 1.7%, 28px);
  width: clamp(161px, 15.5vw, 232px);
  max-height: calc(100% - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 6px 4px;
  border: 1px solid #625a48;
  background: var(--grain), #eee4cd;
  color: #302e26;
  box-shadow: 2px 2px 0 #75685048;
  font-family: var(--jp);
  cursor: default;
  touch-action: auto;
}
.camera-view.folded { width: max-content; padding-bottom: 0 }
.view-toggle {
  display: flex;
  width: 100%;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 3px;
  background: transparent;
  border: 0;
  color: inherit;
  font: 600 clamp(12px, .89vw, 17px)/1.25 var(--jp);
  text-align: left;
}
.view-toggle i { width: 14px; height: 14px; display: grid; place-items: center }
.view-toggle i::before,.view-toggle i::after { content: ''; grid-area: 1 / 1; width: 9px; height: 1px; background: currentColor }
.view-toggle[aria-expanded=false] i::after { transform: rotate(90deg) }
.view-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #282722;
  border: 1px solid #4b4537;
}
.view-frame video,.view-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: scaleX(-1);
  pointer-events: none;
}
.view-status { margin: 5px 2px 2px; font: 600 clamp(11px, .82vw, 15px)/1.34 var(--jp); overflow-wrap: anywhere }
.view-meters { padding: 0 2px }
.view-meter {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 5px;
  margin: 4px 0;
  font: clamp(10px, .72vw, 13px)/1.15 var(--jp);
}
.view-meter b { font-family: Arial, sans-serif; font-variant-numeric: tabular-nums; font-weight: 500 }
.view-meter i { grid-column: 1 / -1; position: relative; height: 3px; background: #cabda4 }
.view-meter em { position: absolute; inset-block: 0; background: #477572 }
.view-meter[data-signed=true] i::after { content: ''; position: absolute; left: 50%; top: -1px; width: 1px; height: 5px; background: #463d2f }
.camera-view details { margin: 4px 2px 0; border-top: 1px solid #ad9f84; font: clamp(10px, .74vw, 13px)/1.45 var(--jp) }
.camera-view summary { cursor: pointer; padding: 4px 0 2px; font-weight: 600 }
.camera-view details p { margin: 2px 0; overflow-wrap: anywhere }
.camera-view :is(button,summary):focus-visible { outline: 2px solid #426c68; outline-offset: -2px }
.flight-page:is([data-phase=takeoff],[data-phase=fly],[data-phase=land]) .camera-view { top: clamp(34px, 8%, 68px); max-height: calc(100% - 72px) }
.clean .camera-view,.plate-only .camera-view { display: none }
@media(max-width:640px) and (orientation:portrait) {
  .camera-view { width: clamp(116px, 35.5vw, 166px); padding-inline: 4px; right: 4px; top: 6px }
  .view-toggle { min-height: 29px; font-size: 12px }
}
@media(max-height:520px) and (orientation:landscape) {
  .camera-view { width: clamp(117px, 20dvh + 52px, 152px); top: 4px; right: 6px }
  .view-toggle { min-height: 23px }
  .view-status { margin-top: 2px }
  .view-meter { margin-block: 2px }
  .flight-page:is([data-phase=takeoff],[data-phase=fly],[data-phase=land]) .camera-view { top: 23px; max-height: calc(100% - 27px) }
}
