/* ═══════════════════════════════════════════════════════════════════════════
   ★ Builder IDE Theme — ScreenDesigner 전용 IDE 톤 오버라이드
   ═══════════════════════════════════════════════════════════════════════════

   목적:
     /admin/builder 의 ScreenDesigner 를 기존 v5 Cosmic 톤에서 IDE 톤으로 전환.
     JSX / 로직은 건드리지 않고 shadcn HSL 변수만 스코프 안에서 덮어쓴다.

   스코프:
     .ide-builder 가 붙은 루트 아래에서만 효과.
     바깥 (헤더 / 사이드바 / 대시보드 등) 은 Cosmic 톤 그대로 유지.

   기준 색 (IDE 배경 유지 + v5 Cosmic 보라 액센트):
     다크  #121218 / #1a1a22 / #22222c / #3a3a48 / #e8e8ee / #a29bfe
     라이트 #f5f5f8 / #ededf2 / #e4e4ec / #d8d8e2 / #1a1a24 / #6c5ce7
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 라이트 모드 ─── 사이트 메인(메뉴/회사관리)과 동일 중성 톤 */
.ide-builder {
  --background: 240 20% 99%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 5%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 5%;
  --foreground: 240 10% 5%;
  --muted: 240 5% 95%;
  --muted-foreground: 240 4% 46%;
  --accent: 240 5% 95%;
  --accent-foreground: 240 10% 5%;
  --secondary: 240 5% 96%;
  --secondary-foreground: 240 10% 5%;
  --border: 240 6% 88%;
  --input: 240 6% 88%;
  /* --primary / --ring 은 정의하지 않음 → 사이트 :root 토큰 자동 상속,
     data-color preset (purple/blue/green/orange/pink/cyan) 도 자동 따라감 */
  --destructive: 0 73% 51%;
  --destructive-foreground: 0 0% 100%;
  /* 사이드바 — 사이트 카드 톤 (사이드바 primary/ring 도 미정의 → 사이트 토큰 상속) */
  --sidebar-background: 0 0% 100%;
  --sidebar-foreground: 240 10% 5%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 240 5% 95%;
  --sidebar-accent-foreground: 240 10% 5%;
  --sidebar-border: 240 6% 88%;
  /* 반경을 살짝 더 타이트하게 — IDE 느낌 */
  --radius: 0.375rem;
}

/* ─── 다크 모드 ─── 사이트 메인(메뉴/회사관리)과 동일 중성 톤 */
.dark .ide-builder {
  --background: 220 6% 5%;
  --card: 220 6% 9%;
  --card-foreground: 220 6% 95%;
  --popover: 220 6% 9%;
  --popover-foreground: 220 6% 95%;
  --foreground: 220 6% 95%;
  --muted: 220 6% 14%;
  --muted-foreground: 220 4% 56%;
  --accent: 220 6% 18%;
  --accent-foreground: 220 6% 95%;
  --secondary: 220 6% 12%;
  --secondary-foreground: 220 6% 95%;
  --border: 220 6% 18%;
  --input: 220 6% 18%;
  /* --primary / --ring 미정의 → 사이트 :root.dark 토큰 + data-color preset 자동 상속 */
  --destructive: 0 91% 71%;
  --destructive-foreground: 0 0% 100%;
  /* 사이드바 — 사이트 카드 톤 (primary/ring 미정의 → 사이트 토큰 상속) */
  --sidebar-background: 220 6% 9%;
  --sidebar-foreground: 220 6% 95%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 220 6% 18%;
  --sidebar-accent-foreground: 220 6% 95%;
  --sidebar-border: 220 6% 18%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   캔버스 배경 — 도트 그리드 (IDE 특유의 느낌)
   기존 ScreenDesigner 의 캔버스 영역에 은은한 도트가 찍힘.
   ScreenDesigner 가 캔버스 컨테이너에 특정 클래스를 박고 있지 않으니
   .ide-builder 하위의 최상위 bg-background 영역을 폴백으로 커버한다.
   실제 캔버스 ref 는 overflow-auto 이므로 내부 inner wrapper 에도 먹게 함.
   ═══════════════════════════════════════════════════════════════════════════ */

/* 라이트 기본 — 은은한 검정 도트 */
.ide-builder .bg-background {
  background-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.05) 0.5px,
    transparent 0.5px
  );
  background-size: 20px 20px;
}
/* 다크 덮어쓰기 — 은은한 흰색 도트 */
.dark .ide-builder .bg-background {
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 0.5px,
    transparent 0.5px
  );
  background-size: 20px 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ 컴팩트화 — IDE 특유의 촘촘한 레이아웃
   ═══════════════════════════════════════════════════════════════════════════
   원칙: JSX 는 건드리지 않는다. Tailwind arbitrary 클래스까지 CSS selector
   specificity 로 덮어쓴다 (.ide-builder .w-\[300px\] 등).
   폰트 기준: 기본 13px → 0.72rem (11.5px) 촘촘. 완전한 mockup 0.42rem 은 읽기
   어려워서 웹 최소 가독선인 11~12px 에 맞춤.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 기본 폰트 살짝 축소 ─── */
