/**
 * Nelle 3D Drawer Configurator Styles - Tylko Aesthetic Edition
 * Inspired by Tylko.com Custom Furniture 3D Studio Architecture
 * Version: 2.0.0 (Pure Minimalist Luxury Design)
 * (c) 2026 (주)일흥건영 | ILHEUNG Inc.
 */

/* ==========================================================================
   1. 디자인 토큰 및 테마 변수 (Tylko Minimalist Studio Tokens)
   ========================================================================== */
:root {
  --nl-font: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  
  /* Light Studio Palette (Tylko Monochrome & Warm Gallery Tones) */
  --nl-bg-canvas: radial-gradient(ellipse at 50% 45%, #ffffff 0%, #f6f6f5 65%, #eaeae8 100%);
  --nl-panel-bg: #ffffff;
  --nl-panel-border: #e8e8e6;
  --nl-divider: #f0f0ee;
  --nl-subtle-bg: #f8f8f7;
  --nl-subtle-border: #e6e6e4;
  
  /* Text & Primary */
  --nl-text-main: #111111;
  --nl-text-muted: #666666;
  --nl-text-subtle: #999999;
  --nl-primary: #111111;
  --nl-primary-hover: #262626;
  --nl-primary-text: #ffffff;
  --nl-accent: #0f172a;
  
  /* Geometry & Glass */
  --nl-radius-btn: 6px;
  --nl-radius-stage: 12px;
  --nl-radius-pill: 9999px;
  --nl-glass-bg: rgba(255, 255, 255, 0.88);
  --nl-glass-border: rgba(0, 0, 0, 0.06);
  --nl-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.03);
  --nl-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.04);
  --nl-shadow-hud: 0 6px 20px rgba(0, 0, 0, 0.07);
  --nl-transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 다크 모드 (Salient Dark Theme Alignment) */
.nelle-cfg-wrapper.nelle-theme-dark {
  --nl-bg-canvas: radial-gradient(ellipse at 50% 45%, #1e2025 0%, #14161a 65%, #0b0c0e 100%);
  --nl-panel-bg: #14161a;
  --nl-panel-border: #26282e;
  --nl-divider: #1f2127;
  --nl-subtle-bg: #1a1c22;
  --nl-subtle-border: #2c2f37;
  --nl-text-main: #f4f4f4;
  --nl-text-muted: #9fa2a8;
  --nl-text-subtle: #6e7178;
  --nl-primary: #f4f4f4;
  --nl-primary-hover: #ffffff;
  --nl-primary-text: #111111;
  --nl-glass-bg: rgba(20, 22, 26, 0.88);
  --nl-glass-border: rgba(255, 255, 255, 0.08);
  --nl-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --nl-shadow-hud: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   2. 워드프레스 테마 호환 안전 리셋 & 메인 레이아웃 (Tylko Luxury Whitespace Studio)
   ========================================================================== */
#nelle-configurator-app {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 420px;
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 1440px;
  margin: 20px auto 48px;
  padding: 0 20px;
  font-family: var(--nl-font);
  color: var(--nl-text-main);
  letter-spacing: -0.015em;
  box-sizing: border-box;
  position: relative;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* box-sizing만 안전하게 강제하고, 개별 컴포넌트의 padding/border를 절대 파괴하지 않음 */
#nelle-configurator-app,
#nelle-configurator-app *,
#nelle-configurator-app *::before,
#nelle-configurator-app *::after {
  box-sizing: border-box !important;
}

/* 워드프레스 및 Salient 테마의 간섭(과도한 외부 마진, 대문자 변환 등)만 안전하게 방어 */
#nelle-configurator-app button {
  font-family: inherit;
  font-size: inherit;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none !important;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#nelle-configurator-app h1,
#nelle-configurator-app h2,
#nelle-configurator-app h3,
#nelle-configurator-app h4,
#nelle-configurator-app p {
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* ==========================================================================
   3. 3D 메인 스테이지 컬럼 (좌측 대형 뷰포트)
   ========================================================================== */
.nelle-cfg-stage-column {
  min-width: 0;
  width: 100%;
}

.nelle-cfg-canvas-container {
  position: sticky;
  top: 20px;
  width: 100%;
  height: calc(100vh - 100px);
  min-height: 580px;
  max-height: 840px;
  background: var(--nl-bg-canvas);
  border: 1px solid var(--nl-panel-border);
  border-radius: var(--nl-radius-stage);
  overflow: hidden;
  box-shadow: var(--nl-shadow-md);
  user-select: none;
  touch-action: none;
}

.nelle-cfg-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
}

.nelle-cfg-canvas-container canvas:active {
  cursor: grabbing;
}

/* 3D 로딩 인디케이터 */
.nelle-cfg-loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--nl-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 50;
  transition: opacity 0.35s ease;
  font-size: 13px;
  font-weight: 500;
  color: var(--nl-text-muted);
}

