/*
  16코드연구소 공통 스타일 파일
  - 브랜드 기본색: Black / White
  - 포인트 컬러는 --accent 값만 바꾸면 전체에 반영됩니다.
  - 페이지가 늘어날 것을 고려해 공통 레이아웃, 버튼, 카드, 반응형을 이 파일에 모았습니다.
*/
:root {
  --bg: #050505;
  --surface: #111111;
  --surface-2: #191919;
  --text: #f7f7f7;
  --muted: #a6a6a6;
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.06);
  --accent: #d7ff42;
  --accent-2: #ffffff;
  --danger: #ff6b6b;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1160px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(215, 255, 66, 0.12), transparent 34%),
    radial-gradient(circle at 80% 8%, rgba(255, 255, 255, 0.10), transparent 30%),
    var(--bg);
  line-height: 1.68;
  word-break: keep-all;
}

p, li { line-height: 1.72; }
h1, h2, h3 { text-wrap: balance; }

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

.hidden { display: none !important; }

.container { width: min(100% - 40px, var(--max)); margin: 0 auto; }
.section { padding: 84px 0; }
.section.compact { padding: 54px 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(18px);
}
.navbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: -0.02em; }
.logo-wrap img { width: 168px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; gap: 10px; }
.mobile-menu-btn { display: none; background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 10px 12px; }

.hero { padding: 78px 0 68px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 56px; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.hero h1 {
  max-width: 840px;
  margin: 14px 0 22px;
  font-size: clamp(42px, 4.8vw, 60px);
  line-height: 1.14;
  letter-spacing: -0.048em;
}
.page-hero h1 {
  max-width: 900px;
  margin: 14px 0 18px;
  font-size: clamp(36px, 4vw, 50px);
  line-height: 1.2;
  letter-spacing: -0.045em;
}
.hero p, .page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.78;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  box-shadow: var(--shadow);
}
.hero-character { display: block; width: auto; max-width: 100%; height: 380px; object-fit: contain; margin: 0 auto 18px; }
.hero-character-caption { display: grid; gap: 4px; margin: 0 auto 22px; text-align: center; }
.hero-character-caption strong { color: var(--text); font-size: 19px; }
.hero-character-caption span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.mini-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-stat { padding: 16px; background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.mini-stat strong { display:block; font-size: 22px; }
.mini-stat span { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #090909; border-color: var(--accent); }
.btn.secondary { background: rgba(255,255,255,0.08); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); }

.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 30px; }
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.15vw, 40px);
  line-height: 1.28;
  letter-spacing: -0.038em;
}
.section-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
}
.card h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.38; letter-spacing: -0.025em; }
.card p { margin: 0; color: var(--muted); }
.card .tag { display: inline-flex; margin-bottom: 16px; padding: 6px 10px; border-radius: 999px; background: rgba(215,255,66,0.12); color: var(--accent); font-weight: 800; font-size: 13px; }

.dark-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #141414, #070707);
  padding: clamp(28px, 5vw, 54px);
  box-shadow: var(--shadow);
}
.split { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 34px; align-items: center; }
.check-list { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 10px; color: var(--muted); }
.check-list li::before { content: "✓"; color: var(--accent); font-weight: 900; }

.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-size: 14px; }
.content-block { max-width: 820px; }
.content-block h2 { font-size: 30px; line-height: 1.35; margin-top: 42px; letter-spacing: -0.03em; }
.content-block p, .content-block li { color: var(--muted); }
.content-block strong { color: var(--text); }
.notice {
  border: 1px solid rgba(215,255,66,0.35);
  background: rgba(215,255,66,0.08);
  padding: 18px;
  border-radius: 16px;
  color: var(--text);
}

.footer { padding: 42px 0; border-top: 1px solid var(--line); color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer small { display: block; margin-top: 8px; }

@media (max-width: 920px) {
  .hero-grid, .split, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .navbar.open { height: auto; padding: 18px 0; align-items: stretch; flex-direction: column; }
  .navbar.open .nav-links, .navbar.open .nav-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .hero { padding-top: 50px; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 28px, var(--max)); }
  .section { padding: 58px 0; }
  .hero { padding: 46px 0 54px; }
  .page-hero { padding: 46px 0 30px; }
  .hero h1 { font-size: 38px; line-height: 1.18; letter-spacing: -0.045em; }
  .page-hero h1 { font-size: 32px; line-height: 1.24; letter-spacing: -0.04em; }
  .hero p, .page-hero p { font-size: 16px; line-height: 1.76; }
  .section-head h2 { font-size: 28px; line-height: 1.32; }
  .mini-stat-grid { grid-template-columns: 1fr; }
  .hero-character { height: 310px; }
  .logo-wrap img { width: 142px; }
}

