:root {
  --ink: #2b2228;
  --muted: #6d6269;
  --paper: #fffff7;
  --fluo-jami: #e0ff9c;
  --rouge-sang: #ff2d27;
  --rose-assume: #ffb3ff;
  --bleu-ciel: #c5d9f6;
  --violet-parme: #c8c4fa;
  --rose-flashy: #ee43b9;
  --vert-sapin: #3d9368;
  --rose-50: #ffebff;
  --rose-100: #ffb3ff;
  --rose-300: #ffb3ff;
  --coral: var(--rouge-sang);
  --coral-dark: var(--rose-flashy);
  --yellow: var(--fluo-jami);
  --plum: var(--vert-sapin);
  --mint: #cee3d9;
  --white: #ffffff;
  --border: rgba(43, 34, 40, 0.13);
  --shadow: 0 24px 60px rgba(61, 147, 104, 0.13);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(224, 255, 156, 0.46), transparent 38%),
    linear-gradient(145deg, var(--paper) 0%, #ffebff 55%, #f0f5fc 100%);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

.background-shape {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.5;
}

.shape-one {
  top: 12%;
  right: -190px;
  background: var(--rose-300);
}

.shape-two {
  bottom: -180px;
  left: -140px;
  background: var(--violet-parme);
}

.page-shell {
  width: min(100% - 32px, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.brand {
  display: block;
  width: 150px;
  height: 78px;
  overflow: hidden;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jami-app-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
}

.screen {
  animation: fade-up 0.42s ease both;
}

.screen[hidden] {
  display: none;
}

.start-screen {
  display: flex;
  min-height: calc(100vh - 90px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 0 80px;
  text-align: center;
}

.hero-photo {
  width: 204px;
  height: 204px;
  margin-bottom: 24px;
  border: 6px solid var(--fluo-jami);
  border-radius: 50%;
  background-image: url("./assets/jami-girl-pink-glasses.png");
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 18px 40px rgba(61, 147, 104, 0.2);
}

.eyebrow,
.card-label,
.question-kicker {
  margin: 0 0 10px;
  color: var(--coral-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 18px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(42px, 10vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1 em {
  color: var(--coral);
  font-style: normal;
}

h2 {
  margin-bottom: 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 580px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:focus-visible,
.answer-button:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
.accordion-trigger:focus-visible,
.text-link:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(244, 82, 105, 0.28);
  outline-offset: 3px;
}

.button-primary {
  color: white;
  background: var(--coral);
  box-shadow: 0 12px 28px rgba(244, 82, 105, 0.24);
}

.button-primary:hover:not(:disabled) {
  background: var(--coral-dark);
  box-shadow: 0 16px 30px rgba(244, 82, 105, 0.3);
}

.button-secondary {
  color: var(--plum);
  border: 1px solid var(--border);
  background: white;
}

.button-large {
  min-width: min(100%, 310px);
}

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.answer-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.quiz-screen {
  padding: 44px 0 90px;
}

.share-screen {
  display: grid;
  min-height: calc(100vh - 106px);
  place-items: center;
  padding: 44px 0 90px;
}

.share-card {
  width: min(100%, 560px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 8vw, 54px);
  background:
    radial-gradient(circle at top right, rgba(224, 255, 156, 0.68), transparent 38%),
    rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.share-emoji {
  display: block;
  margin-bottom: 18px;
  font-size: 48px;
}

.share-card h1 {
  margin-bottom: 14px;
  font-size: clamp(40px, 10vw, 64px);
}

.share-card .lead {
  margin-right: auto;
  margin-left: auto;
}

.share-card .text-link {
  margin-top: 14px;
}

.progress-meta {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.icon-button,
.text-button,
.text-link {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.8);
}

.text-button {
  font-size: 12px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 99px;
  background: rgba(93, 38, 77, 0.09);
}

.progress-bar {
  width: 14.28%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rouge-sang), var(--rose-flashy));
  transition: width 0.3s ease;
}

.question-card,
.result-card,
.jami-card,
.email-card,
.community-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.question-card {
  padding: clamp(24px, 7vw, 48px);
}

.question-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  border-radius: 20px;
  background: var(--rose-100);
  font-size: 28px;
  transform: rotate(-3deg);
}

.question-card h2 {
  margin-bottom: 26px;
  font-size: clamp(28px, 7vw, 42px);
}

.answers {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
}

.answer-button {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--ink);
  background: white;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.answer-button:hover {
  border-color: rgba(244, 82, 105, 0.5);
  transform: translateX(2px);
}

.answer-letter {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  color: var(--plum);
  background: var(--rose-50);
  font-size: 13px;
  font-weight: 700;
}

.answer-button[aria-checked="true"] {
  border-color: var(--coral);
  background: var(--rose-50);
}

.answer-button[aria-checked="true"] .answer-letter {
  color: white;
  background: var(--coral);
}

.question-card > .button {
  width: 100%;
}

.result-screen {
  padding: 54px 0 70px;
}

.result-hero {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.score-ring {
  display: grid;
  width: 130px;
  height: 130px;
  place-content: center;
  border: 10px solid var(--rose-100);
  border-top-color: var(--coral);
  border-radius: 50%;
  background: white;
  text-align: center;
  transform: rotate(-4deg);
  box-shadow: 0 18px 36px rgba(93, 38, 77, 0.12);
}

.score-ring strong,
.score-ring span {
  transform: rotate(4deg);
}

.score-ring strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 32px;
}

.score-ring span {
  max-width: 80px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.result-heading h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 9vw, 60px);
}

.result-heading .lead {
  margin-bottom: 0;
}

.result-card,
.jami-card,
.email-card,
.community-card {
  margin-bottom: 18px;
  padding: clamp(22px, 6vw, 34px);
}

.result-card-highlight {
  background: linear-gradient(150deg, #f7ffe6, #fff);
}

.tip-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.tip {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.85);
}

.tip-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--rose-100);
  font-size: 20px;
}

.tip strong,
.tip p {
  display: block;
}

.tip p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.accordion-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.accordion-trigger .card-label {
  display: block;
  margin-bottom: 5px;
}

.accordion-trigger strong {
  font-size: 17px;
}

.accordion-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--coral);
  background: var(--rose-100);
  font-size: 23px;
  transition: transform 0.2s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
}