.ide-builder {
  font-size: 0.8125rem; /* 13px */
  line-height: 1.3;
}

/* ─── 패널 너비 축소 (shadcn w-[300px] → 240px) ─── */
.ide-builder .w-\[300px\] {
  width: 240px;
}
.ide-builder .w-\[280px\] {
  width: 220px;
}
.ide-builder .w-\[320px\] {
  width: 250px;
}

/* ─── Tailwind 텍스트 크기 다운그레이드 ─── */
.ide-builder .text-xs {
  font-size: 0.625rem;
  line-height: 0.9rem;
}
.ide-builder .text-sm {
  font-size: 0.72rem;
  line-height: 1rem;
}
.ide-builder .text-base {
  font-size: 0.8125rem;
  line-height: 1.15rem;
}
.ide-builder .text-lg {
  font-size: 0.88rem;
  line-height: 1.25rem;
}
.ide-builder .text-xl {
  font-size: 1rem;
  line-height: 1.35rem;
}

/* ─── 헤딩 ─── */
.ide-builder h1 {
  font-size: 0.95rem;
}
.ide-builder h2 {
  font-size: 0.85rem;
}
.ide-builder h3 {
  font-size: 0.78rem;
}
.ide-builder h4,
.ide-builder h5,
.ide-builder h6 {
  font-size: 0.72rem;
}

/* ─── 입력/선택 크기 ─── */
.ide-builder input,
.ide-builder select,
.ide-builder textarea {
  font-size: 0.72rem;
}
.ide-builder input[type="text"],
.ide-builder input[type="number"],
.ide-builder input[type="search"],
.ide-builder select {
  min-height: 26px;
  height: 26px;
}
.ide-builder textarea {
  min-height: 48px;
}

/* ─── 버튼 ─── */
.ide-builder button {
  font-size: 0.72rem;
}
.ide-builder button[data-slot="button"] {
  min-height: 26px;
}

/* ─── shadcn Tabs 크기 축소 ─── */
.ide-builder [role="tablist"],
.ide-builder .h-8 {
  height: 28px;
  min-height: 28px;
}
.ide-builder [role="tab"] {
  font-size: 0.68rem;
  padding: 0.22rem 0.5rem;
}

/* ─── 패딩 / 간격 다운그레이드 ─── */
.ide-builder .p-4 {
  padding: 0.6rem;
}
.ide-builder .p-3 {
  padding: 0.45rem;
}
.ide-builder .p-2 {
  padding: 0.3rem;
}
.ide-builder .px-4 {
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}
.ide-builder .px-3 {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}
.ide-builder .px-2 {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}
.ide-builder .py-3 {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.ide-builder .py-2 {
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}
.ide-builder .py-1 {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.ide-builder .gap-4 {
  gap: 0.5rem;
}
.ide-builder .gap-3 {
  gap: 0.4rem;
}
.ide-builder .gap-2 {
  gap: 0.3rem;
}
.ide-builder .space-y-4 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.5rem;
}
.ide-builder .space-y-3 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.4rem;
}
.ide-builder .space-y-2 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.3rem;
}

/* ─── 아이콘 크기 (lucide) ─── */
.ide-builder svg {
  flex-shrink: 0;
}
.ide-builder .size-4 {
  width: 0.85rem;
  height: 0.85rem;
}
.ide-builder .size-5 {
  width: 1rem;
  height: 1rem;
}
.ide-builder .size-6 {
  width: 1.1rem;
  height: 1.1rem;
}
.ide-builder .h-4,
.ide-builder .w-4 {
  height: 0.85rem;
  width: 0.85rem;
}

/* ─── 라벨 (속성 패널의 Label 컴포넌트) ─── */
.ide-builder label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ─── 보더 반경 타이트 ─── */
.ide-builder .rounded-lg {
  border-radius: 0.45rem;
}
.ide-builder .rounded-md {
  border-radius: 0.35rem;
}
.ide-builder .rounded-sm {
  border-radius: 0.25rem;
}

/* ─── 테이블 row 높이 축소 ─── */
.ide-builder table {
  font-size: 0.68rem;
}
.ide-builder th,
.ide-builder td {
  padding: 0.25rem 0.4rem;
}