.nelle-cfg-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.nelle-cfg-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--nl-divider);
  border-top-color: var(--nl-primary);
  border-radius: 50%;
  animation: nl-spin 0.75s linear infinite;
}

@keyframes nl-spin {
  to { transform: rotate(360deg); }
}

/* 좌측 상단 브랜드 & 규격 배지 (Tylko Frosted Minimalist Badge) */
.nelle-cfg-stage-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--nl-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--nl-glass-border);
  border-radius: var(--nl-radius-pill);
  padding: 6px 14px;
  box-shadow: var(--nl-shadow-sm);
  z-index: 20;
  pointer-events: none;
}

.nelle-cfg-stage-badge .brand-chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--nl-text-main);
}

.nelle-cfg-stage-badge .badge-sep {
  font-size: 11px;
  color: var(--nl-text-subtle);
}

.nelle-cfg-stage-badge .spec-chip {
  font-size: 12px;
  color: var(--nl-text-muted);
  font-weight: 500;
}

.nelle-cfg-stage-badge .spec-chip strong {
  font-weight: 700;
  color: var(--nl-text-main);
}

/* 우측 상단 뷰 컨트롤러 (Tylko View Pills) */
.nelle-cfg-view-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--nl-glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--nl-glass-border);
  border-radius: var(--nl-radius-pill);
  padding: 4px;
  box-shadow: var(--nl-shadow-sm);
  z-index: 30;
}

.nelle-cfg-btn-icon {
  background: transparent;
  border: none;
  border-radius: var(--nl-radius-pill);
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--nl-text-muted);
  cursor: pointer;
  transition: var(--nl-transition);
  line-height: 1;
}

.btn-rotate-toggle {
  display: none !important; /* 데스크톱에서는 숨김 (모바일 터치 전용) */
}

.nelle-cfg-btn-icon:hover {
  color: var(--nl-text-main);
  background: rgba(0, 0, 0, 0.06);
}

#nelle-configurator-app .nelle-cfg-btn-icon.active,
.nelle-cfg-btn-icon.active {
  background: var(--nl-primary) !important;
  color: var(--nl-primary-text) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
}

/* 3D 인터랙션 포커스 안내 배지 (Model-Viewer Style) */
.nelle-cfg-focus-hint {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--nl-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--nl-glass-border);
  border-radius: var(--nl-radius-pill);
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  color: var(--nl-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 25;
}

.nelle-cfg-focus-hint .hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nl-text-subtle);
  display: inline-block;
  transition: background 0.25s ease;
}

.nelle-cfg-canvas-container.is-focused .nelle-cfg-focus-hint {
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  pointer-events: none;
}

/* 하단 중앙 플로팅 글래스 HUD (Tylko Live Dimension Dock) */
.nelle-cfg-hud {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--nl-glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--nl-glass-border);
  border-radius: var(--nl-radius-pill);
  padding: 8px 18px;
  box-shadow: var(--nl-shadow-hud);
  z-index: 20;
  font-size: 12px;
  white-space: nowrap;
}

.hud-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hud-label {
  font-size: 11px;
  color: var(--nl-text-muted);
}

.hud-item strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--nl-text-main);
}

.hud-item.highlight strong {
  color: var(--nl-text-main);
}

.hud-inner-spec {
  font-size: 11px;
  font-weight: 500;
  color: var(--nl-text-muted);
  margin-left: 2px;
  letter-spacing: -0.01em;
}

.hud-unit {
  font-size: 10px;
  color: var(--nl-text-subtle);
}

.hud-divider {
  width: 1px;
  height: 12px;
  background: var(--nl-divider);
}

.hud-gauge-mini {
  width: 44px;
  height: 4px;
  background: var(--nl-divider);
  border-radius: 2px;
  overflow: hidden;
  margin-left: 2px;
}

.hud-gauge-bar {
  height: 100%;
  background: var(--nl-primary);
  transition: width 0.25s ease;
}

/* ==========================================================================
   4. 커스터마이저 패널 래퍼 & 하이브리드 컬럼 (Tylko Studio Multi-Column)
   ========================================================================== */
.nelle-cfg-customizer-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.nelle-cfg-panels-row {
  width: 100%;
}

.nelle-cfg-options-column,
.nelle-cfg-catalog-column {
  background: var(--nl-panel-bg);
  border: 1px solid var(--nl-panel-border);
  border-radius: var(--nl-radius-stage);
  box-shadow: var(--nl-shadow-md);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 20px;
  height: calc(100vh - 100px);
  min-height: 580px;
  max-height: 840px;
  overflow: hidden;
}

/* 레거시 단일 패널 호환 유지 */
.nelle-cfg-panel-column {
  background: var(--nl-panel-bg);
  border: 1px solid var(--nl-panel-border);
  border-radius: var(--nl-radius-stage);
  box-shadow: var(--nl-shadow-md);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 20px;
  height: calc(100vh - 100px);
  min-height: 580px;
  max-height: 840px;
  overflow: hidden;
}

