:root {
  --davetim-main: #f6efe9;
  --davetim-text: #332b29;
  --davetim-bg: #fffaf6;
  --davetim-accent: #c8a45d;
}

.davetim-shell,
.davetim-invitation {
  color: var(--davetim-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.davetim-shell {
  max-width: 1120px;
  margin: 24px auto;
  padding: 20px;
  background: var(--davetim-bg);
}

.davetim-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  padding-bottom: 10px;
}

.davetim-tabs button,
.davetim-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  background: var(--davetim-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
  white-space: nowrap;
}

.davetim-tabs button {
  background: #fff;
  color: var(--davetim-text);
  border-color: rgba(0, 0, 0, .08);
}

.davetim-tabs button.is-active,
.davetim-btn:hover {
  transform: translateY(-1px);
  opacity: .92;
}

.davetim-btn.secondary {
  background: #fff;
  color: var(--davetim-text);
  border-color: rgba(0, 0, 0, .12);
}

.davetim-btn.danger {
  background: #b94141;
}

.davetim-tab-panel {
  display: none;
  padding-top: 18px;
}

.davetim-tab-panel.is-active {
  display: block;
}

.davetim-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.davetim-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .05);
}

.davetim-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.davetim-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.davetim-form input,
.davetim-form textarea,
.davetim-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #1f1f1f;
}

.davetim-form textarea {
  min-height: 100px;
}

.davetim-form .davetim-check,
.davetim-form button,
.davetim-form-message {
  grid-column: 1 / -1;
}

.davetim-check {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
}

.davetim-check input {
  width: auto;
  min-height: auto;
}

.davetim-alert,
.davetim-form-message {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff5df;
  color: #65440a;
}

.davetim-public {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, .92), rgba(248, 241, 235, .96)),
    var(--davetim-bg);
  color: var(--davetim-text);
}

.davetim-public .davetim-btn {
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(64, 42, 35, .16);
}

.davetim-invitation {
  position: relative;
  overflow: hidden;
}

.davetim-public-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 50;
  width: min(1120px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 55px rgba(38, 29, 25, .14);
  backdrop-filter: blur(18px);
}

.davetim-public-nav a {
  color: #342823;
  text-decoration: none;
}

.davetim-public-brand {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.davetim-public-brand span {
  color: #b96d76;
  font-size: .82em;
}

.davetim-public-nav div {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
}

.davetim-public-nav div a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.davetim-public-nav div a:hover {
  background: rgba(189, 118, 105, .13);
}

.davetim-hero {
  min-height: 92vh;
  display: grid;
  align-items: end;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .46)), var(--davetim-main);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 120px 20px 86px;
}

.davetim-hero-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  text-align: left;
}

.davetim-hero h1 {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin: 12px 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 10vw, 118px);
  line-height: .92;
  letter-spacing: 0;
  text-shadow: 0 18px 50px rgba(0, 0, 0, .34);
}

.davetim-name {
  display: block;
}

.davetim-heart {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(248, 223, 172, .58);
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  color: #f8dfac;
  font-size: 26px;
  line-height: 1;
  text-shadow: none;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
}

.davetim-kicker,
.davetim-section-label {
  margin: 0;
  color: var(--davetim-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.davetim-kicker {
  color: #f8dfac;
}

.davetim-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.davetim-hero-meta time,
.davetim-hero-meta span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.davetim-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 20px;
}

.davetim-invite-section,
.davetim-location-section,
.davetim-rsvp-section,
.davetim-memory-section {
  position: relative;
}

.davetim-section h2 {
  max-width: 740px;
  margin: 8px auto 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
  text-align: center;
  color: #342823;
}

.davetim-section-label {
  text-align: center;
}

.davetim-lead {
  max-width: 780px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.7;
  text-align: center;
  color: #4c403a;
}

.davetim-countdown-section {
  padding-top: 34px;
  padding-bottom: 20px;
}

.davetim-families {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 34px auto 0;
  max-width: 820px;
}

.davetim-families article {
  padding: 24px;
  border: 1px solid rgba(132, 92, 77, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 45px rgba(83, 56, 46, .08);
  text-align: center;
}

.davetim-families h3 {
  margin: 0 0 10px;
  color: #9b6359;
  font-size: 18px;
}

.davetim-families p {
  margin: 0;
  line-height: 1.7;
}

.davetim-countdown,
.davetim-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 124px));
  justify-content: center;
  align-items: stretch;
  gap: 12px;
}