/* ─── 카드 (Card) 패딩 축소 ─── */
.ide-builder [data-slot="card"] {
  padding: 0;
}
.ide-builder [data-slot="card-header"] {
  padding: 0.5rem 0.6rem;
}
.ide-builder [data-slot="card-content"] {
  padding: 0.5rem 0.6rem;
}
.ide-builder [data-slot="card-footer"] {
  padding: 0.4rem 0.6rem;
}

/* ─── Dialog / Popover 컴팩트 ─── */
.ide-builder [data-slot="popover-content"],
.ide-builder [role="dialog"] {
  font-size: 0.72rem;
}

/* ─── Badge 컴팩트 ─── */
.ide-builder [data-slot="badge"] {
  font-size: 0.56rem;
  padding: 0.08rem 0.3rem;
  border-radius: 0.25rem;
}

/* ─── Separator 얇게 ─── */
.ide-builder [data-slot="separator"],
.ide-builder hr {
  border-color: hsl(var(--border));
}

/* ─── 포커스 링 은은하게 (IDE 느낌) ─── */
.ide-builder *:focus-visible {
  outline: 1.5px solid hsl(var(--ring));
  outline-offset: 1px;
  box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ 좌측 패널 섹션 (수평 탭 해체 → 수직 아코디언)
   ═══════════════════════════════════════════════════════════════════════════
   기존 <Tabs> 의 수평 탭을 없애고 <details>/<summary> 네이티브 아코디언으로
   대체. 한 패널 안에서 컴포넌트/필드/레이어/편집 4개 섹션이 세로로 나열되며
   각자 독립적으로 접고 펼 수 있다.
   복잡성 축소: "탭 선택 후 내용 봄" (2단계) → "섹션 펼쳐서 내용 봄" (1단계).
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder details.ide-section {
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
  min-height: 0;
}
.ide-builder details.ide-section[open] {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 0;
}
.ide-builder details.ide-section > summary.ide-section-header {
  list-style: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground) / 0.5);
  background: hsl(var(--muted) / 0.5);
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  transition: background 0.1s;
}
.ide-builder details.ide-section > summary.ide-section-header:hover {
  color: hsl(var(--muted-foreground) / 0.8);
}
.ide-builder details.ide-section > summary.ide-section-header::-webkit-details-marker {
  display: none;
}
.ide-builder details.ide-section > summary.ide-section-header::before {
  content: "▸";
  font-size: 0.55rem;
  color: hsl(var(--muted-foreground) / 0.4);
  transition: transform 0.15s;
  display: inline-block;
}
.ide-builder details.ide-section[open] > summary.ide-section-header::before {
  transform: rotate(90deg);
}
.ide-builder details.ide-section > .ide-section-body {
  flex: 1 1 0;
  min-height: 0;
  max-height: 70vh;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ v5 Cosmic 토큰 → IDE 블루 오버라이드 (잔존 보라 제거)
   ═══════════════════════════════════════════════════════════════════════════
   v5-layout.css 가 정의한 --v5-primary (#6c5ce7 / #a29bfe) 같은 토큰이 여러
   .v5-* 클래스에서 직접 쓰이고 있어서 INVYONE 빌더 안에도 보라가 잔존한다.
   .ide-builder 스코프 안에서 이 토큰들을 IDE 블루로 전부 덮어씀.
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder {
  /* 라이트 v5 토큰 */
  --v5-primary: #3b7dd8;
  --v5-primary-light: #5b9ef5;
  --v5-primary-glow: rgba(59, 125, 216, 0.18);
  --v5-cyan: #0891b2;
  --v5-cyan-glow: rgba(8, 145, 178, 0.15);
  --v5-pink: #db2777;
  --v5-pink-glow: rgba(219, 39, 119, 0.12);
  --v5-glass: hsl(240 13% 94% / 0.6);
  --v5-glass-strong: hsl(240 13% 94% / 0.8);
  --v5-glass-border: rgba(59, 125, 216, 0.15);
  --v5-glow-sm: 0 0 0 1px rgba(59, 125, 216, 0.1);
  --v5-glow-md: 0 0 12px rgba(59, 125, 216, 0.15);
  --v5-glow-lg: 0 0 24px rgba(59, 125, 216, 0.2);
  --v5-surface: hsl(240 12% 97%);
}
.dark .ide-builder {
  /* 다크 v5 토큰 */
  --v5-primary: #5b9ef5;
  --v5-primary-light: #93bffc;
  --v5-primary-glow: rgba(91, 158, 245, 0.2);
  --v5-cyan: #22d3ee;
  --v5-cyan-glow: rgba(34, 211, 238, 0.15);
  --v5-pink: #ec4899;
  --v5-pink-glow: rgba(236, 72, 153, 0.12);
  --v5-glass: hsl(240 14% 12% / 0.6);
  --v5-glass-strong: hsl(240 14% 12% / 0.8);
  --v5-glass-border: rgba(91, 158, 245, 0.15);
  --v5-glow-sm: 0 0 0 1px rgba(91, 158, 245, 0.12);
  --v5-glow-md: 0 0 12px rgba(91, 158, 245, 0.18);
  --v5-glow-lg: 0 0 24px rgba(91, 158, 245, 0.22);
  --v5-surface: hsl(240 13% 9%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Tailwind primary 유틸리티 강제 덮기 (!important)
   ═══════════════════════════════════════════════════════════════════════════
   Tailwind v4 의 --color-primary 가 런타임 --primary 업데이트를 따라가지
   못하는 경우가 있어서 .bg-primary / .text-primary / .border-primary 등을
   강제로 덮는다. specificity 는 .ide-builder 스코프로 제한.
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .bg-primary {
  background-color: hsl(var(--primary)) !important;
}
.ide-builder .text-primary {
  color: hsl(var(--primary)) !important;
}
.ide-builder .border-primary {
  border-color: hsl(var(--primary)) !important;
}
.ide-builder .bg-primary\/5 {
  background-color: hsl(var(--primary) / 0.05) !important;
}
.ide-builder .bg-primary\/10 {
  background-color: hsl(var(--primary) / 0.1) !important;
}
.ide-builder .bg-primary\/20 {
  background-color: hsl(var(--primary) / 0.2) !important;
}
.ide-builder .bg-primary\/90 {
  background-color: hsl(var(--primary) / 0.9) !important;
}
.ide-builder .hover\:bg-primary\/90:hover {
  background-color: hsl(var(--primary) / 0.9) !important;
}
.ide-builder .hover\:bg-primary\/80:hover {
  background-color: hsl(var(--primary) / 0.8) !important;
}
.ide-builder .hover\:bg-primary\/20:hover {
  background-color: hsl(var(--primary) / 0.2) !important;
}
.ide-builder .ring-primary {
  --tw-ring-color: hsl(var(--primary)) !important;
}

/* shadcn Button default variant 강제 블루 */
.ide-builder [data-slot="button"][data-variant="default"],
.ide-builder button.bg-primary,
.ide-builder [class*="bg-primary"]:not([class*="/"]) {
  background-color: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ SlimToolbar — Single-row header with zone dividers
   Mockup: notes/gbpark/2026-04-14-builder-header-mockup.html
   Design: flat buttons, zone pseudo-element dividers, tabs merged in header
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Header root ── */
.ide-builder .hdr {
  height: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 20;
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
}

/* ── Zone: subtle vertical dividers between sections ── */
.ide-builder .hdr-zone {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  position: relative;
}
.ide-builder .hdr-zone::after {
  content: "";
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: hsl(var(--primary) / 0.1);
}
.ide-builder .hdr-zone:last-child::after {
  display: none;
}
.ide-builder .hdr-zone.grow {
  flex: 1;
  min-width: 0;
}
.ide-builder .hdr-zone.end {
  margin-left: auto;
}
.ide-builder .hdr-zone.end::after {
  display: none;
}
.ide-builder .hdr-zone.end::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: hsl(var(--primary) / 0.1);
}

/* ── Zone internal spacing helpers ── */
.ide-builder .hdr-gap-1 { display: flex; align-items: center; gap: 4px; }
.ide-builder .hdr-gap-2 { display: flex; align-items: center; gap: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ★ INVYONE 브랜드 로고 — v5 Cosmic
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .ide-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ide-builder .ide-brand-text {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, hsl(var(--primary)), #00cec9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ide-builder .ide-brand-badge {
  font-size: 7.5px;
  font-weight: 800;
  padding: 2px 5px;
  background: linear-gradient(135deg, hsl(var(--primary)), #fd79a8);
  color: #fff;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
  box-shadow: 0 0 8px hsl(var(--primary) / 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Flat icon button (sq-btn) — all header buttons use this
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .sq-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ide-builder .sq-btn:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}
.ide-builder .sq-btn.active {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Inline tab group (merged into header)
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .tab-group {
  display: flex;
  gap: 0;
  height: 100%;
  align-items: stretch;
}
.ide-builder .tab-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  border: none;
  font-size: 11.5px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: transparent;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  position: relative;
}
.ide-builder .tab-item + .tab-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30%;
  bottom: 30%;
  width: 1px;
  background: hsl(var(--primary) / 0.1);
}
.ide-builder .tab-item:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}
.ide-builder .tab-item.active {
  color: hsl(var(--primary));
  font-weight: 700;
  background: hsl(var(--primary) / 0.12);
}
.ide-builder .tab-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), #00cec9);
  box-shadow: 0 0 8px hsl(var(--primary) / 0.25);
}
.ide-builder .tab-cnt {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}
.ide-builder .tab-item.active .tab-cnt {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Screen info (title + table badge) in header zone 4
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .info-title {
  font-size: 12.5px;
  font-weight: 700;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ide-builder .info-table {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  color: #00cec9;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 206, 201, 0.1);
  border: 1px solid rgba(0, 206, 201, 0.12);
  margin-left: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Tool text button (multilang etc) — flat
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .tool-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ide-builder .tool-btn:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}
.ide-builder .tool-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Save button — flat, purple TEXT only (no filled background)
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .tb-save {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  color: hsl(var(--primary));
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ide-builder .tb-save::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  border-radius: 1px;
  background: hsl(var(--primary));
  opacity: 0;
  transform: scaleX(0);
  transition: all 0.2s ease;
}
.ide-builder .tb-save:hover {
  color: hsl(var(--primary));
  text-shadow: 0 0 12px hsl(var(--primary) / 0.3);
}
.ide-builder .tb-save:hover::after {
  opacity: 1;
  transform: scaleX(1);
  box-shadow: 0 0 8px hsl(var(--primary) / 0.4);
}
.ide-builder .tb-save:hover svg {
  opacity: 1;
}
.ide-builder .tb-save svg {
  opacity: 0.7;
  transition: opacity 0.15s;
}
.ide-builder .tb-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Alignment tools bar (multi-select)
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .tb-align-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ide-builder .tb-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.3);
  margin: 0 3px;
}
.ide-builder .tb-sel-count {
  font-size: 9px;
  font-weight: 700;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ Floating canvas tools (resolution + grid toggles)
   Positioned absolute, top-center of the canvas area
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .canvas-float-tools {
  position: sticky;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--primary) / 0.1);
  border-radius: 8px;
  box-shadow: 0 0 20px hsl(var(--primary) / 0.1), 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10;
  overflow: hidden;
  width: fit-content;
  margin: 0 auto;
  flex-shrink: 0;
}

/* ── Resolution cell ── */
.ide-builder .ft-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  position: relative;
  font-size: 10.5px;
  color: hsl(var(--foreground) / 0.7);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  border: none;
  background: transparent;
}
.ide-builder .ft-cell:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}
.ide-builder .ft-sub {
  font-size: 9.5px;
  color: hsl(var(--muted-foreground));
}

