@font-face {
  font-family: "Jost Local";
  src: url("assets/fonts/jost.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Frankfurter Local";
  src: url("assets/fonts/frankfurter.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-1: #211525;
  --bg-2: #3a2144;
  --bg-3: #ff7ebd;
  --card: rgba(255, 239, 249, 0.94);
  --card-dark: #241528;
  --text: #261525;
  --muted: #74576c;
  --rose: #ff5eaa;
  --rose-deep: #cc2f82;
  --lavender: #9f74ff;
  --lilac: #f1dcff;
  --ink: #1b101f;
  --line: rgba(27, 16, 31, 0.16);
  --shadow: 0 28px 0 rgba(27, 16, 31, 0.9), 0 34px 80px rgba(12, 6, 16, 0.46);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Jost Local", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(54, 28, 62, 0.24), rgba(255, 126, 189, 0.2)),
    url("assets/kuromi-pattern.jpg");
  background-size: cover, 760px auto;
  background-position: center, center;
  background-attachment: fixed;
}

button,
a {
  font: inherit;
}

.startup-modal {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(27, 16, 31, 0.68);
  backdrop-filter: blur(10px);
}

.startup-modal.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.startup-box {
  width: min(100%, 390px);
  padding: 26px 22px;
  border: 3px solid var(--ink);
  border-radius: 28px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 10px 10px 0 var(--rose), 0 24px 70px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.startup-box img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 5px 0 rgba(27, 16, 31, 0.24));
}

.startup-box h2 {
  margin: 0 0 20px;
  font-family: "Frankfurter Local", "Jost Local", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.5rem, 7vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
}

.proposal-card {
  position: relative;
  width: min(100%, 560px);
  min-height: 460px;
  padding: clamp(22px, 5vw, 38px);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.proposal-card::before,
.proposal-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.proposal-card::before {
  width: 180px;
  height: 104px;
  right: -30px;
  top: -18px;
  border: 3px solid var(--ink);
  border-radius: 0 0 0 80px;
  background:
    linear-gradient(135deg, transparent 0 44%, var(--rose) 45% 56%, transparent 57%),
    var(--card-dark);
  transform: rotate(8deg);
}

.proposal-card::after {
  width: 82px;
  height: 82px;
  left: -18px;
  bottom: 34px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background:
    linear-gradient(90deg, transparent 0 38%, var(--ink) 39% 43%, transparent 44% 56%, var(--ink) 57% 61%, transparent 62%),
    linear-gradient(var(--lilac), var(--lilac));
  box-shadow: 7px 7px 0 var(--rose);
  transform: rotate(-10deg);
}

.card-glow {
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius) - 10px);
  background:
    linear-gradient(90deg, rgba(27, 16, 31, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(27, 16, 31, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.45;
  pointer-events: none;
}

.card-glow::before {
  position: absolute;
  right: 28px;
  bottom: 26px;
  content: "x_x";
  display: grid;
  width: 54px;
  height: 42px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 18px 18px 14px 14px;
  color: var(--ink);
  background: #fff8fc;
  box-shadow: 5px 5px 0 var(--rose);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0;
  transform: rotate(8deg);
}

.card-header,
.screen,
.kuromi-confetti {
  position: relative;
  z-index: 1;
}

.kuromi-confetti {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
}

.kuromi-confetti-text {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: min(82%, 340px);
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: #fff8fc;
  background: var(--card-dark);
  box-shadow: 6px 6px 0 var(--rose);
  font-size: clamp(0.9rem, 3.8vw, 1.08rem);
  font-weight: 950;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -18px) rotate(-2deg) scale(0.9);
}

.kuromi-confetti.is-active .kuromi-confetti-text {
  animation: confettiText 1.25s cubic-bezier(.2,.85,.2,1) both;
}

.kuromi-confetti.is-final .kuromi-confetti-text {
  font-family: "Frankfurter Local", "Jost Local", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.1rem, 5vw, 1.55rem);
  animation-duration: 1.75s;
}

.kuromi-piece {
  position: absolute;
  top: 6px;
  left: var(--start-x);
  width: var(--size);
  height: var(--size);
  background: url("assets/kuromi-icon.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 0 rgba(27, 16, 31, 0.34));
  opacity: 0;
  transform: translate(-50%, -20px) rotate(var(--rot-start)) scale(0.72);
  animation: kuromiConfetti var(--dur) cubic-bezier(.2,.75,.22,1) forwards;
  animation-delay: var(--delay);
}

.kuromi-rain-piece {
  top: -86px;
  animation-name: kuromiRain;
}

.love-piece {
  position: absolute;
  top: 48%;
  left: 50%;
  z-index: 3;
  color: var(--rose);
  font-size: var(--size);
  font-weight: 950;
  line-height: 1;
  opacity: 0;
  text-shadow:
    2px 2px 0 var(--ink),
    -1px -1px 0 #fff8fc;
  transform: translate(-50%, -50%) rotate(0deg) scale(0.4);
  animation: loveBurst var(--dur) cubic-bezier(.15,.9,.25,1.1) forwards;
  animation-delay: var(--delay);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 42px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff8fc;
  box-shadow: 4px 4px 0 var(--rose);
  transform: rotate(-7deg);
}

.eyebrow {
  margin: 0;
  color: #fff8fc;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card-dark);
  box-shadow: 4px 4px 0 var(--rose);
}

.progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 34px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--lilac);
  font-size: 0.85rem;
  font-weight: 850;
  box-shadow: 3px 3px 0 var(--ink);
}

