/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #c9a84c;
  --gold-light:  #f0d080;
  --gold-dark:   #8a6a1a;
  --pink:        #e8749a;
  --pink-light:  #fce4ec;
  --pink-dark:   #b5365e;
  --cream:       #fff9f0;
  --white:       #ffffff;
  --text:        #2a1a0e;
  --text-muted:  #7a5c3e;
  --shadow:      0 4px 24px rgba(0,0,0,.18);
  --radius:      14px;
  --transition:  .2s ease;
  /* Z-index scale */
  --z-card:      10;
  --z-fab:       500;
  --z-sheet:     900;
  --z-gate:      1100;
  --z-modal:     1000;
  --z-upload:    1500;
  --z-toast:     2000;
}

/* ── Skip link (accessibility) ────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--gold);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: .9rem;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  background: #110804;
  color: var(--text);
  min-height: 100dvh;
  /* Prevent pull-to-refresh on modal/sheet open */
  overscroll-behavior-y: none;
}

/* Global interactive element improvements */
button, a, [role="button"] {
  cursor: pointer;
  touch-action: manipulation; /* eliminate 300ms tap delay */
}

button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a0a00 0%, #3d1a00 40%, #1a0a2e 100%);
  padding: 56px 20px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,.25) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(232,116,154,.15) 0%, transparent 60%);
  pointer-events: none;
}

.sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.sparkle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold-light);
  animation: twinkle 3s infinite;
  opacity: 0;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50%       { opacity: 1; transform: scale(1); }
}

.hero-inner { position: relative; z-index: 1; }

/* ── Andrea portrait ──────────────────────────────────────── */
.andrea-portrait {
  margin: 0 auto 20px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), #fff7d6, var(--gold-dark), var(--gold-light));
  box-shadow:
    0 0 0 2px rgba(201,168,76,.4),
    0 0 24px rgba(201,168,76,.5),
    0 0 60px rgba(201,168,76,.2);
  animation: goldPulse 3s ease-in-out infinite;
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(201,168,76,.4), 0 0 24px rgba(201,168,76,.5), 0 0 60px rgba(201,168,76,.2); }
  50%       { box-shadow: 0 0 0 4px rgba(201,168,76,.6), 0 0 36px rgba(201,168,76,.7), 0 0 80px rgba(201,168,76,.35); }
}

.andrea-portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 3px solid #1a0a00;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--gold-dark), var(--pink-dark));
  color: var(--gold-light);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.hero p {
  color: rgba(255,255,255,.7);
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: 28px;
  font-style: italic;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: 999px;
  padding: 8px 20px;
  color: var(--gold-light);
  font-size: .9rem;
  font-weight: 600;
}

.hero-counter .count-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
}

.upload-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  min-height: 44px;
  font-size: .95rem;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, opacity .15s ease;
  box-shadow: 0 4px 20px rgba(232,116,154,.4);
  -webkit-tap-highlight-color: transparent;
}

.upload-hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(232,116,154,.5); }
.upload-hero-btn:active { transform: scale(.97); opacity: .9; }
.upload-hero-btn svg { width: 18px; height: 18px; }

/* ── QR code ──────────────────────────────────────────────── */
.qr-section { margin-top: 24px; }

.qr-toggle {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  color: rgba(255,255,255,.8);
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 18px;
  cursor: pointer;
  transition: background var(--transition);
}

.qr-toggle:hover { background: rgba(255,255,255,.2); }

.qr-panel {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeScale .2s ease;
}

.qr-panel img {
  width: 160px; height: 160px;
  border-radius: 12px;
  border: 4px solid rgba(255,255,255,.15);
  background: var(--white);
  padding: 6px;
}

.qr-panel p {
  color: rgba(255,255,255,.6);
  font-size: .78rem;
  margin: 0;
  font-style: normal;
}

/* ── Upload banner ────────────────────────────────────────── */
.upload-banner {
  background: linear-gradient(135deg, var(--pink-light), #fff0f8);
  border-bottom: 1px solid rgba(232,116,154,.2);
}

.upload-banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.upload-banner-text {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-banner-emoji { font-size: 1.8rem; }

.upload-banner-text strong {
  display: block;
  font-size: .95rem;
  color: var(--text);
}

.upload-banner-text span {
  font-size: .82rem;
  color: var(--text-muted);
}

.upload-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--pink-dark), var(--pink));
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 44px;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, opacity .15s ease;
  box-shadow: 0 4px 16px rgba(181,54,94,.3);
  -webkit-tap-highlight-color: transparent;
}

