/* ==========================================================================
   YINUNU 复古拟物相机样式表 (style.css)
   15 大创意全量落地 · 拟物暗房 · 触控优先 · 零外部字体
   ========================================================================== */

:root {
  /* 基础设计变量 (系统字体栈规范) */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* 默认富士金属银主题变量 (theme-silver) */
  --bg-primary: #18191c;
  --body-chassis: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 45%, #9ca3af 100%);
  --chassis-border: #6b7280;
  --dial-bg: linear-gradient(135deg, #f3f4f6 0%, #9ca3af 100%);
  --dial-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  --shutter-btn: radial-gradient(circle at 35% 35%, #ef4444 0%, #b91c1c 70%, #7f1d1d 100%);
  --shutter-ring: linear-gradient(135deg, #f9fafb, #9ca3af);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-gold: #fbbf24;
  --accent-cyan: #38bdf8;
  --hud-bg: rgba(24, 25, 28, 0.88);
  --hud-border: rgba(255, 255, 255, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* 拟物机身皮肤 2: 暗夜黑 (theme-dark) */
body.theme-dark {
  --body-chassis: linear-gradient(180deg, #27272a 0%, #18181b 45%, #09090b 100%);
  --chassis-border: #3f3f46;
  --dial-bg: linear-gradient(135deg, #3f3f46 0%, #18181b 100%);
  --dial-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  --shutter-btn: radial-gradient(circle at 35% 35%, #dc2626 0%, #991b1b 70%, #450a0a 100%);
  --shutter-ring: linear-gradient(135deg, #71717a, #27272a);
  --hud-bg: rgba(12, 12, 14, 0.92);
}

/* 拟物机身皮肤 3: 千禧粉 (theme-pink) */
body.theme-pink {
  --body-chassis: linear-gradient(180deg, #fbcfe8 0%, #f472b6 45%, #db2777 100%);
  --chassis-border: #be185d;
  --dial-bg: linear-gradient(135deg, #fdf2f8 0%, #f472b6 100%);
  --dial-shadow: 0 4px 10px rgba(190, 24, 93, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.9);
  --shutter-btn: radial-gradient(circle at 35% 35%, #ec4899 0%, #be185d 70%, #831843 100%);
  --shutter-ring: linear-gradient(135deg, #fce7f3, #f472b6);
  --hud-bg: rgba(30, 16, 26, 0.9);
}

/* 全局重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  background-color: var(--bg-primary);
  font-family: var(--font-sans);
  color: var(--text-primary);
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   拟物卡片机身外壳容器 (Camera Chassis)
   ========================================================================== */
.camera-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--body-chassis);
}

/* 顶栏控制台 (Top Bar) */
.camera-topbar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--chassis-border);
  gap: 0.5rem;
}

.brand-portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}
.brand-portal-link:hover {
  transform: scale(1.06);
  opacity: 0.95;
}
.brand-portal-logo {
  height: 26px;
  width: 104px;
  aspect-ratio: 4 / 1;
  border-radius: 4px;
  object-fit: contain;
  display: block;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-action-text {
  font-size: 0.76rem;
  margin-left: 0.25rem;
}

.btn-settings-trigger {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
}
.btn-settings-trigger:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--accent-gold);
}

/* 复古控制下拉与拟物按钮 */
.select-retro, .btn-retro-icon {
  background: var(--dial-bg);
  border: 1px solid var(--chassis-border);
  color: #1e293b;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  box-shadow: var(--dial-shadow);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
body.theme-dark .select-retro,
body.theme-dark .btn-retro-icon {
  color: #f1f5f9;
}
/* 下拉菜单 Option 显隐修复 (防深色模式白底白字 Issue 6) */
select option,
select.select-retro option {
  background-color: #1e242d !important;
  color: #f8fafc !important;
  padding: 0.35rem 0.5rem;
}
.select-retro:hover, .btn-retro-icon:hover {
  filter: brightness(1.08);
}
.btn-retro-icon:active {
  transform: scale(0.94);
}
.btn-retro-icon.active {
  border-color: var(--accent-gold);
  color: #b45309;
}

.album-btn-wrap {
  position: relative;
  display: inline-flex;
}
.album-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffffff;
}

/* ==========================================================================
   暗房摄影视口与取景器 (Darkroom Viewport)
   ========================================================================== */
.camera-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

/* 抠图背景预览画布 (独立背景层) */
.viewfinder-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.camera-video {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  transform-origin: center center;
  transition: filter 0.2s ease;
  z-index: 2;
}

/* 静态照片导入 / 抠图主体预览画布 */
.camera-preview-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  transform-origin: center center;
  transition: filter 0.2s ease;
  z-index: 2;
}

/* 摄像头未检测到占位引导层 */
.camera-fallback-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 15;
  background: radial-gradient(circle at center, rgba(30, 32, 40, 0.95), rgba(10, 11, 14, 0.98));
}

.placeholder-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.8rem 1.5rem;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.placeholder-icon {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
}

.placeholder-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.placeholder-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.placeholder-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

/* ==========================================================================
   所见即所得成片画板与取景开孔 (WYSIWYG Photo Stage Card & Aperture)
   ========================================================================== */

/* 拖拽操作模式切换条 (移画面 vs 移取景框) */
.drag-mode-bar {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
  z-index: 25;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.drag-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.drag-mode-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.drag-mode-btn.active {
  background: #f59e0b;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.drag-mode-btn svg {
  flex-shrink: 0;
}

.photo-stage-card {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: auto;
  height: auto;
  max-width: calc(100% - 1.2rem);
  max-height: calc(100% - 2.8rem);
  user-select: none;
  z-index: 10;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  margin: auto;
}

/* 画面主展示区 (包裹开孔取景视口，全框自适应填充相纸) */
.stage-picture-area {
  position: relative;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-sizing: border-box;
}

/* 成片尺寸比例 (Photo Aspect Ratio - 真实画幅宽高比) */
.photo-stage-card[data-photo-ratio="3:4"] { aspect-ratio: 3 / 4; }
.photo-stage-card[data-photo-ratio="1:1"] { aspect-ratio: 1 / 1; }
.photo-stage-card[data-photo-ratio="4:3"] { aspect-ratio: 4 / 3; }
.photo-stage-card[data-photo-ratio="9:16"] { aspect-ratio: 9 / 16; }
.photo-stage-card[data-photo-ratio="16:9"] { aspect-ratio: 16 / 9; }
.photo-stage-card[data-photo-ratio="2:3"] { aspect-ratio: 2 / 3; }
.photo-stage-card[data-photo-ratio="3:2"] { aspect-ratio: 3 / 2; }
.photo-stage-card[data-photo-ratio="4-grid"] { aspect-ratio: 1 / 2.2; }
/* 旧版别名兼容 */
.photo-stage-card[data-photo-ratio="polaroid"] { aspect-ratio: 88 / 107; }
.photo-stage-card[data-photo-ratio="instax"] { aspect-ratio: 54 / 86; }
.photo-stage-card[data-photo-ratio="kodak"] { aspect-ratio: 3 / 2; }

/* 1. 经典拍立得白框 (Polaroid: 标准大相纸，~90%宽/~78%高主画幅，经典大下巴签名栏) */
.photo-stage-card.frame-polaroid {
  background: #ffffff;
  padding: 4% 4.5% 0 4.5%;
  border-radius: 4px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
}
.photo-stage-card.frame-polaroid .frame-top-bar { display: none; }
.photo-stage-card.frame-polaroid .frame-bottom-bar {
  flex: 0 0 16%;
  min-height: 48px;
  max-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2% 2% 2%;
  box-sizing: border-box;
}
.photo-stage-card.frame-polaroid .stage-signature-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", cursive, sans-serif;
  font-style: italic;
  font-size: 0.95rem;
  color: #1e293b;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-stage-card.frame-polaroid .stage-lcd-date {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: #d97706;
  text-shadow: 0 0 4px rgba(245, 158, 11, 0.3);
}
.photo-stage-card.frame-polaroid .frame-brand-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
}

/* 2. 富士 Instax 相纸 (Fuji Instax Mini: 圆润相纸，大下巴) */
.photo-stage-card.frame-fuji {
  background: #fdfdfd;
  padding: 4.5% 5% 0 5%;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}
.photo-stage-card.frame-fuji .frame-top-bar { display: none; }
.photo-stage-card.frame-fuji .frame-bottom-bar {
  flex: 0 0 16%;
  min-height: 48px;
  max-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2% 2% 2%;
  box-sizing: border-box;
}
.photo-stage-card.frame-fuji .frame-brand-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}
.photo-stage-card.frame-fuji .stage-lcd-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #0284c7;
  font-weight: 600;
}

/* 3. 柯达 35mm 胶卷框 (Kodak 35mm Film) */
.photo-stage-card.frame-kodak {
  background: #0d0e12;
  padding: 2% 3.5% 0 3.5%;
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
}
.photo-stage-card.frame-kodak .frame-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex: 0 0 7%;
  min-height: 24px;
  max-height: 36px;
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  box-sizing: border-box;
}
.photo-stage-card.frame-kodak .frame-bottom-bar {
  flex: 0 0 8%;
  min-height: 28px;
  max-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}
.photo-stage-card.frame-kodak .frame-brand-tag {
  color: #ef4444;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
}
.photo-stage-card.frame-kodak .stage-lcd-date {
  color: #fbbf24;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  text-shadow: 0 0 6px #f59e0b;
}

/* 4. 徕卡暗房黑框 (Leica Darkroom) */
.photo-stage-card.frame-leica {
  background: #141519;
  padding: 3.5% 4% 0 4%;
  border-radius: 4px;
  border: 1px solid #27272a;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
}
.photo-stage-card.frame-leica .frame-top-bar { display: none; }
.photo-stage-card.frame-leica .frame-bottom-bar {
  flex: 0 0 12%;
  min-height: 38px;
  max-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2% 2% 2%;
  box-sizing: border-box;
}
.photo-stage-card.frame-leica .frame-brand-tag {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}
.photo-stage-card.frame-leica .frame-brand-tag::before {
  content: '🔴 ';
}
.photo-stage-card.frame-leica .stage-lcd-date {
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* 5. 日系文艺卡纸 (Japanese Cream Card) */
.photo-stage-card.frame-cream {
  background: #fbf7ee;
  padding: 4% 4.5% 0 4.5%;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.photo-stage-card.frame-cream .frame-top-bar { display: none; }
.photo-stage-card.frame-cream .frame-bottom-bar {
  flex: 0 0 14%;
  min-height: 44px;
  max-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2% 2% 2%;
  box-sizing: border-box;
}
.photo-stage-card.frame-cream .frame-brand-tag {
  color: #57534e; /* 高对比深暖灰，在 #fbf7ee 浅色卡纸上清晰呈现 */
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.photo-stage-card.frame-cream .stage-signature-text {
  color: #475569;
  font-family: cursive, sans-serif;
  font-style: italic;
  font-size: 0.88rem;
  flex: 1;
  text-align: center;
}
.photo-stage-card.frame-cream .stage-lcd-date {
  color: #78716c;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* 6. 千禧 CCD 金属相框 (Y2K Cyber CCD) */
.photo-stage-card.frame-cyber {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  padding: 3.5% 4% 0 4%;
  border-radius: 8px;
  border: 2px solid #64748b;
}
.photo-stage-card.frame-cyber .frame-top-bar { display: none; }
.photo-stage-card.frame-cyber .frame-bottom-bar {
  flex: 0 0 12%;
  min-height: 40px;
  max-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 2% 2% 2%;
  box-sizing: border-box;
}
.photo-stage-card.frame-cyber .frame-brand-tag {
  color: #1e293b;
  font-size: 0.72rem;
  font-weight: 700;
}
.photo-stage-card.frame-cyber .stage-lcd-date {
  color: #10b981;
  font-family: var(--font-mono);
  text-shadow: 0 0 6px #34d399;
  font-weight: 700;
  font-size: 0.75rem;
}

/* 7. 纯净无边 (Full Bleed) */
.photo-stage-card.frame-none {
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.photo-stage-card.frame-none .frame-top-bar,
.photo-stage-card.frame-none .frame-bottom-bar {
  display: none;
}
.photo-stage-card.frame-none .stage-picture-area {
  flex: 1 1 0;
  width: 100%;
  height: 100%;
}

/* 取景开孔视口 (Aperture / Viewfinder Window) */
.frame-aperture {
  position: relative;
  background: #090a0d;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.2);
  transition: clip-path 0.2s ease, border-radius 0.2s ease, outline 0.15s ease, box-shadow 0.15s ease;
  flex: none; /* 彻底禁止 Flexbox 收缩挤压，确保宽高严格按比例同步等比缩放 */
  box-sizing: border-box;
  max-width: none;
  max-height: none;
}

/* 移取景框模式激活状态 (提示用户当前正处于平移取景框状态) */
.frame-aperture.mode-aperture {
  cursor: move !important;
  outline: 2px dashed #f59e0b;
  outline-offset: 2px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 158, 11, 0.45);
}

/* 移背景模式激活状态 (提示用户当前正处于平移/缩放背景底板状态) */
.frame-aperture.mode-background {
  cursor: grab !important;
  outline: 2px dashed #38bdf8;
  outline-offset: 2px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.45);
}
.frame-aperture.mode-background:active {
  cursor: grabbing !important;
}

.frame-aperture.is-dragging {
  cursor: grabbing !important;
}

/* 开孔造型矢量裁剪 (SVG Defs & CSS clip-path Issue 4 修复) */
.frame-aperture[data-shape="rect"] { clip-path: none; border-radius: 0; }
.frame-aperture[data-shape="round-rect"] { clip-path: none; border-radius: var(--radius-px, 12px); }
.frame-aperture[data-shape="circle"] { clip-path: circle(50% at 50% 50%); }
.frame-aperture[data-shape="oval"] { clip-path: ellipse(50% 38% at 50% 50%); }
.frame-aperture[data-shape="heart"] { clip-path: url(#vf-clip-heart); }
.frame-aperture[data-shape="star"] { clip-path: url(#vf-clip-star); }
.frame-aperture[data-shape="diamond"] { clip-path: url(#vf-clip-diamond); }
.frame-aperture[data-shape="hexagon"] { clip-path: url(#vf-clip-hexagon); }

/* 构图九宫格与中心准星 */
.viewfinder-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  z-index: 5;
}
.viewfinder-grid::before, .viewfinder-grid::after {
  content: '';
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.25);
}
.viewfinder-grid::before {
  top: 33.33%; bottom: 33.33%; left: 0; right: 0;
  border-left: none; border-right: none;
}
.viewfinder-grid::after {
  left: 33.33%; right: 33.33%; top: 0; bottom: 0;
  border-top: none; border-bottom: none;
}

.viewfinder-crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  pointer-events: none;
  z-index: 5;
}
.viewfinder-crosshair::before, .viewfinder-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.7);
}
.viewfinder-crosshair::before { top: 0; bottom: 0; left: 9px; width: 2px; }
.viewfinder-crosshair::after { left: 0; right: 0; top: 9px; height: 2px; }

/* 实时 OSD 参数 */
.osd-top {
  position: absolute;
  top: 6px; left: 8px; right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 6;
}

/* 磁吸对齐导线 */
.snap-guide {
  position: absolute;
  background: var(--accent-gold);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}
.snap-guide-h {
  left: 0; right: 0; top: 50%;
  height: 1px;
  box-shadow: 0 0 4px var(--accent-gold);
}
.snap-guide-v {
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  box-shadow: 0 0 4px var(--accent-gold);
}

/* 闪光灯爆闪 (Flash Burst D1) */
.flash-overlay {
  position: absolute;
  inset: 0;
  background: #ffffff;
  pointer-events: none;
  opacity: 0;
  z-index: 100;
}
.flash-overlay.flash-burst {
  animation: flashBurstAnim 120ms ease-out forwards;
}
@keyframes flashBurstAnim {
  0% { opacity: 0.98; }
  100% { opacity: 0; }
}

/* 倒计时覆盖层 */
.countdown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 80;
  pointer-events: none;
}
.countdown-overlay.active {
  display: flex;
}
.countdown-number {
  font-size: 6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  animation: countdownPulse 1s ease-in-out infinite;
}
.countdown-subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fbbf24;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-family: var(--font-sans);
}
@keyframes countdownPulse {
  0% { transform: scale(1.3); opacity: 1; }
  80% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 1; }
}

/* ==========================================================================
   底部常驻拍摄控制台 (Bottom HUD)
   ========================================================================== */
.camera-hud {
  position: relative;
  z-index: 40;
  width: 100%;
  background: var(--hud-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--hud-border);
  padding: 0.65rem 1rem calc(0.65rem + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* 变焦调节栏与滤镜按钮行 */
.hud-zoom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
}
.zoom-pills {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.zoom-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  cursor: pointer;
}
.zoom-pill.active {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
}
.zoom-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 130px;
  flex-shrink: 1;
}
.zoom-slider {
  width: 100%;
  accent-color: var(--accent-gold);
}
.zoom-display {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  width: 32px;
  flex-shrink: 0;
}

/* 滤镜开关按钮 (紧跟在变焦行后) */
.hud-filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.hud-filter-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.hud-filter-btn.active {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* 定时器开关胶囊按钮 (位于滤镜按钮右侧) */
.hud-timer-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.hud-timer-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.hud-timer-btn.active {
  background: var(--accent-gold);
  color: #0f172a;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* 抽屉滤镜网格布局 (P1) */
.drawer-filter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  padding: 0.3rem 0;
}
.filter-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.filter-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
.filter-pill.active {
  background: rgba(251, 191, 36, 0.18);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}

/* 核心快门与功能按钮排 */
.hud-main-controls {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 0.2rem;
}

.hud-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
.hud-tool-btn svg {
  stroke: var(--text-primary);
}
.hud-tool-btn:hover {
  color: var(--text-primary);
}

/* 四格连拍专属按钮 */
.btn-burst.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}
.btn-burst:not(.is-disabled) {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
  color: #fbbf24;
}
.btn-burst:not(.is-disabled) svg {
  stroke: #fbbf24;
}
.btn-burst:not(.is-disabled):hover {
  color: #f59e0b;
  transform: translateY(-1px);
}
.btn-burst:not(.is-disabled):hover svg {
  stroke: #f59e0b;
}
.btn-burst.is-shooting {
  animation: burstPulse 0.8s ease-in-out infinite;
  color: #ef4444;
}
.btn-burst.is-shooting svg {
  stroke: #ef4444;
}
@keyframes burstPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* 拟物快门大圆钮 */
.shutter-btn-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--shutter-ring);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), inset 0 2px 3px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-shutter {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: var(--shutter-btn);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.08s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.btn-shutter:active {
  transform: scale(0.92);
  filter: brightness(0.9);
}
/* 快门长按蓄力动效 */
.btn-shutter.is-holding {
  transform: scale(0.90);
  filter: brightness(1.2);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.85), inset 0 0 8px rgba(255, 255, 255, 0.7);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   可折叠微调与抠图抽屉 (Tuning / Matting Drawers)
   ========================================================================== */
.drawer-panel {
  position: absolute;
  bottom: calc(100% + 1px);
  left: 0; right: 0;
  background: rgba(18, 19, 24, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transform: translateY(100%);
  visibility: hidden;
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.22s;
  z-index: 35;
  max-height: 50vh;
  overflow-y: auto;
}
.drawer-panel.open {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
}
.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
}

.drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.82rem;
}
.drawer-row label {
  color: var(--text-secondary);
  white-space: nowrap;
}
.drawer-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent-gold);
}
.drawer-row input[type="text"] {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ffffff;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
}

