:root {
  --bg: #fbf8ff;
  --bg-deep: #e8dcff;
  --text: #281d3f;
  --muted: #695a82;
  --accent: #8b5cf6;
  --accent-dark: #6d28d9;
  --accent-soft: #ede9fe;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(76, 29, 149, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Comfortaa", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgba(196, 181, 253, 0.72), transparent 24rem),
    radial-gradient(circle at 88% 88%, rgba(167, 139, 250, 0.38), transparent 25rem),
    linear-gradient(135deg, var(--bg), var(--white), var(--bg-deep));
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-glow {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.45;
  pointer-events: none;
}

.page-glow-one {
  top: 8%;
  right: -7rem;
  background: #a78bfa;
}

.page-glow-two {
  bottom: -8rem;
  left: -6rem;
  background: #ddd6fe;
}

.invite-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 16px;
}

.invite-card {
  position: relative;
  width: min(720px, 100%);
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.logo-mark {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  place-items: center;
  color: var(--white);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  box-shadow: 0 16px 35px rgba(139, 92, 246, 0.28);
  transform: rotate(-6deg);
}

.logo-mark span {
  display: inline-block;
  font-size: 2rem;
  transform: rotate(6deg);
}

h1 {
  max-width: 560px;
  margin: 0 auto 18px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.7rem, 9vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 560px;
  margin: 0 auto 30px;
  color: var(--muted);
  line-height: 1.75;
}

.calendar-card {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid rgba(139, 92, 246, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.58);
}

.calendar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: left;
}

.calendar-title strong {
  color: var(--accent-dark);
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.weekdays {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-day,
.time-option {
  color: var(--text);
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.calendar-day {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 8px 4px;
  font-weight: 700;
}

.calendar-day.is-offset {
  visibility: hidden;
}

.calendar-day small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.calendar-day:hover,
.calendar-day.active,
.time-option:hover,
.time-option.active {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.44);
  background: var(--accent-soft);
  box-shadow: 0 12px 26px rgba(76, 29, 149, 0.1);
}

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

.time-option {
  min-height: 44px;
  padding: 8px 10px;
  font-weight: 700;
}

.wish-field {
  display: grid;
  max-width: 560px;
  margin: 0 auto 18px;
  gap: 9px;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
}

.wish-field textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 15px 16px;
  color: var(--text);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  font: inherit;
  line-height: 1.5;
  outline: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.wish-field textarea::placeholder {
  color: rgba(105, 90, 130, 0.72);
}

.wish-field textarea:focus {
  border-color: rgba(139, 92, 246, 0.48);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(76, 29, 149, 0.1);
}

.date-result {
  margin: 0 0 22px;
  color: var(--accent-dark);
  font-weight: 700;
}

.answer-zone {
  position: relative;
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.button {
  display: inline-flex;
  min-width: 156px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition:
    transform 110ms ease,
    box-shadow 180ms ease,
    left 90ms ease,
    top 90ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.calendar-day:focus-visible,
.time-option:focus-visible {
  outline: 3px solid rgba(139, 92, 246, 0.35);
  outline-offset: 4px;
}

.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  box-shadow: 0 18px 35px rgba(139, 92, 246, 0.27);
}

.ghost {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.22);
}

.no-button {
  position: relative;
}

.no-button.is-running {
  position: absolute;
  z-index: 20;
  box-shadow: 0 18px 35px rgba(76, 29, 149, 0.2);
}

.no-message {
  min-height: 24px;
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.no-message.show {
  opacity: 1;
  transform: translateY(0);
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  max-width: calc(100% - 40px);
  padding: 14px 18px;
  color: var(--white);
  border-radius: 999px;
  background: rgba(40, 29, 63, 0.92);
  box-shadow: 0 18px 45px rgba(40, 29, 63, 0.24);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 620px) {
  .invite-card {
    border-radius: 28px;
  }

  .time-picker {
    grid-template-columns: 1fr;
  }

  .answer-zone {
    min-height: 128px;
  }

  .button {
    min-width: 132px;
  }
}
