/* ===========================
   MBTI 동물 테스트 - style.css
   Mobile-first responsive
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #6C63FF;
  --primary-dk: #5549e8;
  --accent:     #FF6584;
  --success:    #43B89C;
  --warn:       #F9A826;
  --bg:         #F7F8FC;
  --card:       #FFFFFF;
  --text:       #1A1A2E;
  --text-mute:  #6B7280;
  --border:     #E5E7EB;
  --radius:     16px;
  --shadow:     0 4px 24px rgba(108,99,255,.12);

  /* MBTI axis colors */
  --e: #3B82F6; --i: #10B981;
  --s: #F97316; --n: #8B5CF6;
  --t: #EF4444; --f: #EC4899;
  --j: #EAB308; --p: #06B6D4;

  /* Animal group colors */
  --nt: #7C3AED; --nf: #DB2777;
  --sj: #2563EB; --sp: #D97706;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- Nav --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
}
.nav-inner {
  max-width: 900px; margin: 0 auto;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-weight: 900; font-size: 1rem; color: var(--primary); }
.nav-links { display: flex; gap: 1.2rem; }
.nav-links a {
  font-size: .9rem; color: var(--text-mute);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); font-weight: 700; }

/* --- Container --- */
.container { max-width: 900px; margin: 0 auto; padding: 0 1rem; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 3rem 1rem 4rem;
  text-align: center;
}
.hero-inner { max-width: 600px; margin: 0 auto; }
.hero-animals { font-size: 1.8rem; letter-spacing: .4rem; margin-bottom: 1rem; opacity: .8; }
.hero-title { font-size: clamp(2rem, 6vw, 3rem); font-weight: 900; margin-bottom: .75rem; }
.hero-subtitle { font-size: 1.05rem; opacity: .9; margin-bottom: 1.5rem; }
.hero-badges { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.badge {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .85rem;
}

/* --- Buttons --- */
.btn-start {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.1rem;
  padding: .9rem 2.5rem;
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  transition: transform .2s, box-shadow .2s;
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.btn-center { display: block; width: fit-content; margin: 2rem auto 0; }

.btn-retest, .btn-home, .btn-viewresult {
  display: inline-block;
  padding: .7rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  transition: opacity .2s;
}
.btn-retest { background: var(--primary); color: #fff; }
.btn-home { background: var(--border); color: var(--text); }
.btn-retest:hover, .btn-home:hover { opacity: .85; }

/* --- Returning Banner --- */
.returning-banner {
  background: linear-gradient(90deg, #f0f0ff, #ffeef5);
  border-bottom: 2px solid var(--primary);
  padding: .9rem 1rem;
  text-align: center;
}
.banner-inner { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; align-items: center; }
.banner-btns { display: flex; gap: .5rem; }
.btn-retest, .btn-viewresult {
  background: var(--primary); color: #fff;
  padding: .45rem 1.2rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
}
.btn-viewresult { background: var(--accent); }

/* --- Features --- */
.features { padding: 3rem 1rem; }
.section-title {
  text-align: center; font-size: 1.5rem; font-weight: 900;
  margin-bottom: 2rem; color: var(--text);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
}
.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 2.2rem; margin-bottom: .6rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.feature-card p { font-size: .88rem; color: var(--text-mute); }

/* --- Types Preview --- */
.types-preview { background: var(--card); padding: 3rem 1rem; }
.types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}
.type-item {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg);
  border-radius: 12px;
  padding: .8rem .4rem;
  cursor: pointer;
  transition: background .2s;
}
.type-item:hover { background: #ede9fe; }
.type-item span { font-size: 1.8rem; }
.type-item small { font-size: .75rem; font-weight: 700; color: var(--text-mute); margin-top: .2rem; }
[data-group="nt"] small { color: var(--nt); }
[data-group="nf"] small { color: var(--nf); }
[data-group="sj"] small { color: var(--sj); }
[data-group="sp"] small { color: var(--sp); }

/* --- Quiz --- */
.quiz-main { flex: 1; padding: 2rem 1rem; }
.quiz-container { max-width: 640px; margin: 0 auto; }
.quiz-progress { margin-bottom: 1.5rem; }
.progress-bar {
  height: 8px; background: var(--border);
  border-radius: 999px; overflow: hidden; margin-bottom: .4rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width .4s ease;
}
.progress-text { font-size: .82rem; color: var(--text-mute); display: block; text-align: right; }

.question-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.question-emoji { font-size: 3rem; margin-bottom: 1rem; }
.question-text { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.5; }

.options-grid { display: flex; flex-direction: column; gap: .8rem; }
.option-btn {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: .98rem;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
  transition: all .2s;
  color: var(--text);
}
.option-btn:hover { border-color: var(--primary); background: #f0efff; transform: translateX(4px); }
.option-btn.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

.quiz-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.2rem;
}
.btn-prev {
  background: none; border: none;
  color: var(--text-mute); font-size: .9rem;
  cursor: pointer; padding: .5rem;
}
.question-count { font-size: .85rem; color: var(--text-mute); }

/* --- Result --- */
.result-main { flex: 1; padding: 2rem 1rem; }

.result-loading { text-align: center; padding: 3rem 1rem; }
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}
.result-type-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 1.4rem; font-weight: 900;
  padding: .4rem 1.4rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  letter-spacing: .2rem;
}
.result-animal-emoji { font-size: 5rem; margin-bottom: .5rem; }
.result-animal-name { font-size: 2rem; font-weight: 900; color: var(--primary); margin-bottom: .3rem; }
.result-title { font-size: 1.2rem; color: var(--text-mute); margin-bottom: .5rem; }
.result-group {
  display: inline-block;
  background: var(--bg);
  border-radius: 999px;
  padding: .25rem 1rem;
  font-size: .85rem; font-weight: 700;
  color: var(--text-mute);
  margin-bottom: 1.2rem;
}
.result-description {
  font-size: .98rem; line-height: 1.8;
  text-align: left; margin-bottom: 1.5rem;
  color: var(--text);
}
.result-stats {
  display: flex; gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-item {
  flex: 1;
  background: var(--bg);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.stat-label { display: block; font-size: .78rem; color: var(--text-mute); margin-bottom: .3rem; }
.stat-value { font-size: 1.3rem; font-weight: 900; color: var(--primary); }

.result-tags, .result-compat { text-align: left; margin-bottom: 1.2rem; }
.result-tags h3, .result-compat h3 { font-size: .95rem; font-weight: 700; margin-bottom: .6rem; }
.tags-list, .compat-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  background: #ede9fe; color: var(--primary);
  border-radius: 999px;
  padding: .3rem .9rem; font-size: .85rem; font-weight: 700;
}
.compat-tag {
  background: #fce7f3; color: var(--nf);
  border-radius: 999px;
  padding: .3rem .9rem; font-size: .9rem; font-weight: 900;
}

/* --- Share Section --- */
.share-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}
.share-section h3 { font-size: 1.1rem; font-weight: 900; margin-bottom: .4rem; }
.share-desc { font-size: .88rem; color: var(--text-mute); margin-bottom: 1.2rem; }
.share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: .8rem; }
.share-btn {
  border: none; border-radius: 12px;
  padding: .85rem 1rem;
  font-size: .92rem; font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.share-btn:hover { opacity: .85; transform: translateY(-2px); }
.share-btn.kakao  { background: #FEE500; color: #3A1D1D; }
.share-btn.twitter { background: #000; color: #fff; }
.share-btn.facebook { background: #1877F2; color: #fff; }
.share-btn.copy { background: var(--bg); color: var(--text); border: 2px solid var(--border); }
.share-hint { font-size: .82rem; color: var(--text-mute); }

/* --- History Section --- */
.history-section {
  max-width: 640px; margin: 0 auto 1.5rem;
  background: var(--card); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.history-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.history-item:last-child { border-bottom: none; }
.history-type { font-weight: 900; color: var(--primary); }
.history-date { color: var(--text-mute); font-size: .8rem; }

/* --- Result Actions --- */
.result-actions {
  display: flex; gap: 1rem; justify-content: center;
  max-width: 640px; margin: 0 auto 2rem;
  flex-wrap: wrap;
}

/* --- Ad Container --- */
.ad-container {
  max-width: 900px; margin: 1rem auto;
  padding: 0 1rem;
  min-height: 60px;
}

/* --- Page (about/privacy) --- */
.page-main { flex: 1; padding: 2rem 1rem; }
.page-container { max-width: 720px; }
.page-title { font-size: 1.8rem; font-weight: 900; margin-bottom: .3rem; }
.page-updated { font-size: .85rem; color: var(--text-mute); margin-bottom: 2rem; }
.page-section { margin-bottom: 2rem; }
.page-section h2 { font-size: 1.1rem; font-weight: 900; margin-bottom: .8rem; border-left: 4px solid var(--primary); padding-left: .7rem; }
.page-section p { font-size: .95rem; margin-bottom: .7rem; color: var(--text); }
.page-section a { color: var(--primary); text-decoration: underline; }
.page-list { padding-left: 1.2rem; }
.page-list li { margin-bottom: .5rem; font-size: .95rem; list-style: disc; }
.disclaimer { font-size: .82rem; color: var(--text-mute); background: var(--bg); padding: .8rem 1rem; border-radius: 8px; margin-top: .8rem; }

/* --- MBTI Axes (about page) --- */
.mbti-axes { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.axis-item { display: flex; align-items: center; gap: .8rem; }
.axis-label {
  display: inline-block; min-width: 90px;
  padding: .3rem .8rem; border-radius: 999px;
  font-size: .88rem; font-weight: 700; text-align: center;
}
.axis-vs { color: var(--text-mute); font-size: .8rem; }
.axis-label.e { background: #dbeafe; color: var(--e); }
.axis-label.i { background: #d1fae5; color: var(--i); }
.axis-label.s { background: #fed7aa; color: var(--s); }
.axis-label.n { background: #ede9fe; color: var(--n); }
.axis-label.t { background: #fee2e2; color: var(--t); }
.axis-label.f { background: #fce7f3; color: var(--f); }
.axis-label.j { background: #fef9c3; color: #92400e; }
.axis-label.p { background: #cffafe; color: #0e7490; }

/* --- Toast --- */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff;
  padding: .7rem 1.5rem; border-radius: 999px;
  font-size: .9rem; font-weight: 700;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  z-index: 9999; white-space: nowrap;
}
.toast.show { opacity: 1; }

/* --- Footer --- */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: .85rem;
  margin-top: auto;
}
.footer-nav { margin-top: .5rem; display: flex; gap: 1.2rem; justify-content: center; }
.footer-nav a { color: rgba(255,255,255,.6); }
.footer-nav a:hover { color: #fff; }

/* --- Responsive --- */
@media (min-width: 600px) {
  .options-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .share-buttons { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 5rem 1rem 6rem; }
  .hero-title { font-size: 3rem; }
}

@media (max-width: 480px) {
  .types-grid { grid-template-columns: repeat(4, 1fr); gap: .4rem; }
  .type-item span { font-size: 1.4rem; }
  .result-stats { flex-direction: column; }
  .share-buttons { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   NEW FEATURES STYLES
   (기존 스타일 수정 없음 - 신규 기능 스타일만 추가)
   ============================================================ */

/* --- Popular Features (index.html) --- */
.popular-features { padding: 3rem 1rem; background: linear-gradient(135deg, #f0f0ff 0%, #ffeef5 100%); }
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.popular-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.3rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: var(--text);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.popular-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(108,99,255,.18); }
.popular-card-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.popular-card h3 { font-size: .95rem; font-weight: 900; margin-bottom: .3rem; }
.popular-card p { font-size: .8rem; color: var(--text-mute); line-height: 1.4; margin-bottom: .6rem; }
.popular-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: .15rem .65rem;
  font-size: .72rem;
  font-weight: 700;
  margin-top: auto;
}
.popular-badge-new { background: #EF4444; }
.popular-badge-fun { background: var(--accent); }
.popular-badge-go { background: var(--success); }
.popular-card-highlight { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); color: #fff; }
.popular-card-highlight h3, .popular-card-highlight p { color: #fff; }
.popular-card-highlight .popular-badge-go { background: #fff; color: var(--primary); }

/* --- Compat Page --- */
.compat-header { text-align: center; padding: 1.5rem 0 .5rem; }
.compat-main-title { font-size: 1.8rem; font-weight: 900; color: var(--primary); margin-bottom: .4rem; }
.compat-main-desc { font-size: 1rem; color: var(--text-mute); }
.compat-share-banner {
  background: var(--card); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow); text-align: center; max-width: 640px; margin: 0 auto 1.5rem;
}
.compat-share-inner { }
.compat-share-me { font-size: 1.1rem; margin-bottom: .6rem; }
.btn-compat-share {
  background: var(--primary); color: #fff;
  border: none; border-radius: 999px; padding: .7rem 1.8rem;
  font-size: .95rem; font-weight: 700; font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer; margin-top: .6rem; transition: opacity .2s;
}
.btn-compat-share:hover { opacity: .85; }
.compat-result-card {
  background: var(--card); border-radius: var(--radius); padding: 2rem 1.5rem;
  box-shadow: var(--shadow); max-width: 640px; margin: 0 auto 1.5rem; text-align: center;
}
.compat-pair { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.compat-person { text-align: center; min-width: 100px; }
.compat-type-badge {
  display: inline-block; background: var(--primary); color: #fff;
  border-radius: 999px; padding: .3rem 1rem; font-weight: 900; font-size: 1rem;
  margin-bottom: .4rem;
}
.compat-animal { font-size: 1.3rem; font-weight: 700; }
.compat-heart { font-size: 2.5rem; }
.compat-score-wrap { margin-bottom: 1rem; }
.compat-score-circle {
  width: 120px; height: 120px; border-radius: 50%;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--primary) 0deg, #E5E7EB 0deg);
  position: relative;
}
.compat-score-circle::before {
  content: ''; position: absolute; inset: 12px;
  background: var(--card); border-radius: 50%;
}
.compat-score-num {
  font-size: 2.2rem; font-weight: 900; color: var(--primary); position: relative; z-index: 1;
}
.compat-score-label {
  font-size: .72rem; color: var(--text-mute); position: relative; z-index: 1;
}
.compat-grade { margin-bottom: .8rem; }
.compat-desc { font-size: .95rem; line-height: 1.8; text-align: left; margin-bottom: 1.2rem; color: var(--text); }
.compat-advice-box {
  background: var(--bg); border-radius: 12px; padding: 1rem 1.2rem;
  text-align: left; margin-bottom: 1.5rem;
}
.compat-advice-box h3 { font-size: .95rem; margin-bottom: .4rem; }
.compat-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.compat-selector { max-width: 640px; margin: 0 auto 1.5rem; }
.compat-dropdowns { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.compat-dropdown-wrap { display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.compat-dropdown-wrap label { font-size: .85rem; font-weight: 700; color: var(--text-mute); }
.compat-select {
  background: var(--bg); border: 2px solid var(--border); border-radius: 12px;
  padding: .6rem 1rem; font-size: .9rem; font-family: 'Noto Sans KR', sans-serif;
  color: var(--text); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236B7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center;
  padding-right: 2.2rem;
}
.compat-select:focus { outline: none; border-color: var(--primary); }
.compat-dropdown-vs { font-size: 1.2rem; font-weight: 900; color: var(--text-mute); padding-top: 1.2rem; }
.btn-compat-check {
  display: block; width: fit-content; margin: 0 auto;
  border: none; cursor: pointer; font-family: 'Noto Sans KR', sans-serif;
}

/* --- Speed Quiz --- */
.speed-intro-rules { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin: 1rem 0; }
.speed-rule-item {
  background: var(--bg); border-radius: 999px; padding: .4rem 1rem;
  font-size: .85rem; font-weight: 700; color: var(--text-mute);
}
.speed-quiz-wrap { max-width: 640px; margin: 0 auto; }
.speed-question-card { position: relative; }
.speed-timer-wrap {
  position: absolute; top: -20px; right: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.speed-timer-svg { }
.speed-timer-num {
  position: absolute; font-size: 1.4rem; font-weight: 900;
  color: var(--primary); line-height: 1;
}
.speed-status { min-height: 1.4rem; margin-top: .8rem; font-size: .9rem; font-weight: 700; text-align: center; }
.speed-axis-bar {
  display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem;
}
.speed-axis-label { font-size: .85rem; font-weight: 900; min-width: 20px; }
.speed-bar-track { flex: 1; height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.speed-bar-fill { height: 100%; background: var(--primary); border-radius: 5px; transition: width .4s; }
.speed-answer-summary { margin: .8rem 0; padding: 1rem; background: var(--bg); border-radius: 12px; }

/* --- Fortune --- */
.fortune-main-card { max-width: 640px; margin: 0 auto; }
.fortune-type-wrap { display: flex; align-items: center; margin-bottom: 1.2rem; justify-content: center; flex-wrap: wrap; gap: .5rem; }
.fortune-scores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.fortune-score-item {
  background: var(--bg); border-radius: 12px; padding: 1rem;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.fortune-score-icon { font-size: 1.5rem; }
.fortune-score-label { font-size: .78rem; color: var(--text-mute); font-weight: 700; }
.fortune-stars { display: flex; gap: .1rem; }
.fortune-score-desc { font-size: .8rem; color: var(--text-mute); text-align: center; line-height: 1.4; margin-top: .2rem; }
.fortune-word-box { background: var(--bg); border-radius: 12px; padding: 1.2rem; margin-bottom: 1.2rem; }
.fortune-lucky { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.fortune-lucky-item {
  background: var(--primary); color: #fff;
  border-radius: 999px; padding: .35rem .9rem; font-size: .8rem; font-weight: 700;
}

/* --- Careers --- */
.careers-type-tabs { display: flex; flex-direction: column; gap: .8rem; }
.careers-tab-group { }
.careers-tab-group-label { font-size: .8rem; font-weight: 700; margin-bottom: .4rem; padding-left: .2rem; }
.careers-tab-btns { display: flex; gap: .4rem; flex-wrap: wrap; }
.careers-tab-btn {
  background: var(--bg); border: 2px solid var(--border); border-radius: 8px;
  padding: .35rem .8rem; font-size: .85rem; font-weight: 700; font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer; color: var(--text); transition: all .2s;
}
.careers-tab-btn:hover { border-color: var(--tab-color, var(--primary)); color: var(--tab-color, var(--primary)); }
.careers-tab-btn.active { background: var(--tab-color, var(--primary)); border-color: var(--tab-color, var(--primary)); color: #fff; }
.careers-result-card { max-width: 640px; margin: 0 auto; }
.careers-result-header { display: flex; align-items: center; margin-bottom: .8rem; flex-wrap: wrap; gap: .4rem; }
.careers-tagline { font-size: .9rem; color: var(--text-mute); margin-bottom: 1.2rem; line-height: 1.6; }
.careers-jobs-list { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1.5rem; }
.careers-job-item {
  display: flex; align-items: flex-start; gap: .8rem;
  background: var(--bg); border-radius: 12px; padding: .9rem 1rem;
}
.careers-job-rank {
  font-size: 1.2rem; font-weight: 900; color: var(--primary);
  min-width: 28px; text-align: center; line-height: 1.4;
}
.careers-job-emoji { font-size: 1.5rem; min-width: 28px; text-align: center; }
.careers-job-info { flex: 1; }
.careers-job-title { font-size: .95rem; font-weight: 900; margin-bottom: .2rem; }
.careers-job-reason { font-size: .82rem; color: var(--text-mute); line-height: 1.5; }
.careers-strengths-wrap { margin-bottom: 1.2rem; }
.careers-advice-box { background: var(--bg); border-radius: 12px; padding: 1rem 1.2rem; }

/* --- Situations --- */
.situations-deck { max-width: 640px; margin: 0 auto; padding: 0 1rem; }
.situations-card-wrap { }
.situations-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.situations-card-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 1.5rem; text-align: center; }
.situations-card-emoji { font-size: 3rem; margin-bottom: .5rem; }
.situations-card-title { font-size: 1.3rem; font-weight: 900; margin-bottom: .4rem; }
.situations-card-desc { font-size: .9rem; opacity: .9; }
.situations-reactions { padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.situations-reaction-item { background: var(--bg); border-radius: 12px; padding: .9rem 1rem; }
.situations-reaction-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.situations-reaction-emoji { font-size: 1.3rem; }
.situations-reaction-types { font-size: .78rem; font-weight: 900; color: var(--primary); }
.situations-reaction-text { font-size: .9rem; line-height: 1.6; color: var(--text); }
.situations-card-actions { padding: 1rem; text-align: center; border-top: 1px solid var(--border); }
.situations-nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 1rem auto 0; padding: 0 1rem;
}
.situations-nav-btn {
  background: var(--card); border: 2px solid var(--border); border-radius: 999px;
  padding: .5rem 1.2rem; font-size: .88rem; font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif; cursor: pointer;
  transition: all .2s; color: var(--text);
}
.situations-nav-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.situations-nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.situations-dots { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; max-width: 200px; }
.situations-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); cursor: pointer; transition: background .2s;
}
.situations-dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* --- Group --- */
.group-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-radius: 12px; overflow: hidden; border: 2px solid var(--border); }
.group-tab-btn {
  flex: 1; padding: .7rem 1rem; font-size: .9rem; font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif; background: var(--bg);
  border: none; cursor: pointer; color: var(--text-mute); transition: all .2s;
}
.group-tab-btn.active { background: var(--primary); color: #fff; }
.group-input {
  width: 100%; padding: .7rem 1rem; border: 2px solid var(--border); border-radius: 12px;
  font-size: .95rem; font-family: 'Noto Sans KR', sans-serif; color: var(--text);
  background: var(--bg); transition: border-color .2s;
}
.group-input:focus { outline: none; border-color: var(--primary); }
.group-info-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; flex-wrap: wrap; gap: .8rem; }
.group-info-name { font-size: 1.2rem; font-weight: 900; margin-bottom: .2rem; }
.group-code-display { font-size: 1.4rem; font-weight: 900; color: var(--primary); letter-spacing: .15rem; }
.group-share-btn {
  background: var(--primary); color: #fff; border: none; border-radius: 999px;
  padding: .5rem 1.2rem; font-size: .85rem; font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif; cursor: pointer; white-space: nowrap;
}
.group-my-type-wrap { border-top: 1px solid var(--border); padding-top: 1.2rem; }
.group-member-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem 0; border-bottom: 1px solid var(--border);
}
.group-member-item:last-child { border-bottom: none; }
.group-member-info { display: flex; align-items: center; gap: .8rem; }
.group-member-nickname { font-weight: 700; }
.group-member-type { font-size: .85rem; font-weight: 700; }
.group-remove-btn {
  background: none; border: none; cursor: pointer; color: var(--text-mute);
  font-size: .9rem; padding: .2rem .5rem; border-radius: 4px;
}
.group-remove-btn:hover { background: #fee2e2; color: var(--t); }
.group-chart-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.group-chart-label { font-size: .82rem; font-weight: 900; min-width: 44px; text-align: right; }
.group-chart-bar-wrap { flex: 1; height: 24px; background: var(--border); border-radius: 4px; overflow: hidden; }
.group-chart-bar { height: 100%; border-radius: 4px; transition: width .5s ease; min-width: 4px; }
.group-chart-count { font-size: .78rem; color: var(--text-mute); min-width: 70px; text-align: right; }
.group-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.group-analysis-item { background: var(--bg); border-radius: 8px; padding: .6rem .8rem; }
.group-analysis-label { font-size: .8rem; font-weight: 700; color: var(--text-mute); display: block; margin-bottom: .2rem; }
.group-analysis-val { font-size: 1rem; font-weight: 900; color: var(--primary); display: block; margin-bottom: .3rem; }
.group-mini-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }

/* --- Responsive for new features --- */
@media (max-width: 480px) {
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .fortune-scores-grid { grid-template-columns: 1fr 1fr; }
  .compat-pair { gap: .5rem; }
  .compat-dropdowns { flex-direction: column; }
  .compat-dropdown-vs { padding-top: 0; }
  .group-analysis-grid { grid-template-columns: 1fr 1fr; }
  .speed-timer-wrap { top: -15px; right: .5rem; }
  .careers-jobs-list { gap: .5rem; }
}

@media (min-width: 600px) {
  .popular-grid { grid-template-columns: repeat(4, 1fr); }
  .fortune-scores-grid { grid-template-columns: repeat(4, 1fr); }
  .careers-tab-group { display: flex; gap: .8rem; align-items: center; }
  .careers-tab-group-label { min-width: 110px; margin-bottom: 0; }
}
