@font-face {
  font-family: "Inter";
  src: url("assets/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --bg-soft: #101014;
  --surface: #141419;
  --surface-2: #19191f;
  --surface-red: #2a0e15;
  --ink: #f5f3f4;
  --muted: #aaa7af;
  --muted-2: #77747d;
  --line: #2b2a31;
  --red: #ff163d;
  --red-bright: #ff3154;
  --red-dark: #a60927;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 22, 61, .10), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: -60px;
  opacity: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  transition: top .2s ease, opacity .2s ease;
}

.skip-link:focus {
  top: 12px;
  opacity: 1;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(11, 11, 14, .84);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(255, 22, 61, .55));
}

.channel-link {
  color: var(--red-bright);
  font-weight: 650;
  text-decoration: none;
}

.channel-link:hover {
  text-decoration: underline;
}

.channel-link.compact {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

main {
  width: 100%;
}

.screen {
  display: none;
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 48px 0 80px;
}

.screen.is-active {
  display: block;
  animation: screen-in .38s ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-screen {
  position: relative;
  min-height: calc(100vh - 64px);
  padding-top: clamp(48px, 9vh, 100px);
  text-align: center;
}

.hero-glow {
  position: absolute;
  z-index: -1;
  top: 10px;
  left: 50%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 22, 61, .09);
  filter: blur(55px);
  transform: translateX(-50%);
}

.hero-mark-wrap {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 0 auto 26px;
}

.hero-mark {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 22, 61, .72));
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  50% { filter: drop-shadow(0 0 20px rgba(255, 22, 61, .88)); transform: scale(1.025); }
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 10vw, 78px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: .94;
  text-transform: uppercase;
}

h1 span,
.result-hero h2 span {
  color: var(--red);
}

.hero-copy {
  max-width: 590px;
  margin: 0 auto 30px;
  color: #cfccd2;
  font-size: clamp(16px, 4vw, 19px);
  line-height: 1.62;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 560px;
  margin: 0 auto 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(20, 20, 25, .72);
  box-shadow: var(--shadow);
}

.facts div {
  display: grid;
  gap: 2px;
  padding: 17px 8px;
}

.facts div + div {
  border-left: 1px solid var(--line);
}

.facts strong {
  color: var(--ink);
  font-size: 21px;
}

.facts span {
  color: var(--muted);
  font-size: 11px;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--red);
}

.intro-actions {
  display: grid;
  gap: 10px;
  width: min(100%, 420px);
  margin: 0 auto 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
.answer-option input:focus-visible + span {
  outline: 3px solid rgba(255, 49, 84, .45);
  outline-offset: 3px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

.button-large {
  min-height: 58px;
  padding-inline: 24px;
  font-size: 16px;
}

.button-primary {
  background: var(--red);
  color: white;
  box-shadow: 0 14px 38px rgba(255, 22, 61, .20);
}

.button-primary:hover {
  background: var(--red-bright);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #44414b;
  background: var(--surface-2);
}

.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button-ghost:hover {
  color: var(--ink);
}

.text-button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: rgba(170, 167, 175, .35);
  text-underline-offset: 4px;
}

.about-panel {
  max-width: 590px;
  margin: 18px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.about-panel p:last-child {
  margin-bottom: 0;
}

.is-hidden {
  display: none !important;
}

.quiz-screen {
  width: min(100% - 24px, 760px);
  padding-top: 18px;
}

.quiz-topbar {
  display: grid;
  grid-template-columns: 44px 1fr 70px;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
}

.progress-copy {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress-copy strong {
  color: var(--ink);
}

.export-answers-button {
  padding: 0;
  color: var(--red-bright);
  text-align: right;
}

.progress-track {
  height: 4px;
  margin: 14px 0 38px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-2);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red-dark), var(--red-bright));
  transition: width .25s ease;
}

.quiz-heading {
  margin-bottom: 24px;
}

.quiz-heading h2,
.result-hero h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 7vw, 48px);
  letter-spacing: -.045em;
  line-height: 1.04;
}

.quiz-heading > p:last-child,
.result-hero > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

#question-list {
  display: grid;
  gap: 14px;
}

.question-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(25, 25, 31, .92), rgba(17, 17, 21, .96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, .16);
  transition: border-color .2s ease, background .2s ease;
}

