/* main.css */

/* 글로벌 네비게이션 스타일 추가 */
.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;
}

/* 네비게이션 메뉴 */
.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-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;
}

/* 브레드크럼 스타일 덮어쓰기 */
.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-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); }
}

/* 계산기 헤더 compact 스타일 추가 */
.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;
    flex-direction: row;
    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: #3b82f6;
    color: white;
    font-weight: 700;
    font-size: 11px;
}

.author-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;  /* 한 줄로 유지 */
}

.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);
    flex-shrink: 0;  /* 크기 유지 */
}

/* 히어로 섹션 제거 */
.hero-section {
    display: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", 
               "Segoe UI", "Malgun Gothic", Roboto, "Noto Sans KR", 
               "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  touch-action: pan-y;
  /* font-display: swap; 삭제 - 시스템 폰트에는 불필요 */
}

/* 입력 필드 기본 스타일 */
input, select, textarea {
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

button, a, .btn {
  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.875rem;
  font-weight: 500;
  padding: 1rem 1.5rem;
  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 {
  display: none;
}

.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: 200px;
  z-index: 1001;
  display: none;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

.nav-dropdown-content a {
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 1px solid var(--border-primary);
}

.nav-dropdown-content a:hover {
  background: var(--bg-tertiary);
}

.nav-dropdown-content a:last-child {
  border-bottom: none;
}

/* 브레드크럼 추가 스타일 */
.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.5rem;
  color: var(--text-secondary);
}

/* 스크롤바 디자인 */
.calculator-body::-webkit-scrollbar {
  width: 6px;
}

.calculator-body::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.calculator-body::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 3px;
}

.calculator-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* FAQ 섹션 스타일 */
.faq-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.faq-section h2 {
  font-size: 2rem;
  color: #1f2937;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 700;
}

.faq-item {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.faq-item h3 {
  font-size: 1.125rem;
  color: #1f2937;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.faq-item p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

/* 폼 레이아웃 */
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.form-row-split {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: flex-end;
}

.split-left, .split-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 라벨 스타일 */
label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-size: 0.875rem;
  min-height: 21px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.label-with-error {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  min-height: 21px;
}

.label-with-error label {
  margin-bottom: 0;
}

/* 입력 필드 스타일 */
input, select {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  transition: border-color 0.2s ease;
  height: 48px;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

input.error, select.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* 날짜 입력 필드 */
.date-input-container {
  position: relative;
  width: 100%;
}

.date-input {
  width: 100%;
  padding: 0.75rem;
  padding-right: 2.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  transition: border-color 0.2s ease;
  height: 48px;
  cursor: text;
}

.date-input::placeholder {
  color: #999;
}

/* 달력 아이콘 */
.calendar-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  cursor: pointer;
  font-size: 1rem;
  pointer-events: auto;
  z-index: 2;
}

.calendar-icon:hover {
  color: #0d6efd;
}

.calendar-icon svg {
  width: 16px;
  height: 16px;
}

/* 커서 깜빡임 효과 */
.cursor-blink {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background-color: #333;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.cursor-blink.active {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 내국인 버튼 그룹 */
.nationality-buttons {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ccc;
  height: 50px;
}

.nationality-buttons input[type="radio"] {
  display: none;
}

.nationality-buttons label {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  background: white;
  border: none;
  margin: 0;
  font-weight: normal;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}

.nationality-buttons label:first-child {
  border-right: 1px solid #ccc;
}

.nationality-buttons label:hover {
  background: #f8f9fa;
}

.nationality-buttons input[type="radio"]:checked + label {
  background: #0d6efd;
  color: white;
}

/* 보육시설 선택 */
.care-select-container {
  display: flex;
  gap: 0;
  align-items: center;
  width: 100%;
}

#careUsage {
  flex: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

#careUsage.compressed {
  flex: 0 0 auto;
  width: 120px;
}

.care-month-compact {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-left: 0;
}

.care-month-compact.expanded {
  width: calc(100% - 132px);
  opacity: 1;
  margin-left: 12px;
}

.care-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.care-divider {
  color: #ccc;
  font-weight: bold;
}

.care-month-compact input {
  flex: 1;
  min-width: 140px;
  font-size: 0.9rem;
  padding: 0.6rem;
  height: 50px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* 툴팁 */
.tooltip-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #0d6efd;
  padding: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tooltip-btn:hover {
  color: #0b5ed7;
}

.tooltip-btn svg {
  width: 16px;
  height: 16px;
}

.tooltip-text {
  display: none;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.tooltip-text.visible {
  display: block;
}

/* 오류 메시지 */
.error-message {
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: #dc3545;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease-out;
}

.error-message.show {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
}

.label-with-error .error-message {
  order: 1;
  font-size: 0.7rem !important;
}

.form-row .error-message {
  margin-top: 0.25rem;
  display: none;
}

/* 구분선 (놓친 수당 찾아보기) */
.divider {
  margin: 30px 0 20px 0;
  position: relative;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-primary);
}

.divider-content {
  background: white;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 8px 16px;
  color: #2c3e50;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  margin-right: auto;
}

.divider-content:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-secondary);
  color: #374151;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.arrow-icon {
  transition: transform 0.2s ease;
}

.divider-content.expanded .arrow-icon {
  transform: rotate(180deg);
}

/* 상세 입력 섹션 */
.detail-section {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.detail-section.expanded {
  max-height: 500px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-item label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-size: 0.875rem;
}

.detail-item select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s ease;
}

/* 버튼 그룹 */
.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: 
    "share reset"
    "share calculate";
  gap: 8px;
  height: 100px;
  margin-top: 30px;
}

