:root {
  --page: #fbf7ee;
  --page-2: #f1e5d0;
  --paper: #fffaf0;
  --paper-warm: #f3e4c7;
  --ink: #22170f;
  --ink-soft: #6f5b49;
  --red: #c9231c;
  --red-deep: #76150f;
  --blue: #0d6fb3;
  --blue-deep: #063d5b;
  --teal: #075067;
  --gold: #c98534;
  --line: rgba(77, 45, 25, 0.18);
  --line-strong: rgba(77, 45, 25, 0.34);
  --shadow: 0 24px 74px rgba(71, 42, 22, 0.18);
  --shadow-strong: 0 34px 100px rgba(71, 42, 22, 0.26);
  --radius: 8px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

@font-face {
  font-family: "Moldie";
  src: url("assets/fonts/moldie.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("assets/fonts/switzer.woff2") format("woff2");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  scroll-behavior: smooth;
}

html.is-embed-page,
html.is-embed-page body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(201, 35, 28, 0.1), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(13, 111, 179, 0.1), transparent 28rem),
    linear-gradient(180deg, #fffaf1 0%, #f3e5d0 100%);
  font-family: Switzer, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.38;
  background:
    linear-gradient(rgba(109, 71, 39, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 71, 39, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000, transparent 86%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background:
    radial-gradient(circle at 18% 28%, rgba(112, 74, 43, 0.28) 0 1px, transparent 1px),
    radial-gradient(circle at 68% 78%, rgba(112, 74, 43, 0.2) 0 1px, transparent 1px);
  background-size: 21px 23px, 31px 37px;
}

body.is-embed {
  min-height: 100%;
  background: var(--page);
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(13, 111, 179, 0.72);
  outline-offset: 4px;
}

.quiz-shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 0 38px;
}

.is-embed .quiz-shell {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 176px;
  max-width: 54vw;
  filter: drop-shadow(1px 1px 0 #ffffff) drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.22));
}

.nav-actions,
.hero-actions,
.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-current {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-current::after {
  position: absolute;
  right: 0;
  bottom: -11px;
  left: 0;
  height: 3px;
  content: "";
  background: var(--blue);
  border-radius: 999px;
}

.primary-button,
.ghost-button,
.link-button,
.tiny-button,
.site-link,
.signup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    opacity 180ms var(--ease),
    box-shadow 180ms var(--ease);
  transform: translateZ(0);
}

.primary-button {
  min-height: 52px;
  padding: 0 26px;
  color: #fffaf0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    linear-gradient(180deg, #0d6f87, var(--blue-deep));
  border-color: rgba(6, 61, 91, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 34px rgba(6, 61, 91, 0.22);
  font-weight: 950;
}

.ghost-button {
  min-height: 42px;
  padding: 0 17px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(6, 61, 91, 0.18);
  box-shadow: 0 8px 20px rgba(71, 42, 22, 0.08);
  font-weight: 900;
}

.link-button,
.site-link {
  min-height: 34px;
  padding: 0;
  color: var(--blue-deep);
  background: transparent;
  border: 0;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.tiny-button {
  min-height: 38px;
  padding: 0 13px;
  color: var(--blue-deep);
  background: #fffdf6;
  border-color: rgba(6, 61, 91, 0.18);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.primary-button:hover:not(:disabled):not(.is-disabled),
.ghost-button:hover:not(:disabled),
.tiny-button:hover,
.site-link:hover,
.signup-link:hover {
  transform: translateY(-2px);
}

.primary-button:active:not(:disabled):not(.is-disabled),
.ghost-button:active:not(:disabled),
.tiny-button:active,
.site-link:active,
.signup-link:active {
  transform: translateY(0) scale(0.985);
}

.primary-button:disabled,
.ghost-button:disabled,
.primary-button.is-disabled {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.primary-button:disabled,
.primary-button.is-disabled {
  color: #fffdf8;
  background: linear-gradient(180deg, #96b7be, #6f9aa5);
  border-color: rgba(6, 61, 91, 0.2);
}

.ghost-button:disabled {
  color: #4f6a76;
  background: #fffdf8;
  border-color: rgba(6, 61, 91, 0.22);
}

.stage {
  position: relative;
  padding-top: 18px;
}

.is-embed .stage {
  height: 100dvh;
  padding-top: 0;
}

.screen {
  animation: screen-in 260ms var(--ease) both;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.998);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero,
.question-screen,
.result-screen {
  position: relative;
  overflow: hidden;
  min-height: calc(100dvh - 92px);
  border: 1px solid rgba(112, 74, 43, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255, 250, 240, 0.96), rgba(255, 250, 240, 0.96)),
    radial-gradient(circle at 20% 10%, rgba(201, 35, 28, 0.1), transparent 26rem),
    radial-gradient(circle at 88% 16%, rgba(13, 111, 179, 0.1), transparent 26rem),
    repeating-linear-gradient(90deg, rgba(112, 74, 43, 0.045), rgba(112, 74, 43, 0.045) 1px, transparent 1px, transparent 10px);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::before,
.question-screen::before,
.result-screen::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.9), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.72), transparent 24rem);
  mix-blend-mode: soft-light;
}

.is-embed .hero,
.is-embed .question-screen,
.is-embed .result-screen {
  height: 100dvh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
  gap: 42px;
  align-items: center;
  padding: 42px;
}

.hero-poster {
  position: relative;
  width: min(440px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(112, 74, 43, 0.2);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  transform: rotate(-1.2deg);
}

.hero-poster::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 32%, rgba(112, 74, 43, 0.08));
  border-radius: inherit;
  mix-blend-mode: soft-light;
}

.hero-poster img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: inherit;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  min-width: 0;
}

.eyebrow,
.question-number,
.result-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-title-art {
  display: block;
  width: min(560px, 100%);
  margin-top: 20px;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.22));
}

