
/* ==============================================
   CSS 변수 정의
============================================== */
:root {
  /* 색상 변수 */
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  
  /* 배경색 */
  --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;
}

*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-nav {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-nav:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ==============================================
   글로벌 네비게이션 (전기요금 계산기에서 가져옴)
============================================== */
.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: 56px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-brand {
  font-size: 1.25rem;
  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.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 {
  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 {
  background: var(--bg-primary);
  padding: 0.5rem 0;
  font-size: 0.75rem;
  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.5rem;
  color: var(--text-secondary);
}

/* 메인 타이틀 섹션 */
.main-title-section {
  background: var(--bg-primary);
  padding: 2.5rem 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: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.title-icon {
  font-size: 2.5rem;
  display: inline-block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.main-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--global-nav-text);
  font-size: 1.5rem;
  padding: 0.5rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

/* 모바일 메뉴 */
.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-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);
}

/* ==============================================
   메인 래퍼
============================================== */
.main-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  padding: 2rem 1.5rem;
}

/* ==============================================
   계산기 영역
============================================== */
.calculator-wrapper {
  width: 400px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
}

.calculator-card {
  background: var(--bg-primary);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}

.calculator-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-primary);
  text-align: center;
  background: var(--bg-primary);
  transition: background-color var(--transition-slow);
}

.calculator-header h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
}

/* 계산기 헤더 compact 스타일 (전기요금 계산기에서 가져옴) */
.calculator-header.compact {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 45px;
}

/* 작성자 정보 (왼쪽) */
.author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 28px;
  height: 28px;
  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: #f3f4f6;
  color: #6b7280;
  font-size: 14px;
}

.avatar-fallback.initial {
  background: #3b82f6;
  color: white;
  font-weight: 700;
  font-size: 12px;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 업데이트 날짜 (오른쪽) */
.update-badge {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-primary);
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
  transition: all var(--transition-base);
}

.update-badge:hover {
  background: var(--bg-secondary);
  border-color: var(--border-secondary);
}

.calculator-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  background: var(--bg-primary);
}

.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-tertiary);
}

.experience-section {
  margin-bottom: 2rem;
}

.experience-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.experience-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border-primary);
}

.experience-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.experience-card strong {
  color: var(--text-primary);
  font-weight: 600;
}

.experience-highlight {
  background: var(--bg-primary);
  border-left: 4px solid var(--primary-color);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-style: italic;
  position: relative;
}

/* 인용 부호 추가 (선택사항) */
.experience-highlight::before {
  position: absolute;
  top: -5px;
  left: 15px;
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.2;
}

/* ==============================================
   폼 스타일
============================================== */
.form-row {
  margin-bottom: 1.25rem;
}

.form-row:has(.label-with-radio) {
  margin-top: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  min-height: 21px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition-fast);
}

input[type="text"], 
input[data-type="number"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition-base);
  height: 44px;
}

