/* ============================================================
   KnowMeFun 样式 - 糖果贴纸风
   来自 logo 的设计语言:粗深棕描边、高饱和糖果色、圆角、实色偏移阴影
   ============================================================ */

:root {
  --outline: #5b1616;
  --yellow: #ffcf3f;
  --pink: #ff5f8a;
  --magenta: #f0437c;
  --teal: #2ec4a6;
  --blue: #43b7e8;
  --orange: #ff9d3c;
  --cream: #fff7e8;
  --paper: #fffdf6;
  --text: #4a3226;
  --muted: #8a6a52;
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--cream);
  background-image: radial-gradient(rgba(91, 22, 22, 0.05) 2.2px, transparent 2.2px);
  background-size: 26px 26px;
  line-height: 1.75;
  font-size: 16px;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 640px; }

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--outline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--yellow);
  border: 3px solid var(--outline);
  border-radius: 12px;
  font-weight: 900;
  font-size: 24px;
  color: var(--outline);
  transform: rotate(-6deg);
}

.brand-text {
  font-weight: 900;
  font-size: 20px;
  color: var(--outline);
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-block;
  border: 3px solid var(--outline);
  border-radius: 999px;
  font-weight: 800;
  color: var(--outline);
  background: var(--paper);
  padding: 10px 22px;
  font-size: 15px;
  box-shadow: 4px 4px 0 var(--outline);
  transition: transform 0.15s, box-shadow 0.15s;
  text-align: center;
}

.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--outline); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--outline); }

.btn-big { padding: 14px 30px; font-size: 17px; }
.btn-small { padding: 6px 14px; font-size: 13px; box-shadow: 3px 3px 0 var(--outline); }
.btn-pink { background: var(--pink); color: #fff; text-shadow: 0 1px 0 rgba(91, 22, 22, 0.35); }
.btn-ghost { background: var(--paper); }

/* ---------------- Hero ---------------- */

.hero { padding: 64px 0 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
}

.hero-kicker {
  display: inline-block;
  background: var(--yellow);
  border: 3px solid var(--outline);
  border-radius: 999px;
  padding: 4px 16px;
  font-weight: 800;
  font-size: 14px;
  color: var(--outline);
  box-shadow: 3px 3px 0 var(--outline);
  margin-bottom: 20px;
  transform: rotate(-2deg);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 900;
  color: var(--outline);
  line-height: 1.25;
  margin-bottom: 18px;
}

.hl-pink {
  color: var(--magenta);
  text-decoration: underline wavy rgba(240, 67, 124, 0.5) 3px;
  text-underline-offset: 8px;
}

.hero-sub { font-size: 17px; max-width: 30em; margin-bottom: 28px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }

.hero-note { font-size: 13px; color: var(--muted); }

.hero-art { display: flex; justify-content: center; }

.hero-art img {
  width: min(320px, 80%);
  height: auto;
  border: 4px solid var(--outline);
  border-radius: 26px;
  background: #fff;
  box-shadow: 8px 8px 0 var(--outline);
  transform: rotate(3deg);
}

/* ---------------- 区块 ---------------- */

.section { padding: 56px 0; }

.section-tint { background: rgba(255, 207, 63, 0.18); border-top: 3px solid var(--outline); border-bottom: 3px solid var(--outline); }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
  color: var(--outline);
  margin-bottom: 30px;
  text-align: center;
}

/* ---------------- 测试卡片 ---------------- */

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.quiz-card {
  display: block;
  border: 4px solid var(--outline);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: 6px 6px 0 var(--outline);
  transition: transform 0.15s, box-shadow 0.15s;
  color: var(--outline);
}

.quiz-card:hover { transform: translate(-3px, -3px) rotate(-0.5deg); box-shadow: 9px 9px 0 var(--outline); }

.card-yellow { background: var(--yellow); }
.card-blue { background: var(--blue); }
.card-teal { background: var(--teal); }

.quiz-emoji { font-size: 44px; display: block; margin-bottom: 10px; }

.quiz-card h3 { font-size: 19px; font-weight: 900; margin-bottom: 8px; }

.quiz-card p { font-size: 14px; line-height: 1.65; margin-bottom: 14px; color: rgba(91, 22, 22, 0.85); }

.quiz-go {
  display: inline-block;
  background: var(--paper);
  border: 3px solid var(--outline);
  border-radius: 999px;
  padding: 5px 14px;
  font-weight: 800;
  font-size: 13px;
}