.nelle-cfg-mobile-nav {
  display: none; /* Desktop 대형 화면 기본 비활성 */
}

.nelle-cfg-panel-scroll {
  flex: 1 1 0%;
  min-height: 0 !important; /* Flex 컨테이너 내 축소 및 세로 스크롤 허용 필수 속성 */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.nelle-cfg-panel-scroll::-webkit-scrollbar {
  width: 5px;
}

.nelle-cfg-panel-scroll::-webkit-scrollbar-thumb {
  background: var(--nl-divider);
  border-radius: 4px;
}

/* 통합 섹션 (정갈한 구분선과 넉넉한 여백) */
.nelle-cfg-section {
  padding: 22px 24px;
  border-bottom: 1px solid var(--nl-divider);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nelle-cfg-section:last-child {
  border-bottom: none;
}

.nelle-cfg-section-title {
  display: flex;
  flex-direction: column;
  flex-shrink: 0 !important;
  gap: 2px;
}

.section-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

#nelle-configurator-app .section-tag,
.section-tag {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--nl-text-subtle) !important;
  line-height: 1 !important;
  margin: 0 !important;
}

#nelle-configurator-app .header-val,
.header-val {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--nl-text-main) !important;
  line-height: 1 !important;
}

#nelle-configurator-app h3.section-heading,
#nelle-configurator-app .section-heading,
.section-heading {
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: var(--nl-text-main) !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

#nelle-configurator-app .section-subtitle,
.section-subtitle {
  margin: 2px 0 0 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: var(--nl-text-muted) !important;
}

/* ==========================================================================
   Step 1: 서랍 규격 & 하드웨어 레일 선택 (Tylko Segmented Controls)
   ========================================================================== */
.nelle-cfg-rail-selector {
  margin-bottom: 4px;
}

.nelle-cfg-rail-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--nl-subtle-bg);
  padding: 4px;
  border-radius: var(--nl-radius-btn);
  border: 1px solid var(--nl-subtle-border);
}

.nelle-cfg-rail-btn {
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  border-radius: calc(var(--nl-radius-btn) - 2px);
  cursor: pointer;
  transition: var(--nl-transition);
  padding: 0 6px;
  color: var(--nl-text-muted);
}

.nelle-cfg-rail-btn .rail-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.nelle-cfg-rail-btn .rail-sub {
  font-size: 10.5px;
  color: var(--nl-text-subtle);
  line-height: 1;
}

.nelle-cfg-rail-btn:hover {
  color: var(--nl-text-main);
}

#nelle-configurator-app .nelle-cfg-rail-btn.active,
.nelle-cfg-rail-btn.active {
  background: var(--nl-primary) !important;
  color: var(--nl-primary-text) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  font-weight: 700 !important;
}

#nelle-configurator-app .nelle-cfg-rail-btn.active .rail-name,
.nelle-cfg-rail-btn.active .rail-name {
  color: var(--nl-primary-text) !important;
}

#nelle-configurator-app .nelle-cfg-rail-btn.active .rail-sub,
.nelle-cfg-rail-btn.active .rail-sub {
  color: rgba(255, 255, 255, 0.75) !important;
  font-weight: 500 !important;
}

.nelle-theme-dark .nelle-cfg-rail-pills {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.nelle-theme-dark #nelle-configurator-app .nelle-cfg-rail-btn.active,
.nelle-theme-dark .nelle-cfg-rail-btn.active {
  background: var(--nl-primary) !important;
  color: var(--nl-primary-text) !important;
}

.nelle-theme-dark #nelle-configurator-app .nelle-cfg-rail-btn.active .rail-name,
.nelle-theme-dark .nelle-cfg-rail-btn.active .rail-name {
  color: var(--nl-primary-text) !important;
}

.nelle-theme-dark #nelle-configurator-app .nelle-cfg-rail-btn.active .rail-sub,
.nelle-theme-dark .nelle-cfg-rail-btn.active .rail-sub {
  color: rgba(0, 0, 0, 0.65) !important;
}

.nelle-cfg-pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.nelle-cfg-pill {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--nl-subtle-bg);
  border: 1px solid var(--nl-subtle-border);
  border-radius: var(--nl-radius-btn);
  cursor: pointer;
  transition: var(--nl-transition);
  text-align: center;
  padding: 0 6px;
}

.nelle-cfg-pill .pill-width {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--nl-text-main);
  line-height: 1;
}

.nelle-cfg-pill .pill-unit {
  font-size: 11px;
  color: var(--nl-text-muted);
  line-height: 1;
}

.nelle-cfg-pill .pill-sub {
  font-size: 10px;
  color: var(--nl-text-subtle);
  margin-left: 2px;
  white-space: nowrap;
}

