/* ============================================================
   STILLOW Pocket Film — Style A: Warm Japanese Paper Editorial
   ============================================================ */

:root {
  --bg-paper: #EFE9DC;
  --bg-paper-elevated: #F8F4EB;
  --bg-pill: #E4DCCB;
  --bg-pill-hover: #DBD1BC;
  --ink-primary: #2B2824;
  --ink-secondary: #6F685E;
  --ink-muted: #9B9387;
  --brass: #C2A373;
  --brass-dark: #9B7D4E;
  --danger: #B85243;
  --border-subtle: rgba(43, 40, 36, 0.09);
  --shadow-paper: 0 18px 40px -14px rgba(45, 36, 22, 0.22), 0 4px 12px -4px rgba(45, 36, 22, 0.10);
  --shadow-soft: 0 8px 24px -8px rgba(45, 36, 22, 0.14);
  --font-serif: "Cormorant Garamond", "Didot", "Baskerville", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-hand: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "IBM Plex Mono", "Courier New", monospace;
  --font-typewriter: ui-monospace, "SF Mono", "IBM Plex Mono", "Courier New", "PingFang SC", "Hiragino Sans GB", monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Motion Tokens */
  --dur-tap: 90ms;
  --dur-quick: 160ms;
  --dur-ui: 240ms;
  --dur-paper: 420ms;
  --dur-flip: 680ms;
  --dur-eject: 1100ms;

  --ease-ui-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ui-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-paper-lift: cubic-bezier(0.3, 0.7, 0.2, 1);
  --ease-paper-settle: cubic-bezier(0.2, 0.9, 0.25, 1.02);
  --ease-motor: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --ease-flip: cubic-bezier(0.55, 0, 0.25, 1);
  --ease-reagent: cubic-bezier(0.35, 0, 0.15, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #ECE7DC;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

html[data-cover-pending="1"],
html[data-cover-pending="1"] body {
  background: #3A080F;
  overscroll-behavior: none;
}

html[data-cover-pending="1"] #editionCoverOverlay {
  display: flex !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* Subtle Japanese Cotton Paper Grain */
.paper-grain {
  display: none !important;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

/* Mobile-first App Shell (unified edge-to-edge cotton paper desk) */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 253, 248, 0.32) 0%, rgba(235, 227, 212, 0.22) 100%),
    url('../assets/webp/paper-desk.webp') center/cover no-repeat var(--bg-paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(43, 36, 24, 0.14);
}

/* Editorial Top Header */
.app-header {
  position: relative;
  z-index: 2;
  padding: calc(16px + var(--safe-top)) 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: transparent;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--ink-primary);
}

.brand-subrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-subtitle {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--ink-secondary);
  font-weight: 500;
}

.series-badge {
  border: 1px solid rgba(194, 163, 115, 0.35);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(194, 163, 115, 0.18);
  color: var(--brass-dark);
  letter-spacing: 0.08em;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper-elevated);
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.93);
  background: var(--bg-pill);
}

/* Main Stage */
.main-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* Tabletop Spread View (Seamless 3-4 across Polaroid journal wall) */
.spread-view {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 118px;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  perspective: 1100px;
}

.spread-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 12px;
  font-size: 11px;
  color: var(--ink-secondary);
}

.spread-summary-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.spread-summary {
  display: inline-flex;
  align-items: baseline;
  font-size: 11.5px;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.summary-num {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1;
  margin: 0 3px;
}

.spread-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.banner-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 253, 249, 0.72);
  color: var(--ink-primary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.16s ease;
}

.banner-action-pill:active {
  transform: scale(0.95);
}

.banner-action-pill.active {
  background: var(--ink-primary);
  color: #FAF7F1;
  border-color: var(--ink-primary);
}

.spread-board {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 22px 12px;
  transform-style: flat;
  transform: rotateX(var(--scroll-tilt, 0deg));
  transition: transform 180ms var(--ease-ui-out);
  transform-origin: center center;
}

.spread-card-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: translateY(var(--card-y, 0px)) rotate(var(--card-rot, 0deg));
  transition: transform 0.22s var(--ease-ui-out), opacity 0.16s ease;
  will-change: transform;
}

.spread-card-item.is-dealing {
  animation: cardDealIn var(--dur-paper) var(--ease-paper-settle) backwards;
  animation-delay: var(--deal-delay, 0ms);
}

@keyframes cardDealIn {
  0% {
    opacity: 0;
    transform: translateY(calc(var(--card-y, 0px) - 22px)) rotate(calc(var(--card-rot, 0deg) * 1.35)) scale(1.06);
  }
  75% {
    opacity: 1;
    transform: translateY(calc(var(--card-y, 0px) + 1.5px)) rotate(var(--card-rot, 0deg)) scale(0.996);
  }
  100% {
    opacity: 1;
    transform: translateY(var(--card-y, 0px)) rotate(var(--card-rot, 0deg)) scale(1);
  }
}

.spread-board.is-tabletop-settle {
  animation: tabletopSettle 280ms var(--ease-paper-settle);
}

@keyframes tabletopSettle {
  0% { transform: scale(0.985); }
  100% { transform: scale(1); }
}

.summary-num {
  display: inline-block;
}

.summary-num.is-flipping {
  animation: summaryFlip 360ms var(--ease-paper-settle);
}

@keyframes summaryFlip {
  0% { transform: translateY(6px); opacity: 0.2; }
  100% { transform: translateY(0); opacity: 1; }
}

.spread-card-item:hover {
  transform: translateY(calc(var(--card-y, 0px) - 3px)) rotate(calc(var(--card-rot, 0deg) * 0.6)) scale(1.03);
  z-index: 4;
}

.select-check-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(43, 40, 36, 0.35);
  background: rgba(255, 253, 249, 0.94);
  color: transparent;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 8;
  box-shadow: 0 2px 6px rgba(36, 26, 14, 0.18);
  transition: transform 0.15s var(--ease-ui-out), background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.select-check-badge.is-stamping {
  animation: stickerStamp 160ms var(--ease-paper-settle) backwards;
  animation-delay: var(--stamp-delay, 0ms);
}

@keyframes stickerStamp {
  0% { transform: scale(1.32); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Manage Mode: E1 lift for unselected, pressed back to E0 + warm tint for selected */
.spread-board.is-manage-mode .spread-card-item {
  transform: translateY(calc(var(--card-y, 0px) - 3px)) rotate(calc(var(--card-rot, 0deg) * 0.6)) scale(1.02);
}

.spread-board.is-manage-mode .spread-card-item.is-selected {
  transform: translateY(var(--card-y, 0px)) rotate(var(--card-rot, 0deg)) scale(0.985);
}

.spread-card-item.is-selected .film-print {
  outline: 2px solid var(--ink-primary);
  outline-offset: 2px;
}

.spread-board.is-manage-mode .spread-card-item.is-selected .film-print::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: rgba(194, 163, 115, 0.14);
}

.spread-card-item.is-selected .select-check-badge {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #FAF7F1;
}

.spread-card-item:active {
  transform: translateY(calc(var(--card-y, 0px) - 2px)) rotate(calc(var(--card-rot, 0deg) * 0.6)) scale(1.03);
  transition-duration: var(--dur-tap);
}

/* Overexposure Delete Effect */
.spread-card-item.is-overexposing {
  pointer-events: none;
  z-index: 6;
  animation: overexposeLift 600ms var(--ease-paper-lift) forwards;
}

.spread-card-item.is-overexposing .film-window img {
  animation: overexposeFlash 420ms ease-out forwards;
}

@keyframes overexposeFlash {
  0% { filter: brightness(1) saturate(1) contrast(1); }
  100% { filter: brightness(2.35) saturate(0) contrast(1.25); }
}

@keyframes overexposeLift {
  0%, 52% {
    opacity: 1;
    transform: translateY(var(--card-y, 0px)) rotate(var(--card-rot, 0deg)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(calc(var(--card-y, 0px) - 28px)) rotate(var(--card-rot, 0deg)) scale(1.06);
  }
}

/* Film Print Component (Exact Physical Ratios + Studio Card Thickness & 45deg Directional Shadow) */
.film-print {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  user-select: none;
  background: #FFFFFF;
  /* 45-deg top-left lighting: crisp edge thickness + tight contact shadow + soft ambient shadow */
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.96),
    inset -1.5px -1.5px 0 rgba(145, 140, 132, 0.34),
    0 0 0 0.5px rgba(120, 112, 98, 0.24),
    2px 3.5px 5px rgba(38, 28, 15, 0.28),
    7px 12px 24px -4px rgba(42, 31, 16, 0.28);
}

/* Fujifilm Instax: Clean smooth card */
.film-print.brand-instax {
  border-radius: 4px;
}

/* Polaroid: Velvety matte cardstock + chemical pod chin */
.film-print.brand-polaroid {
  border-radius: 2.5px;
}

.film-border-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Real Studio-Photographed Surface Texture Overlay on Borders */
.film-real-texture {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-size: cover;
  background-position: center;
}

.film-print.brand-instax .film-real-texture {
  background-image: url('../assets/webp/frame-instax-tex.webp');
  mix-blend-mode: multiply;
  opacity: 0.72;
}

.film-print.brand-instax.is-white-border .film-real-texture {
  mix-blend-mode: normal;
  opacity: 0.94;
}

.film-print.brand-polaroid .film-real-texture {
  background-image: url('../assets/webp/frame-polaroid-tex.webp');
  mix-blend-mode: multiply;
  opacity: 0.80;
}

.film-print.brand-polaroid.is-white-border .film-real-texture {
  mix-blend-mode: normal;
  opacity: 0.96;
}

/* Polaroid Bottom Chin Chemical Pod Swelling */
.film-pod-swell {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(60, 48, 34, 0.045) 0%,
    rgba(255, 255, 255, 0.18) 28%,
    rgba(255, 255, 255, 0.04) 68%,
    rgba(50, 40, 28, 0.09) 100%
  );
}