.screen {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  justify-content: center;
}

.screen.is-changing {
  animation: fadeSlide 360ms ease both;
}

.question {
  max-width: 17ch;
  margin: 0 auto;
  text-align: center;
  font-family: "Frankfurter Local", "Jost Local", ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 5.3vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

.note {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: #fff8fc;
  background: var(--card-dark);
  text-align: center;
  font-size: 0.94rem;
  font-weight: 700;
  box-shadow: 5px 5px 0 var(--rose);
  animation: bubbleIn 260ms ease both;
}

.recipient {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: #fff8fc;
  text-align: center;
  font-size: clamp(0.9rem, 3.4vw, 1rem);
  font-weight: 850;
  box-shadow: 5px 5px 0 var(--rose);
}

.bubble {
  width: fit-content;
  max-width: 100%;
  margin: 20px auto 0;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  color: var(--ink);
  background: var(--lilac);
  box-shadow: 6px 6px 0 var(--ink);
  text-align: center;
  font-size: 0.94rem;
  font-weight: 750;
  animation: bubbleIn 280ms ease both;
}

.answer-area {
  position: relative;
  display: flex;
  min-height: 126px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.answer-area.runaway-zone {
  min-height: 172px;
}

.game-area {
  min-height: 310px;
  margin-top: 24px;
}

.runner-shell {
  width: 100%;
}

.runner-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(0.78rem, 3vw, 0.94rem);
  font-weight: 900;
}

.runner-score,
.runner-tip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff8fc;
  box-shadow: 3px 3px 0 var(--rose);
}

.runner-tip {
  color: #fff8fc;
  background: var(--card-dark);
  text-align: right;
}

.runner-canvas {
  display: block;
  width: 100%;
  height: 190px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--lilac);
  box-shadow: 7px 7px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}

.runner-praise {
  margin: 18px auto 0;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  color: #fff8fc;
  background: var(--card-dark);
  box-shadow: 5px 5px 0 var(--rose);
  text-align: center;
  font-size: clamp(0.9rem, 3.4vw, 1rem);
  font-weight: 900;
  line-height: 1.35;
  animation: bubbleIn 260ms ease both;
}

.runner-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.btn {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 13px 19px;
  color: var(--text);
  background: #fff8fc;
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  touch-action: manipulation;
}

.btn:hover,
.btn:focus-visible {
  transform: translate(-2px, -2px) scale(1.03);
  box-shadow: 8px 8px 0 var(--ink);
}

.btn:focus-visible {
  outline: 3px solid rgba(255, 94, 170, 0.42);
  outline-offset: 3px;
}

.btn-primary {
  min-width: 150px;
  padding: 16px 26px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep) 54%, var(--lavender));
  font-size: 1.04rem;
  font-weight: 850;
}

.btn-main-cta {
  min-width: min(100%, 230px);
  min-height: 60px;
  padding: 18px 32px;
  font-size: 1.13rem;
}

.btn-secondary {
  border: 2px solid var(--ink);
  color: #fff8fc;
  background: var(--card-dark);
  font-size: 0.92rem;
  font-weight: 750;
}

