/* Y2K magical-girl look: candy gradients, chrome titles, glossy pill buttons, sparkles. */
:root {
  --ink: #3b1458;
  --pink: #ff5fc8;
  --lilac: #a66bff;
  --aqua: #5fe3ff;
  --card: rgb(255 255 255 / 0.82);
  --grey: #c9c0d3;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgb(255 255 255 / 0.9) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgb(255 255 255 / 0.7) 0 1.5px, transparent 2.5px) 0 0 / 31px 31px,
    linear-gradient(160deg, #ffd1f1 0%, #e3c4ff 45%, #b9f1ff 100%) fixed;
}

main {
  max-width: 30rem;
  margin: 0 auto;
  padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(1.5rem, env(safe-area-inset-bottom));
}

.screen[hidden] { display: none !important; }

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

.chrome {
  font-weight: 900;
  background: linear-gradient(180deg, #ff4fc3 0%, #ff9be0 30%, #b04dff 55%, #f2d6ff 70%, #6a1fe0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgb(90 20 130 / 0.75);
  filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 3px 6px rgb(160 60 220 / 0.45));
}

.sparkles {
  margin: 0;
  text-align: center;
  font-size: 1.6rem;
  letter-spacing: 0.4em;
  color: #fff;
  text-shadow: 0 0 8px var(--pink), 0 0 16px var(--aqua);
  animation: twinkle 2.4s ease-in-out infinite alternate;
}

@keyframes twinkle { to { opacity: 0.45; } }

.btn {
  display: block;
  width: 100%;
  margin: 1rem 0 0;
  padding: 1rem;
  border: 2px solid #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 1px 2px rgb(80 0 100 / 0.5);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.55) 0 45%, transparent 46%),
    linear-gradient(90deg, var(--pink), var(--lilac));
  box-shadow: 0 4px 0 #b13a9c, 0 8px 18px rgb(176 77 255 / 0.4);
  cursor: pointer;
}

.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #b13a9c; }

.btn:disabled {
  color: #fff;
  background: var(--grey);
  box-shadow: none;
  text-shadow: none;
  cursor: not-allowed;
}

/* Title */
#title {
  min-height: calc(100svh - 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
}

#title h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }

.subtitle {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #7a2fff;
}

/* Question */
.progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  font-size: 1.1rem;
}

.bar {
  flex: 1;
  height: 0.9rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.5);
  overflow: hidden;
}

#fill {
  height: 100%;
  background: linear-gradient(90deg, var(--aqua), var(--pink), var(--lilac));
  transition: width 0.3s;
}

#qtext {
  margin: 1.25rem 0 1rem;
  font-size: 1.35rem;
  font-weight: 900;
}

.answers { display: grid; gap: 0.65rem; }

.answer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 2px solid #fff;
  border-radius: 1.1rem;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 3px 10px rgb(166 107 255 / 0.2);
  cursor: pointer;
}

.letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--aqua), var(--lilac));
}

.answer[aria-pressed="true"] {
  border-color: var(--pink);
  background: linear-gradient(135deg, #ffe3f6, #efe0ff);
  box-shadow: 0 0 0 3px rgb(255 95 200 / 0.35), 0 0 18px rgb(255 95 200 / 0.5);
}

.answer[aria-pressed="true"] .letter { background: linear-gradient(135deg, var(--pink), var(--lilac)); }

/* Result card: one phone screen. */
.card {
  min-height: calc(100svh - 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 3px solid #fff;
  border-radius: 1.4rem;
  font-size: 0.9rem;
  line-height: 1.3;
  background: var(--card);
  box-shadow: 0 0 0 2px var(--pink), 0 10px 30px rgb(166 107 255 / 0.35);
}

.card p, .card dl, .card dd { margin: 0; }

/* The picture takes whatever height the text leaves. */
.pic {
  position: relative;
  flex: 1 1 0;
  min-height: 9rem;
}

#rimg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 2px var(--lilac)) drop-shadow(0 4px 10px rgb(166 107 255 / 0.4));
}

.head { text-align: center; }

#rname { font-size: 1.45rem; margin-bottom: 0.2rem; }

.role { font-style: italic; color: #7a2fff; margin-bottom: 0.3rem !important; }

.quote { font-weight: 700; }

.stats { display: grid; gap: 0.3rem; }

.stats dt { display: inline; font-weight: 900; color: #c2188f; }

.stats dd { display: inline; }

.cta {
  padding: 0.55rem 0.7rem;
  border-radius: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--lilac), var(--pink));
}

.cta a { color: #fff; font-weight: 900; text-decoration: underline; }

.share {
  margin: 1rem 0 0;
  text-align: center;
  font-weight: 900;
  font-size: 1.05rem;
}

/* Short phones (iPhone SE): tighter text so the card still fits. */
@media (max-height: 700px) {
  .card { font-size: 0.84rem; gap: 0.45rem; }
  #rname { font-size: 1.3rem; }
}
