@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Great+Vibes&family=Montserrat:wght@300;400;500;600&display=swap');

@font-face {
  font-family: 'Slight';
  src: url('/assets/wedding/fonts/Slight.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.alert {
  border-radius: 8px;
  margin: 0 0 1rem;
  padding: .85rem 1rem;
}

.alert.success {
  background: #ecfdf3;
  border: 1px solid #b7ebc6;
  color: #166534;
}

.alert.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

a.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

:root {
  color-scheme: light;
  --cream: #f5eee7;
  --dark: #2d2924;
  --burgundy: #8e1731;
  --burgundy-solid: #8e1731;
  --gold: #b79a5c;
  --line: rgba(183, 154, 92, .55);
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e9e1d8;
}

html {
  color-scheme: light;
  forced-color-adjust: none;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--dark);
  overflow-y: auto;
}

@media (max-width: 767px) and (orientation: portrait) {
  body {
    overflow: hidden;
  }
}

.wedding-card {
  width: 100%;
  max-width: 768px;
  min-height: 1152px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .16);
}

.bg-photo {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      to bottom,
      rgba(245, 238, 231, 0) 0%,
      rgba(245, 238, 231, .02) 34%,
      rgba(245, 238, 231, .2) 50%,
      rgba(245, 238, 231, .55) 63%,
      rgba(245, 238, 231, .88) 76%,
      rgba(245, 238, 231, 1) 100%
    ),
    radial-gradient(
      ellipse at 82% 14%,
      rgba(245, 238, 231, .58) 0%,
      rgba(245, 238, 231, .24) 30%,
      rgba(245, 238, 231, .06) 52%,
      rgba(245, 238, 231, 0) 70%
    ),
    url('/Users/dobraadrian/Projects/www/wedding.new/public/assets/wedding/img/bg-app.jpeg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: grayscale(100%) sepia(7%) brightness(0.97) contrast(1);
}

.bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset 0 -210px 130px rgba(245, 238, 231, .88),
    inset 0 -420px 220px rgba(245, 238, 231, .55),
    inset 0 0 70px rgba(255, 255, 255, .12);
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 2;
  padding-top: 482px;
  padding-bottom: 28px;
}

.top-signature {
  position: absolute;
  top: 112px;
  right: 67px;
  text-align: center;
}

.names {
  font-family: 'Slight', 'Great Vibes', cursive;
  color: var(--burgundy-solid);
  font-size: 64px;
  line-height: .85;
  font-weight: 400;
  text-shadow: none;
  -webkit-text-fill-color: var(--burgundy-solid);
}

.names span {
  font-size: 40px;
  margin: 0 10px;
}

.wedding-date {
  margin-top: 25px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 31px;
  line-height: 1;
  letter-spacing: 7px;
  color: #25211e;
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}

.main-section {
  position: absolute;
  left: 0;
  right: 0;
  top: max(178px, 35svh);
  bottom: 28px;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  --hero-copy-offset-y: -6px;
}

.main-section h1 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 54px;
  line-height: .9;
  font-weight: 500;
  letter-spacing: .1px;
  text-shadow: none;
  position: relative;
  top: var(--hero-copy-offset-y);
}

.main-section h1 em {
  display: inline-block;
  color: var(--burgundy-solid);
  font-size: 51px;
  font-weight: 500;
  font-style: italic;
  -webkit-text-fill-color: var(--burgundy-solid);
}

.heart-gold {
  margin: 19px 0 17px;
  color: var(--gold);
  font-size: 29px;
  line-height: 1;
  position: relative;
  top: var(--hero-copy-offset-y);
}

.lead-text {
  margin: 0 auto 14px;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.52;
  font-weight: 400;
  letter-spacing: .1px;
  position: relative;
  top: var(--hero-copy-offset-y);
}

.upload-btn {
  width: 374px;
  height: 69px;
  max-width: 100%;
  margin: 0 auto 45px;
  border-radius: 6px;
  background: #35312b;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-decoration: none;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .12),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.upload-btn i {
  color: var(--gold);
  font-size: 31px;
}

.upload-btn span {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .8px;
}

.features {
  margin-bottom: 33px;
}

