:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #62666d;
  --paper: #fffdf7;
  --panel: #ffffff;
  --line: #d9d2c2;
  --accent: #0f7c7d;
  --accent-dark: #07595a;
  --warm: #f3b23c;
  --rose: #de6b6b;
  --green: #6aa84f;
  --shadow: 0 22px 60px rgba(32, 33, 36, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 12%, rgba(243, 178, 60, 0.24), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(15, 124, 125, 0.18), transparent 30%),
    linear-gradient(135deg, #f7f0df 0%, #e8f2ee 55%, #f9e9e2 100%);
  color: var(--ink);
  font-family:
    "Segoe UI Rounded", "Microsoft YaHei UI", "PingFang SC", "Hiragino Maru Gothic ProN",
    "Noto Sans CJK SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 28px 0;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 1;
  color: rgba(32, 33, 36, 0.56);
  font-size: 0.88rem;
  text-align: center;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

.intro,
.quiz,
.result {
  width: 100%;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro {
  min-height: min(760px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  align-items: center;
  gap: 38px;
  padding: clamp(24px, 5vw, 64px);
}

.object-cloud {
  min-height: 430px;
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: clamp(12px, 2vw, 22px);
  align-content: center;
}

.object-cloud span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(32, 33, 36, 0.08);
  font-size: clamp(34px, 5vw, 68px);
  transform: rotate(var(--tilt, 0deg));
  animation: floaty 4.8s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.object-cloud span:nth-child(2) {
  --tilt: -6deg;
  --delay: -0.8s;
  background: #eef7f4;
}

.object-cloud span:nth-child(3) {
  --tilt: 4deg;
  --delay: -1.5s;
  background: #fff4d7;
}

.object-cloud span:nth-child(4) {
  --tilt: 7deg;
  --delay: -2.1s;
  background: #faeeee;
}

.object-cloud span:nth-child(5) {
  --tilt: -3deg;
  --delay: -2.8s;
  background: #f2f0ff;
}

.object-cloud span:nth-child(6) {
  --tilt: 5deg;
  --delay: -3.4s;
  background: #eef6e9;
}

.object-cloud span:nth-child(7) {
  --tilt: -7deg;
  --delay: -4s;
  background: #eaf3fb;
}

.object-cloud span:nth-child(8) {
  --tilt: 3deg;
  --delay: -4.6s;
  background: #fff7ea;
}

.intro-copy {
  max-width: 560px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 800;
  text-shadow: 0 8px 0 rgba(15, 124, 125, 0.08);
}

.intro-copy p:not(.kicker) {
  max-width: 520px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.8;
}

.primary-button,
.ghost-button {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button::after {
  content: "";
  position: absolute;
  inset: -80%;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.38), transparent 65%);
  transform: translateX(-65%) rotate(8deg);
  transition: transform 0.45s ease;
}

.primary-button:hover::after {
  transform: translateX(65%) rotate(8deg);
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 22px rgba(15, 124, 125, 0.22);
}

.ghost-button {
  background: #fff;
  color: var(--accent-dark);
  border: 1px solid var(--line);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.quiz,
.result {
  padding: clamp(22px, 4vw, 48px);
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.quiz h2,
.result h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 4vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 800;
}

.progress-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--accent-dark);
  font-weight: 700;
}

.progress-track {
  height: 10px;
  margin: 26px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e9e1d0;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--warm), var(--rose));
  transition: width 0.22s ease;
}

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

.answer-button {
  min-height: 118px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  transform: translateY(0) scale(1);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.answer-button:hover {
  border-color: var(--accent);
  box-shadow: 0 14px 28px rgba(32, 33, 36, 0.08);
  transform: translateY(-4px) scale(1.01);
}

.answer-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4efe4;
  font-size: 1.75rem;
}

.answer-text {
  min-width: 0;
  font-weight: 700;
  line-height: 1.45;
}

.result {
  text-align: center;
}

.result-symbol {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(32, 33, 36, 0.1);
  font-size: 4.8rem;
  animation: popFloat 3.6s ease-in-out infinite;
}

.result-line {
  max-width: 680px;
  margin: 16px auto 28px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
  padding: 0 10px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

.result-grid article,
.score-board {
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
}

.result-grid article {
  grid-column: span 2;
  position: relative;
  overflow: hidden;
}

.result-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
  opacity: 0.75;
}

.discussion-card,
.share-card {
  grid-column: span 3 !important;
}

.discussion-card {
  background: #fff8e7 !important;
}

.discussion-card::before {
  background: var(--warm) !important;
}

.share-card {
  background: #eef7f4 !important;
}

.share-card::before {
  background: var(--accent) !important;
}

.result-grid h3 {
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 700;
  padding-left: 4px;
}

.result-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
  padding-left: 4px;
}

.score-board {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  text-align: left;
}

.score-row {
  display: grid;
  grid-template-columns: 86px 1fr 42px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.94rem;
}

.score-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece5d8;
}

.score-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    padding: 10px 0;
  }

  .intro {
    min-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }

  .object-cloud {
    min-height: auto;
    grid-template-columns: repeat(4, 1fr);
    order: 2;
  }

  .quiz-top {
    display: grid;
  }

  .progress-pill {
    justify-self: start;
  }

  .answers,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-grid article,
  .discussion-card,
  .share-card {
    grid-column: auto !important;
  }

  .answer-button {
    min-height: 96px;
  }

  .score-row {
    grid-template-columns: 72px 1fr 34px;
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt, 0deg));
  }

  50% {
    transform: translateY(-14px) rotate(calc(var(--tilt, 0deg) * -0.4));
  }
}

@keyframes popFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .particle-canvas {
    display: none;
  }
}
