/* ==========================================================================
   /tax-account/ 공통 스타일 — 절세계좌 (ISA · IRP · 연금저축)
   Primary palette: teal (기존 10개 허브와 미겹침, /compoundcalc/ purple과 대비)
   2026-04-18 작성
   ========================================================================== */

:root {
    --primary-color: #0891b2;      /* teal-600 */
    --primary-dark:  #0e7490;      /* teal-700 */
    --primary-hover: #0e7490;
    --primary-light: #e0f2fe;      /* teal-50 → 연배경 */
    --primary-border: #a5f3fc;     /* teal-200 → 카드 테두리 강조 */
    --accent: #06b6d4;             /* cyan-500 — 버튼/포인트 */

    --bg-color: #f0fdfa;           /* 페이지 배경 (teal-50 느낌) */
    --text-main: #134e4a;          /* teal-900 — 본문 제목 */
    --text-sub: #64748b;           /* slate-500 — 보조 */
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --card-hover-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -2px rgb(0 0 0 / 0.02);
    --nav-height: 70px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 앵커 이동 시 부드러운 스크롤 + fixed calc-nav 높이만큼 offset */
html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);   /* nav(70px) + 여유 */
}
@media (max-width: 768px) {
    html {
        scroll-padding-top: 76px;   /* mobile nav 60 + 16 */
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Skip link (접근성) */
.skip-link {
    position: absolute;
    top: -40px; left: 0;
    background: #000; color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* Breadcrumb — 허브용 (컨테이너 내부, compoundcalc 허브 패턴) */
/* .ta-container 안에서만 작동하도록 scope — 자식 페이지의 풀너비 .breadcrumb 와 충돌 방지 */
.ta-container .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 24px;
    color: var(--text-sub);
}
.ta-container .breadcrumb a {
    color: var(--text-sub);
    text-decoration: none;
    transition: color 0.2s;
}
.ta-container .breadcrumb a:hover { color: var(--primary-color); }
.ta-container .breadcrumb .separator { color: #cbd5e1; }
.ta-container .breadcrumb .current {
    color: var(--text-main);
    font-weight: 600;
}

/* Breadcrumb — 계산기 페이지용 full-width 띠 (compoundcalc/military/credit 계산기와 동일 패턴) */
/* 주: body padding-top은 calc-nav.css가 담당 (70px) — 자식 페이지는 calc-nav 사용 */
.breadcrumb {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0;
    font-size: 0.75rem;
}

.breadcrumb .breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--text-sub);
}
.breadcrumb a {
    color: var(--text-sub);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb .separator { color: #cbd5e1; }
.breadcrumb .current {
    color: var(--text-main);
    font-weight: 600;
}

/* 모바일: 브레드크럼 한 줄 유지 */
@media (max-width: 480px) {
    .breadcrumb { font-size: 0.7rem; padding: 6px 0; }
    .breadcrumb .breadcrumb-container {
        padding: 0 16px;
        gap: 4px;
        letter-spacing: -0.02em;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .breadcrumb .breadcrumb-container::-webkit-scrollbar { display: none; }
    .breadcrumb .breadcrumb-container > * { white-space: nowrap; flex-shrink: 0; }
}
/* 360px↓: 3번째 breadcrumb (ISA·연금·IRP 레벨) 숨김 — 홈 › 자산·투자 › [현재] 로 축약 */
@media (max-width: 380px) {
    .breadcrumb .breadcrumb-container > a:nth-child(5),
    .breadcrumb .breadcrumb-container > span:nth-child(4) {
        display: none;
    }
}

/* Container — 허브 전용 (자식 페이지는 .ta-container 안 씀) */
/* HUB-GLOBAL-NAVI(fixed 70px) 보정: compoundcalc 패턴과 동일 (margin-top: --nav-height) */
.ta-container {
    max-width: 960px;
    margin: 70px auto 0;
    padding: 40px 24px 80px;
}

/* Hero Header */
.ta-hero {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(8, 145, 178, 0.08);
}
.ta-hero h1 {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
    display: flex; align-items: center; gap: 12px;
    line-height: 1.25;
    word-break: keep-all;
    overflow-wrap: break-word;
    flex-wrap: wrap;
}
.ta-hero h1 i { color: var(--primary-color); font-size: 1.8rem; }
.ta-hero .subtitle {
    font-size: 1.05rem;
    color: var(--text-sub);
    line-height: 1.6;
}
.ta-hero .trust-info {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.ta-hero .trust-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.85rem; color: var(--text-sub);
}
.ta-hero .trust-item i { color: var(--primary-color); font-size: 0.9rem; }

/* TL;DR 박스 */
.tldr-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ccfbf1 100%);
    border: 1px solid var(--primary-border);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 32px;
}
.tldr-box strong {
    display: block;
    color: var(--primary-dark);
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.tldr-box p {
    color: #0f172a;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* 박스 내부 ul — 과한 들여쓰기 제거 (기본 40px → 16px) */
.tldr-box ul,
.info-box ul,
.warning-box ul,
.success-box ul {
    margin: 6px 0 0 0;
    padding-left: 16px;
}
.tldr-box ul li,
.info-box ul li,
.warning-box ul li,
.success-box ul li {
    margin-bottom: 3px;
}

/* TL;DR 정제된 리스트 — ①②③④ counter + 간격 */
.tldr-box .tldr-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    counter-reset: tldr;
}
.tldr-box .tldr-list li {
    counter-increment: tldr;
    position: relative;
    padding-left: 26px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: #0f172a;
    font-size: 0.95rem;
    word-break: keep-all;
    letter-spacing: -0.015em;
}
.tldr-box .tldr-list li:last-child {
    margin-bottom: 0;
}
.tldr-box .tldr-list li::before {
    content: "①" " " "②" " " "③" " " "④";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--primary-dark);
}
.tldr-box .tldr-list li:nth-child(1)::before { content: "①"; }
.tldr-box .tldr-list li:nth-child(2)::before { content: "②"; }
.tldr-box .tldr-list li:nth-child(3)::before { content: "③"; }
.tldr-box .tldr-list li:nth-child(4)::before { content: "④"; }
@media (max-width: 480px) {
    .tldr-box .tldr-list li {
        font-size: 0.92rem;
        letter-spacing: -0.025em;
        margin-bottom: 12px;
    }
}

/* ─── 대표 계산기 (featured-calc) — /loan/ /tax/ 패턴 동일 스펙 ─── */
.ta-featured-calc {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #ffffff, var(--primary-light));
    border: 1px solid var(--primary-border);
    border-radius: 24px;
    padding: 36px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 48px;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}
.ta-featured-calc:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}
.ta-featured-calc .calc-icon {
    width: 80px; height: 80px;
    border-radius: 20px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-dark);
    box-shadow: var(--card-shadow);
    flex-shrink: 0;
}
.ta-featured-calc .calc-content { flex: 1; min-width: 0; }
.ta-featured-calc .badge {
    background: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
    letter-spacing: 0.02em;
}
.ta-featured-calc .card-title {
    font-weight: 800;
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
    /* 한글 타이포 6원칙 */
    word-break: keep-all;
    line-height: 1.3;
}
.ta-featured-calc .card-desc {
    font-size: 1.05rem;
    color: #4b5563;
    line-height: 1.7;
    word-break: keep-all;
    letter-spacing: -0.015em;
}
.ta-featured-calc .arrow-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    transition: transform 0.3s;
}
.ta-featured-calc:hover .arrow-circle { transform: translateX(5px); }

