.scatta-main {
  padding: 28px 0 96px;
}

.scatta-header {
  margin-bottom: 36px;
  max-width: 860px;
}

.scatta-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--olive);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.scatta-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.scatta-title {
  margin: 12px 0 0;
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--wine);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

.scatta-title em {
  font-style: italic;
  font-weight: 600;
  color: var(--wine-deep);
}

.scatta-desc {
  margin: 22px 0 0;
  max-width: 520px;
  font-size: 1.125rem;
  line-height: 1.55;
  color: rgba(36, 20, 22, 0.84);
  font-style: italic;
}

.scatta-banner {
  margin: 0 0 22px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(101, 37, 42, 0.12);
  background: rgba(255, 250, 245, 0.82);
  color: var(--wine-deep);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.scatta-banner[hidden] {
  display: none !important;
}

.scatta-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.scatta-banner-actions[hidden] {
  display: none !important;
}

.scatta-banner-actions .ghost-btn,
.scatta-banner-actions .primary-btn {
  text-decoration: none;
}

.scatta-banner.is-success {
  border-color: rgba(64, 122, 82, 0.22);
  background: rgba(235, 246, 237, 0.92);
  color: #2b5c3a;
}

.scatta-banner.is-warning {
  border-color: rgba(173, 121, 52, 0.24);
  background: rgba(248, 241, 224, 0.92);
  color: #7b5422;
}

/* ── Stage ──────────────────────────────────── */
.scatta-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}

.camera-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.camera-container {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0c0607;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(65, 24, 29, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

@supports not (aspect-ratio: 1) {
  .camera-container::before {
    content: "";
    display: block;
    padding-bottom: 75%;
  }

  .camera-container > * {
    position: absolute;
    inset: 0;
  }
}

#camera {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
  background: #0c0607;
}

.camera-filter-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.camera-container.is-webgl-ready:not(.no-webgl) .camera-filter-canvas {
  opacity: 1;
}

.camera-container.no-webgl .camera-filter-canvas {
  display: none;
}

.camera-container.is-webgl-ready:not(.no-webgl) #camera {
  visibility: hidden;
}

.camera-container.is-mirrored.no-webgl #camera {
  transform: scaleX(-1);
}

.camera-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 250, 245, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 250, 245, 0.1) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.camera-container.is-ready .camera-grid {
  opacity: 0.5;
}

.camera-filter-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.camera-filter-overlay[hidden] {
  display: none !important;
}

.camera-guide-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
}

.camera-guide-overlay[hidden] {
  display: none !important;
}

.camera-template-guide {
  position: relative;
  width: min(74%, 420px);
  max-height: 78%;
  aspect-ratio: var(--camera-guide-aspect, 4 / 3);
  border: 2px solid rgba(255, 250, 245, 0.82);
  border-radius: 12px;
  box-shadow:
    0 0 0 999px rgba(12, 6, 7, 0.16),
    inset 0 0 0 1px rgba(65, 24, 29, 0.28),
    0 18px 42px rgba(12, 6, 7, 0.18);
}

.camera-template-guide::before,
.camera-template-guide::after {
  content: "";
  position: absolute;
  background: rgba(255, 250, 245, 0.5);
}

.camera-template-guide::before {
  left: 50%;
  top: 14%;
  bottom: 14%;
  width: 1px;
}

.camera-template-guide::after {
  left: 14%;
  right: 14%;
  top: 50%;
  height: 1px;
}

.camera-guide-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 250, 245, 0.95);
  border-radius: 999px;
  background: rgba(101, 37, 42, 0.72);
  box-shadow: 0 0 0 5px rgba(255, 250, 245, 0.2);
  transform: translate(-50%, -50%);
}

.camera-guide-shot {
  position: absolute;
  left: 50%;
  bottom: 18px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fffaf5;
  background: rgba(65, 24, 29, 0.64);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  transform: translateX(-50%);
}

.filter-overlay-glyph {
  position: absolute;
  left: var(--overlay-x, 50%);
  top: var(--overlay-y, 50%);
  color: var(--overlay-color, #fffaf5);
  font-size: var(--overlay-size, 1.125rem);
  opacity: var(--overlay-opacity, 0.5);
  line-height: 1;
  transform: translate(-50%, -50%) rotate(var(--overlay-rotate, 0deg));
  transform-origin: center;
  text-shadow: 0 10px 24px rgba(55, 18, 26, 0.24);
  user-select: none;
}

.camera-placeholder,
.camera-error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 250, 245, 0.7);
  background: rgba(12, 6, 7, 0.95);
  padding: 32px;
  text-align: center;
}

