:root {
  --bg: #100e14;
  --bg-soft: #19151f;
  --card: rgba(29, 25, 35, 0.88);
  --card-strong: rgba(34, 29, 41, 0.96);
  --text: #fff9fb;
  --muted: #d3c8ce;
  --muted-2: #a99da5;
  --accent: #ff7fa8;
  --accent-bright: #ff9fbe;
  --accent-soft: #ffc7d9;
  --violet: #9c7cff;
  --line: rgba(255, 255, 255, 0.11);
  --line-accent: rgba(255, 127, 168, 0.25);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --radius: 30px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 9%, rgba(255, 127, 168, 0.13), transparent 32%),
    radial-gradient(circle at 86% 88%, rgba(156, 124, 255, 0.12), transparent 34%),
    linear-gradient(145deg, #100e14, #15111a 54%, #0e0d12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0.7px, transparent 0.7px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

button,
a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

.app-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: calc(18px + var(--safe-top)) calc(16px + var(--safe-right)) calc(76px + var(--safe-bottom)) calc(16px + var(--safe-left));
  display: grid;
  place-items: center;
  isolation: isolate;
}

.bg-orb {
  position: fixed;
  z-index: -1;
  width: 290px;
  height: 290px;
  border-radius: 999px;
  filter: blur(76px);
  pointer-events: none;
  opacity: 0.28;
  animation: orb-float 9s ease-in-out infinite alternate;
}

.orb-a { top: -105px; right: -70px; background: #ff6095; }
.orb-b { bottom: -125px; left: -85px; background: #7656f4; animation-delay: -4s; animation-direction: alternate-reverse; }

.screen {
  position: absolute;
  inset: 0;
  padding: calc(18px + var(--safe-top)) calc(16px + var(--safe-right)) calc(78px + var(--safe-bottom)) calc(16px + var(--safe-left));
  display: grid;
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 22px, 0) scale(0.975);
  filter: blur(5px);
  transition: opacity 0.46s ease, transform 0.56s cubic-bezier(0.22, 1, 0.36, 1), filter 0.42s ease, visibility 0.46s;
}

.screen.active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  filter: none;
}

.card {
  position: relative;
  width: min(100%, 580px);
  padding: clamp(27px, 6vw, 42px) clamp(20px, 6vw, 40px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 42%),
    linear-gradient(180deg, var(--card-strong), var(--card));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  text-align: center;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 12%, rgba(255, 255, 255, 0.08) 38%, transparent 64%);
  transform: translateX(-120%);
  animation: card-sheen 7s ease-in-out infinite 1.6s;
}

.card > * { position: relative; z-index: 1; }

.screen.active .card { animation: card-arrive 0.62s cubic-bezier(0.22, 1, 0.36, 1) both; }
.screen .card > * { opacity: 0; transition: opacity 0.48s ease; }
.screen.active .card > * { opacity: 1; }
.screen.active .card > :nth-child(1) { transition-delay: 0.06s; }
.screen.active .card > :nth-child(2) { transition-delay: 0.12s; }
.screen.active .card > :nth-child(3) { transition-delay: 0.18s; }
.screen.active .card > :nth-child(4) { transition-delay: 0.24s; }
.screen.active .card > :nth-child(5) { transition-delay: 0.3s; }
.screen.active .card > :nth-child(n + 6) { transition-delay: 0.36s; }

