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

:root {
  --bg: #f6f1e8;
  --bg-soft: #efe5d5;
  --surface: rgba(255, 252, 246, 0.86);
  --surface-strong: rgba(255, 251, 244, 0.95);
  --line: rgba(106, 84, 54, 0.18);
  --text: #2d261f;
  --text-muted: #635545;
  --olive: #5e6b4a;
  --olive-deep: #3f4a36;
  --gold: #b08a56;
  --shadow: 0 18px 45px rgba(32, 24, 15, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 10%, rgba(176, 138, 86, 0.14), transparent 34%),
    radial-gradient(circle at 92% 4%, rgba(94, 107, 74, 0.13), transparent 33%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

a {
  color: #6d5432;
  text-decoration: none;
}

a:hover {
  color: #4f3b20;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  color: var(--text);
  letter-spacing: 0.02em;
}

p {
  margin: 0;
  color: var(--text-muted);
}

.page-shell {
  max-width: min(96vw, 1680px);
  margin: 0 auto;
  padding: 0 1.4rem 4rem;
}

.hero-header {
  padding: 2rem 0 1.2rem;
}

.hero-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.hero-header h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7e6747;
}

.tagline {
  margin-top: 0.35rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.main-nav a,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.52rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.72);
  color: #3a2e22;
  font-weight: 600;
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(176, 138, 86, 0.56);
  background: rgba(255, 252, 246, 0.95);
}

.nav-toggle {
  display: none;
}

.hero-cover,
.gallery-tabs,
.countdown-section,
.info-section,
.layout-section,
.program-section,
.faq-section,
.contact-section,
.cta-section,
.invite-status-card,
.panel,
.rsvp-card,
.gallery-page,
.upload-page,
.admin-login,
.print-page {
  margin-top: 2rem;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.hero-cover {
  position: relative;
  min-height: 58vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 2.5rem;
  color: #fff7ea;
  transition: min-height 0.65s ease, padding 0.65s ease, border-radius 0.65s ease;
}

.hero-cover.intro {
  min-height: 64vh;
}

.hero-cover.collapsed {
  min-height: 36vh;
  padding: 1.2rem;
  border-radius: 1.2rem;
}

.hero-cover::before {
  content: '';
  position: absolute;
  inset: -16px;
  background: url('/static/images/hero-1.webp') center/cover no-repeat;
  filter: blur(3px);
  transform: scale(1.05);
}

.hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, rgba(8, 8, 8, 0.25), rgba(16, 16, 16, 0.18)),
    radial-gradient(circle at 18% 12%, rgba(176, 138, 86, 0.22), transparent 45%);
}

.hero-text {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  display: grid;
  gap: 0.55rem;
}

.hero-text h2,
.hero-cover h2 {
  color: #fff7ea;
  font-size: clamp(2.4rem, 7vw, 5rem);
  text-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.hero-cover .eyebrow,
.hero-cover .hero-sub {
  color: rgba(255, 242, 220, 0.95);
}

.hero-banner {
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 248, 237, 0.94);
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  position: sticky;
  top: 0.6rem;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.hero-banner strong {
  color: var(--text);
}

.hero-banner .eyebrow {
  color: #7a6242;
}

.hero-banner-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-heading {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.section-heading::after {
  content: '';
  width: 110px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tab-buttons,
.cta-buttons,
.actions,
.admin-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tab-btn {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.74);
  color: #3d3023;
  font-weight: 600;
  min-height: 38px;
  padding: 0.45rem 1rem;
}

.tab-btn.active {
  background: rgba(94, 107, 74, 0.14);
  border-color: rgba(94, 107, 74, 0.35);
}

.thumb-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.thumb,
.info-card,
.layout-card,
.photo-card,
.invitation-card,
.gallery-item {
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  overflow: hidden;
}

.thumb img,
.gallery-image,
.info-card img,
.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Polaroid look only for main gallery tabs */
.gallery-tabs .thumb-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.gallery-tabs .thumb {
  position: relative;
  padding: 8px 8px 22px;
  border-radius: 8px;
  border: 1px solid rgba(121, 96, 63, 0.18);
  background: #fffaf1;
  box-shadow: 0 12px 26px rgba(33, 24, 16, 0.14);
  transform: rotate(var(--polaroid-rot, -1deg));
  transition: transform .22s ease, box-shadow .22s ease;
}

.gallery-tabs .thumb:nth-child(3n+1) { --polaroid-rot: -1.8deg; }
.gallery-tabs .thumb:nth-child(3n+2) { --polaroid-rot: 1.2deg; }
.gallery-tabs .thumb:nth-child(3n+3) { --polaroid-rot: -.6deg; }

.gallery-tabs .thumb::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(115, 82, 43, 0.18), transparent 70%);
  pointer-events: none;
}

