.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px calc(16px + env(safe-area-inset-bottom));
  position: relative;
}

.screen {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Welcome / Done screens ---------- */

.welcome-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
  width: 100%;
  border: 1px solid var(--sage-200);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--sage-600);
  margin-bottom: 0.6em;
}

.welcome-card h1 {
  font-size: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
}

.amp {
  color: var(--amber);
  font-style: italic;
  font-size: 0.85em;
}

.wedding-date {
  color: var(--sage-600);
  letter-spacing: 0.08em;
  font-weight: 600;
}

#nameForm {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 1.4em 0 0.6em;
}

#nameForm .btn {
  margin-top: 10px;
}

.fineprint {
  font-size: 0.85rem;
  color: var(--sage-600);
  margin-top: 1.2em;
  margin-bottom: 0;
}

.not-me {
  background: none;
  border: none;
  color: var(--sage-600);
  text-decoration: underline;
  font-size: 0.9rem;
  margin-top: 18px;
  padding: 8px;
}

/* ---------- Camera screen ---------- */

.camera-body {
  width: 100%;
  background: var(--cream-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 10px 10px 18px;
  border: 1px solid var(--sage-200);
}

.camera-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 16px;
}

.wheel-btn {
  background: none;
  border: none;
  padding: 0;
  width: 46px;
  height: 46px;
}

.film-wheel {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(var(--sage-500) 0deg 8deg, var(--sage-300) 8deg 20deg);
  border: 3px solid var(--sage-700);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.wheel-btn.spin .film-wheel {
  transform: rotate(160deg);
}

.frame-counter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--sage-900);
  background: var(--white);
  border-radius: 999px;
  padding: 6px 18px;
  border: 2px solid var(--sage-300);
}

.frame-counter .slash {
  color: var(--sage-400, var(--sage-300));
  margin: 0 2px;
}

.flash-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px 2px rgba(217, 138, 61, 0.6);
}

.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: var(--sage-900);
  border: 6px solid var(--white);
  box-shadow: inset 0 0 0 2px var(--sage-300);
}

.viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(1);
}

.viewfinder-ring {
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  pointer-events: none;
}

.viewfinder-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 5;
  animation: fadeIn 0.2s ease;
}

.viewfinder-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(20, 24, 15, 0.8), transparent);
  color: var(--cream-100);
  font-size: 0.85rem;
  text-align: center;
  z-index: 6;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.camera-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  margin: 0;
  color: var(--cream-100);
  background: rgba(56, 64, 44, 0.92);
  font-size: 0.95rem;
}

.camera-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.brand-plate {
  font-family: var(--serif);
  font-style: italic;
  color: var(--sage-700);
  margin: 0;
  font-size: 0.95rem;
}

.shutter-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid var(--sage-700);
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--cream-200) 60%, var(--sage-200) 100%);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
}

.shutter-btn span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.shutter-btn:active {
  transform: scale(0.92);
}

.shutter-btn:disabled {
  opacity: 0.4;
}

.name-confirm {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--sage-800, var(--sage-700));
  text-align: center;
  margin: 0 0 14px;
  opacity: 0;
}

.name-confirm.name-confirm-anim {
  animation: nameConfirmFade 3.2s ease forwards;
}

@keyframes nameConfirmFade {
  0% { opacity: 0; }
  12% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 380px) {
  .welcome-card {
    padding: 32px 22px;
  }
  .welcome-card h1 {
    font-size: 2.2rem;
  }
}