/* 콘텐츠 상세 페이지 */
.content-card-grid .content-card a {
  display: block;
  min-height: 100%;
}
.content-card.featured-content-card {
  border-color: rgba(215,255,66,0.45);
  background: linear-gradient(145deg, rgba(215,255,66,0.12), rgba(255,255,255,0.05));
}
.card-link-text {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 900;
}
.article-hero h1 {
  max-width: 920px;
}
.article-section {
  padding-top: 64px;
}
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 820px);
  gap: 42px;
  align-items: start;
}
.article-toc {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
}
.article-toc strong {
  margin-bottom: 6px;
  color: var(--text);
}
.article-toc a {
  color: var(--muted);
  font-size: 14px;
}
.article-toc a:hover {
  color: var(--accent);
}
.article-content {
  max-width: none;
}
.article-content h2 {
  scroll-margin-top: 110px;
  margin-top: 58px;
  margin-bottom: 16px;
}
.article-content h3 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.article-content p {
  margin: 0 0 18px;
}
.article-content ul {
  margin: 0 0 22px;
  padding-left: 22px;
  color: var(--muted);
}
.article-summary-box {
  margin-bottom: 34px;
  padding: 24px;
  border: 1px solid rgba(215,255,66,0.35);
  border-radius: var(--radius-md);
  background: rgba(215,255,66,0.08);
}
.article-summary-box strong {
  display: block;
  margin-bottom: 12px;
  font-size: 18px;
}
.article-summary-box ul {
  margin-bottom: 0;
}
.article-note {
  margin: 26px 0;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: rgba(255,255,255,0.04);
}
.compare-table th,
.compare-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  color: var(--accent);
  background: rgba(0,0,0,0.25);
}
.compare-table tbody th {
  width: 22%;
  color: var(--text);
}
.compare-table td {
  color: var(--muted);
}
.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}
.compact-table {
  min-width: 520px;
}
.article-choice-grid {
  margin: 24px 0 28px;
}
.article-cta-panel {
  margin-top: 64px;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid rgba(215,255,66,0.42);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(215,255,66,0.14), rgba(255,255,255,0.05));
  box-shadow: var(--shadow);
}
.article-cta-panel h2 {
  margin-top: 8px;
}

@media (max-width: 920px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .article-toc {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-toc strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .article-section {
    padding-top: 42px;
  }
  .article-toc {
    grid-template-columns: 1fr;
  }
  .article-content h2 {
    margin-top: 44px;
    font-size: 26px;
  }
  .article-content h3 {
    font-size: 21px;
  }
  .article-summary-box,
  .article-cta-panel {
    padding: 20px;
  }
  .compare-table {
    min-width: 560px;
  }
  .compact-table {
    min-width: 500px;
  }
}

/* 콘텐츠 상세 페이지 모바일 가독성 보강 */
@media (max-width: 720px) {
  .page-hero.article-hero {
    padding: 48px 0 30px;
  }
  .article-hero h1 {
    font-size: clamp(32px, 10vw, 44px);
    line-height: 1.16;
    letter-spacing: -0.045em;
  }
  .article-hero p {
    font-size: 16px;
    line-height: 1.75;
  }
  .breadcrumb {
    line-height: 1.6;
    word-break: keep-all;
  }
  .article-layout {
    gap: 20px;
  }
  .article-toc {
    padding: 16px;
    border-radius: 16px;
  }
  .article-toc a {
    line-height: 1.45;
  }
  .article-content {
    font-size: 16px;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .article-content p,
  .article-content li {
    line-height: 1.8;
  }
  .article-content h2 {
    font-size: 25px;
    line-height: 1.28;
    letter-spacing: -0.035em;
  }
  .article-content h3 {
    font-size: 20px;
    line-height: 1.35;
  }
  .article-summary-box,
  .article-cta-panel,
  .notice.article-note {
    border-radius: 18px;
  }
  .article-cta-panel .hero-cta {
    display: grid;
    grid-template-columns: 1fr;
  }
  .article-cta-panel .btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .compare-table,
  .compact-table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    background: transparent;
  }
  .compare-table thead {
    display: none;
  }
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
    width: 100%;
  }
  .compare-table tr {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,0.045);
    overflow: hidden;
  }
  .compare-table tbody th {
    width: 100%;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(215,255,66,0.10);
    color: var(--text);
  }
  .compare-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .compare-table td:last-child {
    border-bottom: 0;
  }
  .compare-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
  }
}