.hero-card { padding-top: clamp(20px, 4vw, 30px); }
.proposal-card { padding-block: clamp(34px, 8vw, 50px); }
.success-card { overflow: hidden; }
.final-card { padding-block: clamp(44px, 10vw, 68px); padding-inline: clamp(12px, 4vw, 30px); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h1 { font-size: clamp(35px, 10vw, 54px); }
h2 { font-size: clamp(30px, 8.5vw, 46px); }

.hero-title-wrap {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.hero-title-wrap h1 { max-width: 100%; text-align: center; }

.hero-title-emoji {
  font-size: clamp(31px, 7vw, 41px);
  line-height: 1;
  filter: drop-shadow(0 7px 16px rgba(255, 94, 145, 0.34));
  animation: heartbeat 2.2s ease-in-out infinite;
}

.lead,
.copy,
.soft {
  color: var(--muted);
  text-wrap: pretty;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.memory p,
.status-box,
.ps,
.proposal-name,
.final-message {
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.lead {
  max-width: 470px;
  margin: 21px auto 0;
  font-size: clamp(16px, 3.9vw, 17.5px);
  line-height: 1.62;
}

.lead.compact { max-width: 405px; }

.copy {
  max-width: 478px;
  margin: 24px auto 0;
  font-size: clamp(15.5px, 3.7vw, 17px);
  line-height: 1.64;
}

.copy p { margin: 0 0 18px; }
.copy p:last-child { margin-bottom: 0; }
.copy strong,
.lead strong { color: var(--text); }

.quote {
  padding: 17px 18px;
  border: 1px solid var(--line-accent);
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(255, 127, 168, 0.09), rgba(156, 124, 255, 0.055));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.soft {
  max-width: 440px;
  margin: 22px auto 0;
  font-size: 15.5px;
  line-height: 1.58;
}

.primary,
.secondary {
  position: relative;
  width: 100%;
  min-height: 56px;
  margin-top: 25px;
  padding: 14px 19px;
  overflow: hidden;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary {
  border: 0;
  color: #251019;
  background: linear-gradient(135deg, #ffadd0, #ff749f 62%, #ff8eb4);
  box-shadow: 0 14px 34px rgba(255, 95, 148, 0.24), inset 0 1px rgba(255, 255, 255, 0.42);
}

.primary::before {
  content: "";
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -34%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  transform: skewX(-18deg);
  animation: button-shine 4.8s ease-in-out infinite 1.1s;
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.button-icon {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.primary:active,
.secondary:active { transform: scale(0.985); }

.primary:focus-visible,
.secondary:focus-visible,
.history-button:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid rgba(255, 199, 217, 0.68);
  outline-offset: 3px;
}

@media (hover: hover) {
  .primary:hover { filter: brightness(1.06); transform: translateY(-2px); }
  .secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
  .primary:hover .button-icon { transform: translateX(4px); }
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 25px;
}

.memory {
  min-height: 128px;
  padding: 18px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.023));
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.memory .emoji {
  display: inline-block;
  font-size: 29px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
  animation: emoji-float 3.5s ease-in-out infinite;
}

.memory:nth-child(2) .emoji { animation-delay: -0.8s; }
.memory:nth-child(3) .emoji { animation-delay: -1.7s; }
.memory:nth-child(4) .emoji { animation-delay: -2.4s; }

.memory p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
  text-wrap: pretty;
}

@media (hover: hover) {
  .memory:hover { transform: translateY(-4px); border-color: rgba(255, 127, 168, 0.22); background: rgba(255, 255, 255, 0.06); }
}

.cats { margin: 0 auto 7px; color: #fff3f7; }
.cats svg { display: block; width: 100%; height: auto; overflow: visible; }

.cats-small {
  width: min(220px, 70%);
  margin-bottom: 3px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.25));
  animation: cats-float 4.6s ease-in-out infinite;
}

.cats-artwork .cat-tail { fill: none; stroke-linecap: round; stroke-width: 13; transform-box: fill-box; transform-origin: bottom center; animation: tail-sway 3.2s ease-in-out infinite; }
.cats-artwork .cat-tail-left { stroke: #e8c6b2; }
.cats-artwork .cat-tail-right { stroke: #8f8998; animation-delay: -1.4s; }
.cats-artwork .cat-face-line,
.cats-artwork .cat-leg-line,
.cats-artwork .cat-arm { fill: none; stroke: #4a3941; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cats-artwork .cat-face-line.thin { stroke-width: 1.7; opacity: 0.72; }
.cats-artwork .cat-leg-line { stroke-width: 2; opacity: 0.24; }
.cats-artwork .cat-arm { stroke-width: 11; }
.cats-artwork .cat-arm-left { stroke: #e3c0ad; }
.cats-artwork .cat-arm-right { stroke: #96909d; }
.cats-artwork .cat-left { transform-origin: 98px 108px; animation: cat-nuzzle-left 3.8s ease-in-out infinite; }
.cats-artwork .cat-right { transform-origin: 162px 108px; animation: cat-nuzzle-right 3.8s ease-in-out infinite; }
.cats-artwork .cats-heart { fill: var(--accent); filter: drop-shadow(0 4px 8px rgba(255, 127, 168, 0.42)); transform-origin: 130px 32px; animation: heartbeat 2.1s ease-in-out infinite; }

.cats-large {
  width: 178px;
  margin-bottom: 5px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.2));
  animation: cats-float 4.3s ease-in-out infinite;
}

.proposal-name {
  margin: 0 0 11px;
  color: var(--accent-soft);
  font-size: clamp(23px, 6vw, 29px);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.proposal-title { max-width: 500px; margin-top: 4px; font-size: clamp(40px, 11vw, 61px); }

.choice-row { display: grid; gap: 11px; margin-top: 27px; }
.choice-row .primary,
.choice-row .secondary { margin-top: 0; }
.yes-button { animation: yes-glow 2.8s ease-in-out infinite; }

.answer-note {
  min-height: 18px;
  margin: 14px 0 -4px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.4;
}

.couple {
  margin: 19px 0 0;
  color: var(--text);
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.couple-text {
  background: linear-gradient(90deg, var(--text), var(--accent-soft), var(--text));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-shimmer 5s linear infinite;
}

.couple-heart {
  display: inline-block;
  color: #ff456f;
  -webkit-text-fill-color: initial;
  filter: drop-shadow(0 6px 13px rgba(255, 69, 111, 0.4));
  animation: heartbeat 1.9s ease-in-out infinite;
}

.date { margin: 7px 0 0; color: var(--accent-soft); font-size: 14px; font-weight: 750; }

.status-box {
  max-width: 370px;
  margin: 25px auto 0;
  padding: 17px;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 127, 168, 0.08), rgba(156, 124, 255, 0.055));
}

.status-label { color: var(--muted-2); font-size: 11px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.old-status { color: #aa9da5; text-decoration: line-through; text-decoration-thickness: 2px; }
.status-box strong { color: var(--text); font-size: 23px; }

.ps {
  max-width: 430px;
  margin: 23px auto 0;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: #bdb2b9;
  font-size: 13px;
  line-height: 1.55;
}

.big-heart {
  margin-bottom: 16px;
  font-size: 62px;
  line-height: 1;
  filter: drop-shadow(0 10px 22px rgba(255, 94, 145, 0.32));
  animation: heartbeat 1.8s ease-in-out infinite;
}

.final-message {
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 5vw, 28px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.final-message strong { color: var(--text); font-weight: 850; }

.timer-card { width: min(100%, 680px); }

.timer-main-title {
  color: var(--text);
  font-size: clamp(38px, 10vw, 58px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.timer-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.relationship-timer {
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 127, 168, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.official-timer {
  background:
    radial-gradient(circle at 88% 8%, rgba(156, 124, 255, 0.15), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.timer-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(18px, 4.7vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.timer-heading p {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 13px;
  font-style: italic;
  line-height: 1.35;
}

.flip-clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 15px;
}

.flip-unit { min-width: 0; }

.flip-value {
  position: relative;
  min-height: 58px;
  padding: 8px 3px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text);
  background: linear-gradient(180deg, #302838 0 49%, #211c28 50% 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.06);
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}

.flip-value::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 1px rgba(255, 255, 255, 0.035);
}

.flip-value.is-flipping { animation: flip-tick 0.52s cubic-bezier(0.22, 1, 0.36, 1); }

.flip-label {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: clamp(8px, 2.4vw, 10px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.timer-since {
  display: block;
  margin-top: 12px;
  color: var(--accent-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.timer-back { margin-top: 18px; }
.back-icon { margin: 0 4px 0 0; }

.progress {
  position: fixed;
  z-index: 12;
  bottom: calc(18px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(13, 12, 16, 0.58);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  transition: width 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.dot.active { width: 22px; background: var(--accent); box-shadow: 0 0 14px rgba(255, 127, 168, 0.5); }

.history-button {
  position: fixed;
  z-index: 13;
  left: calc(15px + var(--safe-left));
  bottom: calc(16px + var(--safe-bottom));
  min-height: 37px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(16, 14, 20, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.history-button span { display: inline-block; margin-right: 3px; transition: transform 0.3s ease; }
@media (hover: hover) { .history-button:hover { color: var(--text); background: rgba(32, 27, 39, 0.86); transform: translateY(-2px); } .history-button:hover span { transform: rotate(-32deg); } }

.answer-dialog {
  width: min(calc(100% - 30px), 520px);
  max-height: min(78vh, 650px);
  margin: auto;
  padding: clamp(23px, 6vw, 34px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 27px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(35, 30, 42, 0.98), rgba(20, 18, 25, 0.98));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.62);
}

.answer-dialog::backdrop { background: rgba(7, 6, 9, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.answer-dialog[open] { animation: dialog-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.dialog-head h2 { font-size: clamp(28px, 7vw, 38px); text-align: left; }
.dialog-head .eyebrow { margin-bottom: 8px; text-align: left; }
.dialog-close { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: rgba(255, 255, 255, 0.06); font-size: 27px; line-height: 1; cursor: pointer; }
.dialog-copy { margin: 17px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.answer-history { display: grid; gap: 10px; margin-top: 20px; }
.answer-empty { margin: 0; padding: 20px; border: 1px dashed rgba(255, 255, 255, 0.13); border-radius: 17px; color: var(--muted-2); text-align: center; }
.answer-item { padding: 15px 16px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 255, 255, 0.045); }
.answer-item strong { font-size: 16px; }
.answer-item time { color: var(--muted-2); font-size: 12px; }
.copy-button { margin-top: 18px; }
.copy-button:disabled { opacity: 0.45; cursor: default; }

.save-toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(70px + var(--safe-bottom));
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: var(--text);
  background: rgba(28, 24, 34, 0.94);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.3s ease, visibility 0.25s;
}

.save-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.screen #confetti { position: fixed; inset: 0; z-index: 5; overflow: visible; pointer-events: none; }
.confetti-piece { position: absolute; top: -22px; border-radius: 3px; opacity: 0.94; animation: confetti-fly var(--duration, 3.4s) linear forwards; transform: translate3d(0, 0, 0) rotate(0); }

@keyframes card-arrive { from { transform: translateY(20px) scale(0.985); } to { transform: translateY(0) scale(1); } }
@keyframes content-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-sheen { 0%, 70% { transform: translateX(-120%); } 88%, 100% { transform: translateX(120%); } }
@keyframes button-shine { 0%, 72% { left: -34%; } 90%, 100% { left: 118%; } }
@keyframes orb-float { from { transform: translate3d(-14px, -8px, 0) scale(0.95); } to { transform: translate3d(24px, 22px, 0) scale(1.08); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 18% { transform: scale(1.1); } 34% { transform: scale(1); } }
@keyframes cats-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes tail-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(6deg); } }
@keyframes cat-nuzzle-left { 0%, 100% { transform: rotate(0); } 48%, 58% { transform: rotate(2deg) translateX(1px); } }
@keyframes cat-nuzzle-right { 0%, 100% { transform: rotate(0); } 48%, 58% { transform: rotate(-2deg) translateX(-1px); } }
@keyframes emoji-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes yes-glow { 0%, 100% { box-shadow: 0 14px 34px rgba(255, 95, 148, 0.24); } 50% { box-shadow: 0 16px 44px rgba(255, 95, 148, 0.4); } }
@keyframes text-shimmer { to { background-position: -220% 0; } }
@keyframes flip-tick { 0% { transform: rotateX(0); filter: brightness(1); } 46% { transform: rotateX(-84deg) scale(0.98); filter: brightness(0.78); } 54% { transform: rotateX(76deg) scale(0.98); filter: brightness(1.16); } 100% { transform: rotateX(0); filter: brightness(1); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes confetti-fly { to { transform: translate3d(var(--drift, 0px), calc(110vh + 80px), 0) rotate(760deg); opacity: 0; } }

@media (max-width: 370px) {
  .card { padding: 24px 17px; border-radius: 25px; }
  .hero-card { padding-top: 18px; }
  .cats-small { width: 188px; }
  .hero-title-emoji { font-size: 29px; }
  .memory-grid { grid-template-columns: 1fr; }
  .memory { min-height: 90px; flex-direction: row; gap: 13px; text-align: left; }
  .memory p { margin: 0; }
  .history-button { width: 38px; padding-inline: 0; font-size: 0; }
  .history-button span { margin: 0; font-size: 16px; }
  .relationship-timer { padding: 14px 11px; }
  .flip-clock { gap: 5px; }
  .flip-value { min-height: 51px; border-radius: 11px; }
}

@media (min-width: 700px) {
  .screen {
    padding: calc(16px + var(--safe-top)) calc(22px + var(--safe-right)) calc(76px + var(--safe-bottom)) calc(22px + var(--safe-left));
  }

  .card {
    width: min(100%, 620px);
    max-height: calc(100dvh - 112px);
    padding: 27px 34px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 127, 168, 0.42) transparent;
  }

  h1 { font-size: 46px; }
  h2 { font-size: 40px; }
  .proposal-title { font-size: 52px; }
  .cats-small { width: 190px; }
  .cats-large { width: 148px; margin-bottom: 2px; }
  .memory-grid { gap: 10px; margin-top: 18px; }
  .memory { min-height: 104px; padding: 13px 12px; }
  .memory .emoji { font-size: 27px; }
  .memory p { margin-top: 7px; }
  .soft { margin-top: 16px; }
  .primary,
  .secondary { min-height: 52px; margin-top: 18px; }
  .success-card { padding-block: 22px; }
  .success-card .couple { margin-top: 12px; }
  .success-card .status-box { margin-top: 17px; padding: 13px; }
  .success-card .lead { margin-top: 15px; }
  .success-card .ps { margin-top: 16px; padding-top: 14px; }
  .choice-row { grid-template-columns: 1fr 1fr; }
  .history-button { left: calc(22px + var(--safe-left)); }
  .timer-card { width: min(100%, 760px); }
  .timer-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .relationship-timer { display: flex; flex-direction: column; }
  .flip-clock { margin-top: auto; padding-top: 17px; }
}

@media (min-width: 700px) and (max-height: 820px) {
  .card { padding-block: 20px; }
  h1 { font-size: 41px; }
  h2 { font-size: 35px; }
  .eyebrow { margin-bottom: 8px; }
  .cats-small { width: 160px; }
  .memory-grid { margin-top: 14px; }
  .memory { min-height: 88px; }
  .lead { margin-top: 15px; line-height: 1.5; }
  .copy { margin-top: 17px; line-height: 1.5; }
  .copy p { margin-bottom: 12px; }
  .quote { padding: 13px 15px; }
}

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