:root {
  --ink: #15171d;
  --muted: #68707d;
  --line: rgba(22, 25, 32, 0.12);
  --paper: rgba(255, 255, 255, 0.86);
  --paper-strong: rgba(255, 255, 255, 0.94);
  --red: #c0182d;
  --cyan: #237c98;
  --gold: #b4863a;
  --track: #252b33;
  --shadow: 0 18px 50px rgba(18, 26, 36, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(180deg, rgba(34, 42, 52, 0.24), rgba(25, 31, 39, 0.36)),
    linear-gradient(180deg, rgba(246, 248, 250, 0.72), rgba(229, 235, 239, 0.82)),
    url("./assets/images-jpeg/quiz-bg-start-lights.jpg") center top / min(100vw, 520px) auto fixed no-repeat,
    linear-gradient(180deg, #d7e0e6, #909da8);
}

button {
  font: inherit;
}

.app {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 18px 28px;
}

.screen {
  min-height: calc(100vh - 50px);
  display: flex;
  flex-direction: column;
}

.glass {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  justify-content: flex-end;
  gap: 18px;
}

.hero-panel,
.question-panel,
.result-panel {
  border-radius: 8px;
  padding: 22px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

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

h1 {
  margin-bottom: 14px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 23px;
  line-height: 1.32;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.lead {
  color: #39404a;
  font-size: 15px;
  line-height: 1.75;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 20px;
}

.meta span,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.6);
  color: #3e4651;
  font-size: 12px;
  text-align: center;
}

.primary,
.secondary,
.ghost {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
}

.primary {
  background: var(--track);
  color: #fff;
  font-weight: 700;
}

.secondary {
  background: rgba(192, 24, 45, 0.1);
  color: #8f1424;
  font-weight: 700;
}

.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: #303741;
}

.quiz-head {
  margin-bottom: 14px;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 25, 32, 0.1);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 180ms ease;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.option {
  position: relative;
  width: 100%;
  border: 1px solid rgba(22, 25, 32, 0.12);
  border-radius: 8px;
  padding: 14px 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #202630;
  text-align: left;
  line-height: 1.55;
  cursor: pointer;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
}

.option:hover,
.option.selected {
  border-color: rgba(192, 24, 45, 0.5);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(29, 35, 43, 0.08);
}

.option strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(192, 24, 45, 0.09);
  color: #a41729;
  font-size: 12px;
}

.option-copy {
  min-width: 0;
}

.option em {
  align-self: start;
  border-left: 1px solid rgba(22, 25, 32, 0.12);
  padding-left: 8px;
  color: rgba(32, 38, 48, 0.4);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.option.selected em {
  color: var(--red);
}

.nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.result-screen {
  gap: 14px;
}

.poster {
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #1d232b;
  box-shadow: var(--shadow);
}

.poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-hero {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 13, 18, 0.06) 0%, rgba(10, 13, 18, 0.3) 42%, rgba(10, 13, 18, 0.86) 100%),
    linear-gradient(135deg, rgba(192, 24, 45, 0.28), transparent 36%);
}

.hero-topline {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero-topline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), transparent);
}

.hero-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fff;
}

.type-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.hero-copy .type-kicker {
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.result-title {
  margin-bottom: 10px;
  max-width: 9em;
  font-family:
    "Arial Narrow", "Bahnschrift Condensed", "DIN Condensed", Impact,
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 40px;
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.42),
    2px 0 0 rgba(192, 24, 45, 0.38);
}

.tagline {
  margin-bottom: 16px;
  color: #343b45;
  font-size: 16px;
  line-height: 1.65;
}

.hero-copy .tagline {
  max-width: 92%;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.55;
}

.fit-meter {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin: 0 0 12px;
  padding: 8px 0;
}

.fit-meter span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.fit-meter b {
  color: #fff;
  font-family:
    "Arial Narrow", "Bahnschrift Condensed", Impact, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 34px;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 2px 0 0 rgba(192, 24, 45, 0.42);
}

.mini-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.mini-dashboard span {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 7px 5px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(8, 12, 18, 0.24);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-chips {
  margin-bottom: 0;
}

.hero-chips .chip {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(8px);
}

.codriver-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(192, 24, 45, 0.22);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 12px 14px;
  background:
    linear-gradient(90deg, rgba(192, 24, 45, 0.1), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.56);
}

