:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #767676;
  --paper: #ffffff;
  --soft: #f4f4f4;
  --line: #e6e6e6;
  --yellow: #fff06a;
  --coral: #ff744f;
  --mint: #d9f3e7;
  --blue: #b9d8ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

.language-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  min-width: 54px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 244, 244, 0.86);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.app {
  width: min(100%, 900px);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 34px) 18px 34px;
  display: block;
}

.view-home {
  min-height: calc(100svh - 68px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(10px, 4vh, 34px);
}

.view-home.is-active {
  display: flex;
}

.view {
  display: none;
  width: 100%;
}

.view.is-active {
  display: block;
}

.view.view-home.is-active {
  display: flex;
}

.home-inner {
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
}

.mini-kicker {
  margin: 0 0 10px;
  color: #9d9d9d;
  font-size: 14px;
  font-weight: 900;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(58px, 14vw, 116px);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: 0.02em;
}

.city-marquee {
  width: min(660px, 100%);
  margin: 0 auto 22px;
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 4px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-row {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: slide-left var(--speed, 32s) linear infinite;
}

.marquee-row:nth-child(2) {
  animation-name: slide-right;
}

.city-thumb {
  flex: 0 0 86px;
  width: 86px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

@keyframes slide-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes slide-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.home-copy h2 {
  max-width: 660px;
  margin: 4px auto 12px;
  font-size: clamp(30px, 6.4vw, 54px);
  font-weight: 950;
  line-height: 1.04;
}

.home-copy h2::after {
  content: "";
  display: block;
  width: min(420px, 82%);
  height: 18px;
  margin: -13px auto 0;
  background: var(--yellow);
  position: relative;
  z-index: -1;
}

.home-copy p {
  margin: 0 auto 24px;
  color: #555;
  font-size: clamp(17px, 3.8vw, 23px);
  font-weight: 700;
  line-height: 1.45;
}

.fine-print {
  margin: 16px 0 0;
  color: #999;
  font-size: 13px;
  font-weight: 800;
}

.primary-action,
.secondary-action,
.icon-action,
.option-card {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.primary-action {
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: white;
  font-size: 17px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.primary-action:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.primary-action.wide {
  width: 100%;
}

.primary-action.compact,
.secondary-action {
  min-height: 46px;
  font-size: 15px;
}

.secondary-action {
  padding: 0 18px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
}

.quiz-shell,
.loading-shell {
  width: min(680px, 100%);
  margin: clamp(24px, 7vh, 76px) auto 0;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.icon-action {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

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

.progress-text {
  color: #9d9d9d;
  font-size: 13px;
  font-weight: 900;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 220ms ease;
}

.question-hint {
  margin: 0 0 12px;
  color: #9d9d9d;
  font-size: 14px;
  font-weight: 900;
}

.question-title {
  margin: 0 0 28px;
  font-size: clamp(30px, 7vw, 54px);
  line-height: 1.08;
  font-weight: 950;
}

.option-list {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.option-card {
  width: 100%;
  min-height: 62px;
  padding: 18px 18px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  text-align: left;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.38;
  border: 2px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.option-card:hover {
  transform: translateY(-1px);
  background: #eeeeee;
}

.option-card.is-selected {
  border-color: var(--ink);
  background: var(--yellow);
}

.empty-choice {
  margin: -4px 0 16px;
  color: #d34242;
  font-size: 13px;
  font-weight: 900;
}

.loading-shell {
  text-align: center;
}

.loading-orbit {
  width: 92px;
  height: 92px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 12px solid var(--soft);
  border-top-color: var(--ink);
  animation: spin 900ms linear infinite;
}

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

.loading-text {
  margin: 0;
  color: #555;
  font-size: 18px;
  font-weight: 900;
}

.view-result {
  width: min(520px, 100%);
  margin: 0 auto;
  padding-top: 10px;
}

.result-card {
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: #9d9d9d;
  font-size: 13px;
  font-weight: 950;
}

.result-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 22px;
}

.result-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.result-prefix {
  margin: 0 0 4px;
  color: #aaa;
  font-size: 14px;
  font-weight: 950;
}

.result-city {
  margin: 0;
  font-size: clamp(52px, 15vw, 82px);
  line-height: 0.92;
  font-weight: 950;
}

.result-archetype {
  margin: 12px 0 0;
  font-size: 25px;
  font-weight: 950;
}

.result-quote {
  margin: 18px 0 26px;
  padding: 18px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.46;
}

.result-section {
  margin-top: 26px;
}

.result-section h3 {
  margin: 0 0 12px;
  color: #9d9d9d;
  font-size: 13px;
  font-weight: 950;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 13px;
  font-weight: 900;
}

.result-summary,
.detail-item p {
  margin: 0;
  color: #444;
  font-size: 15px;
  line-height: 1.62;
  font-weight: 650;
}

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

.detail-item {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.detail-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 950;
}

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

.dimension-item {
  display: grid;
  gap: 6px;
}

.dimension-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 900;
}

.dimension-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--soft);
}

.dimension-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

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

.parallel-card {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 160ms ease, background 160ms ease;
}

.parallel-card:hover {
  transform: translateY(-1px);
  background: #eeeeee;
}

.parallel-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  object-fit: contain;
  display: block;
  margin-bottom: 9px;
  background: #fff;
}

.parallel-card strong {
  display: block;
  font-size: 14px;
  font-weight: 950;
}

.parallel-card span {
  color: #777;
  font-size: 12px;
  font-weight: 800;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 8px;
}

@media (max-width: 560px) {
  .app {
    padding: 18px 16px 28px;
  }

  .view-home {
    min-height: auto;
    padding-top: 12px;
  }

  h1 {
    font-size: clamp(50px, 18vw, 82px);
    margin-bottom: 14px;
  }

  .city-thumb {
    flex-basis: 72px;
    width: 72px;
    height: 62px;
  }

  .parallel-list {
    grid-template-columns: 1fr;
  }
}
