@import url('/site-v41.css');

:root {
  --poster-paper: #f4efe4;
  --poster-ink: #171714;
  --camera-toolbar-height: calc(68px + env(safe-area-inset-bottom));
  --camera-nav-height: calc(8px + env(safe-area-inset-top));
  --poster-width: min(
    100vw,
    calc((100dvh - var(--camera-toolbar-height) - var(--camera-nav-height)) * 1080 / 1536)
  );
}

/*
 * V45 poster system
 * -----------------
 * The live camera, captured preview and downloaded JPEG all use the exact
 * same 1080 × 1536 master geometry. Screen elements are positioned with
 * percentages from that master instead of flexible grid rows, preventing
 * vertical stretching and typography drift on mobile browsers.
 */
.camera-overlay {
  grid-template-rows: minmax(0, 1fr) var(--camera-toolbar-height) !important;
  background: var(--poster-paper) !important;
}

.camera-stage-poster {
  position: relative !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  padding: var(--camera-nav-height) 0 0 !important;
  display: grid !important;
  place-items: start center !important;
  background: var(--poster-paper) !important;
  overflow: visible !important;
}

/* Navigation is part of the app chrome, never part of the artwork. */
.camera-back-floating {
  z-index: 40 !important;
  position: absolute !important;
  top: auto !important;
  bottom: calc(-1 * var(--camera-toolbar-height) + 10px) !important;
  left: max(6px, env(safe-area-inset-left)) !important;
  width: 48px !important;
  height: 48px !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: 999px !important;
  background: rgba(8, 10, 9, 0.92) !important;
  color: #f4efe4 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important;
}

.live-poster-preview {
  position: relative !important;
  display: block !important;
  flex: none !important;
  width: var(--poster-width) !important;
  height: calc(var(--poster-width) * 1536 / 1080) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100vw !important;
  max-height: calc(100dvh - var(--camera-toolbar-height) - var(--camera-nav-height)) !important;
  aspect-ratio: 1080 / 1536 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: var(--poster-paper) !important;
  overflow: hidden !important;
}


.captured-poster-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  background: var(--poster-paper) !important;
}

.live-poster-preview > * {
  position: absolute !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* 1080 × 1536 master coordinates */
.live-poster-brand {
  inset: 0 0 auto 0 !important;
  width: 100% !important;
  height: 11.71875% !important; /* 180 / 1536 */
  display: grid !important;
  place-items: center !important;
  background: var(--poster-paper) !important;
}

.brand-lockup-poster {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  padding: calc(var(--poster-width) * 18 / 1080) 0 0 !important;
  transform: none !important;
  box-sizing: border-box !important;
}

.brand-lockup-poster .brand-ring {
  width: calc(var(--poster-width) * 42 / 1080) !important;
  height: calc(var(--poster-width) * 42 / 1080) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-width: calc(var(--poster-width) * 11 / 1080) !important;
  margin: 0 0 calc(var(--poster-width) * 18 / 1080) !important;
  flex: none !important;
  box-sizing: border-box !important;
}

.brand-lockup-poster .brand-wordmark {
  color: var(--poster-ink) !important;
  font-family: "Avenir Next", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif !important;
  font-size: calc(var(--poster-width) * 64 / 1080) !important;
  line-height: 1 !important;
  letter-spacing: calc(var(--poster-width) * 3.2 / 1080) !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.live-poster-artwork {
  left: 2.5925926% !important; /* 28 / 1080 */
  top: 11.71875% !important;   /* 180 / 1536 */
  width: 94.8148148% !important; /* 1024 / 1080 */
  height: 34.5052083% !important;  /* 530 / 1536 */
  background: #ded5c5 !important;
}

.live-poster-artwork img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
}

.live-poster-caption {
  left: 0 !important;
  top: 46.2239583% !important; /* 710 / 1536 */
  width: 100% !important;
  height: 2.9947917% !important; /* 46 / 1536 */
  display: grid !important;
  place-items: center !important;
  background: var(--poster-paper) !important;
}

.live-poster-caption span {
  color: #5f5a52 !important;
  font-family: "Avenir Next", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif !important;
  font-size: calc(var(--poster-width) * 28 / 1080) !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.live-poster-camera {
  left: 2.5925926% !important;
  top: 49.21875% !important; /* 756 / 1536 */
  width: 94.8148148% !important;
  height: 37.7604167% !important; /* 580 / 1536 */
  background: #222522 !important;
}

.live-poster-camera .camera-feed,
.live-poster-camera img,
.live-poster-camera video,
.live-poster-camera canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

.live-poster-footer {
  left: 0 !important;
  top: 86.9791667% !important; /* 1336 / 1536 */
  width: 100% !important;
  height: 13.0208333% !important; /* 200 / 1536 */
  background: var(--poster-paper) !important;
}

.live-poster-footer canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Controls remain outside the poster and never affect poster geometry. */
.capture-preview-actions,
.camera-controls-minimal {
  height: var(--camera-toolbar-height) !important;
  min-height: var(--camera-toolbar-height) !important;
  padding: 2px max(12px, env(safe-area-inset-right)) calc(2px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
  margin: 0 !important;
  display: grid !important;
  align-content: center !important;
  background: #080a09 !important;
}

.camera-actions-minimal {
  max-width: 290px !important;
  grid-template-columns: 40px 56px 40px !important;
  gap: 16px !important;
}

.camera-tool-button {
  width: 40px !important;
  height: 40px !important;
}

.shutter-button {
  width: 56px !important;
  height: 56px !important;
}

.shutter-button > span {
  width: 42px !important;
  height: 42px !important;
}

.pair-share-actions {
  width: min(100%, 330px) !important;
  max-width: 330px !important;
  margin: 0 auto !important;
}

.pair-share-actions button {
  width: 100% !important;
  min-height: 52px !important;
}

@media (max-width: 430px) {
  :root {
    --camera-nav-height: calc(6px + env(safe-area-inset-top));
  }

  .camera-back-floating {
    width: 44px !important;
    height: 44px !important;
    left: max(4px, env(safe-area-inset-left)) !important;
    bottom: calc(-1 * var(--camera-toolbar-height) + 12px) !important;
  }

  .pair-share-actions {
    width: min(100%, 220px) !important;
    max-width: 220px !important;
  }

  .pair-share-actions button {
    min-height: 40px !important;
    font-size: 13px !important;
  }
}