.question-card.is-answered {
  border-color: rgba(255, 22, 61, .35);
  background: linear-gradient(145deg, rgba(42, 14, 21, .42), rgba(17, 17, 21, .96));
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  height: 26px;
  margin-bottom: 12px;
  padding: 0 8px;
  border: 1px solid rgba(255, 22, 61, .25);
  border-radius: 9px;
  color: var(--red-bright);
  font-size: 11px;
  font-weight: 800;
}

.question-text {
  margin-bottom: 18px;
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 650;
  line-height: 1.45;
}

.answer-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.answer-option {
  position: relative;
}

.answer-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.answer-option span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid #33313a;
  border-radius: 13px;
  background: #111115;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.answer-option span:hover {
  border-color: #4a4651;
  color: var(--ink);
}

.answer-option input:checked + span {
  border-color: var(--red);
  background: var(--red);
  color: white;
  box-shadow: 0 8px 24px rgba(255, 22, 61, .22);
  transform: translateY(-1px);
}

.scale-hints {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.2;
}

.scale-hints span {
  max-width: 42%;
}

.scale-hints span:last-child {
  text-align: right;
}

.question-help {
  margin-top: 15px;
  border-top: 1px solid var(--line);
}

.question-help summary {
  position: relative;
  padding: 14px 26px 0 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  list-style: none;
}

.question-help summary::-webkit-details-marker {
  display: none;
}

.question-help summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  color: var(--red-bright);
  font-size: 18px;
  line-height: 1;
  transition: transform .18s ease;
}

.question-help[open] summary::after {
  transform: rotate(45deg);
}

.question-help-content {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.question-help-content p {
  margin: 0;
  color: #bcb9c0;
  font-size: 12px;
  line-height: 1.55;
}

.question-help-content strong {
  color: var(--ink);
}

.question-help-note {
  color: var(--muted-2) !important;
  font-size: 10px !important;
}

.form-error {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 22, 61, .4);
  border-radius: 12px;
  background: var(--surface-red);
  color: #ffd2da;
  font-size: 13px;
}

.quiz-actions {
  position: sticky;
  z-index: 10;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(110px, .7fr) minmax(160px, 1.3fr);
  gap: 10px;
  margin-top: 24px;
  padding: 16px 0 max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 24%);
}

.result-screen {
  width: min(100% - 28px, 900px);
}

.result-hero {
  max-width: 700px;
  margin-bottom: 34px;
}

.leading-themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.leading-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 22, 61, .25);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 22, 61, .16), transparent 48%),
    var(--surface);
}

.leading-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 105px;
  height: 105px;
  border: 1px solid rgba(255, 22, 61, .12);
  border-radius: 50%;
}

.leading-rank {
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
}

.leading-card h3 {
  margin: 18px 0 3px;
  font-size: 27px;
  letter-spacing: -.04em;
}

.leading-card .name-en {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leading-card .score {
  margin: 20px 0 12px;
  color: var(--red-bright);
  font-size: 30px;
  font-weight: 900;
}

.leading-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #c5c2c9;
  font-size: 12px;
}

.share-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  margin-bottom: 54px;
}

.button.is-preparing {
  cursor: wait;
  opacity: .58;
  pointer-events: none;
}

.action-status {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.share-fallback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .55fr);
  gap: 22px;
  align-items: center;
  margin: -28px 0 54px;
  padding: 22px;
  border: 1px solid rgba(255, 49, 84, .42);
  border-radius: var(--radius);
  background: var(--surface-red);
}

.share-fallback h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.share-fallback p:not(.eyebrow) {
  color: #cfc5c8;
  font-size: 13px;
}

.share-fallback textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0d0d11;
  color: var(--ink);
  font: 12px/1.5 "Inter", sans-serif;
}

.share-fallback-actions {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}

.share-fallback img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h3 {
  margin-bottom: 0;
  font-size: clamp(26px, 6vw, 36px);
  letter-spacing: -.04em;
}

.profile-section,
.interpretation-section,
.calculation-audit {
  margin-top: 48px;
}

.calculation-audit {
  padding: 22px;
  border: 1px dashed rgba(255, 49, 84, .55);
  border-radius: var(--radius);
  background: rgba(42, 14, 21, .25);
}

.calculation-audit .section-heading > p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.audit-list {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(220px, 2fr) 70px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #101014;
}

.audit-row strong {
  font-size: 13px;
}

