/* ============================================================
   SELVOIR Control Center — 디자인 시스템 (Windly inspired)
   2026-04-30 / DEC-260430-03 / 폰트·가독성 개편 260505
   - 라이트 사이드바 / 충분한 여백 / 노랑·검정 포인트
   - 카드 기반 콘텐츠 / 둥근 모서리 / 미세 그림자
   - 폰트: Pretendard Variable (한글 가독성·감성), JetBrains Mono (수치)
   - 폰트 로드는 index.html <link>에서 처리 (FOUT 최소화)
   ============================================================ */

:root {
  /* 컬러 팔레트 */
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-hover: #eef2f7;
  --bg-soft: #f8fafc;
  --bg-yellow-soft: #fff4cf;
  --bg-yellow: #d2a13a;

  --border: #dde3ec;
  --border-light: #edf1f6;
  --border-strong: #c7d0de;

  /* 본문 색 — 가독성 강화 (260505: muted/secondary 한 단계 진하게) */
  --text-primary: #111827;     /* 거의 검정에 가까운 슬레이트 */
  --text-secondary: #344054;   /* 진한 슬레이트 (이전 #4b5563 → 더 또렷) */
  --text-muted: #667085;       /* 중간 슬레이트 (이전 #9ca3af → 가독성↑) */
  --text-inverse: #ffffff;

  --accent: #151922;
  --accent-blue: #4B5BFF;            /* primary blue (단일 정본) */
  --accent-blue-hover: #3D4BE6;      /* = strong (호버/액티브) */
  --accent-blue-strong: #3D4BE6;     /* 파생: 진한 블루 (hover와 동일 톤) */
  --accent-blue-soft: #EEF1FF;       /* 파생: 옅은 블루 배경 (tag.info 등) */
  --accent-green: #0f8a6a;           /* semantic 성공 단일 */
  --accent-yellow: #d2a13a;
  --accent-red: #d64545;             /* semantic 위험 단일 */

  /* 임무 ⑳(260713) 보드 에디터 선택 유형 3종 — 카드/텍스트(role·텍스트 레이어)/도형·이미지 */
  --sel-card: #2563eb;   /* 카드 선택 - 파랑 */
  --sel-text: #7c3aed;   /* 텍스트 계열(role 레이어·텍스트 레이어) 선택 - 보라 */
  --sel-shape: #ea580c;  /* 도형/이미지 레이어(및 이미지 카드) 선택 - 주황 */

  /* shadow */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 8px 22px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 16px 42px rgba(16, 24, 40, 0.10);

  /* radius — raw 4/5/7/10/12px 난립 정리용 토큰 스케일 */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  /* focus ring — 단일 정본 (포커스 표시 통일) */
  --focus-ring-color: var(--accent-blue);
  --focus-ring-alpha: rgba(47, 111, 237, 0.35);

  /* 타이포 스케일 (--fs-*) — 30+종 난립 정리용 표준 스케일.
     비표준 0.5px/0.2px 단계는 인접 표준값으로 통일 권장.
     기존 하드코딩 px는 점진적으로 아래 토큰을 참조로 치환한다. */
  --fs-2xs: 10px;
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 15px;
  --fs-xl: 17px;
  --fs-2xl: 20px;
  --fs-3xl: 24px;
  --fs-4xl: 28px;

  /* 굵기 스케일 (--fw-*) — 표준 100단위. 850/750/650/450 등 비표준 제거용.
     본 토큰을 참조하면 비표준 무게가 자연히 표준으로 통일된다. */
  --fw-regular: 400;
  --fw-base: 450;          /* 본문 기본 톤 (Pretendard Variable 미세 무게, 의도된 정본) */
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-black: 900;

  /* spacing */
  --sidebar-w: 272px;
  --topbar-h: 56px;

  /* font */
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "D2Coding", "Consolas", "Menlo", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;                  /* 14 → 15: 한글 가독성 */
  line-height: 1.65;                /* 1.55 → 1.65: 호흡 */
  letter-spacing: 0;         /* -0.005 → -0.011: Pretendard 감성 톤 */
  font-weight: var(--fw-base);      /* Variable 폰트의 미세 무게 (regular 400 → 450), 토큰화 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss03", "ss06", "kern", "calt";
  word-break: keep-all;             /* 한글 단어 단위 줄바꿈 (예쁨) */
}
body.ui-density-compact #content { padding: 18px 22px; }
body.ui-density-compact .card,
body.ui-density-compact .section,
body.ui-density-compact .settings-card { padding: 14px 16px; }
body.ui-density-compact .data-tbl td,
body.ui-density-compact .data-tbl th { padding-top: 8px; padding-bottom: 8px; }
h1, h2, h3, h4, h5 {
  letter-spacing: 0;         /* 헤딩 톤 살리기 */
  color: var(--text-primary);
  font-weight: 700;
  word-break: keep-all;
}
h1 { font-size: 28px; line-height: 1.3; }
h2 { font-size: 22px; line-height: 1.35; font-weight: 700; }
h3 { font-size: 17px; line-height: 1.4;  font-weight: 700; }
h4 { font-size: 14px; line-height: 1.45; font-weight: 700; letter-spacing: 0; }
h5 { font-size: 13px; line-height: 1.45; font-weight: 600; letter-spacing: 0; }
button, input, select, textarea {
  font-family: var(--font-sans);
  letter-spacing: 0;
}
/* 숫자(가격·랭크·메트릭) tabular-nums 광범위 적용 (가지런한 정렬) */
.num, td.num, th.right, td.right, b, .b1-price-item b, .pa-progress-pct,
.last-updated, .strip-item b, .metric, .data-tbl td, table#pa-products-table td {
  font-feature-settings: "tnum", "kern";
  font-variant-numeric: tabular-nums;
}
/* .muted 색은 1149줄 정의(--text-muted 사용) 유지. 토큰 자체가 진해짐 */

#app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
#app.sidebar-collapsed { grid-template-columns: 60px 1fr; }

body.auth-pending #app,
body.auth-locked #app {
  display: none;
}
body.auth-ready #login-screen {
  display: none;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.04), rgba(59, 130, 246, 0.06)),
    var(--bg-page);
}
.login-panel {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
  padding: 34px;
}
.login-brand { margin-bottom: 24px; }
.login-wordmark {
  /* 2026-07-21 CEO: 워드마크 세리프 정본 — 사이드바·브랜드 서명과 동일 규격 */
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.1;
  color: #1e222a;
}
.login-wordmark .wm-o,
.login-wordmark .wm-dot { color: #a47e3f; }
.login-wordmark .wm-v { margin-left: 0.11em; }
.login-brand p,
.login-note {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}
/* 2026-06-23(온보딩): 로그인 화면 첫 사용 안내 + 관리자 문의/비밀번호 안내(외부가입 OFF). */
.login-help {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
}
.login-help-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #111827);
}
.login-help-line {
  margin: 4px 0 0;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-secondary, #4b5563);
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: var(--text-secondary);
}
.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 13px 14px;
  font-size: 15px;
  background: #fff;
  color: var(--text-primary);
}
.login-form input:focus {
  outline: 2px solid rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
}
.login-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 9px !important;
  font-weight: 600 !important;
  color: var(--text-secondary);
}
.login-check input {
  width: 17px;
  height: 17px;
}
.login-submit {
  width: 100%;
  min-height: 46px;
}
.login-message {
  min-height: 20px;
  color: var(--accent-red);
  font-size: 13px;
  font-weight: 700;
}
.login-message.login-message-ok { color: var(--accent-green); }
.login-note {
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ============================================================
   SIDEBAR (Windly style — light, grouped, with user card)
   ============================================================ */
#sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

/* 브랜드 영역 — 정본 로고 v2 inline SVG + 사이드바 토글 (2026-05-05) */
.brand-area {
  padding: 14px 18px 12px 22px;
  border-bottom: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
}
.brand { min-width: 0; display: flex; align-items: center; justify-content: flex-start; padding-right: 0; }
.brand .brand-logo {
  width: 100%;
  max-width: 186px;
  height: auto;
  display: block;
}
.sidebar-toggle {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.15s;
  padding: 0;
}
.sidebar-toggle:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.sidebar-toggle svg { width: 13px; height: 13px; stroke-width: 2.2; }

/* collapsed 상태 — 사이드바 60px */
#app.sidebar-collapsed .brand-area { padding: 14px 6px; flex-direction: column; gap: 6px; }
#app.sidebar-collapsed .brand { display: none; }
#app.sidebar-collapsed .user-card { padding: 8px; margin: 8px 6px; gap: 0; justify-content: center; }
#app.sidebar-collapsed .user-meta,
#app.sidebar-collapsed .user-caret { display: none; }
#app.sidebar-collapsed .menu.solo { justify-content: center; padding: 9px 0; margin: 2px 6px; }
#app.sidebar-collapsed .menu.solo .lbl { display: none; }
#app.sidebar-collapsed .group-section-title,
#app.sidebar-collapsed .sidebar-bottom { display: none; }
#app.sidebar-collapsed .toggle-arrow { transform: rotate(180deg); transform-origin: 12px 12px; }

/* 사용자 카드 */
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 10px 12px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}
.user-card:hover { background: var(--bg-hover); border-color: var(--border); }
.user-avatar {
  width: 32px; height: 32px;
  background: var(--accent);
  color: var(--text-inverse);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.user-meta { flex: 1; min-width: 0; }
.user-email {
  font-size: 11px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.user-caret { color: var(--text-muted); font-size: 10px; }

/* 메뉴 */
#nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 12px;
}
#nav::-webkit-scrollbar { width: 6px; }
#nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.menu.solo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  margin: 2px 8px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.12s;
}
.menu.solo:hover { background: var(--bg-hover); color: var(--text-primary); }
.menu.solo.active {
  background: var(--bg-yellow-soft);
  color: var(--text-primary);
  font-weight: 600;
}
.menu .ic {
  font-size: 14px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-muted, #9ca3af);
}
.menu .ic svg { display: block; width: 16px; height: 16px; }
.menu.solo:hover .ic { color: var(--text-primary, #111827); }
.menu.solo.active .ic { color: var(--accent, #f59e0b); }

.group-section {
  margin-top: 12px;
}
.group-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 22px 4px;
}

.group { padding: 0 8px; }
.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.12s;
}
.group-title:hover { background: var(--bg-hover); color: var(--text-primary); }
.gt-left { display: flex; align-items: center; gap: 10px; }
.group-title .caret {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.15s;
}
.group.collapsed .group-title .caret { transform: rotate(-90deg); }
.group-items { padding: 2px 0 4px; }
.group.collapsed .group-items { display: none; }
.group .menu {
  display: block;
  padding: 7px 14px 7px 38px;
  margin: 1px 0;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  font-size: var(--fs-base);
  border-radius: var(--radius-sm);
  transition: all 0.12s;
}
.group .menu:hover { background: var(--bg-hover); color: var(--text-primary); }
.group .menu.active {
  background: var(--bg-yellow-soft);
  color: var(--text-primary);
  font-weight: 600;
}

/* 사이드바 하단 */
.sidebar-bottom {
  padding: 10px 12px 14px;
  border-top: 1px solid var(--border-light);
}
.status-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.status-dot.live {
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.05); }
}
.status-label { font-weight: 500; }
.sidebar-footer {
  margin-top: 8px;
  padding: 0 4px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   MAIN AREA
   ============================================================ */
#main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  min-width: 0;
  overflow: hidden;
}

/* 상단 헤더 */
#topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
#breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}
.page-icon { font-size: 18px; }
.page-title { letter-spacing: 0; }

#topbar-actions { display: flex; gap: 8px; }
.header-utils { display: flex; align-items: center; gap: 10px; }
.last-updated { font-size: 11px; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
/* 콘텐츠 */
#content {
  flex: 1;
  min-height: 0;
  padding: 24px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ============================================================
   카드 / 공통
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0;
  display: flex; align-items: center; gap: 8px;
}
.card h3 {
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.card .row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}

