:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --line: #e9e9e9;
  --soft: #f7f7f7;
  --soft-2: #fbfbfb;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.04);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

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

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

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.app-frame {
  width: 100%;
}

.intro-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.intro-box {
  width: min(720px, 100%);
  display: grid;
  justify-items: center;
  gap: 32px;
  text-align: center;
}

.intro-title {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.page-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px 52px;
}

.page-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.page-step {
  font-size: 12px;
  color: var(--muted);
}

.page-title {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-note,
.inline-note,
.athlete-copy p,
.advice-card p,
.note-box,
.error-box {
  color: var(--muted);
  line-height: 1.8;
}

.page-note {
  margin: 16px 0 0;
}

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

.section-label {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chip-row,
.meta-row,
.trait-row,
.button-row,
.advice-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-button,
.chip-button {
  min-height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
}

.choice-button.active,
.chip-button.active {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.chip-button.is-disabled,
.chip-button.is-disabled:disabled {
  opacity: 1;
  background: linear-gradient(180deg, #fafafa, #f1f1f1);
  color: #a1a1a1;
  border-color: #e4e4e4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.chip-button.is-disabled:hover {
  transform: none;
}

.availability-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.btn-primary,
.btn-secondary {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 700;
}

.btn-primary {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: #ffffff;
  color: #111111;
  border: 1px solid var(--line);
}

.intro-button {
  min-width: 160px;
}

.action-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.quiz-header {
  display: grid;
  gap: 18px;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #efefef;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #555555, #111111);
  transition: width 0.2s ease;
}

.progress-text {
  font-size: 13px;
  color: var(--muted);
}

.question-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.question-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fafafa);
}

.question-card.is-complete {
  border-color: #d5d5d5;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.03);
}

.question-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.question-title {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.7;
}

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

.option {
  display: flex;
  align-items: stretch;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  position: relative;
  overflow: visible;
}

.option:hover {
  border-color: #cccccc;
}

.option.is-active {
  border-color: #111111;
  background: #f4f4f4;
}

.option.is-locked {
  border-color: #efefef;
  background: linear-gradient(180deg, #fbfbfb, #f2f2f2);
}

.option.is-locked:hover {
  transform: none;
  border-color: #efefef;
}

.weighted-options {
  gap: 12px;
}

.weight-option {
  width: 100%;
  text-align: left;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  padding: 0;
  background: #ffffff;
}

.weight-option:disabled {
  opacity: 1;
}

.weight-option.is-locked {
  cursor: not-allowed;
}

.option-meter {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #111111, #444444);
  opacity: 0.12;
  pointer-events: none;
}

.weight-option.is-locked .option-meter {
  opacity: 0;
}

.option-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 14px;
}

.weight-option.is-locked .option-content {
  opacity: 0.42;
}

.option-letter {
  width: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.option-copy {
  line-height: 1.8;
}

.option-percent {
  min-width: 52px;
  text-align: right;
  font-weight: 700;
}

.selection-hint {
  position: absolute;
  right: 10px;
  top: -12px;
  transform: translateY(-100%);
  display: grid;
  gap: 8px;
  width: min(280px, calc(100vw - 80px));
  padding: 12px 14px;
  border-radius: 16px;
  background: #111111;
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
  z-index: 4;
}

.selection-hint::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: #111111;
  transform: rotate(45deg);
  border-radius: 3px;
}

.selection-hint-text {
  font-size: 13px;
  line-height: 1.6;
}

.selection-hint-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.selection-hint-arrow-line {
  position: relative;
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.selection-hint-arrow-line::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  border-radius: inherit;
  background: #ffffff;
  animation: swipe-line 1s ease-in-out infinite alternate;
}

.selection-hint-arrow-head {
  font-size: 15px;
  letter-spacing: 0.1em;
  animation: swipe-head 0.9s ease-in-out infinite alternate;
}

.result-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.athlete-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fafafa);
}

.result-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.result-label-aspect {
  background: #2b2b2b;
}

