:root {
  color-scheme: dark;
  --bg: #08070b;
  --bg-soft: #100c13;
  --panel: rgba(20, 15, 23, 0.88);
  --panel-solid: #151018;
  --ink: #fff8f3;
  --muted: #b9aeb7;
  --dim: #786e78;
  --line: rgba(255, 239, 231, 0.11);
  --line-strong: rgba(255, 76, 111, 0.32);
  --red: #ff365f;
  --red-bright: #ff5477;
  --orange: #ff8a38;
  --cream: #ffe8d4;
  --mint: #43d4c4;
  --purple: #b966ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  --radius: 18px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, rgba(255, 54, 95, 0.17), transparent 38%),
    radial-gradient(circle at 90% 90%, rgba(185, 102, 255, 0.1), transparent 34%),
    #08070b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

button {
  border: 0;
  color: inherit;
}

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

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient__grid {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

.ambient__beam {
  position: absolute;
  left: -20%;
  top: -12%;
  width: 140%;
  height: 3px;
  opacity: 0.55;
  background: linear-gradient(90deg, transparent, var(--red), var(--orange), transparent);
  box-shadow: 0 0 32px rgba(255, 54, 95, 0.62);
  animation: ambientScan 8s ease-in-out infinite;
}

.ambient__flare {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.14;
}

.ambient__flare--one {
  left: -220px;
  top: 18%;
  background: var(--red);
}

.ambient__flare--two {
  right: -250px;
  bottom: -80px;
  background: var(--purple);
}

@keyframes ambientScan {
  0%,
  100% {
    transform: translateY(-10vh);
    opacity: 0;
  }
  15%,
  80% {
    opacity: 0.45;
  }
  60% {
    transform: translateY(116vh);
  }
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 22%),
    rgba(8, 7, 11, 0.9);
  border-inline: 1px solid rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.46);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(9px + env(safe-area-inset-top)) 18px 9px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 7, 11, 0.78);
  backdrop-filter: blur(18px);
}

.back-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.back-button svg,
.primary-button svg,
.ghost-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand b {
  color: var(--red-bright);
}

.live-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 54, 95, 0.2);
  border-radius: 99px;
  color: #eabac4;
  background: rgba(255, 54, 95, 0.07);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
  animation: livePulse 1.7s ease-in-out infinite;
}

@keyframes livePulse {
  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}

.screen {
  display: none;
  min-height: calc(100vh - 58px);
  padding: 24px 18px calc(34px + env(safe-area-inset-bottom));
}

.screen--active {
  display: block;
  animation: screenIn 0.38s ease both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-screen.screen--active {
  display: flex;
  flex-direction: column;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f4a8b6;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.eyebrow span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow span::before {
  content: "";
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 0 12px rgba(255, 54, 95, 0.65);
}

.eyebrow i {
  color: var(--dim);
  font-style: normal;
}

.eyebrow--center {
  justify-content: center;
}

.hero-copy h1 {
  margin-top: 13px;
  font-size: clamp(44px, 13.2vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-weight: 950;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.54);
}

.hero-copy h1 em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(100deg, #fff1df 4%, #ff7b68 45%, #ff315f 95%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-lead {
  max-width: 430px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.scanner {
  position: relative;
  width: min(74vw, 330px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  margin: 18px auto 14px;
  border: 1px solid rgba(255, 54, 95, 0.14);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 54, 95, 0.16), transparent 35%),
    repeating-radial-gradient(circle, transparent 0 27px, rgba(255, 255, 255, 0.035) 28px 29px),
    rgba(255, 255, 255, 0.012);
  box-shadow:
    inset 0 0 46px rgba(255, 54, 95, 0.08),
    0 0 60px rgba(255, 54, 95, 0.08);
  overflow: hidden;
}

.scanner::before,
.scanner::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(255, 232, 212, 0.13);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.scanner::after {
  inset: 27%;
  border-style: solid;
  border-color: rgba(255, 54, 95, 0.24);
  animation-direction: reverse;
  animation-duration: 9s;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.scanner__cross {
  position: absolute;
  left: 50%;
  top: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 54, 95, 0.18), transparent);
}

.scanner__cross--x {
  width: 100%;
  height: 1px;
  transform: translate(-50%, -50%);
}

.scanner__cross--y {
  width: 1px;
  height: 100%;
  transform: translate(-50%, -50%);
}

.scanner__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.scanner__ring--outer {
  width: 78%;
  height: 78%;
}

.scanner__ring--middle {
  width: 57%;
  height: 57%;
}

.scanner__ring--inner {
  width: 34%;
  height: 34%;
}

.scanner__sweep {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48%;
  height: 48%;
  transform-origin: 0 0;
  background: conic-gradient(from -8deg, rgba(255, 54, 95, 0.45), transparent 35deg);
  animation: radarSweep 3.2s linear infinite;
}

@keyframes radarSweep {
  to {
    transform: rotate(360deg);
  }
}

.scanner__core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(255, 232, 212, 0.25);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 138, 56, 0.18), transparent 45%),
    #0d0a0f;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 8px rgba(255, 54, 95, 0.035),
    0 0 34px rgba(255, 54, 95, 0.24);
}

