:root {
  --ink: #10111a;
  --ink-soft: #232535;
  --cream: #f7f1e7;
  --paper: #fffdf8;
  --coral: #ff5c47;
  --coral-deep: #e94732;
  --lime: #d7ff5b;
  --lavender: #b9a7ff;
  --sky: #77d6ff;
  --yellow: #ffd95b;
  --muted: #6f7080;
  --line: rgba(16, 17, 26, 0.13);
  --shadow: 0 24px 70px rgba(20, 17, 32, 0.16);
  --radius-lg: 34px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "League Spartan", "Arial Black", ui-sans-serif, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 2%, rgba(185, 167, 255, 0.21), transparent 28rem),
    radial-gradient(circle at 94% 18%, rgba(255, 92, 71, 0.15), transparent 30rem),
    var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(16, 17, 26, 0.025) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(16, 17, 26, 0.018) 5px 6px);
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 4px solid var(--sky);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: white;
  background: var(--ink);
  border-radius: 12px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1440px, calc(100% - 32px));
  min-height: 76px;
  padding: 10px 18px;
  margin: 16px auto 0;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 22px;
  box-shadow: 0 12px 44px rgba(32, 25, 44, 0.08);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: white;
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px 14px 14px 4px;
  box-shadow: 4px 4px 0 var(--lime);
  transform: rotate(-3deg);
}

.brand-mark i {
  font-family: var(--font-display);
  font-size: 26px;
  font-style: normal;
  line-height: 1;
}

.brand-mark b {
  position: absolute;
  right: -6px;
  bottom: -7px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: var(--ink);
  background: var(--coral);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 13px;
}

.brand > span:last-child {
  display: grid;
  text-align: left;
}

.brand strong,
.brand small {
  font-family: var(--font-display);
  line-height: 0.88;
  letter-spacing: 0.04em;
}

.brand strong {
  font-size: 19px;
}

.brand small {
  color: var(--coral-deep);
  font-size: 13px;
  letter-spacing: 0.3em;
}