.button-grid-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.btn {
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  font-family: inherit;
  gap: 8px;
  padding: 0.75rem 1rem;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:hover {
  border-color: var(--border-secondary);
  background: var(--bg-tertiary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.share-btn {
  grid-area: share;
  background: #fff7ed;
  border-color: #fed7aa;
  color: #ea580c;
}

.share-btn:hover {
  background: #ffedd5;
  border-color: #fdba74;
  color: #dc2626;
}

.calculate-btn {
  grid-area: calculate;
  background: var(--primary-color);
  color: white;
  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;
}

/* 가이드 래퍼 */
.guide-wrapper > h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* 결과 영역 스타일 */
#resultCard {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#resultCard h2 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

#resultCard h3 {
  margin-top: 0;
  color: #2c3e50;
  font-size: 1.5rem;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.result-item {
  padding: 1rem;
  margin: 0.75rem 0;
  border-radius: 6px;
  background: #f8f9fa;
  border-left: 4px solid #0d6efd;
  transition: transform 0.2s ease;
}

.result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.result-header .amount {
  font-size: 1.2rem;
  color: #2563eb;
  font-weight: 700;
}

.result-detail h4 {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.payment-list {
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.8;
}

.payment-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.payment-list li {
  margin-bottom: 0.2rem;
  position: relative;
  padding-left: 0;
}

/* 계산 근거 */
.calculation-basis {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

.calculation-basis h5 {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.calculation-basis p {
  font-size: 0.8rem;
  color: #4b5563;
  margin: 0.3rem 0;
  padding-left: 0.6rem;
  text-indent: -0.6rem;
  word-break: keep-all;
  line-height: 1.6;
  word-spacing: -0.05em;
  overflow-wrap: break-word;
}

/* 추가 혜택 섹션 */
.additional-benefits {
  background: #e0f2fe;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.additional-benefits h3 {
  font-size: 1rem;
  color: #0369a1;
  margin-bottom: 0.5rem;
  margin-top: 0;
  background: none;
  padding: 0;
  text-align: left;
}

.additional-benefits .benefit-list ul {
  list-style: none;
  padding-left: 0;
}

.additional-benefits .benefit-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.additional-benefits .benefit-list li:last-child {
  border-bottom: none;
}

.additional-benefits .benefit-list p {
  font-size: 0.9rem;
  color: #374151;
  margin: 0.5rem 0;
  line-height: 1.6;
}

.inline-link {
  display: block;
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 0;
}

.inline-link:hover {
  text-decoration: underline;
}

/* 경고 메시지 */
.warning-messages {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.warning-messages h3 {
  font-size: 0.95rem;
  color: #856404;
  margin-bottom: 0.5rem;
  margin-top: 0;
  background: none;
  padding: 0;
  text-align: left;
}

.warning-messages ul {
  margin: 0;
  padding-left: 1.5rem;
  font-size: 0.85rem;
}

.warning-messages li {
  margin-bottom: 0.3rem;
  color: #856404;
}

/* 총액 표시 */
.total-amount-small {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #e5e7eb;
  font-size: 1.1rem;
  color: #374151;
  font-weight: 600;
}

/* 공유 팝업 스타일 */
.share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: none;
}

.share-overlay.active {
  opacity: 1;
  visibility: visible;
  display: block;
}

.share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 360px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
}

.share-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
  display: block;
}

.share-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  text-align: center;
}

.share-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.share-icons .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: visible;
}

.share-icons .icon .icon-text {
  font-size: 32px;
  font-weight: bold;
  line-height: 1;
  color: white;
}

.share-icons .icon.facebook .icon-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 36px;
  font-weight: bold;
}

.share-icons .icon.x .icon-text {
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 900;
  font-size: 30px;
}

.share-icons .icon.kakao {
  background: #fee500;
}

.share-icons .icon.kakao svg {
  width: 32px;
  height: 32px;
}

.share-icons .icon.naver .icon-text {
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 900;
  font-size: 32px;
}

.share-icons .icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.share-icons .icon.facebook { background: #1877f2; }
.share-icons .icon.x { background: #000; }
.share-icons .icon.naver { background: #03c75a; color: white; }

.share-link-section {
  border-top: 1px solid #eee;
  padding-top: 16px;
}

.share-link-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

#shareLinkInput {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #f8f9fa;
  color: #666;
}

.copy-btn {
  padding: 10px 16px;
  border: none;
  background: #4285f4;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: #3367d6;
}

.copy-btn.copied {
  background: #34a853;
}

/* 가이드 콘텐츠 스타일 */
.guide-section {
  margin-bottom: 2.5rem;
}

.guide-section h2 {
  font-size: clamp(0.95rem, 3vw, 1.5rem);
  word-break: keep-all;
  color: #1f2937;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.guide-section h3 {
  font-size: clamp(0.85rem, 2.5vw, 1.125rem);
  word-break: keep-all;
  color: #374151;
  margin: 1.75rem 0 0.875rem;
  font-weight: 600;
}

.guide-section p {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.guide-section ul {
  margin-left: 1.5rem;
  color: #4b5563;
  line-height: 1.75;
}

.guide-section li {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.info-box {
  background: #f0f9ff;
  border-left: 4px solid #2563eb;
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.warning-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  overflow: hidden;
  font-size: 1rem;
}

th, td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

tr:hover {
  background: #f9fafb;
  transition: background 0.2s;
}

/* 가이드 요약 스타일 */
.guide-summary {
  padding: 2rem;
}

.guide-summary h2 {
  font-size: 1.5rem;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.key-points {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.point-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  transition: all 0.2s;
}

.point-item:hover {
  background: #f3f4f6;
  transform: translateX(5px);
}

.point-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.point-content {
  flex: 1;
}

.point-content strong {
  display: block;
  font-size: 1rem;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.point-content p {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: #2563eb;
  border: 2px solid #2563eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin: 1.5rem auto 0;
  display: flex;
  width: auto;
}

.show-more-btn:hover {
  background: #2563eb;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.show-more-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.show-more-btn:hover svg {
  transform: translateY(2px);
}

/* 목차 스타일 */
.table-of-contents {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.table-of-contents h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: #374151;
  font-weight: 600;
  margin-top: 0;
}

.toc-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-nav li {
  margin-bottom: 0.25rem;
}

.toc-nav a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 0.2rem 0;
  font-size: 0.95rem;
}

.toc-nav a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* 실화 섹션 스타일 */
.real-story-intro {
  background: #fef3c7;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.mom-story {
  background: #f9fafb;
  border-left: 4px solid #f59e0b;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  transition: transform 0.2s;
}

.mom-story:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mom-story h4 {
  color: #dc2626;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.mom-story p {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

/* 외부 링크 버튼 */
.external-links {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.external-links h3 {
  font-size: 1.125rem;
  color: #374151;
  margin-bottom: 1rem;
  font-weight: 600;
}

.link-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

.link-btn:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* 모바일 메뉴 */
.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-btn,
.mobile-menu-close,
.mobile-menu-overlay {
  -webkit-tap-highlight-color: transparent;
}

.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-header button {
  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-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);
}

/* 반응형 디자인 */
@media (max-width: 768px) {

  * {
    animation-duration: 0.3s !important;
    transition-duration: 0.3s !important;
  }
  
  /* 그림자 효과 간소화 */
  .calculator-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
  
  /* hover 효과 제거 (터치 디바이스) */
  @media (hover: none) {
    .btn:hover,
    .result-item:hover,
    .point-item:hover {
      transform: none !important;
      box-shadow: none !important;
    }
  }

  body {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
  }

  .global-nav-container {
    padding: 0 1rem 0 0.5rem;
  }

  .nav-brand {
    font-size: 1.125rem;
    margin-right: 1rem;
  }
  .nav-menu {
    display: none;
  }
  
  .nav-dropdown,
  .nav-dropdown-content {
    display: nonet;
  }

  .breadcrumb-container {
    padding: 0 1rem;
  }

  /* 메인 타이틀 모바일 */
  .main-title-section {
    padding: 1.5rem 0;
  }
  
  /* 계산기 헤더 - 모바일 세로 배치 */
  .calculator-header.compact {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    flex-wrap: nowrap !important; /* 줄바꿈 강제 방지 */
    width: 100%;
  }
  
  /* 작성자 정보 최적화 */
  .author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 0;
  }
  
  /* 작성자 이름 말줄임 처리 */
  .author-name {
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px; /* 최대 너비 제한 */
  }
  
  /* 업데이트 뱃지 최적화 */
  .update-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .author-avatar {
    width: 24px;
    height: 24px;
  }
  
  /* FAQ 섹션 */
  .faq-section {
    padding: 2rem 0;
    margin-top: 2rem;
    min-height: auto;
    contain: none;
  }
  
  .faq-container {
    padding: 0 1rem;
  }
  
  .faq-section h2 {
    font-size: 1.5rem;
  }
  
  .faq-item {
    padding: 1.25rem;
  }

  /* 가이드 영역 */
  .guide-wrapper {
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    min-width: 0;
    position: relative;
    max-width: 700px;
    contain: none;
  }

  .guide-section h2 {
    font-size: 1.25rem;
    word-break: keep-all;
  }
  
  .guide-section h3 {
    font-size: 1rem;
    word-break: keep-all;
  }

  .calculation-basis {
    margin-top: 0.8rem;
  }
  
  .calculation-basis p {
    margin: 0.4rem 0;
    line-height: 1.7;
  }
  
  .form-row-split {
    flex-direction: row;
    gap: 1rem;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-section.expanded {
    max-height: 600px;
  }
  
  .button-grid {
    height: 100px;
    gap: 0.5rem;
  }
  
  .mom-story {
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .mom-story h4 {
    font-size: 1rem;
  }
  
  #resultCard {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .share-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    max-width: 360px;
    margin: 0 auto;
  }
  
  .share-popup.active {
    transform: translate(-50%, -50%);
  }
  
  .button-grid-result {
    width: 100%;
    box-sizing: border-box;
  }
  
  .button-grid-result .btn {
    white-space: nowrap;
    min-width: 0;
  }
  
  .guide-summary {
    padding: 1.5rem;
  }
  
  .point-item {
    padding: 0.75rem;
  }
  
  .point-icon {
    width: 35px;
    height: 35px;
    font-size: 1.25rem;
  }
  
  .show-more-btn {
    font-size: 0.9rem;
    padding: 0.7rem 1.25rem;
  }

  /* 모바일 메뉴 버튼 표시 */
  .mobile-menu-btn {
    display: block !important;
  }

  .nav-brand {
    margin-right: auto;
  }

  .nav-menu {
    display: none !important;
  }
  
  /* 계산기 헤더 모바일 */
  .calculator-header.compact {
    padding: 0.625rem;
  }

  .author-avatar {
    width: 24px;
    height: 24px;
  }

  .update-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }

  /* 타이틀 조정 */
  .main-title {
    font-size: 1.5rem;
    flex-direction: row;
    gap: 0.4375rem;
  }

  .title-icon {
    font-size: 1.375rem;
  }

  .main-subtitle {
    font-size: 0.875rem;
  }

  /* 메인 레이아웃 */
  .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);
  }
}

/* GPU 가속 */
.hero-overlay, 
.share-popup,
.share-overlay {
  will-change: transform, opacity;
}

/* 스크롤 성능 개선 */
.calculator-body {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 430px) {
  body {
    font-size: 14px;
    margin: 0;
    padding: 0;
  }
  
  .main-wrapper {
    margin: 0;
    padding: 0;
  }
  
  .calculator-header {
    padding: 1rem;
  }
  
  .calculation-basis p {
    font-size: 0.78rem;
  }
  
  .calculator-body {
    padding: 1rem;
  }
  
  .guide-wrapper {
    padding: 1rem;
  }

  .guide-section {
    margin-bottom: 1.25rem;
  }

  .guide-section h2 {
    font-size: 1.1rem !important;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
  }

  /* 박스들 좌우 여백 활용 */
  .guide-wrapper > * {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  /* 박스들 패딩 줄이기 */
  .point-item {
    padding: 0.5rem !important;
    gap: 0.5rem;
  }
  
  .info-box, .warning-box {
    padding: 0.75rem !important;
    font-size: 0.85rem;
  }
  
  /* 테이블 폰트 크기 */
  table {
    font-size: 0.8rem;
  }
  
  th, td {
    padding: 0.5rem 0.6rem;
  }
  
  input, select {
    height: 48px;
    font-size: 1rem;
    padding: 0.8rem;
  }
  
  .btn {
    font-size: 0.875rem;
  }
  
  .error-message {
    font-size: 0.75rem;
  }
  
  .payment-list {
    font-size: 0.7rem;
  }
  
  .button-grid-result {
    gap: 6px;
    margin-bottom: 1.5rem;
  }
  
  .button-grid-result .btn {
    font-size: 0.8rem;
    padding: 0.6rem 0.5rem;
    height: 44px;
  }
  
  .button-grid-result .btn svg {
    width: 14px;
    height: 14px;
  }
}