.feature-item {
  height: 125px;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-item.middle {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.feature-item i {
  height: 52px;
  font-size: 43px;
  color: #292621;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.feature-item p {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
}

.gallery-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  margin-bottom: 18px;
  font-family: 'Cormorant Garamond', serif;
}

.gallery-title span {
  width: 70px;
  height: 1px;
  background: var(--line);
}

.gallery-title strong {
  font-size: 27px;
  line-height: 1;
  letter-spacing: 5px;
  font-weight: 500;
}

.gallery {
  margin-bottom: 34px;
}

.gallery img,
.gallery-placeholder {
  width: 100%;
  height: 128px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  filter: grayscale(100%) sepia(8%) brightness(.95) contrast(.95);
  box-shadow: 0 5px 12px rgba(0,0,0,.12);
  background: rgba(255, 255, 255, 0.28);
}

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(45, 41, 36, 0.66);
}

.gallery-placeholder i {
  font-size: 28px;
  line-height: 1;
}

.footer-note {
  border-top: 1px solid var(--line);
  padding-top: 21px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: #3a342d;
}

.footer-note i {
  color: var(--gold);
  font-size: 23px;
  margin-right: 16px;
}

/* Functional upload UI hooks */
.wedding-mini-actions,
.wedding-dropzone,
.upload-queue {
  max-width: 374px;
  margin-left: auto;
  margin-right: auto;
}

.wedding-mini-actions {
  margin-top: -26px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.wedding-mini-action {
  border: 0;
  background: transparent;
  color: #5d5248;
  text-decoration: underline;
  padding: 0;
  font-size: 13px;
}

.wedding-dropzone {
  border: 1px dashed rgba(183, 154, 92, .45);
  border-radius: 8px;
  padding: 10px;
  color: #6f6359;
  font-size: 12px;
  margin-bottom: 12px;
}

.upload-queue {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.queue-item {
  text-align: left;
}

.progress {
  width: 100%;
  height: 8px;
  background: #ece6de;
  border-radius: 999px;
  overflow: hidden;
  margin: .35rem 0;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, var(--gold), var(--burgundy));
  width: 0;
  transition: width .24s ease;
}

.status {
  font-size: .82rem;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
}

#photoInput,
#uploaded_by_name {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  background: #2f2a27;
  color: #fff;
  padding: .8rem 1rem;
  border-radius: 12px;
  z-index: 200;
}

.offline-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #392f2f;
  color: #fff;
  padding: .7rem;
  text-align: center;
  font-size: .92rem;
}

/* ─── Upload Progress Overlay ─────────────────────────────── */
.upload-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(19, 16, 14, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.upload-progress-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.upload-progress-overlay.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.upload-progress-panel {
  width: 100%;
  max-width: 520px;
  max-height: 75vh;
  overflow-y: auto;
  background: #fdf8f3;
  border-radius: 22px 22px 0 0;
  padding: 22px 20px 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 340ms cubic-bezier(.22,.72,.24,1), opacity 240ms ease;
}

.upload-progress-overlay.is-active .upload-progress-panel {
  opacity: 1;
  transform: translateY(0);
}

.upload-progress-overlay.is-leaving .upload-progress-panel {
  opacity: 0;
  transform: translateY(18px) scale(.985);
}

.upload-progress-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-progress-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2a2118;
  letter-spacing: .01em;
}

.upload-progress-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-progress-bar-track {
  flex: 1;
  height: 8px;
  background: linear-gradient(180deg, #eee7df, #e6ddd4);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
}

.upload-progress-bar-track::before {
  content: '';
  position: absolute;
  top: 0;
  left: 33.333%;
  width: 1px;
  height: 100%;
  background: rgba(60, 44, 34, .2);
}

.upload-progress-bar-track::after {
  content: '';
  position: absolute;
  top: 0;
  left: 66.666%;
  width: 1px;
  height: 100%;
  background: rgba(60, 44, 34, .2);
}

.upload-progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #d7bb7f 0%, #c88d5f 35%, #b2554f 70%, #9a1f42 100%);
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(.2,.72,.24,1);
  position: relative;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .24) inset;
}

.upload-progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: uploadProgressShine 1.8s ease-in-out infinite;
}