input[id*="rate"] {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

input::placeholder {
  color: rgba(156, 163, 175, 0.4);
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

input.error {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* ==============================================
   탭 스타일
============================================== */
.calculator-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr;
  gap: 0;
  margin-bottom: 1.5rem;
  background: transparent;
  border-bottom: 1px solid var(--border-primary);
  padding: 0;
  position: relative;
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: all var(--transition-base);
  font-weight: 500;
  text-align: center;
  position: relative;
  white-space: nowrap;
}

.tab-text {
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
}

.tab-button:nth-child(3) .tab-text {
  font-size: 0.875rem;
}

.tab-button:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.tab-button.active {
  color: var(--primary-color);
  font-weight: 600;
  background: transparent;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ==============================================
   섹션 타이틀
============================================== */
.section-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-primary);
  font-weight: 600;
}

/* ==============================================
   라디오 버튼 레이아웃
============================================== */
.label-with-radio {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.label-with-radio > span {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.radio-group {
  display: flex;
  gap: 0.75rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: normal;
  cursor: pointer;
  min-height: auto;
}

.radio-group input[type="radio"] {
  width: auto;
  height: auto;
  margin: 0;
}

.divider-vertical {
  margin: 0.5rem;
  color: var(--border-primary);
  font-weight: normal;
}

.bracket {
  position: relative;
  color: var(--text-tertiary);
  margin: 0 4px;
  font-size: 0.875rem;
}

/* ==============================================
   오류 메시지
============================================== */
.error-message {
  margin: 0;
  padding: 0;
  font-size: 0.8rem;
  color: var(--danger-color);
  opacity: 0;
  transform: translateY(-5px);
  transition: all var(--transition-slow);
}

.error-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==============================================
   구분선
============================================== */
.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: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  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);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.arrow-icon {
  transition: transform var(--transition-base);
}

.divider-content.expanded .arrow-icon {
  transform: rotate(180deg);
}

/* ==============================================
   버튼
============================================== */
.btn {
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: inherit;
  gap: 8px;
  padding: 0.75rem 1rem;
  min-height: 44px;
}

.btn:hover:not(:disabled) {
  border-color: var(--border-secondary);
  background: var(--bg-tertiary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: 
    "share reset"
    "share calculate";
  gap: 8px;
  height: 90px;
  margin-top: 1.5rem;
}

.share-btn {
  grid-area: share;
  background: #fff7ed;
  border-color: #fed7aa;
  color: #ea580c;
}

.share-btn:hover:not(:disabled) {
  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:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.reset-btn {
  grid-area: reset;
}

/* ==============================================
   가이드 영역
============================================== */
.guide-wrapper {
  flex: 1;
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  min-height: 400px;
  min-width: 0;
  position: relative;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow); /* 이렇게 수정 */
}

/* ==============================================
   명언 슬라이더
============================================== */
.quote-slider-section {
  margin-bottom: 2rem;
}

.quote-slider {
  position: relative;
  width: 350px;
  height: 200px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slides-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
}

.indicator.active {
  width: 24px;
  border-radius: 4px;
  background: white;
}

/* ==============================================
   핵심 요약 카드
============================================== */
.summary-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.key-points {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.key-points li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.key-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* ==============================================
   상세 가이드 섹션
============================================== */
.detail-section {
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.guide-detail {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 1rem;
}

.guide-detail h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-primary);
}

.guide-section {
  margin-bottom: 2.5rem;
}

.guide-section h3 {
  font-size: clamp(0.85rem, 2.5vw, 1.125rem);
  word-break: keep-all;
  color: var(--text-primary);
  margin: 1.75rem 0 0.875rem;
  font-weight: 600;
}

.guide-section p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.info-box {
  background: rgba(37, 99, 235, 0.1);
  border-left: 4px solid #2563eb;
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.warning-box {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: 1rem;
  color: var(--text-primary);
}

/* 테이블 */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  overflow: hidden;
  font-size: 1rem;
}

th, td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-primary);
}

th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

tr:hover {
  background: var(--bg-tertiary);
  transition: background var(--transition-fast);
}

.comparison-table,
.example-table {
  margin: 1rem 0;
}

/* ==============================================
   일시납 vs 적립식 레이아웃
============================================== */
.compare-split-container {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  margin-bottom: 2rem;
}

.compare-column {
  padding: 0 1.5rem;
  padding-top: 1rem; /* 제목이 없어져서 상단 여백 추가 */
}

.compare-column:first-child {
  padding-left: 0;
}

.compare-column:last-child {
  padding-right: 0;
}

.compare-column .form-row {
  margin-bottom: 0;
}

.compare-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.compare-divider {
  background: var(--border-primary);
}

.rate-inputs.split-inputs,
.period-inputs.split-inputs {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.rate-inputs.split-inputs:not([style*="display: none"]),
.period-inputs.split-inputs:not([style*="display: none"]) {
  display: grid;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group .input-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

/* ==============================================
   결과 카드
============================================== */
.result-container {
  margin-top: 1rem;
}

.result-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border-primary);
  margin-bottom: 0.75rem;
  overflow: visible;
}

.result-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  text-align: center;
}

.result-item.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  text-align: center;
}

.result-item.highlight span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
  display: block;
  margin-bottom: 0.5rem;
}

