/* ── Elise's 75 Medium · clean & cute stationery theme ─────────────
   Paper   #FFFAF6   warm white
   Ink     #43302E   soft cocoa
   Blossom #F27A9B   pink accent
   Petal   #FCE4EB   pale pink wash
   Matcha  #7FB285   done green
   Cream   #FFF3E4   card trim
──────────────────────────────────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --paper: #FFFAF6;
  --ink: #43302E;
  --ink-soft: #8A7370;
  --blossom: #F27A9B;
  --petal: #FCE4EB;
  --matcha: #7FB285;
  --cream: #FFF3E4;
  --card: #FFFFFF;
  --radius: 22px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Nunito', -apple-system, sans-serif;
  background: var(--paper);
  background-image: radial-gradient(#F6E3DA 1px, transparent 1.2px);
  background-size: 26px 26px;
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
}

.hidden { display: none !important; }

h1, h2, .day-pill, .polaroid-caption, button {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
}

/* ── layout ── */
main {
  max-width: 460px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px 40px;
}

header { text-align: center; padding: 10px 0 18px; }
header h1 { font-size: 30px; font-weight: 700; letter-spacing: 0.2px; }

.day-pill {
  display: inline-block;
  margin-top: 8px;
  background: var(--blossom);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 4px 16px 5px;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(226, 94, 132, 0.55);
}

.card {
  background: var(--card);
  border: 2px solid var(--cream);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(120, 80, 70, 0.07);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 22px; font-weight: 600; }
.day-date { color: var(--ink-soft); font-size: 14px; font-weight: 600; }

.back-today {
  background: var(--petal);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  margin: -6px 0 12px;
  cursor: pointer;
}

/* ── checklist ── */
.checks { list-style: none; }
.checks > li + li { border-top: 1.5px dashed #F3E4DC; }

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.check .box {
  flex: none;
  width: 28px;
  height: 28px;
  border: 2.5px solid #E8CFC5;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.check .box::after {
  content: '✓';
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  transform: scale(0);
  transition: transform 0.18s cubic-bezier(0.34, 1.8, 0.64, 1);
}
.check.on .box { background: var(--matcha); border-color: var(--matcha); }
.check.on .box::after { transform: scale(1); }
.check.on .txt { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: rgba(127, 178, 133, 0.7); text-decoration-thickness: 2px; }

.check .emoji { font-size: 20px; flex: none; }
.check .txt { font-size: 17px; font-weight: 600; line-height: 1.25; }

.check.sub { padding: 0 4px 12px 44px; }
.check.sub .box { width: 22px; height: 22px; border-radius: 8px; }
.check.sub .box::after { font-size: 13px; }
.check.sub .txt { font-size: 14px; color: var(--ink-soft); }
.check.sub.on .box { background: var(--blossom); border-color: var(--blossom); }

/* pop animation on tick */
@keyframes pop { 40% { transform: scale(1.18); } }
.check.pop .box { animation: pop 0.28s ease; }

/* ── polaroid photo ── */
.polaroid {
  margin: 18px auto 4px;
  width: min(240px, 80%);
  background: #fff;
  border: 1.5px solid #F0E2DA;
  border-radius: 6px;
  padding: 10px 10px 8px;
  box-shadow: 0 8px 20px rgba(120, 80, 70, 0.12);
  transform: rotate(-1.6deg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.polaroid-inner {
  aspect-ratio: 1;
  background: var(--petal);
  border-radius: 3px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.polaroid-inner img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  color: #C98BA0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px;
}
.photo-cam { font-size: 34px; }
.polaroid-caption {
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
  padding-top: 7px;
}

.done-banner {
  margin-top: 16px;
  background: var(--petal);
  border-radius: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  padding: 12px;
  animation: bloom-in 0.4s cubic-bezier(0.34, 1.6, 0.64, 1);
}
@keyframes bloom-in { from { transform: scale(0.85); opacity: 0; } }

/* ── journey grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 7px;
}
.cell {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #F6EAE3;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  color: #C9B2A8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: none;
  padding: 0;
}
.cell.future { opacity: 0.45; cursor: default; }
.cell.part { background: #FBD9C9; color: #B07D62; }
.cell.bloom { background: var(--petal); font-size: 16px; }
.cell.today { box-shadow: 0 0 0 2.5px var(--blossom); }

.legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 600;
}
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; }
.lg-bloom { background: var(--petal); }
.lg-part { background: #FBD9C9; }
.lg-today { background: #F6EAE3; box-shadow: 0 0 0 2px var(--blossom); width: 13px; height: 13px; }

footer {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}

/* ── gate / start screens ── */
.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate-card {
  background: var(--card);
  border: 2px solid var(--cream);
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(120, 80, 70, 0.1);
  padding: 34px 28px;
  width: min(340px, 100%);
  text-align: center;
}
.gate-flower { font-size: 44px; margin-bottom: 10px; }
.gate-card h1 { font-size: 30px; line-height: 1.1; margin-bottom: 10px; }
.gate-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 18px; line-height: 1.45; }
.gate-card input {
  width: 100%;
  border: 2px solid var(--cream);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  margin-bottom: 12px;
  outline-color: var(--blossom);
}
.gate-card button {
  width: 100%;
  border: none;
  background: var(--blossom);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(226, 94, 132, 0.55);
}
.gate-card button:active { transform: translateY(2px); box-shadow: none; }
.gate-err { color: #D65D7A; font-size: 14px; margin: 10px 0 0; min-height: 18px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