@media (max-width: 768px) {
    .ta-featured-calc {
        flex-direction: column;
        text-align: center;
        padding: 28px 22px;
        gap: 16px;
    }
    .ta-featured-calc .calc-icon { margin: 0 auto; width: 56px; height: 56px; font-size: 1.8rem; border-radius: 14px; }
    .ta-featured-calc .card-title { font-size: 1.2rem; }
    .ta-featured-calc .card-desc { font-size: 0.9rem; }
    .ta-featured-calc .badge { font-size: 0.7rem; padding: 3px 8px; }
    .ta-featured-calc .arrow-circle { display: none; }
}

/* Section Heading */
.ta-section-head {
    display: flex; align-items: center; gap: 10px;
    margin: 40px 0 20px;
}
.ta-section-head h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    /* 한글 타이포 6원칙 */
    word-break: keep-all;
    letter-spacing: -0.02em;
    line-height: 1.35;
}
.ta-section-head i {
    color: var(--primary-color);
    font-size: 1.4rem;
}

/* 계산기 목록 그리드 (대표 계산기 아래, 더 작은 카드) */
.ta-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}
.ta-calc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 18px;
    text-decoration: none;
    color: inherit;
    display: flex; flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}
.ta-calc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-color);
}
.ta-calc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}
.ta-calc-card:hover::before { transform: scaleX(1); }

