:root {
  color-scheme: dark;
  --qt-bg: #070a17;
  --qt-panel: rgba(16, 22, 43, .94);
  --qt-panel-2: rgba(23, 31, 59, .9);
  --qt-text: #f6f3ff;
  --qt-muted: #a9b1ca;
  --qt-line: rgba(255, 255, 255, .12);
  --qt-violet: #9e82ff;
  --qt-cyan: #72d9ff;
  --qt-gold: #f4c96b;
  --qt-rose: #ff8fb3;
  --qt-green: #69d8c0;
  --qt-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--qt-bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--qt-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 4%, rgba(118, 86, 224, .26), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(40, 183, 224, .19), transparent 27%),
    radial-gradient(circle at 50% 105%, rgba(240, 105, 166, .1), transparent 34%),
    linear-gradient(180deg, #080b19, #050713 58%, #080b19);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .36;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .82) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(255, 255, 255, .4) 0 1px, transparent 1.2px);
  background-size: 89px 89px, 137px 137px;
  background-position: 8px 14px, 51px 37px;
}

button { font: inherit; }
.qt-app { position: relative; width: min(1000px, calc(100% - 28px)); margin: 0 auto; padding: 24px 0 72px; }
.qt-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.qt-brand { display: flex; align-items: center; gap: 11px; color: #fff; font-weight: 900; }
.qt-brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 15px;
  background: url("../favicon.svg") center / cover no-repeat;
  box-shadow: 0 13px 34px rgba(114, 217, 255, .18), 0 10px 28px rgba(158, 130, 255, .22);
}
.qt-topnote { color: var(--qt-muted); font-size: 13px; text-align: right; }
.qt-home {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--qt-line);
  border-radius: 14px;
  color: #fff;
  background: rgba(12, 17, 36, .88);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .34);
  backdrop-filter: blur(12px);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  transition: .18s ease;
}
.qt-home:hover { transform: translateY(-2px); background: rgba(24, 32, 61, .97); }
.qt-card {
  overflow: hidden;
  border: 1px solid var(--qt-line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(20, 27, 53, .96), rgba(10, 15, 33, .97));
  box-shadow: var(--qt-shadow);
}
.qt-screen { display: none; padding: clamp(24px, 5vw, 54px); animation: qt-rise .36s ease both; }
.qt-screen.active { display: block; }
@keyframes qt-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.qt-kicker {
  margin-bottom: 11px;
  color: var(--qt-cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.qt-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 34px; align-items: center; }
.qt-intro h1, .qt-result-name {
  margin: 0 0 18px;
  overflow: visible;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -.052em;
}
.qt-gradient {
  color: transparent;
  background: linear-gradient(105deg, #d2c4ff 0%, #9e82ff 32%, #72d9ff 70%, #f4c96b 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: italic;
}
.qt-lead { max-width: 720px; margin: 0; color: #bac2d8; font-size: clamp(16px, 2vw, 19px); line-height: 1.58; }
.qt-chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 23px 0 26px; }
.qt-chip {
  padding: 8px 11px;
  border: 1px solid rgba(158, 130, 255, .22);
  border-radius: 999px;
  color: #d8d3ff;
  background: rgba(158, 130, 255, .1);
  font-size: 13px;
}
.qt-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.qt-btn {
  min-height: 49px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 900;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}
.qt-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.qt-btn:disabled { cursor: not-allowed; opacity: .4; transform: none; filter: none; }
.qt-primary { color: #10121d; background: linear-gradient(135deg, #cbbaff, #8fddff 58%, #f4c96b); box-shadow: 0 15px 36px rgba(114, 217, 255, .16); }
.qt-secondary { color: var(--qt-text); border-color: var(--qt-line); background: rgba(255, 255, 255, .055); }
.qt-orbit { position: relative; min-height: 330px; display: grid; place-items: center; }
.qt-orbit-core {
  width: 220px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .2), rgba(158, 130, 255, .2) 38%, rgba(114, 217, 255, .08));
  box-shadow: inset 0 0 65px rgba(255, 255, 255, .05), 0 28px 70px rgba(0, 0, 0, .3);
  font-size: 104px;
}
.qt-orbit-label {
  position: absolute;
  padding: 8px 11px;
  border: 1px solid var(--qt-line);
  border-radius: 12px;
  color: #d9dfea;
  background: rgba(10, 14, 31, .84);
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.qt-orbit-label:nth-child(1) { top: 36px; left: 0; transform: rotate(-5deg); }
.qt-orbit-label:nth-child(2) { top: 46px; right: 0; transform: rotate(5deg); }
.qt-orbit-label:nth-child(4) { bottom: 35px; left: 4px; transform: rotate(4deg); }
.qt-orbit-label:nth-child(5) { right: 7px; bottom: 29px; transform: rotate(-5deg); }
.qt-progress-shell { margin-bottom: 28px; }
.qt-progress-meta { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 10px; color: var(--qt-muted); font-size: 13px; }
.qt-progress { height: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .06); border-radius: 999px; background: rgba(255, 255, 255, .075); }
.qt-progress > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--qt-violet), var(--qt-cyan), var(--qt-gold)); transition: width .3s ease; }
.qt-question-theme { margin-bottom: 9px; color: var(--qt-cyan); font-size: 12px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.qt-question { max-width: 850px; margin: 0 0 24px; font-size: clamp(28px, 4vw, 43px); line-height: 1.08; letter-spacing: -.035em; }
.qt-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.qt-answer {
  min-height: 94px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--qt-line);
  border-radius: 18px;
  color: #f6f3ff;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: .18s ease;
}
.qt-answer:hover { transform: translateY(-2px); border-color: rgba(114, 217, 255, .38); background: rgba(255, 255, 255, .08); }
.qt-answer.selected { border-color: rgba(158, 130, 255, .7); background: linear-gradient(135deg, rgba(158, 130, 255, .18), rgba(114, 217, 255, .12)); box-shadow: 0 0 0 3px rgba(158, 130, 255, .08); }
.qt-answer-letter { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 10px; color: #d9ceff; background: rgba(255, 255, 255, .08); font-weight: 950; }
.qt-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.qt-hint { color: var(--qt-muted); font-size: 12px; text-align: center; }
.qt-loading { padding: 70px 10px; text-align: center; }
.qt-loader { width: 82px; height: 82px; margin: 0 auto 23px; border: 5px solid rgba(255, 255, 255, .1); border-top-color: var(--qt-cyan); border-radius: 50%; animation: qt-spin .8s linear infinite; }
@keyframes qt-spin { to { transform: rotate(360deg); } }
.qt-result-hero { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); min-height: 500px; }
.qt-result-art { position: relative; display: grid; place-items: center; min-height: 420px; overflow: hidden; isolation: isolate; background: radial-gradient(circle, rgba(114, 217, 255, .2), rgba(158, 130, 255, .14) 45%, #070b18 74%); font-size: clamp(120px, 20vw, 210px); }
.qt-result-art::after { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 62%, rgba(2, 5, 13, .72)); }
.qt-result-image { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; background: transparent; opacity: 0; transition: opacity .32s ease; }
.qt-result-art.media-contain .qt-result-image { object-fit: contain; background: transparent; }
.qt-result-fallback { position: relative; z-index: 1; opacity: 1; transition: opacity .22s ease; }
.qt-result-art.is-loading .qt-result-fallback { animation: qt-photo-pulse 1.3s ease-in-out infinite; }
.qt-result-art.has-image .qt-result-image { opacity: 1; }
.qt-result-art.has-image .qt-result-fallback { opacity: 0; }
.qt-media-credit { position: absolute; z-index: 3; left: 12px; bottom: 12px; max-width: calc(100% - 24px); overflow: hidden; padding: 7px 9px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; color: rgba(255, 255, 255, .86); background: rgba(3, 6, 15, .76); font-size: 10px; line-height: 1.2; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; opacity: 0; pointer-events: none; backdrop-filter: blur(8px); transition: opacity .2s ease, background .2s ease; }
.qt-media-credit:hover { color: #fff; background: rgba(3, 6, 15, .92); }
.qt-result-art.has-image .qt-media-credit { opacity: 1; pointer-events: auto; }
@keyframes qt-photo-pulse { 50% { opacity: .42; transform: scale(.96); } }
.qt-result-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 52px); }
.qt-result-name { margin: 8px 0 10px; font-size: clamp(42px, 6vw, 68px); }
.qt-tagline { margin-bottom: 18px; color: #dcd6ee; font-size: 19px; }
.qt-match { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.qt-match strong { color: var(--qt-gold); font-size: 35px; }
.qt-match span { color: var(--qt-muted); font-size: 12px; line-height: 1.35; }
.qt-result-description { margin: 0; color: #c5ccde; line-height: 1.62; }
.qt-result-body { padding: 30px clamp(24px, 5vw, 54px) 48px; border-top: 1px solid var(--qt-line); }
.qt-section-title { margin: 0 0 14px; font-size: 24px; }
.qt-why { display: grid; gap: 11px; margin-bottom: 28px; }
.qt-why-item, .qt-fact, .qt-neighbors, .qt-source-note {
  padding: 16px 18px;
  border: 1px solid var(--qt-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .045);
  line-height: 1.52;
}
.qt-why-item strong, .qt-fact strong { color: #9fe5ff; }
.qt-fact { margin: 0 0 28px; background: linear-gradient(135deg, rgba(244, 201, 107, .1), rgba(114, 217, 255, .07)); }
.qt-fact strong { color: var(--qt-gold); }
.qt-traits { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin: 17px 0 29px; }
.qt-trait { display: grid; grid-template-columns: 1fr auto; gap: 7px; color: #dbe0ed; font-size: 13px; }
.qt-trait span:nth-child(2) { color: var(--qt-muted); }
.qt-trait-bar { grid-column: 1 / -1; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.qt-trait-bar div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--qt-green), var(--qt-cyan), var(--qt-violet)); }
.qt-neighbors { margin-bottom: 24px; color: #c7cede; }
.qt-neighbors b { color: #d9ceff; }
.qt-source-note { margin-top: 28px; color: var(--qt-muted); font-size: 12px; }
.qt-source-note a { color: #9fe5ff; }
.qt-toast { position: fixed; left: 50%; bottom: 22px; z-index: 30; transform: translate(-50%, 16px); padding: 11px 15px; border-radius: 12px; color: #151827; background: var(--qt-gold); font-weight: 900; opacity: 0; pointer-events: none; transition: .22s ease; }
.qt-toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 760px) {
  .qt-app { width: min(100% - 18px, 1000px); padding-top: 12px; }
  .qt-topnote { display: none; }
  .qt-intro, .qt-result-hero { grid-template-columns: 1fr; }
  .qt-orbit { order: -1; min-height: 245px; }
  .qt-orbit-core { width: 176px; font-size: 80px; }
  .qt-screen { padding: 24px 20px 30px; }
  .qt-result-screen { padding: 0; }
  .qt-result-art { min-height: 330px; }
  .qt-answers, .qt-traits { grid-template-columns: 1fr; }
  .qt-answer { min-height: auto; }
  .qt-hint { display: none; }
  .qt-nav .qt-btn { flex: 1; }
}

@media (max-width: 520px) {
  .qt-intro h1 { font-size: 43px; }
  .qt-home { left: 10px; bottom: 10px; }
  .qt-result-art { font-size: 132px; }
}

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