:root {
  --hc-accent: #ff4d2e;
  --hc-accent-dark: #d93a1d;
  --hc-dark: #14161a;

  /* 사이트 전체 곡률: 모든 모서리를 이 값 하나로 통일 (알약형 칩·탭 제외) */
  --hc-radius: .75rem;
  --bs-border-radius: var(--hc-radius);
  --bs-border-radius-sm: var(--hc-radius);
  --bs-border-radius-lg: var(--hc-radius);
  --bs-border-radius-xl: var(--hc-radius);
  --bs-border-radius-xxl: var(--hc-radius);
}

/* Bootstrap 컴포넌트는 컴파일 시점 값을 쓰므로 직접 연결 */
.card { --bs-card-border-radius: var(--hc-radius); --bs-card-inner-border-radius: calc(var(--hc-radius) - 1px); }
.list-group { --bs-list-group-border-radius: var(--hc-radius); }
.dropdown-menu { --bs-dropdown-border-radius: var(--hc-radius); }
.modal { --bs-modal-border-radius: var(--hc-radius); }
.nav-tabs { --bs-nav-tabs-border-radius: var(--hc-radius); }
.nav-pills { --bs-nav-pills-border-radius: var(--hc-radius); }
.pagination { --bs-pagination-border-radius: var(--hc-radius); }
.alert { --bs-alert-border-radius: var(--hc-radius); }
.toast { --bs-toast-border-radius: var(--hc-radius); }
.btn { --bs-btn-border-radius: var(--hc-radius); }

html { font-size: 15px; }
body { background: #f6f7f9; font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", -apple-system, "Segoe UI", sans-serif; }

.navbar-brand .brand-hash { color: var(--hc-accent); }
.navbar .nav-link.active { color: #fff; font-weight: 600; }

.btn-accent { background: var(--hc-accent); border-color: var(--hc-accent); color: #fff; }
.btn-accent:hover, .btn-accent:focus { background: var(--hc-accent-dark); border-color: var(--hc-accent-dark); color: #fff; }

/* 히어로 */
.hero {
  background: linear-gradient(135deg, var(--hc-dark) 0%, #2a2f3a 100%);
  color: #fff;
  border-radius: var(--hc-radius);
  padding: 3rem 2rem;
}
.hero .stat { font-size: 2rem; font-weight: 700; line-height: 1.1; }

/* 제조사 칩 */
.manufacturer-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .9rem; border-radius: 999px;
  background: #fff; border: 1px solid #dee2e6; color: #212529;
  text-decoration: none; font-size: .9rem; transition: all .15s;
}
.manufacturer-chip:hover { border-color: var(--hc-accent); color: var(--hc-accent); }
.manufacturer-chip .count { background: #f1f3f5; border-radius: 999px; padding: 0 .5rem; font-size: .75rem; color: #6c757d; }

/* 카드 */
.card-car, .card-video { transition: transform .15s, box-shadow .15s; border: 0; }
.card-car:hover, .card-video:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.1) !important; }
.car-image { aspect-ratio: 16 / 9; object-fit: cover; background: #e9ecef; width: 100%; }

.thumb-wrap { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #212529; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-wrap .duration {
  position: absolute; right: .4rem; bottom: .4rem;
  background: rgba(0,0,0,.8); color: #fff; font-size: .7rem; padding: .1rem .4rem; border-radius: var(--hc-radius);
}
.card-video .thumb-wrap { border-radius: var(--hc-radius) var(--hc-radius) 0 0; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 재생목록 */
.playlist { max-height: 560px; overflow-y: auto; }
.playlist-thumb { width: 120px; border-radius: var(--hc-radius); }
.playlist-item.active { background: #fff3f0; color: inherit; border-color: #dee2e6; border-left: 3px solid var(--hc-accent); }
.playlist-item.active .text-muted { color: #6c757d !important; }

/* 제원 */
.spec-table th { width: 42%; color: #6c757d; font-weight: 500; padding-left: 1rem; }
.spec-table td { padding-right: 1rem; }
.quick-spec dt { color: #6c757d; font-weight: 500; }

.nav-tabs .nav-link { color: #495057; }
.nav-tabs .nav-link.active { font-weight: 600; color: var(--hc-dark); }

footer { margin-top: auto; }

/* 차종 상세: 대표 이미지 */
.car-hero-image { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--hc-radius); background: #e9ecef; }
.car-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-tabs .nav-link { padding: .6rem 1rem; }

/* 댓글 */
.comment { padding: .9rem 0; border-bottom: 1px solid #e9ecef; }
.comment:last-child { border-bottom: 0; }
.comment-body { white-space: pre-wrap; word-break: break-word; }
.comment:target { background: #fff8e6; margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: var(--hc-radius); }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* 차종 상세: 히어로 이미지 오버레이 + 출처 */
.car-hero-image { position: relative; }
.car-hero-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0));
  color: #fff; display: flex; flex-direction: column; pointer-events: none;
}
.car-hero-brand { font-size: .8rem; opacity: .85; letter-spacing: .02em; }
.car-hero-name { font-size: 1.5rem; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.car-hero-credit { font-size: .72rem; color: #8a8f98; margin-top: .4rem; text-align: right; }
.car-hero-credit a { color: inherit; text-decoration: none; }
.car-hero-credit a:hover { text-decoration: underline; }

/* 차종 상세: 탭 (알약형) */
.car-tabs { gap: .4rem; border-bottom: 1px solid #e5e7eb; padding-bottom: .75rem; }
.car-tabs .nav-link {
  border-radius: 999px; padding: .55rem 1.1rem; font-weight: 600; color: #374151;
  background: #fff; border: 1px solid #e5e7eb; display: inline-flex; align-items: center; gap: .35rem;
}
.car-tabs .nav-link:hover { border-color: #cbd5e1; background: #f8fafc; }
.car-tabs .nav-link.active { background: var(--hc-dark); border-color: var(--hc-dark); color: #fff; }
.car-tabs .tab-icon { font-size: .85em; }
.car-tabs .tab-count {
  background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 .5rem; font-size: .75rem; font-weight: 600;
}
.car-tabs .nav-link.active .tab-count { background: rgba(255,255,255,.22); }

/* 차종 카드: 사진 강조 */
.card-car { overflow: hidden; }
.card-car .car-image { transition: transform .35s ease; }
.card-car:hover .car-image { transform: scale(1.04); }

/* 자유게시판 */
.board-list .table-warning-subtle { background: #fffbeb; }
.text-accent { color: var(--hc-accent); }
.post-body { white-space: pre-wrap; word-break: break-word; line-height: 1.7; min-height: 120px; }

/* 누끼 이미지: 검은 배경 (그림자 없음) */
.studio-bg { background: #000; }
.car-stage { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 6% 5% 5%; overflow: hidden; }
.car-cutout {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transition: transform .35s ease;
}
.card-car:hover .car-cutout { transform: scale(1.04); }
.car-hero-image img.car-silhouette { object-fit: contain; }
/* car.svg 는 검은 선화라 검은 무대 위에서 밝게 반전 */
.car-silhouette { filter: invert(1) brightness(.9); }
.car-hero-studio { display: flex; align-items: center; justify-content: center; padding: 6% 6% 7%; }
.car-hero-overlay-studio { background: none; color: #fff; padding-bottom: .75rem; }
.car-hero-overlay-studio .car-hero-name { text-shadow: none; }
.car-hero-overlay-studio .car-hero-brand { opacity: .75; }