@keyframes uploadProgressShine {
  0%   { left: -35%; opacity: 0; }
  18%  { opacity: .95; }
  100% { left: 115%; opacity: 0; }
}

.upload-progress-count {
  font-size: .8rem;
  color: #7c6f62;
  white-space: nowrap;
  min-width: 48px;
  text-align: right;
}

.upload-progress-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfcfa 100%);
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(178, 153, 117, .24);
  box-shadow: 0 8px 20px rgba(34, 26, 20, .06), 0 1px 1px rgba(34, 26, 20, .04);
  animation: uploadCardIn 280ms cubic-bezier(.22,.72,.24,1) both;
}

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

.upload-file-thumb {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.upload-file-thumb img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.upload-file-done-icon {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #38c977, #25a45e);
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: .72rem;
  color: #fff;
  box-shadow: 0 5px 12px rgba(28, 117, 68, .35);
  opacity: 0;
  transform: scale(.65);
  transition: opacity .2s ease, transform .32s cubic-bezier(.34,1.56,.64,1);
}

.upload-file-done-icon.is-visible {
  opacity: 1;
  transform: scale(1);
}

.upload-file-error-icon {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ff7f7f, #df5151);
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: .72rem;
  color: #fff;
  box-shadow: 0 5px 12px rgba(180, 55, 55, .35);
  opacity: 0;
  transform: scale(.65);
  transition: opacity .2s ease, transform .32s cubic-bezier(.34,1.56,.64,1);
}

.upload-file-error-icon.is-visible {
  opacity: 1;
  transform: scale(1);
}

.upload-file-info {
  flex: 1;
  min-width: 0;
}

.upload-file-name {
  font-size: .85rem;
  font-weight: 600;
  color: #2a2118;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.upload-file-status {
  font-size: .78rem;
  color: #7c6f62;
  transition: color .2s ease, letter-spacing .2s ease;
  margin-bottom: 8px;
}

.upload-file-progress-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ece5dc, #e5dbd1);
  overflow: hidden;
}

.upload-file-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #d7bb7f 0%, #c88d5f 35%, #b2554f 70%, #9a1f42 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset;
  transition: width .26s cubic-bezier(.2,.72,.24,1);
}

.upload-file-status.is-success {
  color: #1f9a58;
  letter-spacing: .01em;
}
.upload-file-status.is-error   { color: #e74c3c; }

.upload-progress-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0 0;
  animation: uploadDoneIn 400ms cubic-bezier(.22,.72,.24,1) both;
}

@keyframes uploadDoneIn {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}

.upload-progress-done i {
  font-size: 2.4rem;
  color: #27ae60;
}

.upload-progress-done p {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: #2a2118;
  margin: 0;
}

/* ─────────────────────────────────────────────────────────── */

.home-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  opacity: 0;
  transition: opacity 320ms ease-out;
}

.home-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 16, 14, 0.78);
  backdrop-filter: blur(3px);
  animation: backdropFadeIn 400ms ease-out forwards;
}

@keyframes backdropFadeIn {
  from {
    background: rgba(19, 16, 14, 0);
    backdrop-filter: blur(0);
  }
  to {
    background: rgba(19, 16, 14, 0.78);
    backdrop-filter: blur(3px);
  }
}

.home-gallery-panel {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 8%, rgba(183, 154, 92, .25) 0%, rgba(18, 15, 13, .94) 44%, rgba(12, 10, 9, .98) 100%);
  padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: 1fr auto;
  animation: panelSlideUp 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

.home-gallery-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
  border: 0;
  background: rgba(53, 47, 42, .85);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  z-index: 4;
}

.home-gallery-stage {
  position: relative;
  border-radius: 14px;
  overflow: visible;
  background: rgba(0, 0, 0, .3);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  animation: stageSlideUp 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 100ms;
}

.home-gallery-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: 10;
  border-radius: 14px;
}

@keyframes stageSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.home-gallery-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, .14) 18%, rgba(0, 0, 0, 0) 46%);
  pointer-events: none;
}

