/* =============================================
   MOBILE-FIRST WEDDING APP
   Палитра от референтната покана
   ============================================= */
:root {
  --cream-50:  #FCF8F2;
  --cream-100: #F7F0E4;
  --cream-200: #EFE3CD;
  --sage-100: #E4EBDC; --sage-300: #B8C6A6; --sage-500: #8A9C75; --sage-700: #5A6B49;
  --peach-100: #FBE9DA; --peach-300: #F5C9A8; --peach-500: #E8A579;
  --blush-100: #F9E3DE; --blush-300: #F0C0B5; --blush-500: #D89889; --blush-700: #B27260;
  --terracotta-400: #C58A6B; --terracotta-600: #9C5C3D; --terracotta-800: #6E3E27;
  --ink: #3B2E22; --ink-soft: #5F4A36; --ink-mute: #8B7860;
  --shadow-card: 0 1px 2px rgba(59,46,34,0.04), 0 8px 24px -12px rgba(59,46,34,0.10);
}

/* =============================================
   RESET
   ============================================= */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--cream-100);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
::selection { background: var(--terracotta-600); color: var(--cream-50); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; -webkit-touch-callout: none; }
button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font-family: inherit; font-size: 16px; /* iOS no zoom */ }

.serif  { font-family: 'Playfair Display', Georgia, serif; }
.script { font-family: 'Great Vibes', cursive; }
.mono-num { font-variant-numeric: tabular-nums; }

/* =============================================
   APP CONTAINER (mobile-first, тясна колона дори на desktop)
   ============================================= */
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream-50);
  position: relative;
  box-shadow: 0 0 40px rgba(59,46,34,.05);
}

/* =============================================
   HERO COVER
   ============================================= */
.hero-cover {
  position: relative;
  text-align: center;
  padding: 2.5rem 1.25rem 1.75rem;
  background: linear-gradient(180deg, var(--cream-100) 0%, var(--cream-50) 100%);
  border-radius: 0 0 1.5rem 1.5rem;
  overflow: hidden;
}
.hero-cover .floral-bg, .hero-cover .floral-bg-l {
  display: none; /* Скрити на тесен екран */
}
.hero-couple {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
  margin: .5rem 0 0;
  letter-spacing: -.01em;
}
.hero-amp-sm {
  font-family: 'Great Vibes', cursive;
  color: var(--terracotta-600);
  font-size: 1.5rem;
}
.hero-date {
  font-size: .75rem;
  color: var(--ink-soft);
  letter-spacing: .25em;
  text-transform: uppercase;
  margin: .75rem 0 0;
}

@media (min-width: 600px) {
  .hero-cover { padding: 3rem 1.5rem 2rem; }
  .hero-cover .floral-bg, .hero-cover .floral-bg-l { display: block; }
  .hero-couple { font-size: 2.75rem; }
}

/* =============================================
   ТИПОГРАФИЯ
   ============================================= */
.script-title  { font-family: 'Great Vibes', cursive; font-size: 2.25rem; color: var(--ink); }
.script-accent { font-family: 'Great Vibes', cursive; color: var(--terracotta-600); }
.eyebrow { font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--ink-soft); }

.text-soft  { color: var(--ink-soft); }
.text-mute  { color: var(--ink-mute); }
.text-accent { color: var(--terracotta-800); }
.text-sage  { color: var(--sage-700); }

/* =============================================
   SECTION HEAD
   ============================================= */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 1.25rem;
  margin: 2rem 0 1rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0;
}
.section-link {
  font-size: .85rem;
  color: var(--terracotta-600);
  text-decoration: none;
  font-weight: 500;
  padding: .25rem .5rem;
  margin-right: -.5rem;
  border-radius: .5rem;
}
.section-link:active { background: rgba(156,92,61,.1); }

/* =============================================
   ACTION CARDS (PRIMARY CTA)
   На мобилно: пълна ширина, един под друг
   ============================================= */
.action-cards {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 0 1.25rem;
  margin-top: 1.25rem;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem;
  border-radius: 1.25rem;
  text-decoration: none;
  min-height: 84px;
  position: relative;
  transition: transform .15s ease;
}
.action-card:active { transform: scale(.98); }
.action-photo {
  background: linear-gradient(135deg, var(--peach-100) 0%, var(--peach-300) 100%);
  color: var(--terracotta-800);
  border: 1px solid rgba(245,201,168,.7);
}
.action-story {
  background: linear-gradient(135deg, var(--blush-100) 0%, var(--blush-300) 100%);
  color: var(--terracotta-800);
  border: 1px solid rgba(240,192,181,.7);
}
.action-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(110,62,39,.1);
}
.action-text { flex: 1; min-width: 0; }
.action-label {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}
.action-sub {
  font-size: .8rem;
  opacity: .8;
  margin-top: 2px;
}
.action-arrow {
  flex-shrink: 0;
  opacity: .6;
}