/* ==========================================================================
   成片展示模态弹窗 (Photo Modal D1 吐纸显影)
   ========================================================================== */
.photo-modal, .album-modal, .confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.photo-modal.open, .album-modal.open, .confirm-modal.open {
  display: flex;
}

.photo-modal-card {
  position: relative;
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.photo-modal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  overflow: hidden;
}

/* 拍立得吐纸显影动效 (D1) */
.polaroid-card {
  position: relative;
  max-width: 100%;
  max-height: 65vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.polaroid-card.developing-anim {
  animation: polaroidSpit 0.7s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}
.polaroid-card.developing-anim img {
  animation: photoDeveloping 0.8s ease-out forwards;
}

@keyframes polaroidSpit {
  0% { transform: translateY(-40px) scale(0.92); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes photoDeveloping {
  0% { filter: brightness(1.7) contrast(0.6) saturate(0.2); }
  60% { filter: brightness(1.2) contrast(0.9) saturate(0.8); }
  100% { filter: brightness(1) contrast(1) saturate(1); }
}

.photo-result-img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
}

/* 拍立得对比模式微型切换药丸 (D4) */
.compare-mode-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 4px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.compare-pill {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}
.compare-pill:hover {
  color: #f8fafc;
}
.compare-pill.active {
  background: var(--accent-gold);
  color: #0f172a;
  font-weight: 600;
}

/* 抠图换背景双屏拉帘对比滑杆 (D4) */
.before-after-wrap {
  position: relative;
  max-width: 100%;
  max-height: 65vh;
  overflow: hidden;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.before-img {
  display: block;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 6px;
}
.after-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 6px;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
  pointer-events: none;
}
.split-divider {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 10;
  touch-action: none;
}
.split-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  user-select: none;
}

.photo-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.8rem;
}
.btn-primary-action {
  flex: 1;
  background: var(--accent-gold);
  color: #0f172a;
  border: none;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.btn-secondary-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   历史相册弹窗 (Album Modal)
   ========================================================================== */
.album-modal-card {
  position: relative;
  background: #181c24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.album-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.album-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
}
.album-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.8rem;
}
.album-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.album-thumb-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #090a0f;
  overflow: hidden;
}
.album-thumb {
  width: 100%; height: 100%;
  object-fit: cover;
}
.album-tag {
  position: absolute;
  bottom: 4px; left: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #cbd5e1;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.album-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.album-actions {
  display: flex;
  gap: 0.3rem;
}
.album-actions button {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
}
.album-actions button:hover {
  color: #ffffff;
}

