:root {
  --bg-1: #fff4f7;
  --bg-2: #ffd8e5;
  --bg-3: #f6b7cb;
  --card: rgba(255, 255, 255, 0.82);
  --text: #8f4863;
  --text-strong: #72324b;
  --primary: #f57fb0;
  --primary-dark: #e45b97;
  --secondary: #ffd5e5;
  --border: rgba(229, 146, 180, 0.25);
  --shadow: 0 24px 60px rgba(212, 104, 149, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 30%),
    radial-gradient(circle at top right, rgba(248, 168, 198, 0.6), transparent 25%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
  overflow: hidden;
}

.petals,
.petals::before,
.petals::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.petals {
  background-image:
    radial-gradient(circle at 12% 20%, rgba(231, 99, 145, 0.18) 0 0.18rem, transparent 0.22rem),
    radial-gradient(circle at 78% 18%, rgba(211, 88, 135, 0.16) 0 0.18rem, transparent 0.22rem),
    radial-gradient(circle at 18% 70%, rgba(244, 149, 185, 0.18) 0 0.24rem, transparent 0.28rem),
    radial-gradient(circle at 84% 78%, rgba(216, 94, 138, 0.16) 0 0.2rem, transparent 0.24rem);
  animation: floatPetals 10s linear infinite alternate;
}

.petals::before,
.petals::after {
  content: "";
  background-repeat: repeat;
  opacity: 0.4;
}

.petals::before {
  background-image:
    radial-gradient(circle, rgba(242, 140, 181, 0.4) 0 0.18rem, transparent 0.19rem);
  background-size: 8rem 8rem;
  animation: drift 18s linear infinite;
}

.petals::after {
  background-image:
    radial-gradient(circle, rgba(216, 84, 137, 0.22) 0 0.14rem, transparent 0.15rem);
  background-size: 11rem 11rem;
  animation: driftReverse 24s linear infinite;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
}

.card {
  width: min(100%, 520px);
  min-height: 800px;
  padding: 34px 26px;
  border-radius: 32px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 20%),
    radial-gradient(circle at top, rgba(255, 214, 230, 0.65), transparent 45%);
  pointer-events: none;
}

.step {
  position: absolute;
  inset: 34px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.step-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#step-ask {
  justify-content: center;
}

.eyebrow {
  margin: 6px 0 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cd6e98;
}

h1,
h2,
.celebration,
.summary-title {
  font-family: Georgia, "Times New Roman", serif;
}

h1,
h2 {
  margin: 0;
  color: var(--text-strong);
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 4rem);
}

.hero-title {
  max-width: 10ch;
  text-align: center;
  margin-inline: auto;
}

h2 {
  font-size: clamp(2rem, 7vw, 3.1rem);
}

.subtitle,
.summary-note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 28ch;
}

.actions {
  width: 100%;
  min-height: 84px;
  margin-top: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.btn,
.food-option,
input {
  font: inherit;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.food-option:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(228, 91, 151, 0.3);
}

.btn-secondary {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(227, 149, 180, 0.35);
  box-shadow: 0 10px 24px rgba(222, 169, 191, 0.18);
}

.btn-full {
  width: 100%;
  margin-top: auto;
}

.share-btn {
  margin: 4px auto 0;
  min-width: 210px;
  position: relative;
  isolation: isolate;
  animation: shareGlow 1.8s ease-in-out infinite;
}

.share-btn::before,
.share-btn::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  z-index: -1;
}

.share-btn::before {
  background: radial-gradient(circle, rgba(245, 127, 176, 0.38), rgba(245, 127, 176, 0.08) 60%, transparent 75%);
  filter: blur(6px);
  animation: sharePulse 1.8s ease-out infinite;
}

.share-btn::after {
  border: 2px solid rgba(245, 127, 176, 0.45);
  animation: shareRing 1.8s ease-out infinite;
}

#yes-btn {
  min-width: 118px;
}

.screen-runner {
  position: fixed;
  z-index: 20;
}

.screen-runner.hidden {
  opacity: 0;
  pointer-events: none;
}

.field-group {
  width: 100%;
  text-align: left;
}

.hidden {
  display: none;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-strong);
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-strong);
  outline: none;
}

