/* 사이트 전체에서 공통으로 쓰는 스타일 */
/* ===== 레트로 키치 / 네오브루탈리즘 디자인 토큰 ===== */
:root {
  --paper: #f2e9d8;
  --paper-card: #fbf6ea;
  --ink: #2b2420;
  --stroke: 2.5px;
  --shadow-x: 5px;
  --shadow-y: 5px;

  --retro-yellow: #f3c94d;
  --retro-terracotta: #e2775a;
  --retro-sage: #96ac78;
  --retro-blue: #86aecb;
  --retro-pink: #e2a3ab;
  --retro-cream: #f8f1de;
}

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

body {
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(43, 36, 32, 0.09) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--ink);
  min-height: 100vh;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.font-fun {
  font-family: "Jua", "Noto Sans KR", sans-serif;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  min-height: 100vh;
  position: relative;
}

/* PC처럼 넓은 화면에서는 모바일 크기 그대로 화면 가운데 작게 떠서
   글씨가 잘 안 보이는 문제가 있었음 — 화면 폭에 맞춰 전체를 비율대로
   확대한다 (zoom은 폰트/여백/테두리/그림자까지 다 같이 커져서 디자인이
   안 깨진다). 모바일(480px 미만)에는 영향 없음. */
@media (min-width: 768px) {
  .wrap {
    zoom: 1.35;
  }
}

@media (min-width: 1200px) {
  .wrap {
    zoom: 1.6;
  }
}

/* ===== 홈페이지 장식 요소 (레트로 스티커 오브젝트) ===== */

.deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.deco-star {
  width: 18px;
  height: 18px;
}

.deco-star-1 {
  top: 4px;
  left: 6px;
  transform: rotate(-14deg);
}

.deco-star-2 {
  top: 22px;
  right: 10px;
  transform: rotate(16deg);
}

.deco-floppy {
  width: 46px;
  height: 46px;
  bottom: 46px;
  left: -6px;
  transform: rotate(-10deg);
}

.deco-pad {
  width: 58px;
  height: 36px;
  bottom: 6px;
  right: -4px;
  transform: rotate(7deg);
}

/* ===== 홈페이지: 테스트 카드 목록 ===== */

.site-title {
  text-align: center;
  font-size: 34px;
  margin: 20px 0 10px;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--retro-yellow);
}

.site-sub {
  text-align: center;
  color: #6b5f52;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.search-box {
  margin-bottom: 14px;
}

.search-box input {
  width: 100%;
  border: var(--stroke) solid var(--ink);
  background: #fff;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  box-shadow: 3px 3px 0 var(--ink);
  outline: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.search-box input:focus {
  transform: translate(1.5px, 1.5px);
  box-shadow: 1.5px 1.5px 0 var(--ink);
}

.category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.category-row.dragging {
  cursor: grabbing;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.chip:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.chip.active {
  background: var(--retro-yellow);
  color: var(--ink);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.page-btn:active {
  transform: translate(1.5px, 1.5px);
  box-shadow: 1px 1px 0 var(--ink);
}

.page-btn.active {
  background: var(--retro-terracotta);
  color: #fff;
}

.empty-msg {
  text-align: center;
  color: #aaa;
  font-size: 14px;
  line-height: 1.7;
  padding: 40px 0;
}

.test-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper-card);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  min-height: 136px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--ink);
  border: var(--stroke) solid var(--ink);
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* 카드마다 색과 패턴을 순환시켜서 보는 재미를 준다 */
#test-list .test-card:nth-child(6n+1),
#recommend-list .test-card:nth-child(6n+1) { background: var(--retro-cream); }
#test-list .test-card:nth-child(6n+2),
#recommend-list .test-card:nth-child(6n+2) { background: #fdeec2; }
#test-list .test-card:nth-child(6n+3),
#recommend-list .test-card:nth-child(6n+3) { background: #f6d8ce; }
#test-list .test-card:nth-child(6n+4),
#recommend-list .test-card:nth-child(6n+4) { background: #dbe8ee; }
#test-list .test-card:nth-child(6n+5),
#recommend-list .test-card:nth-child(6n+5) { background: #e3ead6; }
#test-list .test-card:nth-child(6n+6),
#recommend-list .test-card:nth-child(6n+6) { background: #f2e0e2; }

/* 패턴 A: 그래프 노트 배경 (4의 배수) */
#test-list .test-card:nth-child(4n),
#recommend-list .test-card:nth-child(4n) {
  background-image:
    linear-gradient(rgba(43, 36, 32, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 36, 32, 0.08) 1px, transparent 1px);
  background-size: 10px 10px;
}