/* 무료 테스트 공통 스타일 */
.test-hero .eyebrow {
  display: inline-flex;
  margin-top: 18px;
}
.test-section {
  padding-top: 58px;
}
.test-notice {
  margin-bottom: 28px;
}
.test-notice strong,
.test-result-notice strong {
  display: block;
  margin-bottom: 8px;
}
.test-notice p,
.test-result-notice p {
  margin: 0;
  color: var(--muted);
}
.test-list-grid .test-list-card {
  min-height: 230px;
}
.test-list-card.is-ready {
  border-color: rgba(215,255,66,0.45);
  background: linear-gradient(145deg, rgba(215,255,66,0.12), rgba(255,255,255,0.05));
}
.test-app {
  display: grid;
  gap: 24px;
}
.test-start-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.055);
}
.test-start-card h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.test-start-card p {
  margin: 0;
  color: var(--muted);
}
.test-count-box {
  flex: 0 0 auto;
  width: 108px;
  height: 108px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(215,255,66,0.35);
  border-radius: 28px;
  background: rgba(215,255,66,0.10);
}
.test-count-box strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
}
.test-count-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.test-form {
  display: grid;
  gap: 22px;
}
.test-progress {
  position: sticky;
  top: 76px;
  z-index: 10;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5,5,5,0.88);
  backdrop-filter: blur(14px);
  color: var(--muted);
}
.test-progress strong {
  color: var(--accent);
}
.test-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
}
.test-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .2s ease;
}
.test-question-list {
  display: grid;
  gap: 16px;
}
.test-question-card {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.045);
}
.test-question-card.is-missing {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.12);
}
.test-question-card legend {
  width: 100%;
  padding: 0 0 16px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.test-question-card legend span {
  display: inline-flex;
  margin-right: 8px;
  color: var(--accent);
}
.test-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.test-choice {
  position: relative;
  display: flex;
  min-height: 92px;
  align-items: center;
  padding: 18px 18px 18px 48px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0,0,0,0.18);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, color .18s ease;
}
.test-choice:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: rgba(215,255,66,0.42);
}
.test-choice input {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: 0;
  transform: translateY(-50%);
  accent-color: var(--accent);
}
.test-choice:has(input:checked) {
  border-color: rgba(215,255,66,0.72);
  background: rgba(215,255,66,0.12);
  color: var(--text);
}
.test-submit-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.055);
}
.test-submit-panel p {
  margin: 0;
  color: var(--muted);
}
.test-result {
  scroll-margin-top: 104px;
  display: grid;
  gap: 22px;
}
.test-result[hidden] {
  display: none;
}
.test-result-panel {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(215,255,66,0.42);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(215,255,66,0.14), rgba(255,255,255,0.05));
  box-shadow: var(--shadow);
}
.test-result-panel h2 {
  margin: 8px 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}