.album-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-danger-outline {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
}
.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* 简易二次确认弹窗 */
.confirm-card {
  background: #1e2230;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.5rem;
  max-width: 360px;
  text-align: center;
}
.confirm-card h4 {
  margin-bottom: 0.6rem;
  font-size: 1rem;
}
.confirm-card p {
  color: #94a3b8;
  font-size: 0.82rem;
  margin-bottom: 1.2rem;
  line-height: 1.5;
}
.confirm-btn-row {
  display: flex;
  gap: 0.8rem;
}

/* 顶部轻量浮动提示 (Toast) */
.camera-toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 999;
}
.camera-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   YINUNU 品牌通用页脚规范 (Footer) 与品牌弹窗
   ========================================================================== */
.yinunu-footer {
  margin-top: auto;
  padding: 1rem 1.5rem 0.8rem;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.4);
}
.yinunu-footer-brand {
  font-weight: 600;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 0.2rem;
}
.yinunu-footer-links {
  margin-bottom: 0.25rem;
}
.yinunu-footer-links a {
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  transition: color 0.2s ease;
}
.yinunu-footer-links a:hover {
  color: var(--text-primary, #ffffff);
  text-decoration: underline;
}
.yinunu-footer-sep {
  margin: 0 0.4rem;
  opacity: 0.4;
}
.yinunu-footer-copy {
  font-size: 0.7rem;
  color: var(--text-muted, #64748b);
}

/* 产品矩阵与隐私条款弹窗规范 */
.yinunu-products-modal[hidden] {
  display: none !important;
}
.yinunu-products-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.yinunu-products-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.yinunu-products-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: #181c2a !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.yinunu-products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.yinunu-products-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f8fafc !important;
}
.yinunu-products-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8 !important;
}
.yinunu-products-close {
  background: transparent !important;
  border: none !important;
  font-size: 1.5rem;
  color: #94a3b8 !important;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.yinunu-products-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}
.yinunu-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.yinunu-product-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.yinunu-product-item:hover {
  transform: translateY(-2px);
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.06) !important;
}
.yinunu-product-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9 !important;
  margin-bottom: 0.35rem;
}
.yinunu-product-url {
  font-size: 0.75rem;
  color: #94a3b8 !important;
}
.yinunu-privacy-body {
  font-size: 0.85rem;
  line-height: 1.75;
  color: #cbd5e1 !important;
}
.yinunu-privacy-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}
.yinunu-privacy-agree-btn {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
}