.nelle-cfg-pill:hover {
  background: var(--nl-panel-bg);
  border-color: var(--nl-text-muted);
}

#nelle-configurator-app .nelle-cfg-pill.active,
.nelle-cfg-pill.active {
  background: var(--nl-primary) !important;
  border-color: var(--nl-primary) !important;
  color: var(--nl-primary-text) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

#nelle-configurator-app .nelle-cfg-pill.active .pill-width,
#nelle-configurator-app .nelle-cfg-pill.active .pill-unit,
.nelle-cfg-pill.active .pill-width,
.nelle-cfg-pill.active .pill-unit {
  color: var(--nl-primary-text) !important;
}

#nelle-configurator-app .nelle-cfg-pill.active .pill-sub,
.nelle-cfg-pill.active .pill-sub {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* ==========================================================================
   Step 2: 마감 컬러 & 머티리얼 스와치 (Tylko Circle Swatches Row)
   ========================================================================== */
.nelle-cfg-swatches-row {
  display: flex;
  align-items: center;
  justify-content: center; /* 마스터 지침: 기본 가운데 정렬 */
  gap: 16px;
  padding: 6px 0 4px;
}

.nelle-cfg-swatch-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}

.nelle-cfg-swatch-circle-btn:hover {
  transform: scale(1.08);
}

.nelle-cfg-swatch-circle-btn .swatch-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
  background-size: cover;
  background-position: center;
  transition: var(--nl-transition);
}

.nelle-cfg-swatch-circle-btn.active .swatch-circle {
  box-shadow: 0 0 0 2px var(--nl-panel-bg), 0 0 0 4px var(--nl-primary);
}

/* ==========================================================================
   Step 3: 모듈 카테고리 탭 & 리스트 (Tylko Component Cards)
   ========================================================================== */
.nelle-cfg-catalog-sticky-header {
  flex: 0 0 auto;
  position: relative;
  top: 0;
  z-index: 20;
  background: var(--nl-panel-bg);
  margin: 0;
  padding: 18px 24px 12px 24px;
  border-bottom: 1px solid var(--nl-divider);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.nelle-cfg-catalog-column .step-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.nelle-cfg-catalog-column .catalog-scroll {
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 24px 30px;
  box-sizing: border-box;
}

.nelle-cfg-catalog-column .catalog-scroll .nelle-cfg-catalog-cards {
  margin-top: 0;
}

.nelle-theme-dark .nelle-cfg-catalog-sticky-header {
  background: var(--nl-panel-bg);
  border-bottom-color: var(--nl-divider);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.nelle-cfg-category-tabs {
  display: flex !important;
  flex-shrink: 0 !important;
  min-height: 36px !important;
  gap: 4px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 2px 6px 2px !important;
  cursor: grab !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  scrollbar-width: none !important; /* Firefox 스크롤바 숨김 */
  -ms-overflow-style: none !important; /* IE/Edge 스크롤바 숨김 */
  -webkit-overflow-scrolling: touch !important;
}

.nelle-cfg-category-tabs.is-dragging {
  cursor: grabbing !important;
}

.nelle-cfg-category-tabs::-webkit-scrollbar {
  display: none !important; /* Chrome/Safari 스크롤바 숨김 */
}

#nelle-configurator-app .nelle-cfg-category-tabs .tab-btn,
.nelle-cfg-category-tabs .tab-btn,
.tab-btn {
  padding: 4px 9px !important;
  border-radius: var(--nl-radius-pill) !important;
  border: 1px solid var(--nl-subtle-border) !important;
  background: var(--nl-subtle-bg) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  height: 27px !important;
  letter-spacing: -0.02em !important;
  color: var(--nl-text-muted) !important;
  cursor: pointer !important;
  transition: var(--nl-transition) !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

#nelle-configurator-app .tab-btn:hover,
.tab-btn:hover {
  background: var(--nl-panel-bg) !important;
  color: var(--nl-text-main) !important;
  border-color: var(--nl-text-muted) !important;
}

#nelle-configurator-app .tab-btn.active,
.tab-btn.active {
  background: var(--nl-primary) !important;
  color: var(--nl-primary-text) !important;
  border-color: var(--nl-primary) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

.nelle-cfg-catalog-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.nelle-cfg-catalog-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--nl-subtle-bg);
  border: 1px solid var(--nl-subtle-border);
  border-radius: var(--nl-radius-btn);
  transition: var(--nl-transition);
}

.nelle-cfg-catalog-card:hover {
  background: var(--nl-panel-bg);
  border-color: var(--nl-text-muted);
  box-shadow: var(--nl-shadow-sm);
}

.nelle-cfg-catalog-card.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.card-icon-col {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--nl-text-muted);
  overflow: hidden;
  box-sizing: border-box;
}

.card-icon-col.is-empty {
  background: transparent;
  border: 1px dashed rgba(0, 0, 0, 0.08);
}

.card-icon-col.is-num {
  background: rgba(0, 0, 0, 0.03);
}

.card-idx {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--nl-text-muted);
}