.gallery-tabs .thumb:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 16px 34px rgba(33, 24, 16, 0.22);
  z-index: 2;
}

.gallery-tabs .thumb img {
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  box-shadow: inset 0 0 0 1px rgba(106, 82, 54, 0.12);
}

.gallery-tabs .thumb .thumb-caption {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  text-align: center;
  color: #4f3d29;
  line-height: 1.25;
}

.gallery-tabs .thumb .thumb-caption small {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: rgba(79, 61, 41, 0.72);
}

.gallery-tabs .heading-actions {
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.gallery-tabs .heading-actions .ghost {
  border-color: rgba(118, 93, 61, 0.26);
  background: rgba(255, 252, 246, 0.72);
  padding-inline: 0.95rem;
}

.gallery-tabs .tab-buttons {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(118, 93, 61, 0.24);
  background: rgba(255, 252, 246, 0.82);
  border-radius: 999px;
  padding: 0.3rem;
}

.gallery-tabs .tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: #4b3b2a;
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.gallery-tabs .tab-btn.active {
  background: linear-gradient(135deg, rgba(94, 107, 74, 0.22), rgba(176, 138, 86, 0.2));
  border-color: rgba(103, 118, 84, 0.42);
  color: #2f261c;
  box-shadow: 0 6px 14px rgba(55, 43, 29, 0.1);
}

.countdown-section,
.faq-section {
  background: linear-gradient(145deg, var(--olive-deep), var(--olive));
  border-color: rgba(243, 224, 191, 0.22);
}

.countdown-section h1,
.countdown-section h2,
.countdown-section h3,
.countdown-section h4,
.countdown-section strong,
.countdown-section .eyebrow,
.faq-section h1,
.faq-section h2,
.faq-section h3,
.faq-section h4,
.faq-section strong,
.faq-section .eyebrow {
  color: #fff6e8;
}

.countdown-section p,
.countdown-section .meta,
.faq-section p,
.faq-section .meta {
  color: rgba(247, 239, 225, 0.92);
}

.countdown-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  gap: 0.55rem;
}

.countdown-values div {
  text-align: center;
  border: 1px solid rgba(255, 245, 225, 0.3);
  border-radius: 0.8rem;
  padding: 0.6rem 0.3rem;
  background: rgba(255, 255, 255, 0.08);
}

.countdown-values span {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
}

.info-grid,
.layout-grid,
.program-grid,
.contact-grid,
.gift-grid,
.admin-grid,
.stats-grid,
.photo-grid {
  display: grid;
  gap: 1rem;
}

.info-grid,
.layout-grid,
.contact-grid,
.gift-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.program-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.program-grid > div {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.8rem;
  background: rgba(255, 252, 246, 0.92);
  display: grid;
  gap: 0.25rem;
}