.home-gallery-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.home-gallery-stage.is-snap-cue[data-swipe-dir="next"]::before {
  background: radial-gradient(ellipse at 80% 50%, rgba(255, 238, 204, .42) 0%, rgba(255, 215, 161, .2) 28%, rgba(255, 215, 161, 0) 58%);
  animation: gallerySwipeSnap 170ms cubic-bezier(.2,.72,.24,1);
}

.home-gallery-stage.is-snap-cue[data-swipe-dir="prev"]::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(255, 238, 204, .42) 0%, rgba(255, 215, 161, .2) 28%, rgba(255, 215, 161, 0) 58%);
  animation: gallerySwipeSnap 170ms cubic-bezier(.2,.72,.24,1);
}

@keyframes gallerySwipeSnap {
  0% { opacity: 0; transform: scale(1); }
  28% { opacity: 1; transform: scale(1.012); }
  100% { opacity: 0; transform: scale(1); }
}

.home-gallery-stage img {
  max-width: 100%;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.home-gallery-stage img.is-swipe-dragging {
  transition: none !important;
  cursor: grabbing;
}

.home-gallery-stage img.like-pulse {
  animation: likePulse .48s cubic-bezier(.22,.7,.2,1);
}

.home-gallery-stage img.unlike-pulse {
  animation: unlikePulse .42s cubic-bezier(.22,.7,.2,1);
}

@keyframes likePulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.028); }
  100% { transform: scale(1); }
}

@keyframes unlikePulse {
  0% { transform: scale(1); opacity: 1; }
  30% { transform: scale(.985); opacity: .88; }
  100% { transform: scale(1); opacity: 1; }
}

.home-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(17, 15, 14, .58);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .15);
  backdrop-filter: blur(2px);
  z-index: 3;
}

.home-gallery-nav.prev { left: 12px; }
.home-gallery-nav.next { right: 12px; }

.home-gallery-meta {
  display: grid;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 8px 0;
}

.home-gallery-counter {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  text-align: center;
  color: rgba(245, 238, 231, .78);
  font-size: 13px;
  letter-spacing: .4px;
  background: rgba(20, 17, 15, .45);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 4px 10px;
  backdrop-filter: blur(3px);
}

.home-gallery-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-gallery-actions-floating {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 3;
  justify-content: center;
}

.home-gallery-like,
.home-gallery-download {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  height: 38px;
  min-width: 116px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  backdrop-filter: blur(8px);
  transition: transform .15s ease, background-color .2s ease, opacity .2s ease;
}

.home-gallery-like {
  background: rgba(127, 23, 48, .62);
  color: #fff;
}

.home-gallery-like.is-active {
  background: rgba(156, 30, 58, .86);
  box-shadow: 0 6px 16px rgba(127, 23, 48, .35);
}

.home-gallery-like:disabled {
  opacity: .72;
}

.home-gallery-download {
  background: rgba(53, 47, 42, .52);
  color: #fff;
}

.home-gallery-like:hover,
.home-gallery-download:hover {
  transform: translateY(-1px);
}

.home-gallery-tip {
  text-align: center;
  color: rgba(245, 238, 231, .72);
  font-size: 12px;
  letter-spacing: .25px;
}

.home-gallery-heart-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -40%, 0);
  color: #e74c3c;
  font-size: clamp(56px, 11vw, 96px);
  text-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  pointer-events: none;
  z-index: 4;
  will-change: transform, opacity;
  animation: heartPop 620ms cubic-bezier(.2,.72,.24,1) forwards;
}

.home-gallery-heart-pop.is-unlike {
  color: #e74c3c;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: heartPopUnlike 560ms cubic-bezier(.2,.72,.24,1) forwards;
}

@keyframes heartPop {
  0% { opacity: 0; transform: translate3d(-50%, -30%, 0) scale(.76); }
  25% { opacity: 1; transform: translate3d(-50%, -48%, 0) scale(1.02); }
  100% { opacity: 0; transform: translate3d(-50%, -68%, 0) scale(.9); }
}

@keyframes heartPopUnlike {
  0% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(1.02); }
  25% { opacity: .9; transform: translate3d(-50%, -45%, 0) scale(.95); }
  100% { opacity: 0; transform: translate3d(-50%, -34%, 0) scale(.82); }
}

