* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f9fafb;
    color: #1f2937;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.calc-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
}

.calc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.calc-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

.calc-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-primary {
    width: 100%;
}

.btn-back {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.calculator-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.result-box {
    margin-top: 2rem;
    padding: 2rem;
    background: #f0f9ff;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
}

.result-box h3 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item strong {
    color: #2563eb;
    font-size: 1.2rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 검색창 ===== */
.search-container {
    max-width: 700px;
    margin: 0 auto 3rem;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 6px 30px rgba(37, 99, 235, 0.2);
}

.search-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: transparent;
}

#searchInput::placeholder {
    color: #9ca3af;
}

/* ===== 자동완성 드롭다운 ===== */
.autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f9fafb;
}

.autocomplete-item .calc-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.autocomplete-item .calc-info {
    flex: 1;
}

.autocomplete-item .calc-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.autocomplete-item .calc-name strong {
    color: #2563eb;
    background: #eff6ff;
    padding: 0 0.25rem;
    border-radius: 4px;
}

.autocomplete-item .calc-category {
    font-size: 0.875rem;
    color: #6b7280;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

/* ===== 카테고리 탭 ===== */
.category-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.category-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* ===== 카테고리 섹션 ===== */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.75rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #e5e7eb;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.calc-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-align: center;
}

.calc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.calc-icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.calc-card h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.no-results-large {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
    font-size: 1.25rem;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    .search-box {
        padding: 0.75rem 1rem;
    }
    
    #searchInput {
        font-size: 1rem;
    }
    
    .category-tabs {
        gap: 0.5rem;
    }
    
    .category-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
}

/* ===== 공통 헤더 (계산기 페이지용) ===== */
.main-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
}

.logo {
    font-size: 1.5rem;
    color: #2563eb;
    margin: 0;
    transition: transform 0.2s;
}

.logo-link:hover .logo {
    transform: scale(1.05);
}

.header-nav {
    display: flex;
    gap: 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.nav-link:hover {
    background: #2563eb;
    color: white;
}

.bookmark-btn {
    background: #fef3c7;
    color: #92400e;
}

.bookmark-btn:hover {
    background: #fbbf24;
    color: #78350f;
}

.nav-icon {
    font-size: 1.1rem;
}

.nav-text {
    font-size: 0.9rem;
}

/* ===== 계산기 헤더 ===== */
.calculator-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    text-align: center;
    padding: 2rem 2rem;
}

.calculator-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.calculator-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* ===== 반응형 (모바일) ===== */
@media (max-width: 768px) {
    /* 모바일에서는 헤더 고정 해제! */
    .main-header {
        position: relative;  /* sticky → relative */
    }
    
    .header-content {
        padding: 0.5rem 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-link {
        padding: 0.4rem 0.5rem;
        gap: 0;
    }
    
    .nav-icon {
        font-size: 1.1rem;
    }
    
    .calculator-header {
        padding: 1.25rem 1rem;
    }
    
    .calculator-title {
        font-size: 1.5rem;
    }
    
    .calculator-desc {
        font-size: 0.85rem;
    }
}



/* ===== 즐겨찾기 알림창 ===== */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s;
}