.ta-calc-card .icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 12px;
}
.ta-calc-card .title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
    /* 한글 타이포 6원칙 */
    word-break: keep-all;
    letter-spacing: -0.015em;
    line-height: 1.35;
}
.ta-calc-card .subtitle {
    font-size: 0.84rem;
    color: var(--primary-dark);
    font-weight: 500;
    margin-bottom: 10px;
    font-style: italic;
    word-break: keep-all;
    letter-spacing: -0.015em;
}
.ta-calc-card .desc {
    font-size: 0.82rem;
    color: var(--text-sub);
    line-height: 1.7;
    flex: 1;
    word-break: keep-all;
    letter-spacing: -0.01em;
}
.ta-calc-card .cta {
    margin-top: 16px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.92rem;
    display: flex; align-items: center; gap: 6px;
    transition: gap 0.2s;
}
.ta-calc-card:hover .cta { gap: 10px; }

/* 비교 테이블 */
.ta-compare-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}
.ta-compare-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.92rem;
}
.ta-compare-table thead th {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid var(--primary-border);
}
.ta-compare-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}
.ta-compare-table tbody tr:last-child td { border-bottom: none; }
.ta-compare-table tbody tr:hover { background: #f8fafc; }
.ta-compare-table tbody th {
    text-align: left;
    padding: 14px 16px;
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

/* FAQ */
.ta-faq {
    margin-top: 40px;
}
.ta-faq-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.ta-faq-item:hover { border-color: var(--primary-border); }
.ta-faq-question {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #111;
    font-size: 0.98rem;
    user-select: none;
    /* 한글 가독성 표준 */
    word-break: keep-all;
    letter-spacing: -0.015em;
    line-height: 1.5;
}
.ta-faq-question::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.2s;
}
.ta-faq-item.open .ta-faq-question::after { transform: rotate(45deg); }
.ta-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
    color: #334155;
    line-height: 1.75;
    font-size: 0.94rem;
    /* 한글 가독성 표준 */
    word-break: keep-all;
    letter-spacing: -0.01em;
}
.ta-faq-item.open .ta-faq-answer {
    max-height: 500px;
    padding: 0 20px 18px;
}

/* 출처 */
.ta-source-note {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    line-height: 1.7;
}
.ta-source-note a {
    color: var(--primary-color);
    text-decoration: none;
}
.ta-source-note a:hover { text-decoration: underline; }

/* ─── 액션 버튼 행 (공유 · 재계산 · ChatGPT) ─── */
.ta-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin: 16px 0 8px;
}

/* ─── 2x2 액션 그리드 (계산하기·재계산·공유·ChatGPT) ─── */
.ta-action-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 14px 0 4px;
}

/* ─── 액션 버튼 쌍 (공유 + ChatGPT) ─── */
.ta-action-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

/* ─── 상하 액션 영역 구분선 ─── */
.ta-action-divider {
    margin: 16px 0 14px;
    border-top: 1px solid #e2e8f0;
}

/* ─── 큰 primary 액션 (계산하기 풀폭) ─── */
.ta-action-big {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.96rem;
    letter-spacing: -0.01em;
}
.ta-action-big svg { width: 16px; height: 16px; }
.ta-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.ta-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-dark);
    background: var(--primary-light);
    transform: translateY(-1px);
}
.ta-action-btn.primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.ta-action-btn.primary:hover {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(8, 145, 178, 0.25);
}
.ta-action-btn.gpt {
    background: #111827;
    color: #fff;
    border-color: #111827;
}
.ta-action-btn.gpt:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}
.ta-action-btn svg {
    width: 16px; height: 16px;
    fill: currentColor;
}
.ta-action-btn .gpt-logo {
    width: 15px; height: 15px;
}
@media (max-width: 480px) {
    /* 다시진단·공유·ChatGPT 3버튼 가로 유지 (360px까지) */
    .ta-action-row { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
    .ta-action-btn { padding: 10px 6px; font-size: 0.78rem; gap: 4px; }
    .ta-action-btn svg, .ta-action-btn .gpt-logo { width: 14px; height: 14px; }
}

/* ─── 모바일 의미 분류 줄바꿈 ─── */
/* 사용: H1 등 긴 제목에 <br class="break-sm">를 의미 경계에 삽입.
   데스크탑 480+에서는 숨기고, 480px 이하에서만 줄바꿈 활성화. */
.break-sm { display: none; }
@media (max-width: 480px) {
    .break-sm { display: initial; }
}

/* ─── 프라이버시 링크 (허브 푸터 근처) & 모달 ─── */
.ta-privacy-link-wrap {
    text-align: center;
    margin: 16px 0 8px;
    font-size: 0.78rem;
    color: var(--text-sub);
}
.ta-privacy-link-wrap a {
    color: var(--text-sub);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(100, 116, 139, 0.35);
}
.ta-privacy-link-wrap a:hover { color: var(--primary-dark); text-decoration-color: currentColor; }

.ta-priv-modal { max-width: 440px; }
.ta-priv-modal h3 { margin-bottom: 14px; }
.ta-priv-section { margin: 14px 0; text-align: left; }
.ta-priv-head {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ta-priv-list { margin: 0; }
.ta-priv-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.88rem;
}
.ta-priv-list > div:last-child { border-bottom: none; }
.ta-priv-list dt { color: var(--text-sub); }
.ta-priv-list dd { color: var(--text-main); font-weight: 600; margin: 0; }
.ta-priv-done {
    list-style: none; padding: 0; margin: 0;
    font-size: 0.88rem;
}
.ta-priv-done li {
    padding: 4px 0;
    color: #166534;
}
.ta-priv-empty {
    text-align: center;
    color: var(--text-sub);
    padding: 24px 0;
    font-size: 0.9rem;
}
.ta-priv-note {
    font-size: 0.72rem;
    color: var(--text-sub);
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    margin-top: 14px;
    line-height: 1.6;
    text-align: left;
}

/* ─── 다음 추천 카드 리스트 (ta-next-suggestions) ─── */
.ta-next-suggestions {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}
.ta-next-suggestions-head {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.ta-next-suggestions-list {
    display: grid;
    gap: 8px;
}
.ta-next-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.ta-next-card:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: translateX(2px);
}
.ta-next-card-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.ta-next-card-body { flex: 1; min-width: 0; }
.ta-next-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}
.ta-next-card-desc {
    font-size: 0.78rem;
    color: var(--text-sub);
    line-height: 1.4;
}
.ta-next-card-arrow {
    color: var(--text-sub);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.ta-next-card:hover .ta-next-card-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}
