:root {
  --ink: #23211f;
  --muted: #716960;
  --paper: #fffaf3;
  --surface: #ffffff;
  --line: #e6d8ca;
  --accent: #9d6d4a;
  --accent-dark: #473c33;
  --sage: #798d78;
  --rose: #d8a29a;
  --script: "Times New Roman", Times, serif;
  font-family: "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

body.invite-body {
  font-family: var(--script);
}

body.invite-body:not(.postcard-opened) {
  overflow: hidden;
}

a {
  color: inherit;
}

.shell,
.invite-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.invite-body .invite-page {
  opacity: 0;
  transform: scale(0.98);
  transform-origin: center top;
  transition: opacity 420ms ease 1520ms, transform 620ms ease 1460ms;
}

.invite-body.postcard-opening .invite-page,
.invite-body.postcard-opened .invite-page {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.postcard-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  perspective: 1200px;
  background:
    radial-gradient(circle at 20% 12%, rgb(216 162 154 / 28%), transparent 32%),
    linear-gradient(135deg, #fffaf3, #efe3d4 55%, #d8c5b1);
  transition: opacity 420ms ease, visibility 420ms ease;
}

.postcard-opened .postcard-gate {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.postcard {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  aspect-ratio: 1.45;
  border: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  transform-style: preserve-3d;
  cursor: pointer;
}

.envelope-shadow {
  position: absolute;
  right: 5%;
  bottom: -34px;
  left: 5%;
  height: 54px;
  border-radius: 50%;
  background: rgb(71 60 51 / 20%);
  filter: blur(18px);
  transition: none;
}

.envelope {
  position: absolute;
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  overflow: visible;
  z-index: 3;
  transition: none;
}

.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

.envelope-back {
  z-index: 1;
  border: 1px solid #d8c5b1;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 30%), transparent 38%),
    #efe0cf;
  box-shadow: 0 26px 80px rgb(71 60 51 / 24%);
  transition: transform 980ms cubic-bezier(0.2, 0.8, 0.2, 1) 1000ms;
}

.postcard-sheet {
  position: absolute;
  z-index: 2;
  top: 12%;
  left: 8%;
  width: 84%;
  height: 76%;
  border: 1px solid #d8c5b1;
  border-radius: 8px;
  background: #fffaf3;
  box-shadow: 0 14px 35px rgb(71 60 51 / 16%);
  opacity: 1;
  transform: translateY(10%) scale(0.86);
}

.envelope-front {
  z-index: 3;
  background:
    linear-gradient(30deg, #dec3a6 49.8%, transparent 50%),
    linear-gradient(-30deg, #d5b693 49.8%, transparent 50%),
    linear-gradient(0deg, #ead8c3, #ead8c3);
  clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
  transition: transform 980ms cubic-bezier(0.2, 0.8, 0.2, 1) 1000ms;
}

.envelope-flap {
  z-index: 4;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 18%), transparent 42%),
    linear-gradient(180deg, #d7b58f, #ecd8c1);
  clip-path: polygon(0 0, 100% 0, 50% 54%);
  transform-origin: top center;
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  backface-visibility: hidden;
}

.envelope-recipient {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 5;
  color: rgb(71 60 51 / 72%);
  font-family: var(--script);
  font-size: clamp(1.05rem, 3.6vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
  transition: transform 980ms cubic-bezier(0.2, 0.8, 0.2, 1) 1000ms;
}

.wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(112px, 22vw, 148px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(255 236 218 / 35%);
  border-radius: 45% 55% 48% 52% / 52% 46% 54% 48%;
  color: #fff7ee;
  background:
    radial-gradient(circle at 35% 25%, rgb(255 255 255 / 24%), transparent 18%),
    radial-gradient(circle at 70% 76%, rgb(76 15 12 / 32%), transparent 30%),
    radial-gradient(circle at 50% 50%, #b84c42 0 50%, #812b23 72%, #5f1f1a 100%);
  box-shadow:
    inset 8px 10px 16px rgb(255 230 214 / 14%),
    inset -10px -14px 22px rgb(57 10 8 / 36%),
    0 10px 28px rgb(71 35 28 / 34%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.86rem, 2.3vw, 1.04rem);
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%);
  transition: opacity 350ms ease, transform 700ms ease;
}

.wax-seal::before,
.wax-seal::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: inherit;
  background: #8d3128;
}

.wax-seal::before {
  inset: -8px -6px -5px -9px;
  clip-path: polygon(8% 38%, 18% 18%, 36% 9%, 50% 0, 66% 10%, 84% 12%, 94% 34%, 100% 54%, 88% 73%, 82% 94%, 56% 88%, 38% 100%, 21% 84%, 2% 76%, 9% 55%);
  box-shadow: inset -8px -10px 18px rgb(72 16 13 / 26%);
}

.wax-seal::after {
  inset: 15%;
  z-index: 1;
  border: 1px solid rgb(255 236 218 / 28%);
  background: transparent;
  box-shadow: inset 0 0 12px rgb(68 15 12 / 24%);
}

.wax-seal span {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0;
}

.postcard-opening .envelope-flap {
  animation: flap-open-and-drop 1980ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.postcard-opening .envelope-front,
.postcard-opening .envelope-back,
.postcard-opening .envelope-recipient {
  transform: translateY(150vh) scale(0.96);
}

.postcard-opening .envelope-shadow {
  animation: shadow-drop 980ms ease 1000ms forwards;
}

.postcard-opening .postcard-sheet {
  animation: sheet-to-page 1600ms cubic-bezier(0.2, 0.8, 0.2, 1) 260ms forwards;
}

.postcard-opening .wax-seal {
  animation: seal-release 520ms ease forwards;
}

@keyframes flap-open-and-drop {
  0% {
    transform: rotateX(0);
  }
  38% {
    transform: rotateX(178deg);
  }
  50% {
    transform: rotateX(178deg) translateY(0);
  }
  100% {
    transform: rotateX(178deg) translateY(150vh) scale(0.96);
  }
}

@keyframes shadow-drop {
  0% {
    opacity: 1;
    transform: translateY(0) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translateY(150vh) scaleX(0.58);
  }
}

@keyframes seal-release {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }
}

@keyframes sheet-to-page {
  0% {
    opacity: 1;
    border-radius: 8px;
    transform: translateY(10%) scale(0.86);
  }
  36% {
    opacity: 1;
    border-radius: 8px;
    transform: translateY(-60%) scale(1);
  }
  62% {
    opacity: 1;
    border-radius: 8px;
    transform: translateY(-68%) scale(1.08);
  }
  100% {
    opacity: 1;
    border-radius: 0;
    transform: translateY(-10%) scale(5);
  }
}

.postcard-mark,
.postcard-hint {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.postcard-names {
  max-width: 440px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.94;
}

.postcard-guest {
  max-width: 380px;
  color: var(--muted);
  font-size: 1.2rem;
}

.cover,
.hero,
.section {
  border-bottom: 1px solid var(--line);
}

.cover {
  padding: 72px 0 44px;
}

.cover-compact {
  min-height: 280px;
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(420px, 56vh, 620px);
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #2b2422;
}

.hero-photo {
  position: absolute;
  inset: 0;
  background: #2b2422 !important;
  background-image: none !important;
}

.hero-content {
  position: relative;
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 clamp(46px, 7vh, 78px);
}

.wedding-intro {
  max-width: 620px;
  margin-bottom: 6px;
  color: #fff7ee;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  font-weight: 500;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #f7d9c4;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-family: var(--script);
  font-size: clamp(3.6rem, 9vw, 7rem);
  font-weight: 500;
  line-height: 0.95;
}

.hero-event {
  display: grid;
  gap: 4px;
  max-width: 760px;
  border-top: 1px solid rgb(255 247 238 / 42%);
  padding-top: 16px;
  color: #fff7ee;
}

.hero-event p {
  margin: 0;
}

.hero-date {
  font-size: clamp(1.75rem, 3.8vw, 2.7rem);
}

.hero-address {
  max-width: 620px;
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  line-height: 1.2;
}

h2 {
  margin-bottom: 12px;
  font-family: var(--script);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0;
}

.lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.7rem;
  line-height: 1.55;
}

.hero .lead {
  color: #fff7ee;
}

.section {
  padding: 52px 0;
}

.invitation-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.invitation-text {
  max-width: 760px;
  margin: 0 auto;
  color: var(--accent-dark);
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.22;
}

.invitation-text p {
  margin-bottom: 22px;
}

.invitation-greeting,
.invitation-signature {
  font-size: clamp(2rem, 3.8vw, 3rem);
}

.invitation-signature {
  margin-bottom: 0;
}

.invitation-photo {
  margin: 0;
  align-self: stretch;
  min-height: 420px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(47, 39, 34, 0.16);
}

.invitation-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 40% center;
}

.section-head,
.hero-actions,
.rsvp-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.hero-actions,
.rsvp-actions {
  justify-content: flex-start;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  font-family: var(--script);
  font-size: 1.45rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.button-dark {
  color: #fff;
  background: var(--accent-dark);
}

.button-light {
  color: var(--accent-dark);
  background: #fff7ee;
}

.button-outline {
  color: #fff;
  border-color: rgb(255 255 255 / 68%);
  background: transparent;
}

.button-ghost {
  color: var(--accent-dark);
  border-color: var(--line);
  background: transparent;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 500;
  text-underline-offset: 4px;
}

.guest-grid,
.details-grid,
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guest-card,
.details-grid article {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.countdown div,
.stats div {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--surface);
  text-align: center;
}

.countdown strong,
.stats strong {
  display: block;
  font-family: var(--script);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
}

.countdown span,
.stats span,
.muted {
  color: var(--muted);
}

.invite-body .countdown span {
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
}

.invite-body .timeline-row {
  font-size: clamp(1.65rem, 2.4vw, 2.2rem);
  line-height: 1.08;
}

.invite-body .timeline-row time {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  text-align: left;
}

.invite-body .muted,
.invite-body .status-text {
  font-size: clamp(1.55rem, 2.7vw, 2.1rem);
  line-height: 1.22;
}

.palette {
  display: flex;
  gap: 8px;
}

.palette span {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
}


.gift-note-section {
  padding: 28px 0;
  text-align: center;
}

.gift-note {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.45;
}
.dress-code-section {
  padding: 34px 0;
  text-align: center;
}

.dress-code-section h2 {
  margin-bottom: 4px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.dress-code-section .section-head {
  justify-content: center;
  text-align: center;
}

.dress-code-text {
  max-width: 620px;
  margin: 8px auto 18px;
  color: var(--muted);
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.24;
}

.dress-code-palette {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1.4vw, 12px);
  justify-content: center;
  align-items: center;
}

.dress-code-swatch {
  width: clamp(34px, 5vw, 48px);
  aspect-ratio: 1;
  border: 1px solid rgb(71 60 51 / 14%);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgb(71 60 51 / 9%);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.22fr) 1fr;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.timeline-row time {
  color: var(--accent);
  font-weight: 500;
  line-height: 1;
  white-space: normal;
}

.clean-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.map-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid #ead8c3;
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 86%), rgb(245 238 230 / 88%)),
    var(--surface);
  box-shadow: 0 18px 42px rgb(71 60 51 / 12%);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
  filter: sepia(0.12) saturate(0.86) contrast(0.96);
}

.rsvp {
  padding-bottom: 80px;
}

.rsvp-people {
  display: grid;
  gap: 14px;
}

.rsvp-person {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.rsvp-choice-list {
  display: grid;
  gap: 12px;
}

.rsvp-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.rsvp-choice > span {
  color: var(--muted);
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
}

.rsvp-person h3 {
  margin: 0 0 4px;
  font-family: var(--script);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 500;
}

.rsvp-person p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.status-text {
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 500;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
}

.table-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-person-list {
  display: grid;
  gap: 8px;
}

.admin-person-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto minmax(110px, auto);
  gap: 10px;
  align-items: center;
}

.admin-label {
  color: var(--muted);
  font-size: 0.78rem;
  margin-right: 4px;
}

.admin-copy-link {
  min-height: 36px;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.95rem;
  font-weight: 700;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.pill-yes {
  color: #1d4a2a;
  background: #dff0df;
}

.pill-no {
  color: #7c2d24;
  background: #f4ddd9;
}

.pill-waiting {
  color: #5c544c;
  background: #efe7dd;
}

@media (max-width: 760px) {
  .shell,
  .invite-page {
    width: min(100% - 20px, 1120px);
  }

  .hero {
  position: relative;
  display: grid;
  min-height: clamp(420px, 56vh, 620px);
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #2b2422;
}

.groom-hero {
  background: #211c1a;
}

.groom-note-block {
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
}

.groom-note-block .invitation-text {
  max-width: 860px;
}

.groom-rsvp-card {
  align-items: center;
}

.groom-rsvp-card p {
  margin-bottom: 0;
}
.special-link-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
}

.special-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}