.camera-placeholder.is-actionable {
  cursor: pointer;
}

.placeholder-icon {
  font-size: 2.625rem;
  color: rgba(239, 225, 211, 0.35);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.08); }
}

.placeholder-text,
.error-title {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(239, 225, 211, 0.7);
}

.error-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(239, 225, 211, 0.08);
  border: 1px solid rgba(239, 225, 211, 0.25);
  font-size: 1.375rem;
  color: #efe1d3;
  font-family: "Fraunces", serif;
  font-weight: 700;
}

.error-title {
  font-size: 0.875rem;
  color: #efe1d3;
}

.error-detail {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(239, 225, 211, 0.7);
  max-width: 340px;
}

.camera-container.is-ready .camera-placeholder {
  display: none;
}

/* Countdown */
.camera-countdown {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(7.5rem, 22vw, 15rem);
  color: #fffaf5;
  text-shadow:
    0 8px 30px rgba(65, 24, 29, 0.34),
    0 2px 8px rgba(65, 24, 29, 0.28);
  background: transparent;
  pointer-events: none;
  user-select: none;
}

.camera-countdown.is-active {
  display: flex;
}

.camera-countdown .count {
  animation: countPop 1s cubic-bezier(.16,.88,.24,1) forwards;
}

@keyframes countPop {
  0% { opacity: 0; transform: scale(1.6); }
  20% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.8); }
}

/* Flash */
.camera-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 1) 0 34%, rgba(255, 255, 255, 0.92) 62%, rgba(255, 255, 255, 0.72) 100%);
  opacity: 0;
  pointer-events: none;
}

.camera-flash.is-firing {
  animation: flashFire 0.45s ease-out;
}

.camera-flash.is-holding {
  opacity: 0.94;
}

@keyframes flashFire {
  0% { opacity: 0; }
  8% { opacity: 0.96; }
  38% { opacity: 0.82; }
  100% { opacity: 0; }
}

/* Camera bar */
.camera-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.camera-status {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(65, 24, 29, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 140px;
  min-width: 0;
}

.camera-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7b79b;
  box-shadow: 0 0 0 3px rgba(183, 183, 155, 0.25);
}

.camera-status.is-ready::before {
  background: #6b9b6b;
  box-shadow: 0 0 0 3px rgba(107, 155, 107, 0.3);
}

.camera-status.is-shooting::before {
  background: #c85a5a;
  box-shadow: 0 0 0 3px rgba(200, 90, 90, 0.35);
  animation: pulse 0.9s ease-in-out infinite;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--wine-deep);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  background: var(--paper-strong);
  transform: rotate(-60deg);
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.flash-btn:hover {
  transform: translateY(-1px);
}

.flash-btn.is-active {
  border-color: rgba(101, 37, 42, 0.38);
  background: var(--wine);
  color: var(--paper);
  box-shadow: 0 0 0 4px rgba(101, 37, 42, 0.1);
}

.flash-btn.is-screen-fallback {
  border-style: dashed;
}

/* ── Controls ──────────────────────────────── */
.scatta-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 14px 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(65, 24, 29, 0.06);
}

.control-label {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 8px;
}

.control-block {
  min-width: 0;
}

.format-grid {
  --format-card-width: clamp(96px, 34%, 114px);
  display: flex;
  gap: 7px;
  min-height: 58px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px 0;
  scroll-padding-inline: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.format-grid::-webkit-scrollbar {
  display: none;
}

.format-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--format-card-width);
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 6px 6px;
  scroll-snap-align: center;
  border-radius: 10px;
  border: 1px solid rgba(101, 37, 42, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 250, 245, 0.88), rgba(242, 235, 226, 0.56));
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(65, 24, 29, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}

.format-btn:hover {
  border-color: rgba(101, 37, 42, 0.28);
  transform: translateY(-1px);
}

.format-btn.is-active {
  border-color: var(--wine);
  background:
    linear-gradient(145deg, rgba(101, 37, 42, 0.98), rgba(69, 25, 31, 0.96));
  color: var(--paper);
  box-shadow: 0 16px 34px rgba(65, 24, 29, 0.18);
  transform: translateY(-2px);
}