/* ==========================================================================
   相机设置与综合参数弹窗 (Settings Modal)
   ========================================================================== */
.settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 210;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.settings-modal.open {
  display: flex;
}

.settings-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  background: #141722;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f1f5f9;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.3rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-modal-title-wrap h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.settings-modal-title-wrap span {
  font-size: 0.75rem;
  color: #94a3b8;
}

.settings-modal-body {
  padding: 1.2rem 1.3rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-section-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold, #f59e0b);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.85rem;
}

.settings-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-item label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.settings-item select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  background: #1f2430;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #f8fafc;
  cursor: pointer;
}

.btn-retro-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-retro-toggle.active {
  background: rgba(245, 158, 11, 0.16);
  border-color: var(--accent-gold, #f59e0b);
  color: var(--accent-gold, #f59e0b);
}

.settings-footer-section {
  margin-top: 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.settings-footer-section .yinunu-footer {
  background: transparent;
  padding: 0;
  border-top: none;
}

/* ==========================================================================
   小屏与中屏响应式紧凑适配 (iPhone SE 375x667 & Medium 758x626 极简单屏)
   ========================================================================== */
@media (max-width: 480px) {
  .camera-topbar {
    padding: 0.45rem 0.75rem;
  }
  .brand-portal-logo {
    height: 22px;
    width: 88px;
  }
  .btn-action-text {
    display: none;
  }
  .btn-retro-icon {
    padding: 0.35rem 0.5rem;
  }
  .hud-zoom-row {
    gap: 0.45rem;
  }
  .zoom-slider-wrap {
    width: 95px;
  }
  .hud-filter-btn,
  .hud-timer-btn {
    padding: 0.22rem 0.5rem;
    font-size: 0.72rem;
  }
  .shutter-btn-wrap {
    width: 66px;
    height: 66px;
  }
  .btn-shutter {
    width: 52px;
    height: 52px;
  }
  .camera-hud {
    padding: 0.45rem 0.6rem calc(0.45rem + var(--safe-bottom));
    gap: 0.4rem;
  }
}

@media (max-height: 680px) {
  .drag-mode-bar {
    top: 0.35rem;
    padding: 2px;
  }
  .drag-mode-btn {
    padding: 3px 8px;
    font-size: 0.7rem;
  }
  .camera-hud {
    padding: 0.4rem 0.8rem calc(0.4rem + var(--safe-bottom));
    gap: 0.35rem;
  }
  .hud-main-controls {
    padding-top: 0.1rem;
  }
  .shutter-btn-wrap {
    width: 62px;
    height: 62px;
  }
  .btn-shutter {
    width: 48px;
    height: 48px;
  }
}