/* ← 뒤로 가는 카드 (compare 진단 등 이전 단계) */
.ta-next-card-arrow.back { margin-right: 6px; }
.ta-next-card:hover .ta-next-card-arrow.back {
    transform: translateX(-4px);      /* 왼쪽으로 슬라이드 */
}

/* 토스트 */
.ta-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0f172a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s;
    max-width: 90vw;
    text-align: center;
}
.ta-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.ta-toast.success { background: #065f46; }
.ta-toast.error   { background: #991b1b; }

/* ─── ChatGPT 확인 모달 ─── */
.ta-gpt-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    padding: 20px;
    animation: ta-gpt-fade 0.2s ease-out;
}
.ta-gpt-modal.show { display: flex; }
@keyframes ta-gpt-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.ta-gpt-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: ta-gpt-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ta-gpt-pop {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.ta-gpt-icon {
    font-size: 2.8rem;
    margin-bottom: 6px;
}
.ta-gpt-modal-content h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}
.ta-gpt-main {
    font-size: 1rem;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 12px;
}
.ta-gpt-highlight {
    display: inline-block;
    background: #fef3c7;
    color: #78350f;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    margin: 6px 0;
    font-size: 0.95rem;
}
.ta-gpt-tip {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 22px;
    line-height: 1.5;
}
.ta-gpt-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px;
}
.ta-gpt-actions button {
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.ta-gpt-cancel {
    background: #f1f5f9;
    color: #64748b;
}
.ta-gpt-cancel:hover { background: #e2e8f0; color: #334155; }
.ta-gpt-open {
    background: #111827;
    color: #fff;
}
.ta-gpt-open:hover { background: #000; transform: translateY(-1px); }

/* 계산기 페이지 공통 레이아웃 (Part A-1 표준 400+800) */
.ta-main-wrapper {
    display: flex;
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 24px 80px;
    /* margin-top 제거 — breadcrumb-band + title-section이 위쪽 처리 */
}
/* ─── 공통 타이틀 영역 (4페이지 공통)
       정렬 원칙: 가로 padding은 inner에 (breadcrumb·main과 왼쪽 경계 일치) */
.ta-title-section {
    background: #fff;
    padding: 28px 0 24px;
    border-bottom: 1px solid #e2e8f0;
}
.ta-title-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}
.ta-title-section h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
    line-height: 1.3;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.ta-title-section h1 .icon {
    color: var(--primary-color);
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}
.ta-title-section .subtitle {
    color: var(--text-sub);
    font-size: 1rem;
}
@media (max-width: 768px) {
    .ta-title-section { padding: 20px 0 18px; }
    .ta-title-inner { padding: 0 16px; }
    .ta-title-section h1 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
    .ta-title-section h1 { font-size: 1.4rem; letter-spacing: -0.03em; }
    .ta-title-section .subtitle { font-size: 0.92rem; }
}

.ta-calculator-wrapper {
    width: 400px;
    flex-shrink: 0;
    /* 투명 컨테이너 — 내부의 .ta-calc-box / #result-area 가 각자 카드 */
    background: transparent;
    border: none;
    box-shadow: none;
    /* 스티키 — 오른쪽 가이드 스크롤 시 왼쪽 계산기 고정 (데스크톱만) */
    position: sticky;
    top: calc(var(--nav-height) + 12px);
    align-self: flex-start;
    max-height: calc(100vh - var(--nav-height) - 24px);
    overflow-y: auto;
    /* 세로 스크롤바 완전 숨김 (스크롤 기능은 유지) */
    scrollbar-width: none;              /* Firefox */
    -ms-overflow-style: none;           /* IE/Edge Legacy */
}
.ta-calculator-wrapper::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* 첫 번째 카드: 헤더 + 탭 + 입력폼 + 계산하기/공유/ChatGPT까지
   이름 주의: .ta-calc-card는 허브 카드용(hover 효과 有)이라 충돌 — .ta-calc-box 사용 */
.ta-calc-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(8, 145, 178, 0.08);
    overflow: hidden;
}

/* 두 번째 카드: 결과 영역 (첫 카드 아래, 계산하기 누르면 표시) */
.ta-calculator-wrapper #result-area,
.ta-calculator-wrapper #exit-result-area,
.ta-calculator-wrapper #result-normal,
.ta-calculator-wrapper #result-emergency {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(8, 145, 178, 0.08);
    overflow: hidden;
    margin-top: 16px;
}
/* exit 내부 탭별 패널은 별도 카드 X (부모 #exit-result-area 가 카드 역할) */
#exit-result-area .exit-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    overflow: visible;
}
.ta-guide-wrapper {
    flex: 1;
    min-width: 0;
}
.ta-panel {
    background: transparent;
    border-radius: 0;
    padding: 24px;
    box-shadow: none;
    border: none;
}
.ta-panel + .ta-panel {
    margin-top: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* 가이드 영역 상단 H2 (결과 → 가이드 전환 구분) */
.ta-guide-wrapper > .guide-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}
@media (max-width: 480px) {
    .ta-guide-wrapper > .guide-title { font-size: 1.2rem; }
}

