/* 随手拍：整屏、手机优先，像小红书、快手、抖音的拍摄页（ADR-0155 第 2 条） */
body.snap-page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.snap-view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.snap-view.mirror {
  transform: scaleX(-1);
}

/* 前置摄像头的「闪光」：整屏一下白 */
.snap-screen-flash {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #fff;
}

.snap-top {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 28px;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
}

.snap-round {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}

.snap-round.on {
  background: #ffd84d;
  color: #1a1814;
}

.snap-clock {
  padding: 4px 12px;
  border-radius: 999px;
  background: #e5484d;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
}

.snap-hint {
  position: fixed;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 182px);
  left: 0;
  z-index: 5;
  margin: 0;
  padding: 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.snap-modes {
  position: fixed;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 136px);
  left: 0;
  z-index: 6;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.snap-modes button {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.snap-modes button.on {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 600;
}

.snap-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 24px calc(env(safe-area-inset-bottom) + 30px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.snap-side {
  display: grid;
  justify-items: center;
  gap: 4px;
  justify-self: center;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.snap-side .icon {
  width: 28px;
  height: 28px;
}

.snap-side:disabled {
  opacity: 0.35;
}

.snap-shutter {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

.snap-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.snap-ring circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 5;
}

.snap-ring .snap-ring-on {
  stroke: #e5484d;
  stroke-dasharray: 232.5;
  stroke-dashoffset: 232.5;
}

.snap-dot {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s, border-radius 0.15s, background 0.15s;
}

.snap-page.video .snap-dot {
  background: #e5484d;
}

.snap-page.recording .snap-dot {
  transform: scale(0.5);
  border-radius: 10px;
}

.snap-page.recording .snap-modes,
.snap-page.recording .snap-side {
  visibility: hidden;
}

.snap-shutter:disabled .snap-dot {
  opacity: 0.4;
}

.snap-card {
  position: fixed;
  top: 50%;
  right: 20px;
  left: 20px;
  z-index: 7;
  display: grid;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  padding: 22px 20px;
  border-radius: 18px;
  background: rgba(28, 26, 22, 0.92);
  text-align: center;
  transform: translateY(-60%);
}

.snap-card strong {
  font-size: 19px;
}

.snap-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.55;
}

.snap-card button,
.snap-btn {
  display: block;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #1a1814;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.snap-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-decoration: underline;
}

.snap-small {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.snap-review {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #000;
}

.snap-review img,
.snap-review video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #000;
}

.snap-review-bar {
  display: grid;
  gap: 10px;
  padding: 14px 20px calc(env(safe-area-inset-bottom) + 22px);
  background: #111;
}

.snap-review-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.snap-review-actions button {
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: #2b2925;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.snap-review-actions button.primary {
  background: #fff;
  color: #1a1814;
  font-weight: 600;
}

.snap-review-actions button:disabled {
  opacity: 0.5;
}

/* 拍完写描述、选谁能看（相册的 Composer）：这一页是黑底白字，那张卡片照旧是浅底深字 */
.snap-page .sheet {
  color: var(--ink);
  user-select: text;
  -webkit-user-select: text;
}

.snap-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #2b2925;
}

.snap-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #5fd08f;
  transition: width 0.2s;
}

/* ADR-0228：倒计时、分段录 */
.snap-count {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  font-size: 88px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.snap-segment {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}