.hero-copy h1,
.question-title,
.result-title {
  margin: 0;
  font-family: Moldie, Georgia, serif;
  letter-spacing: 0;
  line-height: 0.88;
  text-wrap: balance;
}

.hero-copy h1 {
  max-width: 620px;
  margin-top: 18px;
  color: var(--red);
  font-size: 68px;
  text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(34, 23, 15, 0.22);
}

.dek {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.28;
  text-wrap: pretty;
}

.dek span {
  display: block;
}

.hero-actions {
  align-items: center;
  margin-top: 30px;
}

.hero-start {
  min-width: 250px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  color: var(--red-deep);
  background: #fff;
  border: 1px solid rgba(201, 35, 28, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(71, 42, 22, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.site-link {
  margin-top: 18px;
}

.signup-nudge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(560px, 100%);
  margin-top: 18px;
  padding: 14px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 231, 0.88)),
    repeating-linear-gradient(-8deg, rgba(201, 35, 28, 0.08) 0 1px, transparent 1px 9px);
  border: 1px solid rgba(118, 21, 15, 0.2);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 34px rgba(71, 42, 22, 0.12);
}

.signup-nudge strong,
.signup-nudge span {
  display: block;
}

.signup-nudge strong {
  color: var(--red-deep);
  font-size: 17px;
  font-weight: 950;
}

.signup-nudge span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.34;
  text-wrap: pretty;
}

.signup-link {
  min-height: 42px;
  padding: 0 14px;
  color: #fffaf0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    var(--red-deep);
  border-color: rgba(118, 21, 15, 0.32);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(118, 21, 15, 0.18);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.question-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 30px;
}

.step-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 0 22px;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--blue-deep);
  background: #fffdf8;
  border: 1px solid rgba(6, 61, 91, 0.2);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 6px 16px rgba(71, 42, 22, 0.08);
}

