:root {
  --bg-top: #fff4dd;
  --bg-bottom: #ffd7b8;
  --card: rgba(255, 251, 245, 0.82);
  --card-border: rgba(255, 255, 255, 0.6);
  --text-main: #4d2f1d;
  --text-soft: #7d5943;
  --accent: #f28749;
  --accent-deep: #d86128;
  --accent-yes: #ff9a5a;
  --accent-no: #ffd7bd;
  --shadow: 0 24px 80px rgba(118, 58, 18, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.8), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  overflow-x: hidden;
}

.background {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.55;
  animation: drift 10s ease-in-out infinite;
}

.blob-one {
  top: 8%;
  left: -4%;
  width: 240px;
  height: 240px;
  background: rgba(255, 170, 109, 0.55);
}

.blob-two {
  right: -8%;
  bottom: 12%;
  width: 300px;
  height: 300px;
  background: rgba(255, 211, 150, 0.8);
  animation-delay: -4s;
}

.sparkles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 30%, rgba(255, 255, 255, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 80%, rgba(255, 255, 255, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 30% 75%, rgba(255, 255, 255, 0.5) 0 2px, transparent 3px);
  animation: twinkle 7s linear infinite;
}

.app-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.card {
  position: relative;
  width: min(100%, 720px);
  display: grid;
  gap: 20px;
  backdrop-filter: blur(14px);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 52px 32px 32px;
  animation: card-in 500ms ease;
}

.hidden {
  display: none;
}

.cat-rail {
  position: absolute;
  top: -115px;
  left: 26px;
  right: 26px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  pointer-events: none;
}

.cat {
  filter: drop-shadow(0 8px 16px rgba(118, 58, 18, 0.10));
}

.cat-image {
  width: 126px;
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0;
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
}

.intro,
.question-subtext,
#resultBody {
  margin: 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.7;
}

.details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--accent-deep);
  font-weight: 700;
}

.name-block {
  display: grid;
  gap: 10px;
}

.name-label {
  font-weight: 700;
  color: var(--text-main);
}

.name-input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(221, 173, 141, 0.8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-main);
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.name-input:focus {
  border-color: rgba(242, 135, 73, 0.9);
  box-shadow: 0 0 0 4px rgba(242, 135, 73, 0.16);
}

.name-note,
.saved-note,
.no-zone-note,
.question-kicker {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.start-button,
.answer-button {
  border: 0;
  border-radius: 18px;
  padding: 16px 22px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.start-button {
  justify-self: start;
  background: linear-gradient(135deg, var(--accent), #ffb06f);
  color: white;
  box-shadow: 0 16px 30px rgba(242, 135, 73, 0.34);
}

.start-button.secondary {
  background: linear-gradient(135deg, #ffcb9c, #ff9f76);
}

.start-button:hover,
.answer-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.progress-wrap {
  display: grid;
  gap: 10px;
}

.progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb06f, #f28749);
  transition: width 220ms ease;
}

.answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 18px;
  align-items: stretch;
}

.answer-button {
  min-height: 64px;
}

.answer-button.yes {
  min-height: 136px;
  background: linear-gradient(135deg, var(--accent-yes), #ffb97f);
  color: white;
}

.no-zone {
  position: relative;
  min-height: 136px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 245, 236, 0.82);
  border: 1px dashed rgba(242, 135, 73, 0.28);
  overflow: hidden;
}

.answer-button.no {
  position: absolute;
  top: 60px;
  left: 18px;
  width: calc(100% - 36px);
  background: linear-gradient(135deg, var(--accent-no), #ffe6d6);
  color: #8a5736;
  z-index: 2;
}

.summary-box {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-soft);
}

.summary-box strong {
  color: var(--text-main);
}

@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -16px, 0);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .card {
    padding: 46px 24px 24px;
    border-radius: 26px;
  }

  .cat-rail {
    top: -93px;
    left: 14px;
    right: 14px;
  }

  .cat-image {
    width: 96px;
  }

  .answer-row {
    grid-template-columns: 1fr;
  }

  .no-zone {
    min-height: 148px;
  }

  .answer-button.no {
    left: 14px;
    width: calc(100% - 28px);
  }

  .start-button,
  .answer-button {
    width: 100%;
  }
}
