:root {
  --ink: #0b0b0f;
  --paper: #fffdf4;
  --acid: #b8ff1c;
  --pink: #ff3b82;
  --cyan: #28ddf2;
  --red: #ff4a3d;
  --gray: #e8e6da;
  --muted: #6f6c63;
  --line: rgba(11, 11, 15, 0.08);
  --shadow: 5px 5px 0 var(--ink);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f5f5f2;
}

body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family:
    Inter,
    Arial,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  width: min(100vw, 390px);
  height: min(100svh, 844px);
  min-height: 844px;
  overflow: hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 56px 56px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 10px 10px 0 rgba(11, 11, 15, 0.15);
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  padding: 28px 24px 20px;
  overflow: hidden;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-lockup,
.inner-title,
.poster-header,
.progress-head,
.dialog-head {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 10px;
}

.brand-badge,
.brand-inline {
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  height: 28px;
  padding: 0 7px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: var(--acid);
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}

.brand-inline {
  min-width: 40px;
  height: 22px;
  font-size: 13px;
}

.version,
.micro-label,
.question-kicker,
.disclaimer {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.icon-button,
.mini-button {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.mini-button {
  min-width: 58px;
  height: 34px;
  padding: 0 12px;
  font-size: 16px;
  box-shadow: 4px 4px 0 var(--ink);
}

.mini-button.solid {
  min-width: 100px;
  background: var(--acid);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.primary-button {
  background: var(--acid);
}

.secondary-button {
  background: var(--paper);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.mini-button:active,
.option-button:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.home-hero {
  position: relative;
  margin-top: 34px;
}

.micro-label {
  margin: 0 0 10px;
}

.hero-title-row {
  position: relative;
}

.wordmark {
  position: relative;
  margin: 0;
  width: fit-content;
  color: var(--ink);
  font-size: 74px;
  font-weight: 950;
  line-height: 0.82;
  text-transform: uppercase;
}

.wordmark::before,
.wordmark::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
}

.wordmark::before {
  color: var(--pink);
  transform: translate(4px, -2px);
}

.wordmark::after {
  color: var(--cyan);
  transform: translate(-4px, 3px);
}

.corner-sticker {
  position: absolute;
  right: 2px;
  top: -10px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--acid);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

.main-title {
  margin: 8px 0 18px;
  font-size: 34px;
  font-weight: 950;
  line-height: 1.08;
}

.speech-bubble {
  position: relative;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 950;
}

.speech-bubble span {
  margin-left: 4px;
  color: var(--pink);
  font-size: 24px;
}

.loading-block {
  margin-top: 28px;
}

.loading-meta {
  display: flex;
  justify-content: space-between;
  padding: 0 3px 7px;
  font-size: 11px;
  font-weight: 900;
}

.broken-bar {
  position: relative;
  height: 34px;
  padding: 4px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.broken-bar span,
.analysis-bar span {
  display: block;
  height: 100%;
  width: 42%;
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--acid) 0 9px, #9eea13 9px 13px);
}

.chip-grid,
.remedy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-grid {
  margin-top: 24px;
}

.status-chip,
.remedy-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.acid {
  background: var(--acid);
}

.pink {
  background: var(--pink);
}

.cyan {
  background: var(--cyan);
}

.paper {
  background: var(--paper);
}

.start-button {
  width: 100%;
  margin-top: 30px;
  min-height: 66px;
  font-size: 19px;
}

.home-count {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.home-count strong {
  font-size: 15px;
}

.bottom-teaser {
  margin: auto -24px -20px;
  padding: 18px 24px 20px;
  border-top: 1.5px solid var(--ink);
  background: rgba(255, 253, 244, 0.62);
}

.bottom-teaser h3,
.bottom-teaser p {
  margin: 0;
}

.bottom-teaser h3 {
  font-size: 15px;
  font-weight: 950;
}

.bottom-teaser p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.topbar.inner {
  min-height: 44px;
}

.inner-title {
  flex: 1;
  justify-content: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.progress-block {
  margin-top: 42px;
}

.progress-head {
  justify-content: flex-start;
  gap: 12px;
}

.progress-head strong {
  font-size: 25px;
  font-weight: 950;
}

.progress-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.segmented-progress {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.segmented-progress span {
  height: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--gray);
}

.segmented-progress span.is-active {
  background: var(--acid);
}

.question-block {
  margin-top: 34px;
}

.question-kicker {
  margin: 0 0 14px;
  color: var(--pink);
}

.question-title {
  margin: 0;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.2;
}

.question-title::after {
  content: "";
  display: block;
  width: 156px;
  height: 5px;
  margin: 12px auto 0;
  background: var(--acid);
}

.option-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.option-button {
  position: relative;
  display: grid;
  grid-template-columns: 68px 1fr 20px;
  min-height: 82px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: left;
}

.option-button.is-selected {
  box-shadow: var(--shadow);
  transform: translate(-2px, -2px);
}

.option-button.is-selected::after {
  content: "";
  align-self: center;
  justify-self: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
}

.option-letter {
  display: grid;
  place-items: center;
  border-right: 2px solid var(--ink);
  font-size: 38px;
  font-weight: 950;
}

.option-button:nth-child(1) .option-letter,
.option-button:nth-child(3) .option-letter {
  background: var(--acid);
}

.option-button:nth-child(2) .option-letter,
.option-button:nth-child(4) .option-letter {
  background: var(--cyan);
}

.option-copy {
  min-width: 0;
  padding: 18px 12px;
}

.option-copy strong {
  display: block;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.25;
}

.option-copy span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.quiz-nav {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 30px;
  margin-top: auto;
  padding-bottom: 8px;
}

.quiz-nav .primary-button,
.quiz-nav .secondary-button {
  min-height: 58px;
  font-size: 17px;
}

.screen-analysis {
  padding-top: 28px;
}

.screen-report {
  overflow-y: auto;
}

.analysis-hero {
  margin-top: 44px;
}

.analysis-hero h1 {
  margin: 12px 0 30px;
  font-size: 26px;
  font-weight: 950;
}

.radar {
  position: relative;
  display: grid;
  place-items: center;
  width: 156px;
  height: 156px;
  margin: 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.radar span {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.radar span:first-child {
  width: 108px;
  height: 108px;
  background: var(--acid);
}

.radar span:nth-child(2) {
  width: 54px;
  height: 54px;
  background: var(--pink);
}

.radar strong {
  z-index: 1;
  font-size: 17px;
}

.analysis-percent {
  margin-top: 18px;
  text-align: center;
  font-size: 30px;
  font-weight: 950;
}

.analysis-bar {
  width: 156px;
  height: 14px;
  margin: 16px auto 0;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.analysis-bar span {
  width: 73%;
  background: var(--cyan);
}

.analysis-checks {
  display: grid;
  gap: 9px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.analysis-checks li {
  min-height: 28px;
  padding: 6px 12px 6px 34px;
  border: 1.5px solid var(--muted);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.analysis-checks li::before {
  content: "✓";
  margin-left: -22px;
  margin-right: 11px;
  color: #6ac30f;
}

.result-topbar {
  min-height: 44px;
}

.tape-title {
  padding: 9px 28px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 950;
}

.result-card {
  margin-top: 12px;
  padding: 20px 20px 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 253, 244, 0.72);
  box-shadow: var(--shadow);
}

.poster-header {
  justify-content: space-between;
  gap: 12px;
}

.poster-header strong {
  display: block;
  font-size: 27px;
  font-weight: 950;
}

.poster-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.poster-header mark {
  padding: 7px 9px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--acid);
  font-size: 10px;
  font-weight: 950;
}

.art-slot {
  position: relative;
  min-height: 148px;
  margin-top: 18px;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 253, 244, 0.72);
}

.slot-chip {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--cyan);
  font-size: 12px;
  font-weight: 950;
}

.art-slot > strong {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 22px;
  font-weight: 950;
}

.face-sticker {
  position: absolute;
  left: 50%;
  top: 52px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--acid);
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: 950;
}

.art-slot p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.result-name {
  margin: 14px 0 0;
  padding: 13px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 30px;
  font-weight: 950;
  text-align: center;
}

.score-panel {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.score-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 950;
}

.score-panel em {
  color: var(--pink);
  font-style: normal;
  font-size: 40px;
  line-height: 0.9;
}

.meter-stack {
  align-self: center;
  display: flex;
  gap: 4px;
}

.meter-stack span {
  width: 8px;
  height: 24px;
  border: 1.5px solid var(--ink);
  background: var(--gray);
}

.meter-stack span.is-active {
  background: var(--pink);
}

.score-panel p {
  grid-column: 2;
  margin: -9px 0 0;
  font-size: 12px;
  font-weight: 900;
}

.result-card blockquote {
  position: relative;
  margin: 16px 0 0;
  padding: 0 0 0 38px;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.35;
}

.result-card blockquote::before {
  content: "“";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  border: 2px solid var(--ink);
  background: var(--pink);
}

.remedy-section {
  margin-top: 16px;
}

.remedy-section h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 950;
}

.remedy-list span:nth-child(1) {
  background: var(--acid);
}

.remedy-list span:nth-child(2) {
  background: var(--cyan);
}

.remedy-list span:nth-child(3) {
  background: var(--paper);
}

.unlock-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding: 14px 18px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.unlock-panel strong,
.unlock-panel span {
  display: block;
}

.unlock-panel strong {
  font-size: 15px;
  font-weight: 950;
}

.unlock-panel span {
  margin-top: 5px;
  color: var(--gray);
  font-size: 11px;
  font-weight: 700;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 78px 78px;
  gap: 12px;
  margin-top: 26px;
}

.action-grid .primary-button,
.action-grid .secondary-button {
  min-height: 56px;
  font-size: 16px;
}

.disclaimer {
  margin: auto 0 0;
  padding-top: 12px;
  text-align: center;
  font-size: 10px;
  line-height: 1.45;
}

.report-title {
  margin: 8px 0 14px;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.25;
}

.report-art {
  margin-top: 0;
  min-height: 116px;
}

.report-art .face-sticker {
  top: 42px;
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.report-summary,
.driver-block,
.module-card {
  margin-top: 18px;
}

.report-summary,
.module-card {
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.report-summary h2,
.driver-block h2,
.module-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 950;
}

.report-summary p,
.module-card p {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.driver-row {
  display: grid;
  grid-template-columns: 80px 1fr 28px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 950;
}

.driver-bar {
  height: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--gray);
  overflow: hidden;
}

.driver-bar span {
  display: block;
  height: 100%;
  background: var(--acid);
}

.driver-row:nth-child(3) .driver-bar span {
  background: var(--pink);
}

.driver-row:nth-child(4) .driver-bar span {
  background: var(--cyan);
}

.driver-row:nth-child(5) .driver-bar span {
  background: var(--red);
}

.module-card {
  position: relative;
  padding-left: 66px;
  box-shadow: var(--shadow);
}

.module-card strong {
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--acid);
  font-weight: 950;
}

.module-card:nth-child(2) strong {
  background: var(--cyan);
}

.module-card:nth-child(3) strong {
  background: var(--pink);
}

.poster-dialog {
  width: min(92vw, 390px);
  max-height: 92svh;
  padding: 24px 20px 18px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 56px 56px;
  color: var(--ink);
}

.poster-dialog::backdrop {
  background: rgba(11, 11, 15, 0.72);
}

.dialog-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.dialog-head strong {
  font-size: 26px;
  font-weight: 950;
}

#poster-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62svh;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.dialog-actions .primary-button,
.dialog-actions .secondary-button {
  min-height: 52px;
  font-size: 15px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(330px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 389px) {
  .app-shell {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    padding-left: 20px;
    padding-right: 20px;
  }
}
