/* 폰트: Pretendard (시스템 폰트 대용) */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
    /* 기존 변수 유지하되 일부 리파인 */
    --primary-color: #3b82f6; /* 조금 더 밝은 블루 */
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --text-primary: #111827; /* 완전 블랙 대신 다크 그레이 */
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #f9fafb;
    --border-color: #e5e7eb;
    --border-focus: #3b82f6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    --transition-base: 200ms ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    /* 모바일 터치 최적화 */
    touch-action: manipulation;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* 브레드크럼 */
.breadcrumb { background: white; padding: 0.75rem 0; font-size: 0.85rem; border-bottom: 1px solid var(--border-color); }
.breadcrumb-container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; color: var(--text-secondary); }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb-separator { margin: 0 0.5rem; color: var(--text-tertiary); }

/* 메인 타이틀 */
.main-title-section { background: white; padding: 2.5rem 0 2rem; text-align: center; }
.main-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--text-primary); display: inline-flex; align-items: center; gap: 0.5rem; letter-spacing: -0.02em; }
.title-icon { font-size: 2rem; }
.main-subtitle { color: var(--text-secondary); font-size: 1rem; }

/* TL;DR 박스 */
.tldr-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}
.tldr-box strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.tldr-box p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* 메인 래퍼 */
.main-wrapper { max-width: 1200px; margin: 0 auto; display: flex; gap: 1.75rem; padding: 1.75rem 1.5rem; align-items: flex-start; }
.calculator-wrapper { width: 380px; flex-shrink: 0; position: sticky; top: 72px; min-width: 0; }
.guide-wrapper { flex: 1; min-width: 0; }


/* =========================================
   [CORE] 계산기 카드 디자인 (대출계산기 스타일)
   ========================================= */
.calculator-card {
    background: var(--bg-primary);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 100%;
}

/* 계산기 헤더 (대출계산기 스타일) */
.calculator-header {
    background: var(--bg-primary);
    padding: 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.calculator-header.compact {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.625rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
}

.author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.author-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.update-badge {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.3125rem 0.625rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    font-weight: 500;
    white-space: nowrap;
}

.calculator-body {
    background: var(--bg-primary);
    padding: 0.875rem;
}

/* 모던 탭 (Segmented Control) */
.worker-tabs-container {
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}
.worker-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: relative;
}
.worker-tab {
    background: transparent;
    border: none;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    z-index: 1;
}
.worker-tab.active {
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 폼 요소 스타일링 */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-section + .form-section {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.form-row { margin-bottom: 0; }
.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.input-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

/* 모던 인풋 스타일 */
.modern-input, .modern-select {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    appearance: none;
}
.modern-input:focus, .modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.modern-input::placeholder { 
    color: var(--text-tertiary); 
    font-size: 0.9rem;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 단위가 붙는 인풋 */
.input-with-suffix { position: relative; display: flex; align-items: center; }
.input-with-suffix input { padding-right: 3rem; text-align: right; }
.input-with-suffix .suffix {
    position: absolute;
    right: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    pointer-events: none;
}
.input-with-suffix.big input { font-size: 1.1rem; font-weight: 600; }

/* 체크박스 디자인 (Chip 스타일) */
.checkbox-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: var(--bg-tertiary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    transition: all 0.2s;
}
.checkbox-chip:hover { background: var(--bg-secondary); }
.checkbox-chip input { margin: 0; accent-color: var(--primary-color); width: 14px; height: 14px; }

.checkbox-simple {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.checkbox-simple input { width: 16px; height: 16px; accent-color: var(--primary-color); }

/* 라디오 카드 그룹 */
.radio-card-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.radio-card {
    position: relative;
    cursor: pointer;
}
.radio-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.radio-card-content {
    border: 1px solid var(--border-color);
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.2s;
}
.radio-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.radio-card input:checked + .radio-card-content {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
}
.radio-card input:checked + .radio-card-content .radio-title {
    color: var(--primary-color);
    font-weight: 700;
}

/* 폼 그리드 및 그룹 */
.form-row-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-col { display: flex; flex-direction: column; }

/* 180일 확인 버튼 */
.insurance-check-wrapper {
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
}
.btn-text-action {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.btn-text-action:hover { text-decoration: underline; }
#insurance-check-result { font-size: 0.85rem; font-weight: 600; }
#insurance-check-result.success { color: var(--success-color); }
#insurance-check-result.fail { color: var(--danger-color); }

/* 구분선 */
.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* 셀렉트 박스 */
.select-wrapper { position: relative; }
.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    pointer-events: none;
}

/* 월급 3개월 상세 입력 */
.salary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--radius-md);
}
.sub-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.modern-input.compact { height: 40px; font-size: 0.9rem; text-align: right; }

/* 평균 표시 */
.avg-display {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-color);
}

/* 슬라이드 섹션 애니메이션 */
.slide-section {
    overflow: hidden;
    transition: all 0.3s ease;
}
.slide-section.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* 도움말 텍스트 */
.helper-text-modern {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.4;
}
.helper-text-modern a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}
.helper-text-modern a:hover {
    color: var(--primary-hover);
}

