:root {
  --ink: #637f83;
  --ink-deep: #4f686c;
  --warm: #8b755d;
  --paper: #fffaf1;
  --line: rgba(116, 128, 118, 0.22);
  --shadow: 0 22px 60px rgba(94, 80, 61, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #eee6d7;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink-deep);
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(rgba(245, 239, 225, 0.36), rgba(245, 239, 225, 0.36)),
    url("site-assets/background.jpeg") center top / cover fixed;
}

button,
input,
select {
  font: inherit;
}

.invite {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 18px 34px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 248, 235, 0.12)),
    url("site-assets/background.jpeg") center top / cover;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  min-height: 760px;
  padding-top: 214px;
  padding-bottom: 42px;
  text-align: center;
}

.decor {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.decor-cloud {
  z-index: 1;
  width: 200px;
  opacity: 0.9;
  will-change: transform;
}

.decor-cloud-left {
  top: 64px;
  left: -62px;
  animation: cloudToCenterLeft 13s ease-in-out infinite;
}

.decor-cloud-right {
  top: 54px;
  right: -70px;
  animation: cloudToCenterRight 15s ease-in-out infinite;
}

.decor-balloon {
  z-index: 2;
  top: 16px;
  left: 50%;
  width: 128px;
  margin-left: -64px;
  animation: balloonFloat 8s ease-in-out infinite;
  will-change: transform;
}

.decor-star {
  z-index: 3;
  width: 25px;
  opacity: 0.82;
  animation: starTwinkle 5s ease-in-out infinite;
  will-change: opacity, transform;
}

.decor-star-top {
  top: 18px;
  left: 6px;
  transform: rotate(-16deg);
}

.decor-bear-balloon {
  z-index: 2;
  top: 246px;
  right: -7px;
  width: 50px;
  opacity: 0.72;
  animation: tinyFloat 7s ease-in-out infinite;
  will-change: transform;
}

.guest-line {
  position: relative;
  z-index: 4;
  max-width: 350px;
  margin: 0 auto 10px;
  display: grid;
  gap: 5px;
  line-height: 1.2;
}

.guest-prefix {
  color: rgba(139, 117, 93, 0.82);
  font-size: 20px;
}

.guest-names {
  color: var(--warm);
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 6px 2px;
  background: linear-gradient(rgba(216, 184, 137, 0.28), rgba(216, 184, 137, 0.28)) center bottom / 100% 8px no-repeat;
  font-size: 27px;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.guest-invite {
  color: rgba(79, 104, 108, 0.82);
  font-size: 21px;
  overflow-wrap: anywhere;
}

h1 {
  position: relative;
  z-index: 4;
  margin: 0;
  color: var(--ink);
  font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive;
  font-size: 70px;
  font-weight: 400;
  line-height: 0.95;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.subtitle {
  position: relative;
  z-index: 4;
  max-width: 260px;
  margin: 10px auto 0;
  color: rgba(79, 104, 108, 0.78);
  font-size: 18px;
  line-height: 1.25;
}

.bear-car {
  position: relative;
  z-index: 3;
  display: block;
  width: 300px;
  max-width: 94%;
  margin: -24px auto 0;
  animation: carBreathe 7s ease-in-out infinite;
  will-change: transform;
}

.event-details {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 19px;
  width: min(100%, 340px);
  margin: 26px auto 0;
  padding: 0 4px;
  text-align: center;
}

.detail-row {
  display: grid;
  gap: 7px;
  text-align: center;
}

.detail-label {
  color: rgba(139, 117, 93, 0.76);
  font-size: 18px;
  line-height: 1.2;
}

.detail-row strong,
.detail-place strong {
  color: var(--ink);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  line-height: 1.1;
  letter-spacing: 0;
}

.detail-row strong {
  color: #587a80;
  font-size: 31px;
}

.detail-place strong {
  font-size: 28px;
}

.detail-star {
  display: block;
  width: 26px;
  margin: 0 auto;
  opacity: 0.72;
  animation: starTwinkle 5s ease-in-out infinite;
}

.detail-place {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.12;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.rsvp,
.wishlist {
  position: relative;
  z-index: 4;
  margin: 0 auto 30px;
  padding: 0 10px;
}

.rsvp h2,
.wishlist h2 {
  margin: 0 0 18px;
  color: var(--ink-deep);
  line-height: 1.12;
  text-align: center;
}

.rsvp h2 {
  color: rgba(79, 104, 108, 0.9);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.18;
}

.wishlist h2 {
  font-size: 28px;
  font-weight: 600;
}

.rsvp form {
  text-align: center;
}

.choice-group {
  display: grid;
  gap: 6px;
  width: min(100%, 310px);
  margin: 0;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin: 0 auto 10px;
  color: var(--warm);
  font-size: 16px;
  text-align: center;
}

.choice-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--ink-deep);
  font-size: 20px;
  line-height: 1.2;
}

.choice-group input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}

.choice-group span {
  display: inline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 42px;
  padding: 7px 3px 5px;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  color: var(--ink-deep);
  background: transparent;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 16px;
  text-decoration: none;
  letter-spacing: 0;
}

.primary-button {
  min-height: 48px;
  margin-top: 12px;
  padding: 9px 18px 8px;
  border: 1px solid rgba(99, 127, 131, 0.5);
  border-bottom-width: 2px;
  border-radius: 999px;
  color: #4f686c;
  background: rgba(244, 250, 249, 0.76);
  box-shadow: 0 10px 22px rgba(79, 104, 108, 0.12);
  font-size: 19px;
}

.primary-button:active,
.gift-store:active,
.gift-reserve:active {
  color: var(--warm);
}

.form-note {
  min-height: 22px;
  margin: 13px 0 0;
  color: var(--ink-deep);
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
}

.wishlist {
  margin-bottom: 0;
  text-align: center;
}

.wishlist-lead {
  max-width: 310px;
  margin-right: auto;
  margin-left: auto;
}

.wishlist-lead p:last-child {
  margin-bottom: 0;
}

.wishlist p {
  margin: 0 0 12px;
  color: var(--ink-deep);
  font-size: 19px;
  line-height: 1.35;
}

.wishlist-star {
  display: block;
  width: 30px;
  margin: -5px auto 4px;
  opacity: 0.78;
  animation: starTwinkle 5s ease-in-out infinite;
}

.wishlist-bunnies {
  display: block;
  width: min(82vw, 288px);
  height: 238px;
  margin: -8px auto 8px;
  object-fit: cover;
  object-position: center 58%;
  opacity: 0.94;
  pointer-events: none;
  user-select: none;
  animation: tinyFloat 8s ease-in-out infinite;
  will-change: transform;
}

.gift-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  text-align: left;
}

