/* 132차: 포켓몬 MBTI (tools/mbti.html · mbti_result.html). 묶음 색은 .mbti-g-* 의 --mg */
.mbti-g-nt { --mg: #7c5cd6; }
.mbti-g-nf { --mg: #22a37a; }
.mbti-g-sj { --mg: #3b7fdc; }
.mbti-g-sp { --mg: #e8901a; }

/* ─── 검사 ─── */
.mbti-test { display: grid; gap: 14px; margin-top: 4px; }
.mbti-progress { height: 8px; border-radius: 999px; background: var(--surface-muted); overflow: hidden; }
.mbti-progress i { display: block; width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--poke-yellow), #f59e0b); transition: width .3s ease; }
.mbti-progress-text, .mbti-tip, .mbti-last { margin: 0; color: var(--text-2); font-size: var(--text-sm); }
.mbti-progress-text b { color: var(--text); font-size: 18px; }
.mbti-q { margin: 0; padding: 22px 12px 18px; border: 0; border-top: 1px solid var(--border); text-align: center; transition: opacity .2s ease, background .2s ease; border-radius: var(--radius-md); }
.mbti-q.is-done { opacity: .55; }
.mbti-q.is-done:hover, .mbti-q.is-done:focus-within { opacity: 1; }
.mbti-q.is-missing { background: color-mix(in srgb, var(--poke-red) 10%, transparent); }
.mbti-q legend { display: block; width: 100%; padding: 0 0 16px; font-weight: 800; font-size: 17px; line-height: 1.5; float: left; }
.mbti-q legend + * { clear: both; }
.mbti-q-no { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-right: 6px; border-radius: 999px; background: var(--surface-muted); color: var(--text-3); font-size: 12px; vertical-align: 2px; }
.mbti-scale { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1.6vw, 16px); }
.mbti-end { min-width: 48px; font-size: var(--text-sm); font-weight: 800; }
.mbti-end.is-agree { color: var(--poke-green); text-align: right; }
.mbti-end.is-disagree { color: #8b5cf6; text-align: left; }
.mbti-dot { position: relative; display: grid; place-items: center; cursor: pointer; }
.mbti-dot input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.mbti-dot span { --c: var(--poke-green); display: block; width: var(--s); height: var(--s); border: 2.5px solid var(--c); border-radius: 50%; transition: transform .2s var(--ease-bounce), background .15s ease; }
.mbti-dot.d1, .mbti-dot.d7 { --s: 46px; }
.mbti-dot.d2, .mbti-dot.d6 { --s: 38px; }
.mbti-dot.d3, .mbti-dot.d5 { --s: 30px; }
.mbti-dot.d4 { --s: 24px; }
.mbti-dot.d4 span { --c: var(--text-3); }
.mbti-dot.d5 span, .mbti-dot.d6 span, .mbti-dot.d7 span { --c: #8b5cf6; }
.mbti-dot:hover span { transform: scale(1.08); background: color-mix(in srgb, var(--c) 18%, transparent); }
.mbti-dot input:checked + span { background: var(--c); transform: scale(1.06); }
.mbti-dot input:focus-visible + span { box-shadow: var(--focus-ring); }
.mbti-nav { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 8px; border-top: 1px solid var(--border); }

/* ─── 16유형 카드 ─── */
/* 133차: 카드는 위에서부터 채움(align-content: start) — 같은 줄에 설명 두 줄 카드가 있으면 뱃지가 세로로 늘어났음 · 뱃지 폭 고정 */
.mbti-type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1000px) { .mbti-type-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mbti-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mbti-type-card { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 10px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-align: center; text-decoration: none; transition: transform .3s var(--ease-bounce), border-color .2s ease; }
.mbti-type-card:hover { text-decoration: none; transform: translateY(-4px); border-color: var(--mg); }
.mbti-type-card.is-current { border-color: var(--mg); background: color-mix(in srgb, var(--mg) 10%, var(--surface)); }
.mbti-type-card img { width: 84px; height: 84px; object-fit: contain; }
.mbti-type-code { box-sizing: border-box; min-width: 54px; padding: 2px 10px; border-radius: 999px; text-align: center; line-height: 1.5; background: var(--mg); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.mbti-type-card b { font-size: 16px; }
.mbti-type-card small { color: var(--text-3); font-size: 11px; line-height: 1.4; }

/* ─── 결과 ─── */
.mbti-hero { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: center; gap: 24px; padding: 28px; margin-top: 4px;
  border: 0; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--mg) 75%, #000) 0%, var(--mg) 100%); }
.mbti-hero-art { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .32), transparent 68%); }
.mbti-hero-art img { width: 88%; height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .3)); animation: mbti-pop .6s var(--ease-bounce) both; }
@keyframes mbti-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mbti-hero-text { display: grid; gap: 8px; }
.mbti-hero-eyebrow { margin: 0; font-weight: 700; opacity: .85; }
.mbti-hero h1 { margin: 0; font-family: var(--font-cute); font-weight: var(--cute-weight); font-size: clamp(40px, 6vw, 64px); line-height: 1.1; color: #fff; }
.mbti-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 0; font-weight: 800; }
.mbti-code-pill { display: inline-block; padding: 4px 16px; border-radius: 999px; background: #fff; color: var(--mg); font-size: 22px; font-weight: 900; letter-spacing: .06em; }
.mbti-code-pill.is-small { padding: 1px 8px; font-size: 12px; background: var(--mg); color: #fff; }
.mbti-hero-title { margin: 6px 0 0; font-size: 22px; font-weight: 800; }
.mbti-hero-quote { margin: 0; opacity: .9; }
.mbti-share { justify-content: center; margin: 16px 0 0; }
.mbti-axes { display: grid; gap: 14px; }
.mbti-axis { display: grid; grid-template-columns: 130px minmax(0, 1fr) 130px; align-items: center; gap: 12px; font-size: var(--text-sm); }
.mbti-axis-side { color: var(--text-3); }
.mbti-axis-side.is-right { text-align: right; }
.mbti-axis-side.is-win { color: var(--text); font-weight: 800; }
.mbti-axis-bar { height: 12px; border-radius: 999px; background: color-mix(in srgb, #8b5cf6 30%, var(--surface-muted)); overflow: hidden; }
.mbti-axis-bar i { display: block; height: 100%; background: var(--poke-green); border-radius: 999px 0 0 999px; }
.mbti-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.mbti-two > .panel { margin: 0; }
.mbti-two .panel h2 { margin-top: 0; }
.mbti-desc { margin: 0 0 14px; color: var(--text-2); line-height: 1.8; }
.mbti-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mbti-lists h3 { margin: 0 0 8px; font-size: var(--text-sm); }
.mbti-lists ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: var(--text-sm); }
.mbti-lists .is-careful h3 { color: var(--poke-red); }
.mbti-unite-head { margin-top: 22px !important; }
/* 133차: 특성별 요점 4칸(생각 · 사람 · 연애 · 일) · 마음의 기능 4칸 */
.mbti-lead { margin: 0 0 14px; color: var(--text-2); line-height: 1.8; }
.mbti-aspects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mbti-aspect { padding: 14px 16px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--mg) 7%, var(--surface-muted)); }
.mbti-aspect h3 { margin: 0 0 8px; font-size: 15px; }
.mbti-aspect ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: var(--text-sm); line-height: 1.6; }
.mbti-aspect li::marker { color: var(--mg); }
.mbti-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; }
.mbti-chips small { margin-right: 2px; color: var(--text-3); font-size: 12px; font-weight: 800; }
.mbti-chips span { padding: 3px 11px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 700; }
.mbti-funcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.mbti-func { display: grid; align-content: start; gap: 4px; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.mbti-func.is-1 { border-color: var(--mg); background: color-mix(in srgb, var(--mg) 10%, var(--surface)); }
.mbti-func.is-2 { border-color: color-mix(in srgb, var(--mg) 45%, var(--border)); }
.mbti-func.is-4 { border-style: dashed; }
.mbti-func-role { color: var(--text-3); font-size: 12px; font-weight: 800; }
.mbti-func-key { color: var(--mg); font-size: 28px; font-weight: 900; line-height: 1.1; letter-spacing: .02em; }
.mbti-func strong { font-size: 15px; }
.mbti-func-desc { color: var(--text-2); font-size: var(--text-sm); line-height: 1.6; }
.mbti-func small { color: var(--text-3); font-size: 12px; line-height: 1.5; }
.mbti-match { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); color: var(--text); text-decoration: none; }
.mbti-match:hover { text-decoration: none; border-color: var(--mg); }
.mbti-match img { width: 64px; height: 64px; object-fit: contain; }
.mbti-match > span { display: grid; justify-items: start; gap: 4px; }
.mbti-match small { color: var(--text-3); }

@media (max-width: 760px) {
  .mbti-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px 18px; }
  .mbti-hero-art { width: min(240px, 70vw); }
  .mbti-hero-tags { justify-content: center; }
  .mbti-two, .mbti-lists, .mbti-aspects { grid-template-columns: 1fr; }
  .mbti-funcs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbti-axis { grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  .mbti-axis-bar { grid-column: 1 / -1; grid-row: 2; }
  .mbti-end { min-width: 0; font-size: 11px; }
  .mbti-scale { gap: 6px; }
  .mbti-q { padding-inline: 0; }
  .mbti-q legend { font-size: 15px; }
  .mbti-dot.d1, .mbti-dot.d7 { --s: 34px; }
  .mbti-dot.d2, .mbti-dot.d6 { --s: 28px; }
  .mbti-dot.d3, .mbti-dot.d5 { --s: 23px; }
  .mbti-dot.d4 { --s: 18px; }
}