.audit-formula {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.audit-total {
  color: var(--red-bright);
  font-weight: 850;
  text-align: right;
}

.profile-list {
  display: grid;
  gap: 10px;
}

.profile-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.profile-item summary {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(110px, 2fr) 54px 18px;
  align-items: center;
  gap: 14px;
  padding: 17px;
  cursor: pointer;
  list-style: none;
}

.profile-item summary::-webkit-details-marker {
  display: none;
}

.profile-name {
  display: grid;
  font-weight: 800;
}

.profile-name small {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.score-track {
  height: 8px;
  overflow: hidden;
  border-radius: 10px;
  background: #29272e;
}

.score-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red-dark), var(--red-bright));
}

.profile-score {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.profile-chevron {
  color: var(--muted);
  font-size: 17px;
  transition: transform .2s ease;
}

.profile-item[open] .profile-chevron {
  transform: rotate(45deg);
}

.profile-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 17px 17px;
}

.profile-details div {
  padding: 14px;
  border-radius: 13px;
  background: #101014;
}

.profile-details strong {
  display: block;
  margin-bottom: 5px;
  color: var(--red-bright);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-details p {
  margin: 0;
  color: #c7c4ca;
  font-size: 12px;
}

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

.interpretation-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.interpretation-card h4 {
  margin: 0 0 8px;
  color: var(--red-bright);
  font-size: 14px;
}

.interpretation-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.disclaimer {
  margin-top: 34px;
  padding: 20px;
  border-left: 4px solid var(--red);
  border-radius: 0 16px 16px 0;
  background: var(--surface-red);
}

.disclaimer strong {
  color: var(--red-bright);
}

.disclaimer p {
  margin: 6px 0 0;
  color: #d5c4c8;
  font-size: 13px;
}

.channel-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
  padding: 24px;
  border: 1px solid rgba(255, 22, 61, .28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 0 50%, rgba(255, 22, 61, .14), transparent 35%),
    var(--surface);
}

.channel-mark {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 22, 61, .62));
}

.channel-card p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.channel-card h3 {
  margin-bottom: 3px;
}

.channel-card h3 span,
.channel-card a:not(.button) {
  color: var(--red-bright);
}

.channel-card a:not(.button) {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.result-footer-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(100% - 32px, 900px);
  margin: 0 auto;
  padding: 24px 0 max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}

.site-footer a {
  color: var(--red);
  text-decoration: none;
}

.noscript {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 100;
  padding: 16px;
  border-radius: 14px;
  background: var(--red);
  color: white;
  text-align: center;
}

@media (max-width: 720px) {
  .site-header {
    min-height: 58px;
  }

  .brand span {
    display: none;
  }

  .screen {
    padding-bottom: 58px;
  }

  .intro-screen {
    min-height: calc(100vh - 58px);
    padding-top: 42px;
  }

  .leading-themes {
    grid-template-columns: 1fr;
  }

  .leading-card {
    min-height: 0;
  }

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

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

  .share-fallback img {
    grid-row: 1;
    max-height: 420px;
  }

  .share-fallback-actions {
    display: grid;
  }

  .profile-details,
  .interpretation-list {
    grid-template-columns: 1fr;
  }

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

  .audit-formula {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .channel-card {
    grid-template-columns: 58px 1fr;
    gap: 14px;
  }

  .channel-mark {
    width: 54px;
    height: 54px;
  }

  .channel-card .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .screen {
    width: min(100% - 20px, 820px);
  }

  .intro-screen {
    width: min(100% - 28px, 820px);
  }

  .facts strong {
    font-size: 18px;
  }

  .question-card {
    padding: 17px 14px;
    border-radius: 18px;
  }

  .answer-scale {
    gap: 6px;
  }

  .answer-option span {
    min-height: 46px;
    border-radius: 12px;
  }

  .quiz-topbar {
    grid-template-columns: 42px 1fr 86px;
  }

  .progress-copy {
    display: grid;
    gap: 0;
    text-align: center;
  }

  .quiz-actions {
    grid-template-columns: 105px 1fr;
  }

  .profile-item summary {
    grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.3fr) 45px 14px;
    gap: 8px;
    padding: 14px 12px;
  }

  .profile-name {
    font-size: 13px;
  }

  .profile-details {
    padding: 0 12px 12px;
  }

  .result-footer-actions {
    flex-direction: column;
  }
}

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