/* 가이드 상단 썸네일 일러스트 (4컷 시리즈) */
.ta-guide-wrapper > .guide-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    border-radius: 12px;
    margin: 0 0 20px;
    display: block;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
@media (max-width: 480px) {
    .ta-guide-wrapper > .guide-thumb {
        border-radius: 10px;
        margin-bottom: 16px;
    }
}

/* 본문 인라인 권위 링크 (국세청·법제처·홈택스 등) */
a.source-inline {
    color: var(--primary-dark, #059669);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    font-weight: inherit;
}
a.source-inline:hover {
    color: var(--primary-color, #10b981);
    text-decoration-style: solid;
}
small.source-citation {
    display: inline;
    color: #94a3b8;
    font-size: 0.82em;
    font-weight: 400;
    letter-spacing: -0.01em;
}
small.source-citation a.source-inline {
    color: #64748b;
    text-decoration: underline;
    text-decoration-style: dotted;
}
small.source-citation a.source-inline:hover { color: var(--primary-dark, #059669); }

/* ─── 계산기 카드 헤더 (아바타 + Last update) — 군인 패턴 ─── */
.ta-calc-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid rgba(8, 145, 178, 0.08);
    border-bottom: 1px solid #e2e8f0;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
}
.ta-calc-header .author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ta-calc-header .author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: -0.02em;
    border: 2px solid var(--primary-border);
    flex-shrink: 0;
}
.ta-calc-header .author-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
}
.ta-calc-header .update-badge {
    font-size: 0.72rem;
    color: var(--text-sub);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    white-space: nowrap;
}

/* ─── 크로스 네비 3 탭 (같은 카테고리 계산기 간 전환) — 엣지 투 엣지 ─── */
.ta-calc-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    border-left: 1px solid rgba(8, 145, 178, 0.08);
    border-right: 1px solid rgba(8, 145, 178, 0.08);
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    overflow: hidden;
}
.ta-calc-tabs .tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 4px;            /* 세로 10 → 16px (+60%) */
    background: #f8fafc;
    border: none;
    border-radius: 0;
    border-right: 1px solid #e2e8f0;
    color: var(--text-sub);
    text-decoration: none;
    transition: background 0.2s;
    gap: 3px;                     /* top/bottom 텍스트 간격 살짝 늘림 */
}
.ta-calc-tabs .tab-link:last-child { border-right: none; }
.ta-calc-tabs .tab-link:hover {
    background: #f1f5f9;
}
.ta-calc-tabs .tab-link.active {
    background: #fff;
    box-shadow: inset 0 -3px 0 var(--primary-color);
}
.ta-calc-tabs .tab-link.active .tab-text-top {
    color: var(--primary-dark);
    font-weight: 800;
}
.ta-calc-tabs .tab-link.active .tab-text-bottom {
    color: var(--primary-dark);
    font-weight: 600;
}
.ta-calc-tabs .tab-text-top {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
}
.ta-calc-tabs .tab-text-bottom {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-sub);
    line-height: 1.2;
    white-space: nowrap;
}
/* 모바일도 데스크톱과 동일 4탭 구조 유지
   (사이드바 폭 400px, 모바일 360px → 차이 10px로 동일 CSS 적용 가능) */