.scanner__core img {
  width: 36px;
  height: 36px;
}

.scanner__core b {
  margin-top: 2px;
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 0.2em;
}

.scanner__core small {
  margin-top: 2px;
  color: var(--red-bright);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.scanner__pulse {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--red);
  border-radius: 50%;
  animation: corePulse 2.4s ease-out infinite;
}

@keyframes corePulse {
  70%,
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

.scanner__tag {
  position: absolute;
  z-index: 4;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #d8c8ce;
  background: rgba(10, 8, 12, 0.84);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26);
  font-size: 9px;
  font-weight: 800;
}

.scanner__tag--one {
  left: 7%;
  top: 28%;
}

.scanner__tag--two {
  right: 4%;
  top: 22%;
}

.scanner__tag--three {
  right: 8%;
  bottom: 22%;
}

.scanner__tag--four {
  left: 6%;
  bottom: 24%;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: auto;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.signal-strip div {
  position: relative;
  padding: 12px 6px;
  text-align: center;
}

.signal-strip div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 26%;
  width: 1px;
  height: 48%;
  background: var(--line);
}

.signal-strip strong {
  display: block;
  color: var(--cream);
  font-size: 18px;
  line-height: 1;
}

.signal-strip span {
  display: block;
  margin-top: 5px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.primary-button,
.ghost-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.primary-button {
  margin-top: 14px;
  color: #fff8f0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13), transparent 24% 78%, rgba(255, 255, 255, 0.08)),
    linear-gradient(105deg, #be173d, #ff365f 52%, #fa753b);
  border: 1px solid rgba(255, 216, 204, 0.22);
  box-shadow: 0 14px 38px rgba(255, 54, 95, 0.22);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.primary-button:active,
.ghost-button:active,
.option-button:active,
.back-button:active {
  transform: scale(0.985);
  filter: brightness(1.08);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.ghost-button {
  color: var(--cream);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 800;
}

.disclaimer-line {
  margin-top: 10px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

/* Access */
.access-screen.screen--active,
.scan-screen.screen--active {
  display: grid;
  align-content: center;
  gap: 14px;
}

.access-card,
.processing-card {
  position: relative;
  overflow: hidden;
  padding: 28px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 54, 95, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 35%),
    var(--panel);
  box-shadow: var(--shadow);
}

.access-card::before,
.processing-card::before,
.report-panel::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}

.access-symbol {
  position: relative;
  width: 102px;
  height: 102px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(255, 54, 95, 0.3);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 54, 95, 0.22), transparent 65%);
}

.access-symbol::before,
.access-symbol::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255, 232, 212, 0.18);
  border-radius: 50%;
  animation: spin 11s linear infinite;
}

.access-symbol::after {
  inset: -8px;
  border-style: solid;
  border-color: transparent var(--red) transparent transparent;
  animation-duration: 4s;
}

.access-symbol svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--cream);
  stroke-width: 1.45;
  stroke-linejoin: round;
}

.access-symbol span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
  transform: translate(38px, -30px);
}

.access-card h2,
.processing-card h2 {
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.18;
  text-align: center;
}

.access-copy,
.processing-card > p:not(.eyebrow) {
  max-width: 360px;
  margin: 10px auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

#accessForm {
  position: relative;
  z-index: 2;
  margin-top: 22px;
}