/* ── Grid toggle group ── */
.ide-builder .ft-toggles {
  display: flex;
  position: relative;
}
.ide-builder .ft-toggles::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: hsl(var(--primary) / 0.1);
}
.ide-builder .ft-toggle {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.ide-builder .ft-toggle:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}
.ide-builder .ft-toggle.on {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ 3뷰 탭 바 (Phase G — legacy ViewTabBar CSS, kept for reference)
   Now tabs are rendered inside the header. These styles kept for any
   remaining references but the separate .view-tab-bar row is removed.
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .view-tab-bar {
  display: none; /* hidden — tabs now merged into hdr */
}
.ide-builder .view-tab-group {
  display: flex;
  gap: 1px;
}
.ide-builder .view-tab {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: transparent;
  border: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  position: relative;
  white-space: nowrap;
}
.ide-builder .view-tab:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted));
}
.ide-builder .view-tab.active {
  color: hsl(var(--primary));
  font-weight: 600;
  background: hsl(var(--background));
}
.ide-builder .view-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), #00cec9);
  border-radius: 1px 1px 0 0;
  box-shadow: 0 0 8px hsl(var(--primary) / 0.3);
}
.ide-builder .view-tab-badge {
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0.05rem 0.3rem;
  min-width: 14px;
  text-align: center;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-radius: 8px;
  line-height: 1.3;
}
.ide-builder .view-tab.active .view-tab-badge {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}
.ide-builder .view-tab-hint {
  margin-left: auto;
  font-size: 0.55rem;
  color: hsl(var(--muted-foreground) / 0.7);
}