.film-window {
  position: absolute;
  z-index: 3;
  overflow: hidden;
  background: #1A1816;
}

/* Clean flat hairline seam for both Instax & Polaroid (no recessed step-down shadow, no glare) */
.film-print.brand-instax .film-window,
.film-print.brand-polaroid .film-window {
  border-radius: 1px;
  box-shadow: inset 0 0 0 0.75px rgba(30, 26, 20, 0.16);
}

.film-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-date-stamp {
  position: absolute;
  right: 6%;
  bottom: 5%;
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 178, 92, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.film-chin-caption {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-typewriter);
  font-weight: 400;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--ink-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.film-chin-caption.light-ink {
  color: rgba(255, 252, 245, 0.9);
}

@keyframes filmTextReveal {
  from {
    opacity: 0;
    translate: 0 5px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .film-print.is-text-reveal .film-chin-caption {
    animation: filmTextReveal 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.14s backwards;
  }

  .film-print.is-text-reveal .film-date-stamp {
    animation: filmTextReveal 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.24s backwards;
  }
}

/* Empty State */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  gap: 10px;
}

.empty-frame-illustration {
  width: 112px;
  height: 146px;
  background: #FFFDF9;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 10px 10px 30px;
  box-shadow: var(--shadow-soft);
  transform: rotate(-3deg);
  margin-bottom: 6px;
}

.empty-frame-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-pill);
  border-radius: 2px;
  animation: emptyFilmBreathe 4s ease-in-out infinite;
}

@keyframes emptyFilmBreathe {
  0%, 100% { background: #E4DCCB; opacity: 0.94; }
  50% { background: #EFE9DA; opacity: 1; }
}

.empty-state h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.6;
  max-width: 260px;
}

/* Bottom Dock & Tactile Brass Shutter */
.bottom-dock {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  padding: 8px 20px calc(16px + var(--safe-bottom));
  background: linear-gradient(to top, rgba(235, 228, 214, 0.85) 35%, rgba(235, 228, 214, 0) 100%);
}

.dock-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}

.dock-manage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 68px;
}

.manage-count-text {
  font-size: 12px;
  color: var(--ink-secondary);
  text-align: center;
}

/* Compact Spread Print Styling */
.film-print.is-compact {
  box-shadow:
    inset 0.8px 0.8px 0 rgba(255, 255, 255, 0.95),
    inset -1px -1px 0 rgba(145, 140, 132, 0.32),
    0 0 0 0.5px rgba(120, 112, 98, 0.26),
    1.5px 2.5px 3.5px rgba(36, 26, 14, 0.32),
    5px 8px 14px -3px rgba(42, 31, 16, 0.24);
}

.film-print.is-compact.brand-instax {
  border-radius: 2.5px;
}

.film-print.is-compact.brand-polaroid {
  border-radius: 1.8px;
}

.film-print.is-compact .film-chin-caption {
  display: none;
}

.clear-filter-chip {
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper-elevated);
  color: var(--brass-dark);
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.dock-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper-elevated);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 36, 22, 0.07);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.dock-pill-btn:active {
  transform: scale(0.95);
}

.dock-filter-btn {
  justify-self: start;
}

.dock-random-btn {
  justify-self: end;
}

.dock-filter-btn.is-filtered {
  background: var(--ink-primary);
  color: #FAF7F1;
  border-color: var(--ink-primary);
}

.dock-pill-btn.danger {
  background: var(--danger);
  color: #FFFDF9;
  border-color: var(--danger);
}

.dock-pill-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.filter-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.filter-option-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-paper);
  cursor: pointer;
  text-align: left;
  color: var(--ink-primary);
  transition: transform var(--dur-quick) var(--ease-paper-settle), border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.filter-option-card.is-entering {
  animation: filterOptionRise 240ms var(--ease-paper-settle) backwards;
  animation-delay: var(--opt-delay, 0ms);
}

@keyframes filterOptionRise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-option-card.active {
  border-color: var(--brass-dark);
  background: #F4ECDF;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(45, 36, 22, 0.22);
}

.filter-option-card.full-span {
  grid-column: 1 / -1;
}