.format-icon {
  display: flex;
  flex-direction: column;
  gap: 1px;
  height: 22px;
  justify-content: center;
  padding: 1px;
  background: var(--paper-strong);
  border-radius: 2px;
  width: 14px;
}

.format-btn.is-active .format-icon {
  background: rgba(255, 250, 245, 0.85);
}

.format-icon i {
  display: block;
  height: 100%;
  flex: 1;
  min-height: 1.2px;
  background: rgba(36, 20, 22, 0.5);
  border-radius: 1px;
}

.format-icon-horizontal {
  flex-direction: row;
  width: 22px;
  height: 14px;
}

.format-icon-horizontal i {
  width: 100%;
  height: 100%;
}

.format-icon-polaroid {
  width: 17px;
  height: 22px;
  padding: 1px 1px 5px;
}

.format-icon-polaroid i {
  width: 100%;
  height: 100%;
}

.format-icon-contact {
  display: grid;
  grid-template-columns: repeat(var(--format-icon-columns, 3), 1fr);
  grid-template-rows: repeat(var(--format-icon-rows, 4), 1fr);
  gap: 1px;
  width: calc(var(--format-icon-columns, 3) * 6px);
  height: calc(var(--format-icon-rows, 4) * 6px);
  min-width: 18px;
  min-height: 18px;
  max-width: 2.25rem;
  max-height: 2.25rem;
  padding: 1px;
  background: var(--paper-strong);
  border-radius: 2px;
}

.format-btn.is-active .format-icon-contact {
  background: rgba(255, 250, 245, 0.85);
}

.format-icon-contact i {
  background: rgba(36, 20, 22, 0.5);
  border-radius: 0.5px;
  width: 100%;
  height: 100%;
}

.format-name {
  font-family: "Fraunces", serif;
  font-size: 0.6875rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.format-meta {
  font-size: 0.40625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

/* Filters */
.selection-carousel {
  --selection-card-width: 134px;
  --selection-edge-fade-width: 48px;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.selection-viewport {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 11px;
  isolation: isolate;
}

.selection-viewport::before,
.selection-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: var(--selection-edge-fade-width);
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.selection-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--paper), rgba(242, 235, 226, 0));
}

.selection-viewport::after {
  right: 0;
  background: linear-gradient(270deg, var(--paper), rgba(242, 235, 226, 0));
}

.selection-carousel.is-at-start .selection-viewport::before,
.selection-carousel.is-static .selection-viewport::before,
.selection-carousel.is-at-end .selection-viewport::after,
.selection-carousel.is-static .selection-viewport::after {
  opacity: 0;
}

