:root {
  --bg-1: #FFF5F8;
  --bg-2: #FFE3EF;
  --bg-3: #FFCFE2;
  --ink: #3D1828;
  --ink-soft: #6B3147;
  --ink-mute: #9C6F82;
  --rose: #FF4F8B;
  --rose-deep: #E5326F;
  --rose-soft: #FFB8D2;
  --cream: #FFFAFB;
  --shadow-rose: 0 18px 40px -20px rgba(229, 50, 111, 0.45);
  --shadow-soft: 0 10px 30px -18px rgba(61, 24, 40, 0.35);
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 28px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-1); }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-3), transparent 60%),
    radial-gradient(900px 700px at 100% 100%, #FFE9F2, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  min-height: 100svh;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* diagonal rose grid */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg,  rgba(229, 50, 111, 0.16) 0, rgba(229, 50, 111, 0.16) 1px, transparent 1px, transparent 22px),
    repeating-linear-gradient(-45deg, rgba(229, 50, 111, 0.16) 0, rgba(229, 50, 111, 0.16) 1px, transparent 1px, transparent 22px);
  z-index: 0;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.1  0 0 0 0 0.2  0 0 0 .04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .5;
  mix-blend-mode: multiply;
  z-index: 0;
}

.stage {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: clamp(20px, 6vw, 40px) clamp(18px, 5vw, 28px) 56px;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* SCREEN switching */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  animation: fadeUp .55s cubic-bezier(.22,1,.36,1) both;
}
.screen.is-active { display: flex; }

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

/* CAT */
.cat-wrap {
  position: relative;
  margin: clamp(12px, 4vw, 24px) auto clamp(14px, 3vw, 22px);
  width: clamp(180px, 56vw, 240px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.cat-wrap--small { width: clamp(140px, 42vw, 180px); }
.cat-halo {
  position: absolute; inset: -8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #FFC9DC 0%, #FFB1C9 40%, transparent 70%);
  filter: blur(2px);
  animation: pulse 4.5s ease-in-out infinite;
  z-index: 0;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: .8; }
  50%     { transform: scale(1.06); opacity: 1; }
}
.cat {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: var(--shadow-rose), 0 0 0 1px rgba(255,79,139,.18);
  background: #fff;
}

/* TYPOGRAPHY */
.kicker {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: clamp(20px, 5vw, 24px);
  color: var(--rose-deep);
  letter-spacing: .01em;
  margin: 0 0 4px;
  transform: rotate(-1.5deg);
}
.hero {
  font-family: "Bagel Fat One", "Sniglet", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(96px, 28vw, 140px);
  line-height: .9;
  letter-spacing: -.02em;
  margin: 4px 0 0;
  background: linear-gradient(180deg, var(--rose) 0%, var(--rose-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 30px rgba(229,50,111,.18);
}
.hero__dot { color: var(--ink); -webkit-text-fill-color: var(--ink); }
.lede {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(18px, 5vw, 22px);
  color: var(--ink-soft);
  margin: 6px 0 28px;
  font-weight: 500;
}
.lede em {
  font-family: "Caveat", cursive;
  font-style: normal;
  font-size: 1.45em;
  color: var(--rose-deep);
  font-weight: 700;
  padding: 0 .1em;
}
.title {
  font-family: "Sniglet", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 9vw, 48px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 4px 0 6px;
}

/* CTA */
.cta-row {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 8px auto 18px;
}
.btn {
  flex: 1;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .01em;
  border: none;
  border-radius: 999px;
  padding: 18px 24px;
  min-height: 58px;
  cursor: pointer;
  transition:
    transform .25s cubic-bezier(.22,1,.36,1),
    box-shadow .25s ease,
    background .25s ease,
    color .2s ease,
    opacity .2s ease;
  position: relative;
  isolation: isolate;
}
.btn:active { transform: scale(.97); }

.btn--yes {
  color: white;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  box-shadow: var(--shadow-rose);
}
.btn--yes:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -20px rgba(229,50,111,.55); }

.btn--no {
  color: var(--ink-soft);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1.5px rgba(61,24,40,.12), var(--shadow-soft);
}
.btn--no:hover { color: var(--ink); }

.btn--submit { width: 100%; max-width: 360px; margin-top: 18px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

.footnote {
  font-family: "Caveat", cursive;
  color: var(--ink-mute);
  font-size: 18px;
  margin: 6px 0 0;
}

.link-back {
  background: none; border: none; cursor: pointer;
  color: var(--ink-mute);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 14px;
  margin-top: 10px;
}
.link-back:hover { color: var(--ink); }

/* NE LOOP */
.screen--ne { justify-content: center; min-height: 100%; padding-top: 8vh; }
.ne-counter {
  font-family: "Caveat", cursive;
  color: var(--ink-mute);
  font-size: 22px;
  margin: 0 0 12px;
}
.ne-question {
  font-family: "Sniglet", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 11vw, 60px);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 6px 0 4px;
  max-width: 11ch;
}
.ne-handwriting {
  font-family: "Caveat", cursive;
  color: var(--rose-deep);
  font-size: clamp(26px, 7vw, 32px);
  margin: 6px 0 28px;
  font-weight: 600;
  transform: rotate(-2deg);
}
.cta-row--ne { align-items: center; }

/* the "Ne" button shrinks, "Jo" grows as user keeps refusing */
.btn--yes[data-grow] { transform-origin: center; }

/* TILES */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin: 18px auto 16px;
}
.tile {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,79,139,.15);
  border-radius: var(--r-md);
  padding: 18px 12px 16px;
  cursor: pointer;
  font-family: "Plus Jakarta Sans", sans-serif;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 110px;
  justify-content: center;
}
.tile:hover { transform: translateY(-3px); border-color: var(--rose-soft); box-shadow: 0 18px 36px -22px rgba(229,50,111,.4); }
.tile:active { transform: scale(.97); }
.tile__emoji { font-size: 36px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(229,50,111,.18)); }
.tile__label {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -.005em;
}
.tile__hint {
  font-family: "Caveat", cursive;
  font-size: 16px;
  color: var(--ink-mute);
  margin-top: -2px;
}