.corrections {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.corrections[hidden] {
  display: none;
}

.correction {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.correction strong {
  display: block;
  margin-bottom: 5px;
}

.correction p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.correct-answer {
  display: block;
  margin-bottom: 6px;
  color: var(--vert-sapin);
  font-size: 13px;
  font-weight: 700;
}

.jami-card {
  display: grid;
  gap: 18px;
  color: white;
  border-color: transparent;
  background:
    radial-gradient(circle at top right, rgba(224, 255, 156, 0.42), transparent 35%),
    var(--vert-sapin);
}

.jami-card .jami-app-icon {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  font-size: 38px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.15);
}

.jami-card .card-label {
  color: var(--rose-300);
}

.jami-card p:not(.card-label) {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.55;
}

.store-actions {
  display: grid;
  gap: 10px;
}

.email-card {
  display: grid;
  gap: 16px;
  background: linear-gradient(140deg, #f1f0fd, #f0f5fc);
}

.mail-emoji {
  font-size: 34px;
}

.email-card p:not(.card-label),
.community-card p:not(.card-label) {
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.email-row {
  display: grid;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 15px;
  padding: 0 15px;
  color: var(--ink);
  background: white;
}

input::placeholder {
  color: #a7929e;
}

.consent-note,
.form-note,
.form-feedback {
  margin: 8px 0 0;
  font-size: 12px;
}

.consent-note {
  color: var(--ink) !important;
  line-height: 1.45 !important;
}

.form-feedback {
  min-height: 18px;
  color: var(--coral-dark) !important;
  font-weight: 700;
}

.text-link {
  display: block;
  margin: 28px auto 0;
  padding: 8px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer {
  padding: 24px 4px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

footer p {
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .page-shell {
    width: min(100% - 64px, 820px);
    padding-top: 28px;
  }

  .result-hero {
    grid-template-columns: 150px 1fr;
    gap: 32px;
  }

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

  .store-actions {
    grid-template-columns: 1fr 1fr;
  }
}

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

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
