:root {
  --bg: #f8fbff;
  --card: #fffef8;
  --text: #2d2a37;
  --muted: #666280;
  --accent: #f66b95;
  --accent-strong: #ea4a7f;
  --accent-soft: #ffe4ef;
  --ok: #2d9b68;
  --warn: #bb4f6d;
  --focus: #1f6feb;
  --line: #f1dce8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, #ffe8f1 0%, transparent 34%),
    radial-gradient(circle at 92% 18%, #dff4ff 0%, transparent 32%),
    radial-gradient(circle at 15% 84%, #f9edff 0%, transparent 30%),
    linear-gradient(160deg, #fefcff 0%, #f8fbff 55%, #fff9f3 100%);
}

.page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.card {
  width: min(100%, 700px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  padding: 1.2rem;
  box-shadow: 0 12px 26px rgba(123, 94, 134, 0.15);
}

h1,
h2 {
  margin: 0 0 0.5rem;
}

.lead {
  margin-top: 0;
  color: var(--muted);
}

.tagline {
  margin: 0 0 0.35rem;
  color: #b54777;
  font-size: 0.96rem;
  font-weight: 700;
}

.floating-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-item {
  position: absolute;
  width: 56px;
  height: 56px;
  opacity: 0.9;
  filter: drop-shadow(0 8px 12px rgba(55, 56, 90, 0.15));
  animation: drift 7s ease-in-out infinite;
}

.float-item.tiny {
  width: 36px;
  height: 36px;
}

.f1 {
  left: 4vw;
  top: 10vh;
  animation-delay: -1.4s;
}

.f2 {
  left: 9vw;
  top: 32vh;
  animation-delay: -3.3s;
}

.f3 {
  right: 4vw;
  top: 14vh;
  animation-delay: -2.4s;
}

.f4 {
  right: 8vw;
  top: 36vh;
  animation-delay: -4.9s;
}

.f5 {
  left: 6vw;
  top: 62vh;
  animation-delay: -5.2s;
}

.f6 {
  right: 6vw;
  top: 66vh;
  animation-delay: -0.8s;
}

.page {
  position: relative;
  z-index: 1;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0 0 1rem;
  padding: 0.85rem;
}

legend {
  font-weight: 700;
  padding: 0 0.3rem;
}

label {
  display: block;
  margin-bottom: 0.45rem;
}

select,
input[type="date"] {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d9bfd0;
  border-radius: 11px;
  background: #fff;
  color: #302936;
  font-size: 1rem;
}

.button {
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0.72rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.primary,
.yes {
  background: var(--accent);
  color: #fff;
}

.primary:hover,
.yes:hover {
  background: var(--accent-strong);
}

.secondary,
.no {
  background: var(--accent-soft);
  color: #6b2340;
}

.button-row {
  --yes-scale: 1;
  --no-shift: 0px;
  --no-rotate: 0deg;
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0 0.8rem;
  align-items: center;
}

.button-row .button {
  flex: 1;
  transition: transform 0.2s ease, flex 0.2s ease, background 0.2s ease;
}

.button-row.swapped {
  flex-direction: row-reverse;
}

#yes-button {
  transform: scale(var(--yes-scale));
}

#no-button {
  transform: translateX(var(--no-shift)) rotate(var(--no-rotate));
}

.message {
  margin: 0.5rem 0 0.75rem;
}

.message.info {
  color: var(--muted);
}

.message.error {
  color: var(--warn);
}

.message.success {
  color: var(--ok);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  33% {
    transform: translateY(-12px) translateX(5px) rotate(5deg);
  }
  66% {
    transform: translateY(8px) translateX(-6px) rotate(-4deg);
  }
}

@media (max-width: 540px) {
  .card {
    padding: 1rem;
  }

  .button-row {
    flex-direction: column;
  }

  .button-row.swapped {
    flex-direction: column-reverse;
  }

  .button-row .button {
    width: 100%;
  }

  .float-item {
    width: 42px;
    height: 42px;
    opacity: 0.5;
  }

  .float-item.tiny {
    width: 28px;
    height: 28px;
  }

  .f2,
  .f4,
  .f6 {
    display: none;
  }
}