.test-result-panel h2 strong {
  color: var(--accent);
}
.test-result-panel p {
  margin: 0;
  color: var(--muted);
}
.test-type-code {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.test-type-code span {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215,255,66,0.45);
  border-radius: 18px;
  background: rgba(0,0,0,0.28);
  color: var(--accent);
  font-size: 28px;
  font-weight: 950;
}
.test-axis-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.test-axis-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
}
.test-axis-head,
.test-axis-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.test-axis-head strong {
  color: var(--accent);
  font-size: 22px;
}
.test-axis-head span {
  color: var(--text);
  font-weight: 900;
}
.test-axis-score-row {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.test-axis-bar {
  position: relative;
  display: flex;
  height: 12px;
  overflow: hidden;
  margin: 10px 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}
.test-axis-bar .left {
  background: var(--accent);
}
.test-axis-bar .right {
  background: rgba(255,255,255,0.30);
}
.test-axis-card p {
  margin: 0;
  color: var(--muted);
}
.test-result-notice {
  margin-top: 0;
}
.test-cta-panel {
  margin-top: 0;
}

@media (max-width: 720px) {
  .test-start-card,
  .test-submit-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .test-count-box {
    width: 100%;
    height: auto;
    min-height: 86px;
  }
  .test-progress {
    top: 76px;
  }
  .test-choice-grid,
  .test-axis-result-grid {
    grid-template-columns: 1fr;
  }
  .test-question-card {
    padding: 18px;
  }
  .test-question-card legend {
    font-size: 18px;
    line-height: 1.45;
  }
  .test-choice {
    min-height: 76px;
  }
  .test-submit-panel .btn {
    width: 100%;
  }
  .test-type-code span {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .test-choice {
    padding: 16px 16px 16px 44px;
  }
  .test-choice input {
    left: 16px;
  }
  .test-type-code {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .test-type-code span {
    width: 100%;
  }
}

/* 테스트 빌더 */
.builder-hero .eyebrow {
  display: inline-flex;
  margin-top: 18px;
}
.builder-section {
  padding-top: 58px;
}
.builder-notice {
  margin-bottom: 28px;
}
.builder-notice code,
.builder-help code {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,0.25);
  color: var(--accent);
}
.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 24px;
  align-items: start;
}
.builder-form,
.builder-output {
  display: grid;
  gap: 22px;
}
.builder-output {
  position: sticky;
  top: 96px;
}
.builder-card {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.055);
}
.builder-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.builder-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}
.builder-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.builder-field {
  display: grid;
  gap: 8px;
}
.builder-field.full {
  grid-column: 1 / -1;
}
.builder-field span {
  color: var(--text);
  font-weight: 900;
  font-size: 14px;
}
.builder-field small,
.builder-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.builder-field input,
.builder-field textarea,
.builder-field select,
.builder-code {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,0.24);
  color: var(--text);
  font: inherit;
  outline: none;
}
.builder-field input,
.builder-field select {
  min-height: 46px;
  padding: 0 14px;
}
.builder-field textarea {
  min-height: 86px;
  padding: 13px 14px;
  resize: vertical;
}
.builder-field input:focus,
.builder-field textarea:focus,
.builder-field select:focus,
.builder-code:focus {
  border-color: rgba(215,255,66,0.62);
  box-shadow: 0 0 0 3px rgba(215,255,66,0.10);
}
.builder-question-list {
  display: grid;
  gap: 16px;
}
.builder-question-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0,0,0,0.18);
}
.builder-question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.builder-question-head strong {
  color: var(--accent);
  font-size: 18px;
}
.builder-question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.builder-question-actions .btn {
  min-height: 38px;
  padding: 0 13px;
  font-size: 14px;
}
.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
}
.output-card {
  display: grid;
  gap: 12px;
}
.output-card .builder-card-head {
  margin-bottom: 0;
}
.builder-code {
  min-height: 360px;
  padding: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  white-space: pre;
}

@media (max-width: 1080px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }
  .builder-output {
    position: static;
  }
}

@media (max-width: 720px) {
  .builder-card-head,
  .builder-question-head {
    align-items: stretch;
    flex-direction: column;
  }
  .builder-card-head .btn,
  .builder-actions .btn {
    width: 100%;
  }
  .builder-field-grid {
    grid-template-columns: 1fr;
  }
  .builder-question-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .builder-code {
    min-height: 280px;
    font-size: 12px;
  }
}


/* 머미티아이 테스트 */
.mmti-hero h1 {
  letter-spacing: -0.055em;
}
.mmti-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.mmti-result-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
}
.mmti-result-card h3 {
  margin: 10px 0 14px;
  font-size: 24px;
  line-height: 1.22;
  letter-spacing: -0.03em;
}
.mmti-result-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mmti-result-card li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
}
.mmti-result-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.mmti-axis-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.mmti-result-panel h2 {
  word-break: keep-all;
}
@media (max-width: 720px) {
  .mmti-result-grid,
  .mmti-axis-summary {
    grid-template-columns: 1fr;
  }
  .mmti-result-card {
    padding: 20px;
  }
}