.catalog-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-meta-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 2px;
  min-width: 0;
}

.card-name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
}

.card-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nl-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.card-dim-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--nl-text-muted);
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.card-desc {
  margin: 0;
  font-size: 11px;
  color: var(--nl-text-muted);
  text-align: left !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  display: block;
}

.nelle-cfg-btn-add {
  height: 30px;
  padding: 0 11px;
  border-radius: var(--nl-radius-btn);
  border: 1px solid var(--nl-subtle-border);
  background: var(--nl-panel-bg);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--nl-text-main);
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--nl-transition);
}

.nelle-cfg-btn-add:hover {
  background: var(--nl-primary);
  color: var(--nl-primary-text);
  border-color: var(--nl-primary);
}

.nelle-cfg-btn-add.btn-disabled {
  background: var(--nl-subtle-bg);
  color: var(--nl-text-subtle);
  border-color: transparent;
  cursor: not-allowed;
}

/* ==========================================================================
   Step 4: 서랍 내부 배치 현황 (PLACED MODULES)
   ========================================================================== */
.nelle-cfg-placed-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.nelle-cfg-empty-notice {
  font-size: 11.5px;
  color: var(--nl-text-muted);
  padding: 8px 0;
  text-align: center;
}

.nelle-cfg-placed-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--nl-subtle-bg);
  border: 1px solid var(--nl-subtle-border);
  border-radius: var(--nl-radius-btn);
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  position: relative;
  user-select: none;
  cursor: grab;
}

.nelle-cfg-placed-card:active {
  cursor: grabbing;
}

.nelle-cfg-placed-card.is-dragging {
  opacity: 0.35;
  border: 1px dashed var(--nl-primary) !important;
  background: rgba(0, 0, 0, 0.04) !important;
  cursor: grabbing;
}

.nelle-cfg-placed-card.drag-over-top {
  border-top: 2px solid var(--nl-primary) !important;
}

.nelle-cfg-placed-card.drag-over-bottom {
  border-bottom: 2px solid var(--nl-primary) !important;
}

.placed-card-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.placed-idx {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--nl-text-subtle);
  width: 14px;
}

.placed-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.placed-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--nl-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.placed-dim {
  font-size: 10.5px;
  color: var(--nl-text-muted);
  white-space: nowrap;
}

.placed-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.btn-drag-handle {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--nl-subtle-border);
  background: var(--nl-panel-bg);
  color: var(--nl-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  transition: var(--nl-transition);
}

.btn-drag-handle:hover {
  background: var(--nl-subtle-bg);
  color: var(--nl-text-main);
  border-color: var(--nl-panel-border);
}

.btn-drag-handle:active {
  cursor: grabbing;
}

.btn-delete {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--nl-subtle-border);
  background: var(--nl-panel-bg);
  color: var(--nl-text-muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--nl-transition);
}

.btn-delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* ==========================================================================
   5. 하단 고정 요약 및 비우기 푸터 (Tylko Ultra-Minimal Bottom Bar)
   ========================================================================== */
.nelle-cfg-summary-footer {
  border-top: 1px solid var(--nl-divider);
  background: var(--nl-panel-bg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.summary-line-1 {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.summary-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--nl-text-subtle);
  text-transform: uppercase !important;
  flex-shrink: 0;
}

.summary-dim {
  font-size: 13px;
  font-weight: 700;
  color: var(--nl-text-main);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.summary-dim .dim-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--nl-text-main);
  letter-spacing: -0.02em;
}

.summary-dim .dim-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--nl-text-muted);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.summary-line-2 .summary-status {
  font-size: 11px;
  color: var(--nl-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nelle-cfg-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nelle-cfg-btn-secondary {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--nl-radius-btn);
  background: var(--nl-subtle-bg);
  color: var(--nl-text-muted);
  border: 1px solid var(--nl-subtle-border);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--nl-transition);
  white-space: nowrap;
}

.nelle-cfg-btn-secondary:hover {
  background: var(--nl-panel-bg);
  color: var(--nl-text-main);
  border-color: var(--nl-text-muted);
}

/* ==========================================================================
   6. 대형 모니터 3열 독립 스튜디오 레이아웃 (>= 1480px)
   ========================================================================== */
