/* =========================================================
   Lunar Soopoolleaf — 타로 입문 가이드
   tarot-cards.css 뒤에 얹습니다 (.tc-box · .tc-h2 · .tc-kicker 재사용).
   ========================================================= */

.tg-main {
    max-width: 880px;
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.tg-p {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.85;
    color: var(--text);
    word-break: keep-all;
}

.tg-p:last-child {
    margin-bottom: 0;
}


/* ---------- 머리 ---------- */

.tg-hero {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tg-title {
    margin: 0;
    font-size: clamp(27px, 4.6vw, 40px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -1.5px;
}

.tg-lead {
    margin: 0;
    max-width: 680px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    word-break: keep-all;
}

.tg-toc {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tg-toc a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px 7px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .16s ease, transform .12s ease;
}

.tg-toc a b {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--tarot-accent-soft, rgba(82, 183, 136, .12));
    color: var(--tarot-accent-strong, var(--primary));
    font-size: 11px;
}

.tg-toc a:hover {
    border-color: var(--tarot-accent-border, rgba(82, 183, 136, .6));
    transform: translateY(-1px);
}


/* ---------- 섹션 ---------- */

.tg-section {
    scroll-margin-top: 70px;
}

.tg-section .tc-h2 {
    margin-bottom: 12px;
}


/* ---------- 구성 ---------- */

.tg-stats {
    list-style: none;
    margin: 16px 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.tg-stats li {
    padding: 14px 12px;
    border-radius: 16px;
    background: var(--tarot-accent-soft, rgba(82, 183, 136, .10));
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tg-stats b {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--tarot-accent-strong, var(--primary));
}

.tg-stats span {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-soft);
    word-break: keep-all;
}

.tg-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tg-group {
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tg-group-count {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--tarot-accent-strong, var(--primary));
}

.tg-group-name {
    font-size: 15px;
}

.tg-group p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
    word-break: keep-all;
}


/* ---------- 숫자 ---------- */

.tg-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tg-number {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.tg-number-mark {
    flex: 0 0 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--surface-hover);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--tarot-accent-strong, var(--primary));
}

.tg-number b {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.tg-number p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text);
    word-break: keep-all;
}


/* ---------- 수트 ---------- */

.tg-suits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tg-suit {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 4px solid var(--suit);
}

.tg-suit-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tg-suit-dot {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--suit);
}

.tg-suit-head b {
    display: block;
    font-size: 16px;
}

.tg-suit-head span {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-soft);
}

.tg-suit-link {
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-hover);
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
}

.tg-suit-traits {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    word-break: keep-all;
}

.tg-signs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tg-signs li {
    padding: 9px 11px;
    border-radius: 12px;
    background: var(--surface-hover);
}

.tg-sign-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.tg-sign-head b {
    font-size: 13.5px;
}

.tg-sign-head span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-soft);
}

.tg-signs p {
    margin: 4px 0 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text);
    word-break: keep-all;
}


/* ---------- 행성 표 ---------- */

.tg-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.tg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tg-table th,
.tg-table td {
    padding: 11px 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.65;
    text-align: left;
    word-break: keep-all;
}

.tg-table tr:last-child th,
.tg-table tr:last-child td {
    border-bottom: 0;
}

.tg-table th {
    white-space: nowrap;
    font-weight: 800;
}

.tg-planet-symbol {
    display: inline-block;
    width: 22px;
    font-size: 16px;
    color: var(--tarot-accent-strong, var(--primary));
}

.tg-planets td:first-of-type {
    color: var(--text-soft);
}


/* ---------- 색 ---------- */

.tg-colors {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tg-color {
    padding: 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tg-color-head {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.tg-swatch {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--swatch);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.tg-color-head b {
    font-size: 14px;
}

.tg-color-head em {
    flex: 1 1 100%;
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    color: var(--tarot-accent-strong, var(--primary));
}

.tg-color p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text);
    word-break: keep-all;
}

.tg-pos,
.tg-neg {
    display: inline-block;
    width: 16px;
    font-weight: 900;
}

.tg-pos { color: var(--tarot-accent-strong, var(--primary)); }
.tg-neg { color: var(--tree, #a67c52); }


/* ---------- 용어 ---------- */

.tg-terms {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.tg-term {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.tg-term dt {
    font-size: 14px;
    font-weight: 800;
}

.tg-term dt span {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: .04em;
}

.tg-term dd {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.65;
    word-break: keep-all;
}


/* ---------- 질문 ---------- */

.tg-ask {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tg-ask-item {
    display: flex;
    gap: 12px;
    padding: 13px 15px;
}

.tg-ask-n {
    flex: 0 0 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--tarot-accent-soft, rgba(82, 183, 136, .12));
    color: var(--tarot-accent-strong, var(--primary));
    font-size: 12px;
    font-weight: 900;
}

.tg-ask-item b {
    display: block;
    font-size: 14.5px;
    margin-bottom: 2px;
}

.tg-ask-item p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    word-break: keep-all;
}

.tg-tips {
    margin: 12px 0 0;
    padding: 12px 16px 12px 32px;
    border-radius: 14px;
    background: var(--surface-hover);
    font-size: 13px;
    line-height: 1.75;
    word-break: keep-all;
}


/* ---------- 다음 ---------- */

.tg-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tg-next-item {
    position: relative;
    padding: 16px 44px 16px 16px;
    text-decoration: none;
    color: var(--text);
    transition: transform .14s ease, border-color .16s ease;
}

.tg-next-item:hover {
    transform: translateY(-2px);
    border-color: var(--tarot-accent-border, rgba(82, 183, 136, .6));
}

.tg-next-item b {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.tg-next-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-soft);
    word-break: keep-all;
}

.tg-next-item > span {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 800;
    color: var(--tarot-accent-strong, var(--primary));
}


/* ---------- FAQ ---------- */

.tg-faq {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tg-faq-item {
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.tg-faq-item summary {
    padding: 13px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    list-style: none;
}

.tg-faq-item summary::-webkit-details-marker { display: none; }

.tg-faq-item summary::before {
    content: 'Q';
    display: inline-block;
    margin-right: 10px;
    color: var(--tarot-accent-strong, var(--primary));
}

.tg-faq-item p {
    margin: 0;
    padding: 0 0 14px 24px;
    font-size: 13.5px;
    line-height: 1.7;
    word-break: keep-all;
}


/* ---------- 모바일 ---------- */

@media (max-width: 760px) {
    .tg-main { gap: 28px; }
    .tg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tg-groups,
    .tg-numbers,
    .tg-suits,
    .tg-colors,
    .tg-terms,
    .tg-next { grid-template-columns: 1fr; }
    .tg-table { min-width: 560px; }
    .tg-p, .tg-lead { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .tg-toc a, .tg-next-item { transition: none; }
}