.contact-private {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(103, 79, 50, 0.28);
  background: rgba(255, 252, 246, 0.7);
  text-decoration: none;
  font-size: 1rem;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-list article {
  border: 1px solid rgba(255, 243, 224, 0.2);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
  padding: 0.9rem;
}

form {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.32rem;
  color: var(--text);
  font-weight: 600;
}

input[type='text'],
input[type='number'],
input[type='password'],
input[type='file'],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.62rem 0.72rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(108, 84, 50, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #2f261f;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(176, 138, 86, 0.72);
  box-shadow: 0 0 0 4px rgba(176, 138, 86, 0.14);
}

.primary {
  min-height: 42px;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(154, 116, 65, 0.5);
  background: linear-gradient(135deg, var(--button-solid), var(--button-solid));
  color: #fff9f0;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.primary:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

.flash-row {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.5rem;
}

.flash {
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  background: rgba(255, 252, 246, 0.9);
}

.flash.success {
  background: rgba(68, 130, 78, 0.14);
}

.flash.error {
  background: rgba(162, 70, 55, 0.15);
}

.site-footer {
  margin-top: 2.2rem;
  padding: 1rem 0 2rem;
  display: grid;
  gap: 0.7rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.upload-fab,
.music-fab {
  position: fixed;
  right: 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.94);
  color: var(--text);
  font-weight: 700;
  padding: 0.6rem 1rem;
  z-index: 120;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(22, 18, 13, 0.16);
}

.upload-fab {
  bottom: 4.2rem;
}

.music-fab {
  bottom: 1rem;
}

.upload-modal,
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.68);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 140;
  padding: 1rem;
}

.upload-modal.active,
.lightbox.active {
  display: flex;
}

.upload-modal-card {
  width: min(460px, 100%);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 1.4rem;
  border-radius: 1rem;
  background: #fffdf8;
  border: 1px solid var(--line);
  position: relative;
}

.modal-x,
.lightbox-close,
.lightbox-nav {
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.94);
  border-radius: 999px;
  cursor: pointer;
}

.modal-x,
.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
}

.lightbox {
  flex-direction: column;
  gap: 0.7rem;
}

.lightbox-image {
  max-width: min(92vw, 960px);
  max-height: 80vh;
  border-radius: 1rem;
}

.lightbox-nav {
  width: 40px;
  height: 40px;
}

.music-player {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.splash-video {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  filter: blur(4px) saturate(0.9);
  transform: scale(1.05);
}

.splash-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(10, 10, 10, 0.7), rgba(24, 20, 16, 0.54)),
    radial-gradient(circle at 80% 10%, rgba(176, 138, 86, 0.2), transparent 45%);
}

.splash-card {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 520px;
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(16, 20, 16, 0.58);
}

.splash-card h2 {
  color: #fff7ea;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
}

.splash-card .eyebrow,
.splash-card .hero-sub {
  color: rgba(255, 241, 217, 0.94);
}

.splash-skip {
  margin-top: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none !important;
}

.meta,
.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.rsvp-state {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  border: 1px solid var(--line);
}

.rsvp-state.ok {
  background: rgba(60, 129, 70, 0.14);
}

.rsvp-state.pending {
  background: rgba(176, 138, 86, 0.14);
}

.rsvp-summary {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.7rem;
}

.rsvp-summary span {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.84);
  padding: 0.24rem 0.62rem;
  font-size: 0.82rem;
  color: #5f513f;
}

.wizard-panel {
  margin-top: 1rem;
}

.wizard-links {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-quick-actions {
  margin-top: 1rem;
}

.admin-subtabs {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

[data-admin-tab-pane][hidden] {
  display: none !important;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(18, 18, 18, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-modal.active {
  display: flex;
}

.admin-modal-card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 1rem;
  position: relative;
  display: grid;
  gap: 0.8rem;
}

.admin-modal-card .panel {
  margin-top: 0;
}

.text-group {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 252, 246, 0.86);
  padding: 0.55rem 0.65rem;
}

.text-group + .text-group {
  margin-top: 0.55rem;
}

.text-group > summary {
  cursor: pointer;
  font-weight: 700;
  color: #4f3e2b;
  margin-bottom: 0.45rem;
}

.admin-guide-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 150;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.96);
  color: var(--text);
  font-weight: 700;
  padding: 0.6rem 1rem;
  box-shadow: 0 12px 28px rgba(22, 18, 13, 0.18);
  cursor: pointer;
}

.admin-guide {
  position: fixed;
  right: 1rem;
  bottom: 4.2rem;
  z-index: 151;
  width: min(360px, 92vw);
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 18px 36px rgba(28, 20, 12, 0.22);
  padding: 0.9rem;
  display: none;
  gap: 0.6rem;
  position: fixed;
}