/* CUSTOM DISH INPUT */
.custom-row {
  width: 100%;
  max-width: 420px;
  margin: 8px auto 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.custom-label {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--rose-deep);
  margin: 6px 0 0;
  transform: rotate(-1deg);
}
.custom-input-wrap {
  display: flex;
  width: 100%;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,79,139,.2);
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  align-items: center;
  box-shadow: var(--shadow-soft);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.custom-input-wrap:focus-within {
  border-color: var(--rose);
  box-shadow: 0 14px 30px -16px rgba(229,50,111,.35);
}
.custom-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 4px;
  min-width: 0;
}
.custom-input::placeholder {
  color: var(--ink-mute);
  font-weight: 400;
}
.custom-go {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: white;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-rose);
  transition: transform .2s ease;
}
.custom-go:hover { transform: translateY(-1px); }
.custom-go:active { transform: scale(.95); }
.custom-go:disabled { opacity: .35; cursor: not-allowed; transform: none; }

/* CALENDAR */
.cal {
  width: 100%;
  max-width: 360px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,79,139,.15);
  border-radius: var(--r-lg);
  padding: 18px 14px 14px;
  margin: 16px auto 6px;
  box-shadow: var(--shadow-soft);
}
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cal-nav {
  background: rgba(255,79,139,.08);
  border: none;
  color: var(--ink);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 22px; line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}
.cal-nav:hover { background: rgba(255,79,139,.18); }
.cal-month {
  font-family: "Bagel Fat One", "Lilita One", system-ui, sans-serif;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -.01em;
}
.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-family: "Caveat", cursive;
  color: var(--ink-mute);
  font-size: 15px;
  text-align: center;
  padding: 0 2px 6px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  border: none;
  background: transparent;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.cal-day:hover:not(:disabled) { background: rgba(255,79,139,.12); }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--rose-soft); }
.cal-day.is-selected { background: var(--rose); color: white; box-shadow: var(--shadow-rose); transform: scale(1.05); }
.cal-day.is-other { color: var(--ink-mute); opacity: .35; }
.cal-day:disabled { color: var(--ink-mute); opacity: .25; cursor: not-allowed; }

/* TIME */
.time-label {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--rose-deep);
  margin: 18px 0 6px;
  transform: rotate(-1deg);
}
.time-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}
.time-chip {
  border: 1.5px solid rgba(255,79,139,.2);
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  padding: 12px 4px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: all .2s ease;
}
.time-chip:hover { border-color: var(--rose); }
.time-chip.is-selected {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-rose);
  transform: scale(1.05);
}

/* CONFIRM */
.receipt {
  width: 100%;
  max-width: 360px;
  background: white;
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin: 18px auto 10px;
  box-shadow: var(--shadow-rose);
  border: 1.5px dashed var(--rose-soft);
  text-align: left;
}
.receipt__row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,79,139,.2);
  font-size: 15px;
}
.receipt__row:last-child { border-bottom: none; }
.receipt__k {
  font-family: "Caveat", cursive;
  color: var(--ink-mute);
  font-size: 18px;
}
.receipt__v {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}
.hand-note {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: var(--rose-deep);
  margin: 14px 0 0;
  transform: rotate(-1.5deg);
}

/* MOBILE TIGHTENING (iPhone 13 mini focus: 375x812) */
@media (max-width: 400px) {
  .stage { padding-left: 18px; padding-right: 18px; }
  .hero { font-size: clamp(88px, 26vw, 110px); }
  .lede { font-size: 18px; }
  .tile { padding: 14px 10px; min-height: 100px; }
  .tile__emoji { font-size: 30px; }
  .tile__label { font-size: 14px; }
  .cal-day { font-size: 13px; }
  .btn { font-size: 17px; padding: 16px 20px; min-height: 54px; }
}

/* very small (iPhone SE 320) */
@media (max-width: 340px) {
  .tiles { gap: 8px; }
  .hero { font-size: 84px; }
}

/* very tall mode */
@media (min-height: 800px) and (max-width: 400px) {
  .screen--landing { padding-top: 3vh; gap: 2px; }
  .cat-wrap { width: 240px; }
}

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