/* 빈 상태 */
.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}
.empty-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 14px;
}
.empty-text { color: var(--text-muted); font-size: 13px; }
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 인라인 작은 스피너 (PA 실행 진행 표시 등) */
.pa-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent, #3b82f6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* 친절 진행 카드 (running/success/failed) */
.job-friendly {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border, #e5e7eb);
  background: #f9fafb;
  font-size: var(--fs-md);
}
.job-friendly.running { background: #eff6ff; border-color: #bfdbfe; }
.job-friendly.success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; font-weight: 600; }
.job-friendly.failed  { background: #fef2f2; border-color: #fecaca; color: #991b1b; flex-direction: column; align-items: flex-start; }
.job-friendly-text { display: flex; flex-direction: column; gap: 2px; }
.job-friendly-title { font-weight: 700; color: var(--text-primary, #111827); }
.job-friendly-stage { font-size: 12px; color: var(--text-secondary, #4b5563); }
.job-friendly-icon { font-size: 16px; font-weight: 700; }

/* 이전 내역 보기 배너 (cycle mode) */
.pa-cycle-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
}
.pa-cycle-banner-text { color: #92400e; }
.pa-cycle-banner button.primary { white-space: nowrap; }

/* 5F-5: 로그인 하단 법적 문서 링크 */
.login-legal-links { margin-top: 14px; text-align: center; font-size: 12px; color: var(--text-secondary, #64748b); }
.login-legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* 5D-5: 편집기 전역 저장 인디케이터 — 헤더 액션 줄의 작은 알약. 색으로만 상태 구분(군더더기 금지) */
.board-global-save {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.board-global-save.is-idle { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.board-global-save.is-busy { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.board-global-save.is-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* 5D-1: 카드 라벨 더블클릭 편집 중 표시 */
.card-split-slot-label.is-label-editing {
  outline: 2px solid var(--accent-blue, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
  cursor: text;
}

/* 5D-2: 단축키 도움말 오버레이 */
#board-shortcut-help {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
#board-shortcut-help .board-help-card {
  background: var(--panel-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  padding: 18px 20px;
  width: min(560px, 92vw);
  max-height: 80vh;
  overflow-y: auto;
}
#board-shortcut-help .board-help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 15px;
}
#board-shortcut-help .board-help-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
#board-shortcut-help .board-help-tbl td { padding: 6px 8px; border-top: 1px solid var(--border-weak, #e2e8f0); }
#board-shortcut-help .board-help-key {
  white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--text-strong, #0f172a);
  font-weight: 600;
  width: 190px;
}

/* 5E-1: 홈 자동 소싱 경고 배너 — pa-cycle-banner와 동일한 앰버 경고 언어, 문제 있을 때만 렌더 */
.home-autorun-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
}
.home-autorun-banner .home-autorun-text { color: #92400e; }
.home-autorun-banner button.primary { white-space: nowrap; }

/* B1 인계된 PA 행 — 회색 + 좌측 초록 보더 + ✓ 뱃지 (강화: 더 또렷한 시각 식별) */
tr.pa-handed-over {
  background: #f5f5f5;
  opacity: 0.65;
  box-shadow: inset 3px 0 0 0 #10b981;
}
tr.pa-handed-over:hover {
  opacity: 1;
  background: #ecfdf5;
  cursor: pointer;
}
tr.pa-handed-over input[type="checkbox"],
tr.pa-handed-over input[type="number"] { cursor: not-allowed; }
.tag.handed {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  background: #10b981;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  letter-spacing: 0.02em;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(16,185,129,0.30);
  transition: transform 0.12s, background 0.12s;
}
.tag.handed:hover { background: #059669; color: #fff; transform: translateY(-1px); }

/* PA 상단 인계 요약 배너 */
.pa-handed-summary {
  background: #ecfdf5;
  border: 1px solid #10b981;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #065f46;
}
.pa-handed-summary b {
  color: #047857;
  font-family: var(--font-mono, monospace);
  padding: 0 2px;
  font-weight: 700;
}
.pa-handed-summary button { white-space: nowrap; }

.platform-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 74px;
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.platform-chip .plat-logo {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.pa-no-th,
.pa-no-cell {
  width: 68px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.pa-no-cell {
  letter-spacing: 0;
}
.pa-price-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 160px;
}
.pa-price-input {
  width: 96px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: 700 13px var(--font-mono, monospace);
  text-align: right;
}
.pa-price-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}
.pa-price-input:disabled {
  background: #f1f5f9;
  color: #64748b;
}
.pa-price-reset {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.pa-price-reset:hover:not(:disabled) {
  border-color: #111827;
  color: #111827;
}
.pa-price-reset:disabled {
  opacity: 0.38;
  cursor: default;
}

/* 현재 기준 재검토 필요 작은 배지 (cycle 모드 한정) */
.cycle-recheck-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  font-size: 10px;
  color: #111827;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 3px;
  font-weight: 600;
}

/* PA 상품 inline 상세 expand row */
.pa-product-row {
  cursor: pointer;
}
.pa-margin-basis {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
}
.pa-product-row:hover {
  background: #f8fafc;
}
.pa-product-row.is-open {
  background: #eef5ff;
  box-shadow: inset 4px 0 0 #3b82f6;
}
.pa-product-row.is-open td {
  border-bottom-color: #bfdbfe;
}
.pa-detail-row > td {
  background: #fafbff;
  border-top: 2px solid var(--accent-blue, #3b82f6);
  border-bottom: 2px solid var(--accent-blue, #3b82f6);
  padding: 0;
}
.pa-detail-inline {
  position: relative;
  padding: 16px 20px 18px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
.pa-detail-close {
  position: absolute;
  top: 8px; right: 10px;
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 50%;
  font-size: 13px;
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.pa-detail-close:hover {
  background: #fee2e2; color: #991b1b; border-color: #fca5a5;
}
.pa-detail-body {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-width: 0;
}
.pa-detail-left { flex: 0 0 auto; }
.pa-detail-img {
  width: 176px; height: 176px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  cursor: zoom-in;
  display: block;
}
.pa-detail-img-empty {
  width: 176px; height: 176px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #9ca3af;
}
.pa-detail-right { flex: 1; min-width: 0; }
.pa-detail-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #111827);
}
.pa-decision-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.pa-decision-sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.pa-decision-sticker small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.pa-decision-sticker b {
  color: #111827;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.pa-decision-sticker.primary {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.pa-decision-sticker.fit {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.pa-decision-sticker.profit {
  border-color: #fde68a;
  background: #fffbeb;
}
.pa-decision-sticker.info {
  border-color: #c7d2fe;
  background: #eef2ff;
}
/* 통과/미달/조건부 — 색으로 한눈에(2026-06-23 명확화) */
.pa-decision-sticker.pass { border-color: #bbf7d0; background: #f0fdf4; }
.pa-decision-sticker.pass b { color: #15803d; }
.pa-decision-sticker.fail { border-color: #fecaca; background: #fef2f2; }
.pa-decision-sticker.fail b { color: #b91c1c; }
.pa-decision-sticker.cond { border-color: #fde68a; background: #fffbeb; }
.pa-decision-sticker.cond b { color: #b45309; }
.pa-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}
/* 정보 탭의 두 카드(매입/공급 정보 · 출고/반품지)를 같은 높이로 맞춤 */
.pa-detail-grid.pa-detail-tabpanel { align-items: stretch; }
/* ── B2 Editor Pro (PPT급 편집) ───────────────────────────── */
.card-image-layer--kind-circle { border-radius: 50%; }
.card-image-layer--kind-line,
.card-image-layer--kind-arrow { min-height: 3px; border-radius: 2px; }
.card-image-layer--kind-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 14px solid currentColor;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  color: inherit;
}
.card-image-layer--kind-bubble::after {
  content: "";
  position: absolute;
  left: 18%;
  bottom: -12px;
  border-top: 13px solid inherit;
  border-top-color: inherit;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}
.card-image-layer--kind-highlight { mix-blend-mode: multiply; }
.card-image-layer.is-locked { outline: 1.5px dashed #b45309 !important; cursor: not-allowed; }
.card-image-layer.is-locked::before {
  content: "잠금";
  position: absolute;
  top: -18px;
  right: 0;
  font-size: 10px;
  font-weight: 800;
  color: #b45309;
  background: #fff7ed;
  padding: 1px 6px;
  border-radius: 6px;
}
.pro-guide-v, .pro-guide-h { position: absolute; z-index: 60; pointer-events: none; background: #f43f5e; }
.pro-guide-v { top: 0; bottom: 0; width: 1px; }
.pro-guide-h { left: 0; right: 0; height: 1px; }
#pro-context-menu {
  position: fixed;
  z-index: 10000;
  min-width: 190px;
  background: #fff;
  border: 1px solid #d6dde8;
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(16, 24, 40, 0.18);
  padding: 5px;
  display: flex;
  flex-direction: column;
}
.pro-ctx-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: var(--fs-base);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #111827;
}
.pro-ctx-item:hover { background: #f1f5f9; }
.pro-ctx-sep { height: 1px; background: #e8edf4; margin: 4px 6px; }
#pro-layer-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  z-index: 9999;
  width: 250px;
  max-height: 46vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d6dde8;
  border-radius: 12px;
  box-shadow: 0 16px 42px rgba(16, 24, 40, 0.2);
  padding: 8px;
}
.pro-layer-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; font-size: 13px; }
.pro-layer-row { display: flex; align-items: center; gap: 3px; padding: 2px 0; }
.pro-layer-row.is-active .pro-layer-name { background: #eef2ff; border-color: #c7d2fe; }
.pro-layer-name {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: var(--fs-sm);
  padding: 5px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pro-layer-mini {
  flex: 0 0 auto;
  font-size: var(--fs-xs);
  padding: 4px 5px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.pro-layer-mini:hover, .pro-layer-name:hover { background: #f8fafc; }

/* AI 소싱 종류(프로필) 선택 — 후보 찾기 버튼 옆 */
.pa-profile-select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d6dde8;
  border-radius: 8px;
  background: #fff;
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--text-primary, #111827);
  cursor: pointer;
}
/* 상세 패널 정보/마진 탭 (가격/마진 섹션 제거 후 탭 분리) */
.pa-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 12px;
  border-bottom: 1px solid #e5e7eb;
}
.pa-detail-tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted, #6b7280);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  margin-bottom: -1px;
}
.pa-detail-tab:hover { color: var(--text-secondary, #4b5563); background: #f8fafc; }
.pa-detail-tab.active {
  color: var(--text-primary, #111827);
  background: #fff;
  border-color: #e5e7eb;
  border-bottom-color: #fff;
}
.pa-detail-price-context {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}
.pa-detail-price-context span { display: inline-flex; flex-direction: column; gap: 2px; }
.pa-detail-price-context small { font-size: 11px; font-weight: 600; color: var(--text-muted, #6b7280); }
.pa-detail-price-context b {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary, #111827);
  font-family: var(--font-mono), var(--font-sans);
}
.pa-detail-top-grid {
  grid-template-columns: minmax(220px, 0.9fr) minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.pa-detail-bottom-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(360px, 1.18fr);
  gap: 14px;
  align-items: start;
}
.pa-detail-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.pa-detail-section h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  color: var(--text-secondary, #4b5563);
}
.pa-detail-section .info-tbl {
  width: 100%;
  table-layout: fixed;
  font-size: var(--fs-base);
}
.pa-detail-section .info-tbl td.lbl {
  width: 96px;
  color: var(--text-muted, #6b7280);
  padding: 4px 8px 4px 0;
}
.pa-detail-section .info-tbl td {
  padding: 4px 0;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.pa-margin-compare { grid-column: auto; }
.pa-margin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.pa-margin-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.pa-margin-card.good { border-color: #bbf7d0; background: #f0fdf4; }
.pa-margin-card.watch { border-color: #fed7aa; background: #fff7ed; }
.pa-margin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pa-margin-card-head b {
  font: 900 18px var(--font-mono, monospace);
}
.pa-margin-shared {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}
.pa-margin-shared label,
.pa-margin-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.pa-margin-shared input,
.pa-margin-controls input[type="number"] {
  width: 82px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 0 8px;
  background: #fff;
  font: 800 12px var(--font-mono, monospace);
  text-align: right;
}
.pa-margin-shared span {
  color: #64748b;
  font-size: var(--fs-sm);
}
.pa-margin-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.pa-margin-check input {
  width: 14px;
  height: 14px;
  margin: 0;
}
.pa-margin-grid {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 6px 10px;
  font-size: 12px;
}
.pa-margin-grid span { color: #64748b; }
.pa-margin-grid b { text-align: right; font-family: var(--font-mono, monospace); }
@media (max-width: 1100px) {
  .pa-detail-top-grid,
  .pa-detail-bottom-grid {
    grid-template-columns: 1fr;
  }
  .pa-margin-cards { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .pa-detail-body { flex-direction: column; }
  .pa-detail-grid { grid-template-columns: 1fr; }
  .pa-detail-bottom-grid { grid-template-columns: 1fr; }
  .pa-margin-cards { grid-template-columns: 1fr; }
}

/* PA 빈 대기 상태 (새로고침 후) */
.pa-empty-state .row { margin-top: 12px; }
.pa-empty-state h2 { margin-bottom: 8px; }

/* PB-B1 카드 UI (CEO 직접 자동 생성 버튼) */
.b1-cards { display: flex; flex-direction: column; gap: 10px; }
.b1-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.b1-card:hover { border-color: var(--accent-blue, #3b82f6); box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.b1-card[data-status="progress"] { background: #eff6ff; border-color: #bfdbfe; }
.b1-card[data-status="ready"] { background: #f0fdf4; border-color: #bbf7d0; }
.b1-card[data-status="failed"] { background: #fef2f2; border-color: #fecaca; }
.b1-card-left { flex: 0 0 auto; }
.b1-card-thumb {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--border, #e5e7eb);
  display: block;
}
.b1-card-thumb-empty {
  width: 80px; height: 80px;
  background: var(--bg-hover, #f3f4f6);
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: var(--radius-sm, 6px);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-muted, #9ca3af); text-align: center;
}
.b1-card-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.b1-card-head .b1-card-name {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary, #111827);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.b1-card-meta { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-secondary, #4b5563); flex-wrap: wrap; }
.b1-card-prices { display: flex; gap: 14px; flex-wrap: wrap; }
.b1-price-item { display: flex; flex-direction: column; gap: 1px; min-width: 60px; }
.b1-price-item label { font-size: var(--fs-xs); color: var(--text-muted, #9ca3af); font-weight: 500; }
.b1-price-item b { font-size: var(--fs-base); font-family: var(--font-mono, monospace); color: var(--text-primary, #111827); }
.b1-price-item.profit b { color: var(--accent-green, #059669); }
.b1-card-right {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  gap: 8px; min-width: 200px;
}
.b1-card-status { font-size: 12px; }
.b1-card-action { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.b1-card-action button { white-space: nowrap; }
.b1-card-action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.b1-card-action-stack button {
  width: 100%;
}
.board-source-subtitle {
  margin: 10px 0 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary, #4b5563);
}
.board-source-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-soft, #f8fafc);
  color: var(--text-secondary, #4b5563);
  font-size: 12px;
  line-height: 1.45;
}
.board-competitor-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 4px solid #111827;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.045), rgba(14, 165, 233, 0.045)),
    #ffffff;
}
.board-competitor-card::before {
  content: "";
  position: absolute;
  top: -44px;
  right: -44px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.055);
}
.board-competitor-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.board-competitor-head h3 {
  margin: 2px 0 5px;
  font-size: 17px;
}
.board-competitor-head p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.board-competitor-kicker {
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
}
.board-competitor-score {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}
.board-competitor-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 10px 0;
}
.board-competitor-metrics span {
  padding: 9px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}
.board-competitor-metrics b {
  display: block;
  color: #111827;
  font-size: 20px;
  line-height: 1;
}
.board-competitor-metrics em {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.board-competitor-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.board-competitor-products {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.board-competitor-products div {
  padding: 8px 9px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
}
.board-competitor-products b {
  display: block;
  color: #111827;
  font-size: 11px;
}
.board-competitor-products p {
  margin: 3px 0 0;
  color: #475569;
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.board-competitor-columns {
  display: grid;
  gap: 10px;
}
.board-competitor-block {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}
.board-competitor-block b {
  font-size: var(--fs-base);
  color: var(--text-primary, #111827);
}
.board-competitor-block p {
  position: relative;
  margin: 0;
  padding-left: 12px;
  color: var(--text-secondary, #4b5563);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.board-competitor-block p::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0f766e;
}
.board-competitor-proof {
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.b1-run-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-weight: 700;
  padding: 9px 14px;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
  transition: all 0.15s;
}
.b1-run-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35); }
.b1-retry-btn {
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
  padding: 7px 12px;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  font-size: var(--fs-base);
}
.b1-retry-btn:hover { background: #fee2e2; }
.pa-spinner.inline {
  display: inline-block;
  width: 12px; height: 12px;
  border-width: 2px;
  vertical-align: middle;
  margin-right: 4px;
}
@media (max-width: 900px) {
  .b1-card { flex-direction: column; }
  .b1-card-right { align-items: stretch; min-width: 0; }
  .b1-card-action button { width: 100%; }
}

/* B1 처리 완료 섹션 (recently_completed) */
.b1-completed-section { margin-top: 24px; }
.b1-completed-section h3 {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.b1-completed-cards { display: flex; flex-direction: column; gap: 8px; }
.b1-completed-card {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-left: 3px solid #10b981;
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.b1-completed-card:hover {
  background: #dcfce7;
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(16,185,129,0.18);
}
.b1-completed-thumb { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; }
.b1-completed-thumb-img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border, #e5e7eb); display: block; }
.b1-completed-thumb-empty {
  width: 56px; height: 56px;
  background: var(--bg-hover, #f3f4f6);
  border: 1px dashed var(--border, #e5e7eb);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted, #9ca3af);
}
.b1-completed-mid { flex: 1; min-width: 0; }
.b1-completed-name {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.b1-completed-meta { font-size: 12px; margin-top: 2px; }
.b1-completed-right { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.b1-completed-right .btn-sm { font-size: 12px; padding: 5px 10px; white-space: nowrap; }
.strip-item.is-hidden { display: none; }
@media (max-width: 768px) {
  .b1-completed-card { flex-direction: column; align-items: stretch; }
  .b1-completed-right { justify-content: space-between; }
}

/* Image Board v2 — 섹션 + 원본 후보 영역 + 드래그앤드롭 */
.board-header { padding-bottom: 10px; }
.board-header h2 { font-size: 17px; }
.board-layout-v2 {
  display: grid;
  /* FIX 2026-05-09: 좌측 섹션 영역 더 넓게 (CEO P0 — "섹션 이미지 창 너무 좁아 카드 순서 못 바꿈")
     360px → 260px. 상시 스크롤바 회피로 우측은 sticky만 유지하고 좌측 1fr 확보. */
  grid-template-columns: minmax(0, 1.5fr) 280px;
  gap: 16px;
  align-items: start;
}
.board-left { min-width: 0; }
.board-right {
  min-width: 260px;
  width: 280px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}
.board-right .card {
  position: static;
  top: auto;
  /* 우측 패널 카드 자체가 화면 끝에 잘리지 않도록 */
  max-height: none;
  overflow: visible;
}
.board-right .card + .card { margin-top: 12px; }
.board-side-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.board-side-bottom .card h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.board-side-bottom .card label { display: block; margin: 6px 0 2px; font-size: var(--fs-sm); }
.board-side-bottom .card input[type="text"] { width: 100%; padding: 6px 8px; font-size: var(--fs-base); border: 1px solid var(--border); border-radius: 4px; }
.board-meta-actions,
.board-package-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.board-meta-actions button,
.board-package-actions button { flex: 1 1 120px; }
/* 2026-07-21 CEO("설정 메뉴 뷰티") 재설계: 폭 상한으로 정돈, 카드 헤더는 제목→설명 세로 위계,
   카드 라운드·그림자 절제, 브랜드 서명은 2열 콤팩트 슬롯. */
.settings-page { display: flex; flex-direction: column; gap: 18px; max-width: 1180px; margin: 0 auto; width: 100%; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; align-items: start; }
/* 설정 5카드 복원(2026-06-10): 편집 가능한 행 + 입력 컨트롤 */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: var(--fs-base);
}
.settings-row b { color: var(--text-muted, #6b7280); font-weight: 600; flex: 0 0 auto; }
/* 2026-06-23(死설정 정직): 서버 미연동(준비중) 설정 행은 흐리게 + '준비중' 배지로 정직 표시. */
.settings-row--soon { opacity: 0.62; }
.settings-row--soon .settings-input[disabled] { background: #f6f8fb; color: #9aa3af; cursor: not-allowed; }
.settings-soon-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef1f6;
  color: #8a93a3;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}
.settings-input {
  flex: 0 1 180px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d6dde8;
  border-radius: 7px;
  background: #fff;
  font-size: var(--fs-base);
  color: var(--text-primary, #111827);
}
.settings-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
}
.settings-card-wide { grid-column: span 2; }
.settings-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.settings-card h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.settings-card-head span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
}

/* 브랜드 서명 카드 — 첫/끝 장 2열 콤팩트 슬롯 */
.brand-slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brand-slot {
  border: 1px solid #eef1f6;
  border-radius: 12px;
  padding: 12px;
  background: #fafbfc;
  min-width: 0;
}
.brand-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.brand-slot-title { font-size: 12.5px; font-weight: 700; color: #111827; }
.brand-slot-preview {
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 8px;
  overflow: hidden;
}
.brand-slot-preview img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.brand-slot-preview .muted { font-size: 12px; }
.brand-slot-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.brand-slot input[type="file"] { display: none; }
.brand-file-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.brand-file-btn:hover { border-color: #94a3b8; }
.brand-file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 11.5px;
}
.settings-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-form-grid label,
.settings-full {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.settings-form-grid input,
.settings-form-grid select,
.settings-full textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text-primary);
  font-size: 14px;
}
.settings-full { margin-top: 14px; }
.settings-full textarea { min-height: 92px; resize: vertical; }
.settings-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.settings-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 700; color: var(--text-secondary); }
.settings-check-grid .settings-check { margin-top: 0; }
.settings-card-note {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}
.settings-readonly {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.settings-readonly > b {
  color: #111827;
  font-size: 13px;
}
.settings-status-row,
.settings-gate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.settings-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12px;
}
.settings-status-chip b {
  color: #111827;
  font-size: 12px;
}
.settings-status-chip small {
  color: #64748b;
  font-weight: 700;
}
.settings-status-chip.ok {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}
.settings-status-chip.locked {
  border-color: #e2e8f0;
  background: #f8fafc;
}
.settings-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.settings-actions-sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 2px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(248,249,251,0), var(--bg-page) 42%);
}
.section-head.compact { margin-top: 6px; }

/* 섹션 리스트 (소구점 ↔ 사진 교차) — 카드 grid 형식 (260505 fix) */
.board-section-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 40px;
  max-height: none;
  overflow: visible;
  padding-right: 4px;
  scroll-padding-top: 8px;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  align-items: stretch;
}
.board-section-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.08s;
  cursor: grab;
  position: relative;
  min-height: 240px;
}
.board-section-card:hover {
  border-color: var(--accent-blue, #3b82f6);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
/* FIX 2026-05-09 v2 (CEO P0 — 카드 크기 튐 제거):
   - transition은 box-shadow/opacity만. transform은 안정성 위해 transition 제외.
   - dragging: scale 제거 (size 변형 X), 살짝 회전 + 그림자만.
   - hover transform 제거. drag 중 nudge transform 비활성. */
.board-section-card,
.card-pitch,
.card-image {
  transition: box-shadow 0.18s ease-out, opacity 0.18s ease-out;
}
.board-section-card.dragging,
.selvoir-section-pair.dragging,
.card-pitch.dragging,
.card-image.dragging {
  opacity: 0.6;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.30), 0 4px 10px rgba(0,0,0,0.15);
  cursor: grabbing;
  z-index: 50;
  /* transform 의도적으로 비움 — size/layout 변형 0 */
}
/* FIX 2026-05-09: 드롭 위치 인디케이터 — card-pitch / card-image 포함 확장 */
.board-section-card.drop-indicator-above,
.board-section-card.drop-indicator-below,
.selvoir-section-pair.drop-indicator-above,
.selvoir-section-pair.drop-indicator-below,
.card-pitch.drop-indicator-above,
.card-pitch.drop-indicator-below,
.card-image.drop-indicator-above,
.card-image.drop-indicator-below { position: relative; transition: box-shadow 0.1s; }
.board-section-card.drop-indicator-above::before,
.selvoir-section-pair.drop-indicator-above::before,
.card-pitch.drop-indicator-above::before,
.card-image.drop-indicator-above::before {
  content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 4px;
  background: #2563eb; border-radius: 2px;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
  z-index: 10;
}
.board-section-card.drop-indicator-below::after,
.selvoir-section-pair.drop-indicator-below::after,
.card-pitch.drop-indicator-below::after,
.card-image.drop-indicator-below::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 4px;
  background: #2563eb; border-radius: 2px;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
  z-index: 10;
}
/* F2+F3 drag UX — ghost, nudge, list highlight (2026-05-09) */
#board-drag-ghost {
  position: fixed; pointer-events: none; z-index: 10000;
  width: 200px; padding: 8px 12px;
  background: white; border: 2px solid #2563eb;
  border-radius: 6px; box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  font-size: 13px; transform: translate(-50%, -50%);
  transition: opacity 0.1s;
}
/* FIX 2026-05-09 v2 (CEO P0): nudge transform 완전 제거 — 인접 카드 흔들림 root cause.
   hover transform도 제거 — 드래그 시 마우스가 hover 토글하며 진동 유발. */
.board-section-card.nudge-up,
.card-pitch.nudge-up,
.card-image.nudge-up,
.board-section-card.nudge-down,
.card-pitch.nudge-down,
.card-image.nudge-down { /* transform 없음 — layout 흔들림 0 */ }
/* hover 시 cursor만 변경. 카드 위치 변경 X. */
.card-pitch:hover:not(.dragging),
.card-image:hover:not(.dragging) {
  cursor: grab;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.board-section-list.drag-target-active {
  background: rgba(37, 99, 235, 0.05);
  border: 2px dashed #2563eb;
  border-radius: 6px;
}
/* 2026-06-18 카드 모던화(CEO: 안촌스럽게) — 색 상단줄·파스텔 배경 제거, 종류 구분은 절제된 배지로. */
.board-section-card.is-usp { background: #ffffff; }
.board-section-card.is-photo { background: #ffffff; }
.board-section-handle {
  position: absolute;
  top: 8px; right: 42px;
  color: var(--text-muted);
  cursor: grab;
  font-size: 13px;
  opacity: 0.5;
  transition: opacity 0.15s;
}
.board-section-card:hover .board-section-handle,
.selvoir-section-pair:hover .board-section-handle { opacity: 1; }
.section-delete-x,
.rep-delete-x {
  position: absolute;
  z-index: 6;
  width: 26px;
  height: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  color: #64748b;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  line-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.section-delete-x { top: 8px; right: 8px; }
.rep-delete-x { top: 6px; right: 6px; }
.section-delete-x:hover,
.rep-delete-x:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}
.card-delete-x { right: 44px; }
.card-image-delete-x {
  top: 10px;
  right: 48px;
  z-index: 15;
}
.card-pitch-delete-x {
  top: 10px;
  right: 48px;
  z-index: 15;
}
.card-image-visual {
  position: relative;
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}
.card-image-visual img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.card-image-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  z-index: 4;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--image-overlay-bg, rgba(15, 23, 42, 0.62));
  color: var(--image-overlay-color, #fff);
  font-size: var(--image-overlay-size, 24px);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.22);
  pointer-events: none;
  word-break: keep-all;
}
.card-image-overlay.is-empty { display: none; }
.card-image-overlay--top { top: 14px; }
.card-image-overlay--center { top: 50%; transform: translateY(-50%); }
.card-image-overlay--bottom { bottom: 14px; }
.card-image-layer {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  color: #fff;
  background: #111827;
  font-weight: 800;
  line-height: 1.22;
  text-align: center;
  word-break: keep-all;
  cursor: move;
  user-select: none;
  touch-action: none;
}
.card-image-layer-text {
  display: block;
  width: 100%;
  min-width: 0;
  pointer-events: auto;
  cursor: inherit;
  -webkit-user-select: none;
  user-select: none;
  white-space: pre-wrap;
}
.card-image-layer.is-editing-text {
  cursor: text;
}
.card-image-layer.is-editing-text .card-image-layer-text {
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
  caret-color: #4f6df5;
}
.card-image-layer--shape {
  border-radius: 14px;
}
.card-image-layer-text[contenteditable="true"]:focus {
  outline: none;
}
.card-image-layer-text[contenteditable="true"]:empty::before {
  content: attr(data-placeholder);
  opacity: .58;
}
.card-image-layer.is-selected .card-image-layer-text[contenteditable="true"]:focus {
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.58);
}
.card-image-layer[data-group-id]:not([data-group-id=""]) {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(245, 158, 11, 0.36);
}
.card-image-layer.is-selected {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 12px 30px rgba(15, 23, 42, 0.22);
}
/* 2026-08-18 CEO "텍스트 상자 크기 조절 못 한다": 핸들이 10px 점이라 안 보였다 — PPT처럼 흰 사각 핸들
   (14px, 색 테두리)로 키우고 모서리 커서를 그대로 둔다. 잡는 면적은 22px(::before)로 넓힌다. */
.image-overlay-resize-handle {
  position: absolute;
  z-index: 8;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid #2563eb;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .35);
  display: none;
  pointer-events: auto;
}
.image-overlay-resize-handle::before { content: ""; position: absolute; inset: -5px; }
.card-image-layer.is-selected .image-overlay-resize-handle { display: block; }
.image-overlay-resize-handle-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.image-overlay-resize-handle-n { left: 50%; top: -8px; transform: translateX(-50%); cursor: ns-resize; }
.image-overlay-resize-handle-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.image-overlay-resize-handle-e { right: -8px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.image-overlay-resize-handle-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.image-overlay-resize-handle-s { left: 50%; bottom: -8px; transform: translateX(-50%); cursor: ns-resize; }
.image-overlay-resize-handle-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.image-overlay-resize-handle-w { left: -8px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.card-image-layer.is-selected { cursor: move; }
.image-overlay-rotate-handle {
  position: absolute;
  left: 50%;
  top: -34px;
  z-index: 9;
  display: none;
  width: 20px;
  height: 20px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .3);
  color: #ffffff;
  cursor: grab;
  pointer-events: auto;
  transform: translateX(-50%);
  touch-action: none;
}
.card-image-layer.is-selected .image-overlay-rotate-handle { display: inline-flex; }
.image-overlay-rotate-handle:active { cursor: grabbing; }
.image-overlay-rotate-handle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-image.is-toolbar-selected {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.24), 0 16px 40px rgba(15, 23, 42, 0.1);
}
.card-split-textarea--compact {
  min-height: 56px;
}
.board-section-type-badge {
  display: inline-block; padding: 3px 9px; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px; background: var(--bg-hover); color: var(--text-secondary);
  white-space: nowrap;
  align-self: flex-start;
}
.board-section-card.is-usp .board-section-type-badge { background: #f1f5f9; color: #334155; }
.board-section-card.is-photo .board-section-type-badge { background: #eff6ff; color: #2563eb; }

/* (2026-08-19: 사업부 확장 전용 스타일은 확장 모듈의 css로 이동) */






















/* 2026-06-18 오늘리포트 — 하나의 집중된 문서(단일 컬럼·일관된 카드 크기) */






































.c-wt { color: var(--text-secondary); }
.c-pnl { font-weight: 700; }
.c-trend { color: var(--text-secondary); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }












.c-stop { color: #dc2626; font-weight: 600; }
.c-b1, .c-b2 { color: var(--text-secondary); }




.c-na { color: var(--text-muted); font-style: normal; }




 
 


.board-section-img {
  width: 100%;
  height: 130px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.board-section-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.board-section-empty { font-size: 11px; color: var(--text-muted); }
.board-pitch-card {
  width: 100%;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: #ffffff;
  border-left: 3px solid #cbd5e1;
  color: var(--text-primary);
}
.board-pitch-card b { font-size: 13px; line-height: 1.3; }
.board-pitch-card span { font-size: var(--fs-sm); line-height: 1.35; color: var(--text-secondary); }
.board-section-info {
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--fs-sm);
  margin-top: auto;     /* 카드 하단 push */
}
.board-section-info > span.muted.small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.board-section-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.board-section-card:hover .board-section-actions { opacity: 1; }
.board-section-actions .btn-sm {
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

/* 소구점 카드 in-place 텍스트 (B2 Step 4-B) */
.board-section-pitch {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.board-pitch-display {
  cursor: text;
  padding: 6px 4px;
  border-radius: 4px;
  transition: background 0.12s;
  position: relative;
}
.board-pitch-display:hover {
  background: rgba(15, 23, 42, 0.04);
}
.board-pitch-display:hover .board-pitch-hint { opacity: 1; }
.board-pitch-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  line-height: 1.35;
}
.board-pitch-body {
  font-size: var(--fs-base);
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.board-pitch-hint {
  font-size: var(--fs-xs);
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.12s;
  text-align: right;
  font-style: italic;
}
.board-pitch-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}
.board-pitch-title-input {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  color: #92400e;
}
.board-pitch-body-input {
  width: 100%;
  font-size: var(--fs-base);
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}
.board-pitch-title-input:focus,
.board-pitch-body-input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}
.board-pitch-editor-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* 대표 후보 카드 — AI 생성 버튼 */
.board-rep-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.board-rep-card:hover .board-rep-actions { opacity: 1; }
.board-rep-actions .btn-sm { font-size: 11px; padding: 3px 8px; }

/* 대표 이미지 grid */
.board-rep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  min-height: 40px;
}
.board-rep-ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 8px;
  background: #eff6ff;
  color: #0f172a;
}
.board-rep-ai-status.is-hidden {
  display: none;
}
.board-rep-ai-status.is-error {
  border-color: rgba(220, 38, 38, 0.24);
  background: #fef2f2;
}
.board-rep-ai-status.is-done {
  border-color: rgba(16, 185, 129, 0.24);
  background: #ecfdf5;
}
.board-rep-ai-status b {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}
.board-rep-ai-status p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
}
.board-rep-grid .board-section-card {
  grid-template-columns: 1fr;
  cursor: grab;
}
.board-rep-grid .board-section-img { width: 100%; height: 140px; }
.board-rep-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  cursor: grab;
  position: relative;
}
.board-rep-card.selected {
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.18), 0 10px 24px rgba(16, 185, 129, 0.12);
}
.board-rep-card .board-section-img { width: 100%; height: 140px; }

.board-rep-card.is-ai-running {
  cursor: wait;
  overflow: hidden;
  border-color: rgba(17, 24, 39, 0.58);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.board-rep-card.is-ai-running .board-section-img,
.board-rep-card.is-ai-running .board-section-info,
.board-rep-card.is-ai-running .board-rep-actions {
  filter: saturate(0.8) brightness(0.82);
}

.rep-ai-overlay {
  position: absolute;
  z-index: 8;
  inset: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  min-height: 150px;
  padding: 14px;
  overflow: hidden;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.8)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 12px);
  backdrop-filter: blur(8px);
}

.rep-ai-glow {
  position: absolute;
  inset: -20% -45%;
  background: linear-gradient(105deg, transparent 35%, rgba(96, 165, 250, 0.24) 48%, rgba(245, 158, 11, 0.18) 55%, transparent 68%);
  transform: translateX(-36%) rotate(3deg);
  animation: repAiSweep 1.8s ease-in-out infinite;
}

.rep-ai-orbit {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.5);
}

.rep-ai-orbit span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fbbf24;
  border-right-color: #60a5fa;
  animation: repAiSpin 0.86s linear infinite;
}

.rep-ai-overlay b,
.rep-ai-overlay p,
.rep-ai-progress {
  position: relative;
  z-index: 1;
}

.rep-ai-overlay b {
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0;
}

.rep-ai-overlay p {
  margin: 0;
  max-width: 92%;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.rep-ai-progress {
  width: 100%;
  height: 6px;
  margin-top: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.rep-ai-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #fbbf24);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.45);
  transition: width 0.28s ease;
}

@keyframes repAiSweep {
  0% { transform: translateX(-38%) rotate(3deg); opacity: 0.55; }
  50% { opacity: 0.9; }
  100% { transform: translateX(38%) rotate(3deg); opacity: 0.55; }
}

@keyframes repAiSpin {
  to { transform: rotate(360deg); }
}

.rep-selected-check {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #10b981;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
}

.board-rep-card.selected .rep-delete-x + .rep-selected-check {
  right: 38px;
}

/* 원본 사진 후보 그리드 (우측 패널) — DEC-260506-XX: 썸네일 확대 + 의미 분할 캡션 표시 */
.board-source-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  /* 우측 카드 max-height에 맡기고 grid 자체는 자연 흐름 */
}
.board-source-thumb {
  aspect-ratio: 1;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: grab;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: border-color 0.12s, transform 0.08s;
  position: relative;
}
.board-source-thumb:hover { border-color: var(--accent-blue, #3b82f6); transform: translateY(-1px); }
.board-source-thumb.dragging { opacity: 0.4; }
.board-source-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-source-thumb .source-thumb-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: var(--fs-xs);
  padding: 2px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-source-empty { font-size: 11px; color: var(--text-muted); }
.board-source-section-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary, #475569);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.board-source-section-label::before {
  content: '';
  display: inline-block;
  width: 4px; height: 12px;
  border-radius: 2px;
  background: var(--accent-blue, #3b82f6);
}

@media (max-width: 1100px) {
  .board-layout-v2 { grid-template-columns: 1fr; }
  .board-right { min-width: 0; width: auto; }
  .board-right .card { position: static; max-height: none; overflow: visible; }
  .board-source-grid { grid-template-columns: repeat(4, 1fr); }
  .board-side-bottom { grid-template-columns: 1fr; }
  .settings-grid,
  .settings-form-grid { grid-template-columns: 1fr; }
  .settings-card-wide { grid-column: span 1; }
  .settings-check-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .board-section-img { height: 110px; }
  .board-section-card { min-height: 200px; }
  .board-source-grid { grid-template-columns: repeat(3, 1fr); }
}

/* F5: USP fallback badge */
.usp-fallback-title {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: #9ca3af;
  vertical-align: middle;
}
.usp-fallback-template {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: #9ca3af;
  border: 1px dashed #d1d5db;
  border-radius: 3px;
  padding: 0 3px;
  vertical-align: middle;
}

/* z-layer: dropdown 1000, toast 9999, lightbox-backdrop 10499, lightbox 10500 */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 10499;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-modal {
  position: relative;
  z-index: 10500;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-modal img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  display: block;
}
.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-modal--zoomable {
  width: min(96vw, 1320px);
  height: min(92vh, 980px);
  max-width: 96vw;
  max-height: 92vh;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  overflow: hidden;
  align-items: stretch;
  box-shadow: 0 24px 90px rgba(0,0,0,0.55);
}
.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  color: #f8fafc;
  background: rgba(15,23,42,0.94);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.lightbox-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}
.lightbox-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.lightbox-tool-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.lightbox-tool-btn:hover {
  background: rgba(255,255,255,0.16);
}
.lightbox-tool-btn-wide {
  min-width: 54px;
  padding: 0 12px;
  font-size: 13px;
}
.lightbox-zoom-label {
  width: 54px;
  text-align: center;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.lightbox-modal--zoomable .lightbox-close {
  position: static;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 24px;
  line-height: 30px;
  opacity: 1;
}
.lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  cursor: zoom-in;
  touch-action: none;
}
.lightbox-stage.is-zoomed {
  cursor: grab;
}
.lightbox-stage.is-dragging {
  cursor: grabbing;
}
.lightbox-modal--zoomable .lightbox-image {
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 42px rgba(0,0,0,0.45);
  display: block;
  transform-origin: center center;
  transition: transform 0.06s ease-out;
  user-select: none;
  will-change: transform;
}
.board-section-img img,
.board-rep-card img,
.board-source-thumb img {
  cursor: pointer;
  transition: box-shadow 0.12s;
}
.board-section-img img:hover,
.board-rep-card img:hover,
.board-source-thumb img:hover {
  box-shadow: 0 0 0 2px var(--accent-blue, #3b82f6);
}

/* PA 진행 상태 카드 (attach + progress bar) */
.pa-progress-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md, 8px);
  padding: 14px 18px;
  text-align: center;
}
.pa-progress-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 38px;
  padding: 0 72px;
  position: relative;
}
.pa-progress-title-block {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}
.pa-progress-title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text-primary, #111827);
}
.pa-progress-stage {
  font-size: 12px;
  color: var(--text-secondary, #4b5563);
  margin-top: 2px;
}
.pa-progress-pct {
  font-size: 18px;
  font-weight: 700;
  color: #1d4ed8;
  font-family: var(--font-mono, monospace);
  min-width: 56px;
  position: absolute;
  right: 0;
  text-align: right;
  top: 50%;
  transform: translateY(-50%);
}
/* 2026-06-23(진행률 정직): 예상 진행률 캡션 + 안내문. 기존 .pa-progress-pct 절대배치 유지. */
.pa-progress-pct-block {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
}
.pa-progress-pct-block .pa-progress-pct {
  position: static;
  transform: none;
  top: auto;
  display: block;
}
.pa-progress-pct-cap {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 1px;
}
.pa-progress-note {
  margin-top: 8px;
  text-align: center;
}
.pa-progress-bar {
  height: 10px;
  background: #dbeafe;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.pa-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
  min-width: 4px;
}

/* 잠긴 버튼 시각 표시 */
button.locked,
button.locked:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* PA running 상태 카드 (이전 결과 표시 X, progress UI만) */
.pa-running-state h2 { margin-bottom: 6px; }
.pa-running-state .row { margin-top: 10px; }

/* 홈 탭 PA 진행 카드 (PA 화면 progress 디자인 이식) */
.home-pa-progress { transition: box-shadow 0.15s, transform 0.15s; }
.home-pa-progress:hover { box-shadow: 0 4px 12px rgba(37,99,235,0.18); transform: translateY(-1px); }

/* status-strip 안 mini progress (홈 PA 후보 칸) */
.strip-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.strip-progress-text {
  font-size: 12px;
  color: var(--text-secondary, #4b5563);
  display: flex;
  align-items: center;
  gap: 4px;
}
.strip-item .strip-progress-text b,
.strip-progress-text b,
.strip-progress-text b.info { color: #2563eb; font-family: var(--font-mono, monospace); font-size: 18px; font-weight: 800; letter-spacing: 0; padding: 0 2px; }
.strip-progress-bar {
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.strip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
  min-width: 2px;
}

/* 토스트 (alert/confirm 대체) — 우상단 fade in/out, 3초 자동 제거 */
#toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 240px;
  max-width: 420px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #1f2937;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #059669; }
.toast-error { background: #b91c1c; }
.toast-warn { background: #b45309; }
.toast-info { background: #1f2937; }

.muted { color: var(--text-muted); font-size: 12px; }
code {
  background: var(--bg-hover);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  overflow: auto;
  font-size: 11px;
  font-family: var(--font-mono);
  max-height: 240px;
  line-height: 1.5;
}

/* ============================================================
   테이블
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 2px solid #d0d0d0;
}
thead th { border-bottom: 2px solid #d0d0d0; }
tr:hover td { background: var(--bg-soft); }
td.num { text-align: right; font-family: var(--font-mono); font-size: 12px; }

/* ============================================================
   버튼
   ============================================================ */
button.primary, button.warn, button.subtle, button.ghost {
  border: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button.primary {
  background: var(--accent);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}
button.primary:hover { background: #1f2937; box-shadow: var(--shadow-md); transform: translateY(-1px); }
button.warn { background: var(--accent-red); color: var(--text-inverse); }
button.warn:hover { background: #dc2626; }
button.subtle {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
button.subtle:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }
button.ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
button.ghost:hover { background: var(--bg-hover); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   태그·배지
   ============================================================ */
/* .tag — 단일 정본 (이전: 2911 + 5506 두 블록으로 분산. 5506 블록이 cascade로
   이기던 최종값을 그대로 합침: padding 4px 9px, border 1px transparent, weight 통일,
   .ok/.warn/.error/.info/.idle 색은 5506 변형값이 최종이었음). */
.tag {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
}
.tag.ok { background: #e8f7f1; border-color: #c6eadc; color: #087657; }
.tag.warn { background: #fff5d9; border-color: #f1d992; color: #8a6416; }
.tag.error { background: #fff0f0; border-color: #f2c7c7; color: #9b2525; }
.tag.danger { background: #fee2e2; color: #991b1b; }  /* 이전 computed 유지 (border transparent) */
.tag.idle { background: #f3f6fa; border-color: #e4e9f1; color: #526071; }
.tag.info { background: var(--accent-blue-soft); border-color: #cfe0ff; color: var(--accent-blue-strong); }
button.subtle.danger, .subtle.danger { color: #b91c1c; border-color: #fecaca; }
button.subtle.danger:hover, .subtle.danger:hover { background: #fef2f2; border-color: #f87171; }
.storyline-reference-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.storyline-reference-row .storyline-reference-url { flex: 1; }
.storyline-ref-cost { font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: 1px 7px; border-radius: var(--radius-md); white-space: nowrap; }
.storyline-ref-cost:empty { display: none; }
.storyline-ref-cost.free { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; }
.storyline-ref-cost.paid { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }

/* ============================================================
   입력
   ============================================================ */
input[type=text], input[type=url], input[type=number], textarea, select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  background: var(--bg-card);
  transition: all 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
textarea { font-family: var(--font-mono); min-height: 90px; resize: vertical; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
  margin-top: 10px;
}

/* ============================================================
   PA 상품 테이블 (DEC-260430-02)
   ============================================================ */
.pa-thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.pa-thumb:hover { transform: scale(1.05); border-color: var(--accent-blue); }
.pa-thumb-empty {
  width: 56px; height: 56px;
  background: var(--bg-hover);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}
.pa-thumb-empty span { font-weight: 600; font-size: 10px; }
.pa-thumb-empty small { font-size: 8px; opacity: 0.8; }

/* 상품명 셀 */
.cell-name { max-width: 280px; }
.cell-name a {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0;
}
.cell-name a:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cell-name .kw { color: var(--text-muted); font-size: 11px; margin-top: 2px; }

/* AI 소싱 CTA 버튼 — 컬러 AI 박스 + 반짝이 별 3개 (260505 v4: 셋 다 height 38px 매칭 / 아이콘 24x22) */
.btn-ai-sourcing,
.btn-history,
.btn-refresh {
  height: 38px;
  box-sizing: border-box;
  line-height: 1;
}
.btn-ai-sourcing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ai-sourcing .ai-sourcing-icon {
  flex-shrink: 0;
  vertical-align: middle;
  width: 24px;
  height: 22px;
  filter: drop-shadow(0 1.5px 2.5px rgba(168, 85, 247, 0.35));
  transition: transform 0.3s ease-out, filter 0.3s ease-out;
}
/* 별 3개 — 항상 미세하게 반짝거리는 idle 애니메이션 (각각 다른 phase) */
.ai-sourcing-icon .ai-spk-1 {
  transform-origin: 25.5px 7px;
  animation: aiSparkle1 1.8s ease-in-out infinite;
}
.ai-sourcing-icon .ai-spk-2 {
  transform-origin: 29.4px 12px;
  animation: aiSparkle2 2.2s ease-in-out infinite;
}
.ai-sourcing-icon .ai-spk-3 {
  transform-origin: 27px 17.2px;
  animation: aiSparkle3 2.6s ease-in-out infinite;
}
@keyframes aiSparkle1 {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.2); }
}
@keyframes aiSparkle2 {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50%      { opacity: 1;   transform: scale(1.18); }
}
@keyframes aiSparkle3 {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.22); }
}
/* hover 시 박스 자체가 살짝 회전 + 확대, 그림자 강조 */
.btn-ai-sourcing:hover .ai-sourcing-icon {
  transform: scale(1.18) rotate(3deg);
  filter: drop-shadow(0 2.5px 4px rgba(168, 85, 247, 0.55));
}
/* hover 시 별 3개 sparkle 더 빠르게·강하게 */
.btn-ai-sourcing:hover .ai-sourcing-icon .ai-spk-1 { animation-duration: 0.9s; }
.btn-ai-sourcing:hover .ai-sourcing-icon .ai-spk-2 { animation-duration: 1.1s; }
.btn-ai-sourcing:hover .ai-sourcing-icon .ai-spk-3 { animation-duration: 1.3s; }
/* prefers-reduced-motion 정합 — 움직임 OFF 환경에서는 idle sparkle 멈춤 */
@media (prefers-reduced-motion: reduce) {
  .ai-sourcing-icon .ai-spk-1,
  .ai-sourcing-icon .ai-spk-2,
  .ai-sourcing-icon .ai-spk-3 { animation: none; }
  .btn-ai-sourcing:hover .ai-sourcing-icon { transform: none; }
}

/* "이전 내역 불러오기" 폴더 — hover 시 종이가 위로 살짝 튀어오름 (260505) */
.btn-history { display: inline-flex; align-items: center; gap: 8px; }
.btn-history .history-folder-icon {
  flex-shrink: 0;
  vertical-align: middle;
  overflow: visible;
}
.history-folder-icon .paper-sheet {
  transform-origin: 9px 6px;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease-out;
}
.btn-history:hover .history-folder-icon .paper-sheet {
  transform: translateY(-3.5px) rotate(-5deg);
  filter: drop-shadow(0 1px 1.5px rgba(146, 64, 14, 0.3));
}
.history-folder-icon .folder-base {
  transition: filter 0.2s ease-out;
}
.btn-history:hover .history-folder-icon .folder-base {
  filter: drop-shadow(0 1.5px 2px rgba(146, 64, 14, 0.25));
}

/* "새로고침" 화살표 — hover 시 한 번 360도 회전 (260505) */
.btn-refresh { display: inline-flex; align-items: center; gap: 8px; }
.btn-refresh .refresh-icon {
  flex-shrink: 0;
  vertical-align: middle;
  transition: transform 0.6s ease-in-out;
  color: var(--text-secondary);
}
.btn-refresh:hover .refresh-icon {
  transform: rotate(360deg);
  color: var(--accent-blue);
}

/* prefers-reduced-motion 정합 (history/refresh 추가) */
@media (prefers-reduced-motion: reduce) {
  .btn-history:hover .history-folder-icon .paper-sheet { transform: none; }
  .btn-refresh:hover .refresh-icon { transform: none; }
}

/* PA 표 — 본문 셀 강제 중앙정렬 (ID specificity 매칭) */
table#pa-products-table th,
table#pa-products-table td { text-align: center; }
table#pa-products-table td.cell-name,
table#pa-products-table td.cell-name a,
table#pa-products-table td.cell-name .kw { text-align: center; }
table#pa-products-table td .plat-cell { justify-content: center; }
/* 가격·숫자 컬럼은 우측 정렬 유지 (specificity 더 높음) */
table#pa-products-table th.right, table#pa-products-table td.right { text-align: right; }
table#pa-products-table td.num { font-family: var(--font-mono); font-size: var(--fs-base); text-align: right; }
table#pa-products-table td.num.strong { font-weight: 700; color: var(--text-primary); }
table#pa-products-table td.rank { color: var(--text-muted); font-size: 11px; font-weight: 600; text-align: center; }

/* 판매가 input 상태 */
.price-status { display: inline-block; margin-left: 6px; font-size: 10px; vertical-align: middle; }
.price-status .ps-dirty { color: #92400e; background: #fef3c7; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.price-status .ps-saving { color: #1e40af; background: #dbeafe; padding: 2px 6px; border-radius: 4px; }
.price-status .ps-saved { color: #065f46; background: #d1fae5; padding: 2px 6px; border-radius: 4px; }
.price-status .ps-fail { color: #991b1b; background: #fee2e2; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.btn-cost {
  font-size: 11px;
  padding: 4px 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-cost:hover {
  background: var(--bg-yellow-soft);
  color: #92400e;
  border-color: var(--accent-yellow);
}
table#pa-products-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  z-index: 1;
  text-align: center !important;   /* thead 강제 center (specificity 폴백 차단) */
}
table#pa-products-table thead th.right { text-align: right !important; }
table#pa-products-table thead th.num { text-align: right !important; }
table#pa-products-table thead th * { text-align: center; }
/* PA 표 일반 셀도 !important로 한 번 더 박아 폴백 차단 */
table#pa-products-table tbody td { text-align: center !important; }
table#pa-products-table tbody td.num,
table#pa-products-table tbody td.right { text-align: right !important; }
.pa-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pa-table-wrap > table#pa-products-table {
  min-width: 1280px;
}

/* 비용 breakdown 패널 — 회계표 스타일 + 채널 탭 */
.pa-cost-row td {
  background: #fffbeb;
  border-top: 1px solid var(--accent-yellow);
  padding: 0;
}
.pa-cost-panel { padding: 0; }
.cost-loading { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

.cost-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 18px 0;
  background: #fefce8;
  border-bottom: 1px solid var(--border-light);
}
.cost-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 10px 16px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  font-family: inherit;
  transition: all 0.12s;
}
.cost-tab:hover { color: var(--text-primary); }
.cost-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.cost-tab .plat-logo { display: inline-flex; }

/* 플랫폼 로고 (인라인 SVG) */
.plat-logo { display: inline-flex; align-items: center; line-height: 0; flex-shrink: 0; }
.plat-logo svg { display: block; }
.plat-cell { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-base); }

.cost-body { padding: 18px 22px 20px; background: #fffbeb; }
.cost-account-tbl {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 540px;
}
.cost-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.cost-row:last-child { border-bottom: none; }
.cost-row span { color: var(--text-secondary); }
.cost-row b { font-family: var(--font-mono); color: var(--text-primary); }
.cost-row.sale { background: var(--bg-soft); }
.cost-row.sale span, .cost-row.sale b { font-weight: 600; }
.cost-row.minus span { color: #b45309; }
.cost-row.minus b { color: #92400e; }
.cost-row.minus .warn-text { color: var(--accent-red); font-weight: 600; }
.cost-row.total {
  background: var(--bg-soft);
  border-top: 2px solid var(--border);
  font-weight: 600;
}
.cost-row.profit {
  background: #ecfdf5;
  border-top: 2px solid var(--accent-green);
  padding: 12px 16px;
}
.cost-row.profit span { color: #065f46; font-weight: 600; font-size: 13px; }
.cost-row.profit b { color: #065f46; font-weight: 700; font-size: 15px; }
.cost-row.profit .rate { color: #047857; font-size: 12px; font-weight: 500; }
.cost-row.loss { background: #fef2f2; border-top-color: var(--accent-red); }
.cost-row.loss span, .cost-row.loss b { color: #991b1b; }

/* PA 상세 패널 */
.pa-detail .info-tbl {
  border-collapse: collapse;
  width: 100%;
  max-width: 700px;
  font-size: 13px;
}
.pa-detail .info-tbl td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}
.pa-detail .info-tbl td.lbl {
  color: var(--text-muted);
  width: 130px;
  font-weight: 600;
  font-size: 12px;
  background: var(--bg-soft);
}

/* 3-way 판정 (브랜드핏 / 수익성 / 최종) */
.verdict-3way { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; cursor: help; }
.verdict-3way span { padding: 2px 6px; border-radius: 4px; line-height: 1.2; }

/* ============================================================
   외부 링크
   ============================================================ */
.ext-link {
  display: inline-block;
  padding: 4px 10px;
  margin: 1px 0;
  font-size: 11px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.15s;
  font-weight: 500;
}
.ext-link:hover { background: #dbeafe; border-color: #60a5fa; }
.ext-link.primary-link {
  background: var(--bg-yellow-soft);
  color: #92400e;
  border-color: var(--accent-yellow);
  font-weight: 600;
  padding: 6px 14px;
  font-size: 12px;
}
.ext-link.primary-link:hover { background: #fde68a; }
.ext-link.subtle-link {
  background: var(--bg-soft);
  color: var(--text-secondary);
  border-color: var(--border);
}

/* ============================================================
   Image Board (PB-B2)
   ============================================================ */
.board-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.board-main { min-width: 0; }
.board-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.split-grid {
  display: grid;
  /* FIX 2026-05-09: 기타 영역 사진 크기 축소 (CEO P0 — "보기 좋게 해라") */
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.slice-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s;
}
.slice-card:hover { border-color: var(--accent-blue); }
.slice-card.selected { border-color: var(--accent-green); }
.slice-card.excluded { opacity: 0.45; border-color: var(--accent-red); }
.slice-card.ai-requested { border-color: var(--accent-yellow); }
.slice-card .img-wrap {
  /* FIX 2026-05-09: 기타 사진 크기 축소 (CEO P0) */
  height: 90px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.slice-card .img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.board-left .split-grid > .slice-card .img-wrap,
.board-layout .split-grid > .slice-card .img-wrap {
  height: 90px !important;
  max-height: 90px;
}
.board-left .split-grid > .slice-card .img-wrap img,
.board-layout .split-grid > .slice-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slice-card .img-placeholder { color: var(--text-muted); font-size: 11px; }
.slice-card .info { padding: 6px 8px; font-size: 10px; }
.slice-card .info .id { font-weight: 700; }
.slice-card .actions { display: flex; gap: 3px; padding: 0 6px 6px; flex-wrap: wrap; }
.slice-card .actions button { font-size: 9px; padding: 3px 6px; }

.selected-list { list-style: none; padding: 0; margin: 0; }
.selected-list li {
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.selected-list li .order { font-weight: 700; color: var(--accent-blue); margin-right: 8px; }

.ai-form {
  background: #fffbeb;
  border: 1px solid var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 12px;
}
.ai-form h3 { color: #92400e; margin-top: 0; }

/* ============================================================
   하단 액션바 (Windly style — 검은색 sticky bottom)
   ============================================================ */
.action-bar {
  position: fixed;
  bottom: 16px;
  left: calc(var(--sidebar-w) + 24px);
  right: 24px;
  z-index: 50;
  background: var(--accent);
  color: var(--text-inverse);
  padding: 14px 24px;
  display: flex;
  gap: 14px;
  align-items: center;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}
#app.sidebar-collapsed .action-bar { left: calc(60px + 24px); }
.action-bar > span { color: var(--accent-yellow); font-weight: 700; margin-right: 8px; }
.action-bar pre {
  background: #0f172a;
  max-height: 100px;
  flex: 1;
  margin-left: auto;
}
.action-bar button.primary {
  background: var(--accent-yellow);
  color: var(--accent);
}
.action-bar button.primary:hover { background: #f59e0b; }
.action-bar button.subtle {
  background: rgba(255,255,255,0.1);
  color: var(--text-inverse);
  border-color: rgba(255,255,255,0.2);
}
.action-bar button.subtle:hover { background: rgba(255,255,255,0.18); }

/* ============================================================
   플로팅 버튼 (우측 하단)
   ============================================================ */
.float-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}
.float-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  box-shadow: var(--shadow-md);
  transition: all 0.18s;
}
.float-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.float-btn.primary {
  background: var(--accent-yellow);
  color: var(--accent);
  border-color: var(--accent-yellow);
}
.float-btn.primary:hover { background: #f59e0b; }

/* ============================================================
   Windly식 운영 SaaS 컴포넌트
   ============================================================ */

/* Toolbar — 상단 작업바 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar select, .toolbar-search {
  height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  width: auto;
}
.toolbar-search { width: 200px; }
.toolbar button { font-size: 12px; padding: 7px 14px; }

.hero-title { font-weight: 700; font-size: 16px; color: var(--text-primary); letter-spacing: 0; }
.hero-sub { font-size: 12px; color: var(--text-muted); }

/* Status strip — 컴팩트 상태바 */
.status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}
.strip-item {
  background: var(--bg-card);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.strip-item label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.strip-item b {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  /* sans로 통일(한글 값이 mono에서 못생기게 나오던 문제 수정). 숫자 정렬감은 line128 tabular-nums로 유지. */
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}
.strip-item b.warn { color: #b45309; }
.strip-item b.ok { color: #047857; }

/* PB-B1 작업판 통계 카드 클릭 필터 (DEC-260505-32 #6) */
.strip-item.clickable {
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
.strip-item.clickable:hover { background: var(--bg-hover); }
.strip-item.clickable.active {
  background: var(--bg-hover);
  box-shadow: inset 0 -2px 0 0 var(--accent, #111827);
}
.strip-item.clickable.active label { color: var(--accent, #111827); }

/* (DEC-260505: .strip-progress 정의는 L699 단일 — 중복 제거) */

/* 데이터 테이블 (Windly식) */
.data-tbl {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 13px;
}
.data-tbl thead th {
  background: var(--bg-soft);
  border-bottom: 2px solid #d0d0d0;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  position: sticky; top: 0;
}
.data-tbl tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  text-align: center;
}
.data-tbl tbody tr:last-child td { border-bottom: none; }
.data-tbl tbody tr:hover td { background: var(--bg-soft); }
.data-tbl th.right, .data-tbl td.right { text-align: right; }
.data-tbl td.num { text-align: right; font-family: var(--font-mono); font-size: var(--fs-base); }
.data-tbl td.num.strong { font-weight: 700; color: var(--text-primary); }

/* row 썸네일 (작은) */
.row-thumb {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}
.row-thumb-empty {
  width: 40px; height: 40px;
  background: var(--bg-hover);
  border: 1px dashed var(--border);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted);
}

/* Cell name (Windly식 — 두 줄) */
.cell-name { max-width: 280px; }
.cell-name > div:first-child {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
}
.cell-name .cell-sub {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}

/* 작은 버튼 */
.btn-sm {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.12s;
}
.btn-sm.primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}
.btn-sm.primary:hover { background: #1f2937; }
.btn-sm.subtle {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-sm.subtle:hover { background: var(--bg-hover); color: var(--text-primary); }

.row-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.row-stat { font-size: 10px; }
.row-stat:empty { display: none; }

/* 홈 그리드 */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: flex-start;
}
/* 우측 패널 비활성 시 메인 100% 너비 (260505: 경고 패널 제거 + 메인 확장) */
.home-grid.home-grid-full {
  grid-template-columns: 1fr;
}
.home-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.home-side { display: flex; flex-direction: column; gap: 12px; }

/* 홈 footer line — 운영 0건 / DEMO Health Check inline 안내 */
.home-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-top: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
}
.home-footnote .muted.small { font-size: 12px; }

.section { }
.section-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-title .link { font-size: 11px; color: var(--accent-blue); text-decoration: none; font-weight: 500; }
.section-title .link:hover { text-decoration: underline; }

/* (260505 cleanup) `.side-panel` / `.has-warn` / `.warn-list` / `.lvl-*` 데드 CSS 삭제 — 경고 패널 markup 제거 후 사용처 0건 */
.small { font-size: 11px; }

/* 공급사 정보 미제공 뱃지 (OPS-3 — 260505) */
.tag.supplier-unavail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-pill);
  cursor: help;
  line-height: 1.4;
}
.supplier-unavail-text {
  color: #b91c1c;
  font-weight: 600;
}
.supplier-unavail-row .lbl,
.supplier-unavail-row td { background: #fffbeb; }

/* ============================================================
   PB-B1 카드 (legacy — 더 이상 사용 안 함, 보존만)
   ============================================================ */
.section-intro p { margin: 0; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}
.card-head h2 { margin: 0; }

/* .b1-card / .b1-cards 기본형은 위(상단 PB-B1 카드 UI)에서 단일 정의하고,
   여백·그림자·좌측 액센트 등 마감은 아래 정제 레이어에서만 덧입힌다.
   (중복 base 정의 제거 — JS는 .ready/.progress 클래스가 아니라 [data-status]만 사용) */

.b1-card-img { flex-shrink: 0; }
.b1-thumb {
  width: 110px; height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.b1-thumb-empty {
  width: 110px; height: 110px;
  background: var(--bg-hover);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
}
.b1-thumb-empty span { font-weight: 600; }

.b1-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.b1-card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.35;
}
.b1-card-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}
.b1-card-meta .meta-item b {
  display: inline-block;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11px;
  margin-right: 4px;
}

.b1-card-prices {
  display: flex;
  gap: 24px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.b1-card-prices > div { display: flex; flex-direction: column; gap: 2px; }
.b1-card-prices label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  margin: 0;
}
.b1-card-prices b { font-family: var(--font-mono); font-size: 13px; color: var(--text-primary); font-weight: 600; }
.b1-card-prices .profit b { color: #065f46; font-size: 14px; }
.b1-card-prices .rate b { color: #1e40af; }

.b1-card-fit { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.b1-reasons { display: flex; flex-wrap: wrap; gap: 4px; }
.reason-chip {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
}

.b1-card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.b1-card-actions .small { font-size: 11px; }
.b1-card-status:empty { display: none; }
.b1-card-status { font-size: 12px; }

/* ============================================================
   레거시 호환
   ============================================================ */
.product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.product-row:hover { border-color: var(--accent-blue); background: #f0f9ff; }
.product-row .meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.product-thumb {
  width: 64px; height: 64px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.product-thumb img { max-width: 100%; max-height: 100%; object-fit: cover; }
.row > button { flex: initial; min-width: 0; }

/* ============================================================
   Windly 패키지 화면 (5파일 표시)
   ============================================================ */
.windly-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--bg-card);
}
.windly-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
}
.windly-card-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.windly-card-actions button { white-space: nowrap; }
.windly-category-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}
.windly-category-lane {
  min-height: 132px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.windly-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  font-size: 13px;
}
.windly-category-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  color: var(--text-muted);
  font-size: 12px;
  border: 1px dashed rgba(15,23,42,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.55);
}
.windly-category-control {
  display: grid;
  gap: 4px;
  min-width: 158px;
  font-size: 11px;
  color: var(--text-muted);
}
.windly-category-control select {
  width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}
.windly-pkg-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
}
.windly-pkg-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 6px;
}
.windly-pkg-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.windly-pkg-thumb {
  width: 100%; height: 110px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.windly-pkg-thumb img { max-width: 100%; max-height: 100%; object-fit: cover; }
.windly-pkg-thumb.tall { height: 180px; }
.windly-pkg-thumb.tall img { object-fit: contain; }
.windly-pkg-thumb.plain { background: #fafafa; }
.windly-pkg-empty {
  font-size: 11px; color: var(--text-muted); text-align: center; padding: 12px 6px;
}
.windly-pkg-count { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.windly-pkg-file { font-size: var(--fs-xs); color: var(--text-muted); word-break: break-all; }
.windly-pkg-file code { font-size: var(--fs-xs); }
.windly-ready-badge { font-weight: 700; letter-spacing: 0.02em; }
.windly-pkg-summary { font-size: 12px; }
.windly-md-fold {
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.windly-md-fold > summary {
  cursor: pointer;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-secondary);
  list-style: revert;
  padding: 2px 0;
}
.windly-md-fold[open] > summary { color: var(--text-primary); }
.windly-md-body { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-light); }
.windly-md-body p { margin: 0 0 8px; font-size: 12px; }
.windly-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); margin: 6px 0;
  background: var(--bg-soft);
}
.windly-row.pending { opacity: 0.85; }
@media (max-width: 1100px) {
  .windly-pkg-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 모바일 / 좁은 창 (768px 이하) — 사이드바 자동 collapsed + 카드 reflow */
@media (max-width: 768px) {
  #app { grid-template-columns: 60px 1fr; }
  #app .brand { display: none; }
  #app .menu.solo .lbl { display: none; }
  #app .menu.solo { justify-content: center; padding: 9px 0; margin: 2px 6px; }
  #app .group-section-title,
  #app .sidebar-bottom { display: none; }
  /* 액션바 오프셋 자동 조정 */
  .action-bar { left: calc(60px + 16px); right: 16px; }
  /* 카드 세로 reflow */
  .b1-card { flex-direction: column; }
  .b1-card-right { align-items: stretch; min-width: 0; }
  .b1-card-action button { width: 100%; }
  .windly-card-head { flex-direction: column; }
  .windly-pkg-grid { grid-template-columns: 1fr 1fr; }
  /* status-strip 세로 */
  .status-strip { flex-wrap: wrap; }
  .strip-item { flex: 1 1 45%; }
  /* 토스트 너비 축소 */
  .toast { max-width: calc(100vw - 32px); }
}

/* ── B2 카드 2종 (좌60% + 우40% split) ───────────────────────── */
.card-pitch,
.card-image {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-height: 200px;
  max-height: 240px;
  background: #fff;
  transition: box-shadow 0.12s;
}
.card-pitch:hover,
.card-image:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.07);
}
.card-pitch-left,
.card-image-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-hover);
  padding: 10px;
  min-width: 0;
}
.card-pitch-left {
  background: #f8fafc;
  padding: 12px;
}
.card-pitch-left img,
.card-image-left img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.card-pitch-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-left: 8px solid #111827;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  text-align: center;
  padding: 16px;
  line-height: 1.5;
  border-radius: 6px;
  min-height: 120px;
  white-space: pre-wrap;
  word-break: break-word;
}
.selvoir-pitch-preview {
  --pitch-accent: #111827;
  --pitch-bg: #ffffff;
  --pitch-soft: #f8fafc;
  --pitch-text: #0f172a;
  --pitch-muted: #64748b;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 172px;
  height: 100%;
  padding: 24px 26px 22px;
  overflow: hidden;
  background: var(--pitch-bg);
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  color: var(--pitch-text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72);
}
.selvoir-pitch-preview::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: var(--pitch-accent);
}
.selvoir-pitch-preview::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 50%;
}
.selvoir-pitch-preview--hero {
  --pitch-accent: #f8c14a;
  --pitch-bg: #111827;
  --pitch-soft: rgba(248,193,74,0.18);
  --pitch-text: #ffffff;
  --pitch-muted: #cbd5e1;
  justify-content: flex-end;
  min-height: 224px;
  padding: 28px 30px 26px;
}
.selvoir-pitch-preview--feature {
  --pitch-accent: #0f766e;
  --pitch-bg: #f8fffd;
  --pitch-soft: #d6f5ee;
  --pitch-muted: #3f6f69;
  min-height: 188px;
}
.selvoir-pitch-preview--scene {
  --pitch-accent: #2563eb;
  --pitch-bg: #f7fbff;
  --pitch-soft: #dbeafe;
  --pitch-muted: #475569;
  align-items: center;
  text-align: center;
  min-height: 204px;
}
.selvoir-pitch-preview--spec {
  --pitch-accent: #475569;
  --pitch-bg: #ffffff;
  --pitch-soft: #e2e8f0;
  --pitch-muted: #64748b;
  min-height: 166px;
  padding: 22px 26px;
}
.selvoir-pitch-preview--cta {
  --pitch-accent: #38bdf8;
  --pitch-bg: #0f172a;
  --pitch-soft: rgba(56,189,248,0.18);
  --pitch-text: #ffffff;
  --pitch-muted: #bae6fd;
  min-height: 196px;
  padding: 24px 28px 24px;
}
.selvoir-pitch-topline,
.selvoir-pitch-bottomline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.selvoir-pitch-preview--hero .selvoir-pitch-topline,
.selvoir-pitch-preview--hero .selvoir-pitch-bottomline,
.selvoir-pitch-preview--cta .selvoir-pitch-topline,
.selvoir-pitch-preview--cta .selvoir-pitch-bottomline {
  color: var(--pitch-muted);
}
.selvoir-pitch-topline span:last-child,
.selvoir-pitch-bottomline span:last-child {
  padding: 3px 7px;
  background: var(--pitch-soft);
  border-radius: 999px;
  color: #0f172a;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.selvoir-pitch-preview--hero .selvoir-pitch-topline span:last-child,
.selvoir-pitch-preview--hero .selvoir-pitch-bottomline span:last-child,
.selvoir-pitch-preview--cta .selvoir-pitch-topline span:last-child,
.selvoir-pitch-preview--cta .selvoir-pitch-bottomline span:last-child {
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.14);
}
.selvoir-pitch-mark {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 4px;
  margin: 20px 0 16px;
  background: var(--pitch-accent);
  border-radius: 999px;
}
.selvoir-pitch-preview--hero .selvoir-pitch-mark {
  width: 64px;
  height: 6px;
  margin: 28px 0 18px;
}
.selvoir-pitch-preview--scene .selvoir-pitch-mark {
  margin-left: auto;
  margin-right: auto;
}
.selvoir-pitch-preview--spec .selvoir-pitch-mark {
  width: 100%;
  height: 1px;
  margin: 14px 0 14px;
  opacity: 0.45;
}
.selvoir-pitch-headline {
  position: relative;
  z-index: 1;
  max-width: 92%;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.selvoir-pitch-preview--hero .selvoir-pitch-headline,
.selvoir-pitch-preview--cta .selvoir-pitch-headline {
  color: #ffffff;
}
.selvoir-pitch-preview--hero .selvoir-pitch-headline {
  max-width: 82%;
  font-size: 30px;
  line-height: 1.24;
}
.selvoir-pitch-preview--scene .selvoir-pitch-headline {
  margin: 0 auto;
  max-width: 78%;
}
.selvoir-pitch-preview--spec .selvoir-pitch-headline {
  max-width: 100%;
  font-size: 20px;
  line-height: 1.42;
}
.selvoir-pitch-preview--cta .selvoir-pitch-headline {
  max-width: 88%;
}
.selvoir-pitch-bottomline {
  margin-top: auto;
  padding-top: 18px;
  color: var(--pitch-muted);
}
.selvoir-pitch-preview--feature::after {
  right: 22px;
  top: 22px;
  bottom: auto;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border-color: rgba(15,118,110,0.20);
  transform: rotate(8deg);
}
.selvoir-pitch-preview--scene::before {
  width: 100%;
  height: 7px;
  bottom: auto;
  background: linear-gradient(90deg, #2563eb, #7dd3fc);
}
.selvoir-pitch-preview--scene::after {
  left: 50%;
  right: auto;
  bottom: 20px;
  transform: translateX(-50%);
  width: 92px;
  height: 1px;
  border: 0;
  background: rgba(37,99,235,0.24);
  border-radius: 999px;
}
.selvoir-pitch-preview--spec::before {
  width: 1px;
  left: 22px;
  top: 18px;
  bottom: 18px;
  opacity: 0.5;
}
.selvoir-pitch-preview--spec::after {
  right: 22px;
  bottom: 22px;
  width: 72px;
  height: 28px;
  border-radius: 0;
  border-width: 1px 0;
  opacity: 0.55;
}
.selvoir-pitch-preview--cta::before {
  left: auto;
  right: 0;
  width: 10px;
}
.selvoir-pitch-preview--cta::after {
  right: 24px;
  bottom: 24px;
  width: 86px;
  height: 32px;
  border-color: rgba(56,189,248,0.36);
  border-radius: 999px;
}
.card-pitch-right,
.card-image-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-soft, #f8fafc);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  min-width: 0;
}
.card-pitch { border-top: 3px solid #111827; }
.card-pitch .card-split-header { color: #111827; background: #f3f4f6; }
.card-image { border-top: 3px solid #3b82f6; }
.card-image .card-split-header { color: #1e40af; background: #dbeafe; }
.card-split-header {
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  align-self: flex-start;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
/* FIX 2026-05-09: 섹션 번호 표시 (CEO 요구 — "넘버링 보이게 그래야 순서 알지") */
.card-split-header--editable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding-right: 5px;
}
.card-pitch-label-input {
  width: min(128px, 100%);
  min-width: 72px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  outline: none;
}
.card-pitch-label-input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.18);
  padding: 0 5px;
}
.card-section-num {
  display: inline-block;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
  font-weight: 800;
  font-size: 11px;
}
.card-split-textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--fs-base);
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  resize: none;
  flex: 1;
  min-height: 52px;
  max-height: 80px;
  line-height: 1.5;
  background: #fff;
  transition: border-color 0.12s;
}
.card-split-textarea:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(15,23,42,0.11);
}
.card-split-textarea--subtitle {
  min-height: 42px;
  max-height: 64px;
  color: #475569;
  background: #fbfdff;
}
.card-image .card-split-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.13);
}
.card-split-format-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.card-split-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 5px;
  align-items: center;
}
.card-split-template-row select {
  height: 28px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  font-size: var(--fs-sm);
  padding: 3px 6px;
}
.card-split-format-row select,
.card-split-format-row input[type="number"] {
  font-size: var(--fs-sm);
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  height: 26px;
}
.card-split-format-row select { min-width: 100px; max-width: 130px; }
.card-split-format-row input[type="number"] { width: 50px; }
.card-split-format-row input[type="color"] {
  width: 26px; height: 26px;
  padding: 1px 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  background: none;
}
.pitch-align-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  width: max-content;
}
.pitch-align-btn {
  width: 30px;
  height: 24px;
  font-size: 11px;
  border-radius: 5px;
}
.card-split-color-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.card-split-color-row label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: #475569;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.card-split-color-row input[type="color"] {
  width: 24px;
  height: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.btn-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s, transform 0.12s;
  line-height: 1;
  padding: 0;
}
.btn-toggle:hover { background: var(--bg-hover); border-color: #d1d5db; }
.btn-toggle.toggle-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.16);
  transform: translateY(-1px);
}
.btn-toggle.toggle-active::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  right: -2px;
  top: -2px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #22c55e;
}
.card-split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}
.card-split-actions .btn-sm {
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}
.card-image-filename {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  margin-top: 4px;
}
.card-image-toggle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  margin-top: 4px;
}
.card-image-toggle-row label { cursor: pointer; }
@media (max-width: 768px) {
  .card-pitch,
  .card-image {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .card-pitch-left,
  .card-image-left {
    max-height: 160px;
    border-bottom: 1px solid var(--border);
  }
  .card-pitch-right,
  .card-image-right {
    border-left: none;
  }
}

/* ── B1 진행률 바 (R6 — F2 b2_progress UI) ─────────────────── */
.b1-progress {
  width: 100%;
  background: #e5e7eb;
  border-radius: 4px;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
}
.b1-progress-bar {
  height: 6px;
  background: #3b82f6;
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 2px;
}
/* FIX 2026-05-09 (CEO P0 — 처리율 bar 안 뜨는 root cause):
   indeterminate(진행률 미상) 상태에서 bar가 좌우로 슬라이딩하는 애니메이션.
   b2_progress 데이터 도착 전(b1_running)에도 시각적 진행감 보장. */
.b1-progress-indeterminate {
  position: relative;
  overflow: hidden;
}
.b1-progress-indeterminate .b1-progress-bar {
  width: 35% !important;
  background: linear-gradient(90deg, #93c5fd 0%, #3b82f6 50%, #93c5fd 100%);
  animation: b1-indeterminate-slide 1.4s ease-in-out infinite;
  position: absolute;
  left: 0;
  top: 0;
}
@keyframes b1-indeterminate-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(285%); }
}
.b1-progress-stage {
  font-size: var(--fs-sm);
  color: var(--text-muted, #6b7280);
  margin-top: 2px;
}
.b1-live-progress {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}
.b1-pipeline {
  position: relative;
  padding: 10px 12px 9px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(37,99,235,0.16);
  border-radius: 8px;
}
.b1-pipeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #1e3a8a;
  font-size: var(--fs-sm);
  font-weight: 800;
}
.b1-pipeline-pct {
  min-width: 44px;
  padding: 2px 7px;
  color: #fff;
  text-align: center;
  background: #2563eb;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}
.b1-pipeline-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 8px;
}
.b1-pipeline-steps::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 16px;
  height: 2px;
  background: #bfdbfe;
}
.b1-pipeline-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}
.b1-pipeline-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #64748b;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  font-family: var(--font-mono, monospace);
}
.b1-pipeline-sub {
  max-width: 70px;
  overflow: hidden;
  color: #64748b;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b1-pipeline-step.done .b1-pipeline-dot {
  color: #fff;
  background: #10b981;
  border-color: #10b981;
}
.b1-pipeline-step.done .b1-pipeline-sub { color: #047857; }
.b1-pipeline-step.active .b1-pipeline-dot {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 0 0 5px rgba(37,99,235,0.14);
  animation: b1-pipeline-pulse 1.15s ease-in-out infinite;
}
.b1-pipeline-step.active .b1-pipeline-sub { color: #1d4ed8; }
.b1-pipeline-current {
  margin-top: 7px;
  color: #1e40af;
  font-size: 11px;
  font-weight: 700;
}
@keyframes b1-pipeline-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* ── candidates 썸네일 strip (R8 — F4 candidates[]) ─────────── */
.card-image-candidates {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border, #e5e7eb);
}
.card-candidates-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.candidate-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.candidate-thumb:hover {
  border-color: #3b82f6;
  transform: scale(1.08);
}

/* B2 board: default is result preview, editor opens only from the pencil button. */
.card-pitch,
.card-image {
  display: block;
  position: relative;
  overflow: visible;
  min-height: 0;
  max-height: none;
  border-radius: 8px;
}
.card-pitch-left,
.card-image-left {
  width: 100%;
  min-width: 0;
  border-bottom: 0;
}
.card-pitch-left {
  min-height: 188px;
}
.card-image-left {
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
  background: #fff;
  padding: 0;
}
.card-image-left > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 8px;
}
.card-image-filename {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 64px);
  padding: 3px 7px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 6px;
  backdrop-filter: blur(6px);
}
.card-pitch-right,
.card-image-right {
  display: none;
  position: absolute;
  top: 42px;
  right: 12px;
  bottom: 12px;
  z-index: 12;
  width: min(380px, 42%);
  min-width: 280px;
  max-height: calc(100% - 54px);
  padding: 12px;
  overflow-y: auto;
  background: rgba(248,250,252,0.98);
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15,23,42,0.18);
}
.card-pitch.is-editing,
.card-image.is-editing {
  z-index: 6;
}
.card-pitch.is-editing .card-pitch-right,
.card-image.is-editing .card-image-right {
  display: flex;
}
.card-edit-toggle,
.card-editor-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15,23,42,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #111827;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15,23,42,0.10);
}
.card-edit-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 14;
  width: 30px;
  height: 30px;
  font-size: 15px;
}
.card-editor-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  font-size: 16px;
}
.card-edit-toggle:hover,
.card-editor-close:hover {
  background: #111827;
  color: #fff;
}
.card-pitch.is-editing .card-edit-toggle,
.card-image.is-editing .card-edit-toggle {
  background: #111827;
  color: #fff;
}
.card-pitch-right .card-split-header,
.card-image-right .card-split-header {
  margin-right: 32px;
}

.selvoir-section-pair {
  --section-accent: #111827;
  --section-bg: #ffffff;
  --section-soft: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--section-soft) 0%, #ffffff 42%);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-left: 5px solid var(--section-accent);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.selvoir-section-pair--hero {
  --section-accent: #111827;
  --section-bg: #fffdf4;
  --section-soft: #fef3c7;
}
.selvoir-section-pair--feature {
  --section-accent: #0f766e;
  --section-bg: #f7fffc;
  --section-soft: #d9f7ef;
}
.selvoir-section-pair--scene {
  --section-accent: #2563eb;
  --section-bg: #f7fbff;
  --section-soft: #dbeafe;
}
.selvoir-section-pair--spec {
  --section-accent: #475569;
  --section-bg: #ffffff;
  --section-soft: #e2e8f0;
}
.selvoir-section-pair--cta {
  --section-accent: #0f172a;
  --section-bg: #f8fafc;
  --section-soft: #dff6ff;
}
.selvoir-section-pair-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 8px 12px;
  color: #0f172a;
  background: linear-gradient(90deg, rgba(255,255,255,0.90), rgba(255,255,255,0.55));
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.selvoir-section-pair-meta span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 7px;
  color: #fff;
  background: var(--section-accent);
  border-radius: 999px;
}
.selvoir-section-pair-meta span:last-child {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selvoir-section-pair-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px;
  background: var(--section-bg);
}
.selvoir-section-pair .card-pitch,
.selvoir-section-pair .card-image {
  border-color: rgba(15, 23, 42, 0.10);
  border-left: 0;
  border-right: 0;
  box-shadow: none;
}
.selvoir-section-pair .card-pitch {
  border-top: 0;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.selvoir-section-pair .card-image {
  margin-top: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  border-bottom: 0;
  border-radius: 0 0 8px 8px;
}
.selvoir-section-pair .card-pitch-left {
  min-height: 176px;
  padding: 0;
  background: var(--section-soft);
}
.selvoir-section-pair .selvoir-pitch-preview {
  min-height: 190px;
  border: 0;
  border-radius: 8px 8px 0 0;
}
.selvoir-section-pair .card-image-left {
  background: #ffffff;
  border-radius: 0 0 8px 8px;
}
.selvoir-section-pair .card-image-left > img {
  border-radius: 0 0 8px 8px;
}
.selvoir-section-pair .card-pitch:hover,
.selvoir-section-pair .card-image:hover {
  box-shadow: none;
}

.board-rep-add-card {
  display: flex;
  min-height: 188px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed rgba(15,23,42,0.26);
  background: #f8fafc;
  text-align: center;
  cursor: default;
}
.board-rep-add-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.board-rep-add-title {
  font-size: var(--fs-base);
  font-weight: 800;
  color: #111827;
}
.board-rep-add-note {
  max-width: 150px;
  color: #64748b;
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.board-rep-add-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.board-source-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10620;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.45);
}
.board-source-picker-modal {
  width: min(960px, calc(100vw - 48px));
  max-height: min(780px, calc(100vh - 56px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}
.board-source-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.board-source-picker-head h3 {
  margin: 0;
  font-size: 20px;
}
.board-source-picker-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}
.board-source-picker-grid {
  overflow: auto;
  padding: 18px 22px 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.board-source-picker-card {
  position: relative;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.board-source-picker-card:hover {
  border-color: #111827;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}
.board-source-picker-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  background: #f8fafc;
}
.board-source-picker-card b {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #111827;
}
.board-source-picker-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* 2026-07-08 FIX(병렬 안정성 #11): 탭 전환 시 빈 화면 플래시 대신 쓰는 얇은 상단 로딩 바.
   평소엔 투명(레이아웃 자리만 3px 예약)했다가 navigate() 진행 중에만 .active로 스윕 애니메이션. */
.nav-loading-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 3px;
  width: 100%;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.nav-loading-bar.active {
  opacity: 1;
}
.nav-loading-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, #2563eb, #60a5fa, transparent);
  animation: nav-loading-sweep 0.9s ease-in-out infinite;
}
@keyframes nav-loading-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(350%); }
}

.global-work-strip {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  /* 내용이 1줄을 넘겨도 겹치지 않도록 높이는 내용에 맞춰 늘어난다(min-height는 하한만). */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 8px 18px;
  background: #f8fbff;
  border-bottom: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
.global-work-strip.hidden {
  display: none;
}
.global-work-main,
.global-work-copy,
.global-work-steps {
  display: flex;
  align-items: center;
}
.global-work-main {
  min-width: 0;
  flex: 1;
  gap: 10px;
}
/* 2026-07-08 FIX(병렬 안정성 #9): 병렬 작업 슬롯 다중 렌더 컨테이너 — 최대 3개까지 가로로
   나란히, 넘치면 가로 스크롤(좁은 화면에서도 슬롯이 잘리지 않고 스크롤로 접근 가능). */
.global-work-slots {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.global-work-slot {
  flex: 0 1 auto;
  /* 2026-08-27 FIX3: FIX2가 하한을 min-content 로 잡아 축소를 막았더니 부족분이 전부
     가로 스크롤로 넘어가, 좁은 폭(≤1366px)에서 3번째 슬롯이 화면 밖으로 밀려났다. 게다가
     app.js:1708 이 4초마다 innerHTML 을 통째로 교체해 scrollLeft 이 0 으로 되돌아가므로
     사용자가 스크롤해도 4초 뒤 다시 사라져 사실상 접근 불가였다(수정 전에는 겹치긴 해도
     3슬롯 전부 컨테이너 안에 있었으므로 명백한 회귀).
     겹침의 진짜 원인은 축소 자체가 아니라 b 가 부모보다 큰 고정폭을 유지한 것이었고
     (아래 .global-work-copy b 의 max-width:100% 로 해소), 슬롯에 overflow:hidden 이 있으면
     축소돼도 옆 슬롯을 침범하지 못한다. 축소를 다시 허용하고 넘치는 글자는 잘라 보여준다. */
  min-width: 0;
  /* 축소 시 넘치는 내용이 옆 슬롯 위로 새지 않게 잘라낸다(겹침 방어의 핵심). */
  overflow: hidden;
  /* 칩이 없는 2·3번째 슬롯은 이름+퍼센트뿐이라 320px 이면 충분하다. */
  max-width: 320px;
  padding-right: 14px;
  margin-right: 10px;
  border-right: 1px solid rgba(37, 99, 235, 0.18);
}
/* 칩(5개, 각 min-width 36px + gap)이 한 줄로 들어갈 폭은 칩을 그리는 첫 슬롯에만 필요하다
   (app.js:1703 — idx===0 에서만 globalWorkPipelineHtml). 전 슬롯에 640을 주면 2·3번 슬롯의
   flex base 까지 커져 축소 압력만 늘어난다. */
.global-work-slot[data-slot-idx="0"] {
  max-width: 640px;
}
.global-work-slot:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}
.global-work-slot .global-work-copy {
  /* 축소는 이름 블록이 받는다. 하한을 0 으로 두어야 슬롯이 좁아질 때 이름이 슬롯 경계에서
     말줄임(…)으로 끊긴다 — 120px 하한을 남기면 부모가 슬롯을 넘겨 잘리면서 말줄임 자체가
     보이지 않는 폭으로 밀려난다. */
  min-width: 0;
  max-width: min(28vw, 240px);
}
.global-work-slot .global-work-copy b {
  /* 고정 240px 이면 부모(.global-work-copy)가 120px 까지 줄어도 b 는 240 을 유지해
     부모 밖으로 뚫고 나가 칩 위에 겹쳤다(b 자신의 overflow:hidden 은 240 박스 기준이라 무력).
     100% 로 두면 축소된 부모 폭을 그대로 따라가고 ellipsis 가 부모 경계에서 걸린다. */
  max-width: 100%;
}
.global-work-copy {
  min-width: 180px;
  /* 자식(b/span)이 어떤 이유로든 넘쳐도 형제(칩·퍼센트) 위로 나가지 못하게 한다. */
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.global-work-copy b {
  max-width: 100%;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-work-copy span {
  /* 단계 문구에 nowrap/ellipsis 가 없어 긴 stage 문자열에서 2줄로 접히며 스트립 높이가
     54px → 85px 로 늘어났다(min-height 만 있고 상한이 없어 스트립 전체가 밀림). */
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-work-steps {
  gap: 4px;
  /* 2026-08-27 FIX(홈 상단 진행 스트립 겹침): flex-wrap:wrap이면 슬롯 폭(max-width:320px)에서
     칩 5개가 2줄로 접히는데 스트립 높이는 1줄 기준(min-height:54px)이라 상품명 위로 넘쳐
     겹쳐 보였다. 칩은 한 줄 고정으로 두고, 좁은 폭에서는 슬롯 컨테이너가 가로 스크롤한다. */
  flex-wrap: nowrap;
  flex: 0 0 auto;
}
.global-work-step {
  min-width: 36px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.global-work-step.done {
  background: #dbeafe;
  color: #1d4ed8;
}
.global-work-step.active {
  background: #2563eb;
  color: #ffffff;
}
.global-work-pct,
.global-work-more {
  flex: 0 0 auto;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 768px) {
  .global-work-strip {
    align-items: flex-start;
    flex-direction: column;
  }
  /* 2026-08-27 FIX2: 스트립이 column + align-items:flex-start 가 되면 .global-work-slots 가
     교차축에서 max-content 로 부풀어 scrollWidth === clientWidth 가 된다 — overflow-x:auto 가
     스크롤바를 만들지 못하고 #main{overflow:hidden}(:505)에 조용히 잘렸다.
     교차축 폭을 스트립 폭에 묶어야 실제 가로 스크롤이 생긴다.
     (종전 여기 있던 .global-work-copy b{max-width:86vw} 는 명시도 0-1-1 로
      .global-work-slot .global-work-copy b(0-2-1)에 져서 한 번도 적용된 적이 없는 죽은 규칙 — 제거) */
  .global-work-slots {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
  }
  .card-pitch-left,
  .card-image-left {
    max-height: none;
  }
  .card-pitch-right,
  .card-image-right {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    min-width: 0;
  }
}

/* ============================================================
   SELVOIR UI Beauty Pass v0.1 — 운영툴 표면 정리 (2026-05-07)
   기존 라우트/DOM 골격 유지. 색, 밀도, 표면, 버튼, 카드 리듬만 정돈.
   ============================================================ */
body,
h1, h2, h3, h4, h5,
button, input, select, textarea,
.hero-title, .hero-sub, .page-title, .tag, .menu.solo {
  letter-spacing: 0;
}

body {
  background: #f5f7fa;
  font-weight: var(--fw-base);   /* 450 토큰화 (line 97과 동일 톤) */
}

#app {
  width: 100%;
  overflow-x: hidden;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

#app.sidebar-collapsed {
  grid-template-columns: 60px minmax(0, 1fr);
}

#main {
  min-width: 0;
}

::selection {
  background: rgba(210, 161, 58, 0.24);
  color: var(--text-primary);
}

#sidebar {
  border-right-color: #e4e9f1;
  box-shadow: 1px 0 0 rgba(16, 24, 40, 0.02);
}

.brand-area {
  min-height: 70px;
  padding: 16px 18px 14px 22px;
  border-bottom-color: #edf1f6;
  gap: 11px;
}

.sidebar-toggle,
.icon-btn {
  background: #fff;
  border-color: #dce3ed;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.sidebar-toggle:hover,
.icon-btn:hover {
  background: #f8fafc;
  border-color: #c7d0de;
}

.user-card {
  margin: 12px 12px 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: #e5eaf2;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.05);
}

.user-card:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.08);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.user-email {
  font-size: 12px;
  font-weight: 600;
}

.user-role {
  font-size: 11px;
}

#nav {
  padding: 8px 0 16px;
}

.menu.solo {
  margin: 3px 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #526071;
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);   /* 650 → 600 표준 통일 */
  border: 1px solid transparent;
}

.menu.solo:hover {
  background: #f8fafc;
  color: #111827;
  border-color: #edf1f6;
}

.menu.solo.active {
  position: relative;
  background: #fff8e6;
  color: #111827;
  border-color: #f1d992;
  box-shadow: 0 8px 20px rgba(210, 161, 58, 0.12);
}

.menu.solo.active::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #b8871f;
}

.menu .ic {
  color: #7b8798;
}

.menu.solo.active .ic {
  color: #8a6416;
}

#topbar {
  height: 62px;
  background: rgba(255,255,255,0.94);
  border-bottom-color: #e5eaf2;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  backdrop-filter: blur(10px);
}

#breadcrumb {
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
}

.page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 15px;
  background: #f3f6fa;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  color: var(--text-secondary);
}
/* 브레드크럼 칩 안의 SVG 아이콘은 칩 크기에 맞춰 통일 */
.page-icon .ui-icon {
  width: 16px;
  height: 16px;
}

#content {
  padding: 26px 30px 34px;
}

.card,
.toolbar,
.data-tbl,
.empty,
.board-side,
.board-right .card,
.windly-card,
.windly-category-lane,
.home-footnote,
.pa-progress-card,
.pa-handed-summary {
  border-color: #e4e9f1;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.045);
}

.card {
  padding: 22px 24px;
}

.card h2 {
  font-size: 18px;
  line-height: 1.35;
}

.card h3,
.section-title {
  font-size: 14px;
}

.toolbar {
  align-items: flex-start;
  padding: 18px 20px;
  background: #ffffff;
  border-left: 4px solid #151922;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.055);
}

.toolbar-left {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.hero-title {
  font-size: 18px;
  font-weight: 800;
}

.hero-sub {
  color: #667085;
  font-size: var(--fs-base);
}

button.primary,
button.warn,
button.subtle,
button.ghost,
.btn-sm {
  min-height: 34px;
  border-radius: 7px;
  font-weight: 700;
}

button.primary,
.btn-sm.primary {
  background: #151922;
  border-color: #151922;
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
}

button.primary:hover,
.btn-sm.primary:hover {
  background: #252b36;
  border-color: #252b36;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
}

button.subtle,
button.ghost,
.btn-sm.subtle {
  background: #ffffff;
  border-color: #dce3ed;
  color: #344054;
}

button.subtle:hover,
button.ghost:hover,
.btn-sm.subtle:hover {
  background: #f8fafc;
  border-color: #c7d0de;
  color: #111827;
}

button.warn,
.btn-sm.warn {
  background: #fff1f1;
  border: 1px solid #f4b7b7;
  color: #a12828;
}

button.warn:hover,
.btn-sm.warn:hover {
  background: #ffe4e4;
  color: #7f1d1d;
}

.status-strip {
  gap: 10px;
  background: transparent;
  border: 0;
  overflow: visible;
}

.strip-item {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.045);
}

.strip-item label {
  color: #667085;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);       /* 750 → 700 표준 통일 */
}

.strip-item b {
  font-size: 21px;
  font-weight: var(--fw-extrabold);  /* 850 → 800 표준 통일 */
}

.strip-item.clickable:hover {
  background: #ffffff;
  border-color: #d2a13a;
  box-shadow: 0 10px 26px rgba(210, 161, 58, 0.12);
}

.strip-item.clickable.active {
  background: #fff8e6;
  border-color: #f1d992;
  box-shadow: inset 0 -3px 0 #b8871f, 0 10px 26px rgba(210, 161, 58, 0.10);
}

.data-tbl {
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.data-tbl thead th,
th {
  background: #f8fafc;
  border-bottom: 1px solid #dce3ed;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.data-tbl tbody td,
td {
  border-bottom-color: #edf1f6;
}

.data-tbl tbody tr:hover td,
tr:hover td {
  background: #fbfcfe;
}

/* .tag 중복 블록 제거 — 2945줄 단일 정본으로 병합 완료 (값 동일 유지). */

.empty {
  background: #ffffff;
  border-color: #dce3ed;
  color: #667085;
}

/* 2026-06-23(온보딩): 홈 첫 사용 가이드 — 소싱→초안→보드→등록→판매 흐름 한눈에. */
.home-firstrun-guide { margin-top: 4px; }
.home-flow-guide {
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.home-flow-guide li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-flow-guide li > div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.home-flow-guide li > div b { font-size: 13px; color: var(--text-primary, #111827); }
.home-flow-guide-step {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent, #2563eb);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 22px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #dce3ed;
  border-radius: 8px;
  color: var(--text-muted);
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--text-primary);
  background: #f3f6fa;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
}

.empty-state-title {
  margin: 2px 0 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
}

.empty-state-desc {
  max-width: 520px;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: 1.55;
}

.empty-state-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.board-rail-retry {
  border-color: var(--border-strong);
  background: var(--bg-soft);
}

.board-rail-retry h3 {
  margin-bottom: 4px;
}

.board-rail-retry button {
  width: 100%;
  margin-top: 8px;
}

.strip-item .metric-hint {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);   /* 650 → 600 표준 통일 */
  line-height: 1.35;
}

.b1-cards {
  gap: 12px;
}

.b1-card {
  position: relative;
  gap: 18px;
  padding: 16px 18px;
  border-color: #e4e9f1;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.04);
}

.b1-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: #dce3ed;
}

.b1-card:hover {
  border-color: #c7d0de;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

.b1-card[data-status="progress"],
.b1-card[data-status="ready"],
.b1-card[data-status="failed"] {
  background: #ffffff;
}

.b1-card[data-status="progress"]::before { background: #2f6fed; }
.b1-card[data-status="ready"]::before { background: #0f8a6a; }
.b1-card[data-status="failed"]::before { background: #d64545; }

.b1-card-thumb,
.pa-thumb,
.row-thumb {
  border-radius: 8px;
  border-color: #dce3ed;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}

.b1-card-head .b1-card-name {
  font-size: 15px;
}

.b1-price-item {
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid #edf1f6;
  border-radius: 7px;
}

.b1-run-btn {
  background: #151922;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.14);
}

.b1-run-btn:hover {
  background: #252b36;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 11px 12px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #ffffff;
}

.bulk-select-all,
.bulk-card-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.bulk-select-all input,
.bulk-card-check input {
  width: 16px;
  height: 16px;
  accent-color: #151922;
}

.bulk-toolbar span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.bulk-toolbar button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.bulk-card-check {
  align-self: flex-start;
  flex: 0 0 auto;
  margin-top: 2px;
}

.b1-pipeline {
  background: #ffffff;
  border-color: #dce8ff;
  box-shadow: inset 0 0 0 1px rgba(47,111,237,0.02);
}

.b1-pipeline-pct,
.b1-pipeline-step.active .b1-pipeline-dot {
  background: #2f6fed;
  border-color: #2f6fed;
}

.b1-pipeline-step.done .b1-pipeline-dot {
  background: #0f8a6a;
  border-color: #0f8a6a;
}

.global-work-strip {
  top: 0;
  background: #ffffff;
  border-bottom-color: #dce8ff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.10);
}

.global-work-step.active {
  background: #2f6fed;
}

.board-layout-v2 {
  gap: 20px;
}

.board-right .card,
.board-side {
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.board-section-list {
  gap: 16px;
}

.selvoir-section-pair {
  border-left-width: 4px;
  border-color: #e4e9f1;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.07);
}

.selvoir-section-pair-body {
  padding: 10px;
}

.selvoir-section-pair-meta {
  min-height: 38px;
  background: #ffffff;
}

.card-pitch,
.card-image {
  border-color: #e4e9f1;
  background: #ffffff;
}

.card-pitch:hover:not(.dragging),
.card-image:hover:not(.dragging) {
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.07);
}

.card-pitch-left,
.card-image-left {
  background: #ffffff;
}

.selvoir-pitch-preview {
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.04);
}

.card-edit-toggle,
.card-editor-close {
  background: rgba(255,255,255,0.96);
  border-color: #dce3ed;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12);
}

.card-edit-toggle:hover,
.card-editor-close:hover,
.card-pitch.is-editing .card-edit-toggle,
.card-image.is-editing .card-edit-toggle {
  background: #151922;
}

.card-pitch-right,
.card-image-right {
  background: rgba(255,255,255,0.98);
  border-color: #dce3ed;
  box-shadow: 0 18px 44px rgba(16, 24, 40, 0.18);
}

.board-rep-card,
.board-source-thumb,
.slice-card,
.windly-pkg-item {
  border-color: #e4e9f1;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.045);
}

.board-source-thumb:hover,
.slice-card:hover,
.windly-card:hover {
  border-color: #c7d0de;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
}

.windly-category-board {
  gap: 14px;
}

.windly-category-lane {
  padding: 12px;
  background: #fbfcfe;
}

/* B2 v0.2.2 — source lanes removed, pitch/photo rendered as one editorial block. */
.selvoir-section-pair {
  border-left-width: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.07);
}

.selvoir-section-pair-body {
  gap: 0;
  padding: 0;
}

.selvoir-section-pair-meta {
  min-height: 34px;
  padding: 8px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e4e9f1;
}
.selvoir-section-pair {
  position: relative;
}
.selvoir-section-pair:has(.card-image) .card-pitch {
  min-height: 0;
  max-height: none;
}
.selvoir-section-pair:has(.card-image) .card-image {
  min-height: 0;
  max-height: none;
}
.selvoir-section-pair-meta {
  position: relative;
  padding-right: 46px;
}
.selvoir-section-pair-meta .board-section-handle {
  position: static;
  opacity: 1;
  flex: 0 0 auto;
}
.selvoir-section-pair-meta .selvoir-section-pair-label {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selvoir-section-pair-meta .section-delete-x {
  top: 6px;
  right: 10px;
}

.selvoir-section-pair .card-pitch,
.selvoir-section-pair .card-image {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.selvoir-section-pair .card-pitch {
  border-bottom: 0;
}

.selvoir-section-pair .card-image {
  border-top: 1px solid #e4e9f1;
}

.selvoir-section-pair .card-pitch-left,
.selvoir-section-pair .card-image-left {
  padding: 0;
  background: #ffffff;
}

.selvoir-section-pair .card-pitch-left {
  min-height: 0;
}

.selvoir-section-pair .selvoir-pitch-preview {
  min-height: 148px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.selvoir-pitch-preview {
  border-radius: 6px;
}

.selvoir-pitch-preview::after {
  display: none;
}

/* B2 v0.2.3: keep pitch and photo as independent cards, with its own scroll lane. */
.board-layout-v2 .board-left .board-section-list {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scroll-behavior: auto;
}

.board-layout-v2 .board-left .board-section-list > .card-pitch,
.board-layout-v2 .board-left .board-section-list > .card-image,
.board-layout-v2 .board-left .board-section-list > .board-section-card {
  flex: 0 0 auto;
}

body.board-pointer-dragging,
body.board-pointer-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

#board-section-list img {
  -webkit-user-drag: none;
  user-drag: none;
}

.selvoir-pitch-preview--hero {
  --pitch-accent: #eec969;
  --pitch-bg: #151922;
  --pitch-soft: rgba(255,255,255,0.08);
  --pitch-text: #ffffff;
  --pitch-muted: #d8dee8;
  min-height: 174px;
}

.selvoir-pitch-preview--feature {
  --pitch-accent: #0f8a6a;
  --pitch-bg: #f8fffc;
  --pitch-soft: #def7ef;
  min-height: 152px;
}

.selvoir-pitch-preview--scene {
  --pitch-accent: #2f6fed;
  --pitch-bg: #f7fbff;
  --pitch-soft: #e4efff;
  min-height: 158px;
}

.selvoir-pitch-preview--spec {
  --pitch-accent: #64748b;
  --pitch-bg: #ffffff;
  --pitch-soft: #edf1f6;
  min-height: 140px;
}

.selvoir-pitch-preview--cta {
  --pitch-accent: #5cc8f2;
  --pitch-bg: #111827;
  --pitch-soft: rgba(255,255,255,0.08);
  --pitch-text: #ffffff;
  --pitch-muted: #dbeafe;
  min-height: 158px;
}

.selvoir-section-pair .selvoir-pitch-preview {
  --pitch-accent: #a47e3f;
  --pitch-bg: #fafaf8;
  --pitch-soft: #ffffff;
  --pitch-text: #1e222a;
  --pitch-muted: #8a8a8a;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: 172px;
  padding: 30px 38px 28px;
  background: var(--pitch-bg);
}

.selvoir-section-pair .selvoir-pitch-preview::before {
  left: 50%;
  top: auto;
  bottom: 22px;
  width: 72px;
  height: 2px;
  transform: translateX(-50%);
  background: var(--pitch-accent);
  opacity: 0.9;
}

.selvoir-section-pair .selvoir-pitch-topline {
  justify-content: center;
  color: var(--pitch-accent);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.selvoir-section-pair .selvoir-pitch-topline span:first-child,
.selvoir-section-pair .selvoir-pitch-bottomline,
.selvoir-section-pair .selvoir-pitch-mark {
  display: none;
}

.selvoir-section-pair .selvoir-pitch-topline span:last-child {
  padding: 0;
  background: transparent;
  color: var(--pitch-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selvoir-section-pair .selvoir-pitch-headline {
  max-width: 82%;
  margin: 18px auto 0;
  font-size: 24px;
  line-height: 1.36;
  color: var(--pitch-text) !important;
}

.selvoir-pitch-support {
  position: relative;
  z-index: 1;
  max-width: 68%;
  margin: 18px auto 0;
  color: var(--pitch-muted);
  font-size: 14px;
  line-height: 1.7;
  word-break: keep-all;
  white-space: pre-wrap;
}

.selvoir-section-pair:has(.card-image) .card-pitch {
  border-bottom: 0;
}

.selvoir-section-pair:has(.card-image) .card-image {
  border-top: 2px solid #e6d8bf;
}

.selvoir-pitch-headline {
  max-width: 88%;
  font-size: 22px;
  line-height: 1.36;
}

.selvoir-pitch-preview--hero .selvoir-pitch-headline {
  max-width: 86%;
  font-size: 27px;
}

.selvoir-pitch-preview--scene .selvoir-pitch-headline {
  max-width: 84%;
}

.selvoir-section-pair .card-image-left > img {
  display: block;
  width: 100%;
  max-height: none;
  border-radius: 0;
}

.selvoir-section-pair .card-image-filename {
  display: none;
}

.board-source-thumb .source-thumb-caption {
  background: rgba(17, 24, 39, 0.72);
}

.board-source-thumb {
  position: relative;
}

.source-thumb-crop {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 4;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.source-thumb-crop:hover {
  background: #111827;
  color: #ffffff;
}

.source-thumb-delete {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 5;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(255, 255, 255, 0.94);
  color: #b91c1c;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(185, 28, 28, 0.14);
}

.source-thumb-delete:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #7f1d1d;
}

/* B2 v0.2.5 — make board sections read like a real detail page, not AI slot cards. */
.selvoir-section-pair {
  border: 1px solid #e6e0d6;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.055);
}

.selvoir-section-pair-meta {
  position: absolute;
  inset: 10px 10px auto 10px;
  z-index: 16;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.selvoir-section-pair-meta .board-section-handle {
  pointer-events: auto;
  opacity: 0.58;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  min-width: 36px;
}

.selvoir-section-pair-meta .selvoir-section-pair-label {
  display: none;
}

.selvoir-section-pair-meta .section-delete-x {
  pointer-events: auto;
  top: 0;
  right: 0;
}

.selvoir-section-pair .card-edit-toggle {
  top: 10px;
  right: 46px;
}

.selvoir-section-pair .selvoir-pitch-preview {
  min-height: 228px;
  padding: 44px 46px 42px;
  background: #fbfaf7;
}

.selvoir-pitch-kicker {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
  color: var(--pitch-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.selvoir-pitch-preview[data-shape="none"] .selvoir-pitch-mark {
  display: none;
}

.selvoir-pitch-preview[data-shape="side"] {
  border-left: 6px solid var(--pitch-accent);
}

.selvoir-pitch-preview[data-shape="side"] .selvoir-pitch-mark {
  display: none;
}

.selvoir-pitch-preview[data-shape="pill"] .selvoir-pitch-kicker {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--pitch-accent) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--pitch-accent) 14%, transparent);
}

.card-field-label {
  display: block;
  margin: 10px 0 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.card-pitch-slot-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.card-pitch-slot-input:focus {
  border-color: #4f6df5;
  box-shadow: 0 0 0 3px rgba(79, 109, 245, 0.13);
  outline: none;
}

.selvoir-section-pair .selvoir-pitch-headline {
  margin-top: 0;
  max-width: 88%;
  font-size: 32px;
  line-height: 1.32;
  font-weight: 900;
}

.selvoir-section-pair .selvoir-pitch-support {
  max-width: 78%;
  margin-top: 20px;
  color: var(--pitch-muted);
  font-size: 16px;
  line-height: 1.72;
}

.selvoir-pitch-preview[data-align="left"] {
  align-items: flex-start;
  text-align: left;
}

.selvoir-pitch-preview[data-align="center"] {
  /* 2026-07-21 FIX(헤드라인 조기 랩): align-items:center는 flex 자식(.selvoir-pitch-block)을
     내용폭으로 수축시켜 13자 헤드라인도 272px 상자에서 3~4줄로 꺾였다(실측). 중앙 정렬은
     text-align + 자식 max-width/margin:auto(6550)가 담당 — 블록은 stretch로 전폭 확보. */
  align-items: stretch;
  text-align: center;
}

.selvoir-pitch-preview[data-align="right"] {
  align-items: flex-end;
  text-align: right;
}

.selvoir-pitch-preview[data-align="center"] .selvoir-pitch-headline,
.selvoir-pitch-preview[data-align="center"] .selvoir-pitch-support {
  margin-left: auto;
  margin-right: auto;
}

.selvoir-pitch-preview[data-align="right"] .selvoir-pitch-headline,
.selvoir-pitch-preview[data-align="right"] .selvoir-pitch-support {
  margin-left: auto;
}

.selvoir-pitch-preview[data-align="center"] .selvoir-pitch-mark {
  /* 2026-07-21: align-items:stretch 전환 후 마크 좌우 정렬은 margin이 전담 — 13263의
     `margin: 10px 0 !important`(상하 압축용)에 지지 않도록 !important 필요. */
  margin-left: auto !important;
  margin-right: auto !important;
}

.selvoir-pitch-preview[data-align="right"] .selvoir-pitch-mark {
  margin-left: auto !important;
}

.card-pitch-right .card-split-textarea {
  resize: vertical;
}

.card-pitch-right .card-split-textarea--subtitle {
  min-height: 68px;
  max-height: 128px;
}

.card-pitch-right .card-split-actions {
  position: sticky;
  bottom: -10px;
  z-index: 4;
  padding: 8px 0 2px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), var(--bg-soft, #f8fafc) 22%);
}

.pitch-align-btn {
  min-width: 54px;
  width: auto;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.pitch-align-btn.toggle-active {
  background: #111827;
  color: #fff;
}

.selvoir-section-pair .card-image {
  border-top: 3px solid #eadcc4;
}

.selvoir-section-pair .card-image-left > img {
  background: #fff;
}

.crop-added-focus {
  outline: 3px solid #4f6df5;
  outline-offset: 4px;
  transition: outline-color 0.25s, outline-offset 0.25s;
}

.crop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.54);
}

.crop-modal {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

.crop-modal-head,
.crop-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #e4e9f1;
}

.crop-modal-foot {
  border-top: 1px solid #e4e9f1;
  border-bottom: 0;
}

.crop-modal-head h3 {
  margin: 0 0 2px;
}

.crop-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e4e9f1;
  background: #ffffff;
  color: #111827;
  font-size: 20px;
  cursor: pointer;
}

.crop-stage-wrap {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  padding: 18px;
  text-align: center;
  background: #f8fafc;
}

.crop-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  cursor: crosshair;
  user-select: none;
}

.crop-stage img {
  display: block;
  max-width: min(100%, 980px);
  max-height: calc(100vh - 210px);
  width: auto;
  height: auto;
  background: #ffffff;
}

.crop-box {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border: 2px solid #111827;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.36);
  pointer-events: auto;
}

.crop-free-layer {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 6;
}

.crop-free-layer polyline {
  fill: rgba(37, 99, 235, 0.14);
  stroke: #2563eb;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.25);
}
.crop-handle-nw { left: -7px; top: -7px; cursor: nwse-resize; }
.crop-handle-n { left: 50%; top: -7px; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle-ne { right: -7px; top: -7px; cursor: nesw-resize; }
.crop-handle-e { right: -7px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.crop-handle-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.crop-handle-s { left: 50%; bottom: -7px; transform: translateX(-50%); cursor: ns-resize; }
.crop-handle-sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.crop-handle-w { left: -7px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.crop-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.crop-mode-btn {
  min-height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}
.crop-mode-btn.active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.crop-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Crop editor v0.2.6 — zoomable stage + live preview + background options. */
.crop-modal-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.crop-modal-body .crop-stage-wrap {
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  text-align: center;
}

.crop-modal-body .crop-stage {
  transform-origin: 0 0;
}

.crop-inspector {
  min-width: 0;
  overflow: auto;
  padding: 16px;
  border-left: 1px solid #e4e9f1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crop-tool-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #fbfcfe;
}

.crop-guidance-card {
  border-color: #dbeafe;
  background: #f8fbff;
}

.crop-tool-title {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.crop-zoom-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px 46px;
  align-items: center;
  gap: 8px;
}

.crop-zoom-row input[type="range"] {
  width: 100%;
}

.crop-zoom-row .icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
}

#board-crop-zoom-label {
  color: #526071;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.crop-preview-canvas {
  width: 100%;
  aspect-ratio: 13 / 11;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%),
    #ffffff;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.crop-tool-card select,
.crop-tool-card textarea {
  width: 100%;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

.crop-tool-card select {
  min-height: 38px;
  padding: 0 10px;
}

.crop-tool-card textarea {
  min-height: 80px;
  padding: 10px;
  resize: vertical;
}

@media (max-width: 960px) {
  .crop-modal-body {
    grid-template-columns: 1fr;
  }

  .crop-inspector {
    max-height: 280px;
    border-left: 0;
    border-top: 1px solid #e4e9f1;
  }
}

.windly-card {
  background: #ffffff;
}

.windly-card-head {
  border-bottom-color: #edf1f6;
}

.windly-pkg-item {
  background: #fbfcfe;
}

.windly-pkg-thumb {
  background: #ffffff;
  border-color: #dce3ed;
}

/* Registration package v0.2.3 — user-facing package is only representative + detail page. */
.windly-card-compact {
  padding: 12px;
  margin: 8px 0;
}

.windly-card-compact .windly-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.windly-card-main {
  min-width: 0;
}

.windly-card-title {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.windly-card-title b {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  font-size: 14px;
}

.windly-package-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.windly-package-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #dce3ed;
  border-radius: 999px;
  background: #f8fafc;
  color: #526071;
  font-size: 11px;
  font-weight: 700;
}

.windly-package-meta span.ok {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.windly-tag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 58px;
  overflow: hidden;
  margin-top: 8px;
}

.windly-card-compact .windly-card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.windly-card-compact .windly-card-actions button,
.windly-card-compact .windly-category-control select {
  width: 100%;
}

.windly-pkg-grid-simple {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.windly-pkg-grid-simple .windly-pkg-item {
  padding: 8px;
}

.windly-pkg-grid-simple .windly-pkg-thumb {
  height: 92px;
}

.windly-pkg-grid-simple .windly-pkg-thumb.tall {
  height: 92px;
}

/* Registration package v0.2.4 — queue layout, no kanban lanes. */
.registration-page {
  display: grid;
  gap: 16px;
}

.registration-hero,
.registration-panel {
  background: #ffffff;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.045);
}

.registration-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
}

.registration-hero-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  border: 1px solid #dce3ed;
  color: #111827;
  background: #f8fafc;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.06);
}

.registration-hero-mark .ui-icon {
  width: 21px;
  height: 21px;
}

.registration-hero > div:nth-child(2) {
  flex: 1 1 auto;
  min-width: 0;
}

.registration-hero h2,
.registration-panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.registration-hero p,
.registration-panel-head p {
  margin: 6px 0 0;
  max-width: 760px;
  color: #64748b;
  line-height: 1.55;
}

.registration-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 8px;
  min-width: 220px;
}

.registration-hero-stats > div {
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
}

.registration-hero-stats span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.registration-hero-stats b {
  color: #111827;
  font-size: 24px;
  line-height: 1;
}

.registration-panel {
  padding: 16px;
}

.registration-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf1f6;
}

.registration-category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 560px;
}

.registration-category-pills span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #e4e9f1;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.registration-category-pills span.active {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.registration-package-list,
.registration-pending-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ui-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon.micro {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.ui-icon.button-icon {
  width: 15px;
  height: 15px;
  margin-right: 6px;
}

.registration-package-card {
  display: grid;
  grid-template-columns: 252px minmax(260px, 1fr) 180px;
  gap: 16px;
  align-items: center;
  min-height: 128px;
  padding: 15px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.registration-package-card:hover {
  border-color: #cfd8e6;
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.registration-preview-duo {
  display: grid;
  grid-template-columns: 96px 136px;
  gap: 10px;
  align-items: stretch;
  width: 242px;
  height: 106px;
}

.registration-preview {
  position: relative;
  height: 106px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: linear-gradient(145deg, #ffffff 0%, #f5f7fb 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.registration-preview > span {
  position: absolute;
  z-index: 1;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.registration-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  background: #ffffff;
}

.registration-preview-rep img {
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

.registration-preview-detail img {
  object-fit: cover;
  object-position: top center;
}

.registration-preview-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 0;
  color: #94a3b8;
  font-size: 12px;
}

.registration-package-main {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 2px 0;
}

/* P01 full-run debug 2026-06-09: 등록 패키지 카드 내 마진/주소 정보 패널 */
.registration-package-commerce {
  border-top: 1px dashed #dce3ed;
  padding-top: 10px;
  display: grid;
  gap: 10px;
}
.registration-package-commerce .commerce-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
  font-size: var(--fs-base);
}
.registration-package-commerce .commerce-grid > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.registration-package-commerce .commerce-grid label {
  color: #6b7280;
  flex: 0 0 auto;
}
.registration-package-commerce .commerce-grid b {
  color: #111827;
  font-weight: 600;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* #168: 등록 패키지 가격 설정 행 — 판매가·배송비 입력 + 정본 재계산 저장 */
.registration-package-commerce .commerce-price-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 9px 12px;
  background: #f7f9fc;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
}
.registration-package-commerce .commerce-price-edit-title {
  font-weight: 600;
  color: #111827;
  font-size: var(--fs-sm);
}
.registration-package-commerce .commerce-price-edit label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: var(--fs-sm);
}
.registration-package-commerce .commerce-price-edit input {
  width: 108px;
  padding: 5px 8px;
  border: 1px solid #d6dde8;
  border-radius: 7px;
  font-size: var(--fs-base);
  background: #fff;
}
.registration-package-commerce .commerce-price-edit .muted.small {
  flex-basis: 100%;
}
.registration-package-commerce .commerce-addr {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-size: 12px;
}
.registration-package-commerce .commerce-addr > div {
  display: grid;
  gap: 2px;
  background: #f7f9fc;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.registration-package-commerce .commerce-addr label {
  color: #6b7280;
  font-size: var(--fs-sm);
}
.registration-package-commerce .commerce-addr b {
  color: #111827;
  font-weight: 600;
}
.registration-package-commerce .commerce-addr span {
  color: #4b5563;
  word-break: break-all;
}

.registration-title-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.registration-title-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.05);
}

.registration-title-icon .ui-icon {
  width: 15px;
  height: 15px;
}

.registration-title-line b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
}

.registration-package-meta,
.registration-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.registration-tags {
  max-height: 29px;
  overflow: hidden;
}

.registration-package-meta span,
.registration-tags span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.registration-package-meta span {
  border: 1px solid #dce3ed;
  background: #ffffff;
  color: #526071;
}

.registration-package-meta span.ready {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.registration-tags span {
  border: 1px solid #e4e9f1;
  background: #f1f5f9;
  color: #64748b;
}

.registration-warning {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.45;
}

.registration-actions {
  display: grid;
  gap: 7px;
  align-content: center;
}

.registration-actions label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.registration-label-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.registration-actions select,
.registration-actions button {
  width: 100%;
  min-height: 34px;
}

.registration-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.registration-actions select {
  padding: 5px 8px;
  color: #111827;
  background: #ffffff;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
}

.registration-pending-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  background: #fbfcfe;
}

.registration-pending-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.registration-pending-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .registration-package-card {
    grid-template-columns: 220px minmax(220px, 1fr) 160px;
  }
  .registration-preview-duo {
    grid-template-columns: 86px 118px;
    width: 214px;
  }
}

@media (max-width: 880px) {
  .registration-hero,
  .registration-panel-head,
  .registration-pending-row {
    flex-direction: column;
  }
  .registration-hero {
    display: grid;
  }
  .registration-hero-stats {
    min-width: 0;
  }
  .registration-category-pills {
    justify-content: flex-start;
  }
  .registration-package-card {
    grid-template-columns: 1fr;
  }
  .registration-preview-duo {
    width: 100%;
    max-width: 260px;
    grid-template-columns: 100px minmax(0, 1fr);
  }
.registration-actions {
    grid-template-columns: 1fr 1fr;
  }
  .registration-actions label {
    grid-column: 1 / -1;
  }
}

.ai-preset-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.ai-preset-modal {
  width: min(720px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  padding: 18px;
}

.ai-preset-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf1f6;
}

.ai-preset-head h3 {
  margin: 0;
  color: #111827;
}

.ai-preset-head p {
  margin: 6px 0 0;
  color: #526071;
  line-height: 1.5;
}

.ai-preset-close {
  width: 32px;
  height: 32px;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: #ffffff;
}

.ai-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ai-preset-card {
  display: grid;
  gap: 7px;
  min-height: 128px;
  padding: 13px;
  text-align: left;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  background: #fbfcfe;
  color: #111827;
}

.ai-preset-card span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: #ffffff;
}

.ai-preset-card b {
  font-size: 14px;
  line-height: 1.35;
}

.ai-preset-card small {
  color: #64748b;
  line-height: 1.45;
}

.ai-preset-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.ai-preset-suggest {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.ai-preset-suggest select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  font: inherit;
  background: #fbfcfe;
  color: #111827;
}

.ai-preset-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.ai-preset-field {
  display: grid;
  gap: 6px;
}

.ai-preset-field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
}

.ai-preset-field-select,
.ai-preset-field-custom {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  color: #111827;
  background: #fbfcfe;
}

.ai-preset-custom {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.ai-preset-custom textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  font: inherit;
  line-height: 1.5;
}

.ai-preset-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.selling-package-card {
  grid-template-columns: minmax(320px, 1fr) 190px;
}

.selling-package-main {
  align-content: start;
}

.selling-order-cta {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.selling-order-cta > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.selling-order-cta b {
  color: #111827;
  font-size: var(--fs-base);
  line-height: 1.5;
}

.selling-order-cta p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.selling-actions .muted.small {
  display: block;
  line-height: 1.4;
}

@media (max-width: 880px) {
  .ai-preset-grid {
    grid-template-columns: 1fr;
  }

  .ai-preset-fields {
    grid-template-columns: 1fr;
  }

  .selling-package-card {
    grid-template-columns: 1fr;
  }
}

/* Home v0.2.5 — customer-facing dashboard, no internal warning board. */
.toolbar {
  border-left-color: #151922;
}

.toolbar .hero-title {
  font-size: 19px;
}

.toolbar .hero-sub {
  flex-basis: 100%;
  font-size: 13px;
  line-height: 1.5;
}

.home-flow-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e4e9f1;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.toolbar-right .home-flow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  box-shadow: none;
  font-size: var(--fs-base);
  font-weight: var(--fw-extrabold);  /* 850 → 800 표준 통일 */
  white-space: nowrap;
}

.toolbar-right .home-flow-pill:hover {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
  transform: none;
}

.toolbar-right .home-flow-pill.is-current {
  background: #151922;
  color: #ffffff;
}

.home-flow-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-strip {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.strip-item {
  position: relative;
  overflow: hidden;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.045);
}

.strip-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: #151922;
}

.strip-item:nth-child(2)::before {
  background: #0f766e;
}

.strip-item:nth-child(3)::before {
  background: #2563eb;
}

.strip-item:nth-child(4)::before {
  background: #a16207;
}

.strip-item label {
  color: #64748b;
}

.strip-item b {
  font-size: 24px;
  color: #111827;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-action-list {
  display: grid;
  gap: 10px;
}

.home-action-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.home-action-card:hover {
  border-color: #cfd8e6;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.07);
  transform: translateY(-1px);
}

.home-action-card.is-primary {
  border-color: #dccd93;
  background: linear-gradient(135deg, #fffdf4 0%, #ffffff 62%);
  box-shadow: 0 12px 30px rgba(161, 98, 7, 0.08);
}

.home-action-card.is-primary .home-action-icon {
  color: #ffffff;
  background: #151922;
  border-color: #151922;
}

.home-action-card.is-running {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 70%);
}

.home-action-card.is-running .home-action-icon {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.home-action-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #dce3ed;
  background: #f8fafc;
  color: #111827;
}

.home-action-svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-action-icon-spark {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.home-action-icon-layers {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.home-action-icon-board {
  color: #047857;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.home-action-icon-package {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
}

.home-action-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-action-copy span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.home-action-copy b {
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
}

.home-action-state {
  justify-self: end;
}

.home-action-btn {
  justify-self: end;
}

.home-action-btn button {
  min-width: 104px;
}

@media (max-width: 920px) {
  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-action-card {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
  }
  .home-action-state,
  .home-action-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .home-action-btn button {
    width: 100%;
  }
}

.float-btn {
  border-color: #dce3ed;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
}

.toast {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.18);
}

@media (max-width: 768px) {
  #app {
    width: 100vw;
    overflow-x: hidden;
  }
  #main {
    width: calc(100vw - 60px);
    max-width: calc(100vw - 60px);
    overflow-x: hidden;
  }
  #topbar {
    padding: 0 12px;
    max-width: calc(100vw - 60px);
    overflow: hidden;
  }
  .topbar-left {
    min-width: 0;
  }
  .topbar-right {
    min-width: 0;
    max-width: 120px;
    overflow: hidden;
  }
  .last-updated {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #content {
    width: 100%;
    padding: 18px 14px 28px;
    max-width: 100%;
    overflow-x: hidden;
  }
  #content > * {
    max-width: 100%;
  }
  .toolbar {
    padding: 16px;
  }
  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }
  .toolbar-right button {
    flex: 1 1 132px;
    justify-content: center;
  }
  .home-flow-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .toolbar-right .home-flow-pill {
    width: 100%;
    padding: 0 8px;
  }
  .hero-sub {
    overflow-wrap: anywhere;
  }
  .status-strip {
    gap: 8px;
  }
  .strip-item {
    min-height: 74px;
  }
  .section,
  .card {
    max-width: 100%;
    overflow-x: auto;
  }
  .data-tbl {
    min-width: 620px;
  }
}

@media (max-width: 1000px) {
  #app {
    grid-template-columns: 60px minmax(0, 1fr);
  }
  #app .brand,
  #app .user-meta,
  #app .user-caret,
  #app .menu.solo .lbl,
  #app .group-section-title,
  #app .sidebar-bottom {
    display: none;
  }
  #app .brand-area {
    padding: 14px 6px;
    justify-content: center;
  }
  #app .user-card {
    justify-content: center;
    padding: 8px;
    margin: 10px 6px;
  }
  #app .menu.solo {
    justify-content: center;
    padding: 10px 0;
    margin: 3px 6px;
  }
  #app .menu.solo.active::before {
    left: 6px;
  }
}

.pa-history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.pa-history-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
}

.pa-history-chip:hover,
.pa-history-chip.active {
  border-color: #111827;
  box-shadow: var(--shadow-md);
}

.pa-history-chip span,
.pa-history-chip small {
  color: var(--text-muted);
}

.pa-keyword-section {
  margin-top: 12px;
}

.pa-keyword-grid,
.pa-keyword-explore {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pa-keyword-explore {
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.pa-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #d8e0ea;
  background: #fff;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.pa-keyword-chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #151922;
  color: #fff;
  font-size: 11px;
}

.pa-keyword-chip small {
  color: var(--text-muted);
  font-weight: 600;
}

.pa-keyword-chip.muted-chip {
  color: var(--text-secondary);
  background: #f8fafc;
  font-weight: 600;
}

/* 소싱 결과 리스트 컨트롤(검색·공급처 필터·정렬) — 데이보어 픽 복원(2026-07-01) */
.pa-result-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.pa-result-search input { padding: 7px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); font-size: var(--fs-sm); min-width: 220px; background: #fff; }
.pa-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pa-filter-chip { padding: 5px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-pill); background: var(--bg-soft); font-size: var(--fs-xs); font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.pa-filter-chip:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.pa-filter-chip.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.pa-sort-th { cursor: pointer; user-select: none; white-space: nowrap; }
.pa-sort-th:hover { color: var(--accent-blue); }
.pa-sort-th.is-sorted { color: var(--accent-blue); }
.dvp-list-tbl .row-thumb, .dvp-list-tbl .row-thumb-empty { width: 44px; height: 44px; }
/* 마진·판매 탭: 채널 선택 카드 + 판매가 입력 */
.pa-margin-card { cursor: pointer; }
.pa-margin-card.is-selected { border-color: var(--accent-blue); box-shadow: 0 0 0 2px var(--accent-blue-soft); }
.dvp-ch-badge { font-size: var(--fs-2xs); font-weight: 800; color: #fff; background: var(--accent-blue); padding: 1px 7px; border-radius: var(--radius-pill); margin-left: 6px; }
.dvp-price-input { width: 104px; padding: 4px 8px; border: 1px solid var(--border-light); border-radius: var(--radius-xs); font-size: var(--fs-md); font-weight: 700; text-align: right; }

/* Workspace switcher: 사업부 전환(등록된 워크스페이스) */
.brand-switcher {
  position: relative;
  justify-content: stretch;
  flex: 1 1 auto;
  min-width: 0;
}

.brand-switcher-button {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
  padding: 4px 0;
  overflow: visible;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  color: #111827;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 5.6px;
  line-height: 1;
  white-space: nowrap;
}

/* 2026-07-21 CEO 로고 확정(세리프 정본): SELVOIR. — Georgia 세리프 볼드, O·마침표만 골드
   (#a47e3f, 서명·정보블록과 동일 골드), Y↔V 간격은 자간에 +0.11em 추가.
   서명 PNG(_draw_selvoir_wordmark)와 동일 형태 — 워드마크를 바꾸면 3면(서명·여기·로그인) 동시 갱신. */
.brand-wordmark.selvoir-wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.055em;
}

.selvoir-wordmark .wm-o,
.selvoir-wordmark .wm-dot {
  color: #a47e3f;
}

.selvoir-wordmark .wm-v {
  margin-left: 0.11em;
}

.brand-wordmark.selvoir-wordmark {
  padding-left: 0;
  transform: none;
  transform-origin: left center;
}

.selvoir-wordmark .wm-dot {
  letter-spacing: 0;
}













.brand-caret {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: #6b7280;
  padding: 3px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.brand-wordmark.selvoir-wordmark + .brand-caret {
  margin-left: auto;
}

.brand-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: none;
  padding: 6px;
  background: #fff;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.16);
}

.brand-switcher-menu.open {
  display: grid;
  gap: 4px;
}

.brand-option {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
}

.brand-option:hover,
.brand-option.active {
  background: #f8fafc;
  border-color: #e5eaf2;
}

.brand-option b {
  font-size: 12px;
  letter-spacing: 1.2px;
  color: #111827;
}

.brand-option span {
  font-size: 11px;
  color: #64748b;
}



































#alpha-manual-approval-section {
  display: none;
}





























































































































button.mini,
.mini {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
  border-radius: 8px;
}































/* QW1/QW2 (2026-06-24): 승인 근거를 접지 않고 항상 보이는 카드 + 비중변화 헤더. */












/* QW4 (2026-06-24): 탑다운 리포트 안 '오늘 결정할 종목' 전폭 결정 패널. */

















































































.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-smoke-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: #f8fbff;
}

.ops-smoke-panel > div {
  display: grid;
  gap: 4px;
}

.ops-smoke-panel b {
  color: #0f172a;
  font-size: 14px;
}

.ops-smoke-panel span {
  color: #64748b;
  font-size: 12px;
}

.ops-smoke-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-smoke-summary,
.ops-smoke-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-smoke-list {
  margin-top: 10px;
}

.ops-smoke-row {
  display: grid;
  grid-template-columns: auto minmax(110px, auto) minmax(160px, 1fr);
  align-items: center;
  gap: 8px;
  width: min(100%, 520px);
  padding: 9px 10px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fff;
}

.ops-smoke-row b {
  color: #111827;
  font-size: 12px;
}

.ops-smoke-row span:last-child {
  color: #64748b;
  font-size: 12px;
}



































.storyline-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.storyline-modal {
  width: min(980px, 96vw);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
}

.storyline-modal-head,
.storyline-modal-foot {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e6edf6;
}

.storyline-modal-foot {
  border-top: 1px solid #e6edf6;
  border-bottom: 0;
  justify-content: flex-end;
}

.storyline-modal-body {
  padding: 20px 22px;
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.4fr);
  gap: 18px;
}

.storyline-modal-body section {
  border: 1px solid #e6edf6;
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.storyline-competitor {
  padding: 12px 0;
  border-bottom: 1px solid #e6edf6;
}

.storyline-competitor:last-child {
  border-bottom: 0;
}

.storyline-reference-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e6edf6;
  display: grid;
  gap: 8px;
}

.storyline-reference-box label {
  font-weight: var(--fw-extrabold);  /* 850 → 800 표준 통일 */
  color: #111827;
}

.storyline-reference-inputs {
  display: grid;
  gap: 8px;
}

.storyline-reference-box input[type="url"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d4deeb;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  background: #fff;
}

.storyline-reference-box input[type="url"]:focus {
  outline: none;
  border-color: #4f6df5;
  box-shadow: 0 0 0 3px rgba(79, 109, 245, .12);
}

.storyline-reference-help {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.story-pill {
  display: inline-flex;
  align-items: center;
  margin: 4px 4px 0 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #243b63;
  font-size: 12px;
  font-weight: 700;
}

.storyline-edit-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.storyline-edit-row label {
  font-weight: 800;
  color: #111827;
}

.storyline-edit-row input,
.storyline-edit-row textarea {
  width: 100%;
  border: 1px solid #d4deeb;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

/* ⑩(2026-07-10): 포인트 행 삭제 버튼 + 추가 버튼 + shortfall 배지. */
.storyline-point-row label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.storyline-point-delete {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  line-height: 1;
  border-radius: 999px;
  font-weight: 800;
}

.storyline-point-actions {
  margin: -6px 0 14px;
}

.storyline-point-shortfall-badge {
  display: block;
  margin-bottom: 12px;
  padding: 8px 12px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .storyline-modal-body {
    grid-template-columns: 1fr;
  }
}

/* B2 image cards use a compact action panel: directive + AI edit/crop/delete only. */
.card-image .card-image-right {
  top: 46px;
  right: 12px;
  bottom: auto;
  left: auto;
  width: min(330px, calc(100% - 24px));
  min-width: 260px;
  max-height: none;
  padding: 12px;
  gap: 10px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #dce3ed;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.16);
}

.card-image .card-image-right .card-split-header {
  margin-right: 32px;
}

/* B2 pitch editor: edit copy like a document editor, without the old badge header. */
.card-pitch.is-editing {
  display: block;
  padding: 14px;
  overflow: visible;
  background: #fff;
}

.card-pitch.is-editing .card-pitch-right {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  align-self: auto;
  width: 100%;
  min-width: 0;
  max-height: none;
  margin: 0;
  z-index: 1;
  overflow: visible;
  background: #ffffff;
  backdrop-filter: none;
  padding: 18px;
  gap: 12px;
}

.card-pitch.is-editing > .card-edit-toggle {
  display: none;
}

.card-pitch.is-editing .card-pitch-left {
  min-height: 240px;
  margin-bottom: 16px;
}

.card-pitch.is-editing .selvoir-pitch-preview {
  min-height: 260px;
}

.card-pitch-right > .card-split-header {
  display: none;
}

.card-split-format-row--support {
  display: none;
}

.card-split-format-row--support.is-focused {
  border-color: #4f6df5;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(79, 109, 245, .14);
}

.pitch-support-only,
.pitch-align-group--support {
  display: none;
}

.pitch-floating-toolbar {
  position: static;
  z-index: auto;
  display: none;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin: 2px 0 8px;
  border: 1px solid rgba(209, 219, 233, .95);
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: none;
  backdrop-filter: none;
}

.board-unified-toolbar {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
}

.board-pitch-toolbar,
.board-image-toolbar {
  position: relative;
  top: auto;
  z-index: 5;
  display: grid;
  gap: 10px;
  padding: 12px;
  margin: 0;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  backdrop-filter: blur(10px);
}

.board-pitch-toolbar.is-disabled,
.board-image-toolbar.is-disabled {
  border-style: dashed;
  background: #f8fafc;
  box-shadow: none;
}

.board-pitch-toolbar-main,
.board-pitch-toolbar-controls,
.board-image-toolbar-main,
.board-image-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.board-pitch-toolbar-main,
.board-image-toolbar-main {
  justify-content: space-between;
}

.board-image-toolbar {
  border-color: #d6e4ff;
  background: rgba(248, 251, 255, .98);
}

.board-image-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.board-image-toolbar-controls {
  flex-wrap: wrap;
}

.board-image-toolbar-controls input[type="text"] {
  min-width: 260px;
  flex: 1 1 280px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
}

.board-image-toolbar-controls input[type="number"] {
  width: 58px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
}

.board-image-toolbar-controls input[type="color"] {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.board-image-toolbar-controls input[type="range"] {
  width: 92px;
}

.board-pitch-toolbar-copy {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.board-pitch-toolbar-copy b {
  color: #0f172a;
  font-size: 14px;
  letter-spacing: 0;
}

.board-pitch-toolbar-copy span {
  color: #64748b;
  font-size: 12px;
}

.board-pitch-toolbar-targets {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.board-pitch-toolbar-controls {
  flex-wrap: wrap;
}

.board-pitch-toolbar-text {
  width: 100%;
  min-height: 72px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid #dbe5f2;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.board-pitch-toolbar-text:focus {
  outline: none;
  border-color: #4f6df5;
  box-shadow: 0 0 0 3px rgba(79, 109, 245, .14);
}

.board-pitch-toolbar-card-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

.board-pitch-toolbar-card-controls > label {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.board-pitch-toolbar-card-controls select {
  min-height: 34px;
  min-width: 130px;
}

.board-pitch-toolbar-color-row,
.board-pitch-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.board-pitch-toolbar-color-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.board-pitch-toolbar-color-row input[type="color"] {
  width: 34px;
  min-width: 34px;
  height: 32px;
  padding: 2px;
}

.board-pitch-toolbar-autosave {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4054b2;
  font-size: 12px;
  font-weight: 900;
}

.board-pitch-toolbar-autosave[data-mode="saved"] {
  background: #ecfdf3;
  color: #047857;
}

.board-pitch-toolbar-autosave[data-mode="error"],
.board-pitch-toolbar-autosave[data-mode="warn"] {
  background: #fff7ed;
  color: #b45309;
}

.card-pitch > .card-edit-toggle,
.card-pitch .card-pitch-right {
  display: none !important;
}

.board-pitch-toolbar-controls select {
  width: 180px;
  min-height: 34px;
}

.board-pitch-toolbar-controls input[type="number"] {
  width: 66px;
  min-height: 34px;
}

.board-pitch-toolbar-controls input[type="color"] {
  width: 38px;
  min-width: 38px;
  height: 34px;
  padding: 3px;
}

.board-pitch-toolbar-align {
  margin: 0;
}

.card-pitch.is-toolbar-selected .selvoir-pitch-preview {
  outline: 2px solid rgba(79, 109, 245, .42);
  outline-offset: 4px;
}

/* 2026-07-10 FIX(CEO ⑨ 라벨 정보 접근성 유지): role=label 레이어는 캔버스 안에서 더는
   그리지 않는다(위 .selvoir-pitch-layer-stage .card-image-layer--role-label 참고 - 콘텐츠
   위 겹침 제거). 대신 카드를 선택하면(.is-toolbar-selected - 카드 클릭 시 실제로 붙는 상태,
   _boardPointerStart -> selectPitchCardForToolbar) 카드 캔버스 바깥(테두리 위)에 라벨 값을
   작은 태그로 노출해 "확인 가능"을 유지한다. data-slot-label은 renderPitchCard가 카드
   최상위 요소에 이미 심어둔 값 - 신규 DOM 불필요, .card-pitch는 position:relative/overflow:
   visible이라 캔버스 내부 overflow:hidden에 잘리지 않는다.
*/
.card-pitch.is-toolbar-selected::before {
  content: "라벨 " attr(data-slot-label);
  position: absolute;
  top: -20px;
  left: 10px;
  z-index: 15;
  padding: 2px 9px;
  border-radius: 5px 5px 0 0;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
/* ⑳(260713) 확장: 레이어/텍스트 타깃 없이 "카드 자체"가 선택된 상태(.board-sel-card, JS가
   추가)에서는 위 라벨-접근성 태그 대신 "카드: {슬롯명}"을 보여준다(선택 3 (0,3,1) >
   선택 2 (0,2,1) 특이도로 위 규칙을 자연 override, 레이어/텍스트 타깃 선택 시엔 .board-sel-card가
   없어 기존 라벨 접근성 태그가 그대로 유지된다 - ⑨ 무회귀). */
.card-pitch.is-toolbar-selected.board-sel-card::before {
  content: "카드: " attr(data-slot-label);
  background: var(--sel-card);
}

.card-pitch-actions {
  position: static;
  z-index: auto;
  padding: 6px 0 0;
  background: transparent;
}

.card-pitch-right .card-split-actions.card-pitch-actions {
  position: static;
  bottom: auto;
  z-index: auto;
}

.pitch-floating-toolbar .card-field-label {
  margin: 0;
  min-width: 88px;
  white-space: nowrap;
}

.pitch-floating-toolbar .card-split-format-row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.pitch-floating-toolbar .card-split-format-row select {
  min-width: 104px;
  max-width: 130px;
}

.pitch-floating-toolbar .card-split-format-row input[type="number"] {
  width: 54px;
}

.pitch-floating-toolbar .card-split-format-row input[type="color"] {
  width: 32px;
  min-width: 32px;
  padding: 2px;
}

.pitch-target-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  margin: 0 0 8px;
  border: 1px solid #e5edf8;
  border-radius: 10px;
  background: #f8fafc;
}

.pitch-target-switch span {
  flex: 1;
  min-width: 72px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pitch-target-btn {
  flex: 1;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pitch-target-btn.toggle-active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.pitch-floating-align-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pitch-floating-align-row > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.pitch-floating-align-row .pitch-align-group {
  margin: 0;
}

.pitch-align-group--compact {
  display: inline-flex;
  gap: 2px;
  width: auto;
  min-width: 0;
}

.pitch-align-group--compact .pitch-align-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
}

.pitch-align-group--compact .align-icon {
  display: block;
  width: 14px;
  height: 12px;
  background:
    linear-gradient(currentColor, currentColor) left 0 top 0 / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left 0 top 5px / 10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left 0 top 10px / 14px 2px no-repeat;
}

.pitch-align-group--compact .pitch-align-btn--center .align-icon {
  background:
    linear-gradient(currentColor, currentColor) center top 0 / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center top 5px / 10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center top 10px / 14px 2px no-repeat;
}

.pitch-align-group--compact .pitch-align-btn--right .align-icon {
  background:
    linear-gradient(currentColor, currentColor) right 0 top 0 / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right 0 top 5px / 10px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right 0 top 10px / 14px 2px no-repeat;
}

.selvoir-pitch-kicker[data-copy-target],
.selvoir-pitch-headline[data-copy-target],
.selvoir-pitch-support[data-copy-target] {
  cursor: text;
  border-radius: 6px;
}

.selvoir-pitch-kicker.is-copy-target-active,
.selvoir-pitch-headline.is-copy-target-active,
.selvoir-pitch-support.is-copy-target-active {
  outline: 2px solid rgba(79, 109, 245, .34);
  outline-offset: 4px;
}

.selvoir-pitch-support[data-copy-target="support"] {
  cursor: text;
}

/* B2 pitch toolbar compact mode: preview changes stay local until 임시저장. */
.selvoir-pitch-block {
  position: relative;
}

.selvoir-pitch-preview.has-block-layout {
  position: relative;
  min-height: 360px;
}

.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block[style] {
  position: absolute;
  z-index: 2;
  min-width: 36px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block[style]:hover,
.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block.is-selected {
  border-color: rgba(79, 109, 245, .62);
  background: rgba(255, 255, 255, .18);
}

.pitch-block-move-handle,
.pitch-block-resize-handle {
  display: none;
}

.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block[style] .pitch-block-move-handle,
.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block[style] .pitch-block-resize-handle {
  display: block;
  position: absolute;
  z-index: 4;
  opacity: 0;
  transition: opacity .12s ease;
}

.selvoir-pitch-block:hover > .pitch-block-move-handle,
.selvoir-pitch-block:hover > .pitch-block-resize-handle {
  display: block;
  position: absolute;
  z-index: 4;
  opacity: .9;
}

.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block[style]:hover .pitch-block-move-handle,
.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block[style]:hover .pitch-block-resize-handle,
.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block.is-selected .pitch-block-move-handle,
.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block.is-selected .pitch-block-resize-handle {
  opacity: 1;
}

.pitch-block-move-handle {
  left: -8px;
  top: -8px;
  width: 14px;
  height: 14px;
  border: 2px solid #4f6df5;
  border-radius: 50%;
  background: #ffffff;
  cursor: move;
}

.pitch-block-resize-handle {
  right: -7px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border: 2px solid #4f6df5;
  border-radius: 3px;
  background: #ffffff;
  cursor: ew-resize;
}

.board-pitch-toolbar {
  gap: 4px;
  padding: 6px 8px;
  margin: 5px 0 8px;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .05);
}

.board-pitch-toolbar-main {
  gap: 8px;
  justify-content: flex-start;
}

.board-pitch-toolbar-copy {
  display: none;
}

.board-pitch-toolbar-copy b {
  font-size: 13px;
}

.board-pitch-toolbar-copy span {
  display: none;
}

.board-pitch-toolbar-targets {
  gap: 4px;
}

.board-pitch-toolbar-targets .pitch-target-btn {
  min-height: 25px;
  padding: 0 8px;
  font-size: 12px;
}

.board-pitch-toolbar-text {
  min-height: 32px;
  max-height: 52px;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 1.25;
  resize: vertical;
}

.board-pitch-toolbar-controls {
  gap: 5px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.board-pitch-toolbar-controls select {
  width: 124px;
  min-width: 124px;
  min-height: 26px;
}

.board-pitch-toolbar-controls input[type="number"] {
  box-sizing: border-box;
  width: 66px;
  min-width: 66px;
  min-height: 26px;
  padding: 0 8px;
  text-align: center;
}

.board-pitch-toolbar-controls input[type="color"] {
  width: 32px;
  min-width: 32px;
  height: 30px;
  padding: 2px;
}

.board-pitch-toolbar .btn-toggle {
  width: 25px;
  min-width: 25px;
  height: 25px;
}

.board-pitch-toolbar-card-controls {
  gap: 6px;
  padding-top: 6px;
}

.board-pitch-toolbar-advanced {
  border-top: 1px solid #eef2f7;
  padding-top: 3px;
}

.board-pitch-toolbar-advanced > summary {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.board-pitch-toolbar-advanced[open] > summary {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.board-pitch-toolbar-advanced:not([open]) .board-pitch-toolbar-card-controls {
  display: none;
}

.board-pitch-toolbar-card-controls > label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.board-pitch-toolbar-card-controls select {
  min-width: 110px;
  min-height: 30px;
}

.board-pitch-toolbar-color-row,
.board-pitch-toolbar-actions {
  gap: 6px;
}

.board-pitch-toolbar-color-row input[type="color"] {
  width: 30px;
  min-width: 30px;
  height: 28px;
}

.board-pitch-toolbar-autosave {
  min-height: 26px;
  padding: 0 8px;
  font-size: var(--fs-sm);
}

.card-image .card-image-right .card-split-textarea {
  min-height: 72px;
  max-height: 108px;
  resize: vertical;
}

.card-image .card-image-right .card-split-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.card-image .card-image-right .card-split-actions .btn-sm {
  min-height: 36px;
  justify-content: center;
  padding: 7px 9px;
}

@media (max-width: 768px) {
  .card-image .card-image-right {
    left: 10px;
    right: 10px;
    width: auto;
    min-width: 0;
  }
}

/* 2026-07-08 FIX(CEO ④ 자동저장): 예전엔 "보드 전체를 저장할 때까지 로컬에만 남는다"는
   임시저장 계약이었지만, 카드 전환 시 저장 안 된 변경이 조용히 원복되는 버그로 이어져
   폐기한다. 지금은 편집 중 디바운스 자동저장 + 카드 전환/편집기 이탈 시 즉시 flush로
   전환한다(09_ops_board_editor.js의 _boardOverlayScheduleAutoSave/_flushDirtyOverlaysBeforeSwitch).
   .is-dirty는 "자동저장 대기 중"(정상, 짧게만 보임), .is-save-error는 "자동저장 실패"(드묾,
   조치 필요)로 구분해 표시한다. */
.card-pitch.is-dirty {
  box-shadow: 0 0 0 2px rgba(212, 168, 83, 0.34), 0 18px 44px rgba(15, 23, 42, 0.08);
}

.card-pitch.is-dirty::after {
  content: "저장 전";
  position: absolute;
  top: 12px;
  right: 52px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff7df;
  border: 1px solid #ecd39c;
  color: #7a4f08;
  font-size: 11px;
  font-weight: 800;
  z-index: 3;
}

.card-pitch.is-save-error,
.card-image.is-save-error {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.55), 0 18px 44px rgba(15, 23, 42, 0.12);
}

.card-pitch.is-save-error::before,
.card-image.is-save-error::before {
  content: "저장 실패 · 다시 눌러 재시도";
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
  font-size: 11px;
  font-weight: 800;
  z-index: 4;
  pointer-events: none;
}

/* 2026-07-08 긴급 FIX(CEO): 카드 전환은 절대 막지 않고 저장은 배경에서 진행하므로, 저장이
   진행 중인 카드에는 조용한 표시가 필요하다(실패와 달리 정상 상태라 튀지 않게). */
.card-pitch.is-saving::before,
.card-image.is-saving::before {
  content: "저장 중…";
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 11px;
  font-weight: 700;
  z-index: 4;
  pointer-events: none;
}

.board-pitch-toolbar #board-pitch-toolbar-save.has-pending {
  background: #b7791f;
  border-color: #b7791f;
  color: #fff;
}

.board-unified-toolbar .board-pitch-toolbar,
.board-unified-toolbar .board-image-toolbar {
  margin: 0;
}

.board-image-toolbar .board-pitch-toolbar-copy {
  display: grid;
}

.board-image-toolbar .board-pitch-toolbar-copy span {
  display: block;
}

.board-image-toolbar-main {
  gap: 10px;
  justify-content: space-between;
}

.board-image-toolbar-controls {
  gap: 6px;
  flex-wrap: wrap;
  overflow: visible;
}

.board-image-toolbar.is-disabled .board-image-toolbar-controls {
  opacity: .68;
}

/* B2 board ribbon mode: editing tools stay at the top; temp-save lives at the bottom. */
.board-unified-toolbar {
  position: sticky;
  top: 8px;
  z-index: 30;
  display: grid;
  gap: 0;
  margin: 12px 0 14px;
  overflow: visible;
  border: 1px solid #1f2937;
  border-radius: 12px;
  background: #20242b;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}

.board-unified-toolbar::before {
  content: "상세페이지 편집 도구";
  display: block;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: #171b22;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.board-unified-toolbar .board-pitch-toolbar,
.board-unified-toolbar .board-image-toolbar {
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.board-unified-toolbar .board-pitch-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(260px, 1fr) minmax(430px, 1.3fr) auto;
  align-items: stretch;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.board-unified-toolbar .board-image-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(260px, 1fr);
  align-items: stretch;
  gap: 8px;
}

.board-unified-toolbar .board-pitch-toolbar.is-disabled,
.board-unified-toolbar .board-image-toolbar.is-disabled {
  background: transparent;
  border-style: solid;
  box-shadow: none;
}

.board-unified-toolbar .board-pitch-toolbar-main,
.board-unified-toolbar .board-pitch-toolbar-controls,
.board-unified-toolbar .board-pitch-toolbar-advanced,
.board-unified-toolbar .board-image-toolbar-main,
.board-unified-toolbar .board-image-toolbar-controls {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 9px;
  background: rgba(255, 255, 255, .055);
}

.board-unified-toolbar .board-pitch-toolbar-main,
.board-unified-toolbar .board-image-toolbar-main {
  display: grid;
  align-content: start;
  gap: 6px;
  justify-content: stretch;
}

.board-unified-toolbar .board-pitch-toolbar-main::before,
.board-unified-toolbar .board-pitch-toolbar-controls::before,
.board-unified-toolbar .board-pitch-toolbar-advanced::before,
.board-unified-toolbar .board-image-toolbar-main::before,
.board-unified-toolbar .board-image-toolbar-controls::before {
  display: block;
  margin: 0 0 4px;
  color: #aeb7c6;
  font-size: var(--fs-xs);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.board-unified-toolbar .board-pitch-toolbar-main::before {
  content: "선택";
}

.board-unified-toolbar .board-pitch-toolbar-controls::before {
  content: "글꼴 · 정렬";
}

.board-unified-toolbar .board-pitch-toolbar-advanced::before {
  content: "카드";
}

.board-unified-toolbar .board-image-toolbar-main::before {
  content: "사진 삽입";
}

.board-unified-toolbar .board-image-toolbar-controls::before {
  content: "레이어";
  flex-basis: 100%;
}

.board-unified-toolbar .board-pitch-toolbar-copy {
  display: none;
}

.board-unified-toolbar .board-pitch-toolbar-targets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.board-unified-toolbar .pitch-target-btn,
.board-unified-toolbar .btn-sm,
.board-unified-toolbar .btn-toggle,
.board-unified-toolbar .pitch-align-btn {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #eef2f7;
  box-shadow: none;
}

.board-unified-toolbar .pitch-target-btn.toggle-active,
.board-unified-toolbar .btn-toggle.toggle-active,
.board-unified-toolbar .pitch-align-btn.toggle-active {
  border-color: #f4c96b;
  background: #f4c96b;
  color: #111827;
}

.board-unified-toolbar .btn-sm.primary {
  background: #f4c96b;
  border-color: #f4c96b;
  color: #111827;
}

.board-unified-toolbar .btn-sm.warn {
  background: rgba(248, 113, 113, .13);
  border-color: rgba(248, 113, 113, .42);
  color: #fecaca;
}

.board-unified-toolbar select,
.board-unified-toolbar input[type="text"],
.board-unified-toolbar input[type="number"],
.board-unified-toolbar input[type="color"],
.board-unified-toolbar textarea {
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .92);
  color: #111827;
}

.board-unified-toolbar .board-pitch-toolbar-text {
  min-height: 46px;
  max-height: 58px;
  padding: 8px 10px;
  border-radius: 8px;
  resize: vertical;
}

.board-unified-toolbar .board-pitch-toolbar-controls {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: wrap;
  overflow: visible;
}

.board-unified-toolbar .board-pitch-toolbar-controls select {
  width: 138px;
  min-width: 138px;
}

.board-unified-toolbar .board-pitch-toolbar-controls input[type="number"] {
  width: 58px;
  min-width: 58px;
}

.board-unified-toolbar .board-pitch-toolbar-controls input[type="color"],
.board-unified-toolbar .board-pitch-toolbar-color-row input[type="color"],
.board-unified-toolbar .board-image-toolbar-controls input[type="color"] {
  width: 30px;
  min-width: 30px;
  height: 28px;
}

.board-unified-toolbar .board-pitch-toolbar-align {
  display: inline-flex;
}

.board-unified-toolbar .board-pitch-toolbar-autosave {
  min-height: 28px;
  background: rgba(255, 255, 255, .1);
  color: #dbeafe;
}

.board-unified-toolbar .board-pitch-toolbar-autosave[data-mode="saved"] {
  background: rgba(16, 185, 129, .18);
  color: #bbf7d0;
}

.board-unified-toolbar .board-pitch-toolbar-autosave[data-mode="error"],
.board-unified-toolbar .board-pitch-toolbar-autosave[data-mode="warn"] {
  background: rgba(245, 158, 11, .18);
  color: #fde68a;
}

.board-unified-toolbar .board-pitch-toolbar-advanced {
  position: relative;
  padding-top: 8px;
}

.board-unified-toolbar .board-pitch-toolbar-advanced > summary {
  min-height: 28px;
  width: max-content;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #eef2f7;
}

.board-unified-toolbar .board-pitch-toolbar-advanced[open] > summary {
  background: #f4c96b;
  border-color: #f4c96b;
  color: #111827;
}

.board-unified-toolbar .board-pitch-toolbar-card-controls {
  margin-top: 7px;
  padding-top: 7px;
  border-top-color: rgba(255, 255, 255, .1);
}

.board-unified-toolbar .board-pitch-toolbar-card-controls > label,
.board-unified-toolbar .board-pitch-toolbar-color-row label {
  color: #cbd5e1;
}

.board-unified-toolbar .board-image-toolbar-actions {
  justify-content: flex-start;
}

.board-unified-toolbar .board-image-toolbar-controls {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex-wrap: wrap;
}

.board-unified-toolbar .board-image-toolbar-controls input[type="text"] {
  min-width: 220px;
  flex: 1 1 260px;
}

.board-unified-toolbar .board-image-toolbar-controls input[type="number"] {
  width: 54px;
}

.board-unified-toolbar .board-image-toolbar-controls input[type="range"] {
  width: 84px;
  accent-color: #f4c96b;
}

.board-unified-toolbar .board-image-toolbar .board-pitch-toolbar-copy {
  display: grid;
  gap: 2px;
}

.board-unified-toolbar .board-image-toolbar .board-pitch-toolbar-copy b {
  color: #f8fafc;
}

.board-unified-toolbar .board-image-toolbar .board-pitch-toolbar-copy span {
  display: block;
  color: #aeb7c6;
}

.board-temp-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 2px;
  padding: 14px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.board-temp-save-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.board-temp-save-copy b {
  color: #111827;
  font-size: 14px;
  font-weight: 900;
}

.board-temp-save-copy span {
  color: #64748b;
  font-size: 12px;
}

.board-temp-save-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.board-temp-save-bar #board-pitch-toolbar-save,
.board-temp-save-bar #board-image-toolbar-save {
  min-height: 38px;
  padding: 0 16px;
}

.board-temp-save-bar #board-pitch-toolbar-save.has-pending {
  background: #b7791f;
  border-color: #b7791f;
  color: #fff;
}

@media (max-width: 1280px) {
  .board-unified-toolbar {
    overflow-x: auto;
    overflow-y: visible;
  }

  .board-unified-toolbar .board-pitch-toolbar,
  .board-unified-toolbar .board-image-toolbar {
    width: max-content;
  }

  .board-unified-toolbar .board-pitch-toolbar {
    min-width: 1040px;
    grid-template-columns: 190px 290px 440px 96px;
  }

  .board-unified-toolbar .board-image-toolbar {
    min-width: 920px;
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 768px) {
  .board-temp-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .board-temp-save-actions {
    justify-content: stretch;
  }

  .board-temp-save-actions .btn-sm {
    flex: 1 1 150px;
  }
}

/* B2 board toolbar v2: Word/PPT-like icon-first surface, not a second text editor. */
.board-unified-toolbar::before {
  content: "편집 도구";
  padding: 6px 10px;
}

.board-unified-toolbar .board-pitch-toolbar {
  grid-template-columns: minmax(440px, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 760px;
}

.board-unified-toolbar .board-pitch-toolbar-main,
.board-unified-toolbar .board-pitch-toolbar-text,
.board-toolbar-targets-hidden {
  display: none !important;
}

.board-unified-toolbar .board-pitch-toolbar-controls,
.board-unified-toolbar .board-pitch-toolbar-advanced,
.board-unified-toolbar .board-image-toolbar-main,
.board-unified-toolbar .board-image-toolbar-controls {
  min-height: 46px;
  padding: 6px;
  border-radius: 7px;
}

.board-unified-toolbar .board-pitch-toolbar-main::before,
.board-unified-toolbar .board-pitch-toolbar-controls::before,
.board-unified-toolbar .board-pitch-toolbar-advanced::before,
.board-unified-toolbar .board-image-toolbar-main::before,
.board-unified-toolbar .board-image-toolbar-controls::before {
  display: none;
}

.board-unified-toolbar .board-pitch-toolbar-controls {
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.board-unified-toolbar .board-pitch-toolbar-controls select {
  width: 132px;
  min-width: 132px;
  height: 30px;
}

.board-unified-toolbar .board-pitch-toolbar-controls input[type="number"] {
  width: 54px;
  min-width: 54px;
  height: 30px;
}

.board-unified-toolbar .board-pitch-toolbar .btn-toggle,
.board-unified-toolbar .pitch-align-group--compact .pitch-align-btn,
.board-unified-toolbar .board-icon-tool {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
}

.board-unified-toolbar .board-pitch-toolbar-autosave {
  white-space: nowrap;
}

.board-unified-toolbar .board-pitch-toolbar-advanced {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.board-unified-toolbar .board-pitch-toolbar-advanced > summary {
  min-height: 30px;
  padding: 0 10px;
}

.board-unified-toolbar .board-pitch-toolbar-advanced[open] {
  position: relative;
}

.board-unified-toolbar .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-card-controls {
  position: absolute;
  top: 42px;
  right: 0;
  width: min(620px, calc(100vw - 180px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: #20242b;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .24);
}

.board-unified-toolbar .board-image-toolbar {
  grid-template-columns: auto minmax(360px, 1fr);
  min-width: 660px;
}

.board-unified-toolbar .board-image-toolbar .board-pitch-toolbar-copy {
  display: none;
}

.board-unified-toolbar .board-image-toolbar-actions {
  gap: 4px;
}

.board-unified-toolbar .board-image-toolbar-controls input[type="text"] {
  min-width: 160px;
  flex: 1 1 180px;
  height: 30px;
}

.board-unified-toolbar .board-image-toolbar-controls input[type="number"] {
  width: 48px;
  height: 30px;
}

.board-unified-toolbar .board-image-toolbar-controls input[type="range"] {
  width: 72px;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.tool-icon-svg {
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  color: currentColor;
}

.selvoir-pitch-kicker[contenteditable="true"],
.selvoir-pitch-headline[contenteditable="true"],
.selvoir-pitch-support[contenteditable="true"] {
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
  caret-color: #4f6df5;
}

.selvoir-pitch-kicker[contenteditable="true"]:focus,
.selvoir-pitch-headline[contenteditable="true"]:focus,
.selvoir-pitch-support[contenteditable="true"]:focus {
  outline: 2px solid rgba(79, 109, 245, .38);
  outline-offset: 5px;
  background: rgba(255, 255, 255, .06);
}

@media (max-width: 1280px) {
  .board-unified-toolbar .board-pitch-toolbar {
    min-width: 760px;
    grid-template-columns: minmax(440px, 1fr) auto;
  }

  .board-unified-toolbar .board-image-toolbar {
    min-width: 660px;
    grid-template-columns: auto minmax(360px, 1fr);
  }
}

/* B2 board ribbon v3: compact PowerPoint-style tools, inline editing in the page. */
.board-unified-toolbar.board-unified-toolbar--ppt {
  position: sticky;
  top: 8px;
  z-index: 40;
  display: block;
  margin: 10px 0 14px;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid #171717;
  border-radius: 8px;
  background: #262626;
  box-shadow: 0 16px 30px rgba(15, 23, 42, .20);
  white-space: nowrap;
}

.board-unified-toolbar.board-unified-toolbar--ppt::before {
  content: "\D3B8\C9D1 \B3C4\AD6C";
  display: block;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: #1f1f1f;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.board-unified-toolbar--ppt .board-pitch-toolbar,
.board-unified-toolbar--ppt .board-image-toolbar {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: max-content;
  margin: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.board-unified-toolbar--ppt .board-pitch-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.board-unified-toolbar--ppt .board-pitch-toolbar-main,
.board-unified-toolbar--ppt .board-pitch-toolbar-text,
.board-unified-toolbar--ppt .board-toolbar-targets-hidden,
.board-unified-toolbar--ppt .board-pitch-toolbar-autosave,
.board-unified-toolbar--ppt .board-image-toolbar-status,
.board-unified-toolbar--ppt .board-image-toolbar .board-pitch-toolbar-copy {
  display: none !important;
}

.board-unified-toolbar--ppt .board-pitch-toolbar-controls {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
}

.board-unified-toolbar--ppt .board-pitch-toolbar-advanced,
.board-unified-toolbar--ppt .board-image-toolbar-main,
.board-unified-toolbar--ppt .board-image-toolbar-controls,
.board-unified-toolbar--ppt .board-ribbon-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  margin: 0;
  padding: 5px 10px 18px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.board-unified-toolbar--ppt .board-ribbon-group::before,
.board-unified-toolbar--ppt .board-pitch-toolbar-advanced::before,
.board-unified-toolbar--ppt .board-image-toolbar-main::before,
.board-unified-toolbar--ppt .board-image-toolbar-controls::before {
  display: none !important;
}

.board-unified-toolbar--ppt .board-ribbon-group::after,
.board-unified-toolbar--ppt .board-pitch-toolbar-advanced::after,
.board-unified-toolbar--ppt .board-image-toolbar-main::after,
.board-unified-toolbar--ppt .board-image-toolbar-controls::after {
  content: attr(data-group-label);
  position: absolute;
  right: 10px;
  bottom: 3px;
  left: 10px;
  overflow: hidden;
  color: #b8c0cc;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-unified-toolbar--ppt .board-ribbon-group-font {
  width: 290px;
}

.board-unified-toolbar--ppt .board-ribbon-group-paragraph {
  width: 124px;
}

.board-unified-toolbar--ppt .board-ribbon-group-design {
  width: 74px;
  justify-content: center;
}

.board-unified-toolbar--ppt .board-ribbon-group-insert {
  width: 106px;
  justify-content: center;
}

.board-unified-toolbar--ppt .board-ribbon-group-draw {
  width: 650px;
}

.board-unified-toolbar--ppt select,
.board-unified-toolbar--ppt input[type="text"],
.board-unified-toolbar--ppt input[type="number"],
.board-unified-toolbar--ppt input[type="color"] {
  height: 28px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
}

.board-unified-toolbar--ppt .board-ribbon-group-font select {
  width: 132px;
  min-width: 132px;
}

.board-unified-toolbar--ppt .board-ribbon-group-font input[type="number"],
.board-unified-toolbar--ppt .board-image-toolbar-controls input[type="number"] {
  width: 46px;
  min-width: 46px;
  text-align: center;
}

.board-unified-toolbar--ppt input[type="color"] {
  width: 30px;
  min-width: 30px;
  padding: 2px;
}

.board-unified-toolbar--ppt .btn-sm,
.board-unified-toolbar--ppt .btn-toggle,
.board-unified-toolbar--ppt .pitch-align-btn,
.board-unified-toolbar--ppt .board-icon-tool {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  background: rgba(255, 255, 255, .08);
  color: #eef2f7;
  box-shadow: none;
}

.board-unified-toolbar--ppt .btn-toggle.toggle-active,
.board-unified-toolbar--ppt .pitch-align-btn.toggle-active {
  border-color: #f6c85f;
  background: #f6c85f;
  color: #111827;
}

.board-unified-toolbar--ppt .pitch-align-group--compact {
  display: inline-flex;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}

.board-unified-toolbar--ppt .board-pitch-toolbar-advanced > summary {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  background: rgba(255, 255, 255, .08);
  color: #eef2f7;
  font-size: 16px;
  font-weight: 900;
  list-style: none;
}

.board-unified-toolbar--ppt .board-pitch-toolbar-advanced > summary::-webkit-details-marker {
  display: none;
}

.board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-card-controls {
  position: absolute;
  top: 54px;
  left: 0;
  z-index: 50;
  width: min(620px, calc(100vw - 160px));
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: #242832;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .30);
}

.board-unified-toolbar--ppt .board-pitch-toolbar-card-controls > label,
.board-unified-toolbar--ppt .board-pitch-toolbar-color-row label {
  color: #e5e7eb;
  font-size: 11px;
}

.board-unified-toolbar--ppt .board-image-toolbar-actions {
  display: inline-flex;
  gap: 4px;
}

.board-unified-toolbar--ppt .board-image-toolbar-controls input[type="text"] {
  width: 132px;
  min-width: 132px;
}

.board-unified-toolbar--ppt .board-image-toolbar-controls input[type="range"] {
  width: 70px;
  min-width: 70px;
}

.selvoir-pitch-kicker[contenteditable="true"],
.selvoir-pitch-headline[contenteditable="true"],
.selvoir-pitch-support[contenteditable="true"] {
  min-width: 10px;
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
  caret-color: #4f6df5;
}

.selvoir-pitch-kicker[contenteditable="true"]:focus,
.selvoir-pitch-headline[contenteditable="true"]:focus,
.selvoir-pitch-support[contenteditable="true"]:focus {
  outline: 2px solid rgba(79, 109, 245, .45);
  outline-offset: 5px;
  background: rgba(255, 255, 255, .08);
}

@media (max-width: 1280px) {
  .board-unified-toolbar--ppt .board-ribbon-group-draw {
    width: 560px;
  }
}

/* B2 board ribbon v3.1: keep all tool groups on one horizontal ribbon. */
.board-unified-toolbar.board-unified-toolbar--ppt::before {
  content: "\D3B8\C9D1\0020\B3C4\AD6C";
}

.board-unified-toolbar--ppt .board-pitch-toolbar,
.board-unified-toolbar--ppt .board-image-toolbar {
  display: inline-flex;
  vertical-align: top;
  min-width: 0;
  padding: 5px 0;
  white-space: nowrap;
}

.board-unified-toolbar--ppt .board-pitch-toolbar {
  border-bottom: 0;
}

.board-unified-toolbar--ppt .board-image-toolbar {
  border-left: 1px solid rgba(255, 255, 255, .14);
}

/* B2 board ribbon v4: board-scoped editing dock like Word/PPT, no tool-hunting scroll. */
.board-editor-dock {
  position: sticky;
  top: 8px;
  z-index: 70;
  margin: 10px 0 16px;
  padding: 0 0 10px;
  background: linear-gradient(180deg, #fff 0%, #fff 88%, rgba(255, 255, 255, 0) 100%);
}

.board-editor-dock .board-unified-toolbar.board-unified-toolbar--ppt {
  position: static;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  white-space: normal;
  border-color: #20242b;
  border-radius: 8px;
  background: #262626;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  white-space: normal;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
  border-left: 0;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-controls {
  flex: 1 1 480px;
  flex-wrap: wrap;
  min-width: 0;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group {
  min-width: 0;
  min-height: 50px;
  padding: 5px 8px 17px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font {
  flex: 0 1 286px;
  width: auto;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-paragraph {
  flex: 0 0 118px;
  width: auto;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-design {
  flex: 0 0 70px;
  width: auto;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-insert {
  flex: 0 0 98px;
  width: auto;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-draw {
  flex: 1 1 420px;
  width: auto;
  flex-wrap: wrap;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="text"] {
  flex: 1 1 128px;
  width: auto;
  min-width: 120px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="range"] {
  flex: 1 1 70px;
  max-width: 90px;
}

@media (max-width: 980px) {
  .board-editor-dock .board-unified-toolbar.board-unified-toolbar--ppt::before {
    padding: 5px 8px;
  }

  .board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
  .board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
    padding: 4px 6px;
  }

  .board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-draw {
    flex-basis: 100%;
  }
}

/* B2 board ribbon v4.2: keep design/shape tools inside the board ribbon. */
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar {
  overflow: visible;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  flex: 1 1 100%;
  width: 100%;
  min-height: auto;
  gap: 8px;
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, .10);
  border-right: 0;
  padding: 8px 8px 18px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open]::after {
  left: 8px;
  width: 34px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-card-controls {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: #242832;
  box-shadow: none;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-card-controls > label,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-color-row label {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  margin: 0;
  line-height: 1.2;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-card-controls select {
  width: 100%;
  min-width: 0;
}

.board-editor-dock .board-unified-toolbar--ppt select,
.board-editor-dock .board-unified-toolbar--ppt input[type="text"],
.board-editor-dock .board-unified-toolbar--ppt input[type="number"] {
  min-height: 30px;
  line-height: 1.2;
  padding-top: 0;
  padding-bottom: 0;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-color-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled {
  display: flex;
  opacity: .72;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-controls {
  display: none;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-main {
  border-right: 0;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-icon-tool {
  cursor: not-allowed;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar.is-disabled {
  opacity: 1;
}

/* B2 board ribbon v4.3: design popover must stay inside the board, and insert tools must stay visible. */
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] > summary {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-card-controls {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: visible;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-card-controls select,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-card-controls input,
.board-editor-dock .board-unified-toolbar--ppt select,
.board-editor-dock .board-unified-toolbar--ppt input[type="text"],
.board-editor-dock .board-unified-toolbar--ppt input[type="number"] {
  height: 34px;
  min-height: 34px;
  line-height: 1.25;
  box-sizing: border-box;
  overflow: visible;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled {
  display: flex !important;
  visibility: visible;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-main {
  display: flex !important;
  flex: 0 0 auto;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-actions {
  display: inline-flex !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-controls {
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-draw {
  max-width: 100%;
}

/* B2 board ribbon v4.4: compact single-row tool surface. */
.board-editor-dock {
  margin: 8px 0 12px;
  padding: 0 0 6px;
}

.board-editor-dock .board-unified-toolbar.board-unified-toolbar--ppt {
  display: flex !important;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: visible;
  white-space: nowrap;
  border-radius: 6px;
}

.board-editor-dock .board-unified-toolbar.board-unified-toolbar--ppt::before {
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-right: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 0;
  font-size: 11px;
  line-height: 1;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
  display: flex !important;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  width: auto;
  min-width: 0;
  padding: 4px 4px;
  border: 0;
  white-space: nowrap;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-controls {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  min-height: 40px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 3px 7px 13px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group::after,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced::after,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main::after,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls::after {
  bottom: 2px;
  font-size: 9px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font {
  flex-basis: 246px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-paragraph {
  flex-basis: 106px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-design {
  flex-basis: 54px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-insert {
  flex-basis: 58px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-draw {
  flex-basis: auto;
  flex-wrap: nowrap;
  max-width: none;
}

.board-editor-dock .board-unified-toolbar--ppt select,
.board-editor-dock .board-unified-toolbar--ppt input[type="text"],
.board-editor-dock .board-unified-toolbar--ppt input[type="number"] {
  height: 26px;
  min-height: 26px;
  border-radius: 5px;
  font-size: 11px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font select {
  width: 118px;
  min-width: 118px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font input[type="number"],
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="number"] {
  width: 38px;
  min-width: 38px;
}

.board-editor-dock .board-unified-toolbar--ppt input[type="color"] {
  width: 26px;
  min-width: 26px;
  height: 26px;
}

.board-editor-dock .board-unified-toolbar--ppt .btn-sm,
.board-editor-dock .board-unified-toolbar--ppt .btn-toggle,
.board-editor-dock .board-unified-toolbar--ppt .pitch-align-btn,
.board-editor-dock .board-unified-toolbar--ppt .board-icon-tool,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced > summary,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] > summary {
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 5px;
  font-size: 12px;
}

.board-editor-dock .board-unified-toolbar--ppt .pitch-align-group--compact {
  gap: 1px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled {
  opacity: 1;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-main {
  min-height: 40px;
  border-right: 0;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-actions {
  gap: 3px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-height: 40px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="text"] {
  flex: 0 0 108px;
  width: 108px;
  min-width: 108px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="range"] {
  flex: 0 0 58px;
  width: 58px;
  min-width: 58px;
}

/* B2 board ribbon v4.5: opening Design must not make the ribbon taller. */
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar {
  position: relative;
  overflow: visible;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] {
  position: relative;
  display: flex;
  flex: 0 0 54px;
  width: auto;
  min-width: 54px;
  max-width: 54px;
  min-height: 40px;
  gap: 0;
  align-items: center;
  border-top: 0;
  border-right: 1px solid rgba(255, 255, 255, .14);
  padding: 3px 7px 13px;
  overflow: visible;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open]::after {
  right: 7px;
  left: 7px;
  width: auto;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-card-controls {
  position: absolute !important;
  top: 44px !important;
  right: 0 !important;
  left: auto !important;
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  width: min(520px, calc(100vw - 180px)) !important;
  max-width: min(520px, calc(100vw - 180px)) !important;
  min-width: 360px !important;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: #242832;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .32);
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-color-row {
  grid-column: span 2;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-actions {
  justify-content: end;
}

/* 2026-07-08: "저장 전"(dirty) 배지는 삭제 버튼 옆이라 계속 숨긴다(자동저장이 도는 정상 상태,
   자주 보이면 소음). 실패 배지(.is-save-error::before, 위쪽 정의)는 이 규칙 대상이 아니라
   계속 보인다 — 실패는 드물고 조치가 필요하기 때문. */
.card-pitch.is-dirty::after {
  content: none !important;
  display: none !important;
}

.card-pitch-actions [data-pitch-action="save"],
.board-pitch-editor-actions .btn-sm.primary {
  display: none !important;
}

.board-unsaved-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(3px);
}

.board-unsaved-modal {
  position: relative;
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .24);
}

.board-unsaved-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.board-unsaved-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #fff7ed;
  color: #b45309;
  font-weight: 900;
}

.board-unsaved-modal h3 {
  margin: 0 38px 8px 0;
  font-size: 20px;
  line-height: 1.25;
  color: #0f172a;
}

.board-unsaved-modal p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.board-unsaved-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.board-unsaved-actions [data-action="cancel"] {
  grid-column: 1 / -1;
}

/* B2 board ribbon v4.6: keep all edit tools in one compact row. */
.board-editor-dock {
  margin: 6px 0 10px;
}

.board-editor-dock .board-unified-toolbar--ppt {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 0 !important;
  min-height: 54px !important;
  padding: 4px 6px !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  scrollbar-width: auto;
}

.board-editor-dock .board-unified-toolbar--ppt::before {
  flex: 0 0 auto;
  width: auto;
  min-width: 52px;
  height: 34px;
  padding: 0 8px;
  margin-right: 4px;
  border-right: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 0 4px !important;
  overflow: visible !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-actions,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls {
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  min-height: 32px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls {
  flex: 0 0 auto !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 2px 6px 10px !important;
  align-items: center !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group::after,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced::after,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main::after,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls::after {
  bottom: 1px !important;
  font-size: 8px !important;
  line-height: 1 !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font {
  flex-basis: 236px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-paragraph {
  flex-basis: 96px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-design,
.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-insert {
  flex-basis: 50px !important;
  width: 50px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-draw {
  flex-basis: auto !important;
  max-width: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-text,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-main,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main .board-pitch-toolbar-copy,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-autosave {
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt select,
.board-editor-dock .board-unified-toolbar--ppt input[type="text"],
.board-editor-dock .board-unified-toolbar--ppt input[type="number"],
.board-editor-dock .board-unified-toolbar--ppt input[type="color"],
.board-editor-dock .board-unified-toolbar--ppt .btn-sm,
.board-editor-dock .board-unified-toolbar--ppt .btn-toggle,
.board-editor-dock .board-unified-toolbar--ppt .pitch-align-btn,
.board-editor-dock .board-unified-toolbar--ppt .board-icon-tool,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced > summary,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] > summary {
  height: 24px !important;
  min-height: 24px !important;
  border-radius: 5px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .btn-sm,
.board-editor-dock .board-unified-toolbar--ppt .btn-toggle,
.board-editor-dock .board-unified-toolbar--ppt .pitch-align-btn,
.board-editor-dock .board-unified-toolbar--ppt .board-icon-tool,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced > summary,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] > summary {
  width: 24px !important;
  min-width: 24px !important;
  padding: 0 !important;
  font-size: 11px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font select {
  width: 116px !important;
  min-width: 116px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font input[type="number"],
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="number"] {
  width: 36px !important;
  min-width: 36px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="text"] {
  flex: 0 0 96px !important;
  width: 96px !important;
  min-width: 96px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls input[type="range"] {
  flex: 0 0 52px !important;
  width: 52px !important;
  min-width: 52px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] {
  flex: 0 0 50px !important;
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  height: 36px !important;
}

/* B2 board ribbon v4.7: icon-first editor toolbar, no overlapping group labels. */
.board-editor-dock .board-unified-toolbar--ppt {
  min-height: 44px !important;
  padding: 4px 8px !important;
  gap: 6px !important;
}

.board-editor-dock .board-unified-toolbar--ppt::before {
  height: 28px !important;
  min-width: 44px !important;
  padding: 0 7px !important;
  font-size: 10px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 7px !important;
  border-right: 1px solid rgba(255, 255, 255, .14);
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group::after,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced::after,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main::after,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls::after {
  content: none !important;
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
  min-height: 34px !important;
  padding: 0 !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-actions,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls {
  min-height: 28px !important;
  gap: 3px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font {
  flex-basis: 228px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-paragraph {
  flex-basis: 88px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-design,
.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-insert {
  flex-basis: 44px !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 30px !important;
}

.board-editor-dock .board-unified-toolbar--ppt select,
.board-editor-dock .board-unified-toolbar--ppt input[type="text"],
.board-editor-dock .board-unified-toolbar--ppt input[type="number"],
.board-editor-dock .board-unified-toolbar--ppt input[type="color"],
.board-editor-dock .board-unified-toolbar--ppt .btn-sm,
.board-editor-dock .board-unified-toolbar--ppt .btn-toggle,
.board-editor-dock .board-unified-toolbar--ppt .pitch-align-btn,
.board-editor-dock .board-unified-toolbar--ppt .board-icon-tool,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced > summary,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] > summary {
  height: 24px !important;
  min-height: 24px !important;
  line-height: 1 !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-icon-tool:disabled {
  opacity: .38;
  cursor: default;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar:not(.is-disabled) .board-ribbon-group-insert {
  background: rgba(255, 255, 255, .06);
}

/* B2 board ribbon v4.8: no crowded controls; image tools reveal progressively. */
.board-editor-dock .board-unified-toolbar--ppt {
  min-height: 48px !important;
  padding: 5px 9px !important;
  gap: 8px !important;
}

.board-editor-dock .board-unified-toolbar--ppt::before {
  min-width: 58px !important;
  height: 30px !important;
  margin-right: 2px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font {
  flex-basis: 318px !important;
  width: 318px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font select {
  width: 148px !important;
  min-width: 148px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font input[type="number"] {
  width: 48px !important;
  min-width: 48px !important;
  text-align: center;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-paragraph {
  flex-basis: 112px !important;
  width: 112px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-design,
.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-insert {
  flex-basis: 56px !important;
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] {
  flex-basis: 320px !important;
  width: 320px !important;
  min-width: 280px !important;
  max-width: min(360px, calc(100vw - 48px)) !important;
  height: auto !important;
  min-height: 30px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar {
  gap: 6px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main {
  justify-content: center !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar .board-image-toolbar-controls {
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  gap: 5px !important;
  border-right: 0;
  background: rgba(255, 255, 255, .055);
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls input[type="text"] {
  flex: 0 0 140px !important;
  width: 140px !important;
  min-width: 140px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls input[type="number"] {
  width: 46px !important;
  min-width: 46px !important;
  text-align: center;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls input[type="range"] {
  flex: 0 0 68px !important;
  width: 68px !important;
  min-width: 68px !important;
}

.board-layer-tool-separator {
  display: inline-block;
  width: 1px;
  height: 18px;
  margin: 0 2px;
  background: rgba(255, 255, 255, .16);
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls .board-icon-tool {
  flex: 0 0 26px !important;
  padding: 0 !important;
}

.board-editor-dock .board-unified-toolbar--ppt #board-image-layer-x,
.board-editor-dock .board-unified-toolbar--ppt #board-image-layer-y,
.board-editor-dock .board-unified-toolbar--ppt #board-image-layer-w,
.board-editor-dock .board-unified-toolbar--ppt #board-image-layer-h {
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .btn-sm,
.board-editor-dock .board-unified-toolbar--ppt .btn-toggle,
.board-editor-dock .board-unified-toolbar--ppt .pitch-align-btn,
.board-editor-dock .board-unified-toolbar--ppt .board-icon-tool,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced > summary,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] > summary {
  width: 26px !important;
  min-width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
}

.board-pitch-toolbar,
.board-image-toolbar,
.board-pitch-toolbar-controls,
.board-image-toolbar-controls,
.board-image-toolbar-actions,
.board-editor-dock .board-unified-toolbar--ppt,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls {
  flex-wrap: wrap !important;
  row-gap: 5px;
}

/* Wave 1: board text wrap and ribbon flow contract. */
.card-split-textarea,
.card-split-textarea--subtitle,
.board-pitch-body-input,
.selvoir-pitch-kicker,
.selvoir-pitch-headline,
.selvoir-pitch-support,
.selvoir-pitch-block {
  white-space: pre-wrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

.selvoir-pitch-preview.has-block-layout .selvoir-pitch-block[style] {
  max-width: calc(100% - 8px);
}

.board-editor-dock {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  margin: 6px 0 10px !important;
  padding: 0 !important;
  background: #fff !important;
}

.board-editor-dock .board-unified-toolbar.board-unified-toolbar--ppt {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-actions,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls {
  flex-flow: row wrap !important;
  max-width: 100% !important;
  white-space: normal !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-font {
  flex: 1 1 290px !important;
  width: auto !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-paragraph {
  flex: 0 0 112px !important;
  width: 112px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-design,
.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-insert {
  flex: 0 0 58px !important;
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-draw {
  flex: 1 1 420px !important;
  min-width: 260px !important;
  width: auto !important;
}

@media (max-width: 1366px) {
  .board-editor-dock .board-unified-toolbar--ppt .board-ribbon-group-draw,
  .board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls {
    flex-basis: 100% !important;
  }
}

/* Wave 1 (Claude 검수 수정): 빈 상태/안내 문구는 가운데 정렬 유지(CEO #7 — 중앙이 자연스러운 워딩은 중앙).
   본문성 컨텐츠(등록 패키지 본문, 모달 본문, 설정 노트)만 좌측 고정. */
.empty,
.empty-state,
.empty-state-desc {
  text-align: center !important;
}

.registration-panel-head,
.registration-package-main,
.registration-package-commerce,
.storyline-modal-body,
.settings-card-note {
  text-align: left !important;
}

.empty-state {
  justify-items: center !important;
}

.empty-state-actions,
.registration-category-pills {
  justify-content: flex-start !important;
}

.registration-package-commerce .commerce-missing-note {
  color: #92400e;
  font-weight: 700;
}

/* B2 board ribbon v4.9: keep the active tools readable; never let inactive tools
   spill into the board or let the Design panel cover the card content. */
.board-editor-dock {
  z-index: 3 !important;
}

.board-editor-dock .board-unified-toolbar.board-unified-toolbar--ppt {
  flex-flow: row nowrap !important;
  align-items: stretch !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  white-space: nowrap !important;
  scrollbar-width: thin;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-actions,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-controls,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.has-layer-selected .board-image-toolbar-controls {
  flex-flow: row nowrap !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar.is-disabled,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled {
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar:not(.is-disabled),
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar:not(.is-disabled) {
  display: inline-flex !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar:has(.board-pitch-toolbar-advanced[open]) {
  flex-flow: row wrap !important;
  width: 100% !important;
  max-width: 100% !important;
  white-space: normal !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] {
  position: static !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 34px !important;
  align-items: start !important;
  gap: 8px !important;
  overflow: visible !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] > summary {
  grid-column: 1;
  position: static !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-card-controls {
  grid-column: 2;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  z-index: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(96px, 1fr)) !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px !important;
  box-shadow: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar-advanced[open] .board-pitch-toolbar-card-controls > label {
  min-width: 0 !important;
}

/* B2 board ribbon v5: preserve the photo/edit icon strip by default.
   Hide photo tools only while copy tools are active. */
.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar.is-disabled {
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: max-content !important;
  opacity: 1 !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-pitch-toolbar:not(.is-disabled) + .board-image-toolbar {
  display: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-main.board-ribbon-group-insert,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-main.board-ribbon-group-insert {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar-actions,
.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar.is-disabled .board-image-toolbar-actions {
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  gap: 3px !important;
}

.board-editor-dock .board-unified-toolbar--ppt .board-image-toolbar .board-icon-tool {
  display: inline-flex !important;
  flex: 0 0 26px !important;
  visibility: visible !important;
}

/* W4-C C3: one visible tool surface per normalized selection state. */
#board-unified-toolbar[data-tool-surface="none"] .board-pitch-toolbar,
#board-unified-toolbar[data-tool-surface="none"] .board-image-toolbar {
  display: none !important;
}

#board-unified-toolbar[data-tool-surface="pitchText"] .board-pitch-toolbar,
#board-unified-toolbar[data-tool-surface="pitchCard"] .board-pitch-toolbar,
#board-unified-toolbar[data-tool-surface="pitchLayer"] .board-pitch-toolbar {
  display: inline-flex !important;
}

#board-unified-toolbar[data-tool-surface="pitchText"] .board-image-toolbar,
#board-unified-toolbar[data-tool-surface="pitchCard"] .board-image-toolbar {
  display: none !important;
}

/* pitchLayer: 범용 레이어 도구(그리기 그룹)만 노출 — 서식복사/분배/줄간격/회전 입력을 마우스로 접근.
   사진 전용 삽입 그룹은 "사진 카드 전용" 원칙 유지(숨김). */
#board-unified-toolbar[data-tool-surface="pitchLayer"] .board-image-toolbar {
  display: inline-flex !important;
}
#board-unified-toolbar[data-tool-surface="pitchLayer"] .board-image-toolbar .board-ribbon-group-insert {
  display: none !important;
}

#board-unified-toolbar[data-tool-surface="imageCard"] .board-pitch-toolbar,
#board-unified-toolbar[data-tool-surface="imageLayer"] .board-pitch-toolbar {
  display: none !important;
}

#board-unified-toolbar[data-tool-surface="imageCard"] .board-image-toolbar,
#board-unified-toolbar[data-tool-surface="imageLayer"] .board-image-toolbar {
  display: inline-flex !important;
}

.board-ribbon-group-pitch-insert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.board-ribbon-group-pitch-insert select {
  width: 78px !important;
  min-width: 78px !important;
}

.board-color-control {
  display: inline-flex;
  align-items: center;
}

/* 크기·정렬 탭 등에서 색 버튼을 라벨과 함께 노출(글자색/채우기 식별). */
.board-color-control--labeled {
  gap: 4px;
}
.board-color-control--labeled .board-color-control-label {
  font-size: 11px;
  color: var(--muted, #94a3b8);
  white-space: nowrap;
}

.board-color-button,
.board-color-swatch {
  width: 26px;
  min-width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 5px;
  background:
    linear-gradient(45deg, #d1d5db 25%, transparent 25%),
    linear-gradient(-45deg, #d1d5db 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d1d5db 75%),
    linear-gradient(-45deg, transparent 75%, #d1d5db 75%),
    var(--board-color-swatch, #000);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  box-shadow: inset 0 0 0 4px var(--board-color-swatch, #000);
  cursor: pointer;
}

.board-color-button:disabled {
  opacity: .42;
  cursor: default;
}

/* 2026-07-09(CEO ⑪): 글자색 버튼 = "A + 색 밑줄"(PPT 관례), 채우기 버튼 = 색 사각형.
   아이콘만으로 어느 쪽을 칠하는 버튼인지 판별되게 구분한다. */
.board-color-button--text {
  position: relative;
  background: #ffffff;
  box-shadow: none;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
}

.board-color-button--text .board-color-button-glyph {
  transform: translateY(-2px);
}

.board-color-button--text::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 4px;
  border-radius: 2px;
  background: var(--board-color-swatch, #000);
}

/* 투명(채우기 없음) 상태 표시 — 흰 바탕 + 빨간 사선(그래픽 툴 관례). */
.board-color-button.is-transparent:not(.board-color-button--text) {
  background: #ffffff;
  box-shadow: none;
  border: 1px solid #cbd5e1;
  position: relative;
  overflow: hidden;
}

.board-color-button.is-transparent:not(.board-color-button--text)::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 2px;
  background: #ef4444;
  transform: rotate(-45deg);
}

/* 팝업 상단 "현재 색" 표시(§1-①: 큰 스와치 + HEX + 색 이름 병기) */
.board-color-current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.board-color-current-swatch {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: var(--board-color-swatch, #fff);
  position: relative;
  overflow: hidden;
}

.board-color-current-swatch.is-transparent::before {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: 50%;
  height: 2px;
  background: #ef4444;
  transform: rotate(-45deg);
}

.board-color-current-meta {
  display: grid;
  gap: 1px;
}

.board-color-current-meta b {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
}

.board-color-current-meta span {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

.board-color-target-hint {
  font-size: 11px;
  color: #64748b;
  margin-left: auto;
  margin-right: 4px;
}

.board-color-popover {
  position: fixed;
  z-index: 10000;
  width: 292px;
  max-height: min(420px, calc(100vh - 24px));
  overflow: auto;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  color: #111827;
}

.board-color-popover-head,
.board-color-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.board-color-popover-head b,
.board-color-section span {
  font-size: 12px;
  font-weight: 900;
}

.board-color-section {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.board-color-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.board-color-grid em {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 12px;
}

.board-color-input-row {
  margin-top: 10px;
}

.board-color-input-row input[type="text"] {
  width: 86px;
  height: 30px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: lowercase;
}

.board-color-input-row input[type="color"] {
  width: 38px;
  height: 30px;
  padding: 0;
}

/* W4-A pitch free layers/photo background late override */
.card-pitch:has(.selvoir-pitch-preview--free) {
  max-height: none !important;
}

.card-pitch:has(.selvoir-pitch-preview--free) .card-pitch-left {
  min-height: 360px !important;
}

.selvoir-pitch-preview.selvoir-pitch-preview--free {
  min-height: 360px !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-position: center !important;
}

.selvoir-pitch-preview.selvoir-pitch-preview--canvas {
  aspect-ratio: 1 / var(--pitch-canvas-ratio, 0.42);
  height: auto !important;
  min-height: 0 !important;
}

.selvoir-pitch-preview.selvoir-pitch-preview--canvas > .selvoir-pitch-block,
.selvoir-pitch-preview.selvoir-pitch-preview--canvas > .selvoir-pitch-mark {
  display: none !important;
  pointer-events: none !important;
}

.selvoir-pitch-layer-stage {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.selvoir-pitch-layer-stage .card-image-layer {
  pointer-events: auto;
}

.selvoir-pitch-layer-stage .card-image-layer--role-divider {
  min-height: 14px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.selvoir-pitch-layer-stage .card-image-layer--role-divider .card-image-layer-text {
  display: none !important;
}

/* 2026-07-10 FIX(CEO ⑨ 카드 위 유형 라벨 잔상): role=label 레이어(예: "해결 포인트" 칩)가
   main(헤드라인) 레이어와 겹치는 좌표로 저장된 카드가 있어, 카드 콘텐츠 위에 라벨 칩이
   그대로 겹쳐 그려졌다(CEO 스크린샷 실증 - 제목 텍스트 뒤에 반쯤 가려짐). 라벨은 더 이상
   카드 캔버스 안에서 그리지 않는다 — 값/스타일 확인·편집은 상단 통합 툴바(카드 바깥)의
   "라벨" 타깃 버튼으로 계속 가능하다. 레이어의 x_pct/y_pct 등은 인라인 style 속성에 그대로
   남아 저장/복원(수집은 el.style.* 기준)에는 영향 없다 - 화면에만 그리지 않는다.
*/
.selvoir-pitch-layer-stage .card-image-layer--role-label {
  display: none !important;
}

/* W4-D client bundle: editor controls, marquee select, compact package rows, C5 height compression. */
.card-image-layer {
  box-sizing: border-box;
}

.card-image-layer--icon {
  display: grid;
  place-items: center;
}

.card-image-layer--icon .card-image-layer-text {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.board-shape-icon-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.card-image-layer--kind-arrow_up,
.card-image-layer--kind-arrow_right,
.card-image-layer--kind-arrow_down,
.card-image-layer--kind-arrow_left,
.card-image-layer--kind-check,
.card-image-layer--kind-star,
.card-image-layer--kind-heart,
.card-image-layer--kind-exclamation,
.card-image-layer--kind-question,
.card-image-layer--kind-number_1,
.card-image-layer--kind-number_2,
.card-image-layer--kind-number_3 {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.image-overlay-marquee {
  position: absolute;
  z-index: 70;
  pointer-events: none;
  border: 1px solid #2563eb;
  background: rgba(37, 99, 235, 0.14);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.75) inset;
}

.board-image-toolbar-controls #board-image-layer-line-height,
.board-image-toolbar-controls #board-image-layer-padding {
  width: 58px;
}

.registration-package-list {
  gap: 8px;
}

.registration-package-card.registration-package-card--compact {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.045);
}

.registration-package-card--compact:hover {
  transform: none;
}

.registration-package-summary {
  display: grid;
  grid-template-columns: 16px 48px minmax(180px, 1fr) 82px 104px 74px minmax(210px, auto);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
}

.registration-package-summary::-webkit-details-marker {
  display: none;
}

.registration-package-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(-45deg);
  transition: transform 140ms ease;
}

.registration-package-card--compact[open] .registration-package-caret {
  transform: rotate(45deg);
}

.registration-thumb {
  display: block;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: #f8fafc;
}

.registration-thumb img,
.registration-thumb .registration-preview-empty {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.registration-compact-title {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: var(--fs-md);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-compact-metric {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.registration-compact-metric small {
  color: #64748b;
  font-size: var(--fs-xs);
  font-weight: 800;
}

.registration-compact-metric b {
  color: #111827;
  font-size: var(--fs-base);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-weight: 900;
}

.registration-status-badge.selling {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.registration-compact-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.registration-compact-actions select {
  max-width: 112px;
  min-height: 30px;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: #fff;
  color: #111827;
  font-size: 12px;
}

.registration-compact-actions button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
}

.registration-package-expanded {
  display: grid;
  grid-template-columns: 252px minmax(260px, 1fr) 160px;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border-top: 1px solid #edf1f6;
  background: #fbfcfe;
}

.selling-package-card .registration-package-expanded {
  grid-template-columns: minmax(320px, 1fr) 180px;
}

@media (max-width: 980px) {
  .registration-package-summary {
    grid-template-columns: 16px 48px minmax(140px, 1fr) 72px 88px;
  }
  .registration-status-badge,
  .registration-compact-actions {
    grid-column: 3 / -1;
  }
  .registration-compact-actions {
    justify-content: flex-start;
  }
  .registration-package-expanded,
  .selling-package-card .registration-package-expanded {
    grid-template-columns: 1fr;
  }
}

.selvoir-section-pair {
  padding: 28px 30px 26px !important;
}

.selvoir-section-pair .selvoir-pitch-preview {
  min-height: 200px !important;
}

.card-pitch.is-editing {
  padding: 10px !important;
}

.card-pitch.is-editing .card-pitch-left {
  min-height: 160px !important;
  margin-bottom: 10px !important;
}

.card-pitch.is-editing .selvoir-pitch-preview {
  min-height: 200px !important;
}

.selvoir-pitch-kicker {
  margin-bottom: 8px !important;
}

.selvoir-pitch-mark {
  margin: 10px 0 !important;
}

.selvoir-pitch-support {
  margin-top: 10px !important;
}

.selvoir-pitch-preview.has-block-layout,
.selvoir-pitch-preview.selvoir-pitch-preview--free {
  min-height: 200px !important;
}

.card-pitch:has(.selvoir-pitch-preview--free) .card-pitch-left {
  min-height: 200px !important;
}

.selvoir-pitch-preview.selvoir-pitch-preview--canvas {
  min-height: 0 !important;
}

.selvoir-pitch-preview--free .selvoir-pitch-layer-stage {
  pointer-events: auto !important;
}

.selvoir-pitch-layer-stage .card-image-layer--role-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: max(2px, min(4px, 32%));
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
}

.card-pitch > .card-edit-toggle,
.card-pitch.is-editing > .card-edit-toggle {
  display: inline-flex !important;
}

.pitch-background-row {
  align-items: center;
  gap: 8px;
}

.pitch-background-row .pitch-dim-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
}

/* 단계별 현황 바 (상세초안 › 이미지보드 › 등록패키지 › 판매관리) — 2026-06-13 CEO: 단계별 건수 일관 표시 */
.pipeline-strip {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 0 16px;
  padding: 5px;
  background: var(--surface-2, #f3f5f9);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
}
.pipeline-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--text-2, #64748b);
  transition: background .12s, color .12s;
}
.pipeline-strip-item:hover { background: rgba(15, 23, 42, .05); color: var(--text, #0f172a); }
.pipeline-strip-item.is-active {
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .10);
}
.pipeline-strip-label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.pipeline-strip-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-3, #e2e8f0);
  color: var(--text-2, #475569);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.pipeline-strip-item.is-active .pipeline-strip-count {
  background: var(--accent, #c79a54);
  color: #fff;
}
.pipeline-strip-sep {
  display: inline-flex;
  align-items: center;
  color: var(--text-3, #cbd5e1);
  font-size: 14px;
  user-select: none;
}
.pipeline-progressed-note {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 14px;
  border: 1px dashed var(--border, #d7dee8);
  border-radius: 10px;
  background: var(--surface-2, #f8fafc);
  color: var(--text-2, #475569);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pipeline-progressed-note:hover { background: rgba(15, 23, 42, .04); color: var(--text, #0f172a); }

/* 공통 모달 (소싱 이력 관리 등) — 2026-06-16 */
.dv-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .42);
  padding: 24px;
}
.dv-modal-box {
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  padding: 18px 20px 20px;
}
.dv-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dv-modal-head b { font-size: 16px; }
.sourcing-history-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sourcing-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: var(--surface-2, #f8fafc);
}
.sourcing-history-row.is-latest { border-color: var(--accent, #c79a54); background: rgba(199, 154, 84, .07); }
.sourcing-history-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sourcing-history-meta b { font-size: 13px; }

/* 직접 상품 등록 모달 */
.manual-register-input-row { display: flex; gap: 8px; margin-top: 12px; }
.manual-register-input-row input {
  flex: 1 1 auto;
  padding: 9px 12px;
  border: 1px solid var(--border, #d7dee8);
  border-radius: 9px;
  font-size: 13px;
}
.manual-register-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(220, 38, 38, .08);
  color: #b91c1c;
  font-size: 13px;
}
.manual-register-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 11px;
  background: var(--surface-2, #f8fafc);
}
.manual-register-thumb { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 8px; overflow: hidden; background: #eef2f7; }
.manual-register-thumb img { width: 100%; height: 100%; object-fit: cover; }
.manual-register-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; color: #94a3b8; }
.manual-register-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.manual-register-info b { font-size: 14px; line-height: 1.35; }

/* =========================================================================
   260613 PPT 탭형 리본 (홈 / 삽입 / 정렬 / 크기 / 카드·배경)
   거대 단일 리본의 "휠다운" 제거: 탭으로 한 번에 한 줄만 노출.
   그룹 가시성은 JS(boardSetRibbonTab)가 인라인 display로 확정 제어하므로,
   여기서는 탭 스트립 외형과 한 줄 레이아웃만 정의한다. (파일 맨 끝 = 최우선)
   ========================================================================= */
/* 루트: 탭 스트립(위) + 바디(아래) 세로 스택. 과거 --ppt의 display:flex(가로)를 덮는다. */
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

/* 미사용 레거시 입력 표면 숨김 */
.board-ribbon-tabbed .board-pitch-toolbar-main,
.board-ribbon-tabbed .board-pitch-toolbar-text {
  display: none !important;
}
/* 과거 "편집 도구" 큰 라벨(::before)이 세로 스택에서 빈 띠가 됨 → 제거하고 탭 좌측 캡션으로 대체 */
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed::before {
  display: none !important;
  content: none !important;
}
.board-ribbon-tabbed .board-ribbon-tabs::before {
  content: "편집 도구";
  align-self: center;
  margin-right: 6px;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, .14);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .5);
  white-space: nowrap;
}

/* --- 탭 스트립 --- */
.board-ribbon-tabbed .board-ribbon-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 4px 8px 0;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.board-ribbon-tabbed .board-ribbon-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .66);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: .01em;
  padding: 7px 15px 7px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color .12s, background .12s;
}
.board-ribbon-tabbed .board-ribbon-tab:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.board-ribbon-tabbed .board-ribbon-tab.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .10);
}
.board-ribbon-tabbed .board-ribbon-tab.is-active::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: #f6c85f;
  box-shadow: 0 0 8px rgba(246, 200, 95, .55);
}
.board-ribbon-tabbed .board-ribbon-tab.is-unavailable,
.board-ribbon-tabbed .board-ribbon-tab:disabled {
  color: rgba(255, 255, 255, .25);
  cursor: default;
}

/* --- 리본 바디: 한 줄 --- */
.board-ribbon-tabbed .board-ribbon-body {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 7px 10px;
  min-height: 44px;
  overflow: visible;
}
/* 카드·배경 탭: 컨트롤이 많아 2줄이 될 수 있어 상단 정렬 + 바디가 자연히 늘어남 */
.board-ribbon-tabbed[data-ribbon-tab="card"] .board-ribbon-body {
  align-items: flex-start;
}
/* 중간 요소 height 캡(과거 28px 등) 해제 — 카드 컨트롤 2줄이 바디를 밀어 보드를 덮지 않게 */
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed .board-ribbon-group-design,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed .board-pitch-toolbar-card-controls {
  height: auto !important;
  max-height: none !important;
}
/* 두 툴바 블록 chrome 제거 → 빈 블록은 0폭(레이아웃 누수 없음) */
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed .board-pitch-toolbar,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed .board-image-toolbar {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 10px !important;
  grid-template-columns: none !important;
  min-width: 0 !important;
  align-items: center;
}
/* 그룹 캡션(::before 글꼴/단락…) 숨김 — 한 줄 컴팩트 유지 */
.board-ribbon-tabbed .board-ribbon-group::before {
  display: none !important;
  content: none !important;
}
.board-ribbon-tabbed .board-ribbon-group {
  flex: 0 0 auto;        /* 그룹이 줄어들어 세로로 적층되는 것 방지 */
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.board-ribbon-tabbed .board-ribbon-group .board-pitch-toolbar-copy { display: none !important; }
/* 좌측 빈 공간 원인이던 상태 텍스트 숨김(소구점 블록이 비어도 폭 0) */
.board-ribbon-tabbed #board-pitch-toolbar-autosave { display: none !important; }

/* 아이콘 버튼: SVG는 정사각, 한글 라벨 버튼은 내용 폭 */
.board-ribbon-tabbed .board-icon-tool {
  width: auto !important;
  min-width: 28px;
  height: 28px;
  padding: 0 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.board-ribbon-tabbed .board-icon-tool > .tool-icon-svg {
  width: 16px;
  height: 16px;
}
.board-ribbon-tabbed .board-icon-tool > .tool-icon {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

/* 라벨 필드(크기/투명도/X/Y/너비/높이/회전/줄간격/여백) */
.board-ribbon-tabbed .ribbon-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, .6);
  white-space: nowrap;
}
.board-ribbon-tabbed .ribbon-field > span { user-select: none; }
/* 입력값이 잘리지 않게 충분한 폭 + 좁은 내부 여백 (260613 CEO 지적: 값 잘림) */
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed .ribbon-field input[type="number"] {
  width: 58px !important;
  min-width: 58px !important;
  padding: 4px 6px !important;
  text-align: right;
  box-sizing: border-box;
}
.board-ribbon-tabbed .ribbon-field input[type="range"] { width: 78px; }
/* 크기 탭: 과거 PPT 리본이 드래그 전용으로 숨겼던 X/Y/너비/높이 입력을 다시 노출(높은 specificity로 덮음) + 줄간격/여백 폭 보정 */
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed #board-image-layer-x,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed #board-image-layer-y,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed #board-image-layer-w,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed #board-image-layer-h,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed #board-image-layer-line-height,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed #board-image-layer-padding,
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed #board-image-layer-rotation {
  display: inline-block !important;
  width: 56px !important;
  min-width: 56px !important;
  padding: 4px 6px !important;
  text-align: right;
  box-sizing: border-box;
}
.board-ribbon-tabbed .board-ribbon-group-layer-home > input[type="text"] {
  width: 132px !important;
}
.board-ribbon-tabbed .board-layer-tool-separator {
  width: 1px;
  align-self: stretch;
  margin: 4px 2px;
  background: rgba(255, 255, 255, .14);
}

/* 카드·배경 탭: 디자인 컨트롤(보조 탭이므로 필요 시 줄바꿈 허용) */
.board-ribbon-tabbed .board-ribbon-group-design { align-items: center; }
/* 과거 접힘 디자인 버튼(58px 고정 폭) 잔재 해제 — 카드 컨트롤이 가로로 펴지도록 */
.board-editor-dock .board-unified-toolbar--ppt.board-ribbon-tabbed .board-ribbon-group-design {
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 1024px !important;
}
.board-ribbon-tabbed .board-ribbon-group-design .board-pitch-toolbar-card-controls {
  display: flex !important;
  flex-flow: row wrap !important;        /* 가로 한 줄, 넘치면 2줄로만 (세로 적층 금지) */
  align-items: center;
  gap: 8px 14px;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 1024px !important;
  grid-template-columns: none !important; /* 과거 grid 잔재 무력화 */
  position: static !important;
  inset: auto !important;
  transform: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.board-ribbon-tabbed .board-ribbon-group-design .board-pitch-toolbar-card-controls > label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, .6);
}
.board-ribbon-tabbed .board-ribbon-group-design .board-pitch-toolbar-color-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.board-ribbon-tabbed .board-ribbon-group-design .board-pitch-toolbar-actions {
  display: inline-flex;
  gap: 4px;
}

/* 상태 텍스트 */
.board-ribbon-tabbed .board-pitch-toolbar-autosave {
  font-size: 11px;
  color: rgba(255, 255, 255, .45);
  white-space: nowrap;
  margin-left: 6px;
}

/* ============================================================
   화면 밀도: 컴팩트 (설정 > 화면 밀도 = '컴팩트')
   body.density-compact 일 때 콘텐츠 영역 여백을 줄여 한 화면에 더 담는다.
   레이아웃 구조는 그대로 두고 패딩/간격만 좁힌다(보통 = 기본값, 클래스 없음).
   ============================================================ */
body.density-compact #content { padding: 18px 22px; }
body.density-compact .card { padding: 16px; }
body.density-compact .b1-card { padding: 12px 14px; gap: 14px; }
body.density-compact .section-head { margin-bottom: 12px; }

/* 2026-06-23 판매 종료/단종 복원 섹션 */
.selling-archived-panel { margin-top: var(--space-3, 12px); }
.selling-archived-summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 4px; }
.selling-archived-summary b { font-weight: var(--fw-bold, 700); }
.selling-archived-list { display: flex; flex-direction: column; gap: 6px; padding: 6px 2px; }
.selling-archived-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: var(--radius-md, 8px); }
.selling-archived-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm, 13px); }

/* ===== 데이보어 픽 (신규 소싱 결과) ===== */
.dvp-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.dvp-tab { padding: 8px 14px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary);
  border-radius: var(--radius-pill); font-size: var(--fs-md); font-weight: 600; cursor: pointer; transition: all .12s; }
.dvp-tab:hover { background: var(--bg-hover); }
.dvp-tab.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.dvp-tab-n { font-size: var(--fs-xs); opacity: .8; margin-left: 2px; }
.dvp-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dvp-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card);
  box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .15s; }
.dvp-card:hover { box-shadow: var(--shadow-md); }
.dvp-card-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
.dvp-rank { font-size: var(--fs-xs); font-weight: 800; color: var(--accent-blue); background: var(--accent-blue-soft); padding: 2px 7px; border-radius: var(--radius-pill); }
.dvp-kw { flex: 1; font-size: var(--fs-lg); font-weight: 800; color: var(--text-primary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dvp-score { font-size: var(--fs-sm); font-weight: 700; color: var(--accent-green); }
.dvp-card-sub { display: flex; align-items: center; gap: 6px; padding: 8px 14px 0; flex-wrap: wrap; }
.dvp-src { font-size: var(--fs-2xs); font-weight: 800; padding: 2px 8px; border-radius: var(--radius-pill); }
.dvp-src-dome { color: #fff; background: var(--accent-blue); }
.dvp-src-oc { color: #fff; background: #7c3aed; }
.dvp-match { font-size: var(--fs-2xs); font-weight: 700; color: var(--text-secondary); background: var(--bg-soft); border: 1px solid var(--border-light); padding: 1px 7px; border-radius: var(--radius-pill); }
.dvp-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 14px; }
.dvp-metric { display: flex; flex-direction: column; gap: 1px; }
.dvp-metric label { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: 600; }
.dvp-metric b { font-size: var(--fs-md); color: var(--text-primary); font-weight: 700; }
.dvp-metric .dvp-msub { font-size: var(--fs-2xs); color: var(--text-muted); }
.dvp-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: var(--bg-soft); border-top: 1px solid var(--border-light); font-size: var(--fs-sm); }
.dvp-supp { color: var(--text-secondary); }
.dvp-kc { font-size: var(--fs-2xs); font-weight: 800; color: #fff; background: var(--accent-green); padding: 1px 6px; border-radius: var(--radius-xs); }
.dvp-prod { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: var(--fs-sm); }
.dvp-link { color: var(--accent-blue); font-weight: 600; text-decoration: none; white-space: nowrap; }
.dvp-link:hover { text-decoration: underline; }

/* ── SELVOIR PICK 리스트/상세 정돈 (CEO 2026-07-01 최종 통합본) ── */
/* 2026-07-02(§7): 좁은 화면에서 12~13열 테이블이 잘리지 않도록 가로 스크롤 허용. 대규모 재스타일 없음. */
#dvp-list-table-wrap { overflow-x: auto; }
.dvp-list-tbl th, .dvp-list-tbl td { vertical-align: middle; }
.dvp-list-tbl th.pa-check-th, .dvp-list-tbl td.pa-check-cell { width: 34px; text-align: center; padding-left: 6px; padding-right: 2px; }
.dvp-list-tbl td.pa-check-cell input, .pa-check-th input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent-blue); }
.dvp-list-tbl td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dvp-list-tbl td.num.strong { font-weight: 700; }
.dvp-list-tbl td.num.pos { color: #15803d; font-weight: 600; }
.dvp-list-tbl td.num.neg { color: #b91c1c; font-weight: 600; }
.dvp-ch-hint { display: inline-block; margin-left: 5px; padding: 1px 5px; font-size: 10px; font-weight: 600; color: var(--text-muted); background: var(--surface-2, #f1f5f9); border-radius: 6px; vertical-align: middle; }
.dvp-list-tbl td.dvp-link-td { text-align: center; }
.dvp-link-cell { color: var(--accent-blue); font-weight: 600; font-size: 12px; text-decoration: none; white-space: nowrap; }
.dvp-link-cell:hover { text-decoration: underline; }
.pa-product-row.is-selected > td { background: var(--accent-blue-soft, #eff6ff); }
.dvp-list-tbl td.dvp-status-td { text-align: center; white-space: nowrap; }

/* 2026-07-02(§2): 데이보어 픽 상단 진행 중 소싱 배너 — 진행 로그 1줄 + 중단 버튼. 실행 중일 때만 노출. */
.dvp-running-banner { padding: 10px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius-md, 8px); margin-bottom: 12px; }
.dvp-running-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dvp-running-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dvp-running-text b { font-size: 13px; color: var(--text-primary, #111827); }
.dvp-running-pct { font-size: 13px; font-weight: 700; color: #1d4ed8; font-family: var(--font-mono, monospace); }

/* 2026-07-02(F1 §1): PICK 진행 배너 v2 — 단계/경과/ETA + 카테고리별 진행. progress 파일 있을 때만 채워짐. */
.dvp-progress-v2 { margin-top: 6px; padding-top: 8px; border-top: 1px dashed #bfdbfe; }
.dvp-progress-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; font-size: 12.5px; color: var(--text-secondary, #334155); }
.dvp-progress-meta b { font-size: 13px; color: var(--text-primary, #111827); }
.dvp-progress-cats { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.dvp-progress-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px; font-size: 12.5px; flex-wrap: wrap; }
.dvp-progress-cat-label { font-weight: 700; color: var(--text-primary, #111827); }

/* 2026-07-02(F1 §2): 목표 미달 카테고리 재탐색 섹션 — 결과 화면(실행 중 아님)에서만 노출. */
.dvp-retry-section { margin: 10px 0 16px; }
.dvp-retry-list { display: flex; flex-direction: column; gap: 6px; }
.dvp-retry-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--surface-1, #fafafa); flex-wrap: wrap; }
.dvp-retry-label { font-weight: 700; font-size: 13px; color: var(--text-strong, #0f172a); min-width: 90px; }
.dvp-retry-row button { margin-left: auto; }

/* 일괄 작업 바 */
.pa-bulk-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 4px 0 10px; border: 1px dashed var(--border, #e2e8f0); border-radius: 10px; background: var(--surface-1, #fafafa); opacity: .72; transition: opacity .15s, border-color .15s; }
.pa-bulk-bar.is-active { opacity: 1; border-style: solid; border-color: var(--accent-blue); background: var(--accent-blue-soft, #eff6ff); }
.pa-bulk-count { font-size: 13px; color: var(--text-muted); }
.pa-bulk-count b { color: var(--text-strong, #0f172a); font-size: 14px; }

/* 상세 2카드 */
.dvp-card-box { border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 12px 14px; background: var(--surface-1, #fff); }
.dvp-card-box h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--text-strong, #0f172a); letter-spacing: -.2px; }
.dvp-card-box .info-tbl td { padding: 4px 6px; font-size: 12.5px; line-height: 1.5; }
.pa-detail-grid { gap: 12px; }

/* 상세 양채널 마진 패널 */
.dvp-margin-panel { margin-top: 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 12px 14px; background: var(--surface-1, #fff); }
.dvp-margin-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dvp-mp-title { font-size: 13px; font-weight: 700; color: var(--text-strong, #0f172a); }
.dvp-deli-ctl { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.dvp-deli-ctl label { font-size: 12px; }
.dvp-deli-input { width: 84px; padding: 4px 7px; border: 1px solid var(--border, #cbd5e1); border-radius: 7px; text-align: right; font-size: 12.5px; }
.dvp-deli-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 12.5px; color: var(--text-secondary, #334155); }
.dvp-deli-toggle input { accent-color: var(--accent-blue); width: 15px; height: 15px; }
/* 마진·판매 탭 배송비 행(라벨 중복 없이 한 줄) */
.dvp-deli-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--surface-1, #fafafa); }
.dvp-deli-label { font-size: 12.5px; font-weight: 700; color: var(--text-strong, #0f172a); }
.dvp-deli-base { font-size: 11.5px; color: var(--text-muted); }
.dvp-deli-toggle { margin-left: auto; }
/* 탭 콘텐츠(활성 탭만 렌더됨) */
.dvp-tabpanel { margin-top: 4px; }
.pa-margin-card .pa-margin-price { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.pa-margin-card .pa-margin-price label { font-size: 11.5px; color: var(--text-muted); min-width: 34px; }
.dvp-price-input { width: 92px; padding: 4px 7px; border: 1px solid var(--border, #cbd5e1); border-radius: 7px; text-align: right; font-size: 13px; font-weight: 600; }
.dvp-price-input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 2px var(--accent-blue-soft, #dbeafe); }
.pa-price-reset { padding: 3px 8px; font-size: 11px; border: 1px solid var(--border, #cbd5e1); border-radius: 7px; background: #fff; color: var(--text-muted); cursor: pointer; }
.pa-price-reset:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.dvp-ch-pick { margin-left: auto; padding: 2px 9px; font-size: 11px; font-weight: 600; border: 1px solid var(--border, #cbd5e1); border-radius: 20px; background: #fff; color: var(--text-muted); cursor: pointer; }
.dvp-ch-pick.on { border-color: var(--accent-blue); background: var(--accent-blue); color: #fff; }
.pa-margin-card .pa-margin-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; }
.pa-margin-card .pa-margin-grid span { color: var(--text-muted); }
.pa-margin-card .pa-margin-grid b { text-align: right; }
.dvp-detail-actions { margin-top: 12px; display: flex; gap: 8px; }

/* PICK 생성 이력 — 5개·한 행 고정(CEO 2026-07-05). 좁은 화면은 줄바꿈 대신 가로 스크롤. */
.pa-history-row { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.pa-history-row .pa-history-chip { width: auto; min-width: 0; }
.pa-hist-date { font-size: 12.5px; font-weight: 700; color: var(--text-strong, #0f172a); white-space: nowrap; }
.pa-hist-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }

/* R3(2026-07-02 CEO): 홈 "활성 소싱 후보" KPI 카드 — 4개 status-strip 카드 높이 조화 유지 위해
   기존 .strip-item 규칙(padding/border/box-shadow)은 그대로 상속하고 카드 내부 레이아웃만 추가한다. */
.dvp-kpi-card { display: flex; flex-direction: column; gap: 3px; cursor: pointer; outline: none; overflow: visible; }
.dvp-kpi-card:focus-visible { box-shadow: 0 0 0 3px var(--accent-blue-soft, #dbeafe); border-color: var(--accent-blue, #2563eb); }
.dvp-kpi-card.is-error b, .dvp-kpi-card.is-empty b { color: var(--text-muted, #94a3b8); font-size: 20px; }
.dvp-kpi-bar { width: 100%; height: 5px; border-radius: 4px; background: #e4e9f1; overflow: hidden; margin: 2px 0 1px; }
.dvp-kpi-bar-fill { height: 100%; background: #0f766e; border-radius: 4px; transition: width 240ms ease; }
.dvp-kpi-sub { opacity: 0.85; }
.dvp-kpi-verified { font-size: 11px; }
.dvp-kpi-running-line { font-size: 11.5px; color: #0f766e; font-weight: 600; }
.dvp-kpi-popover {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; min-width: 320px; max-width: 420px;
  background: #ffffff; border: 1px solid #e4e9f1; border-radius: 10px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14); padding: 10px 12px;
}
.dvp-kpi-popover[hidden] { display: none; }
.dvp-kpi-popover-tbl { width: 100%; font-size: 12.5px; }
.dvp-kpi-popover-tbl th { text-align: left; color: var(--text-muted, #64748b); font-weight: 600; padding: 4px 6px; }
.dvp-kpi-popover-tbl td { padding: 5px 6px; border-top: 1px solid #eef1f5; }
@media (max-width: 720px) {
  .dvp-kpi-popover { left: auto; right: 0; min-width: 260px; max-width: calc(100vw - 48px); }
}
.dvp-hist-banner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 10px; border: 1px solid var(--accent-blue); border-radius: 10px; background: var(--accent-blue-soft, #eff6ff); font-size: 13px; color: var(--text-strong, #0f172a); }

/* ============================================================
   ⑦ 컨텍스트 미니 툴바 (2026-07-10, 260708_imageboard_close_plan.md §1-⑦)
   요소 선택 시 그 요소 옆에 뜨는 작은 도구모음. position:fixed라 문서 흐름에 영향이 없다
   (flow reflow 금지 요건). 색은 리본 툴바(.board-unified-toolbar, #20242b)와 통일해
   "같은 도구모음 계열"로 보이게 한다.
   ============================================================ */
.board-mini-toolbar {
  position: fixed;
  z-index: 45;
  top: -9999px;
  left: -9999px;
  display: none;
  pointer-events: none;
}
.board-mini-toolbar.is-visible {
  display: block;
  pointer-events: auto;
}
.board-mini-toolbar-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #20242b;
  border: 1px solid #1f2937;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32);
  max-width: calc(100vw - 16px);
  overflow-x: auto;
  overscroll-behavior: contain;
  white-space: nowrap;
}
.board-mini-toolbar .board-mini-size-input {
  flex: 0 0 auto;
  width: 52px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid #374151;
  background: #11151c;
  color: #f8fafc;
  font-size: 12.5px;
}
.board-mini-toolbar .btn-toggle,
.board-mini-toolbar .pitch-align-btn,
.board-mini-toolbar .btn-sm,
.board-mini-toolbar .board-color-control {
  flex: 0 0 auto;
}
.board-mini-toolbar .board-color-control-label {
  display: none; /* 미니 툴바는 라벨 없이 스와치만 - 군더더기 금지 */
}
/* 정렬 아이콘은 currentColor로 그려져 기본(.pitch-align-btn { color:#64748b }), 굵게(B)
   버튼 기본(.btn-toggle { background:#fff })은 밝은 배경 전용 - 리본(.board-unified-toolbar)과
   똑같은 다크 배색을 미니 툴바에도 준다(리본과 같은 도구모음 계열로 보이게 + 어두운 배경
   위에서 정렬 아이콘이 거의 안 보이던 문제 실 스크린샷으로 확인해 고침). */
.board-mini-toolbar .btn-toggle,
.board-mini-toolbar .pitch-align-btn {
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  color: #eef2f7;
  border-radius: 6px;
  box-shadow: none;
}
.board-mini-toolbar .btn-toggle.toggle-active,
.board-mini-toolbar .pitch-align-btn.toggle-active {
  border-color: #f4c96b;
  background: #f4c96b;
  color: #111827;
  box-shadow: none;
  transform: none;
}
.board-mini-sep {
  flex: 0 0 auto;
  width: 1px;
  height: 20px;
  background: #374151;
}
.board-mini-opacity-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
  flex: 0 0 auto;
}
.board-mini-opacity-field input[type="range"] {
  width: 72px;
}
@media (max-width: 480px) {
  .board-mini-toolbar-inner { padding: 5px 6px; gap: 4px; }
  .board-mini-opacity-field input[type="range"] { width: 52px; }
}

/* ============================================================
   ⑳ 선택 유형 3종 시각 구분 (2026-07-13, Fable 확정 설계)
   카드(파랑)/텍스트 계열(role 레이어·텍스트 레이어, 보라 점선)/도형·이미지 레이어(주황 실선).
   기존 .is-toolbar-selected(카드)/.is-selected(레이어) 클래스는 그대로 두고(회귀 0), JS가
   선택 시 아래 마커 클래스(.board-sel-*)+data-sel-tag를 "추가로만" 붙인다 — 기존 선택 로직·
   툴바 활성화·리사이즈 핸들 표시 등은 전혀 건드리지 않는다. 태그는 ::before(카드 밖 상단 —
   ⑨ is-toolbar-selected::before 태그 확장과 동일 자리)로 콘텐츠 위에 겹치지 않는다.
   ============================================================ */
.board-sel-card,
.board-sel-text,
.board-sel-shape,
.board-sel-image {
  position: relative;
}
.board-sel-card::before,
.board-sel-text::before,
.board-sel-shape::before,
.board-sel-image::before {
  content: attr(data-sel-tag);
  position: absolute;
  top: -20px;
  left: 10px;
  z-index: 15;
  padding: 2px 9px;
  border-radius: 5px 5px 0 0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
/* 카드 선택 — 파랑 굵은 외곽 테두리 + "카드: {슬롯명}" 태그(⑨ 태그 자리 재사용) */
.card-pitch.is-toolbar-selected.board-sel-card .selvoir-pitch-preview {
  outline: 3px solid var(--sel-card);
  outline-offset: 4px;
}
.board-sel-card::before { background: var(--sel-card); }
/* 이미지 카드 선택 — "이미지" 태그, 도형과 같은 주황 계열(⑳ 설계: 도형/이미지 레이어 = 주황) */
.card-image.is-toolbar-selected.board-sel-image {
  box-shadow: 0 0 0 3px var(--sel-shape), 0 16px 40px rgba(15, 23, 42, 0.1);
}
.board-sel-image::before { background: var(--sel-shape); }
/* 텍스트 계열(role 레이어·텍스트 레이어) — 보라 점선 테두리 + 핸들 */
.card-image-layer.is-selected.board-sel-text {
  outline: 2px dashed var(--sel-text);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.16), 0 12px 30px rgba(15, 23, 42, 0.22);
}
.board-sel-text::before { background: var(--sel-text); }
.card-image-layer.is-selected.board-sel-text .image-overlay-resize-handle { background: #fff; border-color: var(--sel-text); }
.card-image-layer.is-selected.board-sel-text .image-overlay-rotate-handle { background: var(--sel-text); }
/* 도형/이미지 레이어 — 주황 실선 핸들(+테두리) */
.card-image-layer.is-selected.board-sel-shape {
  outline: 2px solid var(--sel-shape);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.16), 0 12px 30px rgba(15, 23, 42, 0.22);
}
.board-sel-shape::before { background: var(--sel-shape); }
.card-image-layer.is-selected.board-sel-shape .image-overlay-resize-handle { background: #fff; border-color: var(--sel-shape); }
.card-image-layer.is-selected.board-sel-shape .image-overlay-rotate-handle { background: var(--sel-shape); }
/* 미니 툴바 첫 칸 "현재 대상" 정적 배지 — 도구(색/크기 등)와 분리된 별도 캡슐로 표시 */
.board-mini-toolbar.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.board-mini-toolbar-context {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: #20242b;
  border: 1px solid #1f2937;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
.board-mini-toolbar-context.is-visible { display: inline-flex; }
.board-mini-toolbar-context .board-mini-context-icon { width: 14px; height: 14px; flex: 0 0 auto; display: inline-flex; }
.board-mini-toolbar-context .board-mini-context-icon svg { width: 100%; height: 100%; }
.board-mini-toolbar-context[data-sel-kind="card"] { box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32), inset 0 0 0 1px var(--sel-card); }
.board-mini-toolbar-context[data-sel-kind="text"] { box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32), inset 0 0 0 1px var(--sel-text); }
.board-mini-toolbar-context[data-sel-kind="shape"],
.board-mini-toolbar-context[data-sel-kind="image"] { box-shadow: 0 14px 30px rgba(15, 23, 42, 0.32), inset 0 0 0 1px var(--sel-shape); }
/* 리본 좌측 선택 유형 배지 — 기존 "편집 도구" 캡션 옆에 추가만(그룹 disabled 로직 무관·불변) */
.board-ribbon-sel-badge {
  display: none;
  align-items: center;
  gap: 5px;
  align-self: center;
  margin-right: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.board-ribbon-sel-badge.is-visible { display: inline-flex; }
.board-ribbon-sel-badge[data-sel-kind="card"] { background: var(--sel-card); }
.board-ribbon-sel-badge[data-sel-kind="text"] { background: var(--sel-text); }
.board-ribbon-sel-badge[data-sel-kind="shape"],
.board-ribbon-sel-badge[data-sel-kind="image"] { background: var(--sel-shape); }

.dvp-hist-banner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 10px; border: 1px solid var(--accent-blue); border-radius: 10px; background: var(--accent-blue-soft, #eff6ff); font-size: 13px; color: var(--text-strong, #0f172a); }
/* 3-4: 더 보기 행 */
.dvp-more-row { text-align: center; padding: 10px 0 4px; }

/* 게이트v2(2026-07-15): 스토리라인 검토 — 페이지 구성/AI 보정 계획 행 */
.storyline-comp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px dashed var(--border, #e2e8f0); }
.storyline-comp-row select { min-width: 140px; }
.storyline-comp-label { font-size: 13px; }
.storyline-transform-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.storyline-transform-check { white-space: nowrap; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.storyline-transform-directive { flex: 1; min-width: 0; }
/* 2026-07-22(#158): 자동 생성 블록 카드 — 편집 액션 숨김 + 관리 경로 안내(UI 정합) */
.card-image[data-auto-block="1"] .card-split-textarea,
.card-image[data-auto-block="1"] .card-split-actions [data-mini-action] { display: none; }
.card-image[data-auto-block="1"] .card-image-right > p.muted.small { display: none; }
/* 2026-08-17: 자동 블록·브랜드 카드의 액션 줄은 3열 그리드 대신 줄바꿈 flex — 그리드에선 안내문이 한 칸에
   끼어 세로로 길어지고 '삭제'·'문구 수정'이 그 높이만큼 늘어나 큼직한 블록으로 보였다(실측). */
.card-image[data-auto-block="1"] .card-image-right .card-split-actions,
.card-image[data-brand-card="1"] .card-image-right .card-split-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card-image[data-auto-block="1"] .card-image-right .card-split-actions .btn-sm,
.card-image[data-brand-card="1"] .card-image-right .card-split-actions .btn-sm { flex: 0 0 auto; min-height: 32px; }
.card-image[data-auto-block="1"] .card-split-actions::before {
  content: "자동 생성 블록 — 아래 칸에서 문구를 고치고 '저장하고 새로 그리기'를 누르면 카드가 다시 그려집니다. 크기도 조절할 수 있습니다.";
  display: block;
  flex-basis: 100%;
  width: 100%;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 2px;
}

/* 2026-07-22(#161): 카드 크기 조절 + 자동 블록 인라인 문구 폼 */
.card-scale-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; margin-left: auto; }
.card-scale-select { padding: 4px 8px; border: 1px solid #d8dde5; border-radius: 8px; background: #fff; font-size: 12px; color: #1e222a; }
.auto-block-form { margin-top: 10px; padding: 12px; border: 1px solid #e4e0d9; border-radius: 12px; background: #fbfaf8; }
.auto-block-form label { display: block; font-size: 12px; color: #64748b; margin-bottom: 8px; }
.auto-block-form textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #d8dde5; border-radius: 8px; font-size: 13px; line-height: 1.5; resize: vertical; box-sizing: border-box; }

/* 2026-07-21: 컨펌 화면에서 보정 계획 직접 추가 */
.storyline-transform-add { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.storyline-transform-add #tf-add-photo { width: 58px; flex: 0 0 auto; }
.storyline-transform-add #tf-add-directive { flex: 1; min-width: 0; }
.storyline-transform-add .btn-sm { white-space: nowrap; }

/* 게이트v2 충실도: AI 보정본 배지 — 검수 필요 표시 */
.ai-transformed-chip { position: absolute; top: 8px; left: 8px; z-index: 11; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* (확장 모듈 전용 블록 이동됨) */
































/* ── #171 오늘 리포트 해설문·인사이트 배너 ─────────────────────── */




/* ── #173 시스템 판정·포트폴리오 표 ─────────────────────────── */













/* #174 미니 차트 */





/* #176 픽 수집 상태 배지 */
.dvp-fresh-badge { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0 10px; padding: 8px 12px; border: 1px solid #e5e9f0; border-radius: 8px; background: #f8fafc; font-size: 12.5px; color: #475569; }
.dvp-fresh-badge.warn { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.dvp-fresh-fail { font-weight: 700; color: #dc2626; }

/* #177 판매 페이지 링크 행 */
.commerce-sale-url { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border: 1px dashed #d8dee8; border-radius: 8px; background: #fbfcfe; }
.commerce-sale-url label { font-size: 12px; color: #64748b; font-weight: 700; flex: 0 0 auto; }
.commerce-sale-url input { flex: 1 1 auto; min-width: 160px; padding: 5px 8px; border: 1px solid #d8dee8; border-radius: 6px; font-size: 12.5px; }

/* #175 홈 히어로 + 전략 패널 */












/* #175 포트폴리오 트리맵 */





/* #175 성향 진단 설문 */










/* ===== #191 가비아 이식: 보드 미니맵(카드 빠른 이동 레일) ===== */
#board-minimap { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 4px; padding: 10px 8px;
  background: rgba(255, 255, 255, .94); border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08); max-height: 72vh; overflow-y: auto; overflow-x: hidden; }
#board-minimap .bm-item { display: flex; align-items: center; gap: 6px; border: 0; background: none;
  cursor: pointer; padding: 3px 4px; border-radius: 8px; color: #6b7280; font-size: 11px; line-height: 1.2; text-align: left; }
#board-minimap .bm-item .bm-dot { width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; flex: none; transition: transform .15s, background .15s; }
#board-minimap .bm-item .bm-label { display: none; white-space: nowrap; max-width: 132px; overflow: hidden; text-overflow: ellipsis; }
#board-minimap:hover { padding-right: 12px; }
#board-minimap:hover .bm-item .bm-label { display: inline; }
#board-minimap .bm-item:hover { background: #f3f4f6; color: #111827; }
#board-minimap .bm-item.active { color: #111827; font-weight: 600; }
#board-minimap .bm-item.active .bm-dot { background: #c9a227; transform: scale(1.3); }
.board-minimap-flash { outline: 2px solid #c9a227; outline-offset: 4px; border-radius: 6px; }
@media (max-width: 1100px) { #board-minimap { display: none; } }

/* ===== #194 설정 접이식 카드 — 제목만 나열, 클릭 시 펼침 ===== */
.settings-card-toggle { cursor: pointer; user-select: none; position: relative; padding-right: 26px; }
.settings-card-toggle::after { content: ''; position: absolute; right: 6px; top: 50%;
  width: 8px; height: 8px; border-right: 2px solid #9ca3af; border-bottom: 2px solid #9ca3af;
  transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.settings-card.is-collapsed .settings-card-toggle::after { transform: translateY(-30%) rotate(-45deg); }
.settings-card.is-collapsed > *:not(.settings-card-head) { display: none; }
.settings-card.is-collapsed { padding-bottom: 14px; }
.settings-card-toggle:hover h3 { color: #111827; }


/* ===== SELVOIR 로고(사이드바·로그인 공통) — 2026-08-18 리브랜딩(구 SELVOIR 클래스명 유지). 스펙: 심볼=대문자높이×1.5, 간격=심볼폭×0.28, 자간 -0.04em ===== */
.selvoir-logo { display: inline-flex; align-items: center; gap: 9px; line-height: 1; }
/* 단일 사업부 모드: 전환 UI(캐럿·호버·클릭)만 숨기고 로고는 유지 — 버튼째 숨기면 좌상단이 공백이 된다. */
.brand-switcher-button.single-workspace { cursor: default; }
.brand-switcher-button.single-workspace:disabled { opacity: 1; }
.brand-switcher-button.single-workspace .brand-caret { display: none; }

/* ── #196 설정 리뉴얼(윈들리풍): 라벨 위 필드·단위 서픽스·알약 세그먼트·안내 박스 ── */
/* 접힌 카드가 제목 폭만큼만 좁아져 들쭉날쭉하던 것 → 전 카드 동일 폭. */
.settings-grid .settings-card { width: 100%; box-sizing: border-box; }
.set-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.set-field { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; min-width: 0; }
.set-label { font-size: 13px; font-weight: 600; color: var(--ink, #1c2430); display: flex; align-items: center; gap: 6px; }
.set-hint {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; border: 1px solid #c9d1de;
  color: #7c8797; font-size: 10px; font-weight: 700; cursor: help; flex: none;
}
.set-field .settings-input { width: 100%; box-sizing: border-box; height: 42px; padding: 0 14px;
  border: 1px solid #dbe1ea; border-radius: 10px; font-size: 14px; background: #fff; }
.set-field .settings-input:focus { border-color: var(--accent-blue, #4B5BFF); outline: none;
  box-shadow: 0 0 0 3px rgba(75, 91, 255, 0.12); }
.set-unit-wrap { position: relative; display: block; }
.set-unit-wrap .settings-input { padding-right: 44px; }
.set-unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: #8a94a4; pointer-events: none; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: #f0f3f8; border-radius: 10px; }
.seg-btn { border: 1px solid transparent; background: transparent; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: #6b7688; cursor: pointer; }
.seg-btn:hover { color: #1c2430; }
.seg-btn.active { background: #fff; color: #1c2430; border-color: #dbe1ea;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.08); }
.set-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px;
  padding: 12px 14px; background: #eef3ff; border-radius: 10px;
  font-size: 13px; line-height: 1.55; color: #33415e; }
.set-note-i { flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-blue, #4B5BFF); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
@media (max-width: 720px) { .set-row { grid-template-columns: 1fr; } }
.selvoir-logo .selvoir-mark { width: 32px; height: 30px; flex: none; }
.selvoir-logo .selvoir-word { font-family: Inter, 'Pretendard Variable', Pretendard, sans-serif;
  font-weight: 800; letter-spacing: -0.04em; font-size: 22px; color: #0B1220; }
.selvoir-logo-login { justify-content: center; gap: 13px; }
.selvoir-logo-login .selvoir-mark { width: 47px; height: 44px; }
.selvoir-logo-login .selvoir-word { font-size: 40px; }

/* ===== #194b 설정 = 세로 한 줄 스크롤 목록 ===== */
.settings-page .settings-grid { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }

/* ── 2026-08-17 보드 편집기 조작성(PPT급): 카드 이동 바·원본 사진 추가 버튼·긴 보드 경량화 ── */
.card-move-bar { position: absolute; top: 10px; left: 10px; z-index: 14; display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 4px; border-radius: 999px; background: rgba(255,255,255,.92); border: 1px solid #dbe1ea;
  box-shadow: 0 1px 3px rgba(11,18,32,.10); opacity: .78; transition: opacity .12s; }
.card-pitch:hover .card-move-bar, .card-image:hover .card-move-bar, .is-toolbar-selected .card-move-bar, .is-editing .card-move-bar { opacity: 1; }
.card-grip { cursor: grab; user-select: none; font-size: 15px; line-height: 1; letter-spacing: -2px; color: #6b7688; padding: 2px 6px; }
.card-grip:active, body.board-pointer-dragging .card-grip { cursor: grabbing; }
.card-move-btn { border: 0; background: transparent; width: 24px; height: 22px; border-radius: 6px; font-size: 11px; color: #4b5563; cursor: pointer; }
.card-move-btn:hover { background: #eef1ff; color: #4B5BFF; }
.card-image[data-brand-card="1"] .card-split-actions [data-mini-action="ai"] { display: none; }
.card-image[data-brand-card="1"] .card-split-actions::before {
  content: "브랜드 서명 카드 — 이 자리에서 사진 교체·자르기·삭제가 되고, 서명 이미지 자체(로고·문구)는 설정 > 브랜드 서명에서 올려 바꿉니다.";
  display: block; width: 100%; color: #94a3b8; font-size: 12px; line-height: 1.5; margin-bottom: 6px; }
.board-source-add-btn { position: absolute; left: 6px; bottom: 6px; z-index: 3; padding: 3px 8px; border-radius: 999px;
  border: 1px solid #4B5BFF; background: #fff; color: #4B5BFF; font-size: 11px; font-weight: 700; cursor: pointer; }
.board-source-add-btn:hover { background: #4B5BFF; color: #fff; }
/* 긴 보드(수만 px) 스크롤·재렌더 경량화 — 화면 밖 카드는 레이아웃/페인트 생략 */
#board-section-list > .card-image, #board-section-list > .card-pitch { content-visibility: auto; contain-intrinsic-size: auto 480px; }
/* 단, 편집·선택·드래그 중인 카드는 절약 모드에서 뺀다 — 절약 모드는 paint 격리를 걸어 카드 밖으로 나온
   편집 패널·선택 테두리·라벨을 잘라 버린다(실측: 훅 카드의 문구 폼이 카드 아래로 넘치자 '저장' 버튼이
   다음 카드에 가려 안 눌림). 편집 카드는 이웃 카드의 ✎·이동바(z 14)보다 위(z 30)에 둬 패널이 항상 클릭된다. */
#board-section-list > .card-image.is-editing, #board-section-list > .card-pitch.is-editing,
#board-section-list > .card-image.is-toolbar-selected, #board-section-list > .card-pitch.is-toolbar-selected,
#board-section-list > .card-image.dragging, #board-section-list > .card-pitch.dragging { content-visibility: visible; contain: none; }
.card-pitch.is-editing, .card-image.is-editing { z-index: 30; }

/* 2026-08-18 리본 탭 항상 활성 — 지금 선택과 무관한 탭/그룹은 흐리게, 안내 한 줄 */
.board-ribbon-tab.is-unavailable { opacity: .55; }
.board-ribbon-tab.is-unavailable:hover { opacity: .85; }
.board-ribbon-group.is-inactive-surface { opacity: .38; pointer-events: none; filter: grayscale(.4); }
.board-ribbon-hint { flex-basis: 100%; width: 100%; font-size: 12px; color: #9aa4b2; padding: 4px 10px 2px; }
/* 정렬 아이콘 — 어느 컨테이너에서든 그려지게(종전엔 --compact 그룹 안에서만 그려져 미니 툴바에선 빈 칸) */
.pitch-align-btn .align-icon { display: block; width: 14px; height: 12px;
  background: linear-gradient(currentColor, currentColor) left top 0 / 14px 2px no-repeat,
              linear-gradient(currentColor, currentColor) left top 5px / 10px 2px no-repeat,
              linear-gradient(currentColor, currentColor) left top 10px / 14px 2px no-repeat; }
.pitch-align-btn--center .align-icon { background:
  linear-gradient(currentColor, currentColor) center top 0 / 14px 2px no-repeat,
  linear-gradient(currentColor, currentColor) center top 5px / 10px 2px no-repeat,
  linear-gradient(currentColor, currentColor) center top 10px / 14px 2px no-repeat; }
.pitch-align-btn--right .align-icon { background:
  linear-gradient(currentColor, currentColor) right 0 top 0 / 14px 2px no-repeat,
  linear-gradient(currentColor, currentColor) right 0 top 5px / 10px 2px no-repeat,
  linear-gradient(currentColor, currentColor) right 0 top 10px / 14px 2px no-repeat; }
.board-mini-toolbar .pitch-align-btn.board-icon-tool { min-width: 30px; }

/* 2026-08-18 사진 글씨 지우기(AI) — 영역 드래그 모드 */
.card-image-visual.is-erase-mode { cursor: crosshair; outline: 2px dashed #4B5BFF; outline-offset: -2px; }
.card-image-visual.is-erase-mode .card-image-layer { pointer-events: none; }
.board-erase-rect { position: absolute; z-index: 40; border: 2px dashed #4B5BFF; background: rgba(75, 91, 255, .18); pointer-events: none; box-sizing: border-box; }
/* 2026-08-18 설정 > API 키 — 쓰임새별 묶음 + 키별 용도·발급처 안내 */
.secret-group { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border, #e5e7eb); }
.secret-group:first-of-type { margin-top: 6px; border-top: 0; padding-top: 0; }
.secret-group-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.secret-group-head > b { font-size: 14px; }
.secret-list { display: flex; flex-direction: column; gap: 10px; }
.secret-row { padding: 10px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; background: var(--card-bg, #fff); }
.secret-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.secret-row-guide { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; line-height: 1.5; }
.secret-row-input { display: flex; gap: 8px; align-items: center; }
.secret-row-input input { flex: 1 1 auto; min-width: 0; }
.tenant-center-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tenant-center-box { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.tenant-center-box > b { font-size: 13px; }
.tenant-center-box input { width: 100%; }
.commerce-addr-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 8px; }
.commerce-addr-edit .addr-box { display: flex; flex-direction: column; gap: 4px; }
.commerce-addr-edit input { width: 100%; font-size: 12px; }
.commerce-addr-source { font-size: 11px; color: #6b7280; margin-left: 6px; }
.brand-text-form { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border, #e5e7eb); display: flex; flex-direction: column; gap: 10px; }
.brand-text-head { display: flex; flex-direction: column; gap: 2px; }
.brand-text-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.brand-text-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4b5563; }
.brand-text-grid input[type="text"] { width: 100%; }
.brand-text-grid input[type="color"] { width: 56px; height: 32px; padding: 0 2px; border: 1px solid var(--border, #e5e7eb); border-radius: 6px; background: #fff; }
.brand-text-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .brand-text-grid { grid-template-columns: 1fr; } }
/* 2026-08-18 API 키 세트(한 서비스 = 칸 여러 개 + 저장 1개) */
.secret-fields { display: grid; gap: 8px 12px; margin: 6px 0 8px; }
.secret-fields.cols-1 { grid-template-columns: 1fr; }
.secret-fields.cols-2 { grid-template-columns: 1fr 1fr; }
.secret-fields.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.secret-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #4b5563; min-width: 0; }
.secret-field > span { display: flex; justify-content: space-between; gap: 6px; }
.secret-field > span em { font-style: normal; font-size: 11px; }
.secret-field input { width: 100%; min-width: 0; }
.secret-set-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 860px) { .secret-fields.cols-2, .secret-fields.cols-3 { grid-template-columns: 1fr; } }

/* 2026-08-18 캔버스 블록(문답·구매 전 확인·장점·정보) — 흰/아이보리 배경 글자 상자는 PPT 텍스트 상자처럼
   평소엔 테두리·그림자 없이 글자만 보이고, 선택했을 때만 윤곽이 뜬다. */
.card-image-layer--text[data-background="#ffffff"],
.card-image-layer--text[data-background="#faf9f7"] { box-shadow: none; border-color: transparent; }
.card-image-layer--text[data-background="#ffffff"]:hover,
.card-image-layer--text[data-background="#faf9f7"]:hover { border-color: rgba(75, 91, 255, .35); }

/* 2026-08-18 글자 상자 'AI 다듬기' 팝오버 (홈 탭 서식 그룹) */
.board-layer-ai-btn { font-weight: 700; color: #4b5bff; border-color: rgba(75, 91, 255, .35); }
.board-layer-ai-btn:hover { background: rgba(75, 91, 255, .08); }
.board-layer-ai-pop { position: fixed; z-index: 1200; width: 360px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid rgba(15,23,42,.14); border-radius: 12px; box-shadow: 0 14px 38px rgba(15,23,42,.18); padding: 12px 14px 12px; font-size: 13px; color: #1e222a; }
.board-layer-ai-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.board-layer-ai-head b { font-size: 13px; }
.board-layer-ai-close { border: 0; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: #6b7280; padding: 0 4px; }
.board-layer-ai-orig { color: #6b7280; font-size: 12px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-layer-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.board-layer-ai-chip { border: 1px solid rgba(15,23,42,.16); background: #f8f9fb; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: #1e222a; }
.board-layer-ai-chip:hover { border-color: #4b5bff; color: #4b5bff; }
.board-layer-ai-chip.is-active { background: #4b5bff; border-color: #4b5bff; color: #fff; }
.board-layer-ai-chip:disabled { opacity: .55; cursor: default; }
.board-layer-ai-custom { display: flex; gap: 6px; margin-bottom: 8px; }
.board-layer-ai-custom input { flex: 1; min-width: 0; height: 32px; border: 1px solid rgba(15,23,42,.16); border-radius: 8px; padding: 0 10px; font-size: 12px; }
.board-layer-ai-result { border: 1px dashed rgba(75,91,255,.45); background: rgba(75,91,255,.05); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; white-space: pre-wrap; line-height: 1.45; }
.board-layer-ai-result.is-error { border-color: rgba(220,38,38,.45); background: rgba(220,38,38,.05); color: #b91c1c; }
.board-layer-ai-result.is-busy { border-style: solid; color: #4b5bff; }
.board-layer-ai-result-label { font-size: 11px; font-weight: 700; color: #4b5bff; margin-bottom: 3px; letter-spacing: .04em; }
.board-layer-ai-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 2026-08-18 게이트 카피 확인 — 헤드라인은 두 줄 textarea(줄바꿈 보존) */
.storyline-edit-row textarea.storyline-headline { font-weight: 700; font-size: 14px; line-height: 1.35; resize: vertical; min-height: 44px; }