.step-dot.is-complete {
  color: #fff;
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.step-dot.is-active {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.question-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  padding: 28px;
  color: var(--ink);
  background: rgba(255, 252, 246, 0.86);
  border: 1px solid rgba(112, 74, 43, 0.18);
  border-radius: 12px;
  box-shadow: 0 18px 54px rgba(71, 42, 22, 0.14);
  backdrop-filter: blur(8px);
}

.is-embed .question-screen {
  padding: 18px;
}

.is-embed .question-shell {
  height: calc(100dvh - 92px);
}

.question-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
  gap: 26px;
  min-height: 0;
}

.question-copy {
  min-width: 0;
}

.question-number {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 34px;
  text-transform: none;
}

.question-title {
  color: var(--red);
  font-size: 50px;
  text-shadow: 2px 2px 0 #fff, 3px 3px 0 rgba(34, 23, 15, 0.18);
}

.question-help {
  min-height: 28px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.42;
}

.question-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 22px 0 0;
  border: 1px solid rgba(6, 61, 91, 0.16);
  border-radius: var(--radius);
  background: var(--paper-warm);
  box-shadow: 0 14px 34px rgba(71, 42, 22, 0.13);
}

.question-image img,
.result-image img,
.option-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.question-layout > div:last-child {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
}

.choice-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(6, 61, 91, 0.14);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 10px 24px rgba(71, 42, 22, 0.08);
  transition:
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease),
    transform 180ms var(--ease);
}

.choice-rule.is-ready {
  border-color: rgba(13, 111, 179, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 12px 28px rgba(6, 61, 91, 0.1);
}

.choice-rule.is-pulsing {
  transform: translateY(-1px);
  border-color: rgba(201, 35, 28, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 0 0 3px rgba(201, 35, 28, 0.1),
    0 14px 30px rgba(118, 21, 15, 0.12);
}

.choice-rule strong,
.choice-rule span {
  display: block;
}

.choice-rule strong {
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 950;
}

.choice-rule [data-role="choice-message"] {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.choice-meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.meter-pip {
  width: 9px;
  height: 9px;
  background: rgba(6, 61, 91, 0.16);
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(71, 42, 22, 0.18);
}

.meter-pip.is-filled {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(201, 35, 28, 0.12);
}

.options-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 2px 2px;
  scrollbar-color: rgba(6, 61, 91, 0.38) transparent;
  scrollbar-width: thin;
}

.is-embed .options-scroll {
  scrollbar-width: none;
}

.is-embed .options-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.options-grid.image-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-card {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 70px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 240, 0.92)),
    #fffdf8;
  border: 2px solid rgba(6, 61, 91, 0.12);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 20px rgba(71, 42, 22, 0.08);
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.option-card:hover {
  border-color: rgba(6, 61, 91, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 28px rgba(71, 42, 22, 0.13);
  transform: translateY(-2px);
}

.option-card:active {
  transform: translateY(0) scale(0.985);
}

.option-card.is-selected {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 229, 0.94)),
    #fff7e8;
  border-color: rgba(13, 111, 179, 0.74);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.74),
    inset 5px 0 0 var(--blue),
    0 15px 34px rgba(6, 61, 91, 0.18);
}

.option-card.is-selected::after {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  content: "✓";
  color: #fffaf0;
  background: var(--blue-deep);
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  font-weight: 950;
}

.image-grid .option-card {
  overflow: hidden;
  min-height: 148px;
  padding: 0;
  grid-template-rows: 98px auto;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
}

.image-grid .option-label {
  min-height: 50px;
  padding: 10px;
  background: #fffdf8;
}

.image-grid .is-selected .option-label {
  background: rgba(255, 253, 248, 0.94);
}

.letter {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: #fffaf0;
  background: var(--red);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.28);
}

.option-card.is-selected .letter {
  background: var(--blue-deep);
}

.footer-row {
  display: grid;
  grid-template-columns: 140px minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.footer-row .primary-button {
  width: 100%;
}

.footer-row .ghost-button {
  color: var(--blue-deep);
  background: #fffdf8;
  border-color: rgba(6, 61, 91, 0.16);
}

.footer-row .ghost-button:disabled {
  color: #4f6a76;
  border-color: rgba(6, 61, 91, 0.22);
}

.progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: rgba(6, 61, 91, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(71, 42, 22, 0.12);
}

.progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--red));
  border-radius: inherit;
  transition: width 420ms var(--ease);
}