/* ── 팝업 뷰 캔버스 시각 표시 ── */
.ide-builder .popup-view-canvas {
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      hsl(var(--muted) / 0.5) 8px,
      hsl(var(--muted) / 0.5) 9px
    ),
    hsl(var(--muted));
}
.ide-builder .popup-view-label {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding: 0.2rem 0.9rem;
  font-size: 0.6rem;
  font-weight: 600;
  color: hsl(var(--primary));
  background: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ INVYONE 좌측 패널 + 검색 + 탭
   ═══════════════════════════════════════════════════════════════════════════ */

.ide-builder .inv-left-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 260px;
  background: hsl(var(--card));
  border-right: 1px solid hsl(var(--border));
  box-shadow: 1px 0 0 0 hsl(var(--border) / 0.4);
  overflow: hidden;
  animation: slide-in-left 0.2s ease;
}
.ide-builder .inv-right-panel {
  animation: slide-in-right 0.2s ease;
}

/* ── 패널 루트 ── */
.ide-builder .inv-panel-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.ide-builder .inv-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.3rem 0.5rem;
}

/* ── 검색 ── */
.ide-builder .inv-search-wrap {
  position: relative;
  padding: 0.4rem;
  flex-shrink: 0;
}
.ide-builder .inv-search-icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground) / 0.4);
  pointer-events: none;
}
.ide-builder .inv-search-input {
  height: 30px !important;
  padding-left: 1.6rem !important;
  font-size: 0.68rem !important;
  background: hsl(var(--background)) !important;
  border: 1px solid hsl(var(--border) / 0.5) !important;
  border-radius: 6px !important;
  color: hsl(var(--foreground)) !important;
}
.ide-builder .inv-search-input:focus {
  border-color: hsl(var(--primary) / 0.4) !important;
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.08) !important;
}
.ide-builder .inv-search-input::placeholder {
  color: hsl(var(--muted-foreground) / 0.35) !important;
}

