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

:root {
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
  --font-calligraphy: 'Great Vibes', cursive;
  --color-bg: #faf8f5;
  --color-text: #5c4f3d;
  --color-text-light: #a89b8a;
  --color-accent: #c4a97d;
  --color-border: #e8e0d4;
  --color-bg-warm: #f5f0ea;
  --shadow-soft: 0 2px 20px rgba(92, 79, 61, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === Custom Cursor (desktop only, main page) === */
@media (pointer: fine) {
  body.has-custom-cursor {
    cursor: none;
  }

  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor select,
  body.has-custom-cursor [contenteditable] {
    cursor: auto !important;
  }

  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor .tab,
  body.has-custom-cursor .photo-item {
    cursor: none !important;
  }
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  will-change: transform;
  transition: width 0.3s ease, height 0.3s ease, margin-left 0.3s ease, margin-top 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  opacity: 0;
}

.custom-cursor--visible {
  opacity: 1;
}

.custom-cursor--hover {
  width: 50px;
  height: 50px;
  margin-left: -13px;
  margin-top: -13px;
  background: rgba(196, 169, 125, 0.12);
  border-color: var(--color-accent);
}

.custom-cursor--active {
  width: 32px;
  height: 32px;
  margin-left: -4px;
  margin-top: -4px;
  border-color: var(--color-accent);
  background: rgba(196, 169, 125, 0.08);
}

@media (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
}

/* === Hero === */
.hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
  max-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
  transition: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.hero .header__logo {
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 2;
}

.hero .header__logo img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  width: 100%;
}

.hero__title {
  font-family: var(--font-calligraphy);
  font-weight: 400;
  font-size: 5rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 40px rgba(0, 0, 0, 0.3);
}

.hero__date {
  font-family: var(--font-calligraphy);
  font-weight: 400;
  font-size: 2rem;
  color: #fff;
  margin-top: 10px;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* === Tabs === */
.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(10px);
  background: rgba(250, 248, 245, 0.92);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  font-family: var(--font-calligraphy);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--color-text-light);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.3s, background 0.3s;
}

.tab:hover {
  color: var(--color-text);
  background: rgba(92, 79, 61, 0.08);
}

.tab--active {
  color: var(--color-text);
  background: rgba(92, 79, 61, 0.1);
}

.tab--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background: var(--color-accent);
}

.tab__count {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-left: 4px;
}

/* === Gallery === */
.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 40px;
  min-height: 300px;
}

.photo-grid {
  column-count: 4;
  column-gap: 12px;
  opacity: 1;
  transition: opacity 0.3s;
}

.photo-grid--loading {
  opacity: 0;
}

/* When in "All Photo" mode with section groups */
.photo-grid.photo-grid--sections {
  column-count: initial !important;
  column-gap: 0 !important;
}

/* === Section Groups (All Photo view) === */
.section-group {
  margin-bottom: 20px;
  scroll-margin-top: 80px;
}

.section-header {
  font-family: var(--font-calligraphy);
  font-size: 2.2rem;
  color: var(--color-text);
  text-align: center;
  margin: 0 0 24px;
}

.section-photos {
  column-count: 4;
  column-gap: 12px;
}

/* === Decorative Dividers === */
.decorative-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 30px 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.decorative-divider--visible {
  opacity: 1;
  transform: translateY(0);
}

.decorative-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-accent), transparent);
  max-width: 200px;
}

.decorative-divider__ornament {
  color: var(--color-accent);
  font-size: 1.5rem;
  line-height: 1;
  animation: ornamentPulse 3s ease-in-out infinite;
}

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

/* === Photo Items === */
.photo-item {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out, box-shadow 0.4s ease;
  box-shadow: 0 2px 8px rgba(92, 79, 61, 0.08);
}

.photo-item--visible {
  opacity: 1;
  transform: translateY(0);
}

.photo-item:hover {
  box-shadow: 0 8px 30px rgba(92, 79, 61, 0.15);
}

.photo-item img {
  width: 100%;
  display: block;
  border-radius: 6px;
  transition: transform 0.4s, filter 0.4s;
}