.filter-frame-glyph {
  width: 30px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.glyph-rect {
  position: relative;
  border: 1.5px solid var(--ink-primary);
  border-radius: 2px;
  background: #FFFDF9;
  box-shadow: 0 1px 3px rgba(45, 36, 22, 0.12);
}

.glyph-inner {
  position: absolute;
  background: rgba(194, 163, 115, 0.32);
  border: 1px solid rgba(43, 40, 36, 0.25);
}

.filter-option-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.filter-option-meta strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.filter-option-meta span {
  font-size: 11px;
  color: var(--ink-secondary);
}

.shutter-wrap {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.shutter-caption {
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--ink-secondary);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.shutter-btn {
  position: relative;
  width: 62px;
  height: 60px;
  border: none;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #1B1C1F;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow:
    0 10px 20px rgba(24, 22, 20, 0.32),
    0 2px 5px rgba(24, 22, 20, 0.2),
    0 0 0 1px rgba(24, 24, 28, 0.72);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.shutter-btn:active {
  transform: scale(0.94) translateY(1px);
  box-shadow:
    0 4px 10px rgba(24, 22, 20, 0.26),
    0 0 0 1px rgba(24, 24, 28, 0.72);
}

.shutter-btn i,
.shutter-btn b {
  display: block;
  font-style: normal;
  font-weight: 700;
}

.cam-top {
  flex: 0 0 13.5px;
  background: linear-gradient(180deg, #32343A 0%, #1B1C20 100%);
  position: relative;
  border-bottom: 1px solid #0E0F12;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.cam-grille {
  position: absolute;
  left: 3px;
  top: 2.5px;
  width: 33px;
  height: 8.5px;
  border-radius: 1.2px;
  background: repeating-linear-gradient(90deg, #232429 0 1px, #121316 1px 2px);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.8);
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 0 2.5px;
}

.cam-brand {
  font-size: 3.6px;
  letter-spacing: 0.06em;
  color: #E5E7EB;
  line-height: 1;
}

.cam-bolt {
  width: 5px;
  height: 5px;
  border-radius: 0.8px;
  background: linear-gradient(180deg, #F5F6F8, #CFD3D9);
  color: #3A3D45;
  font-size: 3.6px;
  line-height: 5px;
  text-align: center;
}

.cam-flash {
  position: absolute;
  right: 3px;
  top: 2.5px;
  width: 21px;
  height: 8.5px;
  border-radius: 1.2px;
  background:
    radial-gradient(ellipse 75% 55% at 50% 50%, rgba(255, 255, 255, 0.96) 0%, rgba(215, 220, 226, 0.5) 70%, transparent 100%),
    repeating-linear-gradient(180deg, #E4E7EC 0 1.2px, #B8BDC5 1.2px 2.4px);
  box-shadow: inset 0 0 0 1px rgba(40, 42, 48, 0.55), 0 0 3px rgba(255, 255, 255, 0.25);
}

.cam-neck {
  flex: 0 0 2.5px;
  background: linear-gradient(180deg, #16171A 0%, #2C2E34 100%);
  position: relative;
}

.cam-neck::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 18px;
  height: 4px;
  margin-left: -9px;
  background: linear-gradient(180deg, #18191D, #27292E);
  border-radius: 0 0 2.5px 2.5px;
  z-index: 2;
}

.cam-body {
  flex: 1;
  position: relative;
  background: linear-gradient(180deg, #FAFAFB 0%, #ECEEF1 65%, #D5D8DE 100%);
  box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 2px rgba(90, 94, 102, 0.28);
}

.cam-lens {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 21px;
  height: 21px;
  margin: -10.5px 0 0 -10.5px;
  border-radius: 4.5px;
  background: linear-gradient(145deg, #2A2C31, #101114);
  box-shadow:
    0 0 0 1px #E8EAEF,
    0 0 0 2px #1F2126,
    0 1.5px 3px rgba(0, 0, 0, 0.28);
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.cam-glass {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #7C818C 0%, #24262C 38%, #07080A 78%);
  box-shadow: 0 0 0 0.8px rgba(255, 255, 255, 0.16), inset 0 1px 1.5px rgba(255, 255, 255, 0.25);
}

.cam-timer {
  position: absolute;
  left: 5px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-radius: 1.6px;
  background: linear-gradient(180deg, #FFFFFF, #DFE2E7);
  box-shadow: 0 0 0 0.8px #8E929B, 0 1px 1px rgba(0, 0, 0, 0.2);
}

.cam-timer::after {
  content: "";
  position: absolute;
  inset: 1.8px;
  border-radius: 50%;
  border: 0.8px solid #555860;
}

.cam-slider {
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 11px;
  height: 4.5px;
  margin-left: -5.5px;
  border-radius: 1px;
  background: linear-gradient(180deg, #D0D3D9 0 60%, #1F2024 60% 100%);
  box-shadow: 0 0 0 0.6px #7A7E86;
}

.cam-red {
  position: absolute;
  right: 4px;
  bottom: 1.5px;
  width: 11px;
  height: 8px;
  border-radius: 1.6px;
  background:
    repeating-linear-gradient(180deg, #C93A32 0 1.2px, #9E231D 1.2px 2.4px);
  box-shadow:
    0 -1.5px 0 #1B1C20,
    0 0 0 1.3px #1B1C20,
    0 1px 1.5px rgba(0, 0, 0, 0.35);
}

.cam-ledge {
  flex: 0 0 4px;
  background: linear-gradient(180deg, #FFFFFF 0%, #E4E7EC 55%, #C4C8D0 100%);
  border-top: 0.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #141518;
}

.cam-base {
  flex: 0 0 9px;
  background:
    repeating-linear-gradient(90deg, #202227 0 1px, #121316 1px 2px);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1px 4px 1.5px;
}

.cam-af {
  align-self: flex-end;
  font-size: 3px;
  letter-spacing: 0.12em;
  color: #9CA1AB;
  line-height: 1;
}

.cam-slot {
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: #070809;
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.14);
  transition: transform 200ms var(--ease-paper-settle), box-shadow 200ms ease;
}

.shutter-btn.is-catching {
  transform: scale(1.04);
}

.shutter-btn.is-catching .cam-slot {
  transform: scaleY(2.2);
  box-shadow: 0 0 6px rgba(226, 198, 147, 0.72);
}

/* Right-side random draw replaces old stat counter */

/* Bottom Sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(34, 30, 24, 0.44);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--bg-paper-elevated);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px calc(22px + var(--safe-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.18);
  animation: sheetUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  overscroll-behavior: contain;
  will-change: transform;
  touch-action: pan-x;
}
.bottom-sheet.tall {
  max-height: 86dvh;
  overflow-y: auto;
  touch-action: auto;
}

@keyframes sheetUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: #D6CEBF;
  margin: 0 auto 14px;
  cursor: grab;
  touch-action: none;
}

.sheet-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.sheet-desc {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--ink-secondary);
  text-align: center;
}

.capture-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.capture-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper);
  text-align: left;
  cursor: pointer;
  color: var(--ink-primary);
  transition: background 0.15s ease, transform 0.14s ease;
}

.capture-option-card:active {
  transform: scale(0.98);
  background: var(--bg-pill);
}

.capture-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-paper-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass-dark);
  flex-shrink: 0;
}

.capture-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.capture-option-text strong { font-size: 14px; }
.capture-option-text span { font-size: 12px; color: var(--ink-secondary); }

.btn-text-cancel {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 14px;
  cursor: pointer;
}

/* Fullscreen Overlays */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.overlay-topbar {
  padding: calc(12px + var(--safe-top)) 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-paper-elevated);
  flex-shrink: 0;
}

.overlay-topbar.dark {
  background: #171614;
  border-bottom-color: rgba(255,255,255,0.08);
  color: #FAF7F1;
}

.overlay-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.overlay-btn {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.overlay-btn.accent {
  color: var(--brass-dark);
  font-weight: 600;
}

/* Camera Scanner */
.camera-viewport {
  position: relative;
  flex: 1;
  background: #100F0E;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-guide-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.camera-tip-pill {
  position: absolute;
  top: 16px;
  background: rgba(20, 18, 16, 0.7);
  color: #F6F2EA;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.camera-guide-frame {
  position: relative;
  border: 1.5px dashed rgba(255, 250, 240, 0.7);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42);
  transition: width 0.25s ease, height 0.25s ease;
}

.camera-guide-frame .corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--brass);
  border-style: solid;
}
.camera-guide-frame .tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.camera-guide-frame .tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
.camera-guide-frame .bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
.camera-guide-frame .br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }

.camera-fallback {
  position: absolute;
  inset: 0;
  background: #1B1917;
  color: #F6F2EA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.camera-bottom-bar {
  background: #171614;
  padding: 14px 16px calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.camera-capture-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 4px solid #F6F2EA;
  background: var(--brass);
  cursor: pointer;
}
.camera-capture-btn:active { transform: scale(0.92); }

/* Editor Steps */
.editor-step {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.crop-workspace {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #23201D;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

#cropCanvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.magnifier-loupe {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 2.5px solid var(--brass);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  pointer-events: none;
  background: #111;
}

.style-preview-stage {
  position: relative;
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at center, #FBF8F2 0%, #EFE9DC 100%);
  overflow: hidden;
}

.editor-film-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reagent-prev,
.peel-base-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.reagent-next {
  position: relative;
  z-index: 2;
  will-change: clip-path;
}

.reagent-wave-front {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0%;
  height: 14px;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(232, 224, 206, 0.45) 0%,
    rgba(255, 253, 246, 0.78) 68%,
    rgba(255, 255, 255, 0.92) 86%,
    transparent 100%
  );
  border-top: 1.5px solid rgba(255, 253, 246, 0.78);
  filter: blur(0.6px);
}

.peel-top-layer {
  position: relative;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 200ms var(--ease-paper-lift);
  will-change: clip-path;
}

.peel-top-layer.is-peeled {
  clip-path: polygon(0 0, 100% 0, 100% 14%, 14% 100%, 0 100%);
}

.peel-curl-lip {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    135deg,
    transparent 52%,
    rgba(32, 26, 18, 0.24) 56.5%,
    rgba(255, 252, 245, 0.88) 57.5%,
    rgba(232, 224, 210, 0.65) 60%,
    transparent 64%
  );
  transition: opacity 160ms ease;
}

.editor-film-preview.is-peel-active .peel-curl-lip {
  opacity: 1;
}

.compare-orig-btn {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 8;
  border: 1px solid var(--border-subtle);
  background: rgba(251, 248, 242, 0.88);
  backdrop-filter: blur(6px);
  color: var(--ink-primary);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(45, 36, 22, 0.12);
  cursor: pointer;
  user-select: none;
}

.compare-orig-btn:active {
  background: var(--ink-primary);
  color: #FAF7F1;
}

.editor-panel {
  flex-shrink: 0;
  background: var(--bg-paper-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 14px 18px calc(16px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-panel.scrollable {
  max-height: 44dvh;
  overflow-y: auto;
}

.panel-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.helper-note {
  margin: 0;
  font-size: 11px;
  color: var(--ink-muted);
}

.mini-pill-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.mini-pill-row::-webkit-scrollbar { display: none; }

.mini-pill {
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.mini-pill.active {
  background: var(--ink-primary);
  color: #FAF7F1;
  border-color: var(--ink-primary);
}
.mini-pill-row.dark .mini-pill {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border-color: transparent;
}
.mini-pill-row.dark .mini-pill.active {
  background: var(--brass);
  color: #171614;
  font-weight: 600;
}

.editor-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-pill);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.editor-tab {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  padding: 7px 4px;
  border-radius: 8px;
  cursor: pointer;
}
.editor-tab.active {
  background: var(--bg-paper-elevated);
  color: var(--ink-primary);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(43,40,36,0.08);
}

.border-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.border-swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 6px 4px;
  background: var(--bg-paper);
  cursor: pointer;
}

.swatch-limited-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  font-size: 8.5px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  background: #6B232B;
  color: #F6E6C6;
  letter-spacing: 0.04em;
}

.border-swatch.active {
  border-color: var(--brass-dark);
  background: #F4ECDF;
}

.swatch-preview {
  width: 46px;
  height: 54px;
  border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
}

.swatch-inner-hole {
  position: absolute;
  top: 9%;
  left: 11%;
  right: 11%;
  bottom: 24%;
  background: #D9D2C5;
  border-radius: 1px;
}

.swatch-name {
  font-size: 11px;
  color: var(--ink-primary);
  white-space: nowrap;
}

/* Sliders & Forms */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-secondary);
}
.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--brass-dark);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.form-row.inline-toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.field-label { font-size: 12px; color: var(--ink-secondary); font-weight: 500; }
.field-title { font-size: 14px; color: var(--ink-primary); display: block; }
.field-sub { font-size: 12px; color: var(--ink-secondary); margin: 3px 0 0; line-height: 1.45; }

.text-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper);
  font-size: 14px;
  color: var(--ink-primary);
  font-family: inherit;
}
.text-input.mono { font-family: var(--font-mono); }

/* Developing Ceremony Overlay */
.develop-overlay {
  background: #EFE9DD;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  touch-action: manipulation;
}

.camera-slot-bar {
  width: 100%;
  height: calc(56px + var(--safe-top));
  background: linear-gradient(to bottom, #2A2724, #3B3631);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  z-index: 6;
}

.camera-slot-lip {
  width: 78%;
  height: 10px;
  border-radius: 5px;
  background: #141210;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.camera-slot-lip.is-ejecting {
  animation: slotMotorBuzz 60ms linear infinite;
}

@keyframes slotMotorBuzz {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1px); }
}

.develop-stage {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 900px;
  touch-action: manipulation;
}

.develop-frog-tongue {
  position: absolute;
  top: 0;
  left: 50%;
  width: 244px;
  height: 295px;
  margin-left: -122px;
  z-index: 5;
  pointer-events: none;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, rgba(16, 17, 20, 0.96) 0%, rgba(22, 23, 28, 0.88) 82%, rgba(28, 30, 36, 0.72) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 12px 24px -8px rgba(0,0,0,0.45);
  transform-origin: top center;
  animation: frogTongueOut var(--dur-eject) linear forwards;
}

.develop-frog-tongue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,0.12) 48%, transparent 66%);
  border-radius: inherit;
}

.develop-frog-tongue.is-retracting {
  animation: frogTongueRetract 400ms var(--ease-paper-lift) forwards;
}

@keyframes frogTongueOut {
  0%   { transform: translateY(-110%); opacity: 0.9; }
  8%   { transform: translateY(-102%); opacity: 1; }
  12%  { transform: translateY(-101%); }
  85%  { transform: translateY(-4%); }
  100% { transform: translateY(0); }
}

@keyframes frogTongueRetract {
  0%   { transform: scaleY(1) rotateX(0deg); opacity: 1; }
  100% { transform: scaleY(0) rotateX(35deg); opacity: 0.25; }
}

.develop-card-container {
  position: relative;
  z-index: 3;
  animation: ejectFilmMotor var(--dur-eject) linear forwards;
  will-change: transform;
}

@keyframes ejectFilmMotor {
  0%   { transform: translateY(-135%); }
  8%   { transform: translateY(-128%); }
  12%  { transform: translateY(-127%); }
  85%  { transform: translateY(-6%); }
  92%  { transform: translateY(2%) rotateX(-4deg); }
  100% { transform: translateY(0) rotateX(0deg); }
}

/* Two-layer GPU-friendly developing stack */
.develop-card-container .film-img-under {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  filter: blur(6.5px) saturate(0.14) contrast(0.68) brightness(1.06);
  pointer-events: none;
  will-change: opacity;
}

.develop-tint {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: multiply;
  will-change: opacity;
}

.film-print.brand-instax .develop-tint {
  background: radial-gradient(circle at 50% 45%, rgba(164, 198, 196, 0.72) 0%, rgba(132, 168, 166, 0.85) 100%);
}

.film-print.brand-polaroid .develop-tint {
  background: radial-gradient(circle at 50% 45%, rgba(76, 92, 138, 0.78) 0%, rgba(48, 60, 102, 0.88) 100%);
}

.develop-veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  will-change: opacity;
  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.92) calc(var(--dev-reveal, 0%) + 12%),
    rgba(0, 0, 0, 1) 100%
  );
  mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.92) calc(var(--dev-reveal, 0%) + 12%),
    rgba(0, 0, 0, 1) 100%
  );
}

