:root {
  --rose-50: #fff7f8;
  --rose-100: #ffecef;
  --rose-200: #ffdce4;
  --rose-300: #ffc7d4;
  --rose-400: #ff98b1;
  --rose-500: #f8658a;
  --rose-600: #e24772;
  --cherry: #c53760;
  --wine: #61243f;
  --cream: #fff9f1;
  --paper: rgba(255, 253, 249, 0.96);
  --paper-strong: rgba(255, 255, 255, 0.98);
  --butter: #ffe7b4;
  --blush: #ffd6e5;
  --sparkle: rgba(255, 255, 255, 0.82);
  --ink: #341f2f;
  --ink-soft: rgba(52, 31, 47, 0.72);
  --line: rgba(106, 35, 66, 0.12);
  --shadow-xl: 0 32px 80px rgba(118, 54, 84, 0.16);
  --shadow-lg: 0 18px 38px rgba(118, 54, 84, 0.14);
  --shadow-md: 0 10px 22px rgba(118, 54, 84, 0.1);
  --shadow-rose: 0 34px 90px rgba(197, 55, 96, 0.18);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Candara", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.96), transparent 20%),
    radial-gradient(circle at 88% 12%, rgba(255, 202, 218, 0.52), transparent 18%),
    radial-gradient(circle at 18% 80%, rgba(255, 232, 196, 0.48), transparent 22%),
    radial-gradient(circle at 78% 74%, rgba(255, 205, 225, 0.34), transparent 20%),
    linear-gradient(180deg, #fff4f8 0%, #ffe6ef 32%, #fff5f8 68%, #fff8f0 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.34) 0 4px, transparent 4px),
    radial-gradient(circle at 60px 60px, rgba(248, 101, 138, 0.07) 0 3px, transparent 3px);
  background-size: 80px 80px;
  opacity: 0.85;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: -8%;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 208, 225, 0.34), transparent 24%),
    radial-gradient(circle at 76% 28%, rgba(255, 255, 255, 0.4), transparent 22%),
    radial-gradient(circle at 60% 78%, rgba(255, 220, 228, 0.28), transparent 20%);
  filter: blur(26px);
  opacity: 0.9;
  pointer-events: none;
  animation: driftGlow 16s ease-in-out infinite alternate;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
}

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

.float-heart {
  position: absolute;
  bottom: -12vh;
  color: rgba(248, 101, 138, 0.4);
  filter: blur(0.2px);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.42);
  animation: floatHeart linear infinite;
}

.romance-app {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 42px;
}

.hero {
  position: relative;
  max-width: 720px;
  margin: 0 auto 18px;
  padding: 8px 4px 2px;
  animation: cardLift 0.75s ease both;
}

.hero::before {
  content: "";
  position: absolute;
  top: -18px;
  right: -36px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.46), rgba(255, 198, 220, 0.22) 52%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

.hero__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hero__eyebrow,
.calendar-toolbar__eyebrow,
.love-popup__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(167, 59, 107, 0.62);
}

.hero__pill {
  margin: 0;
  padding: 9px 12px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 232, 241, 0.84)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 202, 218, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(197, 55, 96, 0.12);
  color: rgba(130, 42, 83, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
  animation: pillGlow 3.6s ease-in-out infinite;
}

.hero h1,
.calendar-toolbar h2,
.love-popup h3 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.98;
  text-shadow: 0 10px 30px rgba(255, 255, 255, 0.42);
}

.hero__copy,
.calendar-helper,
.love-popup__message {
  color: var(--ink-soft);
  line-height: 1.6;
}

.hero__copy {
  max-width: 32ch;
  margin: 10px 0 0;
  font-size: 1rem;
}

.calendar-shell {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 247, 0.94)),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 44px,
      rgba(248, 101, 138, 0.035) 44px,
      rgba(248, 101, 138, 0.035) 45px
    );
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-xl), inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(14px);
  overflow: hidden;
  animation: cardLift 0.85s ease both;
}

.calendar-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.84), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 214, 224, 0.38), transparent 30%);
  pointer-events: none;
}

.calendar-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, transparent 0 38%, rgba(255, 255, 255, 0.34) 46%, transparent 54%);
  transform: translateX(-110%);
  opacity: 0.7;
  pointer-events: none;
  animation: shellSheen 10s linear infinite;
}

