/* 교체 가이드 (B43) */
.gd-toc { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 12px; }
.gd-toc::-webkit-scrollbar { display: none; }
.gd-toc a { flex: none; height: 36px; line-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); color: var(--ink); font-size: 13.5px; white-space: nowrap; }
.gd-toc a:hover { border-color: var(--brand); color: var(--brand); }
.gd-list { display: grid; gap: 12px; }
.gd-card { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-bg, #fff); scroll-margin-top: 90px; }
.gd-card#gd-size { grid-template-columns: 1fr; }
.gd-ic { width: 84px; height: 84px; display: block; border-radius: 20px; box-shadow: 0 4px 12px rgba(21,42,84,.10); }
.gd-body h3 { margin: 2px 0 8px; font-size: 17px; font-weight: 600; }
.gd-body ul { margin: 0; padding-left: 18px; }
.gd-body li { margin: 4px 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.gd-body li b, .gd-body p b { color: var(--ink); font-weight: 600; }
.gd-body p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.gd-decode { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 6px 14px; padding: 16px; border-radius: 14px; background: #152A54; color: #fff; }
.gd-decode span { display: flex; flex-direction: column; align-items: center; }
.gd-decode b { font-size: 30px; font-weight: 800; line-height: 1.1; color: #FFD24A; }
.gd-decode .sm b { font-size: 24px; color: #fff; }
.gd-decode i { font-style: normal; font-size: 12px; color: rgba(255,255,255,.78); margin-top: 3px; }
.gd-decode em { font-style: normal; font-size: 28px; color: rgba(255,255,255,.5); }
.gd-tables { display: grid; gap: 10px; margin-top: 12px; }
.gd-tables table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; }
.gd-tables caption { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.gd-tables th { background: var(--bg-2); padding: 6px 2px; font-weight: 700; color: var(--ink); border: 1px solid var(--line); }
.gd-tables td { padding: 6px 2px; border: 1px solid var(--line); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gd-src { margin: 14px 2px 0; font-size: 12px; color: var(--ink-3); }
.gd-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); }
.gd-cta b { flex-basis: 100%; font-size: 15px; font-weight: 600; }
.gd-cta .btn { display: inline-flex; align-items: center; gap: 6px; }
.gd-cta .btn .ic { width: 18px; height: 18px; }
@media (max-width: 599px) {
  .gd-card { grid-template-columns: 60px 1fr; gap: 12px; padding: 14px; }
  .gd-ic { width: 60px; height: 60px; border-radius: 15px; }
  .gd-decode b { font-size: 24px; } .gd-decode .sm b { font-size: 19px; }
}
@media (min-width: 900px) {
  .gd-list { grid-template-columns: 1fr 1fr; }
  .gd-card#gd-size { grid-column: 1 / -1; }
  .gd-tables { grid-template-columns: 1fr 1fr; }
}

/* B45: 모바일 — 그림+제목 한 줄, 본문은 전체 폭 */
@media (max-width: 599px) {
  .gd-card { grid-template-columns: 52px 1fr; grid-template-areas: "ic hd" "bd bd"; gap: 8px 12px; align-items: center; }
  .gd-card .gd-ic { grid-area: ic; width: 52px; height: 52px; border-radius: 13px; }
  .gd-card .gd-body { display: contents; }
  .gd-card .gd-body h3 { grid-area: hd; margin: 0; font-size: 16px; }
  .gd-card .gd-body ul, .gd-card .gd-body p, .gd-card .gd-body .gd-decode, .gd-card .gd-body .gd-tables { grid-column: 1 / -1; }
  .gd-card#gd-size { grid-template-areas: none; }
  .gd-body li { font-size: 13.5px; }
  .gd-decode { gap: 4px 8px; padding: 12px 8px; flex-wrap: nowrap; }
  .gd-decode b { font-size: 20px; } .gd-decode .sm b { font-size: 16px; } .gd-decode em { font-size: 18px; }
  .gd-decode i { font-size: 9.5px; letter-spacing: -0.04em; white-space: nowrap; }
  .gd-tables table { font-size: 12px; }
}

/* B45-1: 모바일 넘침 고침 */
.gd-list { grid-template-columns: minmax(0, 1fr); }
.gd-card { min-width: 0; }
.gd-tables table { table-layout: fixed; }
@media (max-width: 599px) {
  .gd-decode { flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
  .gd-decode span { min-width: 0; }
}
@media (min-width: 900px) { .gd-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

@media (max-width: 599px) {
  .gd-card#gd-size { grid-template-columns: minmax(0, 1fr); }
  .gd-card#gd-size .gd-body h3 { grid-area: auto; }
  .gd-decode em { display: none; }
  .gd-decode span { flex: 0 0 30%; }
}
