:root{
  --bg:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --primary:#0b5fff;
  --primary-600:#0a4ddb;
  --border:#e5e7eb;
  --card:#f8fafc;
  --shadow:0 8px 24px rgba(0,0,0,.06);
  --radius:14px;
  --bp-mobile: 480px;
  --bp-tablet: 768px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body.fytime{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Noto Sans KR, Apple SD Gothic Neo, Arial, sans-serif;
}

/* containers */
.container{max-width:1000px;margin:0 auto;padding:24px}

/* header */
.site-header{border-bottom:1px solid var(--border); background:#fff; position:sticky; top:0; z-index:50}
.header-inner{display:flex; align-items:center; justify-content:space-between; gap:16px}
.branding .site-title{font-weight:700; font-size:20px; text-decoration:none; color:var(--text)}
.site-description{margin:.25rem 0 0; font-size:12px; color:var(--muted)}
.primary-nav .menu{list-style:none; margin:0; padding:0; display:flex; gap:14px; flex-wrap:wrap}
/*25.9.8
/* .primary-nav .menu a{display:inline-block; padding:8px 10px; text-decoration:none; color:var(--text); border-radius:10px} */
/* 반응형으로 조정 */
.primary-nav .menu a{
  display:inline-block; 
  padding:6px 8px;
  text-decoration:none; 
  color:var(--text); 
  border-radius:8px;         /* 모서리도 살짝 줄임 */
  font-size:14px;
  font-weight:500;           /* 폰트 굵기도 조정 가능 */
}

/* 모바일에서는 더 작게 */
@media (max-width: var(--bp-tablet)) {
  .primary-nav .menu a {
    font-size:12px;
    padding:4px 6px;
  }
}
.primary-nav .menu a:hover{background:#f3f4f6}

/* footer */
.site-footer{border-top:1px solid var(--border); background:#fff; margin-top:48px}
.footer-inner{display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 24px; font-size:14px; color:var(--muted)}

/* hero */
.hero{padding:24px; border-radius:var(--radius); background:var(--card); box-shadow:var(--shadow); text-align:center; margin:16px 0 24px}
.hero h1{margin:0 0 8px; font-size:28px}
.hero p{margin:0; color:var(--muted)}

/* grid of tools */
.section-title{font-size:18px; margin:0 0 12px}
.grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:16px}
.tool-card{border:1px solid var(--border); border-radius:var(--radius); text-decoration:none; color:inherit; background:#fff; box-shadow:var(--shadow)}
.tool-card-inner{padding:16px}
.tool-card h3{margin:0 0 6px; font-size:16px}
.tool-card p{margin:0; color:var(--muted); font-size:14px}
.tool-card:hover{transform:translateY(-2px); box-shadow:0 12px 28px rgba(0,0,0,.08)}

/* page / card */
.page-head{margin:0 0 16px}
.page-head .muted{color:var(--muted); margin:6px 0 0}
.card{border:1px solid var(--border); border-radius:var(--radius); background:#fff; padding:16px; box-shadow:var(--shadow)}

/* forms - 수정된 버전 */
.form-grid{display:grid; grid-template-columns:1fr; gap:12px}

.form-inline{
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* align-items: stretch 제거! */
}

label{font-weight:600; font-size:14px}
.hint, .help{display:block; color:var(--muted); font-size:12px; margin-top:4px}

input[type="text"], input[type="number"]{
  width:100%; 
  padding:12px; 
  border:1px solid var(--border); 
  border-radius:12px; 
  font-size:16px; 
  background:#fff;
}

input:focus{outline:none; border-color:var(--primary); box-shadow:0 0 0 4px rgba(11,95,255,.08)}

.btn{
  display:inline-flex; 
  align-items:center; 
  gap:8px; 
  padding:12px 16px; 
  border-radius:12px; 
  border:1px solid var(--border); 
  background:#fff; 
  cursor:pointer; 
  font-weight:700;
  width: 100%; /* 전체 폭 추가 */
}

.btn-primary{background:var(--primary); border-color:var(--primary); color:#fff}
.btn-primary:hover{background:var(--primary-600); border-color:var(--primary-600)}
.btn-kakao{background:#fee500; color:#3c1e1e; border-color:#fee500}
.btn-kakao .icon{display:inline-block}

/* center helper */
.center{display:flex; justify-content:center; margin-top:16px}

/* results / errors */
.result{font-size:18px; text-align:center; font-weight:700}
.error{color:#d61e1e; text-align:center}

/* tables */
.table-card h3{margin:0 0 8px}
.table-container{width:100%; overflow:auto}
table{width:100%; border-collapse:collapse; table-layout:fixed}
th,td{border:1px solid var(--border); padding:10px; text-align:center; font-size:14px; vertical-align:middle}
th{background:#f8fafc; font-weight:700}
@media (max-width:var(--bp-tablet)){
  th,td{font-size:12px; padding:8px}
}

/* modal */
.popup{position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:min(800px,90%); height:70vh; background:#fff; border-radius:14px; box-shadow:var(--shadow); display:flex; flex-direction:column; z-index:1000}
.popup-content{display:flex; flex-direction:column; height:100%}
.popup-header{position:sticky; top:0; background:#fff; padding:12px 14px; font-size:18px; font-weight:700; display:flex; justify-content:center; align-items:center; border-bottom:1px solid var(--border); z-index:10}
.close-btn{position:absolute; right:12px; top:8px; font-size:24px; background:none; border:none; cursor:pointer}
.popup-body{flex:1; overflow:auto; padding:12px}

/* post/page */
.post-card, .page{background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:16px}
.post-title, .page-title{margin:0 0 12px}

/* utility */
.muted{color:var(--muted)}


/* ===== 통합 검색 결과 시스템 ===== */

/* 검색 결과 컨테이너 */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--space-md) var(--space-md);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow);
  display: block;
}

/* 검색 결과 아이템 */
.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background-color 0.2s ease;
  background: white;
}

.search-result-item:hover {
  background: var(--card);
}

.search-result-item:last-child {
  border-bottom: none;
}

/* 검색 결과 내용 스타일 */
.search-result-main {
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.search-result-sub {
  font-size: var(--text-sm);
  color: var(--muted);
}

.search-result-brand {
  font-weight: 600;
  color: var(--text);
  min-width: 50px;
  font-size: var(--text-sm);
}

.search-result-model {
  flex: 1;
  color: var(--text);
  font-weight: 500;
  font-size: var(--text-sm);
}

.search-result-year {
  color: var(--muted);
  font-size: var(--text-xs);
}

/* 검색 상태 메시지 */
.search-loading,
.search-no-results,
.search-error {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--muted);
  font-size: var(--text-sm);
}

.search-error {
  color: var(--danger);
}

/* 특수한 경우를 위한 모디파이어 */
.search-results.compact {
  max-height: 200px;
}

.search-results.large {
  max-height: 400px;
}

/* 모달 내부에서 사용되는 경우 */
.modal-content .search-results {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--space-sm);
  margin-top: var(--space-md);
}


/* 대출 계산기 전용 스타일 */
.loan-calculator-page .result-summary {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
}

.loan-calculator-page .schedule-toggle {
  text-align: center;
  margin: 16px 0;
}

.loan-calculator-page .schedule-toggle .btn {
  background: #6b7280;
  color: white;
  border-color: #6b7280;
}

.loan-calculator-page .schedule-toggle .btn:hover {
  background: #4b5563;
  border-color: #4b5563;
}

.loan-calculator-page #scheduleTable {
  font-size: 12px;
}

.loan-calculator-page #scheduleTable th {
  background: #f3f4f6;
  font-weight: 600;
}

.loan-calculator-page #scheduleTable td {
  padding: 6px 4px;
}

/* 반응형 처리 */
@media (max-width: var(--bp-tablet)) {
  .loan-calculator-page #scheduleTable {
    font-size: 10px;
  }
  
  .loan-calculator-page #scheduleTable th,
  .loan-calculator-page #scheduleTable td {
    padding: 4px 2px;
  }
}

/* 기업분석 페이지 전용 스타일 */
.company-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-item .label {
  font-weight: 600;
  min-width: 80px;
  color: var(--muted);
}

.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.chart-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.chart-card h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
}

