/* Hi-fi стили — наследуют атмосферу вайрфреймов
   (Caveat / Patrick Hand / беж / тёплое золото), но без сетки и грубых линий.
   Цель: ощущение бумажного альбома + лёгкого вечернего света. */

:root {
  --paper: #f6f4ee;           /* Warm linen / luxury paper */
  --paper-2: #edeae0;
  --paper-3: #e2ded0;
  --ink: #1e1a17;             /* Soft, deep charcoal */
  --ink-soft: #4d453f;
  --ink-mute: #8c8278;
  --line: rgba(30,26,23,0.08);
  --line-strong: rgba(30,26,23,0.16);
  --accent: #b8956c;          /* Muted luxury gold / champagne */
  --accent-2: #8c6e4a;
  --accent-soft: #f1ebd8;
  --accent-glow: rgba(184,149,108,0.12);
  --rose: #cba8a0;            /* Dusty rose */
  --sage: #8e9f8f;            /* Muted sage */
  --purple: #aa95bc;          /* Muted lavender */
  --blue: #8ca3bc;            /* Muted blue */
  --shadow-1: 0 4px 20px rgba(30, 26, 23, 0.04);
  --shadow-2: 0 8px 32px rgba(30, 26, 23, 0.07);
  --shadow-3: 0 16px 48px rgba(30, 26, 23, 0.12);
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-pill: 999px;
  --w-content: 420px;
}

/* Глобальный шум пленки */
.noise-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  content: "";
  opacity: 0.035;
  pointer-events: none;
  z-index: 99999;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter Tight", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  overscroll-behavior-y: none;
}

body {
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 75%),
    var(--paper);
}

.hand {
  font-family: "Caveat", cursive;
  font-weight: 700;
}

.serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-style: normal;
}

.sans {
  font-family: "Inter Tight", system-ui, sans-serif;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

input, textarea {
  font-family: inherit;
  color: inherit;
}

/* ── Layout shell ────────────────────────────────────────── */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page {
  flex: 1;
  width: 100%;
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 16px 18px 100px;
  position: relative;
}

.page-wide {
  max-width: 920px;
}

/* Topbar minimal */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251,250,246,0.75);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(26,22,18,0.08);
}
.topbar-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.topbar h1 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 22px;
  margin: 0;
  line-height: 1;
}
.topbar .live {
  font-family: "Inter Tight", sans-serif;
  font-size: 11px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}

.iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background 0.15s;
}
.iconbtn:hover, .iconbtn:active { background: rgba(26,22,18,0.06); }
.iconbtn svg { width: 20px; height: 20px; stroke-width: 1.5; }

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-family: "Inter Tight", sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  user-select: none;
  min-height: 44px;
}
.btn:hover { box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent-2);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-2); }
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover { background: rgba(26,22,18,0.04); }
.btn-block {
  display: flex;
  width: 100%;
}
.btn-lg {
  padding: 16px 22px;
  font-size: 17px;
  border-radius: var(--r-md);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Floating action button (FAB) */
.fab {
  position: fixed;
  right: max(16px, calc((100vw - var(--w-content)) / 2 + 18px));
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-2);
  z-index: 25;
  transition: transform 0.18s ease, box-shadow 0.18s;
}
.fab:hover { transform: scale(1.06); box-shadow: var(--shadow-3); }
.fab svg { width: 28px; height: 28px; stroke-width: 2; }

/* ── Cards / panels ───────────────────────────────────────── */

.card {
  background: var(--paper);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  padding: 16px;
}
.panel {
  background: var(--paper-2);
  border-radius: var(--r-md);
  padding: 14px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

/* Decorative ornament — used as section separator */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  gap: 12px;
  margin: 18px 0;
}
.ornament::before, .ornament::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, var(--accent-soft), transparent);
  max-width: 80px;
}