/* 헤더 → 탭 → 패널 연결 시 라운드 정리
   (ta-calculator-wrapper가 외곽 라운드 담당하므로 개별 처리 불필요) */

/* 결과 카드 */
.ta-result-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, #ccfbf1 100%);
    border: 1px solid var(--primary-border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}
.ta-result-card .result-label {
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 8px;
}
.ta-result-card .result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.ta-result-card .result-sub {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.6;
}

/* 폼 요소 */
.ta-form-group {
    margin-bottom: 16px;
}
.ta-form-group label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
.ta-form-group input[type=number],
.ta-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;           /* iOS Safari 포커스 zoom 방지 (16px 미만이면 자동 확대) */
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 42px;              /* 고정 높이 — 포커스·스피너로 인한 시프트 방지 */
    box-sizing: border-box;
    -moz-appearance: textfield; /* Firefox 스피너 숨김 */
    -webkit-appearance: none;   /* iOS 기본 스타일 제거 */
    appearance: none;
}
/* 숫자 input 기본 스피너 제거 (포커스 시 레이아웃 시프트 방지) */
.ta-form-group input[type=number]::-webkit-outer-spin-button,
.ta-form-group input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ta-form-group input[type=number]:focus,
.ta-form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}
.ta-form-group .hint {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 4px;
}

/* 입력 오른쪽 단위 뱃지 (원·만원·년 등) */
.ta-input-unit {
    position: relative;
}
.ta-input-unit input[type=number] {
    padding-right: 52px;
}
.ta-input-unit .unit {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    user-select: none;
}

/* 2열 가로 정렬 (대등한 필드 쌍) */
/* 섹션 라벨 — "올해 납입금" 처럼 여러 input 묶는 상위 제목
   .ta-form-group label 과 완전 동일 스펙 (크기·굵기·색·폰트) 유지 */
.ta-form-section-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;              /* .ta-form-group label 과 동일 */
    margin: 0 0 6px;             /* label 동일 마진 */
    font-family: inherit;
    letter-spacing: normal;
}

.ta-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
    align-items: start;      /* 셀 높이 차이로 인한 layout shift 방지 */
}
/* 섹션 라벨 아래 오는 sub-label — 기본 label 대비 한 단계 축소 */
.ta-form-row .sub-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-sub);
}
.ta-form-row .ta-form-group { margin-bottom: 0; }
.ta-form-row label {
    font-size: 0.88rem;
    min-height: 20px;        /* 라벨 길이 달라도 input 위치 동일 */
    display: block;
    line-height: 1.3;
}
.row-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 4px 0 16px 0;
}
/* 360px 이하도 2열 유지 — 가로 공간 타이트하지만 UX 일관성 우선 */
@media (max-width: 360px) {
    .ta-form-row { gap: 6px; }
    .ta-form-row label { font-size: 0.8rem; letter-spacing: -0.02em; }
    .ta-form-row .ta-input-unit input { font-size: 0.95rem; }
}

.ta-radio-group {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.ta-radio-group label {
    flex: 1; min-width: 80px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition);
    background: #fff;
    display: flex; align-items: center; justify-content: center;
}
.ta-radio-group input[type=radio] { display: none; }
.ta-radio-group input[type=radio]:checked + label {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
}

.ta-btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.ta-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(8, 145, 178, 0.25);
}