.calendar-shell__tape {
  position: absolute;
  top: 16px;
  width: 92px;
  height: 22px;
  background: linear-gradient(180deg, rgba(255, 226, 235, 0.92), rgba(255, 210, 223, 0.82));
  border: 1px solid rgba(197, 55, 96, 0.12);
  transform: rotate(-6deg);
  box-shadow: 0 6px 14px rgba(106, 35, 66, 0.08);
}

.calendar-shell__tape--left {
  left: 32px;
}

.calendar-shell__tape--right {
  right: 32px;
  transform: rotate(7deg);
}

.calendar-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  z-index: 1;
}

.calendar-toolbar__title {
  text-align: center;
}

.calendar-toolbar__eyebrow {
  margin-bottom: 10px;
}

.calendar-toolbar h2 {
  font-size: clamp(2rem, 3vw, 2.85rem);
}

.toolbar-button,
.love-popup__close,
.love-popup__scrim,
.day-cell {
  appearance: none;
  border: 0;
  position: relative;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.toolbar-button,
.love-popup__close,
.day-cell {
  cursor: pointer;
}

.toolbar-button {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #ff7fa4, var(--cherry));
  color: white;
  font-size: 1.15rem;
  box-shadow: 0 16px 30px rgba(197, 55, 96, 0.24);
}

.toolbar-button::before,
.love-popup__close::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 52%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.toolbar-button:hover:not(:disabled),
.love-popup__close:hover {
  transform: translateY(-2px);
}

.toolbar-button:disabled {
  cursor: default;
  opacity: 0.38;
  box-shadow: none;
  transform: none;
}

.toolbar-button:focus-visible,
.love-popup__close:focus-visible,
.day-cell:focus-visible,
.love-popup__scrim:focus-visible {
  outline: 3px solid rgba(226, 71, 114, 0.32);
  outline-offset: 2px;
}

.calendar-helper {
  max-width: 34ch;
  margin: 12px 0 0;
  font-size: 0.98rem;
  color: rgba(98, 36, 62, 0.74);
}

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

.calendar-weekdays span {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(171, 65, 108, 0.56);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.day-cell {
  position: relative;
  min-height: 106px;
  padding: 13px 12px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.96), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 247, 0.9));
  border: 1.5px solid rgba(255, 214, 224, 0.72);
  box-shadow: 0 14px 28px rgba(197, 55, 96, 0.08);
  text-align: left;
  overflow: hidden;
  animation: dayEnter 0.42s ease both;
}

.day-cell:hover:not(:disabled) {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.52) inset;
}

.day-cell--empty {
  visibility: hidden;
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.day-cell__number {
  position: relative;
  z-index: 1;
  font-size: 1.06rem;
  font-weight: 900;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);
}

.day-cell--today {
  border-color: rgba(226, 71, 114, 0.52);
  box-shadow: 0 16px 30px rgba(226, 71, 114, 0.12);
}

.day-cell--today::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 16px;
  border: 1px dashed rgba(226, 71, 114, 0.24);
  pointer-events: none;
}

.day-cell--featured {
  transform: translateY(-2px);
  border-color: rgba(226, 71, 114, 0.58);
  box-shadow: 0 18px 36px rgba(226, 71, 114, 0.18);
}

.day-cell--denied {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(180deg, rgba(255, 233, 239, 0.98), rgba(255, 215, 226, 0.94));
  border-color: rgba(197, 55, 96, 0.38);
  box-shadow: 0 18px 34px rgba(197, 55, 96, 0.16);
  animation: busyPulse 0.45s ease;
}

.day-cell--denied::after {
  content: "\2665";
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 1rem;
  line-height: 1;
  color: rgba(197, 55, 96, 0.34);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.day-cell--locked {
  cursor: default;
  background: linear-gradient(180deg, rgba(255, 246, 236, 0.98), rgba(255, 234, 219, 0.92));
  border-color: rgba(221, 157, 113, 0.34);
  box-shadow: none;
}

.day-cell--locked .day-cell__number {
  color: rgba(154, 90, 54, 0.78);
}

.day-cell--locked:hover,
.day-cell--past:hover {
  transform: none;
  box-shadow: none;
}

.day-cell--past {
  cursor: default;
  opacity: 0.48;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(244, 236, 239, 0.78));
  box-shadow: none;
}

.day-cell--past .day-cell__number {
  color: rgba(106, 35, 66, 0.58);
}

.love-popup[hidden] {
  display: none;
}