.result-label-anti {
  background: #f1f1f1;
  color: #111111;
  border: 1px solid var(--line);
}

.athlete-copy h3 {
  margin: 10px 0 10px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.08;
}

.meta-row {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.result-caption {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.athlete-image-shell {
  min-height: 300px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--soft);
}

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

.trait-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 13px;
}

.result-next,
.compare-box,
.advice-action {
  margin-top: 22px;
  border-radius: 18px;
  background: #111111;
  color: #ffffff;
}

.result-next {
  padding: 16px 18px;
  font-weight: 700;
}

.goal-form {
  margin-top: 22px;
}

.goal-label {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}

.goal-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.text-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.text-input:focus {
  outline: 2px solid rgba(17, 17, 17, 0.08);
  border-color: #111111;
}

.error-box,
.note-box,
.advice-card {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--soft-2);
}

.result-actions {
  justify-content: flex-end;
}

.compare-box {
  padding: 18px;
}

.compare-box strong,
.compare-box span {
  display: block;
}

.compare-box span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.advice-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.advice-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
}

.advice-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.advice-metrics {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.advice-action {
  padding: 12px 14px;
  line-height: 1.7;
}

.pool-page-shell {
  max-width: 1180px;
}

.vector-panel {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #fafafa);
}

.vector-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.vector-kicker {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vector-panel-head h3 {
  margin: 8px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

.vector-panel-note {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.vector-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 13px;
}

.legend-chip strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
}

.vector-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.vector-detail-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.vector-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.vector-detail-copy {
  display: grid;
  gap: 4px;
}

.vector-detail-copy strong {
  font-size: 14px;
}

.vector-detail-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.vector-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-weight: 700;
}

.vector-value.is-positive {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.vector-value.is-negative {
  background: #f1f1f1;
  color: #111111;
}

.vector-value.is-neutral {
  color: var(--muted);
}

.pool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.pool-athlete-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.pool-athlete-card.is-top-match {
  border-color: #111111;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.06);
}

.pool-athlete-head {
  display: grid;
  grid-template-columns: auto 1fr 104px;
  gap: 14px;
  align-items: center;
}

.pool-athlete-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  border-radius: 18px;
  background: #111111;
  color: #ffffff;
  font-weight: 800;
}

.pool-athlete-copy h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.pool-athlete-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pool-athlete-thumb {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--soft);
  width: 104px;
  height: 132px;
}

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

.vector-mini-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.vector-mini-item {
  display: grid;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.vector-mini-index {
  font-size: 11px;
  color: var(--muted);
}

.vector-mini-value {
  font-weight: 700;
}

.vector-mini-item.is-positive {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.vector-mini-item.is-positive .vector-mini-index {
  color: rgba(255, 255, 255, 0.72);
}

.vector-mini-item.is-negative {
  background: #f2f2f2;
  color: #111111;
}

.vector-mini-item.is-neutral {
  color: var(--muted);
}

@media (max-width: 860px) {
  .choice-grid,
  .athlete-card,
  .goal-controls,
  .pool-grid,
  .vector-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 14px 12px 42px;
  }

  .page-card {
    padding: 18px;
  }

  .intro-title {
    font-size: 38px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row,
  .button-row,
  .chip-row,
  .meta-row,
  .trait-row,
  .advice-metrics,
  .result-actions,
  .question-top,
  .pool-athlete-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .athlete-image-shell {
    min-height: 240px;
  }

  .option-content {
    grid-template-columns: auto 1fr;
  }

  .option-percent {
    grid-column: 2;
    text-align: left;
  }

  .selection-hint {
    left: 8px;
    right: 8px;
    width: auto;
  }

  .pool-athlete-head {
    grid-template-columns: 1fr;
  }

  .pool-athlete-thumb {
    width: 100%;
    height: 220px;
  }

  .vector-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@keyframes swipe-head {
  from {
    transform: translateX(-4px);
    opacity: 0.7;
  }

  to {
    transform: translateX(4px);
    opacity: 1;
  }
}

@keyframes swipe-line {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(180%);
  }
}