.photo-item:hover img {
  transform: scale(1.02);
  filter: brightness(0.95);
}

/* === Lazy Loading Placeholder === */
.photo-item--placeholder img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.photo-item--loaded img {
  opacity: 1;
}

.gallery__empty {
  text-align: center;
  padding: 80px 20px;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-text-light);
}

.gallery__loading {
  display: flex;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* === Download Bar === */
.download-bar {
  text-align: center;
  padding: 40px 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

.download-bar--visible {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 1.5px solid var(--color-accent);
  background: none;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn:hover {
  background: var(--color-accent);
  color: #fff;
}

/* === Lightbox === */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox--open {
  display: flex;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 32, 20, 0.94);
}

.lightbox__content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s;
}

.lightbox__img--loaded {
  opacity: 1;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  line-height: 1;
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  color: #fff;
  font-size: 3.5rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
  padding: 20px;
  line-height: 1;
}

.lightbox__nav:hover {
  opacity: 1;
}

.lightbox__nav--prev {
  left: 10px;
}

.lightbox__nav--next {
  right: 10px;
}

.lightbox__toolbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
}

.lightbox__counter {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.lightbox__download {
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.lightbox__download:hover {
  opacity: 1;
}

/* === Guest Book === */
.guestbook {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

.guestbook__title {
  font-family: var(--font-calligraphy);
  font-size: 3rem;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 8px;
}

.guestbook__subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 40px;
}

.guestbook__form {
  max-width: 600px;
  margin: 0 auto 50px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guestbook__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.guestbook__input,
.guestbook__textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.guestbook__input:focus,
.guestbook__textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(196, 169, 125, 0.15);
}

.guestbook__textarea {
  min-height: 120px;
  resize: vertical;
}

.guestbook__captcha {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
}

.guestbook__captcha-label {
  font-weight: 500;
  min-width: 50px;
}

.guestbook__captcha-eq {
  font-size: 1.1rem;
}

.guestbook__captcha-input {
  width: 70px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.3s;
  -moz-appearance: textfield;
}

.guestbook__captcha-input::-webkit-inner-spin-button,
.guestbook__captcha-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.guestbook__captcha-input:focus {
  border-color: var(--color-accent);
}

.guestbook__captcha-refresh {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guestbook__captcha-refresh:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.guestbook__submit {
  align-self: center;
  margin-top: 8px;
}

.guestbook__status {
  text-align: center;
  font-size: 0.9rem;
  min-height: 1.5em;
}

.guestbook__status--success {
  color: #6a9e6a;
}

.guestbook__status--error {
  color: #c4534a;
}

.guestbook__wishes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.guestbook__empty {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text-light);
  padding: 40px 20px;
  grid-column: 1 / -1;
}

.wish-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.wish-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(92, 79, 61, 0.1);
}

.wish-card__name {
  font-family: var(--font-calligraphy);
  font-size: 1.4rem;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.wish-card__message {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre-line;
}

.wish-card__date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 12px;
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* === Loading Screen === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  cursor: pointer;
  flex-direction: column;
}

.loading-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-screen__logo {
  position: relative;
  z-index: 2;
}

.loading-screen__logo img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 30px rgba(196, 169, 125, 0.3);
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 30px rgba(196, 169, 125, 0.3); }
  50% { transform: scale(1.04); box-shadow: 0 4px 40px rgba(196, 169, 125, 0.45); }
}

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

.loading-screen__hint {
  position: relative;
  z-index: 2;
  margin-top: 40px;
  font-family: var(--font-calligraphy);
  font-size: 2rem;
  color: var(--color-accent);
  opacity: 0;
  text-align: center;
  padding: 0 20px;
  width: 100%;
  animation: hintFadeIn 1s ease 1.5s forwards;
}

@keyframes hintFadeIn {
  to { opacity: 1; }
}

/* === Petals === */
.petal {
  position: absolute;
  top: -5%;
  width: 14px;
  height: 18px;
  background: var(--color-accent);
  border-radius: 50% 0 50% 50%;
  opacity: 0;
  will-change: transform, opacity;
  animation: petalFloat 8s ease-in-out infinite;
}

