:root {
  --paper: #fdf9f6;
  --title: #89603b;
  --ink: #103b31;
  --line: rgba(16, 59, 49, 0.22);
  --soft: rgba(137, 96, 59, 0.09);
  --white: rgba(255, 255, 255, 0.48);
  --title-font: "Antic Didone", Georgia, serif;
  --body-font: "Montserrat", Arial, sans-serif;
  --title-case: uppercase;
}

* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--paper);
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body-font);
  font-weight: 400;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  -webkit-tap-highlight-color: transparent;
}

#app {
  width: min(100%, 690px);
  min-height: 100vh;
  margin-inline: auto;
  padding: clamp(18px, 5vw, 48px) 18px;
  display: grid;
  align-items: center;
}
.loading,
.status-message {
  margin: 0;
  padding: 48px 24px;
  text-align: center;
  color: var(--ink);
}
.status-message h1 {
  color: var(--title);
  font: 34px/1 var(--title-font);
  text-transform: var(--title-case);
}
.status-message p {
  font-size: 16px;
  line-height: 1.55;
}

.rsvp-card {
  position: relative;
  min-height: 560px;
  padding: clamp(34px, 6vw, 58px) clamp(22px, 7vw, 64px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(137, 96, 59, 0.36);
  text-align: center;
  box-shadow: 0 18px 46px rgba(53, 43, 30, 0.08);
}
.rsvp-progress {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  overflow: hidden;
  background: rgba(137, 96, 59, 0.15);
}
.rsvp-progress span {
  display: block;
  height: 100%;
  background: var(--title);
  transition: width 0.35s ease;
}
.rsvp-step {
  display: none;
  animation: enter 0.32s ease both;
}
.rsvp-step.is-active {
  display: block;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.rsvp-kicker {
  margin: 0 0 18px;
  color: var(--title);
  font: clamp(32px, 6vw, 52px)/1 var(--title-font);
  text-transform: var(--title-case);
}
.rsvp-step h1 {
  max-width: 520px;
  margin: 0 auto 10px;
  color: var(--title);
  font: clamp(27px, 5vw, 43px)/1.08 var(--title-font);
  font-weight: 400;
  text-transform: var(--title-case);
}
.rsvp-step h2 {
  margin: 28px 0 6px;
  color: var(--ink);
  font: clamp(20px, 3.5vw, 28px)/1.25 var(--body-font);
  font-weight: 300;
}
.rsvp-tickets {
  display: inline-block;
  margin: 0;
  padding: 7px 14px;
  border-top: 1px solid rgba(137, 96, 59, 0.5);
  border-bottom: 1px solid rgba(137, 96, 59, 0.5);
  color: var(--title);
  font-size: 14px;
}
.rsvp-helper,
.step-copy {
  max-width: 460px;
  margin: 0 auto 20px;
  font-size: 15px;
  line-height: 1.5;
}
.rsvp-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}
.rsvp-choices button,
.rsvp-follow {
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid rgba(137, 96, 59, 0.45);
  border-radius: 0;
  background: var(--white);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.rsvp-choices button {
  display: grid;
  gap: 6px;
  place-content: center;
}
.rsvp-choices span {
  color: var(--ink);
  font-size: 16px;
}
.rsvp-choices small,
.rsvp-follow small {
  color: var(--title);
  font-size: 12px;
}
.rsvp-follow {
  display: grid;
  gap: 4px;
  width: min(100%, 290px);
  min-height: 56px;
  margin: 20px auto 0;
  place-content: center;
  color: var(--ink);
}
.rsvp-deadline {
  margin: 34px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.rsvp-deadline strong {
  display: block;
  color: var(--title);
  font-weight: 400;
}
.rsvp-returning-note {
  max-width: 460px;
  margin: 0 auto 26px;
  padding: 14px 17px;
  background: var(--soft);
  font-size: 14px;
  line-height: 1.5;
}

.rsvp-back {
  display: block;
  margin: 0 0 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--title);
  font-size: 14px;
  cursor: pointer;
}
.rsvp-number {
  margin: 0 0 10px;
  color: var(--title);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.guest-list {
  display: grid;
  gap: 11px;
  margin-top: 25px;
  text-align: left;
}
.guest-row {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--white);
}
.guest-row > label {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  color: var(--ink);
  font-size: 17px;
}
.guest-row p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}
.guest-row input[type="checkbox"] {
  appearance: none;
  width: 19px;
  height: 19px;
  margin: 0;
  flex: 0 0 19px;
  border: 1px solid var(--title);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
}
.guest-row input[type="checkbox"]:checked {
  background: var(--title);
  box-shadow: inset 0 0 0 4px var(--paper);
}
.guest-restriction {
  display: grid;
  gap: 6px;
  margin: 14px 0 0 30px;
}
.guest-row--single .guest-restriction {
  margin-left: 0;
}
.guest-restriction[hidden] {
  display: none;
}
.guest-restriction label,
.rsvp-field > span {
  color: var(--title);
  font-size: 13px;
}
.guest-restriction input,
.rsvp-field input,
.rsvp-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: rgba(255, 255, 255, 0.45);
  font-size: 15px;
}
.guest-restriction input:focus,
.rsvp-field input:focus,
.rsvp-field textarea:focus {
  border-color: var(--title);
}
.rsvp-field {
  display: grid;
  gap: 7px;
  margin: 25px 0;
  text-align: left;
}
.rsvp-field > small {
  font-size: 13px;
}
.rsvp-field textarea {
  min-height: 96px;
  resize: vertical;
}
.rsvp-summary {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 9px 14px;
  margin: 24px 0 4px;
  padding: 16px;
  background: var(--soft);
  text-align: left;
}
.rsvp-summary span {
  color: var(--title);
  font-size: 12px;
}
.rsvp-summary strong {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.35;
}
.rsvp-error,
.rsvp-submit-error {
  min-height: 18px;
  margin: 11px 0 0;
  color: #9a392b;
  font-size: 13px;
  line-height: 1.35;
}
.rsvp-primary {
  min-width: 210px;
  min-height: 46px;
  margin-top: 13px;
  padding: 12px 23px;
  border: 1px solid var(--title);
  background: var(--title);
  color: var(--paper);
  cursor: pointer;
  font-size: 15px;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}
.rsvp-primary:disabled,
.rsvp-follow:disabled {
  opacity: 0.6;
  cursor: wait;
}
.rsvp-success {
  max-width: 440px;
  margin: 0 auto;
  padding-top: 105px;

}
.rsvp-success > b {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 23px;
  border: 1px solid var(--title);
  border-radius: 50%;
  color: var(--title);
  font: 28px/1 var(--title-font);
  text-transform: var(--title-case);
}
.rsvp-success p {
  font-size: 16px;
  line-height: 1.6;
}

@media (hover: hover) {
  .rsvp-choices button:hover,
  .rsvp-follow:hover {
    transform: translateY(-2px);
    background: var(--soft);
  }
  .rsvp-primary:hover {
    transform: translateY(-2px);
    background: #714b2a;
  }
}
@media (max-width: 520px) {
  #app {
    padding: 0;
    align-items: stretch;
  }
  .rsvp-card {
    min-height: 100vh;
    border-inline: 0;
    box-shadow: none;
  }
  .rsvp-choices {
    grid-template-columns: 1fr;
  }
  .rsvp-success {
    padding-top: 85px;
  }
}