.result-item.highlight strong {
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-primary);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.result-item strong {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

/* 비교 메시지 스타일 */
.comparison-summary {
  text-align: left;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* (추가) - 비교 메시지 스타일 개선 */
.comparison-message {
  text-align: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.comparison-message .main-message {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.comparison-message .sub-message {
  font-size: 0.875rem;
  color: #666;
  display: block;
}

.comparison-message .rate-diff {
  color: #dc3545;
  font-weight: 700;
}

/* 비교 메시지 3줄 스타일 추가 */
.compare-summary-list {
  margin: 0.5rem 0;
}

.summary-item {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.summary-item .icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.summary-item .rate-diff {
  color: #dc3545;
  font-weight: 700;
}

/* PC 비교 결과 텍스트 줄바꿈 방지 강화 */
@media (min-width: 769px) {
  #compare-result-content .result-column {
    min-width: 48%;
  }
  .quote-slider-section {
    display: none !important;
  }
  
  #compare-result-content .result-item {
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }
  
  #compare-result-content .result-item span {
    font-size: 0.75rem;
    flex-shrink: 0;
  }
  
  #compare-result-content .result-item strong {
    font-size: 0.8125rem;
    text-align: right;
    margin-left: auto;
  }
}

/* 일시납 vs 적립식 결과 */
#compare-result-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.result-column {
  background: var(--bg-primary);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  width: 100%;
}

.result-column.winner {
  border: 2px solid var(--primary-color);
  background: rgba(13, 110, 253, 0.05);
  position: relative;
}

.result-column.winner::before {
  content: "🏆";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.result-column h4 {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  text-align: center;
  font-weight: 600;
}

/* 투자 인사이트 */
.investment-insight {
  grid-column: 1 / -1;
  background: #f0f9ff;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 0.75rem;
}

.investment-insight h5 {
  margin: 0 0 0.5rem 0;
  color: #1e3a8a;
  font-size: 0.875rem;
}

.investment-insight p {
  margin: 0;
  color: #1e40af;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* ==============================================
   1억 모으기 결과
============================================== */
.goal-comparison {
  background: #f0f9ff;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.goal-comparison h4 {
  font-size: 0.875rem;
  color: #1e3a8a;
  margin: 0 0 0.5rem 0;
}

.goal-comparison p {
  font-size: 1rem;
  color: #1e3a8a;
  margin: 0;
  font-weight: 600;
}

.goal-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.method-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 0.75rem;
}

.method-card h5 {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.method-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  white-space: nowrap;
}

.method-detail {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ==============================================
   차트 컨테이너
============================================== */
.chart-container {
  margin-top: 0;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid var(--border-primary);
  margin-bottom: 0;
  overflow: hidden;
}

/* Chart.js 캔버스 반응형 */
.chart-container canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* ==============================================
   결과 액션 버튼
============================================== */
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-primary);
}

.result-share-btn {
  background: #ff6b35;
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem;
  min-height: 48px;
}

.result-share-btn:hover:not(:disabled) {
  background: #ff5722;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.result-reset-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem;
  min-height: 48px;
}

.result-reset-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}
 
/* ==============================================
   목차 스타일
============================================== */
.table-of-contents {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.table-of-contents h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.table-of-contents ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
}

.table-of-contents li {
  counter-increment: toc;
  margin-bottom: 0.75rem;
}

.table-of-contents li::before {
  content: counter(toc) ". ";
  color: var(--primary-color);
  font-weight: 600;
  margin-right: 0.5rem;
}

.table-of-contents a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.table-of-contents a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* ==============================================
   팁 박스 및 전략 그리드
============================================== */
.tip-box {
  background: #f0f9ff;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.tip-box strong {
  color: #1e3a8a;
}

.tip-box a {
  color: #2563eb;
  text-decoration: none;
}

.tip-box a:hover {
  text-decoration: underline;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.strategy-box {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary-color);
}

.strategy-box h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.strategy-box p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* 수식 박스 */
.formula-box {
  background: #1a1a1a;
  color: #10b981;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.formula-box code {
  color: #10b981;
  font-size: 1rem;
  line-height: 1.5;
}

/* ==============================================
   FAQ 섹션
============================================== */
.faq-section {
  background: var(--bg-primary);
  padding: 4rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border-primary);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.faq-container h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
}

.faq-item {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-primary);
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--border-secondary);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.faq-item p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 1rem;
  margin: 0;
}

/* ==============================================
   공유 팝업
============================================== */
.share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.share-overlay.show {
  display: block;
  opacity: 1;
}

.share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  display: none;
  transition: all var(--transition-base);
}