.result-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.54fr);
  gap: 22px 30px;
  align-content: start;
  align-items: start;
  padding: 34px 38px 26px;
}

.is-embed .result-screen {
  gap: 14px 26px;
  padding: 24px 36px 18px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.is-embed .result-screen::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.result-paper {
  position: relative;
  z-index: 1;
  min-height: 265px;
  padding: 30px 34px;
  color: var(--ink);
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid rgba(112, 74, 43, 0.18);
  border-radius: 12px;
  box-shadow: 0 18px 54px rgba(71, 42, 22, 0.14);
  transform: rotate(-0.7deg);
}

.is-embed .result-paper {
  min-height: 0;
  padding: 24px 30px;
}

.result-kicker {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 17px;
  text-transform: none;
}

.result-title {
  color: var(--red);
  font-size: 58px;
  text-shadow: 2px 2px 0 #fff, 3px 3px 0 rgba(34, 23, 15, 0.18);
}

.result-copy {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(34, 23, 15, 0.86);
  font-size: 18px;
  line-height: 1.44;
  text-wrap: pretty;
}

.is-embed .result-copy {
  margin-top: 18px;
}

.score-note {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.4;
}

.result-visual {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(318px, 100%);
}

.is-embed .result-visual {
  width: min(280px, 100%);
}

.result-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin: 0;
  background: var(--paper-warm);
  border: 9px solid #fff3d9;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(71, 42, 22, 0.24);
  transform: rotate(2.6deg);
}

.result-image::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 34%, rgba(112, 74, 43, 0.08));
  mix-blend-mode: soft-light;
}

.type-stamp {
  position: absolute;
  right: -8px;
  bottom: -8px;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: var(--red-deep);
  background: #fff3d9;
  border: 2px dashed rgba(118, 21, 15, 0.52);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(71, 42, 22, 0.2);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(10deg);
}

.result-body {
  z-index: 3;
  grid-column: 1 / -1;
}

.share-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.76fr) minmax(0, 1.24fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 252, 246, 0.92);
  border: 1px solid rgba(112, 74, 43, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(71, 42, 22, 0.16);
  backdrop-filter: blur(8px);
}

.is-embed .share-panel {
  padding: 14px;
}

.share-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red-deep);
  font-size: 20px;
  font-weight: 950;
}

.share-copy span {
  display: block;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.35;
}

.share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.share-panel .share-primary {
  color: #fffaf0;
  background: var(--blue-deep);
  border-color: rgba(6, 61, 91, 0.34);
  box-shadow: 0 10px 22px rgba(6, 61, 91, 0.16);
}

.share-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
}

.result-actions {
  margin-top: 16px;
}

.is-embed .result-actions {
  margin-top: 10px;
}

.is-embed .result-actions .primary-button {
  min-height: 46px;
}

.result-signup {
  width: 100%;
  margin-top: 14px;
}

