/* ==========================================
   군인 계산기 공통 CSS
   - 네비게이션, 레이아웃, 폼, 버튼 등 공통 요소
   ========================================== */

@charset "UTF-8";

: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;
    
    /* 군인 테마 컬러 */
    --military-green: #4a5f4e;
    --military-gold: #fbbf24;
    --military-khaki: #8b7355;
    --tab-active-bg: #e8f5e9;
}

* {
    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.5rem;
    margin-right: 0.25rem; 
    cursor: pointer;
    user-select: none;
    min-width: 40px;
    min-height: 40px;
    -webkit-tap-highlight-color: transparent;
    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;
}

/* ==========================================
   브레드크럼
   ========================================== */
.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(--military-green);
}

.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.compact {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.625rem;
    border-bottom: 1px solid var(--border-primary);
}

.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;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--military-green);
    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;
}

.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: 4px;
    margin-bottom: 1.25rem;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 8px;
}

.tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.25rem;
    background: var(--bg-primary);
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    gap: 3px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.tab-link:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.tab-link.active {
    background: var(--tab-active-bg);
    box-shadow: 0 2px 8px rgba(74, 95, 78, 0.15);
}

.tab-link.active .tab-text-top {
    color: var(--military-green);
    font-weight: 800;
}

.tab-link.active .tab-text-bottom {
    color: var(--military-green);
    font-weight: 600;
}

.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;
}

/* ==========================================
   폼 스타일
   ========================================== */
.calculator-form {
    display: flex;
    flex-direction: column;
}

.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;
}

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:focus, select:focus {
    outline: none;
    border-color: var(--military-green);
    box-shadow: 0 0 0 2px rgba(74, 95, 78, 0.2);
}

/* 날짜 입력 스타일 */
.date-input-wrapper {
    position: relative;
}

.date-input {
    font-family: monospace;
    letter-spacing: 1px;
}

/* 체크박스 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.8125rem;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* 에러 메시지 */
.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 pdf"
        "share calculate";
    gap: 6px;
    margin-top: 1.25rem;
    height: 80px;
}

/* 계산 결과 후 3개 버튼 레이아웃 */
.button-grid.after-calculation {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas: none;
    gap: 6px;
    height: auto;
}

.button-grid.after-calculation .btn {
    grid-area: unset;
}

/* 계산 결과 후 결과복사 버튼 - 올리브색 */
.after-calculation .copy-btn,
.after-calculation .pdf-btn {
    background: #4a5f4e;  /* 진한 올리브색(국방색) */
    border-color: #3a4f3e;
    color: white;
}

.after-calculation .copy-btn:hover,
.after-calculation .pdf-btn:hover {
    background: #3a4f3e;
    border-color: #2a3f2e;
    color: white;
}

.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(--military-green);
    color: #fff;
    border-color: var(--military-green);
    font-weight: 600;
}

.calculate-btn:hover {
    background: #3a4f3e;
    border-color: #3a4f3e;
}

.reset-btn,
.pdf-btn {
    grid-area: pdf;
    background: #fef3c7;
    border-color: #fde68a;
    color: #d97706;
}

.pdf-btn:hover,
.reset-btn:hover {
    background: #fde68a;
}

.copy-btn {
    background: #4a5f4e !important;  /* 진한 올리브색 */
    border-color: #3a4f3e !important;
    color: white !important;
}
.copy-btn:hover {
    background: #3a4f3e !important;  /* 호버시 더 진한색 */
    border-color: #2a3f2e !important;
}


/* ==========================================
   결과 표시
   ========================================== */
.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-total-top {
    background: linear-gradient(135deg, var(--military-green), #3a4f3e);
    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;
}

/* ==========================================
   정보 메시지
   ========================================== */
.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;
}

/* ==========================================
   차트 컨테이너
   ========================================== */
.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;
}

/* 막대 차트 스타일 */
.comparison-chart {
    margin-top: 15px;
}

.chart-item {
    margin-bottom: 15px;
}

.chart-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.chart-bar-wrapper {
    position: relative;
    background: var(--bg-tertiary);
    height: 30px;
    border-radius: 5px;
    overflow: hidden;
}