.gift-card {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(99, 127, 131, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.7);
  box-shadow: 0 10px 24px rgba(94, 80, 61, 0.08);
}

.gift-card.is-reserved {
  background: rgba(245, 242, 235, 0.72);
}

.gift-card-cash {
  border-color: rgba(184, 129, 75, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.86), rgba(241, 228, 205, 0.7));
  box-shadow: 0 14px 30px rgba(139, 117, 93, 0.14);
}

.gift-media {
  width: 104px;
  height: 104px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.gift-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-card-cash .gift-media img {
  object-position: center 58%;
}

.gift-card.is-reserved .gift-media img {
  filter: grayscale(0.72);
  opacity: 0.62;
}

.gift-info {
  min-width: 0;
}

.gift-desire {
  display: block;
  margin-bottom: 4px;
  color: #b8735e;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.18;
}

.gift-card h3 {
  margin: 0;
  color: var(--ink-deep);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.gift-price {
  margin: 7px 0 7px;
  color: #b8814b;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.1;
}

.gift-card-cash .gift-price {
  color: #8a6845;
}

.wishlist .gift-comment {
  margin: 0;
  color: rgba(79, 104, 108, 0.88);
  font-size: 16px;
  line-height: 1.3;
}

.gift-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  align-items: center;
}

.gift-step {
  margin: 0;
  color: rgba(79, 104, 108, 0.9);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
}

.wishlist .gift-step {
  margin: 0;
}

.gift-step-ready {
  color: #5f7f82;
}

.gift-store,
.gift-reserve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px 9px;
  border-radius: 999px;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.gift-store {
  position: relative;
  gap: 8px;
  border: 1px solid rgba(214, 43, 137, 0.34);
  color: #fff;
  background: linear-gradient(135deg, #e03b99, #8f2bd4);
  box-shadow: 0 13px 22px rgba(141, 43, 186, 0.2);
}

.gift-store-locked {
  cursor: help;
  border-color: rgba(139, 117, 93, 0.22);
  color: rgba(79, 104, 108, 0.76);
  background: rgba(235, 231, 222, 0.82);
  box-shadow: none;
}

.gift-store-locked .gift-store-icon {
  opacity: 0.56;
}

.gift-store-hint {
  max-height: 0;
  margin: -5px 0 0;
  padding: 0 12px;
  overflow: hidden;
  border-radius: 12px;
  color: #6f5b45;
  background: rgba(255, 250, 241, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.28;
  text-align: center;
  opacity: 0;
  transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

.gift-store-locked:hover + .gift-store-hint,
.gift-store-locked:focus-visible + .gift-store-hint,
.gift-card.show-store-hint .gift-store-hint {
  max-height: 96px;
  margin-top: 0;
  padding-top: 9px;
  padding-bottom: 9px;
  opacity: 1;
}

.gift-store-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
}

.gift-reserve {
  border: 1px solid rgba(184, 129, 75, 0.34);
  color: #fffaf1;
  background: linear-gradient(180deg, #c9a06f, #9f7650);
  box-shadow: 0 12px 20px rgba(139, 117, 93, 0.16);
}

.gift-reserve:disabled {
  color: rgba(79, 104, 108, 0.7);
  background: rgba(179, 189, 189, 0.54);
  box-shadow: none;
}

.gift-cancel {
  border-color: rgba(139, 117, 93, 0.42);
  color: #6f5b45;
  background: rgba(255, 249, 236, 0.78);
  box-shadow: none;
  min-height: 38px;
  font-size: 15px;
}

.wishlist .gift-status {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: rgba(139, 117, 93, 0.82);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

@keyframes cloudToCenterLeft {
  0%,
  100% {
    transform: translateX(-8px) translateY(0);
  }
  50% {
    transform: translateX(20px) translateY(4px);
  }
}

@keyframes cloudToCenterRight {
  0%,
  100% {
    transform: translateX(8px) translateY(0) scaleX(-1);
  }
  50% {
    transform: translateX(-20px) translateY(5px) scaleX(-1);
  }
}

@keyframes balloonFloat {
  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) translateX(3px) rotate(1deg);
  }
}

@keyframes tinyFloat {
  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(2deg);
  }
  50% {
    transform: translateY(-6px) translateX(2px) rotate(-2deg);
  }
}

@keyframes carBreathe {
  0%,
  100% {
    transform: translateX(0) translateY(0) rotate(0deg);
  }
  35% {
    transform: translateX(4px) translateY(-4px) rotate(0.35deg);
  }
  70% {
    transform: translateX(-3px) translateY(2px) rotate(-0.2deg);
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.88) rotate(-7deg);
  }
  28% {
    opacity: 0.92;
    transform: scale(1.08) rotate(5deg);
  }
  42% {
    opacity: 0.58;
    transform: scale(0.96) rotate(1deg);
  }
  62% {
    opacity: 0.86;
    transform: scale(1.04) rotate(8deg);
  }
}

@media (max-width: 370px) {
  .invite {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero {
    min-height: 742px;
    padding-top: 210px;
    padding-bottom: 38px;
  }

  .guest-line {
    max-width: 318px;
  }

  .guest-prefix {
    font-size: 19px;
  }

  .guest-names {
    font-size: 24px;
  }

  .guest-invite {
    font-size: 20px;
  }

  h1 {
    font-size: 62px;
  }

  .subtitle {
    font-size: 17px;
  }

  .bear-car {
    width: 282px;
    margin-top: -22px;
  }

  .event-details {
    width: min(100%, 314px);
  }

  .detail-label {
    font-size: 17px;
  }

  .detail-row strong {
    font-size: 28px;
  }

  .detail-place strong {
    font-size: 25px;
  }

  .rsvp h2 {
    font-size: 22px;
  }

  .rsvp,
  .wishlist {
    padding-right: 4px;
    padding-left: 4px;
  }

  .wishlist-bunnies {
    height: 224px;
  }

  .gift-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .gift-media {
    width: 92px;
    height: 92px;
  }

  .gift-card h3 {
    font-size: 18px;
  }

  .gift-price {
    font-size: 18px;
  }

  .wishlist .gift-comment {
    font-size: 15px;
  }

  .gift-actions {
    gap: 8px;
  }

  .gift-store,
  .gift-reserve {
    min-height: 46px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 16px;
  }

  .gift-step {
    font-size: 15px;
  }

  .gift-store-icon {
    width: 24px;
    height: 24px;
  }

  .gift-cancel {
    min-height: 36px;
    font-size: 14px;
  }
}

@media (min-width: 431px) {
  body {
    padding: 24px 0;
  }

  .invite {
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