.film-print.brand-instax .develop-veil {
  background: radial-gradient(circle at 50% 45%, #EFECE3 0%, #DFD9CA 100%);
}

.film-print.brand-polaroid .develop-veil {
  background: radial-gradient(circle at 50% 42%, #2A3142 0%, #1C2230 100%);
}

/* Gloss sheen overlay (front face only) */
.film-gloss-sheen {
  position: absolute;
  inset: -20%;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    125deg,
    transparent 30%,
    rgba(255, 255, 255, 0.24) 48%,
    rgba(255, 252, 245, 0.34) 50%,
    rgba(255, 255, 255, 0.18) 54%,
    transparent 70%
  );
  transform: translate3d(-60%, -60%, 0);
  transition: opacity 220ms ease;
}

.film-print.brand-polaroid .film-gloss-sheen {
  background: linear-gradient(
    125deg,
    transparent 32%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 68%
  );
}

.film-gloss-sheen.is-sheen-sweeping {
  animation: glossSweep 620ms var(--ease-ui-out) forwards;
}

@keyframes glossSweep {
  0% { opacity: 0; transform: translate3d(-65%, -65%, 0); }
  25% { opacity: 0.95; }
  80% { opacity: 0.85; }
  100% { opacity: 0; transform: translate3d(65%, 65%, 0); }
}

.film-gloss-sheen.is-sheen-active {
  opacity: 0.85;
  transform: translate3d(var(--sheen-x, 0%), var(--sheen-y, 0%), 0);
  transition: opacity 160ms ease;
}

/* Developing Tap FX Layer */
.develop-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  overflow: hidden;
}

.reagent-ripple {
  position: absolute;
  width: 80px;
  height: 80px;
  margin-left: -40px;
  margin-top: -40px;
  border-radius: 50%;
  border: 1.5px solid rgba(194, 163, 115, 0.55);
  background: radial-gradient(circle, rgba(255, 248, 232, 0.34) 0%, rgba(194, 163, 115, 0.14) 48%, transparent 72%);
  pointer-events: none;
  animation: reagentRipple 320ms var(--ease-ui-out) forwards;
}

@keyframes reagentRipple {
  0% { transform: scale(0.25); opacity: 0.95; }
  100% { transform: scale(1.18); opacity: 0; }
}

.tap-minus-one {
  position: absolute;
  margin-left: -12px;
  margin-top: -22px;
  font-family: var(--font-typewriter);
  font-size: 13px;
  font-weight: 600;
  color: var(--brass-dark);
  text-shadow: 0 1px 2px rgba(255, 252, 244, 0.85);
  pointer-events: none;
  animation: floatMinusOne 500ms var(--ease-ui-out) forwards;
}

@keyframes floatMinusOne {
  0% { transform: translateY(0) scale(0.92); opacity: 0; }
  20% { transform: translateY(-4px) scale(1); opacity: 0.9; }
  100% { transform: translateY(-16px) scale(1); opacity: 0; }
}

.btn-text-subtle {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
}

.btn-text-subtle:hover {
  color: var(--ink-secondary);
}

.develop-controls {
  width: 100%;
  padding: 16px 24px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 6;
}

.develop-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.develop-progress-bar {
  width: 196px;
  height: 5px;
  border-radius: 99px;
  background: rgba(43,40,36,0.12);
  overflow: hidden;
}

.develop-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--brass-dark);
  transition: width 160ms var(--ease-reagent);
}

.develop-timer-text {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  min-width: 40px;
  text-align: right;
  display: inline-block;
}

.develop-timer-text.is-tick {
  animation: timerTick 220ms var(--ease-paper-settle);
}

@keyframes timerTick {
  0% { transform: translateY(-2px); color: var(--ink-primary); }
  100% { transform: translateY(0); }
}

.develop-status {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
  text-align: center;
}

.develop-action-row {
  display: flex;
  gap: 10px;
}

/* Detail & 3D Flip Back */
#detailOverlay {
  background: rgba(239, 233, 220, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.detail-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  perspective: 1200px;
}

.flip-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.flip-card-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform var(--dur-flip) var(--ease-flip);
  will-change: transform;
}

.flip-card-inner.is-flipped {
  transform: rotateY(180deg);
}

/* Physical 2-3px Cardstock Edge Thickness visible during 3D flip */
.flip-edge {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: var(--edge-thickness, 2.5px);
  backface-visibility: visible;
  pointer-events: none;
  border-radius: 1px;
}

.flip-edge-right {
  right: 0;
  transform-origin: right center;
  transform: rotateY(90deg);
}

.flip-edge-left {
  left: 0;
  transform-origin: left center;
  transform: rotateY(-90deg);
}

.flip-card-inner.brand-polaroid .flip-edge {
  background: linear-gradient(to right, #EFEAE0 0%, #E2DDD2 55%, #3C3833 56%, #2C2925 100%);
}

.flip-card-inner.brand-instax .flip-edge {
  background: linear-gradient(to right, #F6F4EF 0%, #D7D2C7 60%, #E7E3DA 100%);
}

.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-front {
  position: relative;
  cursor: pointer;
}

.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

.flip-card-inner:not(.is-flipped) .flip-back {
  pointer-events: none;
}

.flip-card-inner.is-flipped .flip-front {
  pointer-events: none;
}

.back-paper {
  width: 100%;
  height: 100%;
  background: #F4F0E7;
  border: 1px solid rgba(43,40,36,0.14);
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 2px 4px rgba(36,28,18,0.18),
    0 18px 36px -10px rgba(45,36,22,0.28);
  padding: 13px 13px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  position: relative;
}

/* Instax Back: subtle vertical roller tracks along left & right edges */
.back-paper.brand-instax {
  background: linear-gradient(180deg, #EFECE5 0%, #E7E3DA 100%);
  border-radius: 4px;
}
.back-paper.brand-instax::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(43,40,36,0.06) 0%, transparent 4%, transparent 96%, rgba(43,40,36,0.06) 100%);
}

/* Polaroid Back: textured matte card with embossed 3-segment chemical pod footer */
.back-paper.brand-polaroid {
  background: #F6F1E7;
  border-radius: 2.5px;
}

.back-physical-footer {
  margin-top: auto;
  padding-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pod-ridges {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.back-paper.brand-polaroid .pod-ridges {
  display: grid;
}

.pod-ridges span {
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(160,148,130,0.16) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.9),
    0 1px 2px rgba(43,40,36,0.14);
}

.back-embossed-code {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-align: center;
  color: rgba(110, 102, 90, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  user-select: none;
}

.back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed rgba(43,40,36,0.16);
  padding-bottom: 6px;
}

.back-stamp {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.back-location-input {
  border: none;
  background: transparent;
  text-align: right;
  font-size: 11px;
  color: var(--ink-secondary);
  width: 100%;
  outline: none;
}

.back-note-textarea {
  width: 100%;
  border: none;
  background: rgba(235, 228, 214, 0.42);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--font-hand);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-primary);
  resize: none;
  outline: none;
}

.back-doodle-section {
  flex: 1;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.back-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-label {
  font-size: 10px;
  color: var(--ink-muted);
}

.doodle-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ink-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.ink-dot.active {
  border-color: var(--brass);
  transform: scale(1.15);
}

.doodle-canvas {
  width: 100%;
  flex: 1;
  min-height: 68px;
  background: #FFFDF8;
  border: 1px dashed rgba(43,40,36,0.14);
  border-radius: 8px;
  touch-action: none;
  cursor: crosshair;
}

.back-voice-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.voice-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.voice-rec-btn, .voice-play-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper-elevated);
  color: var(--ink-primary);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.voice-rec-btn.recording {
  background: #FBE9E7;
  border-color: var(--danger);
  color: var(--danger);
}

.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
  padding-left: 6px;
}
.voice-wave span {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--brass-dark);
  animation: wavePulse 0.7s ease-in-out infinite alternate;
}
.voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; }
.voice-wave span:nth-child(4) { animation-delay: 0.3s; }
.voice-wave span:nth-child(5) { animation-delay: 0.15s; }
.voice-wave span:nth-child(6) { animation-delay: 0.25s; }