.chart-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--military-green), #5a7f5e);
    border-radius: 5px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    padding-left: 10px;
}

.chart-bar span {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.chart-bar.current {
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

/* ==========================================
   가이드 영역
   ========================================== */
.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;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.guide-section {
    margin-bottom: 2rem;
}

.guide-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    line-height: 1.3;
}

.guide-section h4 {
    font-size: 1.25rem;
    margin: 1.25rem 0 1rem;
    color: #374151;
    font-weight: 600;
    line-height: 1.3;
}

/* 테이블 스타일 */
.salary-table {
   width: 100%;
   border-collapse: collapse;
   margin: 20px 0;
}
.salary-table th {
   padding: 12px;
   text-align: left;
   background: #2c5530;
   color: white;
   border-bottom: 2px solid #ddd;
   font-weight: 600;
}
.salary-table td {
   padding: 12px;
   border-bottom: 1px solid #eee;
}

/* ==========================================
   공유 모달
   ========================================== */
.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);
}

.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.kakao {
    border-color: #fee500;
    color: #3a1d1d;
    background: #fffbeb;
}

.share-button.facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.share-button.twitter {
    border-color: #1DA1F2;
    color: #1DA1F2;
}

.share-button.blog {
    border-color: #03c75a;
    color: #03c75a;
}

.share-button.copy-link {
    grid-column: 1 / -1;
    flex-direction: row;
    border-color: var(--military-green);
    color: var(--military-green);
    background: rgba(74, 95, 78, 0.04);
    min-height: 50px;
}

/* ==========================================
   모바일 메뉴
   ========================================== */
.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-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;
}

.mobile-menu-nav {
    padding: 1rem 0;
}

.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-nav > ul > li {
    border-bottom: 1px solid var(--border-primary);
}

.mobile-menu-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background var(--transition-base);
}

.mobile-menu-nav a:hover {
    background: var(--bg-tertiary);
}

.mobile-menu-nav ul ul {
    background: var(--bg-tertiary);
}

.mobile-menu-nav ul ul a {
    padding-left: 2.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* 토스트 메시지 */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 툴팁 */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    font-size: 0.75rem;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 복무 상태 표시 */
.service-status {
    background: var(--bg-tertiary);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.service-status.active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

/* ==========================================
   반응형 디자인
   ========================================== */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    .global-nav-container {
        padding: 0 0.75rem;
    }
    
    .mobile-menu-btn {
        display: block !important;
        margin-right: 0.5rem;
        padding: 0.5rem 0.25rem;
    }
    
    .nav-brand {
        margin-right: auto;
        font-size: 1rem;
    }
    
    .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 h2,
    .guide-content > h2 {
        font-size: 18px;
        white-space: nomal;
        word-break: keep-all;  /* 한글 단어 단위 줄바꿈 추가 */
        line-height: 1.3;  /* 줄 간격 추가 */
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 텍스트 가독성 개선 */
    .guide-section p,
    .guide-section li {
        word-break: keep-all;
        line-height: 1.7;
    }
   
    .guide-wrapper {
        border-radius: 0;
        padding: 1.25rem;
        margin-top: 0;
        border-top: 6px solid var(--bg-secondary);
    }

     table td, table th {
        padding: 10px 8px;
        font-size: 13px;
    }
   
    /* 모바일에서도 가로 배치 유지 */
    .form-row-group {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .chart-wrapper {
        height: 140px;
    }
    
    .button-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "share pdf"
            "calculate calculate";
        gap: 0.4375rem;
        margin-top: 1rem;
        height: auto;
    }
    
    .main-title {
        font-size: 1.5rem;
        flex-direction: row;
        gap: 0.4375rem;
    }
    
    .title-icon {
        font-size: 1.375rem;
    }
    
    .total-amount {
        font-size: 1.375rem;
    }
    
    .tab-text-top {
        font-size: 0.875rem;
    }
    
    .tab-text-bottom {
        font-size: 0.6875rem;
    }
    
    /* 탭 스타일 모바일 조정 */
    .calculator-tabs {
        gap: 2px;
        padding: 2px;
    }
    
    .tab-link {
        padding: 0.625rem 0.125rem;
    }
}