/* =============================================
   STORIES RAIL
   ============================================= */
.stories-rail {
  display: flex;
  gap: .875rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .25rem 1.25rem .75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stories-rail::-webkit-scrollbar { display: none; }

.story-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  scroll-snap-align: start;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.story-ring {
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--peach-500), var(--terracotta-600), var(--blush-500));
}
.story-ring-inner {
  padding: 2px;
  border-radius: 50%;
  background: var(--cream-50);
}
.story-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cream-100);
}
.story-avatar img, .story-avatar video {
  width: 100%; height: 100%; object-fit: cover;
}
.story-name {
  font-size: .7rem;
  color: var(--ink-soft);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty stories card */
.empty-stories {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 1.25rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(249,227,222,.5);
  border: 1px dashed rgba(240,192,181,.6);
  text-decoration: none;
}
.empty-stories-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach-300), var(--terracotta-600));
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* =============================================
   LATEST GRID (3x3)
   ============================================= */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 1.25rem;
}
.latest-tile {
  aspect-ratio: 1;
  border-radius: .625rem;
  overflow: hidden;
  background: var(--cream-100);
  border: 0; padding: 0;
  display: block;
  position: relative;
}
.latest-tile img, .latest-tile video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.latest-tile:active img { transform: scale(.97); transition: transform .1s; }

/* =============================================
   GALLERY MEDIA GRID
   ============================================= */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 0 .5rem;
}
.media-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: .375rem;
  overflow: hidden;
  background: var(--cream-100);
  border: 0; padding: 0;
  cursor: pointer;
}
.media-tile img, .media-tile video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.media-tile .meta { display: none; }
@media (min-width: 480px) {
  .media-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 1rem; }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: .5rem;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: .875rem 1.5rem;
  min-height: 48px;
  transition: transform .1s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--terracotta-600);
  color: var(--cream-50);
  border: 0;
  box-shadow: 0 4px 12px -2px rgba(156,92,61,.4);
}
.btn-primary:active { transform: scale(.98); background: var(--terracotta-800); }
.btn-primary:disabled { opacity: .5; pointer-events: none; }
.btn-ghost {
  background: transparent;
  color: var(--terracotta-800);
  border: 1px solid rgba(156,92,61,.4);
}
.btn-ghost:active { background: rgba(156,92,61,.05); }
.btn-sm { padding: .5rem 1rem; min-height: 40px; font-size: .875rem; }

/* =============================================
   CARDS / INPUTS
   ============================================= */
.card {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(184,198,166,.25);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.input, .textarea {
  width: 100%;
  padding: .875rem 1rem;
  border-radius: .875rem;
  border: 1px solid rgba(184,198,166,.5);
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus {
  border-color: var(--terracotta-600);
  box-shadow: 0 0 0 3px rgba(156,92,61,.12);
}
.textarea { min-height: 120px; resize: vertical; }
.label {
  display: block;
  font-size: .85rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: .375rem;
}

/* =============================================
   MODE SWITCH (Photo/Story; Public/Private)
   ============================================= */
.mode-switch {
  display: flex;
  gap: .375rem;
  padding: .375rem;
  background: var(--cream-100);
  border-radius: 1rem;
}
.mode-btn {
  flex: 1;
  padding: .75rem .5rem;
  border: 0;
  background: transparent;
  border-radius: .75rem;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  transition: background .2s, color .2s;
  min-height: 44px;
}
.mode-btn.active {
  background: var(--terracotta-600);
  color: var(--cream-50);
  box-shadow: 0 2px 6px -2px rgba(156,92,61,.4);
}

/* =============================================
   DROPZONE
   ============================================= */
.dropzone {
  width: 100%;
  border: 2px dashed rgba(184,198,166,.7);
  border-radius: 1.25rem;
  background: rgba(255,255,255,.5);
  padding: 2rem 1rem;
  text-align: center;
  transition: background .2s, border-color .2s;
  display: block;
}
.dropzone:active { background: rgba(255,255,255,.85); border-color: var(--terracotta-400); }
.dropzone-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--cream-100);
  color: var(--terracotta-600);
  border-radius: 50%;
}

/* =============================================
   PREVIEW TILES
   ============================================= */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}