.petal::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.5), transparent);
  border-radius: inherit;
}

.petal--1 { left: 41%; animation-delay: 0.4s; animation-duration: 7.0s; width: 11px; height: 14px; }
.petal--2 { left: 75%; animation-delay: 0.5s; animation-duration: 7.6s; width: 18px; height: 20px; }
.petal--3 { left: 11%; animation-delay: 1.25s; animation-duration: 7.0s; width: 17px; height: 21px; }
.petal--4 { left: 23%; animation-delay: 1.8s; animation-duration: 7.6s; width: 14px; height: 22px; }
.petal--5 { left: 22%; animation-delay: 0.92s; animation-duration: 7.0s; width: 17px; height: 17px; }
.petal--6 { left: 10%; animation-delay: 1.43s; animation-duration: 8.6s; width: 9px; height: 19px; }
.petal--7 { left: 32%; animation-delay: 0.09s; animation-duration: 8.2s; width: 14px; height: 15px; }
.petal--8 { left: 37%; animation-delay: 1.87s; animation-duration: 6.6s; width: 16px; height: 15px; }
.petal--9 { left: 60%; animation-delay: 1.95s; animation-duration: 7.6s; width: 11px; height: 14px; }
.petal--10 { left: 74%; animation-delay: 0.88s; animation-duration: 9.4s; width: 10px; height: 20px; }
.petal--11 { left: 65%; animation-delay: 0.07s; animation-duration: 6.4s; width: 15px; height: 22px; }
.petal--12 { left: 81%; animation-delay: 0.16s; animation-duration: 7.8s; width: 9px; height: 14px; }
.petal--13 { left: 32%; animation-delay: 0.01s; animation-duration: 7.4s; width: 16px; height: 18px; }
.petal--14 { left: 21%; animation-delay: 1.57s; animation-duration: 6.6s; width: 11px; height: 19px; }
.petal--15 { left: 27%; animation-delay: 0.81s; animation-duration: 8.8s; width: 13px; height: 19px; }
.petal--16 { left: 91%; animation-delay: 0.26s; animation-duration: 9.2s; width: 17px; height: 14px; }
.petal--17 { left: 60%; animation-delay: 0.82s; animation-duration: 6.8s; width: 10px; height: 16px; }
.petal--18 { left: 19%; animation-delay: 0.36s; animation-duration: 6.8s; width: 11px; height: 20px; }
.petal--19 { left: 33%; animation-delay: 1.0s; animation-duration: 7.2s; width: 12px; height: 13px; }
.petal--20 { left: 84%; animation-delay: 0.72s; animation-duration: 8.6s; width: 16px; height: 16px; }
.petal--21 { left: 3%; animation-delay: 1.67s; animation-duration: 7.4s; width: 14px; height: 18px; }
.petal--22 { left: 34%; animation-delay: 1.62s; animation-duration: 7.6s; width: 13px; height: 20px; }
.petal--23 { left: 11%; animation-delay: 1.76s; animation-duration: 9.4s; width: 14px; height: 19px; }
.petal--24 { left: 24%; animation-delay: 1.71s; animation-duration: 7.2s; width: 12px; height: 13px; }
.petal--25 { left: 86%; animation-delay: 1.44s; animation-duration: 7.0s; width: 18px; height: 15px; }
.petal--26 { left: 39%; animation-delay: 0.88s; animation-duration: 9.4s; width: 15px; height: 18px; }
.petal--27 { left: 95%; animation-delay: 0.51s; animation-duration: 8.0s; width: 18px; height: 17px; }
.petal--28 { left: 78%; animation-delay: 1.07s; animation-duration: 9.4s; width: 12px; height: 18px; }
.petal--29 { left: 87%; animation-delay: 0.82s; animation-duration: 8.6s; width: 17px; height: 14px; }
.petal--30 { left: 29%; animation-delay: 1.36s; animation-duration: 8.4s; width: 17px; height: 22px; }
.petal--31 { left: 71%; animation-delay: 0.39s; animation-duration: 7.4s; width: 11px; height: 17px; }
.petal--32 { left: 2%; animation-delay: 0.71s; animation-duration: 7.4s; width: 11px; height: 22px; }
.petal--33 { left: 66%; animation-delay: 1.58s; animation-duration: 7.2s; width: 14px; height: 15px; }
.petal--34 { left: 41%; animation-delay: 1.72s; animation-duration: 8.6s; width: 8px; height: 13px; }
.petal--35 { left: 50%; animation-delay: 0.4s; animation-duration: 8.0s; width: 18px; height: 14px; }
.petal--36 { left: 51%; animation-delay: 1.61s; animation-duration: 9.4s; width: 12px; height: 18px; }
.petal--37 { left: 47%; animation-delay: 1.06s; animation-duration: 8.4s; width: 18px; height: 21px; }
.petal--38 { left: 76%; animation-delay: 0.4s; animation-duration: 6.4s; width: 9px; height: 16px; }
.petal--39 { left: 9%; animation-delay: 0.06s; animation-duration: 6.6s; width: 12px; height: 17px; }
.petal--40 { left: 95%; animation-delay: 1.25s; animation-duration: 8.6s; width: 17px; height: 16px; }
.petal--41 { left: 21%; animation-delay: 0.2s; animation-duration: 9.2s; width: 14px; height: 18px; }
.petal--42 { left: 78%; animation-delay: 0.53s; animation-duration: 7.4s; width: 10px; height: 19px; }
.petal--43 { left: 85%; animation-delay: 1.39s; animation-duration: 7.6s; width: 16px; height: 14px; }
.petal--44 { left: 37%; animation-delay: 0.42s; animation-duration: 7.8s; width: 14px; height: 14px; }
.petal--45 { left: 81%; animation-delay: 1.87s; animation-duration: 8.0s; width: 18px; height: 19px; }
.petal--46 { left: 66%; animation-delay: 1.96s; animation-duration: 8.2s; width: 15px; height: 20px; }
.petal--47 { left: 3%; animation-delay: 0.66s; animation-duration: 8.0s; width: 13px; height: 22px; }
.petal--48 { left: 72%; animation-delay: 1.14s; animation-duration: 8.2s; width: 18px; height: 12px; }
.petal--49 { left: 58%; animation-delay: 0.83s; animation-duration: 7.0s; width: 17px; height: 12px; }
.petal--50 { left: 40%; animation-delay: 0.1s; animation-duration: 8.0s; width: 16px; height: 16px; }