@keyframes wavePulse {
  from { height: 4px; }
  to { height: 14px; }
}

.detail-bottom-actions {
  flex-shrink: 0;
  padding: 12px 16px calc(18px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-paper-elevated);
  border-top: 1px solid var(--border-subtle);
}

.detail-action-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-size: 12px;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
}
.detail-action-btn.primary {
  background: var(--ink-primary);
  color: #FAF7F1;
  border-color: var(--ink-primary);
}
.detail-action-btn.danger {
  color: var(--danger);
  border-color: rgba(178, 75, 62, 0.32);
  background: rgba(178, 75, 62, 0.06);
  font-weight: 500;
}

/* Collage Studio */
.collage-preview-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #EAE3D5;
  gap: 6px;
}

#collageCanvas {
  max-width: 100%;
  max-height: calc(100% - 22px);
  border-radius: 8px;
  box-shadow: var(--shadow-paper);
  touch-action: none;
  cursor: grab;
}

.collage-drag-hint {
  font-size: 11px;
  color: var(--ink-secondary);
}

.collage-picker-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.collage-thumb {
  position: relative;
  width: 52px;
  height: 62px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #FFF;
}
.collage-thumb.selected {
  border-color: var(--brass-dark);
}
.collage-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.collage-thumb-check {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brass-dark);
  color: #FFF;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collage-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Settings & Shared Buttons */
.settings-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.settings-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.settings-stat-row p { margin: 3px 0 0; font-size: 12px; color: var(--ink-secondary); }

.badge-local {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(74, 107, 93, 0.14);
  color: #38584B;
  font-weight: 600;
}

.settings-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.nfc-url-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
  word-break: break-all;
}

.edition-switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.edition-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper-elevated);
  color: var(--ink-primary);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.edition-switch-link.active {
  background: var(--ink-primary);
  color: #FAF7F1;
  border-color: var(--ink-primary);
}

.edition-switch-link.replay {
  color: #6B232B;
  border-color: rgba(107, 35, 43, 0.28);
  background: rgba(107, 35, 43, 0.06);
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.switch-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  cursor: pointer;
}

.switch-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  transition: background 180ms ease, border-color 180ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFDF9;
  box-shadow: 0 2px 5px rgba(36, 26, 14, 0.22);
  transition: transform 200ms var(--ease-ui-out);
}

.switch-pill input:checked + .switch-track {
  background: var(--brass-dark);
  border-color: var(--brass-dark);
}

.switch-pill input:checked + .switch-track::after {
  transform: translateX(18px);
}

.settings-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.settings-footer-row .btn-text-cancel {
  width: auto;
  margin: 0;
  padding: 8px 14px;
}

.btn-primary {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--ink-primary);
  color: #FAF7F1;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.btn-secondary {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--bg-paper-elevated);
  color: var(--ink-primary);
  font-size: 13px;
  cursor: pointer;
}

.btn-chip-subtle {
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper);
  color: var(--ink-secondary);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.btn-micro {
  border: 1px solid var(--border-subtle);
  background: var(--bg-paper-elevated);
  color: var(--ink-secondary);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
}

.crop-mode-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.zoom-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--brass-dark);
}

/* Streamlined Optical Film Presets */
.film-preset-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 6px;
}
.film-preset-strip::-webkit-scrollbar { display: none; }

.film-preset-card {
  flex-shrink: 0;
  width: 72px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 7px 5px;
  background: var(--bg-paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.film-preset-card.active {
  border-color: var(--brass-dark);
  background: #F4ECDF;
  box-shadow: 0 3px 10px rgba(155, 125, 78, 0.16);
}

.film-preset-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.6), 0 2px 5px rgba(0,0,0,0.12);
}

.film-preset-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-primary);
  white-space: nowrap;
}

.film-preset-desc {
  font-size: 9.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.film-quick-controls {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 4px;
}

.slider-group.compact {
  margin-bottom: 8px;
}

.halation-toggle-row {
  margin-bottom: 0;
  padding-top: 6px;
  border-top: 1px dashed rgba(43,40,36,0.1);
}

.field-sub-mini {
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--ink-muted);
}

.fine-tune-details {
  margin-top: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-paper);
  padding: 8px 12px;
}

.fine-tune-details summary {
  font-size: 12px;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}

.fine-tune-body {
  padding-top: 10px;
}

/* Mobile Long-Press Save Export Modal */
.sheet-backdrop.center-modal {
  z-index: 220;
  align-items: center;
  padding: 18px;
}

.export-modal-card {
  width: 100%;
  max-width: 390px;
  max-height: 88dvh;
  background: var(--bg-paper-elevated);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  animation: sheetUp 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.export-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}

.export-image-stage {
  background: #EAE4D7;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 55dvh;
}

#exportPreviewImg {
  max-width: 100%;
  max-height: 50dvh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 26px rgba(36, 28, 18, 0.22);
  -webkit-touch-callout: default;
  user-select: auto;
}

.export-longpress-tip {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  text-align: center;
  line-height: 1.5;
}

.export-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Confirm Delete Dialog */
#confirmDeleteModal {
  z-index: 240;
}

.confirm-modal-card {
  width: 100%;
  max-width: 310px;
  background: var(--bg-paper-elevated);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 46px rgba(24, 18, 12, 0.28);
  animation: sheetUp 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.confirm-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-primary);
  text-align: center;
}

.confirm-message {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
  text-align: center;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.confirm-danger-btn {
  border: none;
  border-radius: 12px;
  background: var(--danger);
  color: #FFFDF9;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 12px;
  cursor: pointer;
}

.confirm-danger-btn:active {
  transform: scale(0.97);
}

/* Toast */
.toast {
  position: fixed;
  top: calc(16px + var(--safe-top, 0px));
  left: 50%;
  z-index: 300;
  background: #F2E9D5;
  color: #4A3A26;
  padding: 8px 16px 9px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  white-space: nowrap;
  transform: translateX(-50%) rotate(-1deg);
  /* 纸胶带质感：半透明哑光 + 轻微纹理 + 两端浅锯齿 */
  opacity: 0.94;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.018) 0 2px, transparent 2px 4px);
  clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 50%, calc(100% - 2px) 100%, 2px 100%, 0 50%);
}
/* 进入：从顶部斜贴下来 */
.toast:not(.hidden) { animation: toastTapeIn 0.24s var(--ease-ui-out, cubic-bezier(0.22,1,0.36,1)) both; }
/* 消失：从右端撕起（上卷 + 淡出） */
.toast.toast-out { animation: toastTapeOut 0.2s var(--ease-ui-in, cubic-bezier(0.4,0,1,1)) both; }
@keyframes toastTapeIn {
  from { transform: translateX(-50%) translateY(-16px) rotate(-2deg); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0) rotate(-1deg); opacity: 0.94; }
}
@keyframes toastTapeOut {
  from { transform: translateX(-50%) translateY(0) rotate(-1deg); opacity: 0.94; }
  to   { transform: translateX(-40%) translateY(-10px) rotate(4deg); opacity: 0; }
}

/* ============================================================
   NFC Limited Edition: 2026 Christmas Luxury Theme & Unboxing Cover
   ============================================================ */
body[data-edition="xmas"] {
  --ink-primary: #1E332A;
  --brass: #C6A469;
  --brass-dark: #8F6D36;
}

body[data-edition="xmas"] .app-shell {
  background:
    radial-gradient(ellipse 88% 26% at 50% 0%, rgba(214, 178, 112, 0.34) 0%, rgba(198, 164, 105, 0.14) 52%, transparent 100%),
    radial-gradient(circle at 14% 90%, rgba(198, 164, 105, 0.18) 0%, transparent 46%),
    radial-gradient(circle at 88% 88%, rgba(107, 35, 43, 0.09) 0%, transparent 45%),
    linear-gradient(180deg, #EFE7D8 0%, #F5F0E6 34%, #F2ECE0 100%);
}

body[data-edition="xmas"] .series-badge {
  background: linear-gradient(135deg, rgba(107, 35, 43, 0.14), rgba(198, 164, 105, 0.22));
  border-color: rgba(107, 35, 43, 0.28);
  color: #6B232B;
  font-weight: 600;
}

/* Scheme A: Three-Layer Warm Golden Bokeh & Depth-of-Field Snowfall */
.edition-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  transition: opacity 600ms ease-out;
}