/* 모바일 (768px) — 군인 계산기 패턴 (엣지 투 엣지) */
@media (max-width: 768px) {
    body { font-size: 14px; line-height: 1.65; }

    .ta-container { padding: 20px 16px 60px; }
    .ta-hero { padding: 24px; }
    .ta-hero h1 { font-size: 1.7rem; }
    .ta-calc-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* 계산기 레이아웃: 세로 스택 + 엣지 투 엣지 */
    .ta-main-wrapper {
        flex-direction: column;
        padding: 0;
        gap: 0;
        margin-top: 0;
    }
    .ta-calculator-wrapper {
        width: 100%;
        margin-bottom: 0;
        /* 모바일에선 sticky 해제 — 세로 스택 구조 */
        position: static;
        max-height: none;
        overflow-y: visible;
        top: auto;
    }
    .ta-calculator-wrapper .ta-panel {
        border-radius: 0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        border-left: none;
        border-right: none;
    }
    .ta-calculator-wrapper .ta-panel + .ta-panel { margin-top: 8px; }

    .ta-guide-wrapper {
        padding: 20px 16px;
        border-top: 6px solid #f1f5f9;
    }
    .ta-guide-wrapper .tldr-box,
    .ta-guide-wrapper .guide-section {
        border-radius: 12px;
    }

    /* ─── 한글 가이드 타이포그래피 (사이트 구조.md A-8/A-9 표준) ─── */
    .guide-section p,
    .guide-section li {
        word-break: keep-all;           /* 한글 단어 단위 줄바꿈 */
        letter-spacing: -0.01em;
        line-height: 1.75;
    }
    .guide-section p {
        margin-bottom: 1rem;
        color: #374151;
    }
    .guide-section ul, .guide-section ol {
        margin: 0.8rem 0 1.2rem;
        padding-left: 1.2rem;
    }
    .guide-section li {
        margin-bottom: 0.4rem;
    }
    .guide-section h2 {
        word-break: keep-all;
        letter-spacing: -0.02em;
        line-height: 1.35;
    }
    .guide-section h3 {
        word-break: keep-all;
        letter-spacing: -0.02em;
        line-height: 1.4;
    }
    .tldr-box, .info-box, .warning-box, .success-box {
        word-break: keep-all;
        letter-spacing: -0.01em;
        line-height: 1.75;
    }
}

/* 480px — 일반 모바일 (한글 자간 추가 축소 + 폰트 조정) */
@media (max-width: 480px) {
    body {
        font-size: 15px;
        line-height: 1.7;
    }
    .guide-section h2 {
        font-size: 1.25rem;
        letter-spacing: -0.025em;
        padding-left: 1.8ch;
        text-indent: -1.8ch;            /* 번호 hanging indent (예: "0. ISA..." 정렬) */
    }
    .guide-section h3 {
        font-size: 1.1rem;
        letter-spacing: -0.025em;
    }
    .guide-section p,
    .guide-section li {
        font-size: 0.95rem;
        line-height: 1.75;
        letter-spacing: -0.02em;
    }
    .guide-section table {
        font-size: 0.85rem;
    }
    .guide-section table th,
    .guide-section table td {
        padding: 10px 12px;
    }
    .tldr-box, .info-box, .warning-box, .success-box {
        letter-spacing: -0.02em;
    }
    /* FAQ 자간 축소 */
    .ta-faq-question {
        letter-spacing: -0.025em;
        font-size: 0.95rem;
        padding: 14px 16px;
    }
    .ta-faq-answer {
        letter-spacing: -0.02em;
        font-size: 0.92rem;
    }
    /* 비교표 자간 축소 */
    .ta-compare-table {
        letter-spacing: -0.01em;
    }
    .ta-compare-table thead th,
    .ta-compare-table tbody td,
    .ta-compare-table tbody th {
        word-break: keep-all;
    }
    /* 의미 경계 줄바꿈 — <br class="break-sm"> 활성 */
    .break-sm { display: inline; }
}

/* 350px — 소형 모바일 (자간 추가 축소) */
@media (max-width: 350px) {
    .guide-section h2 { letter-spacing: -0.035em; font-size: 1.15rem; }
    .guide-section h3 { letter-spacing: -0.035em; font-size: 1.05rem; }
    .guide-section p,
    .guide-section li { letter-spacing: -0.025em; font-size: 0.92rem; }
    .ta-faq-question { letter-spacing: -0.035em; font-size: 0.9rem; }
    .ta-faq-answer { letter-spacing: -0.025em; font-size: 0.88rem; }
}

@media (max-width: 480px) {
    .ta-hero h1 {
        font-size: 1.5rem;
        letter-spacing: -0.03em;
        word-break: keep-all;
        line-height: 1.3;
    }
    .ta-hero .subtitle {
        font-size: 0.95rem;
        word-break: keep-all;
        letter-spacing: -0.02em;
        line-height: 1.6;
    }
    .ta-section-head h2 {
        font-size: 1.2rem;
        letter-spacing: -0.025em;
    }
    .ta-calc-card { padding: 20px; }
    .ta-calc-card .title { font-size: 1rem; letter-spacing: -0.025em; }
    .ta-calc-card .desc { font-size: 0.85rem; letter-spacing: -0.02em; }
    .ta-featured-calc .card-title { letter-spacing: -0.025em; }
    .ta-featured-calc .card-desc { letter-spacing: -0.02em; font-size: 0.92rem; }
    .ta-result-card .result-value { font-size: 1.6rem; }
}