.upload-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(181,54,94,.4); }
.upload-cta-btn:active { transform: scale(.97); opacity: .9; }
.upload-cta-btn svg { width: 16px; height: 16px; }

/* ── Gallery ──────────────────────────────────────────────── */
.gallery-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 16px 100px;
  color: var(--cream);
}

/* Masonry grid */
.video-grid { columns: 2; column-gap: 14px; }
@media (min-width: 600px)  { .video-grid { columns: 3; } }
@media (min-width: 900px)  { .video-grid { columns: 4; } }
@media (min-width: 1200px) { .video-grid { columns: 5; } }

.video-card {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  color: var(--text);
  margin-bottom: 14px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .4s ease, transform .4s ease, box-shadow var(--transition);
}

.video-card.visible { opacity: 1; transform: translateY(0); }
.video-card.landscape { column-span: 2; }

.video-card:hover {
  box-shadow: 0 8px 32px rgba(201,168,76,.3);
  transform: translateY(-3px);
}

.video-card:hover .card-overlay { opacity: 1; }
.video-card:hover .play-btn { transform: translate(-50%,-50%) scale(1.1); }

/* Thumbnail */
.thumb-wrap {
  position: relative;
  width: 100%;
  background: #111;
  overflow: hidden;
}

.thumb-wrap video {
  width: 100%;
  display: block;
  object-fit: cover;
}

.thumb-wrap.portrait  video { aspect-ratio: 9/16; }
.thumb-wrap.landscape video { aspect-ratio: 16/9; }

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,.35), rgba(232,116,154,.25));
  opacity: 0;
  transition: opacity var(--transition);
}

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 52px; height: 52px;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.play-btn svg { width: 22px; height: 22px; fill: var(--gold-dark); margin-left: 3px; }

/* Card footer */
.card-footer {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-duration { font-size: .75rem; color: var(--text-muted); flex-shrink: 0; }

.card-like-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border-radius: 8px;
  transition: transform .15s ease, color var(--transition);
  line-height: 1;
}

.card-like-btn.liked { color: #e8749a; }
.card-like-btn:hover { transform: scale(1.2); }
.card-like-btn .heart { font-size: 1rem; display: inline-block; }
.card-like-btn.pop .heart { animation: heartPop .3s ease; }

@keyframes heartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* uploader name on card */
.card-uploader {
  font-size: .7rem;
  color: var(--text-muted);
  padding: 0 12px 8px;
  font-style: italic;
}

.card-share-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gold-dark);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  display: flex; align-items: center; gap: 4px;
}

.card-share-btn { min-height: 32px; -webkit-tap-highlight-color: transparent; }
.card-share-btn:hover  { background: var(--gold); color: var(--white); }
.card-share-btn:active { transform: scale(.95); }
.card-share-btn svg { width: 12px; height: 12px; }

/* ── Skeleton loading ──────────────────────────────────────── */
.loader {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 4px 0;
}

@media (min-width: 600px)  { .loader { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .loader { grid-template-columns: repeat(4, 1fr); } }

.skeleton-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}

.skeleton-thumb {
  background: linear-gradient(90deg, #f0e8e0 25%, #fdf5ee 50%, #f0e8e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-thumb.portrait  { aspect-ratio: 9/16; }
.skeleton-thumb.landscape { aspect-ratio: 16/9; }

.skeleton-footer {
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0e8e0 25%, #fdf5ee 50%, #f0e8e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .emoji { font-size: 4rem; margin-bottom: 16px; }
.empty-state h2 { font-size: 1.5rem; color: var(--gold-dark); margin-bottom: 8px; }
.empty-state p  { color: rgba(255,249,240,.65); max-width: 360px; margin: 0 auto 24px; }

.upload-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(232,116,154,.4);
}

.upload-empty-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(232,116,154,.5); }
.upload-empty-btn:active { transform: scale(.97); opacity: .9; }
.upload-empty-btn { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.upload-empty-btn svg { width: 18px; height: 18px; }

/* ── Load more ────────────────────────────────────────────── */
.load-more-wrap { text-align: center; padding: 20px 0 40px; }

.load-more-btn {
  background: none;
  border: 2px solid var(--gold);
  border-radius: 999px;
  padding: 10px 28px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--gold-dark);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.load-more-btn { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.load-more-btn:hover  { background: var(--gold); color: var(--white); }
.load-more-btn:active { transform: scale(.97); opacity: .9; }

/* ── Floating action button (mobile upload) ───────────────── */
.fab {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(232,116,154,.5);
  cursor: pointer;
  z-index: 500;
  transition: transform var(--transition), box-shadow var(--transition);
}

.fab { -webkit-tap-highlight-color: transparent; }
.fab:hover  { transform: scale(1.1); box-shadow: 0 10px 32px rgba(232,116,154,.6); }
.fab:active { transform: scale(.95); }
.fab svg { width: 26px; height: 26px; stroke: var(--white); }

/* ── Upload progress overlay ──────────────────────────────── */
.upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.upload-progress-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 40px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.upload-progress-icon { font-size: 3rem; margin-bottom: 16px; }
.upload-progress-card h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 20px; }

.progress-bar-wrap {
  background: var(--pink-light);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--pink));
  border-radius: 999px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.upload-progress-pct { font-size: .85rem; color: var(--text-muted); font-weight: 600; }

/* ── Upload success toast ─────────────────────────────────── */
.upload-success {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  z-index: 2000;
  font-size: .9rem;
  animation: slideUp .3s ease;
  max-width: 340px;
  width: calc(100% - 40px);
}

.upload-success span:first-child { font-size: 1.8rem; }
.upload-success strong { display: block; color: var(--text); }
.upload-success span:last-child { color: var(--text-muted); font-size: .82rem; }

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ── Share code gate ──────────────────────────────────────── */
.gate-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gate-backdrop.open { display: flex; }

.gate-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 32px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: fadeScale .2s ease;
}