.davetim-count-item,
.davetim-stats span {
  display: grid;
  gap: 4px;
  justify-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(132, 92, 77, .13);
  padding: 14px 16px;
  color: #342823;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(83, 56, 46, .08);
}

.davetim-count-item strong {
  font-size: 30px;
  line-height: 1;
}

.davetim-count-item small {
  color: #7d6c64;
  font-size: 12px;
  font-weight: 700;
}

.davetim-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 31%);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 0 14px;
}

.davetim-gallery figure {
  margin: 0;
  scroll-snap-align: start;
}

.davetim-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(48, 35, 31, .16);
}

.davetim-guest-gallery img {
  cursor: zoom-in;
}

.davetim-lightbox-open {
  overflow: hidden;
}

.davetim-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 10, 10, .92);
}

.davetim-lightbox img {
  max-width: min(100%, 1180px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.davetim-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.davetim-location,
.davetim-gift {
  display: grid;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(132, 92, 77, .14);
  border-radius: 8px;
  box-shadow: 0 24px 58px rgba(83, 56, 46, .10);
}

.davetim-location {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.davetim-location h3,
.davetim-gift h3 {
  margin: 0 0 8px;
  color: #342823;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.davetim-location p,
.davetim-gift p {
  margin: 0 0 12px;
  color: #5b4c45;
  line-height: 1.65;
}

.davetim-gift {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.davetim-gift code {
  display: block;
  overflow-wrap: anywhere;
  margin: 10px 0;
  padding: 10px;
  background: #f8f1ea;
  border-radius: 8px;
  color: #342823;
}

.davetim-gift img {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(132, 92, 77, .12);
}

.davetim-share,
.davetim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.davetim-share {
  padding: 8px 20px 72px;
}

.davetim-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  overflow-x: auto;
}

.davetim-table th,
.davetim-table td {
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  padding: 10px;
  text-align: left;
}

.davetim-photo-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.davetim-photo-item img {
  width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.davetim-theme-soft-romance {
  --davetim-main: #f9e2e8;
  --davetim-accent: #c98392;
}

.davetim-theme-gold-elegance {
  --davetim-main: #fff7e6;
  --davetim-accent: #b88a30;
}

.davetim-theme-dark-luxury {
  --davetim-bg: #151313;
  --davetim-text: #f7efe7;
  --davetim-main: #222;
  --davetim-accent: #d6b66d;
}

@media (max-width: 720px) {
  .davetim-shell {
    margin: 0;
    padding: 14px;
  }

  .davetim-public-nav {
    top: 10px;
    width: calc(100% - 20px);
    padding: 8px 10px;
  }

  .davetim-public-brand {
    font-size: 15px;
  }

  .davetim-public-nav div {
    gap: 0;
  }

  .davetim-public-nav div a {
    padding: 7px 8px;
    font-size: 12px;
  }

  .davetim-hero {
    min-height: 88vh;
    padding: 96px 18px 58px;
  }

  .davetim-hero h1 {
    font-size: clamp(48px, 17vw, 76px);
    gap: 7px;
  }

  .davetim-heart {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .davetim-hero-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .davetim-hero-meta time,
  .davetim-hero-meta span {
    justify-content: center;
    width: 100%;
  }

  .davetim-section {
    padding: 52px 18px;
  }

  .davetim-section h2 {
    font-size: clamp(30px, 12vw, 44px);
  }

  .davetim-lead {
    font-size: 18px;
  }

  .davetim-form,
  .davetim-gift,
  .davetim-location,
  .davetim-families,
  .davetim-photo-item {
    grid-template-columns: 1fr;
  }

  .davetim-location,
  .davetim-gift {
    padding: 20px;
  }

  .davetim-gift img {
    justify-self: center;
  }

  .davetim-gallery {
    grid-auto-columns: 82%;
  }

  .davetim-countdown {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .davetim-count-item {
    min-width: 0;
    padding: 11px 5px;
  }

  .davetim-count-item strong {
    font-size: 22px;
  }

  .davetim-count-item small {
    font-size: 10px;
  }

  .davetim-table {
    display: block;
  }
}