.header-note {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.pulse-dot {
  position: relative;
  width: 10px;
  height: 10px;
  background: #42bd76;
  border-radius: 50%;
}

.pulse-dot::after {
  position: absolute;
  inset: -5px;
  content: "";
  border: 2px solid #42bd76;
  border-radius: inherit;
  opacity: 0.35;
  animation: pulse 2s ease-out infinite;
}

main {
  min-height: calc(100vh - 180px);
}

.home-view,
.quiz-view,
.result-view {
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(430px, 0.78fr);
  gap: clamp(30px, 5vw, 86px);
  align-items: center;
  min-height: 720px;
  padding: 72px clamp(6px, 3vw, 40px) 54px;
}

.hero-copy {
  min-width: 0;
  max-width: 700px;
}

.eyebrow,
.section-kicker,
.question-kicker,
.result-kicker {
  margin: 0 0 18px;
  color: var(--coral-deep);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.eyebrow span {
  display: inline-flex;
  padding: 5px 8px 4px;
  margin-right: 7px;
  color: var(--ink);
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: 6px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-2deg);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(64px, 8.4vw, 132px);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.hero h1 em {
  position: relative;
  display: inline-block;
  color: var(--coral);
  font-style: normal;
  transform: rotate(-2deg);
}

.hero h1 em::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 2px;
  height: 8px;
  content: "";
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 50%;
  transform: rotate(1deg);
}

.hero-lede {
  max-width: 640px;
  margin: 34px 0 0;
  color: #4e4e5b;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  align-items: center;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.text-button,
.round-button,
.back-answer {
  border: 0;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 13px 21px;
  border-radius: 15px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: white;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--coral);
}

.primary-button:hover,
.primary-button:active {
  box-shadow: 2px 2px 0 var(--coral);
  transform: translate(3px, 3px);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
}

.ghost-button:hover {
  background: white;
  transform: translateY(-2px);
}

.hero-facts {
  display: flex;
  gap: 0;
  padding: 0;
  margin: 48px 0 0;
  list-style: none;
}

.hero-facts li {
  display: grid;
  padding: 0 25px;
  border-left: 1px solid var(--line);
}

.hero-facts li:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-facts strong {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
}

.hero-facts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.hero-collage {
  position: relative;
  min-height: 580px;
  isolation: isolate;
}

.collage-card {
  position: absolute;
  overflow: hidden;
  width: 34%;
  aspect-ratio: 0.71;
  background: var(--ink-soft);
  border: 8px solid white;
  border-bottom-width: 42px;
  border-radius: 6px;
  box-shadow: 0 24px 45px rgba(16, 17, 26, 0.24);
}

.collage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-card span {
  position: absolute;
  right: 5px;
  bottom: -34px;
  left: 5px;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.collage-card:nth-child(1) {
  top: 3%;
  left: 6%;
  z-index: 1;
  transform: rotate(-11deg);
}

.collage-card:nth-child(2) {
  top: 0;
  left: 34%;
  z-index: 4;
  transform: rotate(4deg);
}

.collage-card:nth-child(3) {
  top: 9%;
  right: 2%;
  z-index: 2;
  transform: rotate(12deg);
}

.collage-card:nth-child(4) {
  bottom: 0;
  left: 8%;
  z-index: 3;
  transform: rotate(7deg);
}

.collage-card:nth-child(5) {
  bottom: -2%;
  left: 38%;
  z-index: 5;
  transform: rotate(-5deg);
}

.collage-card:nth-child(6) {
  right: 0;
  bottom: 2%;
  z-index: 3;
  transform: rotate(-10deg);
}

.hero-collage::before,
.hero-collage::after {
  position: absolute;
  z-index: 10;
  display: grid;
  place-items: center;
  content: "?";
  font-family: var(--font-display);
  font-size: 32px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(9deg);
}

.hero-collage::before {
  top: 44%;
  left: 45%;
  width: 68px;
  height: 68px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 50%;
}

.hero-collage::after {
  right: 3%;
  bottom: 18%;
  width: 52px;
  height: 52px;
  content: "!";
  color: white;
  background: var(--coral);
  border-radius: 14px;
  transform: rotate(-8deg);
}

.show-library {
  padding: clamp(38px, 6vw, 82px) clamp(18px, 4vw, 58px) 72px;
  background: var(--paper);
  border: 1px solid rgba(16, 17, 26, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.library-heading,
.library-meta {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.section-kicker {
  margin-bottom: 4px;
}

.library-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.search-box {
  display: flex;
  gap: 10px;
  align-items: center;
  width: min(390px, 100%);
  min-height: 56px;
  padding: 9px 12px 9px 16px;
  color: var(--muted);
  background: #f1eee8;
  border: 1px solid transparent;
  border-radius: 17px;
  transition: border-color 160ms ease, background 160ms ease;
}

.search-box:focus-within {
  background: white;
  border-color: var(--ink);
}

.search-box > span:first-child {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  transform: rotate(-15deg);
}

.search-box input {
  min-width: 0;
  flex: 1;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box input::placeholder {
  color: #898995;
}

.search-box kbd {
  padding: 4px 7px;
  color: #878794;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: inherit;
  font-size: 11px;
  box-shadow: 0 2px 0 rgba(16, 17, 26, 0.12);
}

.library-meta {
  align-items: center;
  padding: 28px 0 22px;
  border-bottom: 1px solid var(--line);
}

.library-meta p {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.filter-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 20px;
  align-items: center;
  justify-content: flex-end;
}

.filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.quick-picks {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-picks::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  padding: 8px 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.show-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 26px 15px;
  padding-top: 30px;
}

.show-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.show-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 0.68;
  background: linear-gradient(140deg, var(--lavender), var(--coral));
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(16, 17, 26, 0.15);
  transition: transform 190ms ease, box-shadow 190ms ease;
}

.show-card-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(10, 10, 17, 0.68), transparent 48%);
}

.show-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.show-card:hover .show-card-image,
.show-card:focus-visible .show-card-image {
  z-index: 2;
  box-shadow: 0 20px 40px rgba(16, 17, 26, 0.24);
  transform: translateY(-6px) rotate(-1deg);
}

.show-card:hover img {
  transform: scale(1.04);
}

.show-card-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 5px 7px 4px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.show-card-type {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 5px 7px 4px;
  color: white;
  background: rgba(16, 17, 26, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  backdrop-filter: blur(8px);
}

.show-card-type.movie {
  color: var(--ink);
  background: var(--lavender);
  border-color: var(--ink);
}

.show-card-type.sports {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--ink);
}

.show-card-type.actor {
  background: #7b41e8;
}

.show-card-type.commercial {
  color: var(--ink);
  background: #ff86ac;
  border-color: var(--ink);
}

.show-card strong {
  overflow: hidden;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.show-card small {
  color: var(--muted);
  font-size: 11px;
}

.show-more-button {
  display: block;
  margin: 38px auto 0;
  padding: 13px 22px;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  font: 800 14px/1 var(--font-body);
  cursor: pointer;
}

.show-more-button:hover,
.show-more-button:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 var(--ink);
}

.show-more-button[hidden] {
  display: none;
}

.empty-search {
  display: grid;
  min-height: 360px;
  padding: 50px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-search > span {
  font-size: 48px;
}

.empty-search h3 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  text-transform: uppercase;
}

.empty-search p {
  margin: 4px 0 20px;
  color: var(--muted);
}

.quiz-view {
  padding: 18px 0 40px;
}

.quiz-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.round-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 22px;
  box-shadow: 0 5px 15px rgba(16, 17, 26, 0.07);
}

.quiz-progress-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
}

.quiz-progress-copy strong {
  font-size: 16px;
}

.quiz-progress-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.text-button {
  padding: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.text-button:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.progress-track {
  overflow: hidden;
  max-width: 1180px;
  height: 8px;
  margin: 10px auto 16px;
  background: rgba(16, 17, 26, 0.1);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), #ff986b);
  border-radius: inherit;
  transition: width 280ms ease;
}

.quiz-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(390px, 1.12fr);
  overflow: hidden;
  max-width: 980px;
  min-height: 440px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid rgba(16, 17, 26, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.question-photo-wrap {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  margin: 0;
  background: linear-gradient(135deg, var(--lavender), var(--coral));
}

.question-photo-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(8, 9, 17, 0.75), transparent 38%);
  pointer-events: none;
}