.is-embed .result-signup {
  margin-top: 10px;
  padding: 12px;
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  display: grid;
  justify-items: end;
  max-width: min(390px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  padding: 13px 15px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(6, 61, 91, 0.16);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 48px rgba(71, 42, 22, 0.22);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
  transform-origin: bottom right;
  animation: toast-in 220ms var(--ease) both;
}

.toast.is-good {
  border-color: rgba(13, 111, 179, 0.3);
}

.toast.is-warn {
  border-color: rgba(201, 35, 28, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 3px rgba(201, 35, 28, 0.08),
    0 18px 48px rgba(71, 42, 22, 0.22);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (min-width: 1120px) {
  .is-embed .options-grid.image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .is-embed .image-grid .option-card {
    min-height: 134px;
    grid-template-rows: 88px auto;
  }
}

@media (max-width: 1040px) {
  .hero,
  .question-layout,
  .result-screen {
    grid-template-columns: 1fr;
  }

  .hero {
    align-content: start;
  }

  .hero-poster {
    width: min(360px, 100%);
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
  }

  .result-paper {
    transform: none;
  }

  .result-visual {
    width: min(340px, 100%);
  }

  .share-panel {
    grid-template-columns: 1fr;
  }

  .share-actions {
    justify-content: flex-start;
  }

  .signup-nudge {
    grid-template-columns: 1fr;
  }

  .signup-link {
    width: fit-content;
  }

  .is-embed .question-shell {
    height: calc(100dvh - 80px);
  }
}

@media (max-width: 820px) {
  .quiz-shell {
    width: min(100% - 20px, 1180px);
  }

  .hero,
  .question-screen,
  .result-screen {
    min-height: 700px;
  }

  .hero {
    padding: 28px 22px;
    gap: 22px;
  }

  .hero-poster {
    width: min(300px, 100%);
  }

  .hero-title-art {
    width: min(430px, 100%);
    margin-top: 12px;
  }

  .hero-copy h1 {
    font-size: 48px;
  }

  .dek {
    font-size: 19px;
  }

  .question-screen {
    padding: 22px 16px;
  }

  .question-shell {
    padding: 22px;
  }

  .question-title {
    font-size: 40px;
  }

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

  .step-dots {
    gap: 6px;
    margin-bottom: 16px;
  }

  .step-dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .result-screen {
    padding: 24px 16px;
  }

  .result-title {
    font-size: 50px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .question-screen,
  .result-screen {
    border-radius: 10px;
  }

  .is-embed .hero,
  .is-embed .question-screen,
  .is-embed .result-screen {
    border-radius: 0;
  }

  .hero {
    min-height: 650px;
    padding: 18px;
  }

  .is-embed .hero {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: 12px;
  }

  .hero-poster {
    width: min(214px, 100%);
    transform: rotate(-0.6deg);
  }

  .is-embed .hero-poster {
    width: min(184px, 52vh);
  }

  .hero-copy h1 {
    font-size: 39px;
  }

  .hero-title-art {
    width: min(310px, 100%);
  }

  .dek {
    max-width: 310px;
    font-size: 17px;
  }

  .hero-actions {
    width: 100%;
    justify-content: center;
    margin-top: 18px;
  }

  .hero-start,
  .meta-chip {
    width: min(100%, 292px);
  }

  .meta-chip {
    justify-content: center;
    text-align: center;
  }

  .question-screen {
    padding: 14px;
  }

  .question-shell {
    padding: 16px;
  }

  .is-embed .question-shell {
    height: calc(100dvh - 66px);
  }

  .question-title {
    font-size: 35px;
  }

  .question-number {
    font-size: 28px;
  }

  .question-help {
    font-size: 15px;
  }

  .choice-rule {
    grid-template-columns: 1fr;
  }

  .choice-meter {
    justify-content: space-between;
  }

  .options-grid,
  .options-grid.image-grid,
  .footer-row,
  .progress-row {
    grid-template-columns: 1fr;
  }

  .image-grid .option-card {
    min-height: 92px;
    grid-template-columns: 96px 1fr;
    grid-template-rows: 1fr;
  }

  .image-grid .option-label {
    min-height: 92px;
  }

  .footer-row .ghost-button,
  .footer-row .primary-button {
    min-height: 46px;
  }

  .result-title {
    font-size: 43px;
  }

  .is-embed .result-paper {
    min-height: 410px;
  }

  .is-embed .result-visual {
    width: min(280px, 100%);
  }

  .result-copy {
    font-size: 17px;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .share-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .share-actions .tiny-button {
    width: 100%;
  }

  .share-actions .share-primary,
  .share-actions [data-action="copy-link"] {
    grid-column: 1 / -1;
  }

  .signup-link {
    width: 100%;
  }

  .toast-host {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }

  .result-image {
    transform: none;
  }
}