@media (min-width: 1480px) {
  #nelle-configurator-app {
    max-width: 1800px;
    grid-template-columns: minmax(0, 1.3fr) 800px;
    gap: 24px;
  }

  /* 대화면에서는 3열이 상시 펼쳐져 있으므로 상단 스텝 탭 숨김 */
  .nelle-cfg-customizer-wrap .nelle-cfg-mobile-nav {
    display: none !important;
  }

  .nelle-cfg-panels-row {
    display: grid !important;
    grid-template-columns: 360px 420px;
    gap: 20px;
    width: 100%;
    align-items: start;
  }

  .nelle-cfg-options-column,
  .nelle-cfg-catalog-column {
    display: flex !important;
    width: 100% !important;
    height: calc(100vh - 100px);
    min-height: 580px;
    max-height: 840px;
    position: sticky;
    top: 20px;
  }

  /* 대화면에서는 옵션 컬럼의 규격, 컬러, 서랍배치 목록과 우측 패널의 모듈 카탈로그가 상시 동시 표시 */
  .nelle-cfg-options-column .step-section,
  .nelle-cfg-catalog-column .step-section {
    display: flex !important;
  }
}

/* ==========================================================================
   7. 노트북 및 일반 모니터 2열 스텝 탭 전환 레이아웃 (992px ~ 1479px)
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1479px) {
  #nelle-configurator-app {
    max-width: 1440px;
    grid-template-columns: minmax(0, 1.45fr) 420px;
    gap: 20px;
  }

  .nelle-cfg-customizer-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
    height: calc(100vh - 100px);
    min-height: 580px;
    max-height: 840px;
    background: var(--nl-panel-bg);
    border: 1px solid var(--nl-panel-border);
    border-radius: var(--nl-radius-stage);
    box-shadow: var(--nl-shadow-md);
    overflow: hidden;
  }

  /* 상단 세련된 스텝 탭 바 (1.규격 / 2.컬러 / 3.모듈 / 4.구성) */
  #nelle-configurator-app .nelle-cfg-customizer-wrap .nelle-cfg-mobile-nav {
    display: flex !important;
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    background: var(--nl-panel-bg) !important;
    border-bottom: 1px solid var(--nl-divider) !important;
    z-index: 20 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #nelle-configurator-app .nelle-cfg-customizer-wrap .mobile-nav-btn {
    flex: 1 1 0% !important;
    height: 44px !important;
    padding: 0 4px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--nl-text-muted) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
  }

  #nelle-configurator-app .nelle-cfg-customizer-wrap .mobile-nav-btn.active {
    color: var(--nl-text-main) !important;
    font-weight: 700 !important;
  }

  #nelle-configurator-app .nelle-cfg-customizer-wrap .mobile-nav-btn .nav-step-label {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
  }

  #nelle-configurator-app .nelle-cfg-customizer-wrap .mobile-nav-btn.active .nav-step-label::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2.5px !important;
    background: var(--nl-primary) !important;
  }

  .nelle-cfg-panels-row {
    display: flex !important;
    flex: 1 1 0%;
    min-height: 0 !important;
    width: 100%;
    overflow: hidden;
    position: relative;
  }

  .nelle-cfg-options-column,
  .nelle-cfg-catalog-column {
    display: none;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: static !important;
    flex-direction: column;
    overflow: hidden;
  }

  .nelle-cfg-options-column.panel-active,
  .nelle-cfg-catalog-column.panel-active {
    display: flex !important;
  }

  /* options-column 안에서는 현재 활성화된 스텝만 표시 */
  .nelle-cfg-options-column .step-section {
    display: none;
  }
  .nelle-cfg-options-column .step-section.active {
    display: flex !important;
  }

  /* catalog-column은 전체 높이가 온전히 2열 모듈 카탈로그 전용으로 채워짐 */
  .nelle-cfg-catalog-column .step-section {
    display: flex !important;
    min-height: 100%;
    height: auto;
  }
}

/* ==========================================================================
   8. 모바일 반응형 완벽 최적화 (Tylko Mobile Architecture, <= 991px)
   ========================================================================== */
