/* 무료 심리테스트 모음 — calculator/pick 페이지와 동일 팔레트(블루), 모바일 우선 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Malgun Gothic', sans-serif;
  background: #f5f5f5; color: #333; line-height: 1.55;
  padding-bottom: 130px; /* 하단 AdFit 고정 배너 여백 */
}

.site-header {
  background: linear-gradient(135deg, #2C3E50, #3498DB);
  color: #fff; padding: 22px 16px 26px; text-align: center;
}
.site-header h1 { font-size: 24px; margin-bottom: 6px; }
.site-header .subtitle { font-size: 14px; opacity: 0.9; }
.site-header nav { margin-top: 12px; font-size: 13px; }
.site-header nav a { color: #cfe7fa; text-decoration: none; margin: 0 8px; }
.site-header nav a:hover { text-decoration: underline; }

.container { max-width: 760px; margin: 0 auto; padding: 20px 14px; }

.section-title {
  font-size: 17px; font-weight: bold; color: #2C3E50;
  border-left: 4px solid #3498DB; padding-left: 12px; margin: 28px 0 12px;
}

/* 테스트 목록 */
.home-intro { text-align: center; font-size: 14px; color: #666; margin-bottom: 14px; }
.test-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.test-card {
  background: #fff; border: 1px solid #e0e6ea; border-radius: 14px;
  padding: 18px 14px; text-align: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); touch-action: manipulation;
  transition: transform 0.12s, box-shadow 0.12s; font-family: inherit;
}
.test-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(52,152,219,0.18); }
.test-card .t-icon { font-size: 40px; line-height: 1.2; }
.test-card .t-tag {
  display: inline-block; font-size: 11px; font-weight: bold; color: #2980B9;
  background: #EBF5FB; border-radius: 10px; padding: 2px 10px; margin: 6px 0 4px;
}
.test-card h3 { font-size: 16px; color: #2C3E50; margin-bottom: 4px; }
.test-card p { font-size: 12px; color: #888; word-break: keep-all; }
.test-card .t-meta { font-size: 11px; color: #aab4bc; margin-top: 8px; }

/* 진행 화면 */
#view-quiz { background: #fff; border-radius: 14px; padding: 18px 16px 22px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.quiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#quiz-title { font-size: 15px; font-weight: bold; color: #2C3E50; }
#quiz-quit { border: none; background: none; color: #99A3A4; font-size: 13px; cursor: pointer; padding: 4px; }
#quiz-step { text-align: right; font-size: 12px; color: #3498DB; font-weight: bold; margin-bottom: 4px; }
.quiz-bar { height: 8px; background: #EAF2F8; border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
#quiz-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #3498DB, #5DADE2); border-radius: 6px; transition: width 0.25s; }
#quiz-question {
  font-size: 18px; font-weight: bold; color: #2C3E50; text-align: center;
  word-break: keep-all; min-height: 56px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
#quiz-answers { display: flex; flex-direction: column; gap: 10px; }
.answer-btn {
  width: 100%; padding: 16px 14px; font-size: 15px; font-weight: bold; color: #2C3E50;
  background: #F4F9FD; border: 2px solid #BDE0F5; border-radius: 12px; cursor: pointer;
  word-break: keep-all; touch-action: manipulation; font-family: inherit; line-height: 1.4;
}
.answer-btn:hover { background: #D6EAF8; border-color: #3498DB; }
.answer-btn:active { transform: scale(0.99); }
.quiz-foot { margin-top: 14px; text-align: center; }
#quiz-prev {
  border: none; background: none; color: #7f8c8d; font-size: 13px; cursor: pointer; padding: 6px 10px;
}
#quiz-prev:disabled { opacity: 0.35; cursor: default; }

/* 결과 카드 */
.result-card {
  background: #fff; border-radius: 16px; padding: 22px 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08); text-align: center;
}
.result-badge {
  display: inline-block; font-size: 12px; font-weight: bold; color: #fff;
  background: linear-gradient(135deg, #2C3E50, #3498DB); border-radius: 12px; padding: 4px 14px;
}
.result-emoji { font-size: 64px; line-height: 1.3; margin-top: 10px; }
.result-name { font-size: 22px; font-weight: bold; color: #2C3E50; word-break: keep-all; }
.result-test { font-size: 13px; color: #99A3A4; margin-top: 4px; }
.axis-meters { margin: 16px auto 0; max-width: 420px; text-align: left; }
.axis-row { margin-bottom: 10px; }
.axis-labels { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.axis-label { color: #99A3A4; }
.axis-label.strong { color: #2980B9; font-weight: bold; }
.axis-bar { height: 8px; background: #EAECEE; border-radius: 6px; overflow: hidden; }
.axis-fill { height: 100%; background: linear-gradient(90deg, #3498DB, #5DADE2); border-radius: 6px; }
.result-desc { font-size: 14px; color: #444; text-align: left; word-break: keep-all; margin-top: 16px; }
.chem-box {
  margin-top: 14px; background: #F8FAFB; border: 1px solid #e0e6ea; border-radius: 10px;
  padding: 12px 14px; text-align: left; font-size: 13px;
}
.chem-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; word-break: keep-all; }
.chem-tag {
  flex-shrink: 0; font-size: 11px; font-weight: bold; color: #fff; background: #E74C3C;
  border-radius: 8px; padding: 2px 8px;
}
.chem-tag.easy { background: #27AE60; }
.tip-box {
  margin-top: 10px; background: #FEF9E7; border: 1px dashed #F1C40F; border-radius: 10px;
  padding: 10px 14px; text-align: left; font-size: 13px; display: flex; gap: 8px; align-items: center;
  word-break: keep-all;
}
.tip-tag {
  flex-shrink: 0; font-size: 11px; font-weight: bold; color: #B7950B;
  background: #FCF3CF; border-radius: 8px; padding: 2px 8px;
}
.result-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.btn {
  border: 1px solid #3498DB; background: #fff; color: #2980B9;
  border-radius: 10px; padding: 12px 18px; font-size: 15px; cursor: pointer;
  touch-action: manipulation; font-family: inherit;
}
.btn.primary { background: #3498DB; color: #fff; font-weight: bold; }
.btn.primary:active { background: #2C81BA; }
.ad-wrap { margin-top: 18px; display: flex; justify-content: center; min-height: 0; }

/* 다른 테스트 추천 */
.other-tests { margin-top: 16px; text-align: center; }
.other-title { font-size: 14px; font-weight: bold; color: #2C3E50; margin-bottom: 8px; }
.other-btn {
  display: block; width: 100%; margin: 6px 0; padding: 12px; font-size: 14px;
  background: #fff; border: 1px solid #BDE0F5; border-radius: 10px; color: #2C3E50;
  cursor: pointer; touch-action: manipulation; font-family: inherit;
}
.other-btn:hover { background: #EBF5FB; }

/* 설명/FAQ */
.info-card {
  background: #fff; border-radius: 10px; padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 12px; font-size: 14px;
}
.info-card h3 { font-size: 15px; color: #2C3E50; margin-bottom: 6px; }
.info-card p + p { margin-top: 8px; }
.info-card ul { padding-left: 20px; }
.info-card li { margin: 4px 0; }
.type-list { font-size: 13px; color: #555; word-break: keep-all; }

.site-footer { text-align: center; font-size: 12px; color: #888; padding: 24px 16px 8px; }
.site-footer a { color: #2980B9; text-decoration: none; }

@media (min-width: 768px) {
  body { padding-bottom: 120px; }
  .test-grid { grid-template-columns: repeat(4, 1fr); }
  .result-actions { flex-direction: row; }
  .result-actions .btn { flex: 1; }
}