.codriver-strip::after {
  content: "";
  width: 34px;
  height: 100%;
  position: absolute;
  right: 58px;
  top: 0;
  background: linear-gradient(120deg, transparent 0 42%, rgba(192, 24, 45, 0.2) 43% 56%, transparent 57%);
  pointer-events: none;
}

.codriver-strip span {
  color: #7a1d2a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.codriver-strip b {
  color: #222832;
  font-size: 15px;
}

.section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.race-section {
  position: relative;
}

.log-card {
  border: 1px solid rgba(22, 25, 32, 0.12);
  border-left: 4px solid #202630;
  border-radius: 8px;
  padding: 14px 14px 14px 16px;
  background:
    linear-gradient(90deg, rgba(32, 38, 48, 0.05), transparent 42%),
    rgba(255, 255, 255, 0.5);
}

.memory-card {
  border-left-color: var(--red);
}

.race-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #202630;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.race-section h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(32, 38, 48, 0.24), transparent);
}

.race-section h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 20px;
  border-radius: 999px;
  background: #202630;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0;
}

.section p,
.section li {
  color: #363e49;
  font-size: 14px;
  line-height: 1.72;
}

.section ul {
  padding-left: 18px;
  margin: 0;
}

.pace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pace-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.52);
}

.pace-grid b {
  display: block;
  margin-bottom: 8px;
  color: #982033;
  font-size: 12px;
}

.pace-grid p {
  margin-bottom: 6px;
}

.pace-grid p:last-child {
  margin-bottom: 0;
}

.tendency-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.radar-card {
  display: grid;
  place-items: center;
  border: 1px solid rgba(22, 25, 32, 0.1);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 6px;
  background:
    radial-gradient(circle at center, rgba(180, 134, 58, 0.12), transparent 58%),
    linear-gradient(135deg, rgba(32, 38, 48, 0.05), rgba(255, 255, 255, 0.54)),
    rgba(255, 255, 255, 0.56);
}

.radar-card canvas {
  display: block;
  width: min(100%, 300px);
  max-width: 300px;
  aspect-ratio: 1;
}

.tendency {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(22, 25, 32, 0.14);
  border-radius: 8px;
  padding: 11px 12px;
  background:
    linear-gradient(90deg, rgba(35, 124, 152, 0.08), transparent 46%),
    rgba(255, 255, 255, 0.58);
  color: #343b45;
  font-size: 13px;
}

.tendency::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--cyan);
}

.tendency b {
  white-space: nowrap;
  color: #242b35;
}

.note-section {
  border: 1px solid rgba(180, 134, 58, 0.32);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(180, 134, 58, 0.16), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.58);
}

.note-section h3 {
  margin-bottom: 8px;
}

.alt-card {
  border: 1px solid rgba(35, 124, 152, 0.24);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(35, 124, 152, 0.12), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.58);
}

.type-book {
  border: 1px solid rgba(22, 25, 32, 0.12);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.54);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.type-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(22, 25, 32, 0.1);
  border-radius: 8px;
  min-height: 86px;
  padding: 10px 9px 10px 11px;
  background: rgba(255, 255, 255, 0.58);
}

.type-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(32, 38, 48, 0.28);
}

.type-card.current {
  border-color: rgba(192, 24, 45, 0.35);
  background:
    linear-gradient(90deg, rgba(192, 24, 45, 0.09), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.64);
}

.type-card.current::before {
  background: var(--red);
}

.type-card div {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.type-card span {
  color: rgba(32, 38, 48, 0.46);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.type-card b {
  color: #202630;
  font-size: 13px;
  line-height: 1.28;
}

.type-card small {
  color: #982033;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.fineprint {
  margin-top: 16px;
  color: #747b85;
  font-size: 12px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(20, 24, 29, 0.9);
  color: #fff;
  font-size: 13px;
}

@media (max-width: 390px) {
  .app {
    padding: 16px 12px 22px;
  }

  .hero-panel,
  .question-panel,
  .result-panel {
    padding: 18px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 20px;
  }

  .result-title {
    font-size: 34px;
  }

  .mini-dashboard {
    grid-template-columns: 1fr;
  }

  .pace-grid {
    grid-template-columns: 1fr;
  }
}