.question-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: photo-in 420ms ease both;
}

.question-photo-wrap figcaption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  font-size: 12px;
}

.question-photo-wrap figcaption span {
  padding: 6px 9px;
  background: rgba(16, 17, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
}

.question-photo-wrap figcaption a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.question-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(22px, 3vw, 36px);
}

.question-kicker {
  margin-bottom: 8px;
}

.question-panel h2 {
  max-width: 480px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.7vw, 36px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.answer-list {
  display: grid;
  gap: 8px;
}

.answer-button {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 6px 10px;
  color: var(--ink);
  text-align: left;
  background: #f2efe9;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.answer-button:hover {
  background: white;
  border-color: rgba(16, 17, 26, 0.26);
  transform: translateX(4px);
}

.answer-button.selected {
  background: var(--lime);
  border-color: var(--ink);
  transform: translateX(5px);
}

.answer-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.answer-button.selected .answer-number {
  color: white;
  background: var(--ink);
}

.answer-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.answer-arrow {
  color: var(--muted);
  font-size: 19px;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-top: 10px;
  color: #9898a2;
  font-size: 11px;
}

.back-answer {
  padding: 5px 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.back-answer:disabled {
  cursor: default;
  opacity: 0.35;
}

.result-view {
  position: relative;
  min-height: 840px;
  padding: 72px 0 90px;
  isolation: isolate;
}

.result-backdrop {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -2;
  background-position: center;
  background-size: cover;
  filter: saturate(0.78);
}

.result-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(16, 17, 26, 0.95), rgba(16, 17, 26, 0.74)),
    linear-gradient(to bottom, transparent, var(--ink));
  backdrop-filter: blur(13px);
}

