@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Pacifico&display=swap');

:root {
  --pink: #f487b6;
  --deep-pink: #d94f8b;
  --soft-pink: #fff0f7;
  --ink: #713c59;
}

html {
  min-width: 320px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  background: #ffd6e8;
  background-image:
    radial-gradient(circle at 15% 20%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 85% 75%, #fff 0 4px, transparent 5px),
    linear-gradient(135deg, #ffd6e8 0%, #fbb8d8 50%, #ffe5f1 100%);
  background-size: 145px 145px, 190px 190px, 100% 100%;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.card {
  position: relative;
  width: min(100%, 430px);
  padding: clamp(46px, 9vw, 52px) clamp(22px, 9vw, 42px) clamp(32px, 8vw, 42px);
  overflow: hidden;
  text-align: center;
  background: rgba(255, 255, 255, .93);
  border: 3px solid #fff;
  border-radius: 30px;
  box-shadow: 0 18px 40px rgba(186, 72, 126, .25);
}

.card::before,
.card::after {
  position: absolute;
  color: #f8acd0;
  content: '♡';
  font-size: 2.5rem;
}

.card::before { top: 20px; left: 23px; }
.card::after { right: 23px; bottom: 15px; }

.bow {
  position: absolute;
  top: 13px;
  left: 50%;
  font-size: 2.2rem;
  transform: translateX(-50%);
}

.mascot {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 13px;
  place-items: center;
  font-size: 2.6rem;
  background: var(--soft-pink);
  border: 2px solid #ffc0dc;
  border-radius: 50%;
}

.mascot img {
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--deep-pink);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--deep-pink);
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.65rem, 7vw, 2.35rem);
  line-height: 1.25;
  font-weight: 400;
}

.intro { margin: 10px 0 28px; font-size: .98rem; }
form { text-align: left; }
.field { margin-bottom: 19px; }
label { display: block; margin-bottom: 7px; font-weight: 800; }

.error-message {
  min-height: 0;
  margin: 6px 2px 0;
  color: var(--deep-pink);
  font-size: .8rem;
  font-weight: 800;
}

input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  color: var(--ink);
  font: inherit;
  background: #fff8fc;
  border: 2px solid #f6bdd7;
  border-radius: 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

input[type="date"] {
  height: 50px;
  appearance: none;
  -webkit-appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
}

input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(244, 135, 182, .2);
}

input.input-error {
  border-color: var(--deep-pink);
  background: #fff0f7;
}

input.input-error:focus {
  box-shadow: 0 0 0 4px rgba(217, 79, 139, .18);
}

small {
  display: block;
  margin: 6px 2px 0;
  color: #a06b87;
  font-size: .78rem;
}

button {
  width: 100%;
  min-height: 50px;
  margin-top: 7px;
  padding: 14px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  background: linear-gradient(135deg, #f58bbb, #d94f8b);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 8px 16px rgba(217, 79, 139, .25);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

button:hover { box-shadow: 0 11px 20px rgba(217, 79, 139, .35); transform: translateY(-2px); }

.back-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--deep-pink);
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

.dashboard-page {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(42px, 8vw, 78px) 22px;
}

.dashboard-header {
  position: relative;
  margin-bottom: clamp(34px, 7vw, 58px);
  text-align: center;
}

.dashboard-bow {
  display: grid;
  width: clamp(74px, 13vw, 96px);
  height: clamp(74px, 13vw, 96px);
  margin-bottom: 13px;
  margin-right: auto;
  margin-left: auto;
  place-items: center;
  background: var(--soft-pink);
  border: 2px solid #ffc0dc;
  border-radius: 50%;
}

.dashboard-bow img {
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.dashboard-header h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  text-shadow: 0 3px 0 rgba(255, 255, 255, .8);
}

.dashboard-intro {
  margin: 16px 0 0;
  font-size: clamp(.95rem, 2vw, 1.1rem);
}


@keyframes love-word {
  from { opacity: .42; }
  to { opacity: 1; }
}

.unlock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 25px);
}

.memory-card {
  position: relative;
  display: flex;
  min-height: 205px;
  padding: 24px 15px 21px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--ink);
  text-align: center;
  background: rgba(255, 255, 255, .9);
  border: 3px solid #fff;
  border-radius: 25px;
  box-shadow: 0 12px 25px rgba(186, 72, 126, .18);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.memory-card::after {
  position: absolute;
  right: 10px;
  bottom: 2px;
  color: #f8c0d9;
  content: '♡';
  font-size: 2rem;
}

.memory-card--unlocked {
  border-color: #f6a5c8;
  background: linear-gradient(145deg, #fff 0%, #fff0f7 100%);
}

.memory-card--unlocked:hover {
  box-shadow: 0 16px 30px rgba(217, 79, 139, .3);
  transform: translateY(-6px);
}

.memory-card--locked {
  color: #ae7f97;
  background: rgba(255, 255, 255, .62);
  border-color: rgba(255, 255, 255, .85);
}

.memory-icon {
  display: grid;
  width: 73px;
  height: 73px;
  margin-bottom: 14px;
  place-items: center;
  font-size: 2.1rem;
  background: var(--soft-pink);
  border: 2px solid #ffc4de;
  border-radius: 50%;
}

.memory-card--locked .memory-icon {
  filter: grayscale(.25);
  opacity: .7;
}

.memory-status {
  margin-bottom: 7px;
  color: var(--deep-pink);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.memory-card--locked .memory-status {
  color: #b995a8;
}

.memory-card strong {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.15rem, 2.3vw, 1.45rem);
  font-weight: 400;
}

@media (max-width: 420px) {
  .card {
    border-radius: 24px;
  }

  .mascot {
    width: 62px;
    height: 62px;
    font-size: 2.2rem;
  }

  .eyebrow {
    font-size: .7rem;
    letter-spacing: .1em;
  }
}


  .unlock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memory-card {
    min-height: 180px;
  }
}

@media (max-width: 390px) {
  .dashboard-page {
    padding-right: 15px;
    padding-left: 15px;
  }

  .unlock-grid {
    gap: 12px;
  }

  .memory-card {
    min-height: 165px;
    padding-right: 10px;
    padding-left: 10px;
    border-radius: 20px;
  }

  .memory-icon {
    width: 60px;
    height: 60px;
    font-size: 1.7rem;
  }
}


@media (max-height: 620px) and (orientation: landscape) {
  .page {
    place-items: start center;
  }

  .card {
    margin: 18px 0;
  }
}