@keyframes petalFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  8% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.4;
    transform: translate3d(20px, 50vh, 0) rotate(180deg) scale(0.6);
  }
  100% {
    transform: translate3d(-10px, 110vh, 0) rotate(360deg) scale(0.3);
    opacity: 0;
  }
}

/* === Music Button === */
.music-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 500;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(8px);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
}

.music-btn--visible {
  opacity: 1;
  visibility: visible;
}

.music-btn:hover {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(196, 169, 125, 0.3);
}

.music-btn__icon--pause {
  display: none;
}

.music-btn--playing .music-btn__icon--play {
  display: none;
}

.music-btn--playing .music-btn__icon--pause {
  display: block;
}

/* === Scroll to Top Button === */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(8px);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s, opacity 0.4s, visibility 0.4s;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
}

.scroll-top-btn--visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background: var(--color-accent);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(196, 169, 125, 0.3);
}

/* === Tab Download Button === */
.tab--download {
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}

.tab--download:hover {
  background: var(--color-accent);
  color: #fff;
}

.tab--download::after {
  display: none;
}

/* === Responsive === */
@media (max-width: 1200px) {
  .photo-grid {
    column-count: 3;
  }
  .photo-grid.photo-grid--sections {
    column-count: initial !important;
    column-gap: 0 !important;
  }
  .section-photos {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 50vh;
    min-height: 300px;
  }

  .hero__title {
    font-size: 2.8rem;
  }

  .hero__date {
    font-size: 1.5rem;
  }

  .hero .header__logo {
    top: 16px;
    left: 16px;
  }

  .hero .header__logo img {
    width: 80px;
    height: 80px;
  }

  .photo-grid {
    column-count: 2;
    column-gap: 8px;
  }

  .section-photos {
    column-count: 2;
    column-gap: 8px;
  }

  .photo-item {
    margin-bottom: 8px;
  }

  .tabs {
    justify-content: flex-start;
    padding: 12px 16px;
  }

  .tab {
    font-size: 0.9rem;
    padding: 10px 16px;
  }

  .lightbox__nav {
    font-size: 2.5rem;
    padding: 10px;
  }

  .lightbox__nav--prev {
    left: 4px;
  }

  .lightbox__nav--next {
    right: 4px;
  }

  .section-header {
    font-size: 1.6rem;
    margin: 0 0 16px;
  }

  .decorative-divider {
    padding: 16px 16px;
    gap: 12px;
  }

  .decorative-divider__line {
    max-width: 100px;
  }

  .decorative-divider__ornament {
    font-size: 1.2rem;
  }

  .gallery {
    padding: 0 12px 30px;
  }

  /* Guest Book mobile */
  .guestbook {
    padding: 10px 16px 40px;
  }

  .guestbook__title {
    font-size: 2rem;
  }

  .guestbook__subtitle {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .guestbook__form {
    gap: 12px;
    margin-bottom: 30px;
  }

  .guestbook__input,
  .guestbook__textarea {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .guestbook__textarea {
    min-height: 100px;
  }

  .guestbook__captcha {
    flex-wrap: wrap;
    gap: 8px;
  }

  .guestbook__submit {
    padding: 12px 24px;
    font-size: 0.8rem;
    width: 100%;
    justify-content: center;
  }

  .guestbook__wishes {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wish-card {
    padding: 18px;
  }

  .wish-card__name {
    font-size: 1.2rem;
  }

  .wish-card__message {
    font-size: 0.85rem;
  }

  /* Sections mode must NOT have columns on mobile */
  .photo-grid.photo-grid--sections {
    column-count: initial !important;
    column-gap: 0 !important;
  }

  /* Download bar */
  .download-bar {
    padding: 24px 16px;
    opacity: 1;
    transform: none;
  }

  .btn--download {
    padding: 12px 20px;
    font-size: 0.75rem;
    width: 100%;
    justify-content: center;
  }

  /* Loading screen mobile */
  .loading-screen__logo img {
    width: 160px;
    height: 160px;
  }

  .loading-screen__hint {
    font-size: 1.4rem;
    margin-top: 30px;
  }

  /* Fixed buttons mobile */
  .music-btn {
    width: 48px;
    height: 48px;
    bottom: 16px;
    left: 16px;
  }

  .music-btn svg {
    width: 20px;
    height: 20px;
  }

  .scroll-top-btn {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
  }

  .scroll-top-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2.2rem;
  }

  .hero__date {
    font-size: 1.2rem;
  }

  .hero .header__logo {
    top: 12px;
    left: 12px;
  }

  .hero .header__logo img {
    width: 56px;
    height: 56px;
  }

  .photo-grid {
    column-count: 2;
    column-gap: 6px;
  }

  .section-photos {
    column-count: 2;
    column-gap: 6px;
  }

  .photo-grid.photo-grid--sections {
    column-count: initial !important;
    column-gap: 0 !important;
  }

  .photo-item {
    margin-bottom: 6px;
    border-radius: 4px;
  }

  .section-header {
    font-size: 1.4rem;
    margin: 0 0 12px;
  }

  .guestbook__title {
    font-size: 1.7rem;
  }

  .guestbook__subtitle {
    font-size: 0.85rem;
  }

  .tab {
    font-size: 0.8rem;
    padding: 8px 12px;
  }

  .loading-screen__logo img {
    width: 130px;
    height: 130px;
  }

  .loading-screen__hint {
    font-size: 1.2rem;
    margin-top: 24px;
  }
}