.confetti {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes confettiFall {
  to {
    transform: translate3d(var(--tx), var(--ty), 0) rotateZ(var(--rotation));
    opacity: 0;
  }
}

.home-gallery-heart-tap {
  font-size: 32px;
  color: #e74c3c;
}

@media (max-width: 575.98px) {
  .home-gallery-stage {
    border-radius: 10px;
  }

  .home-gallery-nav {
    width: 38px;
    height: 38px;
  }

  .home-gallery-nav.prev { left: 8px; }
  .home-gallery-nav.next { right: 8px; }

  .home-gallery-actions {
    gap: 8px;
  }

  .home-gallery-like,
  .home-gallery-download {
    min-width: 102px;
    height: 36px;
    padding: 0 12px;
  }
}

/* Mobile portrait only */
@media screen and (max-width: 575.98px) and (orientation: portrait) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .wedding-card,
  .content {
    height: 100svh;
    min-height: 100svh;
  }

  .wedding-card {
    max-width: 100%;
    min-height: 100svh;
    box-shadow: none;
    overflow: hidden;
  }

  .content {
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
  }

  .bg-photo {
    background-size: 100% 100%, 100% 100%, contain;
    background-position: center top, center top, center top;
    background-color: var(--cream);
  }

  .bg-photo::after {
    box-shadow:
      inset 0 -200px 120px rgba(245, 238, 231, .88),
      inset 0 -360px 190px rgba(245, 238, 231, .58),
      inset 0 0 50px rgba(255, 255, 255, .12);
  }

  .top-signature {
    top: max(20px, 6.2svh);
    right: 20px;
  }

  .names {
    font-size: clamp(35px, 10.6vw, 43px);
  }

  .names span {
    font-size: clamp(20px, 6.4vw, 26px);
    margin: 0 4px;
  }

  .wedding-date {
    margin-top: 10px;
    font-size: clamp(16px, 4.6vw, 20px);
    letter-spacing: 2.5px;
  }

  .main-section {
    position: absolute;
    left: 0;
    right: 0;
    top: max(178px, 35svh);
    bottom: 28px;
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    --hero-copy-offset-y: 2px;
  }

  .main-section h1 {
    font-size: clamp(28px, 7.8vw, 33px);
  }

  .main-section h1 em {
    font-size: clamp(27px, 7.5vw, 32px);
  }

  .heart-gold {
    margin: 10px 0 9px;
    font-size: 18px;
  }

  .lead-text {
    font-size: 12px;
    line-height: 1.32;
    margin-top: auto;
    margin-bottom: 2px;
    top: -8px;
  }

  .upload-btn {
    width: 100%;
    height: 48px;
    margin-bottom: 14px;
  }

  .upload-btn i {
    font-size: 19px;
  }

  .upload-btn span {
    font-size: 13px;
    letter-spacing: .35px;
  }

  .features {
    margin-bottom: 10px;
  }

  .feature-item {
    height: 80px;
    padding: 0 4px;
  }

  .feature-item i {
    height: 28px;
    font-size: 24px;
    margin-bottom: 4px;
  }

  .feature-item p {
    font-size: 11px;
    line-height: 1.18;
  }

  .gallery-title {
    gap: 8px;
    margin-bottom: 8px;
  }

  .gallery-title span {
    width: 28px;
  }

  .gallery-title strong {
    font-size: 16px;
    letter-spacing: 1.5px;
  }

  .gallery img,
  .gallery-placeholder {
    height: auto;
    aspect-ratio: 1.28 / 1;
    border-radius: 5px;
  }

  .gallery {
    margin-bottom: 8px;
  }

  .gallery .col-3 {
    display: flex;
  }

  .gallery a,
  .gallery-placeholder {
    width: 100%;
  }

  .home-gallery-open {
    display: block;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .footer-note {
    padding-top: 7px;
    font-size: 13px;
  }

  .footer-note i {
    font-size: 11px;
    margin-right: 4px;
  }

  .wedding-dropzone {
    display: none;
  }

  .wedding-mini-actions {
    margin-top: -8px;
    margin-bottom: 8px;
    gap: 8px;
  }

  .upload-queue {
    max-height: 7svh;
    overflow: auto;
    margin-bottom: 4px;
  }

  .toast {
    bottom: .5rem;
    width: calc(100% - 20px);
    text-align: center;
    font-size: 12px;
  }
}

@media screen and (max-width: 575.98px) and (orientation: portrait) and (max-height: 780px) {
  .content {
    height: 100svh;
    min-height: 100svh;
  }

  .main-section {
    top: max(142px, 28svh);
    bottom: 8px;
    padding: 0 12px;
    --hero-copy-offset-y: 4px;
  }

  .lead-text {
    font-size: 11px;
    margin-top: auto;
    margin-bottom: 2px;
    top: -6px;
  }

  .upload-btn {
    height: 44px;
    margin-bottom: 12px;
  }

  .feature-item {
    height: 72px;
  }

  .feature-item i {
    height: 24px;
    font-size: 21px;
  }

  .feature-item p {
    font-size: 10px;
    line-height: 1.14;
  }

  .gallery img,
  .gallery-placeholder {
    aspect-ratio: 1.28 / 1;
  }

  .footer-note {
    font-size: 12px;
    padding-top: 6px;
  }
}

@media screen and (max-width: 430px) and (orientation: portrait) {
  .main-section {
    top: max(150px, 20.4svh);
    bottom: 8px;
  }
}

@media screen and (orientation: landscape) and (min-width: 700px) and (max-height: 500px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .wedding-card,
  .content {
    width: 100vw;
    max-width: 100vw;
    height: 100svh;
    min-height: 100svh;
  }

  .wedding-card {
    margin: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .content {
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
  }

  .bg-photo {
    background-size: 100% 100%, 100% 100%, contain;
    background-position: center top, center top, center 8%;
    background-color: var(--cream);
  }

  .bg-photo::after {
    box-shadow:
      inset 0 -120px 80px rgba(245, 238, 231, .84),
      inset 0 -240px 140px rgba(245, 238, 231, .48),
      inset 0 0 36px rgba(255, 255, 255, .08);
  }

  .top-signature {
    top: max(14px, 4svh);
    right: 34px;
  }

  .names {
    font-size: clamp(28px, 4.7vw, 42px);
  }

  .names span {
    font-size: clamp(16px, 2.7vw, 22px);
    margin: 0 3px;
  }

  .wedding-date {
    margin-top: 6px;
    font-size: clamp(14px, 2.6vw, 20px);
    letter-spacing: 2px;
  }

  .main-section {
    position: absolute;
    left: 0;
    right: 0;
    top: 31svh;
    padding: 0 22px 8px;
  }

  .main-section h1 {
    font-size: clamp(24px, 3.9vw, 33px);
  }

  .main-section h1 em {
    font-size: clamp(23px, 3.7vw, 31px);
  }

  .heart-gold {
    margin: 6px 0 6px;
    font-size: 16px;
  }

  .lead-text {
    max-width: 760px;
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .upload-btn {
    width: min(420px, 58vw);
    height: 40px;
    margin-bottom: 8px;
  }

  .upload-btn i {
    font-size: 16px;
  }

  .upload-btn span {
    font-size: 11px;
    letter-spacing: .3px;
  }

  .features {
    margin-bottom: 6px;
  }

  .feature-item {
    height: 52px;
    padding: 0 6px;
  }

  .feature-item i {
    height: 16px;
    font-size: 16px;
    margin-bottom: 3px;
  }

  .feature-item p {
    font-size: 9px;
    line-height: 1.05;
  }

  .gallery-title {
    gap: 6px;
    margin-bottom: 6px;
  }

  .gallery-title span {
    width: 50px;
  }

  .gallery-title strong {
    font-size: 14px;
    letter-spacing: 1.5px;
  }

  .gallery img,
  .gallery-placeholder {
    height: 42px;
    border-radius: 5px;
  }

  .gallery {
    margin-bottom: 6px;
  }

  .footer-note {
    padding-top: 5px;
    font-size: 11px;
  }

  .footer-note i {
    font-size: 10px;
    margin-right: 4px;
  }

  .upload-queue {
    max-height: 6svh;
    margin-bottom: 3px;
  }

  .toast {
    bottom: .35rem;
    width: min(420px, calc(100% - 24px));
    text-align: center;
    font-size: 11px;
  }
}