.preview-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: .75rem;
  overflow: hidden;
  background: var(--cream-100);
}
.preview-tile img, .preview-tile video {
  width: 100%; height: 100%; object-fit: cover;
}
.preview-tile .overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.preview-tile .overlay.uploading { background: rgba(59,46,34,.55); }
.preview-tile .overlay.done { background: rgba(138,156,117,.7); }
.preview-tile .overlay.error { background: rgba(110,62,39,.7); }

/* =============================================
   PROGRAM (компактен на мобилно)
   ============================================= */
.program-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 0;
  border-bottom: 1px solid rgba(184,198,166,.25);
}
.program-item:last-child { border-bottom: 0; }
.program-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--cream-100);
  border: 1px solid rgba(245,201,168,.5);
  display: flex; align-items: center; justify-content: center;
}
.program-time {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--terracotta-800);
  width: 60px;
  flex-shrink: 0;
}
.program-label {
  color: var(--ink-soft);
  font-size: .95rem;
}

/* =============================================
   ПАЛИТРА КРЪГЧЕТА (дрескод)
   ============================================= */
.palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  max-width: 280px;
  margin: 1.5rem auto 0;
  place-items: center;
}
.palette-dot {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 0 6px rgba(0,0,0,.05);
}

/* =============================================
   RSVP / PHONES
   ============================================= */
.rsvp-phone {
  color: var(--terracotta-800);
  text-decoration: underline;
  text-decoration-color: var(--peach-300);
  text-underline-offset: 3px;
}

/* =============================================
   ORNAMENT
   ============================================= */
.ornament {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem;
  margin: .75rem 0;
}
.ornament-line {
  height: 1px; width: 36px;
  background: linear-gradient(90deg, transparent, var(--terracotta-400));
}
.ornament-line.r {
  background: linear-gradient(90deg, var(--terracotta-400), transparent);
}

.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--terracotta-400) 50%, transparent);
  margin: 2.5rem 0;
}

/* =============================================
   BOTTOM NAV (FIXED, MOBILE)
   ============================================= */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  max-width: 480px; margin: 0 auto;
  background: rgba(252,248,242,.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(184,198,166,.3);
  padding: .5rem .25rem calc(env(safe-area-inset-bottom, 0px) + .5rem);
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  box-shadow: 0 -4px 20px -8px rgba(59,46,34,.1);
}
.nav-item {
  flex: 1;
  max-width: 80px;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: .5rem .25rem;
  color: var(--ink-mute);
  text-decoration: none;
  font-size: .65rem;
  font-weight: 500;
  border-radius: .75rem;
  transition: color .15s;
  min-height: 48px;
}
.nav-item.active { color: var(--terracotta-600); }
.nav-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.nav-item.active .nav-icon { transform: scale(1.1); }

/* Централен FAB */
.nav-cta {
  flex: 0 0 64px;
  display: flex; flex-direction: column;
  align-items: center;
  text-decoration: none;
  margin-top: -1.75rem;
}
.nav-cta-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach-500), var(--terracotta-600));
  display: flex; align-items: center; justify-content: center;
  color: white;
  box-shadow: 0 6px 16px -4px rgba(156,92,61,.5);
  border: 4px solid var(--cream-50);
  transition: transform .15s;
}
.nav-cta:active .nav-cta-circle { transform: scale(.95); }
.nav-cta-label {
  font-size: .65rem;
  color: var(--terracotta-600);
  font-weight: 600;
  margin-top: 2px;
}

.has-bottom-nav { padding-bottom: 6rem; }

/* =============================================
   QUICK STATS
   ============================================= */
.quick-stats {
  display: flex;
  justify-content: space-around;
  gap: .5rem;
  padding: 1rem 1.25rem;
  margin: 1rem 1.25rem;
  background: rgba(255,255,255,.5);
  border-radius: 1rem;
  border: 1px solid rgba(184,198,166,.25);
}
.stat-item { text-align: center; flex: 1; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--terracotta-600);
}
.stat-label {
  font-size: .65rem;
  color: var(--ink-mute);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  margin: 0 1.25rem;
  background: rgba(255,255,255,.6);
  border-radius: 1rem;
}
.empty-icon {
  display: inline-flex;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: var(--cream-100);
  align-items: center; justify-content: center;
  color: var(--terracotta-600);
  margin-bottom: .75rem;
  font-size: 1.5rem;
}

/* =============================================
   NAME MODAL
   ============================================= */