/* Typography */
.title-hero {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(48px, 12vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.title-display {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1;
}
.title-2 {
  font-family: "Instrument Serif", serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.title-3 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
}
.eyebrow {
  font-family: "Inter Tight", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.meta {
  font-family: "Inter Tight", sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
}
.mute { color: var(--ink-mute); }

/* Form fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-family: "Inter Tight", sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.input, .textarea {
  font-family: "Instrument Serif", serif;
  font-size: 17px;
  line-height: 1.4;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.input:focus, .textarea:focus {
  border-color: var(--accent);
  background: #fff;
}
.textarea {
  font-family: "Caveat", cursive;
  font-size: 22px;
  line-height: 1.3;
  resize: none;
  min-height: 90px;
}

/* Chips / pills */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-family: "Inter Tight", sans-serif;
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s, border-color 0.12s;
}
.chip:hover { background: var(--paper-2); }
.chip.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.chip.accent {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--ink);
  border: 1px solid var(--line);
}
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }

/* Photos */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  border-radius: var(--r-sm);
  display: block;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.photo:active {
  transform: scale(0.96);
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-square { aspect-ratio: 1; }
.photo-portrait { aspect-ratio: 3 / 4; }
.photo-landscape { aspect-ratio: 4 / 3; }

.photo-placeholder {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--paper-3) 0%, #ecd9b5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-1);
  color: var(--accent);
  transition: transform 0.2s, background-color 0.2s;
}

.video-placeholder:active .video-play-btn {
  transform: scale(0.9);
  background: #fff;
}

/* Bottom navigation (mobile-first) */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(251,250,246,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-top: 1px solid rgba(26,22,18,0.08);
  box-shadow: 0 -4px 20px rgba(26,22,18,0.04);
  z-index: 20;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: "Inter Tight", sans-serif;
  font-size: 10px;
  color: var(--ink-mute);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  min-width: 56px;
  transition: color 0.15s;
}
.tabbar-item svg { width: 22px; height: 22px; }
.tabbar-item.on { color: var(--ink); }
.tabbar-item.on .tabbar-dot { background: var(--accent); }
.tabbar-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  margin-top: 1px;
}
.tabbar-badge {
  position: absolute;
  top: -5px;
  right: -9px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-family: "Inter Tight", sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--paper);
}

/* Animation utils */
.fade-in { animation: fadeIn 0.4s ease both; }
.rise-in { animation: riseIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-family: "Inter Tight", sans-serif;
  font-size: 13px;
  z-index: 50;
  box-shadow: var(--shadow-2);
  pointer-events: none;
  animation: toastIn 0.35s ease both, toastOut 0.35s ease 2.4s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 12px); } }

/* Reaction pill */
.react-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  font-family: "Inter Tight", sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
  user-select: none;
}
.react-pill:hover { background: var(--paper-2); }
.react-pill.on {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.react-pill:active { transform: scale(0.94); }

/* Sticky note (guestbook) */
.sticky {
  padding: 16px 18px;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04), 0 12px 30px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  position: relative;
  font-family: "Caveat", cursive;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
}
.sticky:hover {
  box-shadow: 0 6px 14px rgba(0,0,0,0.05), 0 18px 40px rgba(0,0,0,0.09);
}
.sticky-foot {
  margin-top: 8px;
  font-family: "Inter Tight", sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}

.tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 60px;
  height: 18px;
  background: rgba(176,134,84,0.35);
  border: 1px solid rgba(176,134,84,0.45);
  border-radius: 1px;
}

/* ── Misc primitives ────────────────────────────────────── */

.scribble {
  position: relative;
  display: inline-block;
}
.scribble::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -5px;
  height: 6px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'><path d='M0,4 Q15,1 30,4 T60,4 T90,4 T120,4' stroke='%23b08654' stroke-width='2' fill='none'/></svg>") no-repeat center / 100% 100%;
}

.spinner {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--paper-3);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress bar (used in upload tiles) */
.progress {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-3);
}
.progress > .fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s;
}

