:root {
  --pink: #ff3b6e;
  --pink-dark: #d81856;
  --orange: #d97a3d;
  --cream: #fff5f2;
  --text: #3a1f2b;
  --text-soft: #8a6b74;
  --card-bg: rgba(255, 255, 255, 0.6);
  --border-soft: rgba(216, 24, 86, 0.14);
  --shadow-glow: 0 18px 40px -14px rgba(216, 24, 86, 0.45);
  --shadow-soft: 0 12px 32px -14px rgba(90, 40, 50, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f6d9c4 0%, #f9e4dd 35%, #f3d3e0 70%, #e9d3ea 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

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

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.7;
  animation: blobDrift 16s ease-in-out infinite;
}
.blob-1 {
  top: -140px;
  left: -120px;
  width: 420px;
  height: 420px;
  background: #f2c9a0;
}
.blob-2 {
  top: 30%;
  right: -100px;
  width: 380px;
  height: 380px;
  background: #f3c6d8;
  opacity: 0.6;
  animation-delay: -5s;
}
.blob-3 {
  bottom: -140px;
  left: 20%;
  width: 360px;
  height: 360px;
  background: #f6d8c8;
  opacity: 0.5;
  animation-delay: -10s;
}

@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.06); }
  66% { transform: translate(-20px, 25px) scale(0.96); }
}

.aura {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 214, 231, 0.55) 0%, rgba(255, 214, 231, 0) 70%);
  z-index: 0;
  pointer-events: none;
  animation: auraPulse 6s ease-in-out infinite;
}

@keyframes auraPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.petal-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.petal {
  position: absolute;
  top: -40px;
  font-size: 1.1rem;
  opacity: 0.8;
  animation: petalFall linear forwards;
}
@keyframes petalFall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.85; }
  90% { opacity: 0.6; }
  100% { transform: translateY(110vh) translateX(var(--petal-drift, 40px)) rotate(300deg); opacity: 0; }
}

.lang-toggle, .music-toggle {
  position: fixed;
  top: 16px;
  z-index: 20;
  background: #ffffffcc;
  border: 2px solid var(--pink-dark);
  color: var(--pink-dark);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.lang-toggle { right: 16px; }
.music-toggle { left: 16px; font-size: 1rem; padding: 8px 14px; }
.lang-toggle:hover, .music-toggle:hover { transform: translateY(-1px); background: #fff; }
.music-toggle.playing { background: var(--pink-dark); color: #fff; }

/* Ambient sparkles */
.sparkle-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  font-size: 0.9rem;
  color: var(--pink-dark);
  opacity: 0;
  animation: sparkleFade linear forwards;
}
@keyframes sparkleFade {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  15% { opacity: 0.55; transform: translateY(-10px) scale(1); }
  85% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-70px) scale(0.7); }
}

.flourish {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--pink-dark);
  opacity: 0.55;
  margin: 0 0 10px;
  animation: flourishPulse 3.2s ease-in-out infinite;
}

@keyframes flourishPulse {
  0%, 100% { opacity: 0.4; letter-spacing: 0.2em; }
  50% { opacity: 0.75; letter-spacing: 0.28em; }
}

.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 60px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 520px;
  animation: fadeIn 0.4s ease;
}
.screen.active { display: flex; }

@media (min-width: 640px) {
  .screen { max-width: 560px; }
  .title { font-size: 3.2rem; }
  .sub { font-size: 1.05rem; }
}

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

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  margin: 0 0 12px;
}

.title {
  font-family: 'DM Serif Display', ui-serif, Georgia, serif;
  font-weight: 400;
  color: var(--text);
  font-size: 2.4rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.title em {
  font-style: italic;
  color: var(--pink-dark);
  animation: titleGlow 3.2s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 12px rgba(216, 24, 86, 0.15); }
  50% { text-shadow: 0 0 22px rgba(216, 24, 86, 0.4); }
}

.sub {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin: 0 0 28px;
  line-height: 1.55;
}

.button-row {
  position: relative;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 140px;
  margin-bottom: 24px;
}

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  padding: 16px 32px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-yes {
  background: var(--pink-dark);
  color: #fff;
  box-shadow: var(--shadow-glow);
  position: relative;
  z-index: 10;
}
.btn-yes:hover { transform: translateY(-2px) scale(1.03); }
.btn-yes:active { transform: translateY(0) scale(0.98); }

.btn-no {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-soft);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 5;
  backdrop-filter: blur(6px);
  transition: left 0.4s cubic-bezier(.2,.9,.2,1), top 0.4s cubic-bezier(.2,.9,.2,1), transform 0.45s cubic-bezier(.34,1.56,.64,1), background 0.3s ease;
  will-change: transform, left, top, background;
}

.footer-joke {
  font-size: 0.72rem;
  color: var(--text-soft);
  opacity: 0.8;
  line-height: 1.6;
  margin-top: auto;
  padding-top: 16px;
}

/* Heart screen */
.hearts-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  bottom: -40px;
  font-size: 1.4rem;
  animation: floatUp linear forwards;
  opacity: 0.9;
}

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.9; }
  100% {
    transform: translateY(-100vh) translateX(var(--drift, 0px)) rotate(20deg);
    transform: translateY(-100dvh) translateX(var(--drift, 0px)) rotate(20deg);
    opacity: 0;
  }
}