/* 패턴 B: 모서리에 붙인 마스킹테이프 스티커 (3의 배수, 4의 배수 제외) */
#test-list .test-card:nth-child(3n):not(:nth-child(4n)),
#recommend-list .test-card:nth-child(3n):not(:nth-child(4n)) {
  overflow: visible;
}

#test-list .test-card:nth-child(3n):not(:nth-child(4n))::before,
#recommend-list .test-card:nth-child(3n):not(:nth-child(4n))::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 46px;
  height: 18px;
  margin-left: -23px;
  background: rgba(243, 201, 77, 0.85);
  border: 1.5px solid var(--ink);
  transform: rotate(-4deg);
  z-index: 2;
}

.test-card:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* 홈페이지 목록(#test-list)과 결과 화면 추천 목록(#recommend-list) 모두
   2열 정사각 카드 그리드로 배치한다 */
#test-list,
#recommend-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#test-list .empty-msg,
#recommend-list .empty-msg {
  grid-column: 1 / -1;
}

#test-list .test-card,
#recommend-list .test-card {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 22px 12px;
  margin-bottom: 0;
  min-height: 168px;
}

#test-list .test-card .emoji,
#recommend-list .test-card .emoji {
  font-size: 34px;
  margin-top: 20px;
}

#test-list .test-card .info h3,
#recommend-list .test-card .info h3 {
  font-size: 14.5px;
}

#test-list .test-card .info p,
#recommend-list .test-card .info p {
  font-size: 12px;
}

#test-list .test-card .badge,
#recommend-list .test-card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  margin-left: 0;
}

.test-card .emoji {
  flex-shrink: 0;
}

.test-card .info {
  flex: 1;
  min-width: 0;
}

.test-card .badge {
  flex-shrink: 0;
}

.test-card .emoji {
  font-size: 40px;
  line-height: 1;
}

.test-card .info h3 {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 17px;
  margin-bottom: 4px;
}

.test-card .info p {
  font-size: 13px;
  color: #5c5148;
  font-weight: 600;
}

.test-card .badge {
  margin-left: auto;
  font-size: 11px;
  background: var(--retro-yellow);
  color: var(--ink);
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  font-weight: 800;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(4deg);
}

/* ===== 테스트 진행 화면 (질문) ===== */

.quiz-header {
  text-align: center;
  margin-bottom: 22px;
}

.quiz-logo {
  display: inline-block;
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--retro-yellow);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  text-decoration: none;
  margin-bottom: 12px;
  box-shadow: 2px 2px 0 var(--ink);
}

.quiz-home-btn {
  display: block;
  font-size: 13px;
  color: #7a7a7a;
  text-decoration: none;
  margin-bottom: 10px;
}

.quiz-home-btn:active {
  color: var(--ink);
}

.quiz-title {
  font-size: 24px;
  letter-spacing: -0.3px;
  text-shadow: 1.5px 1.5px 0 var(--retro-yellow);
}

.test-intro {
  background: var(--paper-card);
  border: var(--stroke) solid var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-0.6deg);
}

.test-intro p {
  font-size: 13.5px;
  color: #423a32;
  line-height: 1.6;
  font-weight: 600;
}

.test-intro .test-meta {
  margin-top: 8px;
  font-size: 12px;
  color: #8a5a2e;
  font-weight: 800;
}

.progress-bar {
  height: 12px;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--retro-terracotta);
  width: 0%;
  transition: width 0.3s ease;
}

.question-box {
  background: var(--paper-card);
  border: var(--stroke) solid var(--ink);
  border-radius: 18px;
  padding: 28px 22px;
  box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--ink);
}