/* 머미티아이 지표 색상 보정: 양쪽 문자와 그래프를 서로 다른 색으로 표시 */
.test-axis-card {
  --axis-left-color: var(--accent);
  --axis-right-color: #9aa4b2;
  --axis-left-soft: rgba(215,255,66,0.14);
  --axis-right-soft: rgba(154,164,178,0.16);
}
.test-axis-card.axis-EI {
  --axis-left-color: #ff9f43;
  --axis-right-color: #8f7cff;
  --axis-left-soft: rgba(255,159,67,0.18);
  --axis-right-soft: rgba(143,124,255,0.18);
}
.test-axis-card.axis-SN {
  --axis-left-color: #d7ff42;
  --axis-right-color: #4ddcff;
  --axis-left-soft: rgba(215,255,66,0.16);
  --axis-right-soft: rgba(77,220,255,0.18);
}
.test-axis-card.axis-TF {
  --axis-left-color: #5da7ff;
  --axis-right-color: #ff6fb1;
  --axis-left-soft: rgba(93,167,255,0.18);
  --axis-right-soft: rgba(255,111,177,0.18);
}
.test-axis-card.axis-JP {
  --axis-left-color: #42e88f;
  --axis-right-color: #ffd166;
  --axis-left-soft: rgba(66,232,143,0.18);
  --axis-right-soft: rgba(255,209,102,0.18);
}
.test-axis-card.dominant-left {
  background: linear-gradient(145deg, var(--axis-left-soft), rgba(255,255,255,0.045));
}
.test-axis-card.dominant-right {
  background: linear-gradient(145deg, var(--axis-right-soft), rgba(255,255,255,0.045));
}
.test-axis-head strong.axis-letter-pair {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: inherit;
  letter-spacing: -0.02em;
}
.axis-letter-pair .left-letter,
.axis-score-label.left-score b {
  color: var(--axis-left-color);
}
.axis-letter-pair .right-letter,
.axis-score-label.right-score b {
  color: var(--axis-right-color);
}
.test-axis-head .axis-dominant b {
  color: var(--axis-left-color);
}
.test-axis-card.dominant-right .axis-dominant b {
  color: var(--axis-right-color);
}
.test-axis-score-row {
  color: rgba(235,241,247,0.72);
}
.axis-score-label {
  letter-spacing: 0.01em;
}
.test-axis-bar {
  background: rgba(255,255,255,0.075);
}
.test-axis-bar .left {
  background: linear-gradient(90deg, var(--axis-left-color), color-mix(in srgb, var(--axis-left-color) 70%, #ffffff 30%));
}
.test-axis-bar .right {
  background: linear-gradient(90deg, color-mix(in srgb, var(--axis-right-color) 72%, #ffffff 28%), var(--axis-right-color));
}

/* 2026-07-22: 정식 MBTI 검사 선입금 확인 · 결과보고서 미리보기 · 주문조회 */
.official-order-hero .eyebrow {
  margin-top: 18px;
}

.official-order-hero p:last-child {
  max-width: 820px;
}

.official-process-section {
  border-bottom: 1px solid var(--line);
}

.official-process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.official-process-item {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
}

.official-process-item span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.official-process-item strong {
  font-size: 17px;
  line-height: 1.35;
}

.official-process-item small {
  color: var(--muted);
}

.official-order-layout {
  display: block;
  max-width: var(--max);
}

.official-order-head h2 {
  margin-top: 6px;
}

.official-order-head p {
  max-width: 760px;
}

.official-application-form {
  display: grid;
  gap: 24px;
}

.official-product-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.official-product-fieldset legend {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 900;
}

.official-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.official-product-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 218px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.official-product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(215,255,66,0.42);
}

.official-product-card:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(215,255,66,0.13), rgba(255,255,255,0.055));
  box-shadow: 0 0 0 2px rgba(215,255,66,0.12);
}

.official-product-card.is-disabled {
  opacity: .54;
  cursor: not-allowed;
  transform: none;
}

.official-product-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.official-product-check {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
}

.official-product-card:has(input:checked) .official-product-check {
  border: 6px solid var(--accent);
  background: #111;
}

.official-product-card .tag {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(215,255,66,0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.official-product-card strong {
  padding-right: 32px;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: -.025em;
}

.official-product-card small {
  color: var(--muted);
  line-height: 1.65;
}

.official-product-card b {
  margin-top: auto;
  color: var(--text);
  font-size: 18px;
}

.official-field-help {
  margin: 12px 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.official-preview-panel,
.official-transfer-panel,
.official-form-card,
.official-success-panel,
.official-lookup-form,
.official-lookup-result-card,
.official-lookup-jump {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  box-shadow: var(--shadow);
}

.official-preview-panel {
  display: grid;
  grid-template-columns: minmax(230px, .34fr) minmax(0, 1fr);
  gap: 26px;
  padding: 24px;
  align-items: start;
}

.official-preview-copy {
  position: sticky;
  top: 96px;
}

.official-preview-copy h3 {
  margin: 7px 0 10px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  letter-spacing: -.035em;
}

.official-preview-copy > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.official-preview-page-count {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.official-preview-page-count strong {
  color: var(--accent);
  font-size: 28px;
}

.official-preview-stage {
  min-width: 0;
}

.official-preview-main-button {
  display: flex;
  width: 100%;
  min-height: 520px;
  padding: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: #e9e9e9;
  cursor: zoom-in;
  overflow: hidden;
}

.official-preview-main-button img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 650px;
  object-fit: contain;
  box-shadow: 0 10px 34px rgba(0,0,0,.22);
}

.official-preview-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.official-preview-group-label {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.official-preview-thumb {
  position: relative;
  flex: 0 0 84px;
  height: 116px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  cursor: pointer;
  overflow: hidden;
}

.official-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
}

.official-preview-thumb span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,.8);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.official-preview-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(215,255,66,.15);
}

.official-transfer-panel {
  padding: 24px;
  border-color: rgba(215,255,66,.36);
  background: linear-gradient(145deg, rgba(215,255,66,.12), rgba(255,255,255,.04));
}

.official-transfer-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.official-transfer-head h3,
.official-form-card-head h3 {
  margin: 6px 0 8px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.035em;
}

.official-transfer-head p:not(.eyebrow),
.official-form-card-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.official-transfer-amount {
  display: grid;
  min-width: 150px;
  gap: 4px;
  text-align: right;
}

.official-transfer-amount span {
  color: var(--muted);
  font-size: 13px;
}

.official-transfer-amount strong {
  color: var(--accent);
  font-size: 28px;
}

.official-transfer-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(0,0,0,.25);
}

.official-transfer-account > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.official-transfer-account span {
  color: var(--muted);
  font-size: 13px;
}

.official-transfer-account strong {
  font-size: 18px;
  word-break: keep-all;
}

.official-transfer-notes {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.official-transfer-notes li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.official-transfer-notes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

.official-lookup-jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  box-shadow: none;
  background: rgba(255,255,255,.035);
}

.official-lookup-jump > div {
  display: grid;
  gap: 4px;
}

.official-lookup-jump span {
  color: var(--muted);
  font-size: 14px;
}

.official-form-card {
  padding: 24px;
}

.official-form-card-head {
  margin-bottom: 20px;
}

.official-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.official-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.official-field label {
  font-weight: 850;
}

.official-field label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.official-field input,
.official-field select,
.official-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,0.32);
  color: var(--text);
  font: inherit;
  outline: none;
}

