:root {
  color-scheme: light;
  --bg: #ffe0ef;
  --card: #fff5fa;
  --ink: #2b1a23;
  --muted: #6f4b5a;
  --accent: #ff4f9a;
  --accent-2: #ff9acb;
  --border: #f2b7d4;
  --radius: 18px;
  font-family: "Fraunces", "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: calc(clamp(10px, 2.2vh, 16px) + env(safe-area-inset-top)) 12px
    calc(clamp(10px, 2.2vh, 16px) + env(safe-area-inset-bottom));
}

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

.bubble {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 79, 154, 0.12);
  animation: float 12s ease-in-out infinite;
}

.b1 {
  width: 120px;
  height: 120px;
  left: -20px;
  top: 12%;
}

.b2 {
  width: 80px;
  height: 80px;
  right: 10%;
  top: 8%;
  animation-delay: -4s;
}

.b3 {
  width: 140px;
  height: 140px;
  right: -30px;
  bottom: 12%;
  animation-delay: -7s;
}

.b4 {
  width: 60px;
  height: 60px;
  left: 18%;
  bottom: 8%;
  animation-delay: -2s;
}

.shell {
  width: min(420px, 100%);
  background: var(--card);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  padding: clamp(18px, 3vh, 24px) clamp(16px, 3vw, 20px)
    clamp(18px, 3vh, 22px);
  animation: popIn 0.6s ease both;
  position: relative;
  z-index: 1;
}

header {
  display: grid;
  gap: clamp(6px, 1.6vh, 10px);
  margin-bottom: clamp(14px, 2.6vh, 22px);
}

header > * {
  animation: rise 0.55s ease both;
}

header > *:nth-child(1) {
  animation-delay: 0.05s;
}

header > *:nth-child(2) {
  animation-delay: 0.12s;
}

header > *:nth-child(3) {
  animation-delay: 0.2s;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  font-size: clamp(1.5rem, 3.2vh, 2rem);
  line-height: 1.1;
  margin: 0;
}

.details {
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: clamp(0.85rem, 2.2vh, 0.95rem);
  margin: 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: clamp(12px, 2.4vh, 16px);
}

form > * {
  animation: rise 0.55s ease both;
}

form > *:nth-child(1) {
  animation-delay: 0.26s;
}

form > *:nth-child(2) {
  animation-delay: 0.33s;
}

form > *:nth-child(3) {
  animation-delay: 0.4s;
}

form > *:nth-child(4) {
  animation-delay: 0.47s;
}

label {
  display: grid;
  gap: clamp(6px, 1.6vh, 8px);
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: clamp(0.85rem, 2.1vh, 0.9rem);
  font-weight: 600;
}

.name-field {
  position: relative;
}

.name-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  display: none;
  z-index: 2;
}

.name-dropdown.open {
  display: grid;
  gap: 6px;
}

.name-option {
  border: 1px solid transparent;
  background: #fff5fa;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.name-option:hover {
  background: #fff0f7;
  border-color: var(--border);
}

.name-empty {
  padding: 8px 10px;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
}

input,
select {
  font: inherit;
  padding: clamp(10px, 2vh, 12px) 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  -webkit-appearance: none;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff0f7;
  box-shadow: none;
  transform: translateY(-1px);
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: none;
}

.choices {
  display: grid;
  gap: clamp(8px, 1.8vh, 10px);
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(8px, 1.8vh, 10px) 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: clamp(0.88rem, 2.1vh, 0.95rem);
}

.choice input {
  margin: 0;
  accent-color: var(--accent);
}

input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background 0.2s ease,
    transform 0.2s ease;
}

input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.2s ease;
  background: var(--accent);
}

input[type="radio"]:checked {
  border-color: var(--accent);
}

input[type="radio"]:checked::before {
  transform: scale(1);
}

input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 79, 154, 0.2);
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: clamp(12px, 2.2vh, 14px) 16px;
  border-radius: 14px;
  font-size: clamp(0.95rem, 2.2vh, 1rem);
  font-weight: 700;
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

.btn-secondary {
  background: #ffd1e8;
  color: var(--ink);
}

.result {
  margin-top: clamp(10px, 2.2vh, 16px);
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffe7f3;
  border: 1px solid var(--border);
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: clamp(0.82rem, 2vh, 0.92rem);
  display: none;
}

.reveal {
  animation: floatUp 0.6s ease both, pulse 0.6s ease 0.1s;
}

::selection {
  background: #ffb7d9;
  color: var(--ink);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.footer {
  margin-top: clamp(10px, 2.2vh, 18px);
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: clamp(0.72rem, 1.8vh, 0.8rem);
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(43, 26, 35, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(360px, 100%);
  background: var(--card);
  border-radius: 16px;
  border: 2px solid var(--border);
  padding: 18px 16px;
  animation: popIn 0.35s ease both;
}

.modal-title {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.modal-text {
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  font-size: 0.9rem;
  margin: 0;
  color: var(--muted);
}

.modal-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}