.question-num {
  display: inline-block;
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--retro-blue);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 12px;
}

.question-text {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 22px;
}

.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 16px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.option-btn:hover {
  background: var(--retro-cream);
}

.option-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

/* ===== 결과 화면 ===== */
/* 타입별로 카드 색을 다르게 줘서, 캡처해서 올렸을 때 내 타입이 한눈에 티나게 한다 */

.result-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 26px 32px;
  text-align: center;
  box-shadow: 6px 6px 0 var(--ink);
  border: 3px solid var(--ink);
}

.result-card.type-E {
  background: #ffe3ee;
}

.result-card.type-T {
  background: #e2e9ff;
}

.result-card.type-M {
  background: #ece0ff;
}

.result-card.tier-1 {
  background: #e2f5db;
}

.result-card.tier-2 {
  background: #daf3ea;
}

.result-card.tier-3 {
  background: #dfe7ff;
}

.result-card.tier-4 {
  background: #ffe8c7;
}

.result-card.tier-5 {
  background: #ffdad4;
}

.result-card.tier-1 .result-title { color: #4a9c3e; }
.result-card.tier-2 .result-title { color: #2ba98a; }
.result-card.tier-3 .result-title { color: #4a5cc7; }
.result-card.tier-4 .result-title { color: #d97f1f; }
.result-card.tier-5 .result-title { color: #e0492f; }

.result-card.type-secure {
  background: #e0f3e6;
}

.result-card.type-anxious {
  background: #ffdee6;
}

.result-card.type-avoidant {
  background: #dbe8f5;
}

.result-card.type-fearful {
  background: #e6daf5;
}

.result-card.type-secure .result-title { color: #379164; }
.result-card.type-anxious .result-title { color: #d94570; }
.result-card.type-avoidant .result-title { color: #3d6fa8; }
.result-card.type-fearful .result-title { color: #7c4fbf; }

.result-card.type-thinking {
  background: #dcedf7;
}

.result-card.type-feeling {
  background: #ffe1d6;
}

.result-card.type-tfbalance {
  background: #dcf3e8;
}

.result-card.type-thinking .result-title { color: #2e7ba8; }
.result-card.type-feeling .result-title { color: #d9683a; }
.result-card.type-tfbalance .result-title { color: #2e9c6b; }

.result-card.sense-1 {
  background: #e2e7ef;
}

.result-card.sense-2 {
  background: #dcf3e8;
}

.result-card.sense-3 {
  background: #ffe1d6;
}

.result-card.sense-4 {
  background: #edd9ff;
}

.result-card.sense-1 .result-title { color: #5b6b85; }
.result-card.sense-2 .result-title { color: #2e9c6b; }
.result-card.sense-3 .result-title { color: #d9683a; }
.result-card.sense-4 .result-title { color: #9a4fd6; }

.result-card.sensitivity-1 {
  background: #e2e7ef;
}

.result-card.sensitivity-2 {
  background: #ecf3d8;
}

.result-card.sensitivity-3 {
  background: #ffe1d6;
}

.result-card.sensitivity-4 {
  background: #ffdcea;
}

.result-card.sensitivity-1 .result-title { color: #5b6b85; }
.result-card.sensitivity-2 .result-title { color: #7a942e; }
.result-card.sensitivity-3 .result-title { color: #d9683a; }
.result-card.sensitivity-4 .result-title { color: #d63d80; }

/* 전생 테스트 (다중 태그형) */
.result-card.life-cat { background: #ece0ff; }
.result-card.life-dog { background: #ffe3cc; }
.result-card.life-fox { background: #ffedc2; }
.result-card.life-owl { background: #dbe3f5; }
.result-card.life-panda { background: #dcf3e8; }
.result-card.life-cat .result-title { color: #8a4fd6; }
.result-card.life-dog .result-title { color: #d9793a; }
.result-card.life-fox .result-title { color: #c99a1f; }
.result-card.life-owl .result-title { color: #4a5cc7; }
.result-card.life-panda .result-title { color: #2e9c6b; }

/* 사랑의 언어 테스트 (다중 태그형) */
.result-card.love-word { background: #fff3c2; }
.result-card.love-time { background: #dbe7f7; }
.result-card.love-gift { background: #ffdcea; }
.result-card.love-service { background: #dcf3e8; }
.result-card.love-touch { background: #ffdcd4; }
.result-card.love-word .result-title { color: #b8901a; }
.result-card.love-time .result-title { color: #3d6fa8; }
.result-card.love-gift .result-title { color: #d63d80; }
.result-card.love-service .result-title { color: #2e9c6b; }
.result-card.love-touch .result-title { color: #d9503a; }

/* 소비유형 테스트 (다중 태그형) */
.result-card.spend-flex { background: #ffd9e8; }
.result-card.spend-save { background: #dcf3e8; }
.result-card.spend-plan { background: #dbe3f5; }
.result-card.spend-impulse { background: #ffedc2; }
.result-card.spend-invest { background: #ece0ff; }
.result-card.spend-flex .result-title { color: #d63d80; }
.result-card.spend-save .result-title { color: #2e9c6b; }
.result-card.spend-plan .result-title { color: #4a5cc7; }
.result-card.spend-impulse .result-title { color: #c99a1f; }
.result-card.spend-invest .result-title { color: #8a4fd6; }

/* 문과 이과 테스트 (레터형) */
.result-card.type-liberal { background: #fff3c2; }
.result-card.type-science { background: #dbe7f7; }
.result-card.type-sciencebalance { background: #ece0ff; }
.result-card.type-liberal .result-title { color: #b8901a; }
.result-card.type-science .result-title { color: #3d6fa8; }
.result-card.type-sciencebalance .result-title { color: #8a4fd6; }

/* 모임 포지션 테스트 (다중 태그형) */
.result-card.role-leader { background: #ffedc2; }
.result-card.role-peace { background: #dcf3e8; }
.result-card.role-idea { background: #ffdcea; }
.result-card.role-support { background: #dbe7f7; }
.result-card.role-observer { background: #ece0ff; }
.result-card.role-leader .result-title { color: #c99a1f; }
.result-card.role-peace .result-title { color: #2e9c6b; }
.result-card.role-idea .result-title { color: #d63d80; }
.result-card.role-support .result-title { color: #3d6fa8; }
.result-card.role-observer .result-title { color: #8a4fd6; }

/* 투자성향 테스트 (다중 태그형) */
.result-card.invest-safe { background: #dbe7f7; }
.result-card.invest-balance { background: #dcf3e8; }
.result-card.invest-aggressive { background: #ffdcd4; }
.result-card.invest-allin { background: #ffdcea; }
.result-card.invest-longterm { background: #eaf3d8; }
.result-card.invest-safe .result-title { color: #3d6fa8; }
.result-card.invest-balance .result-title { color: #2e9c6b; }
.result-card.invest-aggressive .result-title { color: #d9503a; }
.result-card.invest-allin .result-title { color: #d63d80; }
.result-card.invest-longterm .result-title { color: #6b9c2e; }

/* 좌뇌우뇌 테스트 (레터형) */
.result-card.brain-left { background: #dbe7f7; }
.result-card.brain-right { background: #ffdcea; }
.result-card.brain-balance { background: #ece0ff; }
.result-card.brain-left .result-title { color: #33459c; }
.result-card.brain-right .result-title { color: #d63d80; }
.result-card.brain-balance .result-title { color: #6b2fa8; }

/* 집순이 밖순이 테스트 (레터형) */
.result-card.indoor { background: #dcf3e8; }
.result-card.outdoor { background: #ffe8c7; }
.result-card.indoor-outdoor-balance { background: #fff3c2; }
.result-card.indoor .result-title { color: #2e9c6b; }
.result-card.outdoor .result-title { color: #b8720f; }
.result-card.indoor-outdoor-balance .result-title { color: #b8901a; }

/* 이별 극복 테스트 (다중 태그형) */
.result-card.breakup-work { background: #dbe7f7; }
.result-card.breakup-friend { background: #ffe8c7; }
.result-card.breakup-new { background: #ffdcea; }
.result-card.breakup-alone { background: #dbe3f5; }
.result-card.breakup-lingering { background: #ece0ff; }
.result-card.breakup-work .result-title { color: #33459c; }
.result-card.breakup-friend .result-title { color: #b8720f; }
.result-card.breakup-new .result-title { color: #d63d80; }
.result-card.breakup-alone .result-title { color: #4a5cc7; }
.result-card.breakup-lingering .result-title { color: #6b2fa8; }

/* 갈등 대처 테스트 (다중 태그형) */
.result-card.conflict-avoid { background: #e2e7ef; }
.result-card.conflict-compromise { background: #daf3ea; }
.result-card.conflict-compete { background: #ffdad4; }
.result-card.conflict-accommodate { background: #dcf3e8; }
.result-card.conflict-collab { background: #ece0ff; }
.result-card.conflict-avoid .result-title { color: #5b6b85; }
.result-card.conflict-compromise .result-title { color: #2ba98a; }
.result-card.conflict-compete .result-title { color: #d9503a; }
.result-card.conflict-accommodate .result-title { color: #2e9c6b; }
.result-card.conflict-collab .result-title { color: #6b2fa8; }

/* MBTI 테스트 (4축 레터형 조합) — 16personalities 관례대로 4개 기질군 색상으로 묶어서 표현 */
.result-card.mbti-nt { background: #e4d6f7; }
.result-card.mbti-nf { background: #d7f0e0; }
.result-card.mbti-sj { background: #d6e6f7; }
.result-card.mbti-sp { background: #ffe6c2; }

.result-card.mbti-nt .result-title { color: #6b2fa8; }
.result-card.mbti-nf .result-title { color: #2e9c6b; }
.result-card.mbti-sj .result-title { color: #33459c; }
.result-card.mbti-sp .result-title { color: #b8720f; }

.result-card .result-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink);
  opacity: 0.55;
  line-height: 1.5;
}

.result-card .result-emoji {
  font-size: 72px;
  margin-bottom: 10px;
}

.result-card .result-label {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 13px;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 4px;
}

.result-card .result-title {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 32px;
  margin-bottom: 16px;
  text-shadow: none;
}

.result-card.type-E .result-title { color: #c23763; }
.result-card.type-T .result-title { color: #33459c; }
.result-card.type-M .result-title { color: #6b2fa8; }

.result-card .result-desc {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 10px;
}

.result-card .result-site {
  display: block;
  width: fit-content;
  margin: 20px auto 0;
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 12px;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.2px;
  background: var(--retro-yellow);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 4px 14px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1deg);
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  flex: 1;
  padding: 15px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary {
  background: var(--retro-terracotta);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.share-box {
  background: var(--paper-card);
  border: var(--stroke) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  border-radius: 16px;
  padding: 18px 12px 20px;
  margin-top: 22px;
  text-align: center;
}

.share-title {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 16px;
  color: var(--ink);
  text-align: center;
  display: inline-block;
  background: var(--retro-yellow);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 6px 16px;
  border-radius: 20px;
  transform: rotate(-1.2deg);
  margin: 0 0 16px;
}

.sns-share-row {
  display: flex;
  justify-content: center;
  gap: 11px;
  flex-wrap: wrap;
}

.sns-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  padding: 0;
}

.sns-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

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

.sns-kakao { background: #fee500; }
.sns-tiktok { background: #000; }
.sns-facebook { background: #1877f2; }
.sns-instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4); }
.sns-x { background: #000; }

.recommend-section {
  background: var(--paper-card);
  border: var(--stroke) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  border-radius: 16px;
  padding: 18px 12px 20px;
  margin-top: 22px;
  text-align: center;
}

.recommend-title {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 16px;
  margin-bottom: 14px;
  text-align: center;
}

.home-link {
  display: block;
  text-align: center;
  margin-top: 30px;
  color: #6b5f52;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

/* ===== 홈페이지 FAQ ===== */

.faq-section {
  margin-top: 36px;
}

.faq-title {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 12px;
}

.faq-item {
  background: var(--paper-card);
  border: var(--stroke) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.faq-item summary {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "Q. ";
  color: var(--retro-terracotta);
}

.faq-item p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.6;
  opacity: 0.85;
}

/* ===== 사이트 하단 푸터 ===== */

.site-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed var(--ink);
}

.site-footer a {
  color: #6b5f52;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  margin: 0 8px;
}

.site-footer a:hover {
  color: var(--retro-terracotta);
}

/* ===== 약관/정책 문서 페이지 ===== */

.doc-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  line-height: 1.7;
}

.doc-wrap h1 {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 26px;
  margin-bottom: 6px;
}

.doc-wrap .doc-updated {
  color: #6b5f52;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 32px;
}

.doc-wrap h2 {
  font-size: 17px;
  margin: 32px 0 10px;
}

.doc-wrap p,
.doc-wrap li {
  font-size: 14.5px;
  color: #423a32;
  margin-bottom: 8px;
}

.doc-wrap a {
  color: var(--retro-terracotta);
}

.doc-wrap ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.doc-wrap .back-link {
  display: inline-block;
  margin-top: 36px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
  font-weight: 800;
  border-bottom: 2px solid var(--retro-yellow);
}

/* ============================================================
   결과지 v2 — 바이럴 최적화 카드 템플릿
   (뱃지 / 게이지 / 특징 3줄 / 주의사항 / 찰떡·파국 궁합)
   새 테스트는 이 틀을 그대로 쓰고, result-template.js의
   renderResultCardV2(data)에 데이터만 채워 넣으면 된다.
   ============================================================ */

.result-card.v2 {
  padding: 28px 20px 24px;
  text-align: left;
}

.v2-kicker {
  display: block;
  margin: 0 auto 16px;
  width: fit-content;
  background: var(--retro-terracotta);
  color: #fff;
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 12.5px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
}

.v2-avatar {
  text-align: center;
  font-size: 56px;
  margin-bottom: 10px;
}

.result-card.v2 .result-title {
  text-align: center;
  font-size: 23px;
  margin-bottom: 18px;
}

.v2-gauge {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 3px 3px 0 var(--ink);
}

.v2-gauge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.v2-gauge-label {
  font-size: 13px;
  font-weight: 700;
  color: #555;
}

.v2-gauge-label.right {
  text-align: right;
}

.v2-gauge-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #eee;
  border: 1.5px solid var(--ink);
}

.v2-gauge-fill-left {
  background: var(--retro-blue);
}

.v2-gauge-fill-right {
  background: var(--retro-terracotta);
}

.v2-badge {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  background: var(--retro-yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.v2-section {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 3px 3px 0 var(--ink);
}

.v2-section-title {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 10px;
}

.v2-highlights {
  list-style: none;
}

.v2-highlights li {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
}

.v2-highlights li:last-child {
  margin-bottom: 0;
}

.v2-highlights li::before {
  content: "✅";
  flex-shrink: 0;
}

.v2-warning {
  background: #fdeee0;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  color: #8a3f1f;
  text-align: center;
}

.v2-match {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.v2-match-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 3px 3px 0 var(--ink);
}

.v2-match-card.best {
  border: 2.5px solid var(--ink);
  background: #eaf5e5;
}

.v2-match-card.worst {
  border: 2.5px solid var(--ink);
  background: #fbe8e4;
}

.v2-match-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.v2-match-card.best .v2-match-label {
  background: #e3f7ea;
  color: #2e9c6b;
}

.v2-match-card.worst .v2-match-label {
  background: #ffe9e3;
  color: #d9503a;
}

.v2-match-emoji {
  font-size: 30px;
  margin-bottom: 4px;
}

.v2-match-name {
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 2px;
}

.v2-match-reason {
  font-size: 11.5px;
  color: #999;
}

/* ============================================================
   결과지 넘어가기 전 광고 모달 (제휴 광고 전용, 구글 광고는 절대 넣지 않음)
   같은 탭 안에서 뜨는 오버레이라 애드센스 팝업 금지 정책과 무관하다.
   ============================================================ */

.ad-gate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(43, 36, 32, 0.72);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ad-gate-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--paper-card);
  border: var(--stroke) solid var(--ink);
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px;
  text-align: center;
}

.ad-gate-close {
  position: absolute;
  top: -14px;
  right: -10px;
  background: var(--retro-yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.ad-gate-close:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.ad-gate-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  text-decoration: none;
  padding: 24px 16px;
  margin-top: 8px;
  overflow: hidden;
}

.ad-gate-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.ad-gate-emoji {
  font-size: 56px;
}

.ad-gate-product-name {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 16px;
  color: var(--ink);
  margin-top: 4px;
}

.ad-gate-cta {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 14px;
  color: #fff;
  background: var(--retro-terracotta);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  box-shadow: 3px 3px 0 var(--ink);
  margin-top: 4px;
}

.ad-gate-headline {
  font-family: "Jua", "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.4;
}

.ad-gate-disclosure {
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--ink);
  opacity: 0.6;
  line-height: 1.5;
}

/* 소울 컬러 테스트 (다중 태그형) */
.result-card.soul-red { background: #fddcd7; }
.result-card.soul-blue { background: #d9e8f7; }
.result-card.soul-yellow { background: #fff2b8; }
.result-card.soul-green { background: #dcf3e0; }
.result-card.soul-purple { background: #ebdcf7; }
.result-card.soul-red .result-title { color: #d94e2f; }
.result-card.soul-blue .result-title { color: #2f6fb0; }
.result-card.soul-yellow .result-title { color: #b8860b; }
.result-card.soul-green .result-title { color: #2f9e5c; }
.result-card.soul-purple .result-title { color: #8b4fc9; }

/* 아침형/밤형 테스트 (레터형) */
.result-card.morning { background: #fff3d6; }
.result-card.night { background: #dde3f7; }
.result-card.morning-night-balance { background: #f2ecd8; }
.result-card.morning .result-title { color: #c9950f; }
.result-card.night .result-title { color: #3d4fa0; }
.result-card.morning-night-balance .result-title { color: #9c7a3a; }

/* 썸 타는 스타일 테스트 (다중 태그형) */
.result-card.dating-active { background: #ffe0d6; }
.result-card.dating-subtle { background: #ffe1ee; }
.result-card.dating-direct { background: #dcefe6; }
.result-card.dating-pushpull { background: #fff0c2; }
.result-card.dating-careful { background: #dde3f7; }
.result-card.dating-active .result-title { color: #d9532f; }
.result-card.dating-subtle .result-title { color: #c94f85; }
.result-card.dating-direct .result-title { color: #2f9e6e; }
.result-card.dating-pushpull .result-title { color: #b8860b; }
.result-card.dating-careful .result-title { color: #3d5aa0; }

/* 리더십 스타일 테스트 (다중 태그형) */
.result-card.lead-charisma { background: #ffe0d6; }
.result-card.lead-coaching { background: #dcf3e0; }
.result-card.lead-democratic { background: #d7f0ef; }
.result-card.lead-servant { background: #f7e8d6; }
.result-card.lead-vision { background: #ebdcf7; }
.result-card.lead-charisma .result-title { color: #d9532f; }
.result-card.lead-coaching .result-title { color: #2f9e5c; }
.result-card.lead-democratic .result-title { color: #1f8f88; }
.result-card.lead-servant .result-title { color: #b8792f; }
.result-card.lead-vision .result-title { color: #8b4fc9; }

/* 절약 스타일 테스트 (다중 태그형) */
.result-card.save-apptech { background: #dbe7f7; }
.result-card.save-nospend { background: #ffe0d6; }
.result-card.save-secondhand { background: #dcf3e0; }
.result-card.save-coupon { background: #fff2b8; }
.result-card.save-minimal { background: #f5f0e8; }
.result-card.save-apptech .result-title { color: #3d6fa8; }
.result-card.save-nospend .result-title { color: #d9532f; }
.result-card.save-secondhand .result-title { color: #2f9e5c; }
.result-card.save-coupon .result-title { color: #b8860b; }
.result-card.save-minimal .result-title { color: #8a7d68; }