@media (max-width: 350px) {
    .ta-hero h1 { font-size: 1.35rem; letter-spacing: -0.035em; }
    .ta-section-head h2 { letter-spacing: -0.035em; font-size: 1.1rem; }
    .ta-calc-card .title { letter-spacing: -0.035em; }
    .ta-calc-card .desc { letter-spacing: -0.025em; }
    .ta-featured-calc .card-title { letter-spacing: -0.035em; }
    .ta-featured-calc .card-desc { letter-spacing: -0.025em; }
}

/* ──────────────────────────────────────────────
   툴팁 시스템 (.ta-tip 버튼 + 중앙 팝업)
   ────────────────────────────────────────────── */
.ta-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-left: 6px;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    vertical-align: middle;
    flex-shrink: 0;
    font-family: inherit;
    line-height: 1;
}
.ta-tip:hover {
    background: var(--primary-color);
    color: #fff;
}
.ta-tip:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
/* 텍스트 링크 스타일 변형 — ? 동그라미 대신 밑줄 텍스트 */
.ta-tip.as-link {
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    color: var(--primary-dark);
    font-size: inherit;
    font-weight: 600;
    border-radius: 0;
    border-bottom: 1px dashed var(--primary-border);
    text-decoration: none;
    margin-left: 0;
    line-height: 1.4;
}
.ta-tip.as-link:hover {
    background: transparent;
    color: var(--primary-color);
    border-bottom-style: solid;
    border-bottom-color: var(--primary-color);
}
/* 어두운 배경용 (rec-main 같은 곳) */
.ta-tip.as-link-white {
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    color: #fde68a;               /* amber-200 — 어두운 배경에서 시선 */
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0;
    border-bottom: 1px dashed rgba(253, 230, 138, 0.5);
    margin-left: 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
    text-align: left;
}
.ta-tip.as-link-white:hover {
    background: transparent;
    color: #fff;
    border-bottom-color: #fff;
    border-bottom-style: solid;
}
.ta-tip-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}
.ta-tip-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.ta-tip-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: min(90vw, 380px);
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    color: #1e293b;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.ta-tip-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.ta-tip-popup .ta-tip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
}
.ta-tip-popup .ta-tip-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}
.ta-tip-popup .ta-tip-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 8px;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.ta-tip-popup .ta-tip-close:hover {
    background: #f1f5f9;
    color: #475569;
}
.ta-tip-popup .ta-tip-body {
    padding: 16px 18px 20px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #334155;
    word-break: keep-all;
    letter-spacing: -0.01em;
}
.ta-tip-popup .ta-tip-body b,
.ta-tip-popup .ta-tip-body strong {
    color: var(--primary-dark);
}
.ta-tip-popup .ta-tip-body a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--primary-border);
    transition: color 0.15s, text-decoration-color 0.15s;
}
.ta-tip-popup .ta-tip-body a:hover {
    color: var(--primary-dark);
    text-decoration-color: var(--primary-color);
}
/* Primary 링크 — 박스형 CTA */
.ta-tip-popup .tip-cta {
    background: linear-gradient(135deg, var(--primary-light), #ccfbf1);
    border: 1.5px solid var(--primary-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    text-align: center;
}
.ta-tip-popup .tip-primary-link {
    display: inline-block;
    color: var(--primary-dark) !important;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none !important;
    letter-spacing: -0.01em;
}
.ta-tip-popup .tip-primary-link:hover {
    color: var(--primary-color) !important;
    transform: translateX(2px);
}
.ta-tip-popup .tip-primary-sub {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
    line-height: 1.5;
}
.ta-tip-popup .tip-primary-sub b {
    color: var(--primary-dark);
}
@media (max-width: 480px) {
    .ta-tip-popup {
        width: min(92vw, 360px);
    }
    .ta-tip-popup .ta-tip-body {
        font-size: 0.88rem;
    }
}

/* ──────────────────────────────────────────────
   .ta-advanced — 고급 설정 details/summary (limit·exit 공용)
   ────────────────────────────────────────────── */
.ta-advanced {
    margin-top: 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.92rem;
}
.ta-advanced > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-dark);
    list-style: none;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.ta-advanced > summary::-webkit-details-marker { display: none; }
.ta-advanced > summary::after {
    content: '▸';
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 0.85rem;
    color: var(--text-sub);
}
.ta-advanced[open] > summary::after { transform: rotate(90deg); }
.ta-advanced[open] {
    background: #fff;
    border-color: var(--primary-border);
}
.ta-advanced .ta-form-group { margin-bottom: 12px; }
.ta-advanced .ta-form-group:last-child { margin-bottom: 4px; }