.love-popup {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.love-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.love-popup__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(52, 21, 38, 0.34);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.love-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 24px 22px 20px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.88), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 239, 246, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 60px rgba(68, 29, 49, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(12px);
  animation: modalLift 0.24s ease both;
}

.love-popup__dialog::before,
.love-popup__dialog::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.love-popup__dialog::before {
  right: -42px;
  bottom: -52px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 191, 214, 0.42), transparent 68%);
  filter: blur(8px);
}

.love-popup__dialog::after {
  top: -24px;
  left: 18px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.36), transparent 72%);
}

.love-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(118, 54, 84, 0.1);
}

.love-popup__label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(197, 55, 96, 0.08);
}

.love-popup h3 {
  max-width: 14ch;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 0.96;
}

.love-popup__date {
  margin: 10px 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: rgba(160, 60, 102, 0.78);
}

.love-popup__message {
  margin: 10px 0 0;
  font-size: 0.98rem;
  max-width: 31ch;
}

.burst-heart {
  position: fixed;
  z-index: 12;
  pointer-events: none;
  color: var(--rose-600);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.42));
  animation: burstHeart 0.9s ease forwards;
}

@keyframes floatHeart {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(18px, -122vh, 0) rotate(180deg);
  }
}

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

@keyframes driftGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(14px, -10px, 0) scale(1.04);
  }
}

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

@keyframes pillGlow {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 14px 28px rgba(197, 55, 96, 0.12);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(197, 55, 96, 0.16);
  }
}

@keyframes busyPulse {
  0% {
    transform: scale(0.98);
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes shellSheen {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(130%);
  }
}

@keyframes modalLift {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes burstHeart {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--burst-x), var(--burst-y), 0) scale(1.2);
  }
}

@media (max-width: 760px) {
  .romance-app {
    padding: 20px 14px 32px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.15rem, 10vw, 3.3rem);
  }

  .hero::before {
    right: -10px;
    width: 120px;
    height: 120px;
  }

  .calendar-shell {
    padding: 20px 14px 16px;
    border-radius: 28px;
  }

  .calendar-shell__tape {
    top: 12px;
    width: 66px;
  }

  .calendar-shell__tape--left {
    left: 18px;
  }

  .calendar-shell__tape--right {
    right: 18px;
  }

  .calendar-toolbar {
    gap: 8px;
  }

  .calendar-toolbar h2 {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
  }

  .toolbar-button {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 7px;
  }

  .calendar-weekdays span {
    font-size: 0.62rem;
  }

  .day-cell {
    min-height: 82px;
    padding: 10px 9px;
    border-radius: 18px;
  }

  .day-cell__number {
    font-size: 0.92rem;
  }

  .love-popup {
    padding: 14px;
  }

  .particle-canvas {
    opacity: 0.7;
  }

  .love-popup__dialog {
    width: min(540px, calc(100vw - 20px));
    padding: 22px 18px 18px;
    border-radius: 26px;
  }

  .love-popup h3 {
    max-width: 100%;
    font-size: clamp(1.8rem, 8vw, 2.3rem);
  }
}

@media (max-width: 430px) {
  .romance-app {
    max-width: 420px;
    padding: 14px 10px 24px;
  }

  .hero {
    margin-bottom: 12px;
  }

  .hero__topline {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 9vw, 2.25rem);
    line-height: 1.02;
  }

  .hero::before {
    width: 92px;
    height: 92px;
    top: -8px;
    right: -4px;
  }

  .hero__copy {
    font-size: 0.92rem;
  }

  .calendar-shell {
    padding: 14px 8px 12px;
    border-radius: 22px;
  }

  .calendar-shell__tape {
    width: 52px;
    height: 16px;
  }

  .calendar-toolbar__eyebrow {
    margin-bottom: 6px;
    font-size: 0.62rem;
  }

  .calendar-helper {
    max-width: none;
    font-size: 0.82rem;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 5px;
  }

  .calendar-weekdays span {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }

  .day-cell {
    min-height: 64px;
    padding: 8px 7px;
    border-radius: 15px;
  }

  .day-cell__number {
    font-size: 0.82rem;
  }

  .love-popup {
    align-items: end;
    padding: 10px;
  }

  .particle-canvas {
    opacity: 0.58;
  }

  .love-popup__dialog {
    width: 100%;
    max-height: 84vh;
    padding: 20px 14px 16px;
    border-radius: 24px 24px 18px 18px;
  }

  .love-popup__close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .love-popup__date,
  .love-popup__message {
    font-size: 0.9rem;
  }
}

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