.share-popup.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.close-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.share-title {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

.share-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.share-icons .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  transition: all var(--transition-fast);
  cursor: pointer;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.share-icons .icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-icons .icon.facebook {
  background: #1877f2;
}

.share-icons .icon.x {
  background: #000000;
}

.share-icons .icon.kakao {
  background: #fee500;
}

.share-icons .icon.naver {
  background: #03c75a;
}

.share-link-section {
  margin-top: 1.5rem;
}

.share-link-container {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  padding: 0.25rem;
}

.share-link-container input {
  flex: 1;
  background: none;
  border: none;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.copy-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--primary-hover);
}

.copy-btn.copied {
  background: var(--success-color);
}

/* ==============================================
   반응형 디자인
============================================== */
@media (max-width: 1200px) {
  .main-wrapper {
    flex-direction: column;
  }
  
  .calculator-wrapper {
    width: 100%;
    position: static;
    max-height: none;
  }
  
  .calculator-card {
    height: auto;
    max-height: none;
  }
  
  .guide-wrapper {
    margin-top: 2rem;
  }
  /* (추가) - 기존에 없던 스타일 */
.equal-amount-section {
  margin-bottom: 1.5rem;
}

.equal-amount-section .checkbox-wrapper {
  display: flex;
  align-items: center;
  font-size: 1rem;  /* 공통조건과 동일한 크기 */
  font-weight: 600;
  color: var(--text-primary);
}

.equal-amount-section input[type="checkbox"] {
  margin-right: 0.5rem;
 }
/* template.css에 추가 */
.compact-result {
  padding: 1.5rem !important;
}

.result-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem !important;
}

.comparison-summary {
  background: #f0f7ff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.winner-message {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0066cc;
  margin-bottom: 0.25rem;
}

.sub-message {
  font-size: 0.875rem;
  color: #666;
}
}

@media (max-width: 768px) {
  /* 모바일 메뉴 버튼 표시 */
  .mobile-menu-btn {
    display: block !important;
  }
  
  .nav-menu {
    display: none;
  }
  
  .global-nav-container {
    padding: 0 1rem;
  }
  
  .nav-brand {
    font-size: 1.125rem;
    margin-right: 1rem;
  }
  
  .breadcrumb-container {
    padding: 0 1rem;
  }
  
  .main-title-section {
    padding: 1.5rem 0;
  }
  
  .main-title {
    font-size: 1.75rem;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }
  
  .title-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
  }
  
  .main-subtitle {
    font-size: 0.9375rem;
    padding: 0 1rem;
    line-height: 1.6;
  }
  
  /* 계산기 헤더 모바일 */