#accessForm > label {
  display: block;
  margin-bottom: 8px;
  color: #e5d8dc;
  font-size: 12px;
  font-weight: 800;
}

.code-field {
  position: relative;
}

.code-field input {
  width: 100%;
  height: 58px;
  padding: 0 74px 0 18px;
  outline: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-small);
  color: var(--cream);
  caret-color: var(--red);
  background: rgba(4, 3, 6, 0.58);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.22em;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.code-field input:focus {
  border-color: rgba(255, 54, 95, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 54, 95, 0.09);
}

.code-field input[aria-invalid="true"] {
  border-color: var(--red);
}

.code-field input::placeholder {
  color: #625a63;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.code-field button {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #d7c8cd;
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  cursor: pointer;
}

.field-hint,
.field-error {
  min-height: 18px;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.6;
}

.field-hint {
  color: var(--dim);
}

.field-error {
  color: #ff718c;
}

/* Quiz */
.quiz-status {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.025);
}

.quiz-status > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quiz-status span {
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.quiz-status strong {
  color: var(--muted);
  font-size: 12px;
}

.quiz-status strong b {
  color: var(--red-bright);
  font-size: 18px;
}

.progress-track {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.065);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange));
  box-shadow: 0 0 14px rgba(255, 54, 95, 0.55);
  transition: width 0.3s ease;
}

.question-card {
  position: relative;
  min-height: 242px;
  margin-top: 14px;
  overflow: hidden;
  padding: 20px 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 95% 8%, rgba(255, 54, 95, 0.18), transparent 30%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.04), transparent 48%),
    var(--panel);
  box-shadow: var(--shadow);
}

.question-card::before {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 54, 95, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 20px rgba(255, 54, 95, 0.025),
    0 0 0 48px rgba(255, 54, 95, 0.018);
}

.question-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--red-bright);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.question-meta i {
  color: var(--dim);
  font-style: normal;
}

.question-number {
  position: absolute;
  right: 18px;
  top: 36px;
  color: rgba(255, 255, 255, 0.035);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 88px;
  font-weight: 900;
  line-height: 1;
}

.question-card h2 {
  position: relative;
  z-index: 2;
  margin-top: 38px;
  max-width: 450px;
  color: var(--cream);
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.48;
  letter-spacing: -0.02em;
}

.question-card > p {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.6;
}

.option-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.option-button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px 1fr 24px;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  color: #d7cbd1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(17, 13, 19, 0.8);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.option-button:hover {
  border-color: rgba(255, 54, 95, 0.28);
}

.option-button--selected {
  color: #fff8f1;
  border-color: rgba(255, 72, 108, 0.7);
  background:
    linear-gradient(90deg, rgba(190, 23, 61, 0.66), rgba(255, 54, 95, 0.09) 70%),
    #181016;
  box-shadow: 0 12px 28px rgba(255, 54, 95, 0.12);
}

.option-letter {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 232, 212, 0.18);
  border-radius: 9px;
  color: #d5c6cc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 900;
}

.option-button--selected .option-letter {
  border-color: rgba(255, 232, 212, 0.36);
  color: #fff3e7;
  background: rgba(255, 255, 255, 0.08);
}

.option-label {
  display: grid;
  gap: 2px;
}

.option-label strong {
  font-size: 14px;
  font-weight: 800;
}

.option-label small {
  color: var(--dim);
  font-size: 9px;
}

.option-button--selected .option-label small {
  color: #d7a8b2;
}

.option-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: transparent;
  font-size: 11px;
}

.option-button--selected .option-check {
  color: white;
  border-color: var(--red);
  background: var(--red);
}

.quiz-footer {
  display: flex;
  align-items: center;
  margin-top: 14px;
}

.quiz-footer .ghost-button {
  width: 116px;
  min-height: 44px;
  font-size: 12px;
}

/* Processing */
.processing-card {
  text-align: center;
}

.processing-orb {
  position: relative;
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  margin: 24px auto 18px;
  border: 1px solid rgba(255, 54, 95, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 54, 95, 0.18), transparent 62%);
}

.processing-orb::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid transparent;
  border-top-color: var(--red);
  border-right-color: rgba(255, 138, 56, 0.42);
  border-radius: 50%;
  animation: spin 1.45s linear infinite;
}