.result-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.76fr) minmax(0, 1.24fr);
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-lg);
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.38);
}

.result-art {
  position: relative;
  min-height: 680px;
  background: var(--ink-soft);
}

.result-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(16, 17, 26, 0.65), transparent 42%);
}

.result-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-show-tag {
  position: absolute;
  bottom: 26px;
  left: 26px;
  z-index: 2;
  max-width: calc(100% - 52px);
  padding: 8px 11px;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 4px 4px 0 white;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  transform: rotate(-1deg);
}

.result-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 6vw, 76px);
}

.result-kicker {
  margin-bottom: 6px;
}

.result-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(58px, 7vw, 98px);
  line-height: 0.82;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.result-actor {
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.result-label {
  align-self: flex-start;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--lavender);
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  transform: rotate(-1deg);
}

.result-why {
  max-width: 680px;
  margin: 24px 0 0;
  color: #41414d;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.62;
}

.personality-mix {
  padding: 18px;
  margin-top: 28px;
  background: #f2efe9;
  border-radius: 16px;
}

.mix-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 13px;
}

.mix-heading strong {
  font-size: 13px;
}

.mix-heading span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#mix-bars {
  display: grid;
  gap: 8px;
}

.mix-row {
  display: grid;
  grid-template-columns: minmax(108px, 148px) 1fr 34px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mix-track {
  overflow: hidden;
  height: 8px;
  background: white;
  border-radius: 999px;
}

.mix-track i {
  display: block;
  width: var(--mix-width);
  height: 100%;
  background: var(--mix-color);
  border-radius: inherit;
}

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

.ghost-button.dark {
  background: #eeebe4;
}

.text-button.dark {
  color: var(--ink);
}

.result-disclaimer {
  margin: 24px auto 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  text-align: center;
}

.load-error {
  display: grid;
  min-height: 70vh;
  padding: 40px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.load-error > span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  color: white;
  background: var(--coral);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 38px;
}

.load-error h1 {
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: 48px;
  text-transform: uppercase;
}

.load-error p {
  margin: 4px 0 24px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  gap: 30px;
  align-items: flex-end;
  justify-content: space-between;
  width: min(1400px, calc(100% - 40px));
  padding: 46px 10px 40px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.site-footer strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
}

.site-footer p {
  max-width: 580px;
  margin: 4px 0 0;
}

.site-footer a {
  color: var(--ink);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  from {
    opacity: 0.45;
    transform: scale(0.55);
  }
  to {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes photo-in {
  from {
    opacity: 0.35;
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
    min-height: 650px;
  }

  .hero h1 {
    font-size: clamp(64px, 9vw, 100px);
  }

  .hero-collage {
    min-height: 500px;
  }

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

@media (max-width: 920px) {
  .site-header {
    width: min(100% - 20px, 1400px);
    margin-top: 10px;
  }

  .home-view,
  .quiz-view,
  .result-view,
  .site-footer {
    width: min(100% - 24px, 1400px);
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 58px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-collage {
    width: min(650px, 100%);
    min-height: 520px;
    margin: 0 auto;
  }

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

  .quiz-stage {
    grid-template-columns: minmax(0, 0.85fr) minmax(350px, 1.15fr);
    max-width: 860px;
    min-height: 420px;
  }

  .quiz-topbar,
  .progress-track {
    max-width: 860px;
  }

  .question-photo-wrap {
    min-height: 420px;
    max-height: none;
    aspect-ratio: auto;
  }

  .question-panel {
    padding: 24px;
  }

  .result-card {
    grid-template-columns: minmax(250px, 0.65fr) minmax(0, 1.35fr);
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
    padding: 8px 12px;
    border-radius: 17px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 11px;
  }

  .header-note {
    font-size: 10px;
  }

  .hero {
    min-height: auto;
    padding: 48px 2px 35px;
  }

  .hero h1 {
    font-size: clamp(56px, 18vw, 76px);
  }

  .hero-lede {
    margin-top: 28px;
    font-size: 17px;
  }

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

  .hero-actions > button {
    width: 100%;
  }

  .hero-facts {
    justify-content: space-between;
    margin-top: 38px;
  }

  .hero-facts li {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
  }

  .hero-facts strong {
    font-size: 27px;
  }

  .hero-facts span {
    font-size: 9px;
  }

  .hero-collage {
    width: calc(100% - 4px);
    min-height: 380px;
    margin-top: 10px;
  }

  .collage-card {
    width: 36%;
    border-width: 5px;
    border-bottom-width: 30px;
  }

  .collage-card span {
    bottom: -24px;
    font-size: 8px;
  }

  .hero-collage::before {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .hero-collage::after {
    width: 42px;
    height: 42px;
    font-size: 23px;
  }

  .show-library {
    padding: 34px 15px 48px;
    border-radius: 24px;
  }

  .library-heading,
  .library-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .library-heading h2 {
    font-size: 52px;
  }

  .search-box {
    width: 100%;
  }

  .library-meta {
    gap: 13px;
    padding-top: 20px;
  }

  .filter-groups {
    display: grid;
    gap: 12px;
    justify-content: stretch;
  }

  .filter-group {
    display: grid;
    gap: 5px;
  }

  .quick-picks {
    margin-right: -15px;
    padding-right: 15px;
  }

  .show-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 9px;
  }

  .show-card strong {
    font-size: 12px;
  }

  .show-card small {
    font-size: 9px;
  }

  .show-card-image {
    border-radius: 10px;
  }

  .show-card-badge {
    display: none;
  }

  .show-card-type {
    top: 5px;
    left: 5px;
    padding: 4px 5px 3px;
    font-size: 8px;
  }

  .quiz-view {
    width: 100%;
    padding: 8px 0 0;
  }

  .quiz-topbar,
  .progress-track {
    width: calc(100% - 28px);
  }

  .quiz-topbar {
    gap: 11px;
  }

  .round-button {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .quiz-progress-copy {
    display: grid;
    gap: 0;
  }

  .quiz-restart-button {
    padding-right: 0;
  }

  .progress-track {
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .quiz-stage {
    grid-template-columns: 1fr;
    min-height: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .question-photo-wrap {
    min-height: 115px;
    max-height: 125px;
    aspect-ratio: 16 / 5;
  }

  .question-photo-wrap figcaption {
    right: 8px;
    bottom: 6px;
    left: 8px;
    font-size: 9px;
  }

  .question-photo-wrap figcaption span {
    display: none;
  }

  .question-panel {
    justify-content: flex-start;
    padding: 12px 14px 14px;
  }

  .question-kicker {
    margin-bottom: 4px;
  }

  .question-panel h2 {
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 1.08;
  }

  .answer-button {
    grid-template-columns: 28px 1fr;
    min-height: 40px;
    padding: 5px 8px;
    border-radius: 10px;
  }

  .answer-list {
    gap: 5px;
  }

  .answer-number {
    width: 26px;
    height: 26px;
  }

  .answer-text {
    font-size: 13px;
    line-height: 1.2;
  }

  .question-footer {
    margin-top: 6px;
  }

  .answer-arrow {
    display: none;
  }

  .question-footer > span {
    display: none;
  }

  .result-view {
    width: 100%;
    padding: 30px 12px 55px;
  }

  .result-card {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .result-art {
    min-height: auto;
    aspect-ratio: 16 / 11;
  }

  .result-copy {
    padding: 36px 22px 40px;
  }

  .result-copy h2 {
    font-size: clamp(58px, 18vw, 84px);
  }

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

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

  .result-actions button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 36px 4px;
  }
}

@media (max-width: 410px) {
  .header-note {
    display: none;
  }

  .show-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 11px;
  }
}

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