/* 마인드테스트 공통 스타일
   - 모바일 우선, 375px에서 가로 스크롤 없음
   - 테스트별 키 컬러는 <body data-theme="love|kkondae|vocab"> 로 지정 */

:root {
  color-scheme: light;

  --key: #ff7a7a;
  --key-dark: #e05555;
  --key-soft: #ffeaea;

  --bg: #fff8f3;
  --card: #ffffff;
  --ink: #2c2a33;
  --ink-soft: #6b6773;
  --line: #ece7e3;

  --radius: 20px;
  --tap: 48px;
  --wrap: 560px;
}

body[data-theme="love"] {
  --key: #ff7a7a; --key-dark: #e05555; --key-soft: #ffeaea; --bg: #fff6f4;
}
body[data-theme="kkondae"] {
  --key: #4a5b8c; --key-dark: #35446d; --key-soft: #e8ecf7; --bg: #f4f6fb;
}
body[data-theme="vocab"] {
  --key: #3f9e73; --key-dark: #2e7a58; --key-soft: #e4f4ec; --bg: #f3faf6;
}
body[data-theme="burnout"] {
  --key: #7b5ea7; --key-dark: #5c4184; --key-soft: #ede8f7; --bg: #f7f4fc;
}
body[data-theme="digital"] {
  --key: #2196b0; --key-dark: #16738a; --key-soft: #ddf1f6; --bg: #f2fafc;
}
body[data-theme="tmi"] {
  --key: #e8924a; --key-dark: #c06d28; --key-soft: #fdeede; --bg: #fff9f4;
}
body[data-theme="spelling"] {
  --key: #2563eb; --key-dark: #1d4ed8; --key-soft: #eff6ff; --bg: #f8fafc;
}
body[data-theme="slang"] {
  --key: #8b5cf6; --key-dark: #6d28d9; --key-soft: #f5f3ff; --bg: #faf5ff;
}
body[data-theme="money"] {
  --key: #059669; --key-dark: #047857; --key-soft: #ecfdf5; --bg: #f0fdf4;
}

* { box-sizing: border-box; }

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');
@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Jua&display=swap');

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  word-break: keep-all;
}

/* 귀엽고 아기자기한 Jua 폰트 적용 (헤더, 로고, 결과 타이틀, 배지) */
h1, h2, .result-name, .site-head a, .view-btn, .btn,
.share-hero-title, .share-hero-sub, .btn-share-sub, .result-kicker,
.card h2, .panel h2, .result-score, .smart-share-tip {
  font-family: 'Jua', 'Pretendard', sans-serif;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 18px 64px;
}

a { color: var(--key-dark); }

/* ---------- 헤더 ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 16px 0 12px;
  width: 100%;
}
.site-head a {
  color: var(--ink);
  text-decoration: none;
  font-family: 'Jua', 'Pretendard', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.site-head a:hover {
  transform: scale(1.03);
}
.site-head .dot { color: var(--key); }

/* 헤더 우측 액션 영역 & 언어/패밀리 스위처 */
.site-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
  flex-shrink: 0;
}
.site-head-actions #lang-switcher {
  position: static;
  transform: none;
}

.family-nav-wrap {
  position: relative;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
}
.family-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.family-btn:hover {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--key);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}
.family-btn .family-arrow {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}
.family-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 155px;
  margin: 0;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  list-style: none;
  z-index: 1000;
  display: none;
}
.family-dropdown.show {
  display: block;
  animation: langFadeIn 0.15s ease-out;
}
.family-dropdown a {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink) !important;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.family-dropdown a:hover {
  background: var(--key-soft) !important;
  color: var(--key-dark) !important;
}

#lang-switcher {
  position: relative;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  z-index: 100;
}
#lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}
#lang-btn:hover {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--key);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}
#lang-btn .lang-flag { font-size: 14px; }
#lang-btn .lang-arrow { font-size: 10px; opacity: 0.6; transition: transform 0.2s ease; }
#lang-btn[aria-expanded="true"] .lang-arrow { transform: rotate(180deg); }

#lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 130px;
  margin: 0;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  list-style: none;
  z-index: 101;
  animation: langFadeIn 0.15s ease-out;
}
@keyframes langFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
#lang-dropdown li {
  margin: 0;
  padding: 0;
}
#lang-dropdown li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s ease;
}
#lang-dropdown li a:hover {
  background: var(--key-soft);
  color: var(--key-dark);
}
#lang-dropdown li.active a {
  font-weight: 700;
  color: var(--key-dark);
  background: var(--key-soft);
}
@media (max-width: 480px) {
  .site-head {
    padding: 12px 0 8px;
    justify-content: space-between;
  }
  .site-head a {
    font-size: 19px;
  }
  .site-head-actions {
    gap: 5px;
  }
  .family-btn {
    padding: 5px 8px;
    font-size: 12px;
  }
  #lang-btn .lang-name {
    display: none;
  }
  #lang-btn {
    padding: 5px 8px;
  }
}

