.camera-capture-manager,
.camera-capture-manager *,
.camera-capture-native,
.camera-capture-native *,
.camera-capture-editor,
.camera-capture-editor * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
body.camera-capture-manager-active,
body.camera-capture-manager-active * {
  user-select: none !important;
  -webkit-user-select: none !important;
}
body.camera-capture-manager-active { overflow: hidden; }
.camera-capture-manager[hidden],
.camera-capture-native[hidden],
.camera-capture-editor[hidden] {
  display: none !important;
}
.camera-capture-native {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 11, 16, 0.24);
}
.camera-capture-native section {
  width: min(100%, 360px);
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: #243044;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.camera-capture-native p { margin: 0 0 18px; line-height: 1.6; }
.camera-capture-native button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #cbd3df;
  border-radius: 10px;
  background: #f4f6f9;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.camera-capture-manager {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  /* 相机框固定在左侧、垂直居中：缩放原点锚定左边缘，向右展开，左侧永不遮挡 */
  place-items: center start;
  padding: 20px;
  user-select: none;
  -webkit-user-select: none;
}
.camera-capture-manager__scrim {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  background: rgba(8, 11, 16, 0.24);
  backdrop-filter: blur(2px);
  color: transparent;
  cursor: default;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.camera-capture-manager__scrim:hover,
.camera-capture-manager__scrim:active,
.camera-capture-manager__scrim:focus,
.camera-capture-manager__scrim:focus-visible {
  background: rgba(8, 11, 16, 0.24);
  box-shadow: none;
  color: transparent;
  outline: none;
}
.camera-capture-manager__panel {
  --camera-offset-x: 0px;
  --camera-offset-y: 0px;
  --camera-scale: 2.2;
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: calc(100vw - 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(140% 120% at 12% 0%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 48%),
    linear-gradient(165deg, rgba(38, 44, 56, 0.96), rgba(18, 20, 27, 0.96));
  color: rgba(255, 255, 255, 0.92);
  padding: 16px 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translate(var(--camera-offset-x), var(--camera-offset-y)) scale(var(--camera-scale));
  /* 缩放原点锚定左边缘：面板从左侧向右展开，靠左时左半边不会被推出屏幕 */
  transform-origin: left center;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2,.8,.2,1);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.camera-capture-manager__panel.is-visible {
  opacity: 1;
}
.camera-capture-manager__top,
.camera-capture-manager__bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 2px;
}
.camera-capture-manager__top {
  padding-bottom: 8px;
  cursor: move;
}
.camera-capture-manager__bottom {
  padding-top: 8px;
}
.camera-capture-manager__zoom {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 18px;
}
.camera-capture-manager__zoom::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 18px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}
.camera-capture-manager__rotate {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 18px;
}
.camera-capture-manager__rotate::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 18px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
}
.camera-capture-manager__rotate .camera-capture-manager__icon-btn {
  font-size: 20px;
  line-height: 1;
}
.camera-capture-manager__group-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.camera-capture-manager__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 64px;
  white-space: nowrap;
}
.camera-capture-manager__frame-value {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.camera-capture-manager__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
}
.camera-capture-manager__video-wrap {
  position: relative;
  /* Stable viewport; each camera image is fitted inside without distortion. */
  width: 400px;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  margin: 6px 0;
  background: #0c1117;
  border-radius: 0;
  cursor: default;
  transition: transform 0.15s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.camera-capture-manager__video-wrap::after,
.camera-capture-manager__video-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  pointer-events: none;
  z-index: 2;
}
.camera-capture-manager__video-wrap::after {
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.camera-capture-manager__video-wrap::before {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.camera-capture-manager__video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.camera-capture-manager__preview-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.camera-capture-manager__image-region {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
/* The image's contain rectangle is shared by rendering and tap-to-focus. */
.camera-capture-manager__status {
  width: 100%;
  min-height: 18px;
  margin: -2px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}
.camera-capture-manager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}
.camera-capture-manager__btn:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.14));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px) scale(1.03);
}
.camera-capture-manager__btn:active {
  transform: translateY(0) scale(0.98);
}
.camera-capture-manager__btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}
.camera-capture-manager__btn.is-active {
  background: rgba(255, 255, 255, 0.75);
  color: #15181f;
}
.camera-capture-manager__icon-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  padding: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}
.camera-capture-manager__brightness {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 150px;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
  cursor: default;
}
.camera-capture-manager__brightness span {
  font-size: 14px;
  opacity: 0.75;
}
.camera-capture-manager__brightness input {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  outline: none;
}
.camera-capture-manager__brightness input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #f5f7fb;
  box-shadow: 0 0 0 3px rgba(16, 20, 28, 0.25);
  cursor: pointer;
}
.camera-capture-manager__brightness input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #f5f7fb;
  box-shadow: 0 0 0 3px rgba(16, 20, 28, 0.25);
  cursor: pointer;
}
.camera-capture-manager__capture {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 50%;
  border-color: rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #ffffff, #e9eef4);
  color: #15181f;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.camera-capture-manager__capture:hover {
  background: linear-gradient(180deg, #ffffff, #f2f4f7);
}
.camera-capture-manager__capture-symbol {
  width: 18px;
  height: 14px;
  border-radius: 4px;
  background: #15181f;
  position: relative;
}
.camera-capture-manager__capture-symbol::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -4px;
  height: 4px;
  border-radius: 3px 3px 0 0;
  background: #15181f;
}
.camera-capture-manager__capture-symbol::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #f5f7fb;
}
.camera-capture-manager__flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.camera-capture-editor {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  /* 与相机预览框同一位置：贴左 20px、垂直居中（≤680px 移动端仍为全屏布局） */
  padding: 24px 24px 24px 20px;
  background: rgba(8, 11, 16, 0.65);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: flex-start;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
  /* Allow the ratio strip to scroll; crop gestures opt out on the stage itself. */
  touch-action: manipulation;
}
.camera-capture-editor.visible {
  display: flex;
}
.camera-capture-editor__card {
  width: min(95vw, 1080px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  background:
    radial-gradient(140% 120% at 12% 0%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 48%),
    linear-gradient(165deg, rgba(38, 44, 56, 0.96), rgba(18, 20, 27, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.camera-capture-editor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.camera-capture-editor__title {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.camera-capture-editor__body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 0;
}
/* 图片右侧的直接触控区：不再套一层卡片，避免无意义留白。 */
.camera-capture-editor__rail {
  flex: 0 0 68px;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  max-height: 100%;
  overflow: hidden;
  scrollbar-width: thin;
}
.camera-capture-editor__stage {
  position: relative;
  width: min(82vw, 840px);
  aspect-ratio: 16 / 9;
  background: #0c1117;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  touch-action: none;
}
.camera-capture-editor__image {
  max-width: 100%;
  max-height: 100%;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.camera-capture-editor__image[hidden],
.camera-capture-editor__loupe[hidden] { display: none; }
.camera-capture-editor__loupe {
  position: absolute;
  top: 8px;
  width: 120px;
  height: 120px;
  border: 2px solid #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .5);
  z-index: 4;
  pointer-events: none;
}
.camera-capture-editor__crop {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  cursor: move;
  touch-action: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  will-change: transform, width, height;
  overflow: hidden;
}
.camera-capture-editor__crop .crop-handle {
  position: absolute;
  width: var(--crop-handle-size, 32px);
  height: var(--crop-handle-size, 32px);
  border-radius: 50%;
  background: transparent;
  border: 0;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.18s ease, transform 0.16s ease;
  touch-action: none;
}
.camera-capture-editor__crop .crop-handle::before {
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: #ffd54a;
  border: 2px solid #171b22;
  box-shadow: 0 0 0 2px white;
  pointer-events: none;
}
.camera-capture-editor__crop.is-adjusting .crop-handle,
.camera-capture-editor__crop:hover .crop-handle {
  opacity: 1;
}
.camera-capture-editor__crop.is-adjusting {
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.36), 0 0 0 3px rgba(255, 255, 255, 0.2);
}
.camera-capture-editor__crop.is-targeting:not(.is-adjusting) {
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(255, 255, 255, 0.16);
}
.camera-capture-editor__crop.is-adjusting .crop-handle.active {
  filter: brightness(1.2);
}
.camera-capture-editor__crop .crop-handle.tl {
  top: 2px;
  left: 2px;
  cursor: nwse-resize;
}
.camera-capture-editor__crop .crop-handle.tr {
  top: 2px;
  right: 2px;
  cursor: nesw-resize;
}
.camera-capture-editor__crop .crop-handle.bl {
  bottom: 2px;
  left: 2px;
  cursor: nesw-resize;
}
.camera-capture-editor__crop .crop-handle.br {
  bottom: 2px;
  right: 2px;
  cursor: nwse-resize;
}
/* ---- 高亮选区样式（上下裁剪与自由裁剪共用黄色高亮） ---- */
.camera-capture-editor__crop.is-accent {
  border: 2px solid #ffd54a;
  border-radius: 6px;
  box-shadow:
    0 0 0 9999px rgba(6, 9, 14, 0.52),
    0 0 0 2px rgba(255, 213, 74, 0.3),
    0 2px 18px rgba(255, 213, 74, 0.28);
}
/* 上下裁剪模式里角点归并为上下边把手 */
.camera-capture-editor__crop.is-band .crop-handle { cursor: ns-resize; }
/* 上下两个大把手：显眼、易抓取（两种模式都显示） */
.camera-capture-editor__crop .crop-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: max(0px, min(84px, calc(100% - 2 * var(--crop-handle-size, 32px) - 12px)));
  height: min(44px, calc(50% - 4px));
  overflow: hidden;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  touch-action: none;
}
.camera-capture-editor__crop.is-accent .crop-bar { display: flex; }
.camera-capture-editor__crop .crop-bar--t { top: 2px; }
.camera-capture-editor__crop .crop-bar--b { bottom: 2px; }
.camera-capture-editor__crop .crop-bar::before {
  content: "";
  width: 70%;
  max-width: 64px;
  height: 12px;
  border-radius: 999px;
  background: #ffd54a;
  border: 2px solid #171b22;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  transition: transform 0.16s ease;
}
.camera-capture-editor__crop .crop-bar.active::before { transform: scaleY(1.28); }
.camera-capture-editor__crop.is-accent.is-adjusting {
  border-color: #ffe08a;
  box-shadow:
    0 0 0 9999px rgba(6, 9, 14, 0.44),
    0 0 0 3px rgba(255, 213, 74, 0.45),
    0 2px 22px rgba(255, 213, 74, 0.4);
}
.camera-capture-editor__crop.is-accent.is-targeting:not(.is-adjusting) {
  border-color: #ffe08a;
  box-shadow:
    0 0 0 9999px rgba(6, 9, 14, 0.48),
    0 0 0 2px rgba(255, 213, 74, 0.35),
    0 2px 18px rgba(255, 213, 74, 0.3);
}
/* 选区条上的比例标签（顶部居中，避开四个内收的角点） */
.camera-capture-editor__band-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(10, 13, 18, 0.78);
  color: #ffd54a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
}
/* ---- 高度比例快捷条（右侧控制栏内竖排，一排一个） ---- */
.camera-capture-editor__ratios {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 68px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.camera-capture-editor__ratios.hidden-mode {
  display: none;
}
.camera-capture-editor__ratios-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.camera-capture-editor__ratios button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  min-height: 48px;
  padding: 10px 6px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.camera-capture-editor__ratios button:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.camera-capture-editor__ratios button.active {
  background: #ffd54a;
  border-color: transparent;
  color: #171b22;
  box-shadow: 0 0 0 2px rgba(255, 213, 74, 0.28);
}
.camera-capture-editor__ratios button.active:hover {
  background: #ffe08a;
  color: #171b22;
}
/* ---- ↑/↓ 微调按钮（右侧控制栏内） ---- */
.camera-capture-editor__nudge {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 10px;
}
.camera-capture-editor__nudge button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(10, 13, 18, 0.74);
  color: #ffd54a;
  font: inherit;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.camera-capture-editor__nudge button:hover {
  background: rgba(255, 213, 74, 0.92);
  color: #171b22;
}
.camera-capture-editor__nudge button:active {
  transform: scale(0.92);
}
.camera-capture-editor__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.camera-capture-editor__action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.camera-capture-editor__action:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.camera-capture-editor__action.is-active {
  border-color: transparent;
  background: #ffd54a;
  color: #171b22;
  box-shadow: 0 0 0 2px rgba(255, 213, 74, 0.24);
}
.camera-capture-editor__action.is-active:hover {
  background: #ffe08a;
}
.camera-capture-editor__action--primary {
  min-height: 48px;
  padding: 9px 18px;
  border-color: transparent;
  background: #1f5eff;
  color: #fff;
}
.camera-capture-editor__action--primary [data-editor-save-label] {
  line-height: 1.2;
}
.camera-capture-editor__action--primary:hover {
  background: #184fe0;
}

.camera-capture-manager.is-compact {
  padding: 0;
}
.camera-capture-manager.is-compact .camera-capture-manager__scrim {
  display: none;
}
.camera-capture-manager.is-compact .camera-capture-manager__panel {
  --camera-offset-x: 0px !important;
  --camera-offset-y: 0px !important;
  --camera-scale: 1 !important;
  width: 100vw;
  max-width: 100vw;
  height: 100vh; /* Fallback for embedded browsers without dynamic viewport units. */
  height: 100dvh;
  border-radius: 0;
  padding: calc(env(safe-area-inset-top) + 4px) 4px calc(env(safe-area-inset-bottom) + 4px);
  justify-content: flex-start;
  gap: 4px;
}
.camera-capture-manager.is-compact .camera-capture-manager__top {
  padding: 0;
  gap: 4px;
  flex-wrap: wrap;
  cursor: default;
}
.camera-capture-manager.is-compact .camera-capture-manager__group-label,
.camera-capture-manager.is-compact .camera-capture-manager__frame-value { font-size: 14px; }
.camera-capture-manager.is-phone .camera-capture-manager__group-label { display: none; }
.camera-capture-manager.is-phone .camera-capture-manager__frame { min-width: 40px; }
.camera-capture-manager.is-compact .camera-capture-manager__video-wrap {
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
}
.camera-capture-manager.is-compact .camera-capture-manager__content {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}
/* 触屏紧凑布局将空间优先分配给取景框。 */
.camera-capture-manager.is-compact .camera-capture-manager__bottom {
  padding: 0;
  gap: 10px;
}
.camera-capture-manager.is-compact .camera-capture-manager__brightness {
  min-width: 0;
}
.camera-capture-manager.is-compact .camera-capture-manager__capture {
  width: 44px;
  height: 44px;
  min-height: 44px;
}
.camera-capture-editor.is-compact {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
.camera-capture-editor.is-compact .camera-capture-editor__card {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  padding: calc(env(safe-area-inset-top) + 4px) 4px calc(env(safe-area-inset-bottom) + 4px);
  gap: 4px;
}
.camera-capture-editor.is-compact .camera-capture-editor__body {
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.camera-capture-editor.is-compact .camera-capture-editor__stage {
  order: 1;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  aspect-ratio: auto !important;
}
/* 移动端：控制栏横排在图片下方黑边上（不遮挡图片），比例条横向滚动 */
.camera-capture-editor.is-compact .camera-capture-editor__rail {
  order: 3;
  flex: 0 0 auto;
  width: 100%;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  max-height: none;
  overflow: visible;
  border-radius: 12px;
}
.camera-capture-editor.is-compact .camera-capture-editor__controls {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  justify-content: stretch;
  padding-top: 0;
  background: linear-gradient(180deg, rgba(18, 20, 27, 0) 0%, rgba(18, 20, 27, 0.92) 32%);
}
.camera-capture-editor.is-compact .camera-capture-editor__action {
  width: 100%;
  justify-content: center;
  padding: 9px 8px;
}
/* 移动端比例条横向滚动，舞台与裁剪把手单独禁用原生拖动。 */
.camera-capture-editor.is-compact .camera-capture-editor__ratios {
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-x;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}
.camera-capture-editor.is-compact .camera-capture-editor__ratios::-webkit-scrollbar {
  display: none;
}
.camera-capture-editor.is-compact .camera-capture-editor__ratios button {
  flex: 0 0 auto;
  padding: 10px 14px;
  font-size: 15px;
  min-height: 44px;
}
.camera-capture-editor.is-compact .camera-capture-editor__ratios-label {
  flex: 0 0 auto;
  text-align: left;
}
.camera-capture-editor.is-compact .camera-capture-editor__nudge {
  flex-direction: row;
  gap: 6px;
}
.camera-capture-editor.is-compact .camera-capture-editor__nudge button {
  width: 44px;
  height: 44px;
  font-size: 24px;
}
.camera-capture-manager__parameters, .camera-capture-editor__status { width: 100%; margin: 4px 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.camera-capture-manager__parameters { max-width: 550px; }
.camera-capture-manager__focus { position: absolute; width: 44px; height: 44px; border: 2px solid #ffd54a; border-radius: 8px; transform: translate(-50%, -50%); pointer-events: none; z-index: 3; }
.camera-capture-manager__focus[hidden] { display: none; }
[data-camera-retry][hidden], [data-camera-switch][hidden], .camera-capture-manager__recovery[hidden] { display: none !important; }
.camera-capture-manager__parameters:empty, .camera-capture-manager__status:empty, .camera-capture-editor__status:empty { display: none; }
.camera-capture-manager__video-wrap { touch-action: none; }
.camera-capture-manager__btn:disabled, .camera-capture-editor button:disabled { opacity: .5; cursor: default; }
.camera-capture-manager.is-compact .camera-capture-manager__icon-btn { width: 44px; min-height: 44px; }
.camera-capture-editor.is-compact .camera-capture-editor__action { min-height: 44px; }
.camera-capture-editor.is-compact .camera-capture-editor__ratios.hidden-mode { display: none; }
@media (min-width: 380px) {
  .camera-capture-editor.is-compact .camera-capture-editor__controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.camera-capture-manager.is-compact .camera-capture-manager__zoom,
.camera-capture-manager.is-compact .camera-capture-manager__rotate { padding-right: 0; gap: 4px; }
.camera-capture-manager.is-compact .camera-capture-manager__zoom::after,
.camera-capture-manager.is-compact .camera-capture-manager__rotate::after { display: none; }
.camera-capture-editor.is-compact .camera-capture-editor__header { justify-content: flex-end; }
.camera-capture-editor.is-compact .camera-capture-editor__title { display: none; }
@media (min-width: 520px) and (max-height: 500px) {
  .camera-capture-editor.is-compact .camera-capture-editor__card { gap: 6px; }
  .camera-capture-editor.is-compact .camera-capture-editor__body { gap: 6px; }
  .camera-capture-editor.is-compact .camera-capture-editor__controls { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 0; }
  .camera-capture-editor.is-compact .camera-capture-editor__status { margin: 0; }
}