input:focus {
  border-color: rgba(245, 127, 176, 0.6);
  box-shadow: 0 0 0 4px rgba(245, 127, 176, 0.12);
}

.calendar-card {
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(229, 146, 180, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: padding 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.calendar-card.compact {
  padding: 8px;
}

.calendar-card.compact .calendar-weekdays {
  margin-bottom: 2px;
  font-size: 0.58rem;
}

.calendar-card.compact .calendar-weekdays,
.calendar-card.compact .calendar-grid {
  gap: 3px;
}

.calendar-card.compact .calendar-day,
.calendar-card.compact .calendar-empty {
  aspect-ratio: 1 / 0.7;
}

.calendar-card.compact .calendar-day {
  border-radius: 8px;
  font-size: 0.72rem;
  padding: 0;
}

.calendar-card.compact .calendar-header {
  margin-bottom: 6px;
}

.calendar-card.compact .calendar-header strong {
  font-size: 0.9rem;
}

.calendar-card.compact .calendar-nav {
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
}

.time-picker {
  animation: fadeUp 0.25s ease;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-strong);
}

.calendar-header strong {
  font-size: 1.05rem;
}

.calendar-nav {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(245, 127, 176, 0.14);
  color: var(--text-strong);
  font-size: 1.4rem;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekdays {
  margin-bottom: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #bf6c92;
}

.calendar-weekdays span {
  text-align: center;
}

.calendar-day,
.calendar-empty {
  aspect-ratio: 1 / 1;
}

.calendar-day {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-strong);
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.calendar-day:hover,
.calendar-day.selected {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 12px 24px rgba(228, 91, 151, 0.22);
}

.calendar-day.today {
  outline: 2px solid rgba(245, 127, 176, 0.35);
}

.time-grid,
.food-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.time-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.time-option,
.food-option {
  border: 1px solid rgba(229, 146, 180, 0.28);
  border-radius: 22px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text-strong);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(221, 166, 190, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.time-option {
  border-radius: 16px;
  padding: 10px 4px;
  font-size: 0.8rem;
}

.food-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.time-option:hover,
.time-option.selected,
.food-option:hover,
.food-option.selected {
  border-color: rgba(245, 127, 176, 0.55);
  box-shadow: 0 14px 30px rgba(228, 91, 151, 0.2);
}

.celebration {
  font-size: clamp(1.35rem, 4.8vw, 1.9rem);
  margin: 12px 0 2px;
  color: #c85c8b;
}

.summary-box {
  width: 100%;
  padding: 22px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(229, 146, 180, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.summary-box p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-strong);
  font-size: 1.08rem;
}

.summary-title {
  margin: 2px 0 0;
  font-size: clamp(2rem, 7vw, 2.8rem);
  color: var(--text-strong);
}

.summary-note {
  font-size: 0.95rem;
  opacity: 0.92;
}

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

@keyframes shareGlow {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(222, 169, 191, 0.18), 0 0 0 rgba(245, 127, 176, 0.24);
  }
  50% {
    box-shadow: 0 12px 30px rgba(228, 91, 151, 0.24), 0 0 24px rgba(245, 127, 176, 0.28);
  }
}

@keyframes sharePulse {
  0% {
    opacity: 0.9;
    transform: scale(0.96);
  }
  70% {
    opacity: 0.2;
    transform: scale(1.12);
  }
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

@keyframes shareRing {
  0% {
    opacity: 0.7;
    transform: scale(0.98);
  }
  80% {
    opacity: 0.15;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes floatPetals {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-12px);
  }
}

@keyframes drift {
  from {
    transform: translateY(-6%) translateX(0);
  }
  to {
    transform: translateY(6%) translateX(2%);
  }
}

@keyframes driftReverse {
  from {
    transform: translateY(4%) translateX(0);
  }
  to {
    transform: translateY(-4%) translateX(-2%);
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 16px;
  }

  .card {
    min-height: 820px;
    padding: 26px 20px;
    border-radius: 28px;
  }

  .step {
    inset: 26px 20px;
  }

  .actions {
    min-height: 84px;
  }

  #yes-btn {
    min-width: 108px;
  }

  .calendar-card {
    padding: 12px;
  }

  .time-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .time-option {
    padding: 9px 3px;
    font-size: 0.74rem;
  }
}