.admin-guide.open {
  display: grid;
}

.admin-guide .modal-x {
  position: absolute;
}

.invite-greeting {
  margin-top: 1rem;
}

.gift-section {
  margin-top: 2rem;
}

.gift-card {
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 1rem;
  display: grid;
  gap: 0.6rem;
}

@media (max-width: 900px) {
  .page-shell {
    max-width: 100%;
    padding: 0 0.8rem 4rem;
  }

  .nav-toggle {
    display: inline-flex;
    position: absolute;
    right: 0.8rem;
    top: 1.6rem;
    border: 1px solid var(--line);
    background: rgba(255, 252, 246, 0.88);
    border-radius: 0.7rem;
    min-height: 38px;
    padding: 0 0.7rem;
    z-index: 80;
  }

  .main-nav {
    display: none;
    position: absolute;
    right: 0.8rem;
    top: 4.3rem;
    width: min(78vw, 330px);
    padding: 0.8rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 251, 244, 0.97);
    box-shadow: 0 20px 40px rgba(26, 20, 14, 0.2);
    z-index: 80;
  }

  .main-nav.open {
    display: grid;
  }

  .hero-header {
    position: relative;
  }

  .hero-cover {
    min-height: 46vh;
    padding: 1.2rem;
  }

  .hero-cover.intro {
    min-height: 50vh;
  }

  .hero-cover.collapsed {
    min-height: 32vh;
    padding: 1rem;
  }

  .hero-banner {
    align-items: flex-start;
    flex-direction: column;
    text-align: center;
  }

  .hero-banner > div {
    width: 100%;
  }

  .hero-banner-actions {
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  .hero-banner-actions .ghost {
    width: auto;
  }

  .upload-fab,
  .music-fab {
    right: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Compatibility pass: complete styles for all current templates */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.view-all {
  margin-top: 0.4rem;
}

.heading-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-grid {
  width: 100%;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 252, 246, 0.82);
  display: grid;
  gap: 0.7rem;
  text-align: center;
}

.countdown-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 1.25rem;
}

.countdown-card {
  border: 1px solid rgba(255, 245, 225, 0.28);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
}

.countdown-text {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.countdown-text p {
  max-width: 72ch;
}

.info-card,
.layout-card,
.photo-card,
.invitation-card {
  padding: 0.9rem;
}

.map-embed iframe {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: 0.8rem;
}

.floorplan {
  position: relative;
  min-height: 320px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 25%, rgba(176, 138, 86, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(255, 251, 244, 0.92), rgba(247, 239, 226, 0.92));
  margin-top: 0.8rem;
}

.floorplan-label {
  position: absolute;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f5b40;
}

.floorplan-label.entrance {
  left: 0.9rem;
  bottom: 0.8rem;
}

.floorplan-label.stage {
  left: 50%;
  top: 0.8rem;
  transform: translateX(-50%);
}

.floorplan-label.dance {
  right: 0.9rem;
  bottom: 0.8rem;
}

.table-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(106, 84, 54, 0.28);
  background: rgba(255, 252, 246, 0.92);
  color: #3b2f22;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.2rem;
}

.table-dot:last-child {
  width: 114px;
  height: 56px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.table-legend {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
}

.table-legend span {
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.88);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  color: #5e503f;
}

.croquis-image img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.82);
}

.cta-rsvp-panel {
  width: 100%;
}

.cta-rsvp-form {
  margin-top: 0.7rem;
}

.gallery-carousel {
  position: relative;
  padding: 0 1.6rem;
}

.carousel-track {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-item {
  flex: 0 0 min(220px, 62vw);
  scroll-snap-align: center;
  padding: 0.5rem;
  display: grid;
  gap: 0.45rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(106, 84, 54, 0.18);
  background: rgba(255, 252, 246, 0.95);
}

.gallery-carousel .gallery-image {
  height: 170px;
  max-height: 170px;
  object-fit: cover;
}

.carousel-track {
  cursor: grab;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.gallery-item .gallery-meta {
  font-size: 0.8rem;
  color: #6a5a48;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.gallery-hero {
  display: grid;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(176, 138, 86, 0.22), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(94, 107, 74, 0.2), transparent 40%),
    rgba(255, 251, 244, 0.94);
}

.gallery-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 60%);
}