.border-grid,
.filter-grid {
  display: flex;
  gap: 7px;
  min-height: 58px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 9px 0;
  scroll-padding-inline: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.border-grid::-webkit-scrollbar,
.filter-grid::-webkit-scrollbar {
  display: none;
}

.border-btn,
.filter-btn {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  flex: 0 0 var(--selection-card-width);
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  scroll-snap-align: center;
  border-radius: 10px;
  border: 1px solid rgba(101, 37, 42, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 250, 245, 0.88), rgba(242, 235, 226, 0.56));
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 12px 26px rgba(65, 24, 29, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.border-btn:hover,
.filter-btn:hover {
  border-color: rgba(101, 37, 42, 0.28);
  transform: translateY(-1px);
}

.border-btn.is-active,
.filter-btn.is-active {
  border-color: var(--wine);
  background:
    linear-gradient(145deg, rgba(101, 37, 42, 0.98), rgba(69, 25, 31, 0.96));
  color: var(--paper);
  box-shadow: 0 16px 34px rgba(65, 24, 29, 0.18);
  transform: translateY(-2px);
}

.border-swatch,
.filter-swatch {
  width: 21px;
  height: 26px;
  border-radius: 5px;
  background: var(--swatch-bg, transparent);
  border: var(--swatch-border, 0);
  flex-shrink: 0;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.border-btn.is-active .border-swatch,
.filter-btn.is-active .filter-swatch {
  box-shadow: 0 0 0 1px rgba(255, 250, 245, 0.42), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.border-swatch[data-bg="none"],
.filter-swatch[data-bg="none"] {
  background: linear-gradient(135deg, #fff 0%, #fff 49%, #c85a5a 50%, #c85a5a 51%, #fff 52%, #fff 100%);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.border-name,
.filter-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  line-height: 1.22;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* Shutter */
.shutter {
  width: 100%;
  padding: 18px 22px;
  flex-direction: column;
  gap: 4px;
  font-size: 0.875rem;
  letter-spacing: 0.22em;
}

.camera-bar .shutter {
  width: auto;
  min-width: 240px;
  min-height: 44px;
  padding: 14px 26px;
  flex: 0 1 auto;
}

.shutter:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.shutter-meta {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

/* Ghost button */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(101, 37, 42, 0.25);
  background: transparent;
  color: var(--wine-deep);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(101, 37, 42, 0.06);
  border-color: var(--wine);
}

.ghost-btn.subtle {
  border-color: transparent;
  opacity: 0.7;
}

.ghost-btn.subtle:hover {
  opacity: 1;
  background: transparent;
  text-decoration: underline;
}


/* ── Gallery ──────────────────────────────── */
.scatta-gallery {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
  animation: galleryRise 0.6s cubic-bezier(.16,.88,.24,1);
}

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

.gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--olive);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.gallery-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.gallery-title {
  margin: 12px 0 34px;
  font-size: clamp(2.625rem, 5.5vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--wine);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

.gallery-title em {
  font-style: italic;
  font-weight: 600;
  color: var(--wine-deep);
}

.gallery-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

.gallery-preview {
  display: grid;
  gap: var(--gallery-gap, 12px);
  padding: var(--gallery-padding, 20px 20px 48px);
  background:
    linear-gradient(
      to bottom,
      var(--gallery-shell, var(--paper)) 0,
      var(--gallery-shell, var(--paper)) calc(100% - var(--gallery-bottom-frame-size, 0px)),
      var(--gallery-frame, var(--paper-strong)) calc(100% - var(--gallery-bottom-frame-size, 0px)),
      var(--gallery-frame, var(--paper-strong)) 100%
    );
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(65, 24, 29, 0.14);
  max-width: var(--gallery-max-width, 420px);
  margin: 0 auto;
  width: 100%;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.gallery-preview .shot {
  overflow: hidden;
  border-radius: 2px;
  box-sizing: border-box;
  padding: var(--gallery-frame-inset, 5px);
  background: var(--gallery-frame, var(--paper-strong));
  aspect-ratio: var(--gallery-shot-aspect, 4 / 3);
}

.gallery-preview .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

.gallery-preview.is-final-render {
  display: block;
  padding: 0;
  background: transparent;
  aspect-ratio: var(--gallery-preview-aspect, 1 / 1);
  overflow: hidden;
  border-radius: 14px;
}

.gallery-preview.is-final-render .gallery-final-image {
  display: block;
  width: 100%;
  height: auto;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.gallery-preview.is-final-render .gallery-final-canvas {
  pointer-events: none;
}

.gallery-preview.is-final-render.is-booth-print {
  max-width: min(100%, 560px);
  border-radius: 18px;
  background: #6d2227;
  box-shadow: 0 26px 70px rgba(65, 24, 29, 0.22);
}

.booth-print-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1086 / 1448;
  overflow: hidden;
  isolation: isolate;
  --booth-strip-width: 27%;
  --booth-strip-start-y: -108%;
  --booth-strip-peek-y: -96%;
  --booth-strip-mid-y: -66%;
  --booth-strip-near-end-y: -28%;
  --booth-strip-end-y: 52%;
  --booth-strip-scale: 0.98;
  --booth-slot-top: 40.8%;
  --booth-slot-height: 56%;
  --booth-print-duration: 11.6s;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.booth-print-bg,
.booth-print-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.booth-print-bg {
  z-index: 1;
}

.booth-print-slot {
  position: absolute;
  left: 50%;
  top: var(--booth-slot-top, 40.8%);
  z-index: 2;
  width: var(--booth-strip-width, 27%);
  height: var(--booth-slot-height, 56%);
  overflow: hidden;
  transform: translateX(-50%);
  pointer-events: none;
}

.gallery-preview.is-final-render .booth-print-strip.gallery-final-image {
  width: 100%;
  max-width: none;
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(12, 5, 7, 0.38));
  transform-origin: top center;
  animation: boothPrintDrop var(--booth-print-duration, 11.6s) cubic-bezier(0.18, 0.62, 0.16, 1) 0.25s both;
}

.booth-print-overlay {
  z-index: 3;
}

@keyframes boothPrintDrop {
  0% {
    opacity: 0.92;
    transform: translateY(var(--booth-strip-start-y, -108%)) scale(var(--booth-strip-scale, 0.98));
  }
  16% {
    opacity: 1;
    transform: translateY(var(--booth-strip-peek-y, -96%)) scale(var(--booth-strip-scale, 0.98));
  }
  48% {
    opacity: 1;
    transform: translateY(var(--booth-strip-mid-y, -66%)) scale(var(--booth-strip-scale, 0.98));
  }
  78% {
    opacity: 1;
    transform: translateY(var(--booth-strip-near-end-y, -28%)) scale(var(--booth-strip-scale, 0.98));
  }
  100% {
    opacity: 1;
    transform: translateY(var(--booth-strip-end-y, 52%)) scale(var(--booth-strip-scale, 0.98));
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-preview.is-final-render .booth-print-strip.gallery-final-image {
    animation: none;
    transform: translateY(var(--booth-strip-end-y, 52%)) scale(var(--booth-strip-scale, 0.98));
  }
}

.gallery-desc {
  margin: 0 0 28px;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(36, 20, 22, 0.84);
  font-style: italic;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.checkout-field input:focus {
  outline: none;
  border-color: rgba(101, 37, 42, 0.32);
  box-shadow: 0 0 0 4px rgba(101, 37, 42, 0.08);
}

.cart-checkout-step {
  display: grid;
  gap: 12px;
}

.cart-step-back {
  justify-self: start;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--wine-deep);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.cart-checkout-card,
.cart-checkout-lines {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(65, 24, 29, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.cart-checkout-kicker {
  color: var(--olive);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cart-checkout-card h3 {
  margin: 0;
  color: var(--wine);
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.75rem;
  line-height: 1;
}

.cart-checkout-card p {
  margin: 0;
  color: rgba(36, 20, 22, 0.84);
  font-size: 0.875rem;
  line-height: 1.45;
}

.cart-checkout-field {
  margin-top: 2px;
}

.cart-checkout-payment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 48, 135, 0.16);
  border-radius: 8px;
  background: rgba(0, 112, 186, 0.06);
}

.paypal-logo {
  display: block;
  width: 74px;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

.cart-checkout-payment strong,
.cart-checkout-payment span {
  display: block;
}

.cart-checkout-payment strong {
  color: #003087;
  font-size: 0.9375rem;
}

.cart-checkout-payment span {
  color: rgba(36, 20, 22, 0.66);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.cart-checkout-feedback {
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(123, 84, 34, 0.08);
  color: #7b5422;
}

.cart-checkout-feedback.is-error {
  background: rgba(139, 44, 61, 0.08);
  color: #8b2c3d;
}

.cart-checkout-feedback.is-success {
  background: rgba(43, 92, 58, 0.08);
  color: #2b5c3a;
}

.cart-checkout-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(65, 24, 29, 0.08);
}

.cart-checkout-line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cart-checkout-line span,
.cart-checkout-line strong,
.cart-checkout-line small {
  min-width: 0;
}

.cart-checkout-line span {
  color: var(--wine-deep);
  font-size: 0.875rem;
}

.cart-checkout-line strong {
  color: var(--wine);
  font-size: 0.875rem;
}

.cart-checkout-line small {
  grid-column: 1 / -1;
  color: rgba(65, 24, 29, 0.6);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


.cart-item-options {
  display: grid;
  gap: 8px;
}

.cart-option-btn {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(65, 24, 29, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.84);
  color: rgba(36, 20, 22, 0.84);
  text-align: left;
  cursor: pointer;
}

.cart-option-btn strong,
.cart-option-btn span {
  min-width: 0;
}

.cart-option-btn strong {
  color: var(--wine-deep);
  font-size: 0.75rem;
  line-height: 1.25;
}

.cart-option-btn span {
  color: rgba(65, 24, 29, 0.64);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cart-option-btn.is-selected {
  border-color: rgba(101, 37, 42, 0.36);
  background: rgba(101, 37, 42, 0.08);
}

.cart-option-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}


.cart-drawer-actions .is-paypal-checkout::before {
  content: "";
  display: inline-block;
  width: 54px;
  height: 15px;
  margin-right: 8px;
  background: url("https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg") center / contain no-repeat;
}


.checkout-feedback {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(36, 20, 22, 0.76);
  font-style: italic;
}

.checkout-feedback[hidden] {
  display: none !important;
}

.checkout-feedback.is-success {
  color: #2b5c3a;
}

.checkout-feedback.is-warning {
  color: #7b5422;
}

.checkout-feedback.is-error {
  color: #8b2c3d;
}

.gallery-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.gallery-actions .primary-btn {
  justify-content: center;
  padding: 16px 22px;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 1024px) {
  .scatta-stage { grid-template-columns: 1fr; gap: 16px; }
  .scatta-controls { order: 2; }
  .format-grid {
    --format-card-width: clamp(104px, 20vw, 132px);
  }
  .selection-carousel {
    --selection-card-width: clamp(116px, 22vw, 146px);
  }
  .gallery-main { grid-template-columns: 1fr; gap: 32px; }
  .gallery-preview { max-width: 360px; }
}

@media (max-width: 768px) {
  .scatta-main { padding: 14px 0 48px; }
  .scatta-stage { gap: 12px; }
  .camera-wrap { gap: 8px; }
  .camera-bar { gap: 8px; }
  .scatta-controls {
    gap: 10px;
    padding: 10px 10px 12px;
    border-radius: 10px;
  }
  .control-label {
    font-size: 0.625rem;
    letter-spacing: 0.18em;
    margin-bottom: 5px;
  }
  .format-grid {
    --format-card-width: clamp(96px, 31vw, 118px);
    min-height: 48px;
    gap: 6px;
    padding: 3px 2px 6px 0;
    scroll-padding-inline: 0;
    touch-action: pan-x;
  }
  .format-btn {
    min-height: 42px;
    padding: 5px 5px 4px;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(65, 24, 29, 0.04);
  }
  .format-btn.is-active {
    box-shadow: 0 12px 24px rgba(65, 24, 29, 0.16);
    transform: translateY(-1px);
  }
  .format-icon {
    width: 11px;
    height: 17px;
  }
  .format-icon-horizontal {
    width: 17px;
    height: 11px;
  }
  .format-icon-polaroid {
    width: 13px;
    height: 17px;
    padding-bottom: 4px;
  }
  .format-icon-contact {
    width: calc(var(--format-icon-columns, 3) * 5px);
    height: calc(var(--format-icon-rows, 4) * 5px);
    min-width: 15px;
    min-height: 15px;
    max-width: 1.875rem;
    max-height: 1.875rem;
  }
  .format-name {
    font-size: 0.625rem;
  }
  .format-meta {
    font-size: 0.375rem;
    letter-spacing: 0.1em;
  }
  .selection-carousel {
    --selection-card-width: clamp(106px, 34vw, 130px);
    --selection-edge-fade-width: 40px;
  }
  .border-grid,
  .filter-grid {
    min-height: 48px;
    gap: 6px;
    padding: 3px 2px 6px 0;
    scroll-padding-inline: 0;
    touch-action: pan-x;
  }
  .border-btn,
  .filter-btn {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
    min-height: 42px;
    padding: 6px 7px;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(65, 24, 29, 0.04);
  }
  .border-btn.is-active,
  .filter-btn.is-active {
    box-shadow: 0 12px 24px rgba(65, 24, 29, 0.16);
    transform: translateY(-1px);
  }
  .border-swatch,
  .filter-swatch {
    width: 17px;
    height: 21px;
    border-radius: 4px;
  }
  .border-name,
  .filter-name {
    font-size: 0.5625rem;
    letter-spacing: 0.06em;
    line-height: 1.15;
  }
  .camera-countdown { font-size: 8.75rem; }
  .gallery-actions .primary-btn { font-size: 0.75rem; padding: 14px 18px; }
  .camera-bar .shutter {
    order: 3;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 10px 18px;
  }
  .shutter-meta {
    font-size: 0.625rem;
    letter-spacing: 0.16em;
  }
  .camera-status {
    flex: 1 1 auto;
    font-size: 0.625rem;
    letter-spacing: 0.16em;
  }
  .icon-btn {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scatta-gallery,
  .camera-countdown .count,
  .camera-flash.is-firing,
  .placeholder-icon,
  .format-btn,
  .border-btn,
  .filter-btn {
    animation: none !important;
    transition: none !important;
  }
}