.processing-orb span {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.processing-orb span:nth-child(1) {
  inset: 34px;
}

.processing-orb span:nth-child(2) {
  inset: 58px;
}

.processing-orb span:nth-child(3) {
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
  animation: processOrbit 2.2s linear infinite;
}

@keyframes processOrbit {
  from {
    transform: rotate(0) translateY(-82px);
  }
  to {
    transform: rotate(360deg) translateY(-82px);
  }
}

.processing-orb b {
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
}

.scan-steps {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  text-align: left;
}

.scan-steps > div {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
  color: #6f6770;
  background: rgba(0, 0, 0, 0.18);
  font-size: 11px;
  transition: 0.25s ease;
}

.scan-steps i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.scan-steps b {
  font-size: 8px;
  letter-spacing: 0.12em;
}

.scan-steps > div.active {
  color: var(--red-bright);
  border-color: rgba(255, 54, 95, 0.24);
}

.scan-steps > div.done {
  color: var(--mint);
}

/* Report */
.result-screen {
  padding-inline: 12px;
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 6px 16px;
  border-bottom: 1px solid var(--line);
}

.report-head p {
  color: var(--red-bright);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.report-head span {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}

.report-head img {
  width: 36px;
  height: 36px;
}

.result-title-block {
  padding: 26px 6px 20px;
}

.result-title-block h1 {
  margin-top: 10px;
  font-size: clamp(32px, 9vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.result-title-block > p:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.report-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 45%),
    var(--panel);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
}

.risk-overview {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
}

.risk-dial {
  --score-angle: 0deg;
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--red) var(--score-angle), rgba(255, 255, 255, 0.07) 0);
  box-shadow: 0 0 32px rgba(255, 54, 95, 0.12);
}

.risk-dial::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 54, 95, 0.12), transparent 50%),
    #110d13;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.34);
}

.risk-dial::after {
  content: "RISK INDEX";
  position: absolute;
  top: 30px;
  color: var(--dim);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.risk-dial > div {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  margin-top: 12px;
}

.risk-dial strong {
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  line-height: 1;
}

.risk-dial span {
  color: var(--dim);
  font-size: 9px;
}

.primary-signal {
  align-self: center;
  min-width: 0;
}

.primary-signal > span,
.interpretation-lead span,
.secondary-signal span {
  color: var(--red-bright);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.primary-signal h2 {
  margin-top: 7px;
  color: var(--cream);
  font-size: 25px;
}

.primary-signal p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.signal-percent {
  position: relative;
  height: 5px;
  margin-top: 13px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.signal-percent i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.signal-percent b {
  position: absolute;
  right: 0;
  top: 8px;
  color: #d8c9cf;
  font-size: 10px;
}

.risk-level {
  grid-column: 1 / -1;
  position: relative;
  margin-top: 2px;
  padding: 14px 14px 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 54, 95, 0.17);
  border-radius: var(--radius-small);
  background: linear-gradient(90deg, rgba(255, 54, 95, 0.12), rgba(255, 138, 56, 0.045));
}

.risk-level::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(var(--red), var(--orange));
}

.risk-level span {
  color: #d78b9a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.risk-level strong {
  display: block;
  margin-top: 4px;
  color: var(--cream);
  font-size: 17px;
}

.risk-level p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.report-section {
  padding-top: 20px;
}

.section-heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-heading span {
  color: var(--red-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 900;
}

.section-heading p {
  color: var(--dim);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.section-intro {
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.radar-wrap {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1;
  margin: 8px auto 2px;
}

.risk-radar {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 28px rgba(255, 54, 95, 0.1));
}

.radar-grid polygon,
.radar-grid path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.radar-grid polygon:first-child {
  stroke: rgba(255, 54, 95, 0.24);
}

.radar-shape {
  fill: rgba(255, 54, 95, 0.2);
  stroke: var(--red-bright);
  stroke-width: 2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 54, 95, 0.42));
  transition: 0.7s ease;
}

.radar-dots circle {
  fill: #fff7ed;
  stroke: var(--red);
  stroke-width: 2;
}

.radar-center {
  fill: var(--orange);
}

.radar-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.radar-label {
  position: absolute;
  left: var(--label-x);
  top: var(--label-y);
  min-width: 50px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  color: #d8cbd0;
  background: rgba(10, 8, 12, 0.86);
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  font-size: 9px;
  font-weight: 800;
}

.radar-label b {
  display: block;
  margin-top: 1px;
  color: var(--label-color, var(--red-bright));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.spectrum-list {
  display: grid;
  gap: 8px;
  margin-top: 3px;
}

.spectrum-item {
  display: grid;
  grid-template-columns: 68px 1fr 34px;
  align-items: center;
  gap: 9px;
  color: #d6c8ce;
  font-size: 10px;
}

.spectrum-item > span {
  font-weight: 750;
}

.spectrum-item > b {
  color: var(--spectrum-color);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  text-align: right;
}

.spectrum-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.065);
}