/* Storage progress */
.storage {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.storage.compact { padding: 10px 12px; }
.storage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.storage-label {
  font-size: 19px;
  line-height: 1.1;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}
.storage.compact .storage-label { font-size: 16px; }
.storage-amount {
  font-family: "Inter Tight", sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.storage-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(26,22,18,0.08);
  overflow: hidden;
  position: relative;
}
.storage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #d2a76b);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.storage-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,255,255,0.22) 6px 12px);
  animation: storageStripes 1.2s linear infinite;
}
@keyframes storageStripes {
  from { background-position: 0 0; }
  to { background-position: 17px 0; }
}
.storage-foot {
  margin-top: 8px;
  font-size: 11px;
}
.storage.celebrating {
  background: linear-gradient(135deg, var(--accent-soft), #f4e7c8);
  border-color: var(--accent);
  animation: storagePop 0.6s ease;
}
@keyframes storagePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.storage.celebrating .storage-label { color: var(--accent-2); }
.storage.celebrating::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, var(--rose) 1px, transparent 2px),
    radial-gradient(circle at 80% 15%, var(--accent) 1px, transparent 2px),
    radial-gradient(circle at 30% 80%, var(--accent-2) 1px, transparent 2px),
    radial-gradient(circle at 70% 70%, var(--rose) 1px, transparent 2px);
  background-size: 80px 80px;
  opacity: 0.4;
  animation: confetti 2s ease forwards;
}
@keyframes confetti {
  from { transform: translateY(-4px); opacity: 0.5; }
  to   { transform: translateY(8px); opacity: 0; }
}

/* Dark variant for slideshow corner */
.storage.dark {
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  color: #fff;
}
.storage.dark .storage-label { color: #fff; }
.storage.dark .storage-amount { color: rgba(255,255,255,0.75); }
.storage.dark .storage-bar { background: rgba(255,255,255,0.18); }

/* ── Page-specific layout helpers ───────────────────────── */

.center-stack {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px 60px;
}

/* Mobile-first; widen at desktop */
@media (min-width: 960px) {
  body { font-size: 17px; }
  .topbar-inner { padding: 14px 24px; }
}

/* View Transitions (Cross-fade) */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Optimize accessibility for transitions */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

@keyframes kenburns {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.12); }
}

@keyframes lb-prog {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (min-width: 720px) {
  .lb-side { display: flex !important; }
}

@keyframes heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.4); }
  60% { transform: scale(0.85); }
  100% { transform: scale(1); }
}
.heart-pop svg, .heart-pop {
  animation: heart-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* Polaroid cards float, light leaks & particles */
@keyframes floating-p1 {
  0% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(-4px, -12px) rotate(-5deg); }
  100% { transform: translate(0, 0) rotate(-6deg); }
}
@keyframes floating-p2 {
  0% { transform: translate(0, 0) rotate(5deg); }
  50% { transform: translate(6px, -16px) rotate(3deg); }
  100% { transform: translate(0, 0) rotate(5deg); }
}
@keyframes float-particle {
  0% { opacity: 0; transform: translateY(0) scale(0.8); }
  50% { opacity: 0.25; }
  100% { opacity: 0; transform: translateY(-50px) scale(1.2); }
}
.polaroid-card-1 {
  animation: floating-p1 8s ease-in-out infinite;
}
.polaroid-card-2 {
  animation: floating-p2 10s ease-in-out infinite;
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  animation: float-particle 12s ease-in-out infinite;
}

/* Drifting warm light leak */
@keyframes drift-light {
  0% { opacity: 0.35; transform: translate(0, 0) scale(1); }
  50% { opacity: 0.55; transform: translate(10%, 15%) scale(1.15); }
  100% { opacity: 0.35; transform: translate(0, 0) scale(1); }
}
.light-leak {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 30% 20%, rgba(196,154,108,0.18) 0%, transparent 65%),
              radial-gradient(circle at 80% 70%, rgba(207,170,162,0.15) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  animation: drift-light 22s ease-in-out infinite;
}

/* Gallery grid item reveal transition */
.gallery-tile-reveal {
  animation: galleryReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes galleryReveal {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: scale(0.94) translateY(6px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1) translateY(0);
  }
}

/* Hero photo tile */
.photo.photo-hero {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--paper-2);
  padding: 10px 10px 32px 10px !important;
  box-shadow: var(--shadow-1), 0 8px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  overflow: visible; /* show overlapping overlays if needed */
}

.photo.photo-hero img, .photo.photo-hero .video-placeholder {
  flex: 1;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
}

.photo.photo-hero .hero-caption {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  text-align: center;
  font-family: "Caveat", cursive;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slideshow slow fade-in transition */
.slideshow-fade-in {
  animation: slideshowFadeIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideshowFadeIn {
  from {
    opacity: 0;
    transform: scale(1.025);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}