.btn-small {
  min-height: 40px;
  padding: 10px 15px;
  font-size: 0.82rem;
}

.runaway-btn {
  z-index: 2;
  background: #fff8fc;
  color: var(--ink);
}

.runaway-btn.is-running {
  position: absolute;
  transition: left 220ms cubic-bezier(.2,.9,.25,1.25), top 220ms cubic-bezier(.2,.9,.25,1.25), transform 180ms ease;
}

.final-title {
  max-width: 13ch;
  margin: 0 auto 16px;
  text-align: center;
  font-family: "Frankfurter Local", "Jost Local", ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 3.45rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.final-copy {
  max-width: 430px;
  margin: 0 auto;
  color: var(--muted);
  text-align: center;
  font-size: 1rem;
  line-height: 1.7;
}

.final-actions {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.whatsapp-link {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 15px 24px;
  border: 2px solid var(--ink);
  color: #fff8fc;
  background: linear-gradient(135deg, #1fb86c, #11151f);
  box-shadow: 6px 6px 0 var(--ink);
  font-weight: 850;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.whatsapp-link:hover,
.whatsapp-link:focus-visible {
  transform: translate(-2px, -2px) scale(1.03);
  box-shadow: 9px 9px 0 var(--ink);
}

.site-footer {
  max-width: min(100%, 560px);
  padding: 9px 14px;
  border: 2px solid rgba(27, 16, 31, 0.42);
  border-radius: 999px;
  color: #fff8fc;
  background: rgba(36, 21, 40, 0.74);
  box-shadow: 4px 4px 0 rgba(255, 94, 170, 0.62);
  text-align: center;
  font-size: clamp(0.72rem, 3vw, 0.86rem);
  font-weight: 800;
  line-height: 1.35;
  backdrop-filter: blur(10px);
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes kuromiConfetti {
  0% {
    opacity: 0;
    transform: translate(-50%, -28px) rotate(var(--rot-start)) scale(0.58);
  }

  15% {
    opacity: 1;
    transform: translate(calc(-50% + var(--drift-x) * 0.22), 18px) rotate(var(--rot-mid)) scale(1.08);
  }

  74% {
    opacity: 1;
    transform: translate(calc(-50% + var(--drift-x) * 0.82), var(--fall-y)) rotate(var(--rot-end)) scale(0.98);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x)), calc(var(--fall-y) + 44px)) rotate(var(--rot-end)) scale(0.72);
  }
}

@keyframes kuromiRain {
  0% {
    opacity: 0;
    transform: translate(-50%, -40px) rotate(var(--rot-start)) scale(0.66);
  }

  12% {
    opacity: 1;
  }

  78% {
    opacity: 1;
    transform: translate(calc(-50% + var(--drift-x) * 0.72), var(--fall-y)) rotate(var(--rot-end)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--drift-x)), calc(var(--fall-y) + 90px)) rotate(var(--rot-end)) scale(0.82);
  }
}

@keyframes loveBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.35);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(12deg) scale(1.22);
  }

  82% {
    opacity: 1;
    transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) rotate(var(--rot-end)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--burst-x) * 1.12), calc(-50% + var(--burst-y) * 1.12)) rotate(var(--rot-end)) scale(0.6);
  }
}

@keyframes confettiText {
  0% {
    opacity: 0;
    transform: translate(-50%, -18px) rotate(-2deg) scale(0.9);
  }

  18%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(1deg) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -10px) rotate(-1deg) scale(0.96);
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 16px;
  }

  .proposal-card {
    min-height: 520px;
    padding: 22px;
    border-radius: 24px;
  }

  .card-header {
    align-items: flex-start;
    margin-bottom: 30px;
  }

  .brand-mark {
    max-width: calc(100% - 70px);
  }

  .brand-mark img {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .question,
  .final-title {
    max-width: 15ch;
  }

  .answer-area {
    min-height: 148px;
    align-content: center;
  }

  .answer-area.runaway-zone {
    min-height: 210px;
  }

  .game-area {
    min-height: 340px;
  }

  .runner-hud {
    align-items: stretch;
    flex-direction: column;
  }

  .runner-tip {
    text-align: left;
  }

  .runner-canvas {
    height: 170px;
  }

  .btn {
    max-width: 100%;
    white-space: normal;
  }

  .btn-primary,
  .btn-main-cta {
    width: 100%;
  }
}

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