:root {
  --pink: #ff7fa8;
  --pink-deep: #ff4d88;
  --bg1: #ffe3ec;
  --bg2: #ffd1e0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
body {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
  overflow: hidden;
  position: relative;
  padding: 24px;
}

.card {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 28px;
  padding: 40px 28px 36px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(255, 77, 136, 0.25);
  transition: transform 0.3s ease;
}

.card.shake { animation: shake 0.5s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px) rotate(-0.3deg); }
  75% { transform: translateX(2px) rotate(0.3deg); }
}

.emoji {
  font-size: 3rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: bounce 1.6s infinite ease-in-out;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

h1 {
  font-size: 1.4rem;
  color: var(--pink-deep);
  line-height: 1.5;
  margin-bottom: 8px;
}

p.sub {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.buttons {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 16px;
  min-height: 56px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.yes {
  background: var(--pink-deep);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 77, 136, 0.4);
}
.yes:hover { transform: scale(1.06); }

.no {
  background: #f3f3f3;
  color: #999;
  position: relative;
}

.no.fleeing {
  position: fixed;
  /* 이동 시간은 거리에 따라 JS에서 설정한다 */
  transition: top 0.5s ease-in-out, left 0.5s ease-in-out;
}

.result {
  display: none;
  text-align: center;
}

.result.show { display: block; }

.result h2 {
  color: var(--pink-deep);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.result p {
  color: #888;
  font-size: 0.95rem;
}

.floating-heart {
  position: fixed;
  top: 100%;
  font-size: 1.4rem;
  pointer-events: none;
  animation: rise linear forwards;
  z-index: 1;
}
@keyframes rise {
  to { transform: translateY(-110vh) rotate(20deg); opacity: 0; }
}