.official-field input,
.official-field select {
  min-height: 50px;
  padding: 0 14px;
}

.official-field input:focus,
.official-field select:focus,
.official-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(215,255,66,0.10);
}

.official-submit-button {
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  font-size: 17px;
}

.official-order-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  text-align: center;
  white-space: pre-line;
}

.official-order-status.success {
  color: var(--accent);
}

.official-order-status.error {
  color: var(--danger);
}

.official-order-status.loading {
  color: #fff;
}

.official-success-panel {
  padding: clamp(26px, 5vw, 44px);
  text-align: center;
  border-color: rgba(215,255,66,.5);
}

.official-success-icon {
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-size: 32px;
  font-weight: 950;
}

.official-success-panel h2 {
  margin: 7px 0 10px;
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.25;
  letter-spacing: -.038em;
}

.official-success-panel > p:not(.eyebrow) {
  color: var(--muted);
}

.official-order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  text-align: left;
}

.official-order-summary > div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0,0,0,.22);
}

.official-order-summary dt {
  color: var(--muted);
  font-size: 13px;
}

.official-order-summary dd {
  margin: 0;
  font-weight: 900;
  word-break: break-all;
}

.official-payment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.official-lookup-section {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  scroll-margin-top: 80px;
}

.official-lookup-wrap {
  display: grid;
  gap: 22px;
}