.lede {
  margin: 0 0 22px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---------- 뷰 전환 컨트롤러 (3x3 그리드 / 카드 목록) ---------- */
.view-switch-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 16px;
}
.view-switcher {
  display: inline-flex;
  align-items: center;
  background: #ebe6df;
  padding: 3px;
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.view-btn .btn-icon {
  font-size: 14px;
  line-height: 1;
}
.view-btn:hover {
  color: var(--ink);
}
.view-btn.active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ---------- 카드 (홈 목록) ---------- */

.card-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(60, 50, 45, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:active { transform: scale(0.99); }

.card .emoji { font-size: 40px; line-height: 1; display: block; margin-bottom: 8px; }
.card h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card .meta {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--key-soft);
  color: var(--key-dark);
  font-size: 13px;
}

/* 카드별 고유 테마 컬러 포인트 */
.card[data-card="love"] { --c-soft: #ffeaea; --c-dark: #e05555; }
.card[data-card="kkondae"] { --c-soft: #e8ecf7; --c-dark: #35446d; }
.card[data-card="vocab"] { --c-soft: #e4f4ec; --c-dark: #2e7a58; }
.card[data-card="burnout"] { --c-soft: #ede8f7; --c-dark: #5c4184; }
.card[data-card="digital"] { --c-soft: #ddf1f6; --c-dark: #16738a; }
.card[data-card="tmi"] { --c-soft: #fdeede; --c-dark: #c06d28; }
.card[data-card="spelling"] { --c-soft: #eff6ff; --c-dark: #1d4ed8; }
.card[data-card="slang"] { --c-soft: #f5f3ff; --c-dark: #6d28d9; }
.card[data-card="money"] { --c-soft: #ecfdf5; --c-dark: #047857; }

.card[data-card] .meta {
  background: var(--c-soft, var(--key-soft));
  color: var(--c-dark, var(--key-dark));
}

/* ---------- 3x3 그리드 뷰 (첫 화면에 9개 모두 노출) ---------- */
.card-list.view-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.card-list.view-grid li {
  list-style: none;
  display: flex;
}

.card-list.view-grid .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 12px 6px 10px;
  min-height: 104px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 2px 8px rgba(60, 50, 45, 0.04);
  position: relative;
  overflow: hidden;
}

.card-list.view-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
  border-color: var(--c-dark, var(--key));
}

.card-list.view-grid .card:active {
  transform: scale(0.97);
}

.card-list.view-grid .card .emoji {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 6px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
  transition: transform 0.2s ease;
}

.card-list.view-grid .card:hover .emoji {
  transform: scale(1.12);
}

.card-list.view-grid .card h2 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.03em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-list.view-grid .card p {
  display: none; /* 그리드 모드에서는 3x3 전체 뷰포트 배치를 위해 숨김 */
}

.card-list.view-grid .card .meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
}

/* 모바일 화면(iPhone SE, 375px)에서도 첫화면에 3x3이 시원하게 다 보이도록 최적화 */
@media (max-width: 420px) {
  .card-list.view-grid {
    gap: 7px;
  }
  .card-list.view-grid .card {
    padding: 10px 4px 8px;
    min-height: 96px;
    border-radius: 14px;
  }
  .card-list.view-grid .card .emoji {
    font-size: 24px;
    margin-bottom: 4px;
  }
  .card-list.view-grid .card h2 {
    font-size: 12px;
    margin-bottom: 2px;
  }
  .card-list.view-grid .card .meta {
    font-size: 9.5px;
    padding: 1.5px 5px;
  }
}

/* ---------- 질문 화면 ---------- */

.test-title {
  margin: 0 auto 16px;
  text-align: center;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--key-dark);
  background: var(--key-soft);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  padding: 5px 16px;
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--key-soft);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--key) 0%, var(--key-dark) 100%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 24px;
  min-height: 36px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-back:hover:not([disabled]) {
  background: var(--key-soft);
  color: var(--key-dark);
}
.btn-back[disabled] { opacity: 0.25; cursor: default; }

.q-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.q-text {
  margin: 0 0 26px;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 20.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.025em;
  color: var(--ink);
  word-break: keep-all;
}
.q-text:focus { outline: none; }
.q-text.q-fade {
  animation: qFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes qFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.answers {
  display: grid;
  gap: 12px;
  counter-reset: choice-idx;
}

@keyframes answerFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.answer {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 56px;
  padding: 15px 18px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  word-break: keep-all;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  animation: answerFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.answer:nth-child(1) { animation-delay: 0.02s; }
.answer:nth-child(2) { animation-delay: 0.06s; }
.answer:nth-child(3) { animation-delay: 0.10s; }
.answer:nth-child(4) { animation-delay: 0.14s; }

/* 선택지 A / B 인덱스 라벨 배지 */
.answer::before {
  counter-increment: choice-idx;
  content: counter(choice-idx, upper-alpha);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--key-soft);
  color: var(--key-dark);
  font-family: 'Pretendard', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.answer:hover {
  border-color: var(--key);
  background: var(--key-soft);
  color: var(--key-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.answer:hover::before {
  background: var(--key);
  color: #ffffff;
  border-color: transparent;
  transform: scale(1.05);
}

.answer.is-selected,
.answer:active,
.answer:focus-visible {
  border-color: var(--key-dark);
  background: var(--key-soft);
  color: var(--key-dark);
  transform: scale(0.99);
  box-shadow: 0 0 0 3px rgba(255, 122, 122, 0.22);
}

.answer.is-selected::before,
.answer:active::before {
  background: var(--key-dark);
  color: #ffffff;
  border-color: transparent;
}

.q-grade {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--key-soft);
  color: var(--key-dark);
  font-family: 'Pretendard', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.q-grade:empty { display: none; }

/* ---------- 결과 화면 ---------- */

.result-head { text-align: center; padding: 8px 0 4px; }
.result-kicker { margin: 0; color: var(--ink-soft); font-size: 15px; }
.result-emoji { font-size: 76px; line-height: 1.1; margin: 6px 0 2px; }
.result-name {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--key-dark);
}
.result-score {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--key-soft);
  color: var(--key-dark);
  font-size: 15px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin: 16px 0;
}
.panel h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--ink-soft);
  font-weight: 700;
}
.panel p { margin: 0; }

.traits { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.traits li { position: relative; padding-left: 22px; }
.traits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--key);
  font-weight: 700;
}

.brag {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--key-soft);
  color: var(--key-dark);
  font-size: 17px;
  text-align: center;
}

/* ---------- 버튼 ---------- */

.btn-row { display: grid; gap: 10px; margin: 14px 0; }
.btn-row.two { grid-template-columns: 1fr 1fr; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
/* 형제 서비스와 동일하게 hover 시 살짝 뜨는 모션을 줍니다 */
.btn { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease; }
.btn:hover { border-color: var(--key); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--key);
  border-color: var(--key);
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover { background: var(--key-dark); border-color: var(--key-dark); }

/* 모션에 민감한 사용자는 제외 */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active { transition: none; transform: none; }
}

/* ---------- 스마트 바이럴 공유 박스 ---------- */
.smart-share-box {
  margin: 20px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-share-hero {
  position: relative;
  width: 100%;
  min-height: 64px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--key) 0%, var(--key-dark) 100%);
  border: none;
  border-radius: 20px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(224, 85, 85, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.btn-share-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(224, 85, 85, 0.38);
}
.btn-share-hero:active {
  transform: translateY(1px) scale(0.98);
}

.share-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.share-hero-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.share-hero-sub {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: -0.01em;
}

.btn-share-sub-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-share-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.btn-share-sub:hover {
  border-color: var(--key);
  background: var(--key-soft);
  color: var(--key-dark);
  transform: translateY(-1px);
}
.btn-share-sub:active {
  transform: scale(0.98);
}

.smart-share-tip {
  margin: 4px 0 8px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- 결과 카드 미리보기 모달 ---------- */
.card-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.card-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}
.card-modal-content {
  position: relative;
  max-width: 440px;
  width: 100%;
  max-height: 94vh;
  background: var(--card);
  border-radius: 28px;
  padding: 20px 20px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-modal-backdrop.show .card-modal-content {
  transform: scale(1);
}
.card-modal-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-modal-title {
  font-family: 'Jua', 'Gowun Dodum', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-modal-close-btn {
  background: var(--bg);
  border: none;
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.card-modal-close-btn:hover {
  background: var(--line);
  color: var(--ink);
}
.card-modal-img-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}
.card-modal-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--line);
  cursor: pointer;
}
.card-modal-tip {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.45;
  margin-bottom: 14px;
  padding: 0 6px;
  font-family: 'Gowun Dodum', sans-serif;
}
.card-modal-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-modal-btn-download {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--key) 0%, var(--key-dark) 100%);
  color: #ffffff;
  font-family: 'Jua', 'Gowun Dodum', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}
.card-modal-btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.card-modal-btn-download:active {
  transform: scale(0.98);
}
.card-modal-btn-copy {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font-family: 'Jua', 'Gowun Dodum', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.card-modal-btn-copy:hover {
  border-color: var(--key);
  background: var(--key-soft);
  color: var(--key-dark);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(44, 42, 51, 0.92);
  color: #fff;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 광고 슬롯 ---------- */

.ad-slot { margin: 24px 0; min-height: 1px; text-align: center; }

/* ---------- 푸터 ---------- */

.site-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: "Pretendard", -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.75;
  text-align: center;
}
.site-foot p {
  margin: 4px 0;
}
.site-foot a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-foot a:hover {
  color: var(--key-dark);
}
.site-foot a[href*="hanja"] {
  display: inline-block;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: all 0.15s ease;
}
.site-foot a[href*="hanja"]:hover {
  color: var(--key-dark);
  text-decoration-color: var(--key);
}

@media (min-width: 600px) {
  body { font-size: 16.5px; }
  .q-text { font-size: 24px; margin: 0 0 30px; }
  .answer { padding: 17px 22px; gap: 15px; }
  .answer::before { width: 28px; height: 28px; font-size: 13.5px; }
  .result-name { font-size: 36px; }
}
