*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Quicksand", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #ffe9f0, #fdf5ff 40%, #e5f9ff 80%);
  color: #4b3d54;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 64px;
}

.header {
  text-align: center;
  margin-bottom: 24px;
}

.header-tagline {
  margin: 0 0 18px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ba8bb8;
}

.header-title {
  margin: 0 0 10px;
  font-family: "Pacifico", cursive;
  font-size: 2.1rem;
  color: #ff6f91;
  text-shadow: 0 2px 8px rgba(255, 111, 145, 0.25);
}

.header-subtitle,
.header-note {
  margin: 24px 0;
  font-size: 0.95rem;
  color: #6d5c7a;
}

.highlight {
  color: #ff8fab;
  font-weight: 600;
}

.calendar-section {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 16px 14px 20px;
  box-shadow:
    0 18px 45px rgba(157, 110, 160, 0.2),
    0 2px 6px rgba(255, 255, 255, 0.6) inset;
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.calendar-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #7a6a87;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot-open {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  box-shadow: 0 0 0 2px rgba(255, 154, 158, 0.25);
}

.legend-dot-locked {
  background: linear-gradient(135deg, #d1c4e9, #f3e5f5);
  box-shadow: 0 0 0 1px rgba(148, 121, 172, 0.35);
}

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

@media (max-width: 720px) {
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .page {
    padding-inline: 10px;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .header-title {
    font-size: 1.8rem;
  }

  .header-subtitle,
  .header-note {
    font-size: 0.85rem;
  }
}

.gift-card {
  position: relative;
  padding: 14px 12px 64px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffe2f0, #fff8fb);
  box-shadow:
    0 10px 26px rgba(244, 143, 177, 0.26),
    0 2px 3px rgba(255, 255, 255, 0.8) inset;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
  overflow: hidden;
  min-height: 150px;
}

.gift-card:focus-visible {
  outline: 3px solid #ff9a9e;
  outline-offset: 2px;
}

.gift-card-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.gift-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.gift-day-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #ff6f91;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gift-title {
  margin: 0;
  font-weight: 600;
  color: #5e4b66;
  font-size: 0.92rem;
}

.gift-date {
  margin: 0;
  font-size: 0.75rem;
  color: #9481a5;
}

.gift-anniversary-label {
  margin: 6px 0;
  padding: 6px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff9a9e, #fecfef, #ffe082);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  color: #5a3244;
  font-family: "Pacifico", cursive;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 12px rgba(244, 143, 177, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gift-status {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  font-size: 0.78rem;
}

.gift-status-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.gift-status-pill-open {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  color: #5a3244;
}

.gift-status-pill-locked {
  background: linear-gradient(135deg, #d1c4e9, #ede7f6);
  color: #4b3d54;
}

.gift-status-text {
  color: #8c7aa1;
  text-align: center;
}

.gift-icon {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 0%, #ffe082, #ff8a80 55%, #ff80ab);
  color: #fff;
  box-shadow:
    0 8px 18px rgba(244, 143, 177, 0.65),
    0 0 0 4px rgba(255, 255, 255, 0.7);
}

.gift-icon span {
  font-size: 1.25rem;
}

.gift-card.locked {
  cursor: default;
  opacity: 0.6;
  box-shadow:
    0 6px 16px rgba(161, 136, 179, 0.28),
    0 2px 3px rgba(255, 255, 255, 0.85) inset;
}

.gift-card.locked .gift-icon {
  background: radial-gradient(circle at 20% 0%, #c5cae9, #b39ddb 55%, #ce93d8);
  box-shadow:
    0 6px 16px rgba(144, 115, 167, 0.7),
    0 0 0 4px rgba(253, 253, 255, 0.9);
}

.gift-card.locked .gift-icon span {
  font-size: 1.1rem;
}

.gift-card.openable:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 32px rgba(244, 143, 177, 0.45),
    0 3px 4px rgba(255, 255, 255, 0.9) inset;
}

.gift-card.opened {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 18px 36px rgba(244, 143, 177, 0.65),
    0 3px 4px rgba(255, 255, 255, 0.95) inset;
  background: linear-gradient(145deg, #fff0f5, #fffde7);
}

.gift-card.opened .gift-icon {
  background: radial-gradient(circle at 10% 0%, #fff59d, #ffb74d 50%, #ff8a80);
}

.gift-countdown {
  font-size: 0.7rem;
  color: #aa8cbe;
  margin-top: 2px;
}

.gift-card.revealed {
  padding-bottom: 14px;
}

.gift-card-image-wrapper {
  width: 100%;
  margin: 8px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(244, 143, 177, 0.3);
}

.gift-card-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
}

.gift-card-message {
  margin: 8px 0 0;
  padding: 8px 4px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6a4f75;
  text-align: center;
  font-style: italic;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.visible {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.35), rgba(95, 74, 116, 0.7));
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: calc(100% - 32px);
  background: linear-gradient(160deg, #fff8fb, #fffefc);
  border-radius: 24px;
  box-shadow:
    0 26px 60px rgba(74, 20, 140, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  padding: 18px 16px 20px;
}

.modal-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  padding: 4px 6px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #a188a6;
}

.modal-title {
  margin: 4px 0 0;
  font-family: "Pacifico", cursive;
  font-size: 1.5rem;
  text-align: center;
  color: #ff6f91;
}

.modal-date {
  margin: 2px 0 8px;
  text-align: center;
  font-size: 0.8rem;
  color: #9e7fba;
}

.modal-image-wrapper {
  margin: 4px auto 8px;
  width: 100%;
  max-width: 320px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 14px 40px rgba(244, 143, 177, 0.65),
    0 0 0 6px rgba(255, 255, 255, 0.9);
}

.modal-image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
}

.modal-message {
  margin: 2px 4px 0;
  font-size: 0.95rem;
  text-align: center;
  color: #6a4f75;
}

.welcome-modal-content {
  max-width: 450px;
}

.welcome-gif-wrapper {
  margin: 12px auto 20px;
  width: 100%;
  max-width: 250px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(244, 143, 177, 0.5);
}

.welcome-gif {
  display: block;
  width: 100%;
  height: auto;
}

.welcome-message {
  margin: 8px 0 20px;
  padding: 0 8px;
  text-align: center;
  color: #6a4f75;
  line-height: 1.6;
}

.welcome-message p {
  margin: 12px 0;
  font-size: 0.95rem;
}

.welcome-close-btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  color: #5a3244;
  font-family: "Quicksand", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(244, 143, 177, 0.4);
}

.welcome-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(244, 143, 177, 0.5);
}

.welcome-close-btn:active {
  transform: translateY(0);
}

.password-modal-content {
  max-width: 380px;
}

.password-gif-wrapper {
  margin: 8px auto 16px;
  width: 100%;
  max-width: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(244, 143, 177, 0.4);
}

.password-gif {
  display: block;
  width: 100%;
  height: auto;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.password-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(255, 154, 158, 0.4);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  font-family: "Quicksand", sans-serif;
  font-size: 1rem;
  color: #5e4b66;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(244, 143, 177, 0.15);
}

.password-input:focus {
  border-color: #ff9a9e;
  box-shadow: 0 4px 16px rgba(244, 143, 177, 0.3);
  background: #fff;
}

.password-input::placeholder {
  color: #ba8bb8;
}

.password-submit {
  padding: 14px 24px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  color: #5a3244;
  font-family: "Quicksand", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(244, 143, 177, 0.4);
}

.password-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(244, 143, 177, 0.5);
}

.password-submit:active {
  transform: translateY(0);
}

.password-error {
  margin: 8px 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: #ff6f91;
  min-height: 20px;
}