.edition-atmosphere.is-atmos-hidden {
  opacity: 0;
}

.edition-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 92% 20% at 50% -2%, rgba(255, 248, 230, 0.55) 0%, rgba(218, 184, 122, 0.18) 55%, transparent 100%),
    radial-gradient(ellipse 80% 16% at 50% 102%, rgba(255, 249, 235, 0.42) 0%, transparent 75%);
  pointer-events: none;
}

.snow-particle {
  position: absolute;
  top: -42px;
  pointer-events: none;
  will-change: transform, opacity;
  animation-name: snowFallDepth, snowSwayPulse;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-direction: normal, alternate;
}

/* Layer 1: Background Fine Snow Dust */
.snow-bg-dust {
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0%, #FBF5E8 65%, rgba(226, 198, 147, 0.25) 100%);
  box-shadow:
    0 1px 3px rgba(130, 102, 56, 0.28),
    0 0 5px rgba(255, 252, 242, 0.85);
}

/* Layer 2A: Mid-ground Soft Orbs */
.snow-mid-orb {
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #FFFFFF 0%, #FFF9EC 52%, rgba(232, 206, 158, 0.55) 82%, transparent 100%);
  box-shadow:
    0 1.5px 5px rgba(125, 96, 50, 0.26),
    0 0 8px rgba(255, 250, 236, 0.92);
}

/* Layer 2B: Mid-ground Six-Petal Micro Snowflakes (Lightweight Unicode glyph) */
.snow-mid-flake {
  color: #FFFDF8;
  line-height: 1;
  text-shadow:
    0 1px 2px rgba(122, 92, 44, 0.36),
    0 0 4px rgba(255, 248, 228, 0.85);
}

/* Layer 3: Foreground Out-of-Focus Warm Champagne Bokeh Circles (Zero GPU blur overhead) */
.snow-fg-bokeh {
  border-radius: 50%;
  background: radial-gradient(
    circle at 42% 38%,
    rgba(255, 253, 246, 0.78) 0%,
    rgba(252, 241, 214, 0.45) 45%,
    rgba(226, 195, 138, 0.16) 72%,
    transparent 100%
  );
  box-shadow: 0 2px 10px rgba(168, 134, 76, 0.12);
}

/* Layer 4: Snow That Lands On The Photo Paper Pile (P3 雪落相纸) */
.snow-on-paper {
  animation-name: snowLandOnPaper, snowLandSettle;
  animation-timing-function: linear, ease-out;
  animation-iteration-count: infinite, infinite;
}
@keyframes snowLandOnPaper {
  0% {
    transform: translate3d(0, -40px, 0);
    opacity: 0;
  }
  12% {
    opacity: var(--snow-opacity, 0.8);
  }
  82% {
    opacity: var(--snow-opacity, 0.8);
    transform: translate3d(var(--snow-drift, 0px), var(--snow-land, 68dvh), 0);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--snow-drift, 0px), var(--snow-land, 68dvh), 0);
  }
}
@keyframes snowLandSettle {
  0%, 88% {
    filter: none;
  }
  92% {
    filter: brightness(1.35);
  }
  100% {
    filter: brightness(1.1);
  }
}

@keyframes snowFallDepth {
  0% {
    transform: translate3d(0, -40px, 0);
    opacity: 0;
  }
  10% {
    opacity: var(--snow-opacity, 0.65);
  }
  88% {
    opacity: var(--snow-opacity, 0.65);
  }
  100% {
    transform: translate3d(var(--snow-drift, 22px), 106dvh, 0);
    opacity: 0;
  }
}

@keyframes snowSwayPulse {
  0% {
    margin-left: calc(var(--snow-sway, 8px) * -1);
  }
  100% {
    margin-left: var(--snow-sway, 8px);
  }
}

@keyframes snowSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Luxury First-Time NFC Unboxing Cover (Browser-Safe Full-Bleed Burgundy Backdrop + Sleeve + Centered Dark Slide) */
.edition-cover-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  width: 100%;
  height: 100dvh;
  color: #F6EFE2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.edition-cover-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 34% at 50% 0%, rgba(246, 224, 180, 0.22) 0%, transparent 65%),
    radial-gradient(circle at 50% 45%, #581018 0%, #3A080F 72%, #26050A 100%);
  transition: opacity 340ms ease;
  pointer-events: none;
}

.edition-cover-overlay.is-unboxing::before {
  opacity: 0;
}

.edition-cover-overlay.is-unboxing {
  pointer-events: none;
}