.modal-overlay {
  position: fixed; inset: 0;
  z-index: 60;
  background: rgba(59,46,34,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 1rem;
  animation: fadeIn .2s ease;
}
@media (min-width: 480px) {
  .modal-overlay { align-items: center; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--cream-50);
  border-radius: 1.5rem;
  padding: 1.75rem;
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.3);
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* =============================================
   SUCCESS TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 7rem; left: 50%;
  transform: translateX(-50%);
  background: var(--sage-700);
  color: white;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 8px 20px -4px rgba(0,0,0,.2);
  z-index: 50;
  white-space: nowrap;
  animation: toastIn .3s ease, toastOut .3s ease 2.5s forwards;
}
@keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes toastOut { to { transform: translate(-50%, 20px); opacity: 0; } }

/* =============================================
   WISHES
   ============================================= */
.wish-card {
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(184,198,166,.2);
  box-shadow: 0 2px 8px -4px rgba(59,46,34,.1);
}
.wish-card .msg {
  font-family: 'Playfair Display', serif;
  color: var(--ink);
  white-space: pre-wrap;
  font-size: .95rem;
  margin: 0;
}
.wish-card .foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(59,46,34,.1);
}
.wish-author {
  font-family: 'Great Vibes', cursive;
  font-size: 1.2rem;
  color: var(--terracotta-600);
}
.wish-date {
  font-size: .65rem;
  color: var(--ink-mute);
}
.wishes-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(59,46,34,.95);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.lightbox img, .lightbox video {
  max-width: 100vw; max-height: 100vh;
  object-fit: contain;
}
.lightbox .close, .lightbox .prev, .lightbox .next {
  position: absolute;
  background: rgba(252,248,242,.15);
  border: 0;
  color: var(--cream-50);
  padding: .5rem;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
.lightbox .close { top: 1rem; right: 1rem; }
.lightbox .prev { top: 50%; transform: translateY(-50%); left: .5rem; }
.lightbox .next { top: 50%; transform: translateY(-50%); right: .5rem; }
.lightbox .caption {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  color: var(--cream-50);
  font-size: .85rem;
  background: rgba(0,0,0,.3);
  padding: .25rem .75rem;
  border-radius: 999px;
}

/* =============================================
   STORY VIEWER (Instagram-style)
   ============================================= */
.viewer {
  position: fixed; inset: 0;
  background: rgba(59,46,34,.96);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.viewer .progress-bar {
  position: absolute; top: 0;
  inset-inline: 0;
  padding: .5rem;
  display: flex; gap: .25rem;
  z-index: 2;
}
.viewer .progress-bar > div {
  flex: 1; height: 3px;
  background: rgba(252,248,242,.25);
  border-radius: 2px;
  overflow: hidden;
}
.viewer .progress-bar > div > i {
  display: block;
  height: 100%;
  background: var(--cream-50);
  width: 0;
  transition: width .1s linear;
}
.viewer .top-bar {
  position: absolute;
  top: .5rem; inset-inline: 0;
  margin-top: .5rem;
  padding: 0 1rem;
  display: flex; align-items: center; gap: .75rem;
  z-index: 2;
  color: var(--cream-50);
}
.viewer .avatar {
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--peach-300), var(--terracotta-600));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: .9rem;
}
.viewer .top-info { flex: 1; min-width: 0; }
.viewer .top-info .nm { font-weight: 500; font-size: .9rem; }
.viewer .top-info .tm { font-size: .75rem; opacity: .7; }
.viewer button.icon-btn {
  background: transparent;
  border: 0;
  color: rgba(252,248,242,.85);
  padding: .5rem;
  font-size: 1.1rem;
  min-width: 36px; min-height: 36px;
}
.viewer .media-wrap {
  max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.viewer img, .viewer video {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}
.viewer .tap-l, .viewer .tap-r {
  position: absolute;
  inset-block: 0;
  width: 33%;
  background: transparent;
  border: 0;
  z-index: 1;
}
.viewer .tap-l { left: 0; }
.viewer .tap-r { right: 0; }

/* =============================================
   SPINNER + animations
   ============================================= */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(252,248,242,.3);
  border-top-color: var(--cream-50);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .7s ease-out both; }

/* =============================================
   UTILITY
   ============================================= */
.hidden { display: none !important; }
.relative { position: relative; }
.center { text-align: center; }
.center-text { text-align: center; }
.full { width: 100%; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; } .mt-8 { margin-top: 4rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }

/* =============================================
   PRINT (за QR картичката)
   ============================================= */
@media print {
  @page { size: A6; margin: 8mm; }
  body { background: white; }
  .page { max-width: none; box-shadow: none; }
  .no-print, .bottom-nav { display: none !important; }
}