.more-note { text-align: center; margin-top: 26px; color: var(--muted); font-size: 14px; }

/* ---------------- 步骤 ---------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.steps li {
  background: var(--paper);
  border: 4px solid var(--outline);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 6px 6px 0 var(--outline);
  text-align: center;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  font-weight: 900;
  font-size: 20px;
  color: var(--outline);
  margin-bottom: 12px;
}

.b-pink { background: var(--pink); }
.b-yellow { background: var(--yellow); }
.b-teal { background: var(--teal); }

.steps h3 { font-size: 18px; font-weight: 900; color: var(--outline); margin-bottom: 6px; }
.steps p { font-size: 14px; color: var(--muted); }

/* ---------------- 声明 ---------------- */

.notice {
  background: var(--paper);
  border: 4px dashed var(--outline);
  border-radius: var(--radius);
  padding: 26px 30px;
  max-width: 760px;
  margin: 0 auto;
}

.notice h3 { font-weight: 900; color: var(--outline); margin-bottom: 12px; }

.notice li { font-size: 14.5px; margin-bottom: 8px; padding-left: 1.2em; position: relative; }
.notice li::before { content: '•'; position: absolute; left: 0; color: var(--magenta); font-weight: 900; }

/* ---------------- 测试页面板 ---------------- */

.quiz-stage { min-height: 60vh; }

.panel {
  background: var(--paper);
  border: 4px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--outline);
  padding: 36px 32px;
}

.panel-center { text-align: center; }

.theme-yellow { border-top: 14px solid var(--yellow); }
.theme-blue { border-top: 14px solid var(--blue); }
.theme-teal { border-top: 14px solid var(--teal); }

.panel-emoji { font-size: 72px; display: block; margin-bottom: 8px; }

.panel-title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; color: var(--outline); margin-bottom: 10px; }

.panel-tagline { color: var(--magenta); font-weight: 700; margin-bottom: 8px; }

.panel-intro { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

.tiny-note { margin-top: 18px; font-size: 12.5px; color: var(--muted); }

/* 进度条 */

.progress {
  height: 14px;
  border: 3px solid var(--outline);
  border-radius: 999px;
  background: var(--cream);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: repeating-linear-gradient(45deg, var(--pink), var(--pink) 10px, var(--magenta) 10px, var(--magenta) 20px);
  transition: width 0.3s;
}

.progress-text { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 16px; }

.question { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 900; color: var(--outline); margin-bottom: 22px; }

.options { display: grid; gap: 14px; }

.option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 3px solid var(--outline);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 4px 4px 0 var(--outline);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.option:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--outline); background: rgba(255, 207, 63, 0.35); }
.option:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--outline); }

/* 结果 */

.result-kicker { font-weight: 800; color: var(--muted); margin-bottom: 6px; }

.result-slogan { color: var(--magenta); font-weight: 800; font-size: 17px; margin-bottom: 18px; }

.result-traits { max-width: 26em; margin: 0 auto 14px; text-align: left; }

.result-traits li {
  background: rgba(255, 207, 63, 0.25);
  border: 2px solid rgba(91, 22, 22, 0.25);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14.5px;
  margin-bottom: 8px;
}

.result-partner { font-size: 14.5px; font-weight: 700; color: var(--outline); margin-bottom: 24px; }

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

/* 选择列表(无参数进入 quiz.html 时) */

.pick-list { display: grid; gap: 16px; }

.pick-item {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 3px solid var(--outline);
  border-radius: 16px;
  padding: 14px 18px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--outline);
  transition: transform 0.12s, box-shadow 0.12s;
}

.pick-item:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--outline); }

.pick-emoji { font-size: 36px; }
.pick-item small { color: var(--muted); }

/* ---------------- 页脚 ---------------- */

.footer {
  border-top: 3px solid var(--outline);
  background: var(--paper);
  padding: 26px 0;
  margin-top: 40px;
}

.footer-inner { text-align: center; font-size: 13px; color: var(--muted); }

.footer-inner a { text-decoration: underline; text-underline-offset: 3px; }

.footer-brand { font-weight: 700; color: var(--text); }

.gongan { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 860px) {
  .hero { padding: 44px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: min(230px, 60%); }
  .quiz-grid, .steps { grid-template-columns: 1fr; }
  .panel { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .option, .quiz-card, .pick-item { transition: none; }
}