.spectrum-bar i {
  display: block;
  width: var(--spectrum-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), var(--spectrum-color));
}

.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.matrix-card {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.022);
}

.matrix-card::after {
  content: attr(data-index);
  position: absolute;
  right: 5px;
  top: 3px;
  color: rgba(255, 255, 255, 0.035);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  font-weight: 900;
}

.matrix-card > span {
  position: relative;
  z-index: 2;
  color: var(--red-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.matrix-card h3 {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  color: var(--cream);
  font-size: 15px;
}

.matrix-card p {
  position: relative;
  z-index: 2;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.interpretation-lead {
  margin-top: 17px;
}

.interpretation-lead strong {
  display: block;
  margin-top: 4px;
  color: var(--cream);
  font-size: 25px;
}

.interpretation-copy {
  margin-top: 12px;
  color: #cec0c7;
  font-size: 13px;
  line-height: 1.85;
}

.secondary-signal {
  margin-top: 16px;
  padding: 13px 14px;
  border-left: 3px solid var(--orange);
  background: rgba(255, 138, 56, 0.055);
}

.secondary-signal span {
  color: var(--orange);
}

.secondary-signal p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.advice-list {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.advice-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.02);
}

.advice-item > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 54, 95, 0.27);
  border-radius: 10px;
  color: var(--red-bright);
  background: rgba(255, 54, 95, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
}

.advice-item b {
  display: block;
  color: var(--cream);
  font-size: 13px;
}

.advice-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.62;
}

.support-note {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(67, 212, 196, 0.16);
  border-radius: var(--radius-small);
  background: rgba(67, 212, 196, 0.045);
}

.support-note b {
  color: var(--mint);
  font-size: 12px;
}

.support-note p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.62;
}

.report-disclaimer {
  margin: 14px 3px 18px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-small);
  color: var(--dim);
}

.report-disclaimer b {
  color: #9e8f98;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.report-disclaimer p {
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.65;
}

.result-actions {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 9px;
  padding: 0 2px;
}

.result-actions .primary-button {
  margin-top: 0;
}

.result-actions .ghost-button {
  min-height: 52px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 100;
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--cream);
  background: rgba(22, 16, 24, 0.95);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: 0.24s ease;
  pointer-events: none;
  font-size: 12px;
  text-align: center;
}

.toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 700px) {
  .screen {
    padding-inline: 28px;
  }

  .result-screen {
    padding-inline: 18px;
  }
}

@media (max-width: 380px) {
  .screen {
    padding-inline: 14px;
  }

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

  .scanner {
    width: min(70vw, 270px);
    margin-block: 12px 10px;
  }

  .scanner__core {
    width: 88px;
    height: 88px;
  }

  .question-card h2 {
    margin-top: 28px;
    font-size: 21px;
  }

  .risk-overview {
    grid-template-columns: 112px 1fr;
  }

  .risk-dial {
    width: 112px;
    height: 112px;
  }

  .risk-dial::after {
    top: 25px;
  }

  .risk-dial strong {
    font-size: 37px;
  }

  .primary-signal h2 {
    font-size: 21px;
  }

  .matrix-card {
    min-height: 166px;
  }
}

@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;
  }
}

@media print {
  body {
    background: #fff;
  }

  .ambient,
  .topbar,
  .result-actions,
  .toast {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  .screen {
    display: none !important;
  }

  .result-screen.screen--active {
    display: block !important;
  }
}