.gallery-hero-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.memory-stage {
  margin-top: 1rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(106, 84, 54, 0.2);
  padding: 1rem;
  background:
    radial-gradient(circle at 90% 8%, rgba(176, 138, 86, 0.14), transparent 35%),
    rgba(255, 252, 246, 0.86);
}

.memory-stage-head {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.memory-stage-head h3 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.gallery-category-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.7rem 0 0.2rem;
}

.gallery-uploader-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.45rem;
}

.category-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.92);
  color: #4a3a29;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.category-chip.active {
  border-color: rgba(176, 138, 86, 0.75);
  background: rgba(176, 138, 86, 0.2);
}

.memory-wall {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.memory-card {
  grid-column: span 1;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 252, 246, 0.98);
  padding: 0.45rem;
  display: grid;
  gap: 0.35rem;
  box-shadow: 0 8px 18px rgba(27, 21, 15, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.memory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(27, 21, 15, 0.14);
}

.memory-photo {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 0.8rem;
  overflow: hidden;
}

.memory-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  filter: saturate(1.03) contrast(1.01);
}

.memory-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.memory-tag {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f5a40;
  border: 1px solid rgba(176, 138, 86, 0.34);
  border-radius: 999px;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
}

.memory-index {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a775d;
}

.memory-note {
  font-size: 0.8rem;
  color: #655443;
  line-height: 1.35;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.95);
  cursor: pointer;
  z-index: 2;
}

.carousel-btn.prev {
  left: -10px;
}

.carousel-btn.next {
  right: -10px;
}

.gallery-placeholder {
  min-height: 220px;
  border-radius: 0.8rem;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  background: rgba(255, 252, 246, 0.86);
  padding: 1rem;
}

.file-control {
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 252, 246, 0.88);
  padding: 0.7rem;
}

.file-controls {
  display: grid;
  gap: 0.6rem;
}

.upload-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.upload-choice {
  border: 1px dashed var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 252, 246, 0.92);
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 0.2rem;
  cursor: pointer;
  font-weight: 700;
  color: #4f3f2d;
  text-align: center;
}

.upload-choice .icon {
  font-size: 1.35rem;
}

.upload-choice input[type='file'] {
  display: none;
}

.upload-choice:hover {
  border-color: rgba(176, 138, 86, 0.6);
  background: rgba(255, 251, 242, 0.98);
}

.upload-preview {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 252, 246, 0.94);
  padding: 0.6rem;
  display: grid;
  gap: 0.45rem;
  text-align: center;
}

.upload-preview[hidden] {
  display: none !important;
}

.upload-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 0.7rem;
}

@media (min-width: 901px) {
  .upload-choice.is-camera {
    display: none;
  }

  .upload-choice-grid {
    grid-template-columns: 1fr;
  }
}

.admin-page .admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stats-grid article {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 252, 246, 0.88);
  padding: 0.8rem;
}

.admin-invitations {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
}

.invitation-card.compact {
  display: grid;
  gap: 0.65rem;
  border-radius: 1rem;
  border: 1px solid rgba(106, 84, 54, 0.2);
  background: rgba(255, 252, 246, 0.95);
  box-shadow: 0 10px 24px rgba(31, 23, 15, 0.08);
}

.invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.invite-head h3 {
  font-size: 1.5rem;
}

.invite-status {
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.24rem 0.55rem;
}

.invite-status.ok {
  background: rgba(60, 129, 70, 0.14);
  color: #255d2d;
  border-color: rgba(60, 129, 70, 0.32);
}

.invite-status.pending {
  background: rgba(176, 138, 86, 0.15);
  color: #6c512c;
  border-color: rgba(176, 138, 86, 0.35);
}