.gate-icon { font-size: 2.8rem; margin-bottom: 14px; }

.gate-card h2 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.gate-card p {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.gate-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  text-align: center;
  letter-spacing: .12em;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 8px;
}

.gate-input:focus { border-color: var(--gold); }
.gate-input.error { border-color: var(--pink-dark); animation: shake .3s ease; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-8px); }
  75%      { transform: translateX(8px); }
}

.gate-error {
  font-size: .8rem;
  color: var(--pink-dark);
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}

.gate-error.show { display: block; }

.gate-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 12px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
  transition: opacity var(--transition);
}

.gate-btn { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.gate-btn:hover  { opacity: .9; }
.gate-btn:active { transform: scale(.97); opacity: .85; }

.gate-cancel {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .85rem;
  cursor: pointer;
  padding: 4px;
}

.gate-cancel:hover { color: var(--text); }

/* ── Share menu ───────────────────────────────────────────── */
.share-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 900;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.share-backdrop.open { display: flex; }

.share-sheet {
  background: var(--white);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 20px 36px;
  animation: slideUp .25s ease;
}

.share-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.share-sheet-header h3 { font-size: 1rem; font-weight: 700; }

.share-close {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (min-width: 400px) {
  .share-options { grid-template-columns: repeat(6, 1fr); }
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 4px;
  border-radius: 12px;
  transition: background var(--transition);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text);
}

.share-option { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.share-option:hover  { background: var(--pink-light); }
.share-option:active { transform: scale(.93); }

.share-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.share-icon.whatsapp  { background: #25d366; }
.share-icon.instagram { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.share-icon.facebook  { background: #1877f2; }
.share-icon.twitter   { background: #000; }
.share-icon.copy      { background: linear-gradient(135deg, var(--gold), var(--pink)); }
.share-icon.download  { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.share-icon svg       { width: 26px; height: 26px; fill: #fff; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open { display: flex; }

.modal-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  animation: fadeScale .2s ease;
}

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

#modal-video,
#modal-img {
  width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  display: block;
  background: #000;
}

#modal-img { object-fit: contain; }

/* Photo badge on picture cards */
.media-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.55);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .9rem;
  line-height: 1;
  pointer-events: none;
}

.modal-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 0;
  gap: 12px;
}

.modal-title {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  padding: 7px 14px;
  color: var(--white);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.modal-btn { min-height: 44px; -webkit-tap-highlight-color: transparent; }
.modal-btn:hover  { background: rgba(255,255,255,.22); }
.modal-btn:active { transform: scale(.96); }
.modal-btn svg { width: 16px; height: 16px; fill: var(--white); }

.modal-close {
  position: absolute;
  top: -14px; right: -14px;
  background: var(--pink-dark);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  transition: background var(--transition);
}

.modal-close:hover { background: var(--pink); }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 24px;
  color: rgba(255,249,240,.55);
  font-size: .8rem;
  border-top: 1px solid rgba(201,168,76,.2);
}

/* ── Config warning banner ────────────────────────────────── */
.config-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-size: .88rem;
  color: #856404;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.config-warning strong { display: block; margin-bottom: 4px; }
.config-warning code {
  background: rgba(0,0,0,.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
}