.calculator-header.compact {
  flex-direction: row;  /* column → row 변경 */
  justify-content: space-between;  /* 추가 */
  align-items: center;  /* flex-start → center 변경 */
  gap: 0.5rem;
  padding: 0.75rem;
}
  
  .author-info {
  }
  
  .update-badge {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
  }
  
  .author-avatar {
    width: 24px;
    height: 24px;
  }
  
  .author-name {
    font-size: 0.8125rem;
  }
  
  /* 메인 콘텐츠 모바일 */
  .main-wrapper {
    padding: 1rem;
  }
  
  .calculator-card {
    border-radius: 12px;
  }
  
  .calculator-body {
    padding: 1rem;
  }
  
  .calculator-tabs {
    grid-template-columns: 1fr 1fr 1.4fr 1fr;
    margin-bottom: 1rem;
  }
  
  .tab-button {
    padding: 0.75rem 0.25rem;
    font-size: 0.9rem;
  }
  
  .tab-text {
    font-size: 17px;
  }
  
  .tab-button:nth-child(3) .tab-text {
    font-size: 15px;
  }
  
  /* 폼 모바일 */
  .form-row {
    margin-bottom: 1rem;
  }
  
  input[type="text"],
  input[data-type="number"] {
    font-size: 1rem;
    padding: 0.625rem;
  }
  
  .label-with-radio {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .radio-group {
    flex-wrap: wrap;
  }
  
  /* 버튼 그리드 모바일 */
  .button-grid {
    grid-template-areas: 
      "share share"
      "reset calculate";
    height: auto;
  }
  
  .share-btn {
    grid-area: share;
  }
  
  /* 가이드 모바일 */
  .guide-wrapper {
    padding: 1.5rem;
    margin-top: 1rem;
  }
  
  .guide-detail {
    padding: 1rem;
  }
  
  .guide-section h3 {
    font-size: 1rem;
  }
  
  .strategy-grid {
    grid-template-columns: 1fr;
  }
  
  /* 결과 모바일 */
  .result-card {
    padding: 1rem;
  }
  
  .result-card h3 {
    font-size: 1.125rem;
  }
  
  .result-item.highlight strong {
    font-size: 1.5rem;
  }
  
  #compare-result-content {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .result-column.winner::before {
    top: -10px;
    right: -10px;
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .goal-methods {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    height: 220px;
    padding: 0.5rem;
  }
  
  /* 공유 팝업 모바일 */
  .share-popup {
    padding: 1.5rem;
  }
  
  .share-icons {
    gap: 0.75rem;
  }
  
  .share-icons .icon {
    width: 50px;
    height: 50px;
  }
  
  /* FAQ 모바일 */
  .faq-container h2 {
    font-size: 1.5rem;
  }
  
  .faq-item {
    padding: 1.25rem;
  }
  
  .faq-item h3 {
    font-size: 1rem;
  }
  
  /* 테이블 모바일 */
  table {
    font-size: 0.875rem;
  }
  
  th, td {
    padding: 0.625rem 0.75rem;
  }
  
  /* 비교 레이아웃 모바일 */
  .compare-split-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .compare-column {
    padding: 0;
  }
  
  .compare-divider {
    display: none;
  }
  
  /* 명언 슬라이더 모바일에서만 표시 */
  .quote-slider-section {
    display: block !important;
  }
  
  .quote-slider {
    width: 100%;
    max-width: 350px;
  }
  
  /* 경험담 모바일 */
  .experience-card {
    padding: 1.5rem;
  }
  
  .experience-card p {
    font-size: 0.9375rem;
  }
  
  .experience-highlight {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  /* 목차 모바일 */
  .table-of-contents {
    padding: 1rem;
  }
  
  .table-of-contents h3 {
    font-size: 1rem;
  }
  
  .table-of-contents li {
    font-size: 0.875rem;
  }
}

/* 매우 작은 화면 */
@media (max-width: 480px) {
  .main-title-section {
    padding: 1.25rem 0;
  }
  
  .main-title {
    font-size: 1.5rem;
  }
  
  .title-icon {
    font-size: 1.25rem;
  }
  
  .main-subtitle {
    font-size: 0.875rem;
  }
  
  .calculator-tabs {
    font-size: 0.75rem;
  }
  
  .tab-text {
    font-size: 15px;
  }
  
  .tab-button:nth-child(3) .tab-text {
    font-size: 14px;
  }
  
  .result-item.highlight strong {
    font-size: 1.25rem;
  }
}

/* ==============================================
   애니메이션
============================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ==============================================
   유틸리티 클래스
============================================== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-small {
  font-size: 0.875rem;
}

.text-muted {
  color: var(--text-secondary);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-3 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-4 { padding-left: 2rem; padding-right: 2rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* 모바일 전용 줄바꿈 */
.mobile-br {
  display: none;
}

@media (max-width: 768px) {
  .mobile-br {
    display: inline;
  }
}

/* ==============================================
   인쇄 스타일
============================================== */
@media print {
  .global-nav,
  .breadcrumb,
  .mobile-menu,
  .mobile-menu-overlay,
  .share-popup,
  .share-overlay,
  .calculator-tabs,
  .button-grid,
  .result-actions,
  .divider,
  .quote-slider-section {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .main-wrapper {
    max-width: 100%;
    display: block;
  }
  
  .calculator-wrapper,
  .guide-wrapper {
    width: 100%;
    max-height: none;
    position: static;
    box-shadow: none;
    page-break-inside: avoid;
  }
  
  .calculator-card {
    height: auto;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .tab-content {
    display: block !important;
    page-break-inside: avoid;
  }
  
  .chart-container {
    height: 300px;
    page-break-inside: avoid;
  }
}

/* ==============================================
   스크롤바 스타일
============================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-secondary) var(--bg-tertiary);
}

/* ==============================================
   추가 헬퍼 클래스
============================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loading {
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 내부 링크 스타일 */
.internal-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.internal-link:hover {
  text-decoration: underline;
}

/* ==============================================
   CSS 종료
============================================== */