/* ── 섹션 (테이블 컬럼 / 컴포넌트) ── */
.ide-builder .inv-section {
  margin-bottom: 0.15rem;
}
.ide-builder .inv-section + .inv-section {
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 0.2rem;
}
.ide-builder .inv-section-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground) / 0.65);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.12s;
}
.ide-builder .inv-section-header:hover {
  color: hsl(var(--foreground) / 0.8);
}
.ide-builder .inv-section-header::-webkit-details-marker { display: none; }
.ide-builder .inv-section-static { cursor: default; }
.ide-builder .inv-section-count {
  font-size: 0.5rem;
  font-weight: 600;
  padding: 0.08rem 0.3rem;
  background: hsl(var(--muted) / 0.7);
  border-radius: 6px;
  color: hsl(var(--muted-foreground) / 0.6);
  line-height: 1.3;
}

/* ── 테이블 컬럼 리스트 ── */
.ide-builder .inv-column-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.15rem 0;
  margin: 0 0.2rem 0.3rem;
  max-height: 240px;
  overflow-y: auto;
  background: hsl(var(--background) / 0.5);
  border-radius: 6px;
  border: 1px solid hsl(var(--border) / 0.2);
}
.ide-builder .inv-col-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem;
  cursor: grab;
  transition: background 0.1s;
  font-size: 0.7rem;
  border-left: 3px solid transparent;
}
.ide-builder .inv-col-row:hover {
  background: hsl(249 75% 63% / 0.1);
  border-left-color: hsl(249 75% 63% / 0.6);
}
.ide-builder .inv-col-row:active {
  cursor: grabbing;
}
.ide-builder .inv-col-row:nth-child(even) {
  background: hsl(var(--muted) / 0.08);
}
.ide-builder .inv-col-row:nth-child(even):hover {
  background: hsl(249 75% 63% / 0.1);
}
.ide-builder .inv-col-row.placed {
  opacity: 0.3;
  cursor: default;
}
.ide-builder .inv-col-tag {
  font-size: 0.5rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  background: hsl(249 75% 63% / 0.18);
  color: hsl(249 75% 63% / 0.9);
  flex-shrink: 0;
  letter-spacing: 0.03em;
  min-width: 34px;
  text-align: center;
}
.ide-builder .inv-col-row[data-type="NUM"] .inv-col-tag {
  background: hsl(38 85% 55% / 0.2);
  color: hsl(38 85% 55%);
}
.ide-builder .inv-col-row[data-type="NUM"]:hover {
  border-left-color: hsl(38 85% 55% / 0.6);
}
.ide-builder .inv-col-row[data-type="DATE"] .inv-col-tag {
  background: hsl(160 70% 50% / 0.2);
  color: hsl(160 70% 50%);
}
.ide-builder .inv-col-row[data-type="DATE"]:hover {
  border-left-color: hsl(160 70% 50% / 0.6);
}
.ide-builder .inv-col-row[data-type="BOOL"] .inv-col-tag {
  background: hsl(265 65% 60% / 0.2);
  color: hsl(265 65% 60%);
}
.ide-builder .inv-col-row[data-type="BOOL"]:hover {
  border-left-color: hsl(265 65% 60% / 0.6);
}
.ide-builder .inv-col-name {
  flex: 1;
  color: hsl(var(--foreground) / 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ide-builder .inv-col-row:hover .inv-col-name {
  color: hsl(var(--foreground));
}
.ide-builder .inv-col-placed {
  font-size: 0.48rem;
  color: hsl(var(--muted-foreground) / 0.4);
  flex-shrink: 0;
}
.ide-builder .inv-table-select {
  display: block;
  width: calc(100% - 0.6rem);
  margin: 0.2rem 0.3rem 0.3rem;
  font-size: 0.6rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid hsl(var(--border) / 0.3);
  border-radius: 4px;
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
}

/* ── 컴포넌트 리스트 ── */
.ide-builder .inv-comp-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0.25rem;
  margin: 0 0.15rem;
  background: hsl(var(--background) / 0.4);
  border-radius: 6px;
  border: 1px solid hsl(var(--border) / 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ INVYONE 컴포넌트 팔레트 카드
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 카테고리별 CSS 변수 (채도 높임) ── */
.ide-builder .inv-cat-data    { --cat: 249, 75%, 63%; }   /* v5 보라 #6c5ce7 */
.ide-builder .inv-cat-display { --cat: 174, 100%, 40%; }  /* v5 시안 #00cec9 */
.ide-builder .inv-cat-action  { --cat: 340, 97%, 70%; }   /* v5 핑크 #fd79a8 */
.ide-builder .inv-cat-layout  { --cat: 45, 98%, 64%; }    /* v5 앰버 #fdcb6e */
.ide-builder .inv-cat-input   { --cat: 249, 75%, 73%; }   /* v5 보라 라이트 #a29bfe */
.ide-builder .inv-cat-utility { --cat: 174, 100%, 40%; }  /* v5 시안 #00cec9 */
.ide-builder .inv-cat-default { --cat: 240, 10%, 50%; }   /* 그레이 */

/* ── 카드 베이스 ── */
.ide-builder .inv-comp-card {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.4rem;
  border-radius: 5px;
  border: 1px solid hsl(var(--cat) / 0.22);
  border-left: 3px solid hsl(var(--cat) / 0.8);
  background: hsl(var(--cat) / 0.06);
  cursor: grab;
  transition: all 0.15s ease;
  user-select: none;
}
.ide-builder .inv-comp-card:hover {
  border-left-color: hsl(var(--cat));
  background: hsl(var(--cat) / 0.14);
  border-color: hsl(var(--cat) / 0.35);
  box-shadow: 0 1px 8px hsl(var(--cat) / 0.12);
}
.ide-builder .inv-comp-card:active {
  cursor: grabbing;
  transform: scale(0.97);
  opacity: 0.8;
}

/* ── 아이콘 박스 ── */
.ide-builder .inv-comp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: hsl(var(--cat) / 0.18);
  color: hsl(var(--cat));
  flex-shrink: 0;
  transition: all 0.15s;
}
.ide-builder .inv-comp-card:hover .inv-comp-icon {
  background: hsl(var(--cat) / 0.3);
}

/* ── 이름 ── */
.ide-builder .inv-comp-name {
  flex: 1;
  min-width: 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 그립 ── */
.ide-builder .inv-comp-grip {
  flex-shrink: 0;
  color: hsl(var(--muted-foreground) / 0.1);
  transition: color 0.15s;
}
.ide-builder .inv-comp-card:hover .inv-comp-grip {
  color: hsl(var(--cat) / 0.4);
}

/* (palette-section/label 제거됨 — inv-section 으로 대체) */
/* ── 더보기 섹션 ── */
.ide-builder .inv-more-section {
  margin-top: 0.25rem;
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding-top: 0.25rem;
}
.ide-builder .inv-more-toggle {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem;
  margin: 0 0.1rem;
  border-radius: 5px;
  border: 1px dashed hsl(var(--border) / 0.5);
  color: hsl(var(--muted-foreground) / 0.5);
  font-size: 0.6rem;
  font-weight: 600;
  transition: all 0.15s;
}
.ide-builder .inv-more-toggle:hover {
  border-color: hsl(var(--primary) / 0.3);
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.04);
}
.ide-builder .inv-more-toggle::-webkit-details-marker { display: none; }
.ide-builder .inv-more-count {
  font-size: 0.52rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground) / 0.7);
  border-radius: 8px;
  line-height: 1.3;
}
.ide-builder details[open] > .inv-more-toggle {
  border-style: solid;
  border-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.05);
  margin-bottom: 0.35rem;
}
.ide-builder details[open] > .inv-more-toggle .inv-more-count {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

/* ─── 스크롤바 IDE 스타일 ─── */
.ide-builder *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.ide-builder *::-webkit-scrollbar-track {
  background: transparent;
}
.ide-builder *::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.ide-builder *::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ 애니메이션 — 패널 슬라이드, 플로팅 바, 탭, 버튼 트랜지션
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 패널 슬라이드 ── */
@keyframes slide-in-left {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── 플로팅 바 등장 ── */
@keyframes float-in {
  from { transform: translateX(-50%) translateY(-12px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);     opacity: 1; }
}
.ide-builder .canvas-float-tools {
  animation: float-in 0.25s ease;
}

/* ── 탭 전환 — 액티브 언더라인 ── */
.ide-builder .tab-item.active::after {
  animation: tab-underline 0.2s ease;
}
@keyframes tab-underline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── 버튼/아이콘 공통 트랜지션 ── */
.ide-builder .sq-btn,
.ide-builder .tool-btn,
.ide-builder .tb-save,
.ide-builder .tab-item,
.ide-builder .ft-cell,
.ide-builder .ft-toggle {
  transition: all 0.15s ease;
}

/* ── 호버 스케일 피드백 (아이콘 버튼) ── */
.ide-builder .sq-btn:active {
  transform: scale(0.92);
}

/* ── 컴포넌트 카드 드래그 시작 ── */
.ide-builder .inv-comp-card:active {
  transition: transform 0.1s ease;
}

/* ── 플로팅 바 토글 버튼 상태 전환 ── */
.ide-builder .ft-toggle.on {
  transition: color 0.15s ease, background 0.15s ease;
}

/* ── 컬럼 행 호버 좌측 보더 슬라이드 ── */
.ide-builder .inv-col-row {
  transition: background 0.12s ease, border-left-color 0.15s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ 해상도 드롭다운 — v5 Cosmic
   ═══════════════════════════════════════════════════════════════════════════ */
.ide-builder .res-dropdown {
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--primary) / 0.12) !important;
  border-radius: 10px !important;
  padding: 6px !important;
  min-width: 280px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 20px hsl(var(--primary) / 0.08) !important;
  backdrop-filter: blur(12px);
  animation: dropdown-in 0.15s ease;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ide-builder .res-category-label {
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  color: hsl(var(--primary) / 0.5) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 8px 3px !important;
}
.ide-builder .res-item {
  gap: 8px !important;
  padding: 7px 8px !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  color: hsl(var(--foreground) / 0.8) !important;
  transition: all 0.12s !important;
  cursor: pointer !important;
}
.ide-builder .res-item > svg {
  color: hsl(var(--primary) / 0.4);
  flex-shrink: 0;
  width: 14px !important;
  height: 14px !important;
}
.ide-builder .res-item:hover {
  background: hsl(var(--primary) / 0.08) !important;
  color: hsl(var(--foreground)) !important;
}
.ide-builder .res-item:hover > svg {
  color: hsl(var(--primary));
}
.ide-builder .res-item-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
}
.ide-builder .res-item-size {
  font-size: 0.6rem;
  font-family: ui-monospace, monospace;
  color: hsl(var(--muted-foreground) / 0.4);
  margin-left: auto;
  flex-shrink: 0;
}
.ide-builder .res-sep {
  height: 1px;
  margin: 4px 8px;
  background: hsl(var(--primary) / 0.08);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★ 빈 캔버스 안내 — v5 Cosmic
   ═══════════════════════════════════════════════════════════════════════════ */
.ide-builder .empty-canvas-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  animation: empty-fade-in 0.4s ease;
}
.ide-builder .empty-canvas-wrap * {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
@keyframes empty-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ide-builder .empty-canvas {
  text-align: center;
  max-width: 420px;
  padding: 2rem;
}
.ide-builder .empty-canvas-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.12);
  color: hsl(var(--primary) / 0.4);
}
.ide-builder .empty-canvas-title {
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground) / 0.6);
  margin-bottom: 0.4rem;
}
.ide-builder .empty-canvas-desc {
  font-size: 0.72rem;
  color: hsl(var(--muted-foreground) / 0.6);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}
.ide-builder .empty-canvas-shortcuts {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.ide-builder .empty-shortcut-group {
  padding: 8px 12px;
  border-radius: 8px;
  background: hsl(var(--card) / 0.6);
  border: 1px solid hsl(var(--border) / 0.3);
  text-align: left;
}
.ide-builder .empty-shortcut-label {
  display: block;
  font-size: 0.55rem;
  font-weight: 700;
  color: hsl(var(--primary) / 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.ide-builder .empty-shortcut-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 0.6rem;
  color: hsl(var(--muted-foreground) / 0.5);
}
.ide-builder .empty-shortcut-keys kbd {
  font-family: ui-monospace, monospace;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border) / 0.3);
  color: hsl(var(--foreground) / 0.5);
}