.heart-title {
  margin-top: 220px;
  z-index: 1;
}

.ecg-row {
  font-size: 1.8rem;
  letter-spacing: 4px;
  z-index: 1;
  animation: pulse 0.8s ease-in-out infinite;
}

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

/* Pick screen */
.pick-section {
  width: 100%;
  text-align: left;
  margin-bottom: 22px;
}

.pick-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  margin: 0 0 10px;
}

.day-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.day-scroll::-webkit-scrollbar { display: none; }

.day-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 62px;
  padding: 10px 8px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.day-chip:hover { transform: translateY(-2px); }
.day-chip.active {
  background: var(--pink-dark);
  color: #fff;
  border-color: var(--pink-dark);
  animation: chipActiveGlow 2.4s ease-in-out infinite;
}
.day-chip-dow { font-size: 0.65rem; letter-spacing: 0.08em; opacity: 0.75; }
.day-chip-num { font-family: 'DM Serif Display', serif; font-size: 1.3rem; line-height: 1; }
.day-chip-mon { font-size: 0.65rem; letter-spacing: 0.08em; opacity: 0.75; }

.time-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 480px) {
  .time-grid { grid-template-columns: 1fr 1fr; }
}

.time-chip {
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.time-chip:hover { transform: translateY(-2px); }
.time-chip.active {
  background: var(--pink-dark);
  color: #fff;
  border-color: var(--pink-dark);
  animation: chipActiveGlow 2.4s ease-in-out infinite;
}
.time-chip-time { display: block; font-family: 'DM Serif Display', serif; font-size: 1.3rem; line-height: 1; }
.time-chip-note { display: block; margin-top: 6px; font-size: 0.85rem; opacity: 0.8; }

.custom-time-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px dashed var(--border-soft);
  background: rgba(255, 255, 255, 0.4);
}

.custom-time-label {
  font-size: 0.85rem;
  color: var(--text-soft);
  flex: 1 1 180px;
}

.custom-time-input {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.activity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.activity-chip:hover { transform: translateY(-2px); }
.activity-chip.active {
  background: var(--pink-dark);
  color: #fff;
  border-color: var(--pink-dark);
  animation: chipActiveGlow 2.4s ease-in-out infinite;
}

@keyframes chipActiveGlow {
  0%, 100% { box-shadow: 0 10px 24px -10px rgba(216, 24, 86, 0.45); }
  50% { box-shadow: 0 10px 32px -6px rgba(216, 24, 86, 0.65); }
}

.day-chip, .time-chip, .activity-chip {
  animation-fill-mode: backwards;
}
.day-scroll .day-chip, .time-grid .time-chip, .activity-chips .activity-chip {
  animation: chipPop 0.35s ease backwards;
}
@keyframes chipPop {
  from { opacity: 0; transform: translateY(6px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.day-scroll .day-chip:nth-child(1) { animation-delay: 0.02s; }
.day-scroll .day-chip:nth-child(2) { animation-delay: 0.05s; }
.day-scroll .day-chip:nth-child(3) { animation-delay: 0.08s; }
.day-scroll .day-chip:nth-child(4) { animation-delay: 0.11s; }
.day-scroll .day-chip:nth-child(5) { animation-delay: 0.14s; }
.day-scroll .day-chip:nth-child(6) { animation-delay: 0.17s; }
.day-scroll .day-chip:nth-child(7) { animation-delay: 0.2s; }
.day-scroll .day-chip:nth-child(n+8) { animation-delay: 0.22s; }
.activity-chips .activity-chip:nth-child(1) { animation-delay: 0.02s; }
.activity-chips .activity-chip:nth-child(2) { animation-delay: 0.05s; }
.activity-chips .activity-chip:nth-child(3) { animation-delay: 0.08s; }
.activity-chips .activity-chip:nth-child(4) { animation-delay: 0.11s; }
.activity-chips .activity-chip:nth-child(5) { animation-delay: 0.14s; }
.activity-chips .activity-chip:nth-child(n+6) { animation-delay: 0.17s; }

.lock-btn {
  width: 100%;
  margin-top: 8px;
}
.lock-btn:disabled {
  background: rgba(216, 24, 86, 0.15);
  color: var(--text-soft);
  box-shadow: none;
  cursor: not-allowed;
}
.lock-btn:disabled:hover { transform: none; }

/* Done screen */
.done-summary {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pink-dark);
  margin: 0 0 12px;
}

.change-btn { margin-bottom: 14px; }

.copy-btn { width: 100%; }

.copied-msg {
  font-size: 0.85rem;
  color: #2f9e5c;
  font-weight: 600;
  margin: 14px 0 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.copied-msg.show { opacity: 1; }

@media (max-width: 460px) {
  .phone { padding: 40px 20px 28px; min-height: auto; }
  .title { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .blob, .aura, .flourish, .title em, .day-chip.active, .time-chip.active, .activity-chip.active {
    animation: none !important;
  }
}