.official-lookup-copy {
  max-width: 720px;
}

.official-lookup-copy h2 {
  margin: 5px 0 8px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.28;
  letter-spacing: -.038em;
}

.official-lookup-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.official-lookup-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  box-shadow: none;
}

.official-lookup-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.official-lookup-results {
  display: grid;
  gap: 14px;
}

.official-lookup-result-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  box-shadow: none;
}

.official-lookup-result-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.official-lookup-result-card p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 14px;
}

.official-lookup-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.official-lookup-result-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.official-lookup-empty {
  padding: 24px;
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.official-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.official-status-badge.pending {
  background: rgba(255,209,102,.15);
  color: #ffd166;
}

.official-status-badge.paid,
.official-status-badge.key_sent,
.official-status-badge.report_ready {
  background: rgba(215,255,66,.14);
  color: var(--accent);
}

.official-status-badge.expired,
.official-status-badge.cancelled,
.official-status-badge.refunded {
  background: rgba(255,107,107,.14);
  color: var(--danger);
}

.official-preview-dialog {
  width: min(94vw, 1180px);
  max-height: 94vh;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  background: #1a1a1a;
  color: #fff;
  overflow: auto;
}

.official-preview-dialog::backdrop {
  background: rgba(0,0,0,.84);
}

.official-preview-dialog img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(94vh - 48px);
  margin: 0 auto;
}

.official-preview-dialog-close {
  position: sticky;
  z-index: 2;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  margin: -8px -8px 8px 8px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

@supports not selector(:has(*)) {
  .official-product-card input {
    position: static;
    opacity: 1;
    pointer-events: auto;
  }
  .official-product-check {
    display: none;
  }
}

@media (max-width: 980px) {
  .official-process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .official-product-grid {
    grid-template-columns: 1fr;
  }
  .official-product-card {
    min-height: 0;
  }
  .official-preview-panel {
    grid-template-columns: 1fr;
  }
  .official-preview-copy {
    position: static;
  }
  .official-preview-main-button {
    min-height: 440px;
  }
}

@media (max-width: 720px) {
  .official-form-grid,
  .official-lookup-fields {
    grid-template-columns: 1fr;
  }
  .official-transfer-head,
  .official-transfer-account,
  .official-lookup-jump {
    align-items: stretch;
    flex-direction: column;
  }
  .official-transfer-amount {
    text-align: left;
  }
  .official-transfer-account .btn,
  .official-lookup-jump .btn,
  .official-lookup-form > .btn {
    width: 100%;
  }
  .official-preview-main-button {
    min-height: 380px;
  }
}

@media (max-width: 560px) {
  .official-process-grid {
    grid-template-columns: 1fr;
  }
  .official-process-item {
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    align-items: center;
  }
  .official-process-item span {
    grid-row: 1 / 3;
    font-size: 16px;
  }
  .official-product-card,
  .official-preview-panel,
  .official-transfer-panel,
  .official-form-card,
  .official-success-panel,
  .official-lookup-form,
  .official-lookup-jump {
    padding: 18px;
    border-radius: 18px;
  }
  .official-product-card {
    gap: 8px;
  }
  .official-preview-main-button {
    min-height: 300px;
    padding: 10px;
  }
  .official-preview-main-button img {
    max-height: 500px;
  }
  .official-preview-thumb {
    flex-basis: 72px;
    height: 100px;
  }
  .official-transfer-account strong {
    font-size: 16px;
    word-break: break-all;
  }
  .official-order-summary {
    grid-template-columns: 1fr;
  }
  .official-payment-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .official-payment-actions .btn {
    width: 100%;
  }
  .official-lookup-result-card {
    grid-template-columns: 1fr;
  }
  .official-lookup-result-actions {
    justify-items: stretch;
  }
  .official-status-badge {
    justify-self: start;
  }
  .official-preview-dialog {
    width: 100vw;
    max-height: 100vh;
    min-height: 100vh;
    padding: 14px;
    border-radius: 0;
  }
  .official-preview-dialog img {
    max-height: calc(100vh - 28px);
  }
}