.chart-card canvas {
  max-height: 300px;
}


/* 배당 정보 페이지 전용 스타일 */
.search-container {
  position: relative;
  width: 100%;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.company-main {
  font-weight: 600;
  margin-bottom: 4px;
}

.company-sub {
  font-size: 12px;
  color: var(--muted);
}

.dividend-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.stat-card {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.company-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-item .label {
  font-weight: 600;
  min-width: 100px;
  color: var(--muted);
}

.info-item .value {
  font-weight: 500;
}

/* 테이블 스타일 개선 */
.amount {
  font-weight: 600;
  text-align: right;
}

.high-yield {
  color: #dc3545;
  font-weight: 600;
}

.medium-yield {
  color: #fd7e14;
  font-weight: 600;
}

.low-yield {
  color: #6c757d;
}

/* 대출 계산기 탭 방식 스타일 - 모바일 최적화 */

/* 탭 컨테이너 */
.loan-calculator-page .tab-container {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.loan-calculator-page .tab-button {
  flex: 1;
  min-width: 120px;  /* 140px에서 120px로 줄임 */
  padding: 14px 10px;  /* 패딩 줄임 */
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-size: 13px;  /* 14px에서 13px로 줄임 */
  font-weight: 600;
  color: var(--muted);
}

.loan-calculator-page .tab-button small {
  display: block;
  font-size: 10px;  /* 11px에서 10px로 줄임 */
  font-weight: 400;
  margin-top: 4px;
  color: var(--muted);
}

.loan-calculator-page .tab-button:hover {
  background: #f8fafc;
  color: var(--text);
}

.loan-calculator-page .tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #f0f8ff;
}

.loan-calculator-page .tab-button.active small {
  color: var(--primary);
}

/* 모바일에서 탭 크기 더욱 최적화 */
@media (max-width: 480px) {
  .loan-calculator-page .tab-container {
    margin-bottom: 16px;
  }
  
  .loan-calculator-page .tab-button {
    min-width: 100px;  /* 더 작게 */
    padding: 10px 6px;  /* 패딩 더 줄임 */
    font-size: 11px;    /* 폰트 더 작게 */
  }
  
  .loan-calculator-page .tab-button small {
    font-size: 9px;     /* 작은 텍스트 더 작게 */
    margin-top: 2px;
  }
}

/* 아주 작은 화면에서는 스크롤 가능하게 */
@media (max-width: 360px) {
  .loan-calculator-page .tab-button {
    flex: none;        /* flex 해제 */
    min-width: 90px;   /* 최소 폭 더 줄임 */
    padding: 8px 4px;  /* 패딩 최소화 */
    font-size: 10px;   /* 폰트 최소화 */
  }
  
  .loan-calculator-page .tab-button small {
    font-size: 8px;
  }
}

/* 결과 컨테이너 공통 */
.loan-calculator-page .result-container {
  margin-top: 24px;
}

.loan-calculator-page .result-header {
  margin-bottom: 20px;
}

.loan-calculator-page .result-header h3,
.loan-calculator-page .result-header h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: var(--text);
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.loan-calculator-page .method-info {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.loan-calculator-page .method-info p {
  margin: 4px 0;
}

/* 결과 아이템들 */
.loan-calculator-page .result-summary {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.loan-calculator-page .result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.loan-calculator-page .result-item:last-child {
  border-bottom: none;
}

.loan-calculator-page .result-item .label {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.loan-calculator-page .result-item .value {
  font-weight: 700;
  color: var(--primary);
  font-size: 16px;
}

/* 비교 결과 컨테이너 */
.loan-calculator-page .comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 20px 0;
}

.loan-calculator-page .result-section {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.loan-calculator-page .result-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text);
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.loan-calculator-page .features {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.loan-calculator-page .features p {
  margin: 4px 0;
}

/* 절약 효과 하이라이트 */
.loan-calculator-page .savings-highlight {
  background: #e8f5e8;
  border: 2px solid #4caf50;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin: 24px 0;
}

.loan-calculator-page .savings-highlight h4 {
  margin: 0 0 8px 0;
  color: #2e7d32;
  font-size: 16px;
}

.loan-calculator-page .savings-highlight p {
  margin: 0;
  font-size: 15px;
  color: #2e7d32;
}

/* 상환계획표 관련 */
.loan-calculator-page .schedule-controls {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.loan-calculator-page .schedule-controls .btn {
  background: #6b7280;
  color: white;
  border-color: #6b7280;
  font-size: 14px;
  padding: 10px 16px;
}

.loan-calculator-page .schedule-controls .btn:hover {
  background: #4b5563;
  border-color: #4b5563;
}

.loan-calculator-page .table-card {
  margin: 16px 0;
}

.loan-calculator-page .table-card h3 {
  background: var(--primary);
  color: white;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px 12px 0 0;
  font-size: 16px;
}

.loan-calculator-page .table-container {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.loan-calculator-page table {
  font-size: 12px;
  width: 100%;
}

.loan-calculator-page table th {
  background: #f3f4f6;
  font-weight: 600;
  font-size: 11px;
  padding: 8px 6px;
  text-align: center;
}

.loan-calculator-page table td {
  padding: 6px 4px;
  font-size: 11px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}


/* 기존 main.css에 추가할 스타일 */

/* 차량 선택 렌트 계산기 전용 스타일 */
.rent-calculator-page .car-selection-section {
  background: #f8fafc;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #e5e7eb;
}

.rent-calculator-page .car-selection-section h3 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 18px;
}

.rent-calculator-page .search-container {
  position: relative;
  margin: 16px 0;
}

.rent-calculator-page .search-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.rent-calculator-page .search-input:focus {
  outline: none;
  border-color: #0b5fff;
  box-shadow: 0 0 0 3px rgba(11, 95, 255, 0.1);
}


.rent-calculator-page .search-result-item:last-child {
  border-bottom: none;
}

.rent-calculator-page .result-brand {
  font-weight: 600;
  color: #1f2937;
}

.rent-calculator-page .result-model {
  color: #6b7280;
  margin-left: 8px;
}

.rent-calculator-page .result-year {
  color: #9ca3af;
  font-size: 14px;
}

.rent-calculator-page .selected-car-info {
  margin-top: 16px;
}

.rent-calculator-page .selected-car-info h4 {
  margin: 0 0 12px 0;
  color: #1f2937;
  font-size: 16px;
}

.rent-calculator-page .car-info-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rent-calculator-page .car-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rent-calculator-page .car-brand {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.rent-calculator-page .car-model {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.rent-calculator-page .car-trim {
  font-size: 14px;
  color: #6b7280;
}

.rent-calculator-page .car-price {
  text-align: right;
}

.rent-calculator-page .price {
  font-size: 18px;
  font-weight: 700;
  color: #0b5fff;
  display: block;
}

.rent-calculator-page .price-type {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.rent-calculator-page .btn-clear {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 8px;
  transition: background-color 0.2s;
}

.rent-calculator-page .btn-clear:hover {
  background: #e5e7eb;
}

/* 트림 선택 컨트롤 */
.rent-calculator-page .trim-selection-controls {
  margin-top: 12px;
  text-align: center;
}

.rent-calculator-page .btn-trim-select {
  background: #0b5fff;
  border: 1px solid #0b5fff;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.rent-calculator-page .btn-trim-select:hover {
  background: #0a4ddb;
  border-color: #0a4ddb;
  transform: translateY(-1px);
}

/* 트림 선택 모달 스타일 */
.trim-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.trim-modal {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.trim-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.trim-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal-btn:hover {
  color: #374151;
}

.trim-modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1;
}

.trim-list-modal {
  display: grid;
  gap: 12px;
}

.trim-item-modal {
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.trim-item-modal:hover {
  border-color: #0b5fff;
  background: #f0f8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 95, 255, 0.15);
}

.trim-item-modal:active {
  transform: translateY(0);
}

.trim-item-modal .trim-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
  font-size: 16px;
}

.trim-item-modal .trim-price {
  color: #0b5fff;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
}

.trim-item-modal .trim-details {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}

/* IRR 결과 해석 스타일 */
.rent-calculator-page .irr-interpretation {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
}

.rent-calculator-page .irr-interpretation.excellent {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.rent-calculator-page .irr-interpretation.good {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.rent-calculator-page .irr-interpretation.neutral {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.rent-calculator-page .irr-interpretation.caution {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.rent-calculator-page .irr-value {
  font-size: 24px;
  font-weight: 700;
  color: #0b5fff;
}

/* 모바일 최적화 */
@media (max-width: var(--bp-tablet)) {
  .trim-modal-overlay {
    padding: 10px;
  }
  
  .trim-modal {
    max-height: 85vh;
  }
  
  .trim-modal-header {
    padding: 16px 20px 12px;
  }
  
  .trim-modal-body {
    padding: 16px 20px 20px;
  }
  
  .trim-item-modal {
    padding: 14px;
  }
  
  .trim-item-modal .trim-name {
    font-size: 15px;
  }
  
  .trim-item-modal .trim-price {
    font-size: 16px;
  }
  
  .trim-item-modal .trim-details {
    font-size: 12px;
  }
  
  .rent-calculator-page .car-info-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .rent-calculator-page .car-price {
    text-align: left;
    width: 100%;
  }
  
  .rent-calculator-page .car-selection-section {
    padding: 16px;
  }
  
  .rent-calculator-page .search-input {
    font-size: 16px; /* iOS 줌 방지 */
  }
}

/* 모바일에서 모달을 Bottom Sheet 스타일로 */
@media (max-width: 480px) {
  .trim-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  
  .trim-modal {
    max-width: none;
    width: 100%;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
    margin: 0;
  }
  
  .trim-modal-header {
    padding: 16px 20px;
    position: relative;
  }
  
  .trim-modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
  }
  
  .trim-list-modal {
    gap: 10px;
  }
  
  .trim-item-modal {
    padding: 12px;
  }
}

/* 반응형 처리 */
@media (max-width: var(--bp-tablet)) {
  .loan-calculator-page .comparison-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .loan-calculator-page .result-item {
    padding: 8px 0;
  }
  
  .loan-calculator-page .result-item .label {
    font-size: 13px;
  }
  
  .loan-calculator-page .result-item .value {
    font-size: 14px;
  }
  
  .loan-calculator-page .result-section {
    padding: 16px;
  }
  
  .loan-calculator-page .savings-highlight {
    padding: 16px;
  }
  
  .loan-calculator-page table {
    font-size: 10px;
  }
  
  .loan-calculator-page table th,
  .loan-calculator-page table td {
    padding: 4px 2px;
    font-size: 9px;
  }
}

/* ===== 차량 옵션 선택 시스템 CSS ===== */

/* 1. 트림 선택 모달 액션 버튼 스타일 */
.trim-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.select-trim-btn, .select-options-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.select-trim-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.select-trim-btn:hover {
  background: #e5e7eb;
}

.select-options-btn {
  background: #0b5fff;
  color: white;
}

.select-options-btn:hover {
  background: #0a4ddb;
}

/* 2. 옵션 선택 모달 스타일 */
.options-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.options-modal {
  background: white;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 모달 헤더 */
.options-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.selected-car-info h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  color: #1f2937;
}

.selected-car-info .base-price {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.close-modal-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 모달 바디 */
.options-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 탭 메뉴 */
.options-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
  flex: 1;
  padding: 16px 12px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn.active {
  color: #0b5fff;
  border-bottom-color: #0b5fff;
  background: #f0f8ff;
}

/* 탭 컨텐츠 */
.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.tab-content.active {
  display: block;
}

/* 옵션 아이템 */
.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.option-item:hover {
  border-color: #0b5fff;
  box-shadow: 0 2px 8px rgba(11, 95, 255, 0.1);
}

.option-checkbox {
  position: relative;
}

.option-checkbox input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.option-checkbox input[type="checkbox"]:checked {
  background: #0b5fff;
  border-color: #0b5fff;
}

.option-checkbox input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.option-info {
  flex: 1;
}

.option-name {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.option-price {
  font-weight: 600;
  color: #0b5fff;
  margin-bottom: 4px;
}

.option-description {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.detail-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  margin-top: 8px;
}

.detail-btn:hover {
  background: #e5e7eb;
}

/* 색상 옵션 */
.color-section {
  margin-bottom: 24px;
}

.color-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #1f2937;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.color-item:hover {
  border-color: #0b5fff;
  box-shadow: 0 2px 8px rgba(11, 95, 255, 0.1);
}

.color-radio input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  cursor: pointer;
  margin-bottom: 8px;
}

.color-radio input[type="radio"]:checked {
  border-color: #0b5fff;
  background: #0b5fff;
  box-shadow: inset 0 0 0 3px white;
}

.color-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  margin-bottom: 8px;
}

.color-name {
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  margin-bottom: 4px;
}

.color-price {
  font-size: 11px;
  color: #6b7280;
  text-align: center;
}

/* 하단 요약 */
.options-summary {
  border-top: 1px solid #e5e7eb;
  padding: 16px 20px;
  background: #f8fafc;
}

.selected-options h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #1f2937;
}

.selected-option {
  font-size: 12px;
  color: #374151;
  margin-bottom: 4px;
}

.no-options {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  padding: 8px 0;
  border-top: 1px solid #e5e7eb;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.confirm-options-btn {
  width: 100%;
  padding: 12px;
  background: #0b5fff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.confirm-options-btn:hover {
  background: #0a4ddb;
}

/* 반응형 */
@media (max-width: var(--bp-tablet)) {
  .options-modal-overlay {
    padding: 10px;
  }
  
  .options-modal {
    max-height: 95vh;
  }
  
  .options-tabs {
    overflow-x: auto;
  }
  
  .tab-btn {
    min-width: 80px;
    font-size: 13px;
  }
  
  .color-options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* main.css에 추가할 코드 */

/* 차량가격 입력 그룹 스타일 */
.vehicle-price-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vehicle-price-input-group .rent-field {
  flex: 1;
}

.car-search-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 6px 10px;
  color: #374151;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 32px;
  height: 32px;
}

.car-search-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* 선택된 차량 정보 스타일 */
.selected-car-info {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  margin-top: 16px;
}

.car-info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.car-details {
  flex: 1;
}

.car-brand, .car-model {
  font-weight: 600;
  margin-right: 8px;
}

.car-trim {
  color: #6b7280;
  font-size: 13px;
}

.car-price .price {
  font-weight: 600;
  color: #059669;
  margin-right: 4px;
}

.price-type {
  color: #6b7280;
  font-size: 11px;
}

.btn-clear {
  background: #ef4444;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

/* 모달 스타일 */
.car-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
}

.modal-body {
  padding: 20px;
}

.search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

.search-result-item:hover {
  background-color: #f9fafb;
}

.search-result-item:last-child {
  border-bottom: none;
}

.result-brand {
  font-weight: 600;
  color: #1f2937;
  min-width: 50px;
  font-size: 13px;
}

.result-model {
  flex: 1;
  color: #374151;
  font-weight: 500;
  font-size: 13px;
}

.result-year {
  color: #6b7280;
  font-size: 12px;
}

.loading, .no-results, .error {
  text-align: center;
  padding: 30px 15px;
  color: #6b7280;
  font-size: 13px;
}

.error {
  color: #dc2626;
}

/* 반응형 */
@media (max-width: var(--bp-tablet)) {
  .vehicle-price-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .car-search-btn {
    text-align: center;
  }
  
  .modal-content {
    width: 95%;
    margin: 10px;
  }
  
  .car-info-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
