:root {
  color-scheme: light;
  --ivory: #fbf6ea;
  --paper: #fffaf1;
  --burgundy: #570a10;
  --burgundy-deep: #43070c;
  --gold: #b88120;
  --gold-pale: #d8b671;
  --ink: #2d1516;
  --muted: #6d5a55;
  --error: #9b2026;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--ivory);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { background: var(--ivory); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--ivory);
}

button, input, select { font: inherit; }

.page-floral {
  position: fixed;
  z-index: 0;
  width: 170px;
  opacity: .56;
  pointer-events: none;
}

.page-floral-top { top: 0; right: 0; }
.page-floral-bottom { bottom: -18px; left: -32px; transform: rotate(180deg); }

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 34px 22px 44px;
}

.event-panel, .rsvp-panel { min-width: 0; }

.event-heading { text-align: center; }

.khanda {
  display: block;
  width: 112px;
  height: auto;
  margin: 0 auto 4px;
}

h1, h2, p { text-wrap: balance; }

h1 {
  margin: 0;
  color: var(--burgundy-deep);
  font-size: clamp(3rem, 15vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: .92;
}

.invitation-line {
  margin: 14px 0 0;
  color: var(--burgundy);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.5;
  text-transform: uppercase;
}

.invitation-line + .gold-divider { margin-top: 14px; }

.gold-divider {
  width: min(100%, 430px);
  height: 1px;
  margin: 22px auto 16px;
  background: var(--gold-pale);
}

.gold-divider.short { width: 210px; margin: 10px auto 18px; }

.occasion {
  margin: 0;
  color: var(--burgundy);
  font-size: clamp(2rem, 10vw, 4.4rem);
  font-variant: small-caps;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
}

.occasion-script {
  margin: 8px 0 0;
  color: var(--gold);
  font-family: "Snell Roundhand", "Apple Chancery", cursive;
  font-size: clamp(1.75rem, 8vw, 3.25rem);
  line-height: 1;
}

.event-details {
  display: grid;
  gap: 12px;
  width: min(100%, 620px);
  margin: 30px auto 0;
}

.event-detail {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.event-detail img { width: 66px; height: auto; }

.event-detail p {
  margin: 0;
  color: var(--burgundy-deep);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.25;
  text-transform: uppercase;
}

.event-note { text-align: center; }
.event-note > p { display: none; }
.event-note .gold-divider { margin-top: 28px; }

.lotus {
  display: block;
  width: 180px;
  height: auto;
  margin: 4px auto 8px;
}

.rsvp-panel { padding-top: 4px; }

.form-heading { margin-bottom: 26px; text-align: center; }

.form-heading h2, .success-card h2 {
  margin: 0;
  color: var(--burgundy-deep);
  font-size: clamp(3rem, 14vw, 4.8rem);
  font-weight: 400;
  letter-spacing: .055em;
  line-height: 1;
}

.deadline {
  margin: 0;
  color: var(--burgundy-deep);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.edit-notice {
  margin-bottom: 20px;
  padding: 11px 14px;
  color: var(--burgundy);
  background: #f5e7c8;
  border-left: 3px solid var(--gold);
  font-size: .9rem;
}

.field { margin: 0 0 22px; }
fieldset { padding: 0; border: 0; }

label, legend {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

input:not([type="radio"]):not([type="checkbox"]), select {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 253, 247, .76);
  border: 1px solid var(--gold-pale);
  border-radius: 5px;
  outline: none;
}

select { appearance: auto; }
input::placeholder { color: #8b7f79; }

input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 3px solid rgba(184, 129, 32, .34);
  outline-offset: 2px;
}

.choice-grid { display: grid; gap: 8px; }

.choice-card {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 58px;
  margin: 0;
  padding: 13px 14px;
  background: rgba(255, 253, 247, .65);
  border: 1px solid var(--gold-pale);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.choice-card:hover, .choice-card:has(input:checked) {
  background: #f8ead0;
  border-color: var(--gold);
}

input[type="radio"], input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--burgundy);
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin: 16px 0 0;
}

.check-list label {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  font-weight: 400;
}

#dietary-other-field { margin-top: 18px; }

.field-help, .privacy-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

.turnstile-wrap { min-height: 68px; margin: 6px 0 18px; }
.cf-turnstile { width: fit-content; max-width: 100%; }

.primary-button, .secondary-button, .text-button {
  min-height: 50px;
  border: 0;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  padding: 14px 20px;
  color: var(--paper);
  background: var(--burgundy);
  border: 1px solid var(--burgundy);
  border-radius: 5px;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.primary-button:hover { background: #700d15; }
.primary-button:disabled { cursor: wait; opacity: .62; }
.privacy-note { text-align: center; }

.form-error {
  margin: 0 0 14px;
  color: var(--error);
  font-size: .9rem;
}

.success-card {
  padding: 30px 22px;
  text-align: center;
  background: rgba(255, 253, 247, .76);
  border: 1px solid var(--gold-pale);
}

.success-card h2 { font-size: 2.2rem; letter-spacing: 0; }
.success-card p { color: var(--muted); line-height: 1.55; }

.edit-link-row { display: grid; gap: 8px; margin-top: 18px; }

.secondary-button {
  padding: 10px 16px;
  color: var(--burgundy);
  background: #f1dfbb;
  border: 1px solid #c9a666;
}

.text-button {
  margin-top: 14px;
  padding: 8px 12px;
  color: var(--burgundy);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[hidden] { display: none !important; }

@media (min-width: 700px) {
  .page-shell { width: min(100% - 44px, 940px); padding: 46px 34px 54px; }
  .khanda { width: 132px; }
  h1 { font-size: 5.4rem; }
  .occasion { font-size: 4rem; }
  .occasion-script { font-size: 3rem; }
  .event-details { grid-template-columns: 1.15fr 1fr 1.45fr; gap: 18px; margin-top: 34px; }
  .event-detail { grid-template-columns: 60px 1fr; gap: 8px; }
  .event-detail img { width: 60px; }
  .event-detail p { font-size: .78rem; letter-spacing: .03em; }
  .rsvp-panel { padding-top: 8px; }
  .form-heading h2 { font-size: 4.4rem; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .attendance-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(180px, .9fr); gap: 28px; }
  .edit-link-row { grid-template-columns: 1fr auto; }
  .page-floral { width: 205px; }
}

@media (min-width: 1100px) {
  .page-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: clamp(56px, 7vw, 108px);
    align-items: center;
    width: min(100% - 72px, 1320px);
    min-height: 100vh;
    padding: 42px 0;
  }

  .event-panel { align-self: center; }
  .khanda { width: 125px; }
  h1 { font-size: clamp(4.8rem, 6.2vw, 6.4rem); }
  .occasion { font-size: clamp(3.25rem, 4.25vw, 4.5rem); }
  .occasion-script { font-size: clamp(2.35rem, 3.1vw, 3.25rem); }

  .event-details {
    grid-template-columns: 1fr;
    gap: 4px;
    width: min(100%, 455px);
    margin: 26px auto 0;
  }

  .event-detail { grid-template-columns: 72px 1fr; }
  .event-detail img { width: 72px; }
  .event-detail p { font-size: 1rem; }

  .event-note { width: min(100%, 455px); margin: 0 auto; }
  .event-note > p { display: block; margin: 0; font-size: .98rem; line-height: 1.45; }
  .event-note .gold-divider { margin: 16px auto 14px; }
  .lotus { width: 165px; margin-top: 6px; }

  .rsvp-panel { padding: 0; }
  .form-heading { margin-bottom: 28px; text-align: left; }
  .form-heading h2 { font-size: 4.6rem; }
  .form-heading .gold-divider { margin-right: auto; margin-left: 0; }
  .deadline { font-size: .76rem; }
  .attendance-row { display: block; }
  .field { margin-bottom: 20px; }
  .page-floral { width: 235px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
