:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fb;
    --bg-tertiary: #f9fafb;
    --text-primary: #333333;
    --text-secondary: #6b7280;
    --text-tertiary: #4b5563;
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --global-nav-bg: #1e293b;
    --global-nav-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

/* 글로벌 네비게이션 */
.global-nav {
    background: var(--global-nav-bg);
    color: var(--global-nav-text);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.global-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1.5rem;
    height: 52px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--global-nav-text);
    text-decoration: none;
    margin-right: 2rem;
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--global-nav-text);
    font-size: 1.5rem;
    padding: 0.75rem 0.75rem 0.75rem 0.5rem;
    margin-right: 0.5rem;
    margin-left: 0;
    cursor: pointer;
    user-select: none;
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* 네비게이션 메뉴 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--global-nav-text);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 1rem 1.25rem;
    display: block;
    transition: all var(--transition-base);
    border-left: 1px solid rgba(255,255,255,0.1);
}

.nav-menu li:first-child a {
    border-left: none;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-menu .active {
    background: rgba(255,255,255,0.15);
    font-weight: 600;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1001;
    display: none;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    color: var(--text-primary);
    padding: 0.625rem 0.875rem;
    border: none;
    border-bottom: 1px solid var(--border-primary);
    font-size: 0.8125rem;
}

.nav-dropdown-content a:hover {
    background: var(--bg-tertiary);
}

.nav-dropdown-content a:last-child {
    border-bottom: none;
}

/* 모바일 메뉴 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 1100;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-primary);
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list > li {
    border-bottom: 1px solid var(--border-primary);
}

.mobile-menu-list > li > a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background var(--transition-base);
}

.mobile-menu-list > li > a:hover {
    background: var(--bg-tertiary);
}

.mobile-menu-list > li.active > a {
    color: var(--primary-color);
    background: #f0f7ff;
}

.mobile-menu-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-tertiary);
}

.mobile-menu-list ul li {
    border-top: 1px solid var(--border-primary);
}

.mobile-menu-list ul a {
    display: block;
    padding: 0.75rem 2.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.mobile-menu-list ul a:hover {
    color: var(--primary-color);
    background: var(--bg-primary);
}

/* 브레드크럼 */
.breadcrumb {
    background: var(--bg-primary);
    padding: 0.4375rem 0;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    margin: 0 0.4375rem;
    color: var(--text-secondary);
}

/* 메인 타이틀 섹션 */
.main-title-section {
    background: var(--bg-primary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-primary);
}

.main-title-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.main-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    line-height: 1.3;
}

.title-icon {
    font-size: 2rem;
    display: inline-block;
    animation: bounce 2s infinite;
}

.main-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
    line-height: 1.5;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* 메인 레이아웃 */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 1.75rem;
    padding: 1.75rem 1.5rem;
}

.calculator-wrapper {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 90px);
}

.calculator-card {
    background: var(--bg-primary);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
}

/* 계산기 헤더 */
.calculator-header {
    background: var(--bg-primary);
    padding: 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--border-primary);
}

.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-primary);
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.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-primary);
    font-weight: 500;
    white-space: nowrap;
    cursor: default;
    transition: all var(--transition-base);
}

.calculator-body {
    background: var(--bg-primary);
    padding: 0.875rem;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* 탭 스타일 */
.calculator-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 1.25rem;
    background: none;
    padding: 0;
    border-bottom: 1px solid var(--border-primary);
}

section[id] {
    scroll-margin-top: 80px;
}

.guide-section[id] {
    scroll-margin-top: 80px;
}

.tab-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 0.1875rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    gap: 2px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tab-button:hover {
    background: var(--bg-tertiary);
}

.tab-button.active {
    background: none;
}

.tab-button.active .tab-text-top {
    color: var(--primary-color);
    font-weight: 800;
}

