/* Camera controls and high-quality full-screen capture surface. */
.story-camera-actions {
  position: absolute;
  z-index: 5;
  top: max(92px, calc(env(safe-area-inset-top) + 82px));
  right: 14px;
  display: grid;
  gap: 8px;
  width: 112px;
}

.story-camera-action {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 13px;
  color: #fff;
  background: rgba(8, 7, 12, .62);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .2);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.story-camera-action:first-letter {
  font-size: 18px;
}

.story-camera-action:hover,
.story-camera-action:focus-visible {
  border-color: rgba(255, 255, 255, .72);
  background: rgba(116, 69, 178, .82);
  outline: none;
}

.story-camera-action:disabled {
  cursor: not-allowed;
  opacity: .4;
}

.story-camera-action span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep the live preview and story playback edge-to-edge on every phone. */
.story-camera-stage video,
.story-viewer-card .story-media {
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@media (max-width: 520px) {
  .story-camera-actions {
    top: max(84px, calc(env(safe-area-inset-top) + 74px));
    right: 10px;
    width: 104px;
  }

  .story-camera-action {
    min-height: 40px;
    padding-inline: 7px;
    font-size: 11px;
  }
}