.custom-alert.fade-out {
    animation: fadeOut 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.custom-alert-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-alert-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.custom-alert-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.custom-alert-close {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-alert-close:hover {
    background: #1d4ed8;
}

/* ===== select 입력 ===== */
.select-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-input:focus {
    outline: none;
    border-color: #2563eb;
}

/* ===== 결과 섹션 ===== */
.result-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.result-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-section h4 {
    color: #2563eb;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.result-section.highlight {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #2563eb;
}

.result-item.total {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid #2563eb;
    font-weight: 700;
}

.result-item.large strong {
    font-size: 1.75rem;
    color: #2563eb;
}

/* ===== D-Day 디스플레이 ===== */
.dday-display {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.dday-number {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
}

.dday-text {
    font-size: 1.25rem;
    color: white;
    opacity: 0.9;
}

/* ===== BMI 디스플레이 ===== */
.bmi-display {
    text-align: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.bmi-number {
    font-size: 3rem;
    font-weight: 900;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.bmi-status {
    font-size: 1.5rem;
    font-weight: 700;
}

.bmi-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.bmi-info h4 {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.bmi-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bmi-info li {
    padding: 0.5rem 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.result-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.result-info p {
    margin: 0;
    color: #1e40af;
    font-weight: 600;
}

/* ==========================================
   면책 문구 (Disclaimer) 섹션
========================================== */
.disclaimer {
    margin-top: 2.5rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    border: 2px solid #ffd54f;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.disclaimer h4 {
    color: #f57c00;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.disclaimer ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.disclaimer ul li {
    padding: 0.6rem 0;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.7;
    color: #424242;
    font-size: 0.95rem;
}

.disclaimer ul li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #f57c00;
    font-weight: bold;
    font-size: 1.2rem;
}

.disclaimer strong {
    color: #d84315;
    font-weight: 600;
}

/* 참고자료 링크 */
.reference-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ffe082;
}

.reference-links h5 {
    color: #e65100;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.reference-links ul {
    margin: 0;
}

.reference-links ul li {
    padding: 0.5rem 0;
    padding-left: 0;
}

.reference-links ul li:before {
    content: "→";
    left: 0;
    color: #1976d2;
}

.reference-links li a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding-left: 1.5rem;
}

.reference-links li a:hover {
    color: #0d47a1;
    text-decoration: underline;
    padding-left: 2rem;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .disclaimer {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .disclaimer h4 {
        font-size: 1.05rem;
    }
    
    .disclaimer ul li {
        font-size: 0.9rem;
        padding-left: 1.5rem;
    }
    
    .reference-links h5 {
        font-size: 1rem;
    }
    
    .reference-links li a {
        font-size: 0.9rem;
    }
}

/* 다크모드 대응 (선택사항) */
@media (prefers-color-scheme: dark) {
    .disclaimer {
        background: linear-gradient(135deg, #332800 0%, #3d2f00 100%);
        border-color: #8d6e00;
    }
    
    .disclaimer h4 {
        color: #ffb74d;
    }
    
    .disclaimer ul li {
        color: #e0e0e0;
    }
    
    .disclaimer strong {
        color: #ff8a65;
    }
    
    .reference-links {
        border-top-color: #5d4a00;
    }
    
    .reference-links h5 {
        color: #ffa726;
    }
    
    .reference-links li a {
        color: #64b5f6;
    }
    
    .reference-links li a:hover {
        color: #90caf9;
    }
}

/* ==========================================
   상환 스케줄 테이블
========================================== */
.schedule-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.schedule-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #1e293b;
}

.btn-toggle {
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
}

.btn-toggle:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.btn-toggle #toggleIcon {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.table-scroll {
    overflow-x: auto;
    margin: 1rem 0;
}

.schedule-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.schedule-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.schedule-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.schedule-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #475569;
}

.schedule-table td.amount {
    text-align: right;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 500;
}

.schedule-table tbody tr:hover {
    background: #f8fafc;
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
}

.schedule-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.btn-secondary {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .schedule-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .schedule-table th:nth-child(2),
    .schedule-table td:nth-child(2) {
        display: none; /* 모바일에서 날짜 숨김 */
    }
    
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   빠른 계산 버튼
========================================== */
.quick-calc-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.quick-calc-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #1e293b;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-quick {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-quick:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-quick:active {
    transform: translateY(0);
}

/* D-Day 결과 강조 */
.result-section.highlight #ddayValue {
    font-size: 2.5rem;
    color: #667eea;
    font-weight: 700;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .quick-buttons {
        flex-direction: column;
    }
    
    .btn-quick {
        width: 100%;
        min-width: auto;
    }
    
    .result-section.highlight #ddayValue {
        font-size: 2rem;
    }
}

/* ==========================================
   BMI 게이지
========================================== */
.bmi-gauge {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.gauge-bar {
    position: relative;
    height: 40px;
    margin-bottom: 0.5rem;
}

.gauge-sections {
    display: flex;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gauge-section {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.gauge-section.underweight {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.gauge-section.normal {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.gauge-section.overweight {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.gauge-section.obese {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.gauge-section::after {
    content: attr(data-label);
}

.gauge-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #1e293b;
    transition: left 0.5s ease;
}

.gauge-pointer::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 35px;
    background: #1e293b;
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 5%;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* BMI 정보 박스 */
.bmi-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
}

.bmi-info h4 {
    margin: 0 0 0.75rem 0;
    color: #1e40af;
    font-size: 1.1rem;
}

.bmi-info p {
    margin: 0;
    line-height: 1.7;
    color: #1e293b;
}

/* BMI 기준표 */
.bmi-table-section {
    margin-top: 2rem;
}

.bmi-table-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #1e293b;
}

.bmi-reference-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bmi-reference-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bmi-reference-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.bmi-reference-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #475569;
}

.bmi-reference-table tbody tr:last-child td {
    border-bottom: none;
}

.bmi-reference-table tbody tr:hover {
    background: #f8fafc;
}

/* 행 색상 구분 */
.underweight-row td:first-child {
    border-left: 4px solid #3b82f6;
    font-weight: 600;
}

.normal-row td:first-child {
    border-left: 4px solid #10b981;
    font-weight: 600;
}

.overweight-row td:first-child {
    border-left: 4px solid #f59e0b;
    font-weight: 600;
}

.obese1-row td:first-child,
.obese2-row td:first-child {
    border-left: 4px solid #ef4444;
    font-weight: 600;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .gauge-section::after {
        font-size: 0.65rem;
    }
    
    .gauge-labels {
        font-size: 0.75rem;
    }
    
    .bmi-reference-table th,
    .bmi-reference-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .bmi-info {
        padding: 1.25rem;
    }
}

/* ==========================================
   월세 비교 섹션
========================================== */
.comparison-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 2px solid #0ea5e9;
}

.comparison-section h4 {
    margin: 0 0 0.5rem 0;
    color: #0c4a6e;
    font-size: 1.1rem;
}

.comparison-desc {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.comparison-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comparison-item span {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.comparison-item strong {
    display: block;
    font-size: 1.1rem;
    color: #0f172a;
}

.comparison-item.highlight-compare {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
}

.comparison-item.highlight-compare span,
.comparison-item.highlight-compare strong {
    color: white;
}

.comparison-note {
    margin: 1rem 0 0 0;
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
}

/* 추천 박스 */
.recommendation-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.recommendation-box h4 {
    margin: 0 0 0.75rem 0;
    color: #92400e;
    font-size: 1.1rem;
}

.recommendation-box p {
    margin: 0;
    line-height: 1.7;
    color: #1e293b;
    font-weight: 500;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-section {
        padding: 1.25rem;
    }
    
    .recommendation-box {
        padding: 1.25rem;
    }
}



/* ==========================================
   계산기 상단 설명 박스
========================================== */
.calc-intro {
    max-width: 600px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border-left: 4px solid #2563eb;
    border-radius: 12px;
}

.calc-intro h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: #1e40af;
}

.calc-intro p {
    margin: 0;
    line-height: 1.8;
    color: #1e293b;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .calc-intro {
        margin: 1.5rem 1rem 0;
        padding: 1.25rem 1.5rem;
    }

    .calc-intro h3 {
        font-size: 1rem;
    }

    .calc-intro p {
        font-size: 0.9rem;
    }
}


/* ==========================================
   모바일 결과 영역 개선
========================================== */
@media (max-width: 768px) {
    /* 계산기 컨테이너 패딩 축소 */
    .calculator-container {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }

    /* 결과 박스 패딩 축소 */
    .result-box {
        padding: 1.25rem;
    }

    /* 메인 결과 - 세로 배치 */
    .result-section.highlight {
        padding: 1.25rem;
    }

    .result-item.large {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.25rem;
    }

    .result-item.large span {
        font-size: 0.9rem;
        color: #6b7280;
    }

    .result-item.large strong {
        font-size: 1.5rem;
    }

    /* 일반 결과 항목 - 세로 배치 */
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .result-item span {
        font-size: 0.85rem;
        color: #6b7280;
    }

    .result-item strong {
        font-size: 1.05rem;
    }

    /* 비교 섹션 */
    .comparison-section {
        padding: 1rem;
    }

    .comparison-section h4 {
        font-size: 1rem;
    }

    .comparison-desc {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    /* 추천 박스 */
    .recommendation-box {
        padding: 1.25rem;
    }

    .recommendation-box h4 {
        font-size: 1rem;
    }

    .recommendation-box p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* 면책 문구 텍스트 간격 */
    .disclaimer ul li {
        line-height: 1.8;
        padding-left: 1.25rem;
    }

    /* 설명 박스 */
    .calc-intro {
        margin: 1rem 0.5rem 0;
        padding: 1.25rem;
    }

    .calc-intro p {
        font-size: 0.88rem;
        line-height: 1.8;
    }
}

/* ==========================================
   참고자료 링크 모바일 개선
========================================== */
@media (max-width: 768px) {
    .reference-links ul li {
        display: flex;
        align-items: flex-start;
        padding-left: 0;
    }

    .reference-links ul li:before {
        content: "→";
        position: relative;
        left: 0;
        margin-right: 0.5rem;
        flex-shrink: 0;
    }

    .reference-links li a {
        padding-left: 0;
        font-size: 0.88rem;
        word-break: keep-all;
    }

    .reference-links li a:hover {
        padding-left: 0;
    }
}

/* ==========================================
   메인 헤더 즐겨찾기 버튼
========================================== */
.main-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.btn-bookmark-main {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-bookmark-main:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .btn-bookmark-main {
        font-size: 0.85rem;
        padding: 0.5rem 1.25rem;
    }
}

/* ==========================================
   퇴직금 계산기 추가 스타일
========================================== */
.salary-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toggle-section {
    margin: 1.25rem 0;
    text-align: center;
}

.btn-toggle {
    background: none;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: #6b7280;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-toggle:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.extra-inputs {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.input-help {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.info-box {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.info-box.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.info-box.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.highlight-row {
    background: #eff6ff !important;
    font-weight: 600;
}

.highlight-row td {
    color: #2563eb;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.rate-table th, .rate-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.rate-table th {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
}

.rate-table tbody tr:hover {
    background: #f9fafb;
}

@media (max-width: 768px) {
    .salary-inputs {
        gap: 0.5rem;
    }
    .extra-inputs {
        padding: 1rem;
    }
    .btn-toggle {
        font-size: 0.88rem;
        padding: 0.6rem 1rem;
    }
    .rate-table th, .rate-table td {
        padding: 0.5rem 0.5rem;
        font-size: 0.82rem;
    }
}

/* ==========================================
   섹션 타이틀 아래 간격 보강
========================================== */
.section-title {
    margin-bottom: 1rem;
}

.section-title + .input-group {
    margin-top: 0.5rem;
}


/* ==========================================
   SEO 설명 텍스트 영역
========================================== */
.seo-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
    line-height: 1.8;
}

.seo-content h3 {
    font-size: 1.2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.seo-content h4 {
    font-size: 1.05rem;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.seo-content p {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .seo-content {
        margin: 1rem 0.5rem;
        padding: 1.25rem;
    }
    .seo-content h3 { font-size: 1.1rem; }
    .seo-content h4 { font-size: 1rem; }
    .seo-content p { font-size: 0.9rem; }
}