/* 한 줄 툴팁 */
.helper-text-inline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}
.helper-text-inline a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}
.helper-text-inline a:hover {
    color: var(--primary-hover);
}

/* 메인 버튼 */
/* 버튼 그리드 (대출계산기 스타일) */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas: 
        "share reset"
        "share calculate";
    gap: 6px;
    margin-top: 1.25rem;
    height: 90px;
}

.btn {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn:active { transform: scale(0.98); }

/* 버튼 컬러 */
.share-btn {
    grid-area: share;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #ea580c;
}
.share-btn:hover {
    background: #ffedd5;
    border-color: #fdba74;
}

.reset-btn {
    grid-area: reset;
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}
.reset-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.calculate-btn {
    grid-area: calculate;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 700;
}
.calculate-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* 공유 모달 */
.share-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-content {
    background-color: white;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.share-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.share-buttons {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.share-button {
    padding: 14px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

.share-button:hover {
    transform: translateY(-2px);
}

.share-button.copy-link {
    grid-column: 1 / -1;
}

.share-button.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-button.twitter:hover {
    background: #000;
    color: white;
    border-color: #000;
}

.share-button.kakao:hover {
    background: #fee500;
    color: #000;
    border-color: #fee500;
}

.share-button.naver:hover {
    background: #03c75a;
    color: white;
    border-color: #03c75a;
}

.share-button.copy-link:hover {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
}

/* 결과 카드 (핵심) */
.result-section { margin-top: 2rem; }
.result-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
    position: relative;
    overflow: hidden;
}
.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(59, 130, 246, 0.2);
    filter: blur(50px);
    border-radius: 50%;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative; z-index: 1;
}
.result-label { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.result-badge {
    background: rgba(255,255,255,0.1);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}
.result-total-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    position: relative; z-index: 1;
    letter-spacing: -0.02em;
}
.result-summary-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1.5rem;
    position: relative; z-index: 1;
}

.result-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin-bottom: 1rem;
    position: relative; z-index: 1;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    position: relative; z-index: 1;
}
.result-item { display: flex; flex-direction: column; gap: 0.25rem; }
.result-item .label { font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.result-item .value { font-size: 1rem; font-weight: 600; }
.result-item .value.highlight { color: #60a5fa; }
.result-item .warning { color: #f87171; }
.hidden { display: none; }

.fraud-alert {
    margin-top: 1.25rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: start;
    gap: 0.5rem;
    line-height: 1.4;
    position: relative; z-index: 1;
}

/* 퇴사 사유 경고 */
.resignation-warning {
    margin-top: 0.75rem;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fcd34d;
    font-size: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: start;
    gap: 0.5rem;
    line-height: 1.5;
}
.resignation-warning i {
    margin-top: 2px;
    flex-shrink: 0;
}
.resignation-warning .warning-content {
    flex: 1;
}
.resignation-warning strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #fbbf24;
}
.resignation-warning p {
    margin: 0 0 0.5rem 0;
    color: #fcd34d;
}
.resignation-warning ul {
    margin: 0;
    padding-left: 1rem;
    color: rgba(253, 211, 77, 0.8);
}
.resignation-warning li {
    margin-bottom: 0.15rem;
}

/* 구직활동 요건 안내 */
.activity-notice {
    margin-top: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    font-size: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}
.activity-notice strong {
    color: #60a5fa;
}

/* 추천 링크 (결과 내) - 2열 */
.result-recommend {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 1;
}

.recommend-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.recommend-item {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid #d4af37;
    border-radius: 10px;
    padding: 0.875rem;
    text-decoration: none;
    color: white;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recommend-item:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: #f0d060;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.recommend-label {
    font-size: 0.7rem;
    opacity: 0.75;
    line-height: 1.3;
}

.recommend-link {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.95;
}

/* 결과 액션 버튼 (3열) */
.result-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
}

.result-btn {
    background: rgba(255,255,255,0.1);
    border: 1.5px solid #d4af37;
    border-radius: 8px;
    padding: 0.625rem 0.5rem;
    color: white;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
    flex-direction: column;
    line-height: 1.3;
}

.result-btn i {
    color: #d4af37;
}

.result-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: #f0d060;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.result-btn.share:hover { background: rgba(234, 88, 12, 0.2); border-color: #ea580c; }
.result-btn.share:hover i { color: #fb923c; }
.result-btn.reset:hover { background: rgba(59, 130, 246, 0.2); border-color: #3b82f6; }
.result-btn.reset:hover i { color: #60a5fa; }
.result-btn.guide:hover { background: rgba(16, 185, 129, 0.2); border-color: #10b981; }
.result-btn.guide:hover i { color: #34d399; }

.calculator-footer-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 1rem;
}

/* 애니메이션 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

/* 에러 메시지 */
.error-container {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
}
.error-container h4 { margin-bottom: 0.25rem; font-size: 0.9rem; }
.error-container ul { padding-left: 1.25rem; }


/* =========================================
   툴팁 스타일 (피보험 단위기간 설명)
   ========================================= */

/* 툴팁 버튼 (물음표) */
.tooltip-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    transition: color 0.2s;
    line-height: 1;
}
.tooltip-btn:hover {
    color: var(--primary-color);
}

/* 툴팁 팝업 */
.tooltip-popup {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 12px;
    overflow: hidden;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.tooltip-header strong {
    font-size: 14px;
    color: var(--text-primary);
}

.tooltip-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-tertiary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.tooltip-close:hover {
    color: var(--text-secondary);
}

.tooltip-content {
    padding: 16px;
}

.tooltip-content > p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tooltip-example {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
}

.example-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tooltip-example ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tooltip-example li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.tooltip-example li .yes {
    color: var(--success-color);
    font-weight: 600;
    flex-shrink: 0;
}

.tooltip-example li .no {
    color: var(--danger-color);
    font-weight: 600;
    flex-shrink: 0;
}

.tooltip-note {
    font-size: 11px !important;
    color: var(--text-secondary) !important;
    background: #fef3c7;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 0 !important;
}


/* =========================================
   가이드 섹션 (상세 사용법)
   ========================================= */
.guide-card { 
    background: white; 
    border-radius: 12px; 
    padding: 1.5rem; 
    border: 1px solid var(--border-color); 
    box-shadow: var(--shadow-sm); 
}

.guide-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 1.5rem; 
    color: var(--text-primary); 
    border-bottom: 2px solid var(--primary-color); 
    padding-bottom: 0.75rem; 
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 사용법 섹션 */
.usage-section {
    margin-bottom: 2rem;
}

.usage-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.usage-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.step-content p strong {
    color: var(--text-primary);
}

/* 팁 섹션 */
.tip-section {
    margin-bottom: 2rem;
}

.tip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tip-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.2s;
}

.tip-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.tip-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tip-content h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tip-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tip-content li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.tip-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.tip-content li strong {
    color: var(--primary-color);
}

/* 결과 해석 섹션 */
.result-guide-section {
    margin-bottom: 2rem;
}

.result-explain {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.explain-item {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1.25rem;
}

.explain-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.explain-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.explain-item strong {
    color: var(--text-primary);
}

/* 정보 박스 */
.info-box { 
    background: var(--bg-tertiary); 
    border-radius: 10px; 
    padding: 1.25rem; 
    margin-bottom: 1.5rem; 
    border: 1px solid var(--border-color); 
}

.info-box.highlight { 
    background: var(--bg-tertiary); 
    border-color: var(--border-color); 
}

.info-box h3 { 
    font-size: 0.95rem; 
    font-weight: 700; 
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.standard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.standard-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.standard-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.standard-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.standard-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

.source-note {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.source-note a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.source-note a:hover {
    color: var(--primary-color);
}

/* 자주 하는 실수 */
.mistake-section {
    margin-bottom: 1.5rem;
}

.mistake-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mistake-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.mistake-wrong {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    flex-shrink: 0;
}

.mistake-arrow {
    color: var(--text-tertiary);
    font-weight: 700;
}

.mistake-right {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* 미니 FAQ (SEO용) */
.mini-faq-section {
    margin-bottom: 1.5rem;
}

.mini-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mini-faq-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.mini-faq-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mini-faq-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.mini-faq-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 가이드 CTA */
.guide-cta {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.cta-description {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
    line-height: 1.6;
}
.cta-description strong {
    color: #fbbf24;
}

.cta-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--text-primary);
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.cta-button i {
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* 관련 링크 */
.related-links { 
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem; 
}

.link-btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0.875rem; 
    background: white; 
    border: 1px solid var(--border-color); 
    border-radius: 10px; 
    color: var(--text-primary); 
    font-weight: 600; 
    transition: all 0.2s; 
    font-size: 0.85rem; 
    gap: 0.5rem; 
    text-decoration: none;
}

.link-btn:hover { 
    border-color: var(--primary-color); 
    color: var(--primary-color); 
    background: var(--primary-light); 
}

/* 모바일 반응형 - 가이드 */
@media (max-width: 768px) {
    /* iOS 자동 줌 방지 - input 16px */
    .modern-input, .modern-select {
        font-size: 1rem;
    }

    .tip-grid {
        grid-template-columns: 1fr;
    }
    
    .standard-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .standard-item {
        padding: 0.5rem;
    }
    
    .standard-label {
        font-size: 0.7rem;
    }
    
    .standard-value {
        font-size: 0.9rem;
    }
    
    .mistake-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mistake-arrow {
        display: none;
    }
    
    .mistake-right::before {
        content: "→ ";
    }
}

@media (max-width: 480px) {
    .guide-card {
        padding: 0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .guide-title {
        font-size: 1.1rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    .usage-step {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .step-content h4 {
        font-size: 0.9rem;
    }
    
    .step-content p {
        font-size: 0.8rem;
    }
    
    .tip-card {
        padding: 0.5rem;
    }
    
    .tip-icon {
        font-size: 1.25rem;
    }
    
    .tip-content h4 {
        font-size: 0.85rem;
    }
    
    .tip-content li {
        font-size: 0.75rem;
    }
    
    .explain-item {
        padding: 0.5rem;
    }
    
    .explain-item h4 {
        font-size: 0.9rem;
    }
    
    .explain-item p {
        font-size: 0.8rem;
    }
    
    .guide-cta {
        padding: 0.75rem;
    }
    
    .cta-label {
        font-size: 0.85rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .related-links {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .link-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* FAQ */
.faq-section { margin-top: 1.5rem; }
.faq-item { border-bottom: 1px solid var(--border-color); border-radius: 0; margin-bottom: 0; }
.faq-item:first-of-type { border-top: 1px solid var(--border-color); }
.faq-question { 
    width: 100%;
    background: none; 
    border: none;
    padding: 1rem 0.5rem; 
    font-size: 0.95rem; 
    font-weight: 600; 
    color: var(--text-primary); 
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}
.faq-question:hover { color: var(--primary-color); }
.faq-question i { 
    transition: transform 0.2s; 
    color: var(--text-tertiary);
    font-size: 0.8rem;
}
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { 
    display: none;
    background: var(--bg-tertiary); 
    color: var(--text-secondary); 
    line-height: 1.6; 
    padding: 1rem;
    font-size: 0.9rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.faq-item.active .faq-answer { display: block; }

/* 패널티 리스트 */
.penalty-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.penalty-list li {
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}
.penalty-list li span { color: var(--text-secondary); }
.penalty-list li strong { color: var(--danger-color); }

/* 관련 링크 */
.related-links { display: flex; gap: 0.75rem; margin-top: 2rem; }
.link-btn { 
    flex: 1; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 0.8rem; 
    background: white; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    color: var(--text-primary); 
    font-weight: 600; 
    transition: all 0.2s; 
    font-size: 0.9rem; 
    gap: 0.5rem; 
    text-decoration: none;
}
.link-btn:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }

/* 푸터 */
.footer { background: #1e293b; color: white; padding: 2rem 1rem; text-align: center; margin-top: 3rem; }
.footer-container { max-width: 600px; margin: 0 auto; }
.footer-brand { font-weight: 700; margin-bottom: 0.25rem; opacity: 0.9; font-size: 0.95rem; }
.footer-info { font-size: 0.8rem; opacity: 0.6; margin-bottom: 0.5rem; }
.footer-contact { font-size: 0.85rem; opacity: 0.7; margin-bottom: 0.5rem; }
.footer-contact a { color: inherit; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-copy { font-size: 0.75rem; opacity: 0.4; }

/* 반응형 */
@media (max-width: 900px) {
    .main-wrapper { flex-direction: column; }
    .calculator-wrapper { width: 100%; position: static; max-width: 500px; margin: 0 auto; }
}
@media (max-width: 480px) {
    .main-wrapper { padding: 0.5rem; }
    .calculator-card { border-radius: 12px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); background: white; }
    .calculator-body { padding: 0.75rem; }
    .calculator-header { padding: 0.75rem; }
    .radio-card-group { grid-template-columns: 1fr 1fr; } /* 모바일에서도 가로배치 유지 */
    
    /* 버튼 그리드 모바일 */
    .button-grid { 
        grid-template-columns: 1fr 1fr; 
        grid-template-rows: auto auto; 
        grid-template-areas: 
            "share reset" 
            "calculate calculate"; 
        height: auto; 
    }
    .button-grid .btn { 
        padding: 12px 8px; 
        font-size: 0.8125rem; 
    }
    
    .result-total-value { font-size: 1.8rem; }
    .penalty-list { grid-template-columns: 1fr; }
    
    /* 추천 계산기 모바일 */
    .recommend-row { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
    .recommend-item { padding: 0.75rem 0.5rem; }
    .recommend-label { font-size: 0.65rem; }
    .recommend-link { font-size: 0.7rem; }
    
    /* 결과 액션 버튼 모바일 */
    .result-actions { gap: 0.4rem; }
    .result-btn { padding: 0.5rem 0.25rem; font-size: 0.65rem; }
}

/* 숫자 입력 화살표 제거 */
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* 토스트 메시지 */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 플로팅 Top 버튼 */
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.scroll-top-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .scroll-top-btn {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}