.invite-status.error {
  background: rgba(177, 56, 42, 0.14);
  color: #7d261d;
  border-color: rgba(177, 56, 42, 0.3);
}

.invite-meta-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.invite-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  color: #5d4e3c;
}

.admin-search {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.invitation-card.compact .actions {
  margin-top: 0.6rem;
}

.inline {
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(106, 84, 54, 0.12);
  background: rgba(255, 255, 255, 0.7);
}

.card-footer {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.pagination-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-photos {
  margin-top: 1.2rem;
}

.admin-photos .photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.admin-photos .photo-card {
  padding: 0.55rem;
  gap: 0.45rem;
}

.admin-photos .photo-card img {
  aspect-ratio: 1 / 1;
  max-height: 120px;
  object-fit: cover;
  border-radius: 0.65rem;
}

.admin-photos .actions {
  justify-content: center;
}

/* Admin refresh: inspired by GitHub dashboard patterns (Tabler/AdminLTE style cards + toolbars) */
.admin-page {
  max-width: 1240px;
  margin: 0 auto;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1f2933;
}

.admin-hero {
  border: 1px solid #d9dee7;
  border-radius: 1.1rem;
  padding: 1rem;
  background: linear-gradient(140deg, #ffffff, #f6f8fb);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.admin-hero-actions {
  gap: 0.45rem;
  flex-wrap: wrap;
}

.admin-hub {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
}

.admin-hub-card {
  display: grid;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--text);
  padding: 0.75rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(106, 84, 54, 0.16);
  background: rgba(255, 255, 255, 0.72);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.admin-hub-card strong {
  font-size: 0.95rem;
}

.admin-hub-card span {
  font-size: 0.82rem;
  color: #5d4e3c;
}

.admin-hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(106, 84, 54, 0.28);
  box-shadow: 0 10px 20px rgba(31, 23, 15, 0.08);
}

.admin-hub-card.is-rsvp {
  border-left: 4px solid rgba(69, 112, 85, 0.55);
}

.admin-hub-card.is-boda {
  border-left: 4px solid rgba(161, 120, 67, 0.62);
}

.admin-hub-card.is-sitio {
  border-left: 4px solid rgba(91, 92, 132, 0.52);
}

.admin-shell {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
}

.admin-sidebar-v2 {
  position: sticky;
  top: 0.8rem;
  align-self: start;
  border: 1px solid #d9dee7;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border-radius: 1rem;
  padding: 0.95rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.admin-side-title {
  margin: 0.2rem 0 0.55rem;
  font-size: 1.05rem;
}

.admin-side-pane {
  display: grid;
  gap: 0.45rem;
}

.admin-side-pane[hidden] {
  display: none !important;
}

.admin-side-links {
  padding: 0.25rem 0;
  display: grid;
  gap: 0.45rem;
}

.admin-side-links .ghost {
  text-align: left;
  background: #f8fafc;
  border-color: #d8e0eb;
  color: #324154;
}

.admin-main-v2 {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 5rem;
}

.admin-context-card {
  border: 1px solid #d9dee7;
  background: #ffffff;
  border-radius: 0.95rem;
  padding: 0.8rem 0.9rem;
}

.admin-context-card h3 {
  margin: 0.15rem 0;
  font-size: 1.15rem;
}

.admin-kpi-grid article {
  position: relative;
  overflow: hidden;
}

.admin-kpi-grid article::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(170, 141, 95, 0.24), transparent 70%);
  pointer-events: none;
}

.admin-subtabs {
  margin-top: 1rem;
  padding: 0.4rem;
  border: 1px solid rgba(106, 84, 54, 0.15);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
  width: fit-content;
}

.admin-subtabs .tab-btn {
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
}

.admin-subtabs .tab-btn.active {
  box-shadow: 0 8px 18px rgba(31, 23, 15, 0.12);
}

.admin-tab-pane {
  border: 1px solid #d9dee7;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

.admin-tab-pane.active {
  display: grid;
}

.admin-quick-actions .wizard-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.admin-actions.admin-tab-pane {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.admin-search.panel {
  border: 1px solid rgba(106, 84, 54, 0.16);
  background: rgba(255, 252, 246, 0.95);
}

.admin-search .ghost {
  height: 40px;
}

.admin-search label {
  min-width: 250px;
}

.invitation-card.compact {
  border: 1px solid rgba(106, 84, 54, 0.2);
  border-left: 4px solid rgba(124, 100, 67, 0.4);
}

.invitation-card.compact .invite-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.invitation-card.compact .ghost,
.invitation-card.compact .primary {
  min-height: 38px;
}

.invitation-card.compact .actions {
  display: grid;
  gap: 0.55rem;
}

.invitation-card.compact .inline {
  grid-template-columns: 1fr auto;
  align-items: end;
}

@media (max-width: 760px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar-v2 {
    position: static;
  }

  .invitation-card.compact .inline {
    grid-template-columns: 1fr;
  }

  .admin-tab-pane {
    padding: 0.72rem;
  }

  .gallery-tabs .thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .gallery-tabs .tab-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 12px;
  }

  .gallery-tabs .tab-btn {
    width: 100%;
    border-radius: 10px;
    text-align: center;
  }

  .gallery-tabs .thumb {
    transform: none;
    padding: 6px 6px 16px;
  }

  .gallery-tabs .thumb:hover {
    transform: none;
  }
}

@media (min-width: 980px) {
  .admin-sidebar-v2 {
    top: 1rem;
  }
}

.admin-photos .actions .inline {
  background: transparent;
  border: 0;
  padding: 0;
}

.icon-btn {
  min-width: 38px;
  min-height: 38px;
  padding: 0.2rem 0.35rem;
  font-size: 1rem;
  line-height: 1;
}

.icon-btn.danger {
  border-color: rgba(160, 52, 40, 0.32);
  color: #8f2f26;
}

.upload-form,
.login-form,
.rsvp-card,
.panel {
  max-width: 640px;
}

.rsvp-page {
  display: grid;
  gap: 1rem;
}

.panel-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7b6443;
  font-weight: 700;
}

.subtle {
  font-size: 0.88rem;
  color: #6a5a48;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.print-grid article {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.7rem;
  background: rgba(255, 252, 246, 0.86);
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 252, 246, 0.86);
}

