:root {
  --bg: #100b0b;
  --orange: #f15a2f;
  --orange-2: #ff7648;
  --card: rgba(48, 18, 15, 0.88);
  --card-border: rgba(255, 122, 82, 0.25);
  --white: #fff5ef;
  --muted: rgba(255, 245, 239, 0.74);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-lg: 24px;
  --radius-md: 16px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
}

body {
  min-height: 100svh;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100vw;
  height: 100svh;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
}

.phone {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 214, 186, 0.12), transparent 26%),
    radial-gradient(circle at 12% 90%, rgba(72, 24, 19, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(255, 108, 55, 0.99), rgba(232, 67, 29, 0.99)),
    var(--orange);
}

.dynamic-island {
  display: none;
}

.heart-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-heart {
  position: absolute;
  bottom: -42px;
  font-size: var(--size, 23px);
  left: var(--left, 50%);
  filter: drop-shadow(0 9px 9px rgba(0, 0, 0, 0.18));
  opacity: 0;
  animation: floatHeart var(--duration, 9s) linear var(--delay, 0s) infinite;
}

@keyframes floatHeart {
  0% {
    transform: translate3d(0, 30px, 0) scale(0.65) rotate(-8deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  50% {
    transform: translate3d(var(--drift, 30px), -47vh, 0) scale(1) rotate(10deg);
  }
  92% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(calc(var(--drift, 30px) * -0.3), -96vh, 0) scale(1.18) rotate(-8deg);
    opacity: 0;
  }
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 4vh, 34px);
  padding: clamp(18px, 4vw, 42px);
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  visibility: hidden;
  transition: opacity 0.34s ease, transform 0.34s ease, visibility 0.34s ease;
}

.screen.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.emoji-big {
  position: relative;
  z-index: 2;
  font-size: clamp(78px, 16vw, 132px);
  line-height: 1;
  margin: 0;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.17));
  animation: breathe 2.7s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.055);
  }
}

.mascot {
  position: relative;
  z-index: 2;
  font-size: clamp(74px, 14vw, 120px);
  line-height: 1;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.18));
}

.question-card {
  position: relative;
  z-index: 4;
  width: min(100%, 420px);
  padding: clamp(24px, 5vw, 34px);
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(12px);
}

.question-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 24px;
  height: 24px;
  background: inherit;
  border-left: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 5px 0 0 0;
}

.form-card::before,
.final-card::before {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 210, 196, 0.82);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1,
h2 {
  margin: 0;
  color: var(--white);
  font-weight: 1000;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.16);
}

h1 {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.55rem, 5.6vw, 2.22rem);
  line-height: 1.1;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.microcopy {
  min-height: 20px;
  margin: 16px 0 0;
  color: rgba(255, 245, 239, 0.72);
  font-size: 0.91rem;
  font-weight: 800;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  font-weight: 1000;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 12px 0 rgba(99, 31, 22, 0.34),
    0 24px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.17s ease, filter 0.17s ease, opacity 0.17s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(2px);
  box-shadow:
    0 7px 0 rgba(99, 31, 22, 0.34),
    0 16px 24px rgba(0, 0, 0, 0.15);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-wide {
  width: 100%;
  margin-top: 24px;
}

.btn-secondary {
  background: linear-gradient(180deg, #f35d35, #dc4424);
}

.dodge-btn {
  position: relative;
  z-index: 30;
}

.dodge-btn.is-running {
  position: absolute;
}

.field {
  display: block;
  margin-top: 18px;
  text-align: left;
}

.field span {
  display: block;
  margin: 0 0 8px 2px;
  color: var(--muted);
  font-weight: 900;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 999px;
  outline: 0;
  border: 1px solid rgba(255, 118, 72, 0.56);
  background: rgba(29, 12, 11, 0.58);
  color: var(--white);
  font-weight: 900;
  text-align: center;
  color-scheme: dark;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.option {
  min-height: 86px;
  border: 1px solid rgba(255, 118, 72, 0.34);
  border-radius: var(--radius-md);
  background: rgba(49, 18, 16, 0.75);
  color: var(--white);
  font-weight: 1000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition: transform 0.17s ease, border 0.17s ease, background 0.17s ease;
}

.option:hover,
.option.is-selected {
  transform: translateY(-2px);
  border-color: rgba(255, 245, 239, 0.9);
  background: rgba(255, 94, 49, 0.45);
}

.option span {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
}

.summary {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(19, 7, 6, 0.26);
  text-align: left;
}

.summary p {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  color: var(--white);
}

.summary strong {
  font-weight: 1000;
}

.shake {
  animation: shake 0.28s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@media (min-width: 760px) {
  .question-card {
    width: min(92vw, 460px);
  }

  .screen {
    gap: 36px;
  }

  .emoji-big,
  .mascot {
    font-size: 120px;
  }
}

@media (max-width: 420px) {
  body {
    overflow: hidden;
  }

  .screen {
    justify-content: center;
    gap: 18px;
    padding: 20px 18px;
  }

  .emoji-big,
  .mascot {
    font-size: 82px;
  }

  .question-card {
    width: 100%;
    padding: 24px 18px 22px;
  }

  h1 {
    font-size: 1.62rem;
  }

  h2 {
    font-size: 1.48rem;
  }

  .btn {
    min-height: 50px;
    padding: 0 24px;
    font-size: 1rem;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .option {
    min-height: 78px;
  }
}

@media (max-height: 690px) {
  .screen {
    gap: 14px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .emoji-big,
  .mascot {
    font-size: 68px;
  }

  .question-card {
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .field {
    margin-top: 12px;
  }

  .option-grid {
    gap: 9px;
    margin-top: 14px;
  }

  .option {
    min-height: 70px;
  }

  .btn-wide {
    margin-top: 16px;
  }
}
