:root {
  color-scheme: dark;
  --bg: #11111b;
  --card: #1b1a2a;
  --text: #f7f1ed;
  --muted: #b7afc4;
  --accent: #e8b9d0;
  --line: #454054;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, #39304f 0%, transparent 48%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.unlock-card,
.birthday-screen {
  width: min(100%, 440px);
  text-align: center;
  padding: 36px 25px;
  border: 1px solid #ffffff17;
  border-radius: 26px;
  background: #1b1a2add;
  box-shadow: 0 24px 80px #0005;
}

.moon {
  color: var(--accent);
  font-size: 45px;
  line-height: 1;
  margin-bottom: 22px;
}

.moon-large {
  font-size: 60px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 10px;
  line-height: 1.8;
}

h1 {
  margin: 12px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 9vw, 48px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.period {
  color: var(--accent);
}

.intro,
.hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 30px 0 22px;
  text-align: left;
}

legend {
  width: 100%;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.hint {
  text-align: center;
  margin: 7px 0 18px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  font-size: 14px;
  transition: background 160ms ease, border-color 160ms ease;
}

.choice input:checked + span {
  border-color: var(--accent);
  background: #e8b9d01c;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 13px;
  padding: 13px 18px;
  background: var(--accent);
  color: #211522;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

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

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 20px;
  color: var(--accent);
  font-size: 13px;
}

.footer-note {
  margin: 24px 0 0;
  color: #8e879d;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.birthday-message {
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-line;
}

.balloon-area {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.balloon {
  min-height: 92px;
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(145deg, #f4d3e5, #c88eb9);
  color: #29182b;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
  box-shadow: inset -6px -8px 15px #75446b25;
}

.balloon.popped {
  animation: pop 300ms ease forwards;
}

.final-message {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.7;
  color: var(--accent);
  white-space: pre-line;
}

@keyframes pop {
  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

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

.balloon.popped {
  opacity: 1;
  transform: scale(1);
  background: #e8b9d01c;
  border: 1px solid var(--accent);
  color: var(--text);
}

.balloon.revealed {
  border-radius: 16px;
  overflow-wrap: anywhere;
  padding: 8px;
}