.print-table th,
.print-table td {
  border: 1px solid var(--line);
  padding: 0.55rem;
  text-align: left;
}

@media (max-width: 900px) {
  .countdown-section {
    grid-template-columns: 1fr;
  }

  .carousel-btn.prev {
    left: 4px;
  }

  .carousel-btn.next {
    right: 4px;
  }

  .gallery-item {
    flex-basis: min(220px, 72vw);
  }

  .gallery-carousel .gallery-image {
    height: 150px;
    max-height: 150px;
  }

  .memory-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .admin-search {
    align-items: stretch;
  }

  .admin-search > * {
    width: 100%;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1180px) {
  .countdown-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .gallery-page,
  .upload-page {
    padding: 1.1rem;
  }

  .memory-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memory-note {
    display: none;
  }
}
.admin-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.8rem;
  z-index: 50;
  width: min(96vw, 760px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid #d9dee7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.admin-bottom-nav .tab-btn {
  border: 1px solid #d4dbe6;
  border-radius: 10px;
  background: #f8fafc;
  color: #2f3d4d;
  padding: 0.62rem 0.5rem;
  font-weight: 700;
}

.admin-bottom-nav .tab-btn.active {
  background: #1f3a5f;
  border-color: #1f3a5f;
  color: #fff;
}

.admin-tools-fab {
  position: fixed;
  right: 1rem;
  bottom: 5.6rem;
  z-index: 52;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid #d4dbe6;
  background: #1f3a5f;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.28);
}

.admin-tools-pop {
  position: fixed;
  right: 1rem;
  bottom: 9rem;
  z-index: 52;
  width: min(280px, 86vw);
  display: none;
  gap: 0.42rem;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid #d9dee7;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
}

.admin-tools-pop.open {
  display: grid;
}

.admin-tools-pop .ghost {
  text-align: left;
}