/* Centered Physical-Ratio Christmas Dark Slide under the sleeve */
.edition-dark-slide {
  position: relative;
  z-index: 1;
  width: min(216px, 56vw);
  aspect-ratio: 88 / 107;
  border-radius: 5px;
  background: linear-gradient(155deg, #242322 0%, #161515 58%, #0E0D0D 100%);
  border: 1px solid rgba(214, 184, 130, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 24px 48px -12px rgba(24, 18, 12, 0.45),
    0 8px 18px -6px rgba(24, 18, 12, 0.30);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 220ms ease, transform 420ms var(--ease-paper-lift);
  will-change: transform, opacity;
  pointer-events: none;
}

.edition-cover-overlay.is-unboxing .edition-dark-slide {
  opacity: 1;
  transform: scale(1);
}

.edition-cover-overlay.is-darkslide-exit .edition-dark-slide {
  opacity: 0;
  transform: translate3d(125%, 48%, 0) rotate(10deg) scale(0.98);
  transition: transform 420ms var(--ease-paper-lift), opacity 320ms ease 100ms;
}

.dark-slide-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 34px;
  height: 11px;
  margin-left: -17px;
  border-radius: 0 0 18px 18px;
  background: rgba(255, 248, 232, 0.08);
  border-bottom: 1px solid rgba(214, 184, 130, 0.22);
}

.dark-slide-foil {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.dark-slide-brand {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: rgba(226, 198, 147, 0.72);
}

.dark-slide-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: rgba(246, 239, 226, 0.38);
}

/* Pull-up Sleeve Container */
.edition-cover-sleeve {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  margin: 0 auto;
  padding: calc(20px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(ellipse 70% 24% at 50% 0%, rgba(246, 224, 180, 0.38) 0%, rgba(214, 184, 130, 0.12) 55%, transparent 100%),
    linear-gradient(168deg, #7A1822 0%, #581018 62%, #3A080F 100%);
  box-shadow: 0 24px 64px rgba(18, 4, 6, 0.55);
  display: flex;
  align-items: stretch;
  justify-content: center;
  will-change: transform;
  transition: transform 480ms var(--ease-paper-lift);
}

.edition-cover-overlay.is-replaying-in .edition-cover-sleeve {
  animation: sleeveDropIn 360ms var(--ease-ui-out) forwards;
}

@keyframes sleeveDropIn {
  0% { transform: translate3d(0, -104%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.edition-cover-overlay.is-unboxing .edition-cover-sleeve {
  transform: translate3d(0, -108%, 0);
}

.edition-cover-frame {
  flex: 1;
  border: 1px solid rgba(214, 184, 130, 0.42);
  border-radius: 18px;
  padding: 28px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  box-shadow: inset 0 0 0 4px rgba(20, 37, 29, 0.6), inset 0 0 0 5px rgba(214, 184, 130, 0.18);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 360ms var(--ease-ui-out), transform 360ms var(--ease-ui-out);
}

.edition-cover-overlay.is-revealed .edition-cover-frame {
  opacity: 1;
  transform: scale(1);
}

.cover-top-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cover-star {
  font-size: 16px;
  color: #D6B882;
  line-height: 1;
}

.cover-eyebrow {
  max-width: 100%;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(246, 239, 226, 0.78);
  font-weight: 500;
  white-space: nowrap;
}

.cover-center-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover-mini-trio {
  position: relative;
  width: 146px;
  height: 98px;
  margin-bottom: 22px;
}

.cover-mini-trio .mini-card {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 62px;
  height: 78px;
  margin-left: -31px;
  border-radius: 3px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.38);
  transform: translate3d(0, 4px, 0) rotate(0deg);
  transition: transform 440ms var(--ease-paper-settle) 120ms;
  will-change: transform;
}

.cover-mini-trio .mini-card::after {
  content: "";
  position: absolute;
  inset: 7px 7px 20px;
  border-radius: 1px;
  background: rgba(255, 250, 240, 0.12);
}

.cover-mini-trio .mc-left {
  background: linear-gradient(145deg, #274336, #182C23);
  border: 1px solid rgba(214, 184, 130, 0.45);
}

.cover-mini-trio .mc-right {
  background: linear-gradient(145deg, #F6EFE2, #E4DAC7);
  border: 1px solid rgba(107, 35, 43, 0.35);
}

.cover-mini-trio .mc-center {
  background: linear-gradient(145deg, #742730, #4B151B);
  border: 1px solid rgba(214, 184, 130, 0.72);
  z-index: 2;
}

.edition-cover-overlay.is-revealed .cover-mini-trio .mc-left {
  transform: translate3d(-34px, 0, 0) rotate(-11deg);
}

.edition-cover-overlay.is-revealed .cover-mini-trio .mc-right {
  transform: translate3d(34px, 0, 0) rotate(11deg);
}

.edition-cover-overlay.is-revealed .cover-mini-trio .mc-center {
  transform: translate3d(0, -6px, 0);
}

.edition-cover-overlay.is-pinching .cover-mini-trio .mc-left {
  transform: translate3d(-29px, 1px, 0) rotate(-9deg);
  transition-duration: 90ms;
}

.edition-cover-overlay.is-pinching .cover-mini-trio .mc-right {
  transform: translate3d(29px, 1px, 0) rotate(9deg);
  transition-duration: 90ms;
}

.cover-display-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #FBF5E8;
  padding-left: 0.08em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms var(--ease-ui-out) 200ms, transform 380ms var(--ease-ui-out) 200ms;
}

.cover-display-year {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  color: #E2C693;
  padding-left: 0.22em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms var(--ease-ui-out) 250ms, transform 380ms var(--ease-ui-out) 250ms;
}

.cover-subcopy {
  margin: 18px 0 0;
  max-width: 260px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(246, 239, 226, 0.78);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms var(--ease-ui-out) 300ms, transform 380ms var(--ease-ui-out) 300ms;
}

.cover-bottom-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms var(--ease-ui-out) 340ms, transform 380ms var(--ease-ui-out) 340ms;
}

.edition-cover-overlay.is-revealed .cover-display-title,
.edition-cover-overlay.is-revealed .cover-display-year,
.edition-cover-overlay.is-revealed .cover-subcopy,
.edition-cover-overlay.is-revealed .cover-bottom-actions {
  opacity: 1;
  transform: translateY(0);
}

.cover-cta-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 248px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 248, 232, 0.42);
  background: linear-gradient(135deg, #E2C693 0%, #C29D5E 100%);
  color: #1B2822;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  transition: transform var(--dur-tap) ease;
}

.cover-cta-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 28%, rgba(255, 252, 240, 0.42) 50%, transparent 72%);
  transform: translateX(-120%);
  animation: ctaSheen 3.6s ease-in-out 0.9s infinite;
  pointer-events: none;
}

@keyframes ctaSheen {
  0%, 72% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.cover-cta-btn:active {
  transform: scale(0.96);
}

.cover-swipe-hint {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(246, 239, 226, 0.52);
}

.cover-colophon {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: rgba(226, 198, 147, 0.8);
}

@media (max-height: 660px) {
  .edition-cover-sleeve {
    padding: calc(14px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  }
  .edition-cover-frame {
    padding: 18px 16px 14px;
  }
  .cover-mini-trio {
    transform: scale(0.86);
    margin-bottom: 10px;
  }
  .cover-display-title {
    font-size: 36px;
  }
  .cover-display-year {
    font-size: 34px;
    margin-top: 6px;
  }
  .cover-subcopy {
    margin-top: 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .snow-particle,
  .snow-mid-flake svg,
  .empty-frame-inner {
    animation: none;
    opacity: 0.45;
  }
  .snow-particle.snow-on-paper {
    transform: translate3d(var(--snow-drift, 0px), var(--snow-land, 68dvh), 0);
    opacity: var(--snow-opacity, 0.8);
  }
  .empty-frame-inner {
    opacity: 1;
  }
  .spread-board {
    transform: none !important;
  }
  .edition-cover-overlay .cover-mini-trio .mc-left {
    transform: translate3d(-34px, 0, 0) rotate(-11deg);
  }
  .edition-cover-overlay .cover-mini-trio .mc-right {
    transform: translate3d(34px, 0, 0) rotate(11deg);
  }
  .edition-cover-overlay .cover-mini-trio .mc-center {
    transform: translate3d(0, -6px, 0);
  }
  .edition-cover-frame,
  .cover-display-title,
  .cover-display-year,
  .cover-subcopy,
  .cover-bottom-actions {
    opacity: 1;
    transform: none;
  }
  .flip-card-inner,
  .flip-card-inner.is-flipped {
    transform: none !important;
  }
  .flip-back {
    transform: none !important;
    opacity: 0;
    transition: opacity 160ms ease !important;
  }
  .flip-card-inner.is-flipped .flip-back {
    opacity: 1;
  }
  .flip-card-inner.is-flipped .flip-front {
    opacity: 0;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Eject Ceremony v2 · 半台相机 + 相纸弹出/翻面/显影 → 缩小归档
   （出片层专用；首页 Dock 保持原 62×60 小相机不变）
   ============================================================ */

/* --- 全屏层：干净的舞台，只有相机与相纸 --- */
.develop-overlay {
  display: block;
  background: radial-gradient(120% 80% at 50% 0%, #fbfaf8 0%, #efeeea 45%, #dedcd7 100%);
  user-select: none;
}
.develop-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 40% at 50% 18%, rgba(255, 255, 255, 0.9), transparent 70%);
  pointer-events: none;
}
.ej-stage {
  --sw: min(100vw, 400px, calc((100vh - 56px) * 0.68));
  --pw: calc(var(--sw) * 0.555);
  --ph: calc(var(--pw) * var(--ej-ratio, 1.5926));
  --rd: calc(var(--pw) * 0.022);
  --cam-w: calc(var(--sw) * 0.78);
  --cam-h: calc(var(--cam-w) * 60 / 62);
  --ej-eject: 2600ms;
  --ej-flip: 700ms;
  --ej-dev: 25000ms;
  --ej-ease-eject: cubic-bezier(0.16, 0.86, 0.26, 1.02);

  position: absolute;
  inset: 0;
  isolation: isolate;
}

/* 相纸停靠位：相机顶 + 0.36 × 纸宽 的空隙 */
.ej-stack {
  position: absolute;
  left: 50%;
  bottom: calc(var(--cam-h) * 30 / 60 + var(--pw) * 0.36);
  width: 0;
  height: 0;
  z-index: 1;
}

/* 出纸缝后唇（z-index 低于相纸）：与机身前唇夹住相纸，不再在机顶上方悬空画假阴影 */
.ej-slot-shade {
  position: absolute;
  left: 50%;
  bottom: calc(var(--cam-h) * 30 / 60 - 1px);
  width: calc(var(--pw) + 8px);
  height: 2px;
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 2px 2px 0 0;
  background: #14161b;
  opacity: 1;
  pointer-events: none;
}

/* 完全显影后出现的「加入相册」：点了立刻归档回首页，不点也会在停留后自动归档 */
.ej-add-btn {
  position: absolute;
  left: 50%;
  bottom: calc(var(--cam-h) * 30 / 60 + var(--ph) + var(--pw) * 0.36 + 26px);
  z-index: 60;
  display: block;
  margin: 0;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: #1B1C1F;
  color: #F7F5F0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  box-shadow:
    0 12px 24px -12px rgba(20, 18, 16, 0.55),
    0 2px 6px rgba(20, 18, 16, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transform: translate3d(-50%, 8px, 0);
  transition: opacity 0.36s ease, transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.ej-stage.is-developed .ej-add-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0);
}
.ej-stage.is-developed .ej-add-btn:active {
  transform: translate3d(-50%, 0, 0) scale(0.96);
}

/* 相纸：容器负责出片位移 + 3D 透视；卡片负责翻面 */
.ej-paper {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--pw);
  height: var(--ph);
  margin-left: calc(var(--pw) / -2);
  transform-origin: 50% 92%;
  will-change: transform;
  perspective: 1500px;
  perspective-origin: 50% 62%;
}
.ej-card {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform var(--ej-flip) cubic-bezier(0.34, 0.72, 0.26, 1);
  will-change: transform;
}
.ej-paper.is-front .ej-card {
  transform: rotateY(0deg);
}
.ej-face {
  position: absolute;
  inset: 0;
  border-radius: var(--rd);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.ej-front {
  background: #fefefd;
  /* 悬浮状态给一层贴着边的浅影，不做大范围落地投影（否则纸和相机之间会出现一条"假出纸口"） */
  box-shadow: 0 6px 12px -8px rgba(20, 18, 16, 0.45);
}
.ej-front .film-print {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.96),
    inset -1.5px -1.5px 0 rgba(145, 140, 132, 0.34);
}

/* 背面：整幅深色涂层 + 顶部警示条 + 底部品牌条 */
.ej-back {
  transform: rotateY(180deg);
  background: #0d0507;
  box-shadow:
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.55),
    0 6px 12px -8px rgba(20, 18, 16, 0.45);
}
.ej-back::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 7;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.42);
}
.ej-front::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  box-shadow:
    inset 1.4px 0 0 rgba(255, 255, 255, 0.9),
    inset -1.4px 0 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.5);
}
.ej-sheet {
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(97deg, rgba(255, 255, 255, 0.035) 0 6%, rgba(255, 255, 255, 0) 13% 46%, rgba(255, 255, 255, 0.028) 56% 60%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(90% 46% at 46% 18%, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0) 70%),
    radial-gradient(150% 100% at 50% 48%, #1a0c11 0%, #14080c 54%, #0d0507 100%);
  box-shadow: inset 0 -18% 24% -16% rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.ej-warn,
.ej-foot {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  color: #fff;
}
.ej-warn {
  top: 0;
  height: calc(var(--ph) * 0.071);
  background: linear-gradient(180deg, #a2a5aa 0%, #96999e 1.6%, #7d8086 7%, #6a6d73 46%, #777a80 76%, #94979d 93%, #80838a 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}
.ej-warn .run {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: calc(var(--pw) * 0.035);
  font: 600 calc(var(--pw) * 0.0455) / 1.02 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.005em;
}
.ej-warn .unit {
  display: flex;
  align-items: center;
  gap: calc(var(--pw) * 0.022);
}
.ej-warn .t {
  display: inline-block;
  transform: scaleX(0.87);
  transform-origin: 50% 50%;
}
.ej-warn .ico {
  position: relative;
  width: calc(var(--pw) * 0.052);
  height: calc(var(--pw) * 0.052);
  flex: none;
  border: 1.2px solid rgba(255, 255, 255, 0.92);
  border-radius: 2.5px;
  overflow: hidden;
}
.ej-warn .ico::before {
  content: "";
  position: absolute;
  left: 22%;
  top: 20%;
  width: 44%;
  height: 44%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 calc(var(--pw) * 0.012) 0 calc(var(--pw) * 0.004) rgba(255, 255, 255, 0.55);
}
.ej-warn .ico::after {
  content: "";
  position: absolute;
  left: -12%;
  top: 47%;
  width: 124%;
  height: 1.4px;
  background: #fff;
  transform: rotate(-45deg);
}
.ej-foot {
  bottom: 0;
  height: calc(var(--ph) * 0.171);
  background: linear-gradient(180deg, #9a9da2 0%, #8d9095 1.4%, #5a5d63 4.5%, #53565c 40%, #4c4f56 90%, #85888e 96%, #a4a7ac 99%, #b0b3b8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.ej-foot .run {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: calc(var(--pw) * 0.26);
}
.ej-foot .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--pw) * 0.019);
}
.ej-foot .w1 {
  display: inline-block;
  font: 600 calc(var(--pw) * 0.104) / 1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.008em;
  transform: scaleX(0.79);
}
.ej-foot .w2 {
  display: inline-block;
  font: 600 calc(var(--pw) * 0.049) / 1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.045em;
  opacity: 0.95;
}

/* 显影：由 app.js 的 applyDevelopVisuals 驱动 veil/under/tint 与 img filter */
.ej-front .film-img-sharp,
.ej-front .film-img-under {
  will-change: filter, opacity;
}

/* --- 相机：与 Dock 图标同一台，em 等比放大（1em = 1 设计像素），只露上半 30em --- */
.ej-camera {
  position: absolute;
  left: 50%;
  bottom: calc(var(--cam-h) * -30 / 60);
  transform: translateX(-50%);
  width: 62em;
  height: 60em;
  font-size: calc(var(--cam-w) / 62);
  z-index: 40;
  border-radius: 6em;
  overflow: hidden;
  background: #1B1C1F;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 22px 44px -10px rgba(20, 18, 16, 0.5),
    0 2px 5px rgba(24, 22, 20, 0.2),
    0 0 0 1px rgba(24, 24, 28, 0.72);
}
.ej-camera i,
.ej-camera b {
  display: block;
  font-style: normal;
  font-weight: 700;
}
.ej-camera::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: calc(var(--pw) + 8px);
  height: 1.05em;
  transform: translateX(-50%);
  border-radius: 0 0 0.5em 0.5em;
  background: linear-gradient(180deg, #050608 0%, #101318 72%, #22262e 100%);
  box-shadow:
    inset 0 0.5em 0.9em rgba(0, 0, 0, 0.92),
    0 1px 0 rgba(255, 255, 255, 0.16);
  z-index: 5;
}
.ejc-top {
  flex: 0 0 13.5em;
  position: relative;
  background: linear-gradient(180deg, #34363D 0%, #1B1C20 100%);
  border-bottom: 1em solid #0E0F12;
  box-shadow: inset 0 0.32em 0 rgba(255, 255, 255, 0.2);
}
.ejc-grille {
  position: absolute;
  left: 3em;
  top: 2.5em;
  width: 33em;
  height: 8.5em;
  border-radius: 1.2em;
  background: repeating-linear-gradient(90deg, #232429 0 1em, #121316 1em 2em);
  box-shadow: inset 0 0 0 0.5em rgba(0, 0, 0, 0.8);
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 2em 0 2.5em;
}
.ejc-brand {
  font-size: 3.6em;
  letter-spacing: 0.06em;
  color: #E5E7EB;
  line-height: 1;
}
.ejc-bolt {
  position: relative;
  flex: 0 0 5em;
  width: 5em;
  height: 5em;
  border-radius: 0.8em;
  background: linear-gradient(180deg, #F5F6F8, #CFD3D9);
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.ejc-bolt svg {
  display: block;
  width: 3.5em;
  height: 3.5em;
}
.ejc-flash {
  position: absolute;
  right: 3em;
  top: 2.5em;
  width: 21em;
  height: 8.5em;
  border-radius: 1.2em;
  background:
    radial-gradient(ellipse 75% 55% at 50% 45%, rgba(255, 255, 255, 0.96) 0%, rgba(215, 220, 226, 0.5) 70%, transparent 100%),
    repeating-linear-gradient(180deg, #E4E7EC 0 1.2em, #B8BDC5 1.2em 2.4em);
  box-shadow:
    inset 0 0 0 1em rgba(40, 42, 48, 0.55),
    inset 0 1em 1em -0.5em rgba(255, 255, 255, 0.35),
    0 0 3em rgba(255, 255, 255, 0.25);
}
.ejc-neck {
  flex: 0 0 2.5em;
  position: relative;
  background: linear-gradient(180deg, #16171A 0%, #2C2E34 100%);
}
.ejc-neck::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 18em;
  height: 4em;
  margin-left: -9em;
  background: linear-gradient(180deg, #18191D, #27292E);
  border-radius: 0 0 2.5em 2.5em;
  z-index: 2;
}
.ejc-body {
  flex: 1;
  position: relative;
  background: linear-gradient(180deg, #FAFAFB 0%, #ECEEF1 65%, #D5D8DE 100%);
  box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 2px rgba(90, 94, 102, 0.28);
}
.ejc-lens {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 21em;
  height: 21em;
  margin: -10.5em 0 0 -10.5em;
  border-radius: 4.5em;
  background: linear-gradient(145deg, #2A2C31, #101114);
  box-shadow: 0 0 0 1px #E8EAEF, 0 0 0 2px #1F2126, 0 1.5px 3px rgba(0, 0, 0, 0.28);
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.ejc-glass {
  width: 12em;
  height: 12em;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #7C818C 0%, #24262C 38%, #07080A 78%);
  box-shadow: 0 0 0 0.8em rgba(255, 255, 255, 0.16), inset 0 1px 1.5px rgba(255, 255, 255, 0.25);
}
.ejc-timer {
  position: absolute;
  left: 5em;
  bottom: 3em;
  width: 7em;
  height: 7em;
  border-radius: 1.6em;
  background: linear-gradient(180deg, #FFFFFF, #DFE2E7);
  box-shadow: 0 0 0 0.8em #8E929B, 0 1px 1px rgba(0, 0, 0, 0.2);
}
.ejc-timer::after {
  content: "";
  position: absolute;
  inset: 1.8em;
  border-radius: 50%;
  border: 0.8em solid #555860;
}
.ejc-slider {
  position: absolute;
  left: 50%;
  bottom: 3em;
  width: 11em;
  height: 4.5em;
  margin-left: -5.5em;
  border-radius: 1em;
  background: linear-gradient(180deg, #D0D3D9 0 60%, #1F2024 60% 100%);
  box-shadow: 0 0 0 0.6em #7A7E86;
}
.ejc-red {
  position: absolute;
  right: 4em;
  bottom: 1.5em;
  width: 11em;
  height: 8em;
  border-radius: 1.6em;
  background: repeating-linear-gradient(180deg, #C93A32 0 1.2em, #9E231D 1.2em 2.4em);
  box-shadow: 0 -1.5em 0 #1B1C20, 0 0 0 1.3em #1B1C20, 0 1px 1.5px rgba(0, 0, 0, 0.35);
}
.ejc-ledge {
  flex: 0 0 4em;
  background: linear-gradient(180deg, #FFFFFF 0%, #E4E7EC 55%, #C4C8D0 100%);
  border-top: 0.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #141518;
}
.ejc-base {
  flex: 0 0 9em;
  position: relative;
  background: repeating-linear-gradient(90deg, #202227 0 1em, #121316 1em 2em);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1em 4em 1.5em;
}
.ejc-af {
  align-self: flex-end;
  font-size: 3em;
  letter-spacing: 0.12em;
  color: #9CA1AB;
  line-height: 1;
}
.ejc-slot {
  width: 100%;
  height: 2em;
  border-radius: 1em;
  background: #070809;
  box-shadow: 0 0.5em 0 rgba(255, 255, 255, 0.14);
}

/* 归档飞行克隆：缩小飞向首页相册第一张 */
.ej-fly-clone {
  position: fixed;
  z-index: 250;
  pointer-events: none;
  transform-origin: center center;
  margin: 0 !important;
}