.tab-button.active .tab-text-bottom {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-text-top {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.tab-text-bottom {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.2;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 폼 스타일 */
.form-row, .form-row-group {
    margin-bottom: 1rem;
}

.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
}

.form-col {
    display: flex;
    flex-direction: column;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    margin-bottom: 0.4375rem;
    line-height: 1.3;
}

input[type="text"],
input[type="number"],
input[type="date"],  
select {
    width: 100%;
    padding: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-primary);
    border-radius: 5px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition-base);
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 1.1em;
    padding-right: 2.25rem;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit input {
    padding-right: 3.5rem;
}

.unit-inline {
    position: absolute;
    right: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    pointer-events: none;
    font-size: 0.8125rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
}

/* 에러 메시지 스타일 */
.error-message {
    color: var(--danger-color);
    font-size: 0.6875rem;
    margin-top: 0.1875rem;
    display: none;
    line-height: 1.3;
}

.error-message.show {
    display: block;
}

/* 기존 버튼 그리드 (계산 전) */
.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: 80px;
}

/* 결과 버튼 그리드 (계산 후) - 차트 아래 위치 */
.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas: 
        "share excel"
        "share reset";
    gap: 6px;
    margin-top: 1rem;
    height: 80px;
}

.btn {
    border: 1px solid var(--border-primary);
    border-radius: 5px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 500;
    gap: 6px;
    padding: 0.625rem 0.875rem;
    min-height: 38px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    line-height: 1.3;
}