@media (max-width: 991px) {
  #nelle-configurator-app,
  .nelle-cfg-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    overflow: visible !important;
    position: relative !important;
    background: var(--nl-panel-bg, #ffffff) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    max-width: 100% !important;
  }

  /* 1. 상단 3D 스테이지: 자연스러운 상단 배치 */
  .nelle-cfg-stage-column {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    top: auto !important;
    z-index: 10 !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .nelle-cfg-canvas-container {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    height: 32vh !important;
    min-height: 220px !important;
    max-height: 300px !important;
    background: var(--nl-bg-canvas, #ffffff) !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--nl-panel-border) !important;
    z-index: 10 !important;
    overflow: hidden !important;
    touch-action: pan-y !important; /* 모바일 세로 터치 스크롤 절대 방해 금지 */
  }

  .nelle-cfg-stage-badge {
    display: none !important;
  }

  .nelle-cfg-focus-hint {
    display: none !important;
  }

  /* 모바일 상단 뷰 컨트롤 버튼: 캔버스 우측 상단 선명하게 노출 */
  .nelle-cfg-view-controls {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    padding: 3px 6px !important;
    gap: 3px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: var(--nl-radius-pill) !important;
    z-index: 50 !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
  }

  .nelle-cfg-btn-icon {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  .btn-rotate-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    font-size: 11px !important;
    padding: 5px 9px !important;
  }

  .btn-rotate-toggle.active {
    background: var(--nl-primary) !important;
    color: var(--nl-primary-text) !important;
  }

  /* 모바일 하단 플로팅 글래스 HUD */
  .nelle-cfg-hud {
    bottom: 8px !important;
    padding: 4px 10px !important;
    gap: 6px !important;
    max-width: calc(100% - 16px) !important;
    font-size: 11px !important;
  }

  .hud-inner-spec {
    font-size: 9.5px !important;
    letter-spacing: -0.02em !important;
    opacity: 0.85;
  }

  .hud-item strong {
    font-size: 12px !important;
  }

  .hud-divider {
    height: 10px !important;
  }

  /* 2. 커스터마이저 랩 (자연스러운 세로 흐름) */
  .nelle-cfg-customizer-wrap {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    display: block !important;
    overflow: visible !important;
    position: static !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* 스텝 탭 네비게이션: 고정 해제(자연스럽게 스크롤) */
  #nelle-configurator-app .nelle-cfg-mobile-nav,
  .nelle-cfg-wrapper .nelle-cfg-mobile-nav,
  div.nelle-cfg-mobile-nav {
    display: flex !important;
    position: static !important; /* 상단 고정 전면 해제 */
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    background: var(--nl-panel-bg, #ffffff) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid var(--nl-divider, #e8e8e6) !important;
    z-index: 15 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  #nelle-configurator-app .mobile-nav-btn,
  #nelle-configurator-app .nelle-cfg-mobile-nav button,
  .nelle-cfg-wrapper .mobile-nav-btn,
  .nelle-cfg-wrapper .nelle-cfg-mobile-nav button,
  div.nelle-cfg-mobile-nav button.mobile-nav-btn {
    flex: 1 1 0% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--nl-text-muted, #8e8e93) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: -0.01em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    text-decoration: none !important;
    transition: color 0.18s ease !important;
  }

  #nelle-configurator-app .mobile-nav-btn .nav-step-label,
  .nelle-cfg-wrapper .mobile-nav-btn .nav-step-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    position: relative !important;
    padding: 0 2px !important;
    pointer-events: none !important;
  }

  #nelle-configurator-app .mobile-nav-btn .nav-step-label::after,
  .nelle-cfg-wrapper .mobile-nav-btn .nav-step-label::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: transparent !important;
    border-radius: 2px 2px 0 0 !important;
    transition: background 0.18s ease !important;
    pointer-events: none !important;
  }

  #nelle-configurator-app .mobile-nav-btn.active,
  .nelle-cfg-wrapper .mobile-nav-btn.active,
  div.nelle-cfg-mobile-nav button.active {
    color: var(--nl-text-main, #0f172a) !important;
    font-weight: 700 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #nelle-configurator-app .mobile-nav-btn.active .nav-step-label::after,
  .nelle-cfg-wrapper .mobile-nav-btn.active .nav-step-label::after {
    background: var(--nl-primary, #0f172a) !important;
  }

  .nelle-theme-dark .nelle-cfg-mobile-nav {
    background: #111318 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }

  .nelle-theme-dark .mobile-nav-btn {
    color: #71717a !important;
  }

  .nelle-theme-dark .mobile-nav-btn.active {
    color: #ffffff !important;
  }

  .nelle-theme-dark .mobile-nav-btn.active .nav-step-label::after {
    background: #ffffff !important;
  }

  /* 3. 패널 행 */
  .nelle-cfg-panels-row {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    display: block !important;
    overflow: visible !important;
    position: relative !important;
  }

  /* 4. 카탈로그 패널 (3번 탭) */
  .nelle-cfg-catalog-column {
    display: none;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    overflow: visible !important;
    position: static !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .nelle-cfg-catalog-column.panel-active {
    display: block !important;
  }

  .nelle-cfg-catalog-column .step-section {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  /* 모바일 수납 모듈 카탈로그 헤더 (고정 해제: 자연스러운 상단 배치) */
  .nelle-cfg-catalog-sticky-header {
    position: static !important; /* 상단 고정 전면 해제 */
    top: auto !important;
    z-index: 10 !important;
    background: var(--nl-panel-bg, #ffffff) !important;
    border-bottom: 1px solid var(--nl-divider) !important;
    padding: 16px 20px 10px 20px !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
  }

  .nelle-cfg-catalog-sticky-header .section-tag-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
  }

  .nelle-cfg-catalog-sticky-header .section-tag {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    flex-shrink: 0 !important;
    color: var(--nl-text-subtle) !important;
  }

  .nelle-cfg-catalog-sticky-header .header-val {
    font-size: 12px !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
    color: var(--nl-text-main) !important;
    white-space: nowrap !important;
  }

  .nelle-theme-dark .nelle-cfg-catalog-sticky-header {
    background: #111318 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }

  /* 카탈로그 카드 리스트: 수정 전처럼 내부 스크롤 형태 유지 */
  .nelle-cfg-catalog-column .catalog-scroll {
    width: 100% !important;
    height: 420px !important;
    max-height: 52vh !important;
    min-height: 320px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: auto !important; /* 바닥 도달 시 페이지 스크롤로 자연스럽게 연결 */
    padding: 14px 18px 36px !important;
    box-sizing: border-box !important;
  }

  .nelle-cfg-catalog-cards {
    margin-top: 0 !important;
  }

  /* 5. 옵션 패널 (1, 2, 4번 탭) */
  .nelle-cfg-options-column {
    display: none;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
    overflow: visible !important;
    position: static !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .nelle-cfg-options-column.panel-active {
    display: block !important;
  }

  .nelle-cfg-options-column .step-section {
    display: none;
  }

  .nelle-cfg-options-column .step-section.active {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
  }

  .nelle-cfg-options-column .options-scroll {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px 18px 24px 18px !important;
    box-sizing: border-box !important;
  }

  /* 모바일 하단바 (1, 2, 4번 탭) */
  .nelle-cfg-options-column .nelle-cfg-summary-footer {
    position: static !important;
    width: 100% !important;
    background: var(--nl-subtle-bg) !important;
    border-top: 1px solid var(--nl-divider) !important;
    padding: 12px 18px !important;
    box-shadow: none !important;
    margin-top: 14px !important;
  }

  .summary-dim .dim-main {
    font-size: 13px !important;
  }

  .summary-dim .dim-sub {
    font-size: 10px !important;
    letter-spacing: -0.02em !important;
  }
}

/* ==========================================================================
   성능 보정 (2026-10-22): 3D 화면 위 반투명 흐림(backdrop blur) 제거
   - 3D 화면이 다시 그려질 때마다, 스크롤할 때마다 흐림 효과를 전부 다시 계산해서 브라우저가 멈칫하는 문제
   - 배경은 이미 88% 불투명이라 흐림을 빼도 보이는 모습은 거의 같음
   - 로딩이 끝난 뒤 투명해진 로딩 화면이 화면 전체 흐림과 회전 애니메이션을 계속 돌리던 문제 차단
   ========================================================================== */
.nelle-cfg-canvas-container .nelle-cfg-loading-overlay,
.nelle-cfg-canvas-container .nelle-cfg-stage-badge,
.nelle-cfg-canvas-container .nelle-cfg-view-controls,
.nelle-cfg-canvas-container .nelle-cfg-focus-hint,
.nelle-cfg-canvas-container .nelle-cfg-hud,
.nelle-cfg-loading-overlay,
.nelle-cfg-stage-badge,
.nelle-cfg-view-controls,
.nelle-cfg-focus-hint,
.nelle-cfg-hud {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.nelle-cfg-loading-overlay.hidden {
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.nelle-cfg-loading-overlay.hidden .nelle-cfg-spinner {
  animation: none;
}

/* C 필러 자동 마감 안내 카드 (텐덤박스) */
.nelle-cfg-auto-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px dashed var(--nl-divider, rgba(0, 0, 0, 0.15));
  border-radius: 10px;
  font-size: 12px;
}
.nelle-cfg-auto-card .auto-badge {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--nl-primary, #222);
  color: #fff;
}
.nelle-cfg-auto-card.is-warn .auto-badge {
  background: #b45309;
}
.nelle-cfg-auto-card .placed-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* 남은 폭 꽉 채우기 추천 */
.nelle-cfg-fill-suggest {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--nl-glass-bg, rgba(255, 255, 255, 0.88));
  border: 1px solid var(--nl-divider, rgba(0, 0, 0, 0.1));
  font-size: 12px;
}
.nelle-cfg-fill-suggest .fill-title {
  font-weight: 600;
  font-size: 13px;
}
.nelle-cfg-fill-suggest .fill-sub {
  color: var(--nl-text-muted, #777);
  font-size: 11px;
}
.nelle-cfg-fill-suggest.is-done {
  border-style: dashed;
}
.nelle-cfg-fill-suggest .fill-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}
.nelle-cfg-fill-suggest .fill-chip.nelle-cfg-pill {
  width: 100%;
  flex-direction: column;
  gap: 3px;
}
.nelle-cfg-fill-suggest .fill-chip .pill-width {
  font-size: 13px;
}
.nelle-cfg-fill-suggest .fill-chip .pill-sub {
  margin-left: 0;
}
.nelle-cfg-catalog-card.is-suggested {
  box-shadow: inset 0 0 0 1.5px var(--nl-primary, #222);
}
.card-suggest-badge {
  flex: 0 0 auto;
  display: inline-block;
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.5;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--nl-primary, #222);
  color: #fff;
}