.btn:hover {
    border-color: var(--border-secondary);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn svg {
    width: 14px;
    height: 14px;
}

.share-btn {
    grid-area: share;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #ea580c;
}

.calculate-btn {
    grid-area: calculate;
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 600;
}

.calculate-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.reset-btn {
    grid-area: reset;
}

/* 결과 액션 버튼들 */
.result-share-btn {
    grid-area: share;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #ea580c;
}

.result-excel-btn {
    grid-area: excel;
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #16a34a;
}

.result-reset-btn {
    grid-area: reset;
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* 결과 영역 */
.result-container {
    margin-top: 0.875rem;
}

.result-card {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 0.875rem;
    border: 1px solid var(--border-primary);
    margin-bottom: 0.625rem;
}

.result-card h3 {
    font-size: 1rem;
    margin-bottom: 0.625rem;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.3;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 0.4375rem;
}

.result-total-top {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 8px;
    position: relative;
}

.total-label {
    display: block;
    font-size: 0.8125rem;
    opacity: 0.9;
    margin-bottom: 6px;
    word-break: keep-all;
    line-height: 1.3;
}

.total-amount {
    display: block;
    font-size: 1.625rem;
    font-weight: 700;
    word-break: keep-all;
    line-height: 1.2;
}

.total-subtitle {
    display: block;
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 6px;
    line-height: 1.3;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4375rem 0;
    border-bottom: 1px solid var(--border-primary);
    word-break: keep-all;
    font-size: 0.8125rem;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.primary {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 0;
}

.result-item.highlight {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.9375rem;
    font-weight: 700;
    border: none;
    word-break: keep-all;
}

.result-item.highlight .value {
    color: #1976d2;
    font-size: 1.25rem;
    line-height: 1.2;
}

.result-item span:first-child {
    margin-right: 0.875rem;
    flex-shrink: 0;
    line-height: 1.3;
}

.result-item span:last-child {
    text-align: right;
    flex-shrink: 0;
    line-height: 1.3;
}

/* 정보 박스 텍스트 줄바꿈 최적화 */
.info-box {
    word-break: keep-all;
    line-height: 1.5;
    font-size: 0.8125rem;
}

.info-box .amount {
    font-weight: 600;
}

/* 거치식 상환 정보 박스 스타일 */
.grace-info-box {
    background: #e0f2fe;
    border: 1px solid #3b82f6;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.4;
}

.grace-info-box .grace-detail {
    color: #1e40af;
    margin-bottom: 6px;
}

/* 동적 비교 순위 스타일 */
.rank-comparison {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #0ea5e9;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    text-align: center;
}

.rank-badge {
    display: inline-block;
    background: #0ea5e9;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 6px;
}

.rank-comparison-text {
    font-size: 0.8125rem;
    color: #0c4a6e;
    font-weight: 500;
}

/* 차트 컨테이너 */
.chart-container {
    margin: 1.25rem 0;
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 0.875rem;
    border: 1px solid var(--border-primary);
}

.chart-container h4 {
    font-size: 0.8125rem;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
    text-align: center;
    line-height: 1.3;
}

.chart-wrapper {
    position: relative;
    height: 180px;
}

/* 가이드 영역 */
.guide-wrapper {
    flex: 1;
    background: var(--bg-primary);
    border-radius: 14px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    min-height: 360px;
    min-width: 0;
}

.guide-content > h2 {
    font-size: 1.75rem;  /* 1.5rem → 1.75rem */
    font-weight: 700;     /* 추가 */
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.guide-section {
    margin-bottom: 2rem;
}

.guide-content > h3 {
    font-size: 1.5rem;  /* 1rem → 1.5rem */
    font-weight: 700;   /* 600 → 700 */
    color: #1f2937;     /* 더 진한 색상 */
    margin-top: 48px;   /* 추가 */
    margin-bottom: 24px;  /* 0.875rem → 24px */
    padding-bottom: 12px; /* 추가 */
    border-bottom: 2px solid #e5e7eb; /* 추가 */
    line-height: 1.3;
}

.guide-section h4 {
    font-size: 1.25rem;  /* 0.9375rem → 1.25rem */
    margin: 1.25rem 0 1rem;  /* 하단 마진 증가 */
    color: #374151;      /* 약간 더 진한 색상 */
    font-weight: 600;
    line-height: 1.3;
}

.guide-section h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 8px;
    line-height: 1.3;
}

.tip-card {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--border-primary);
}

.tip-list {
    list-style: none;
    padding: 0;
}

/* 모든 가이드 본문에 적용 */
.guide-section p,
.guide-section li {
    font-size: 0.875rem;  /* 0.8125rem → 0.875rem */
    line-height: 1.6;     /* 1.5 → 1.6 */
    color: #6b7280;
}

.tip-list li::before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* FAQ */
.faq-section {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-primary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.faq-item {
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-question {
    width: 100%;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-base);
    line-height: 1.4;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-icon {
    font-size: 1.125rem;
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: 0.875rem;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-slow);
    background: var(--bg-primary);
}

.faq-answer.active {
    padding: 0.875rem 1rem 1rem;
    max-height: 400px;
}

.faq-answer p {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* 공유 모달 스타일 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.share-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 0;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid var(--border-primary);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all var(--transition-base);
    line-height: 1;
}

.close-modal:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1.5rem;
}

.share-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    background: var(--bg-primary);
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
    text-decoration: none;
    min-height: 80px;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.share-button svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.share-button span {
    font-size: 0.8125rem;
    text-align: center;
    line-height: 1.2;
}

/* 플랫폼별 공유 버튼 색상 */
.share-button.facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.share-button.facebook:hover {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.share-button.twitter {
    border-color: #1d9bf0;
    color: #1d9bf0;
}

.share-button.twitter:hover {
    background: #1d9bf0;
    color: #fff;
    border-color: #1d9bf0;
}

.share-button.kakao {
    border-color: #fee500;
    color: #3a1d1d;
    background: #fffbeb;
}

.share-button.kakao:hover {
    background: #fee500;
    color: #3a1d1d;
    border-color: #fee500;
}

.share-button.naver {
    border-color: #03c75a;
    color: #03c75a;
}

.share-button.naver:hover {
    background: #03c75a;
    color: #fff;
    border-color: #03c75a;
}

.share-button.copy-link {
    grid-column: 1 / -1;
    flex-direction: row;
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(13, 110, 253, 0.04);
    min-height: 50px;
}

.share-button.copy-link:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 정보 메시지 스타일 */
.info-message {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    padding: 10px 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.8125rem;
    color: #0c4a6e;
    line-height: 1.4;
}

.info-message.warning {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #d97706;
}

.info-message.success {
    background: #d1fae5;
    border-color: #10b981;
    color: #059669;
}

/* DTI 분석 박스 스타일 */
.dti-analysis-box {
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
    border: 1px solid #3b82f6;
    padding: 16px;
    border-radius: 10px;
    margin: 16px 0;
    text-align: center;
}

.dti-badge {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.dti-comparison {
    display: flex;
    justify-content: space-around;
    margin-top: 12px;
    gap: 12px;
}

.dti-item {
    flex: 1;
    padding: 8px;
    background: white;
    border-radius: 6px;
}

.dti-item-title {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.dti-item-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
}

.dti-item-value.good {
    color: #059669;
}

.dti-item-value.bad {
    color: #dc2626;
}

/* 수수료 감면 정보 스타일 */
.fee-reduction-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
}

.fee-reduction-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 체증식 거치기간 정보 */
.step-grace-info {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 0.8125rem;
}

.step-grace-info .info-title {
    color: #d97706;
    font-weight: 600;
    margin-bottom: 6px;
}

.step-grace-detail {
    color: #92400e;
    line-height: 1.4;
}

/* =============== 모바일 대응 =============== */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    /* 모바일 메뉴 버튼 표시 */
    .mobile-menu-btn {
        display: block !important;
    }

    .nav-brand {
        margin-right: auto;
    }

    .nav-menu {
        display: none !important;
    }

    /* 메인 레이아웃 */
    .main-wrapper {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .calculator-wrapper {
        width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 1.5rem;
    }

    .calculator-card {
        height: auto;
        border-radius: 0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

    .guide-wrapper {
        border-radius: 0;
        padding: 1.25rem;
        margin-top: 0;
        border-top: 6px solid var(--bg-secondary);
    }

    /* 폼 조정 */
    .form-row-group {
        grid-template-columns: 1fr;
        gap: 0.4375rem;
    }

    .chart-wrapper {
        height: 140px;
    }

    /* 버튼 그리드 */
    .button-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "share reset"
            "calculate calculate";
        gap: 0.4375rem;
        margin-top: 1rem;
        height: auto;
    }

    .result-actions {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas: 
            "share"
            "excel"
            "reset";
        gap: 0.4375rem;
        height: auto;
    }

    /* 타이틀 조정 */
    .main-title {
        font-size: 1.5rem;
        flex-direction: row;
        gap: 0.4375rem;
    }

    .title-icon {
        font-size: 1.375rem;
    }

    .main-subtitle {
        font-size: 0.875rem;
    }

    .total-amount {
        font-size: 1.375rem;
    }

    .guide-content > h2 {
        font-size: 1.5rem;  /* 1.25rem → 1.5rem */
    }
    
    .guide-content > h3 {
        font-size: 1.25rem;  /* 추가 */
    }
    
    .guide-section h4 {
        font-size: 1.125rem;  /* 추가 */
    }
    
    .guide-section h5 {
        font-size: 0.9375rem;  /* 추가 */
    }

    /* 탭 텍스트 */
    .tab-text-top {
        font-size: 0.875rem;
    }

    .tab-text-bottom {
        font-size: 0.6875rem;
    }

    /* 모바일 공유 모달 */
    .share-modal-content {
        max-width: 350px;
        border-radius: 12px;
    }

    .share-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem;
        padding: 1.25rem;
    }

    .share-button {
        padding: 0.875rem 0.5rem;
        font-size: 0.75rem;
        min-height: 70px;
    }

    .share-button svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .share-button span {
        font-size: 0.75rem;
    }

    .share-button.copy-link {
        min-height: 45px;
        padding: 0.75rem 1rem;
    }

    .breadcrumb-container {
        padding: 0 1rem;
    }
}