/*!*********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************/
/* ─────────────────────────────────────────────────────
   KGRC Design System — v2 (유기적 라이트 테마)
   폰트: Pretendard + Noto Sans KR
───────────────────────────────────────────────────── */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

/* ── 라이트 테마 (기본) ── */
:root {
  /* 베이스 팔레트 */
  --bg:             #f6f5f1;
  --bg-warm:        #f0ede6;
  --surface:        rgba(255, 255, 255, 0.75);
  --surface-s:      rgba(255, 255, 255, 0.94);
  --surface-muted:  #f2f1ed;

  /* 텍스트 */
  --text:           #1a1916;
  --text-2:         #57554c;
  --text-muted:     #9e9b92;
  --text-4:         #c8c5bc;

  /* 테두리 */
  --border:         rgba(0, 0, 0, 0.08);
  --border-strong:  rgba(0, 0, 0, 0.14);

  /* 액센트 — 하나만 */
  --primary:        #b84e2a;
  --primary-soft:   rgba(184, 78, 42, 0.08);
  --primary-mid:    rgba(184, 78, 42, 0.16);
  --primary-contrast: #ffffff;

  /* 상태 */
  --success:        #1c7a4a;
  --success-surface:rgba(28, 122, 74, 0.09);
  --success-text:   #1c7a4a;
  --success-border: rgba(28, 122, 74, 0.2);

  --warning:        #b06a00;
  --warning-surface:rgba(176, 106, 0, 0.09);
  --warning-text:   #b06a00;
  --warning-border: rgba(176, 106, 0, 0.2);

  --danger:         #c0392b;
  --danger-surface: rgba(192, 57, 43, 0.08);
  --danger-text:    #c0392b;
  --danger-border:  rgba(192, 57, 43, 0.18);

  /* info = primary 재활용 */
  --info-surface:   rgba(184, 78, 42, 0.08);
  --info-text:      #b84e2a;
  --info-border:    rgba(184, 78, 42, 0.18);

  /* 링크 */
  --link:           #b84e2a;
  --focus-ring:     rgba(184, 78, 42, 0.2);
  --focus-border:   rgba(184, 78, 42, 0.4);

  /* 반경 */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius:    var(--radius-md);

  /* 간격 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;

  /* 그림자 — 최소한으로 */
  --glass-soft-shadow:   0 1px 3px rgba(0,0,0,0.05);
  --glass-medium-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
  --glass-strong-shadow: 0 4px 20px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.05);

  /* glass */
  --glass-soft-bg:      var(--surface);
  --glass-medium-bg:    var(--surface-s);
  --glass-strong-bg:    #ffffff;
  --glass-soft-border:  var(--border);
  --glass-medium-border:var(--border);
  --glass-strong-border:var(--border-strong);

  /* 카드 */
  --card-border:       var(--border);
  --card-border-strong:var(--border-strong);
  --card-highlight:    rgba(255, 255, 255, 0.6);

  /* callout */
  --callout-bg:    rgba(184, 78, 42, 0.06);
  --callout-border:rgba(184, 78, 42, 0.15);
  --callout-label: var(--primary);

  /* mention */
  --mention-role-bg: rgba(184, 78, 42, 0.08);
  --mention-all-bg:  rgba(192, 57, 43, 0.08);

  /* 캘린더 */
  --calendar-event-text: var(--info-text);
  --table-actions-bg: rgba(246, 245, 241, 0.92);
  --editor-highlight-text: #1f2937;

  /* 모션 */
  --motion-fast: 120ms;
  --motion-base: 200ms;
  --motion-slow: 280ms;
  --motion-ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* 상태 */
  --pressed-scale: 0.975;
  --pressed-bg:    rgba(0, 0, 0, 0.06);
  --drag-over-bg:    rgba(184, 78, 42, 0.06);
  --drag-over-border:rgba(184, 78, 42, 0.3);
  --selected-bg:     rgba(184, 78, 42, 0.07);
  --selected-border: rgba(184, 78, 42, 0.25);
  --danger-hover-bg: rgba(192, 57, 43, 0.06);

  /* 사이드바 치수 */
  --rail-w:   48px;
  --flyout-w: 220px;

  /* 블러 */
  --blur: saturate(1.6) blur(20px);
}

/* ── 다크 테마 ── */
:root[data-theme="dark"] {
  --bg:             #111110;
  --bg-warm:        #191817;
  --surface:        rgba(28, 27, 25, 0.82);
  --surface-s:      rgba(30, 29, 27, 0.96);
  --surface-muted:  #242320;

  --text:           #eeece8;
  --text-2:         #a8a49c;
  --text-muted:     #6e6b63;
  --text-4:         #47453f;

  --border:         rgba(255, 255, 255, 0.07);
  --border-strong:  rgba(255, 255, 255, 0.13);

  --primary:        #b84e2a;
  --primary-soft:   rgba(184, 78, 42, 0.12);
  --primary-mid:    rgba(184, 78, 42, 0.22);
  --primary-contrast: #ffffff;

  --success:         #2ecc71;
  --success-surface: rgba(46, 204, 113, 0.1);
  --success-text:    #4ade80;
  --success-border:  rgba(46, 204, 113, 0.22);

  --warning:         #f59e0b;
  --warning-surface: rgba(245, 158, 11, 0.1);
  --warning-text:    #fbbf24;
  --warning-border:  rgba(245, 158, 11, 0.22);

  --danger:          #ef4444;
  --danger-surface:  rgba(239, 68, 68, 0.1);
  --danger-text:     #f87171;
  --danger-border:   rgba(239, 68, 68, 0.22);

  --info-surface:  rgba(184, 78, 42, 0.12);
  --info-text:     #b84e2a;
  --info-border:   rgba(184, 78, 42, 0.22);

  --link:          #b84e2a;
  --focus-ring:    rgba(184, 78, 42, 0.25);
  --focus-border:  rgba(184, 78, 42, 0.5);

  --glass-soft-shadow:   0 1px 3px rgba(0,0,0,0.3);
  --glass-medium-shadow: 0 2px 8px rgba(0,0,0,0.4);
  --glass-strong-shadow: 0 4px 20px rgba(0,0,0,0.5);

  --glass-soft-bg:     rgba(28, 27, 25, 0.75);
  --glass-medium-bg:   var(--surface-muted);
  --glass-strong-bg:   #1e1d1b;
  --glass-soft-border:  var(--border);
  --glass-medium-border:var(--border);
  --glass-strong-border:var(--border-strong);

  --card-border:       var(--border);
  --card-border-strong:var(--border-strong);
  --card-highlight:    rgba(255, 255, 255, 0.03);

  --callout-bg:    rgba(91, 127, 255, 0.1);
  --callout-border:rgba(91, 127, 255, 0.2);
  --callout-label: #7b9fff;

  --mention-role-bg: rgba(91, 127, 255, 0.12);
  --mention-all-bg:  rgba(239, 68, 68, 0.1);

  --calendar-event-text: #7b9fff;
  --table-actions-bg: rgba(17, 17, 16, 0.9);
  --editor-highlight-text: #111827;

  --pressed-bg:      rgba(255, 255, 255, 0.05);
  --drag-over-bg:    rgba(91, 127, 255, 0.08);
  --drag-over-border:rgba(91, 127, 255, 0.35);
  --selected-bg:     rgba(91, 127, 255, 0.1);
  --selected-border: rgba(91, 127, 255, 0.3);
  --danger-hover-bg: rgba(239, 68, 68, 0.08);
}

/* ── 페이지 진입 애니메이션 ── */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-root {
  animation: page-enter 0.18s ease both;
}

/* ── 전역 리셋 ── */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans, 'Noto Sans KR', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ── 앱 쉘 구조 ──
   기존 .workspace-shell(220px 사이드바)을 새 구조로 교체.
   JS로 hover 시 --flyout-w 추가됨.
──────────────────── */
.app-shell { min-height: 100vh; }

.workspace-shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns var(--motion-base) var(--motion-ease);
}

/* 사이드 레일 */
.app-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100vh;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13px 0 12px;
  gap: 2px;
  background: var(--bg-warm);
  border-right: 1px solid var(--border);
  overflow: visible;
}

/* 플라이아웃 — nav 호버 시 등장 */
.app-nav:hover .nav-flyout,
.nav-flyout:hover {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

.nav-flyout {
  position: absolute;
  left: var(--rail-w);
  top: 0;
  bottom: 0;
  width: calc(var(--flyout-w) + 8px);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-right: 1px solid var(--border);
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.07);
  transform: translateX(-10px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--motion-base) var(--motion-ease),
    opacity calc(var(--motion-base) - 20ms) ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
}

/* 메인 컨테이너 */
.container {
  max-width: none;
  margin: 0;
  padding: 24px 28px;
  background: var(--bg);
  height: 100vh;
  overflow-y: auto;
}

/* 내비 레일 아이콘 버튼 */
.nav-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.brand {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  margin-bottom: 10px;
  flex-shrink: 0;
  transition: transform 180ms ease, background 180ms;
  padding: 0;
}
.brand:hover { transform: scale(1.08); }

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.nav-link {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast), transform 120ms;
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
}
.nav-link:hover {
  background: rgba(0, 0, 0, 0.055);
  color: var(--text-2);
  transform: translateY(-1px);
  border-color: transparent;
}
.nav-link svg { width: 16px; height: 16px; stroke-width: 1.6; }

.nav-link-active {
  color: var(--primary) !important;
  background: transparent !important;
}
.nav-link-active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5px;
  height: 16px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

/* 레일 구분선 */
.nav-section-title {
  width: 18px;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
  font-size: 0; /* 텍스트 숨김 */
  overflow: hidden;
}

/* 알림 배지 */
.nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  border: 1.5px solid var(--bg-warm);
  font-size: 0;
}

/* 레일 하단 */
.nav-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: none;
}

/* ── 플라이아웃 내부 ── */
.nav-flyout-top {
  padding: 14px 12px 10px;
  flex-shrink: 0;
}

.nav-flyout-ws {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--motion-fast);
  margin: -5px -7px 10px;
}
.nav-flyout-ws:hover { background: rgba(0, 0, 0, 0.04); }

.nav-flyout-ws-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.nav-flyout-ws-name { font-size: 13px; font-weight: 600; color: var(--text); }
.nav-flyout-ws-sub  { font-size: 10.5px; color: var(--text-muted); margin-top: -1px; }

.nav-flyout-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  cursor: text;
  transition: background var(--motion-fast);
}
.nav-flyout-search:hover { background: rgba(0, 0, 0, 0.07); }
.nav-flyout-search svg { width: 12px; height: 12px; color: var(--text-4); stroke-width: 2; flex-shrink: 0; }
.nav-flyout-search-hint { font-size: 12px; color: var(--text-4); flex: 1 1; }
.nav-flyout-search-kbd {
  font-size: 9px; color: var(--text-4);
  border: 1px solid var(--text-4);
  border-radius: 3px; padding: 0 4px; opacity: 0.55;
}

.nav-flyout-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 18px 10px 10px;
  scrollbar-width: none;
}
.nav-flyout-body::-webkit-scrollbar { display: none; }

.nav-flyout-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 10px 4px;
}
.nav-flyout-section-label:first-child {
  padding-top: 0;
}

.nav-flyout-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: background var(--motion-fast), color var(--motion-fast), transform 120ms ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-flyout-item:hover { background: rgba(0, 0, 0, 0.05); color: var(--text); transform: translateX(1px); }
.nav-flyout-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(38, 83, 255, 0.08); }
.nav-flyout-item svg { width: 14px; height: 14px; flex-shrink: 0; stroke-width: 1.6; }
.nav-flyout-item-count {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-4);
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  padding: 0 5px;
  min-width: 18px;
  text-align: center;
  line-height: 17px;
}
.nav-flyout-item.active .nav-flyout-item-count {
  background: var(--primary-mid);
  color: var(--primary);
}

.nav-flyout-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.72);
}

/* ── 기존 호환 레거시 별칭 ──
   (기존 className을 쓰는 페이지들이 깨지지 않도록)
────────────────────────────── */
.nav-link-bell { position: relative; }
.nav-owner-toggle { font-size: 13px; }
.nav-bell-wrap { position: relative; display: inline-flex; }

.stack { display: grid; grid-gap: 18px; gap: 18px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 18px; gap: 18px; }
.three-grid { display: grid; grid-template-columns: 2fr 1fr; grid-gap: 18px; gap: 18px; }

/* ── Dashboard v2 ── */
.dashboard-root {
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 0 80px;
}

/* 인사 헤더 */
.dash-greeting { margin-bottom: 36px; }
.dash-greeting-date {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}
.dash-greeting-title {
  font-family: inherit;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--ink, var(--text));
  line-height: 1.2;
  margin: 0;
}
.dash-greeting-title em {
  font-style: normal;
}

/* 섹션 공통 */
.dash-section { margin-bottom: 32px; }
.dash-sec-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 12px;
  padding: 0 2px;
}
.dash-sec-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dash-sec-count {
  font-size: 11px;
  color: var(--text-4, var(--text-muted));
}
.dash-sec-more {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--motion-fast);
}
.dash-sec-more:hover { color: var(--primary); }

/* 바로 가기 칩 */
.dash-quick-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
  margin: 0 -2px;
}
.dash-quick-row::-webkit-scrollbar { display: none; }

.dash-quick-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 140ms ease, box-shadow 140ms ease, background 120ms;
  color: var(--text-2, var(--text-muted));
}
:root[data-theme="dark"] .dash-quick-chip {
  background: rgba(255,255,255,0.05);
}
.dash-quick-chip:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.09);
  color: var(--text);
}
:root[data-theme="dark"] .dash-quick-chip:hover {
  background: rgba(255,255,255,0.1);
}
.dash-quick-chip svg { flex-shrink: 0; }
.dash-quick-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.dash-quick-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 메인 그리드 */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-gap: 0 32px;
  gap: 0 32px;
  align-items: start;
}

.dash-main { min-width: 0; }
.dash-side {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-side-block {
  padding-bottom: 24px;
  margin-bottom: 8px;
}

/* 아이템 공통 */
.dash-item-list { display: flex; flex-direction: column; }
.dash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm, 6px);
  margin: 0 -10px;
  transition: background var(--motion-fast);
}
.dash-item:hover { background: rgba(0,0,0,0.035); }
.dash-item-link { cursor: pointer; text-decoration: none; }
.dash-item-body { flex: 1 1; min-width: 0; }
.dash-item-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* 달력 */
.dash-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 3px;
  gap: 3px;
  margin-bottom: 4px;
}
.dash-cal-wday {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-4, var(--text-muted));
  padding-bottom: 5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dash-cal-day {
  border-radius: var(--radius-sm, 6px);
  padding: 5px 4px 4px;
  min-height: 52px;
  cursor: pointer;
  transition: background 100ms;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-cal-day:hover { background: rgba(0,0,0,0.04); }
.dash-cal-day.today { background: var(--text); }
.dash-cal-num {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1;
}
.dash-cal-day.today .dash-cal-num { color: var(--bg, #f6f5f1); font-weight: 700; }
.dash-cal-event {
  font-size: 9.5px;
  color: var(--primary);
  background: var(--primary-soft, rgba(38,83,255,0.08));
  border-radius: 3px;
  padding: 1px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
.dash-cal-day.today .dash-cal-event {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}
.dash-cal-more {
  font-size: 9px;
  color: var(--text-muted);
}

/* 반응형 */
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { margin-top: 16px; }
  .dashboard-root { padding: 24px 0 60px; }
}
@media (max-width: 560px) {
  .dash-quick-sub { display: none; }
  .dashboard-root { padding: 18px 0 60px; }
}

/* 레거시 호환 */
.dashboard-stack { gap: 14px; }
.dashboard-calendar-first { width: 100%; }
.dashboard-compact { width: 100%; max-width: none; margin: 0; }
.dashboard-grid { align-items: stretch; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dashboard-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(280px, 1fr);
  grid-gap: 12px;
  gap: 12px;
  align-items: start;
}

.dashboard-side-stack {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.dashboard-calendar-card {
  min-height: 0;
}

.dashboard-mini-metrics .metric-value {
  font-size: 30px;
}

.metrics-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 40%, transparent));
  border-radius: 10px 10px 0 0;
  pointer-events: none;
}

.metric-card::after {
  display: block;
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent, color-mix(in srgb, var(--primary) 8%, transparent), transparent);
  transform: translateX(-100%);
  animation: sheen 5.6s ease-in-out infinite;
  pointer-events: none;
}

.metric-label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 13px; }
.metric-value { margin-top: 10px; font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.metric-sub { margin-top: 8px; color: var(--text-muted); font-size: 13px; }

.dashboard-compact .ui-card {
  box-shadow: none; padding: 12px 14px; }
.dashboard-compact .list-row { padding: 8px 0; }
.dashboard-compact .section-header { margin-bottom: 8px; }
.dashboard-compact .metric-value { font-size: 24px; }

.dashboard-fullscreen {
  height: calc(100vh - 120px);
  overflow: hidden;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.dashboard-fullscreen .page-header { margin-bottom: 0; }
.dashboard-fullscreen .page-header h1 { font-size: 24px; }
.dashboard-fullscreen .page-header p { margin-top: 4px; font-size: 13px; }

.dashboard-fullscreen .metrics-grid { min-height: 0; }

.dashboard-fullscreen .dashboard-grid {
  min-height: 0;
  overflow: hidden;
}

.dashboard-fullscreen .dashboard-grid > .ui-card {
  box-shadow: none;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-fullscreen .dashboard-grid > .ui-card .empty-state,
.dashboard-fullscreen .dashboard-grid > .ui-card .schedule-list,
.dashboard-fullscreen .dashboard-grid > .ui-card > .list-row,
.dashboard-fullscreen .dashboard-grid > .ui-card > .list-sub {
  min-height: 0;
}

.dashboard-fullscreen .dashboard-grid > .ui-card:nth-child(1) { grid-column: span 2; }

.dashboard-fullscreen .schedule-layout {
  min-height: 0;
}

.dashboard-fullscreen .schedule-list {
  overflow: auto;
}

.dashboard-fullscreen .calendar-cell {
  min-height: 58px;
}

.dashboard-fullscreen .calendar-event,
.dashboard-fullscreen .calendar-more {
  font-size: 10px;
  padding: 1px 6px;
}

.dashboard-fullscreen .dashboard-grid > .ui-card:not(:first-child) {
  overflow: hidden;
}

.dashboard-fullscreen .dashboard-grid > .ui-card:not(:first-child) > :not(.section-header) {
  overflow: auto;
}

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(220px, 0.7fr);
  grid-gap: 14px;
  gap: 14px;
}

.schedule-layout-expanded {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  align-items: start;
}

.calendar-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-gap: 6px;
  gap: 6px;
}

.calendar-weekday {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}

.calendar-cell {
  min-height: clamp(92px, 10vh, 118px);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  padding: 6px;
  display: grid;
  grid-gap: 5px;
  gap: 5px;
  align-content: start;
}

.calendar-cell.muted {
  opacity: 0.5;
}

.calendar-cell.today {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface-muted));
}

.calendar-day {
  font-size: 12px;
  font-weight: 700;
}

.calendar-events {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.calendar-event,
.calendar-more {
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-event {
  background: var(--primary-soft);
  color: var(--text);
}

.calendar-more {
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.schedule-list {
  min-width: 0;
  max-height: 100%;
  overflow: auto;
}

.slide-in { animation: slideIn .3s ease-out both; }
.pulse-in { animation: pulseIn .4s ease both; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseIn {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes sheen {
  0%, 25% { transform: translateX(-105%); }
  55%, 100% { transform: translateX(105%); }
}

/* ── Card ── */
.ui-card {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--glass-soft-shadow);
  transition:
    background-color var(--motion-base) var(--motion-ease),
    border-color var(--motion-base) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
}
:root[data-theme="dark"] .ui-card {
  background: rgba(28, 27, 25, 0.72);
}
.ui-card:hover {
  box-shadow: var(--glass-medium-shadow);
}

.ui-card-strong {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--border-strong);
  box-shadow: var(--glass-medium-shadow);
}
:root[data-theme="dark"] .ui-card-strong {
  background: rgba(30, 29, 27, 0.94);
}

.ui-card-soft {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--border);
  box-shadow: none;
}
:root[data-theme="dark"] .ui-card-soft {
  background: rgba(255, 255, 255, 0.02);
}
.card-list { display: grid; grid-gap: 12px; gap: 12px; }

.projects-compact-wrap {
  max-width: 1080px;
  margin: 0 auto;
}

.projects-compact-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-list-card {
  padding: 14px 16px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.project-list-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
/* ── List Row ── */
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  margin: 0 -10px;
  transition: background var(--motion-fast) var(--motion-ease);
}
.list-row:hover { background: rgba(0, 0, 0, 0.035); }
a.list-row { cursor: pointer; }
a.list-row:hover { background: rgba(0, 0, 0, 0.035); }
.list-title { font-weight: 500; font-size: 13.5px; color: var(--text); line-height: 1.45; margin-bottom: 1px; }
.list-sub { color: var(--text-muted); font-size: 12px; }

/* ── Page Header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.page-header h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}
.page-header p { margin: 6px 0 0; color: var(--text-muted); font-size: 13px; }
.page-meta { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-actions { display: flex; gap: 8px; padding-top: 4px; }

/* ── 콘텐츠 워크스페이스 Pill 탭 ── */
.project-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  width: -moz-fit-content;
  width: fit-content;
  margin-bottom: 24px;
}
.project-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
}
.project-tab:hover { color: var(--text); }
.project-tab-active {
  background: var(--surface-s);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
}

/* ── 프로젝트 워크스페이스 쉘 ── */
.pw-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: -24px -28px;
  overflow: hidden;
}
.pw-tab-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.pw-tab-strip .project-tabs {
  margin-bottom: 0;
}

/* 보조 탭 */
.pw-secondary-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--border-strong);
}
.pw-secondary-tab {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 130ms ease;
  white-space: nowrap;
}
.pw-secondary-tab:hover { color: var(--text); background: rgba(0,0,0,0.04); }
:root[data-theme="dark"] .pw-secondary-tab:hover { background: rgba(255,255,255,0.06); }
.pw-secondary-tab-active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

/* 페이지 콘텐츠 영역 */
.pw-content {
  flex: 1 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.pw-page { /* 각 페이지 루트 div */ }

/* 개요 페이지 헤더 */
.pw-overview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.pw-overview-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 4px;
}

/* ── 개요 탭 그리드 ── */
.ov-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
}
.ov-card {
  background: var(--surface-s);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ov-card-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.ov-synopsis-card {
  grid-column: 1 / -1;
}
.ov-synopsis-preview {
  white-space: pre-line;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 12px;
}
.ov-synopsis-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.ov-synopsis-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}
.ov-synopsis-link:hover { text-decoration: underline; }
.ov-synopsis-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: end;
}
.ov-synopsis-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.ov-synopsis-participant-details {
  grid-column: 1 / -1;
}
.ov-synopsis-participant-details textarea {
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}
.ov-synopsis-message,
.ov-synopsis-empty {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* 스텝 바 */
.ov-steps-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.ov-step {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  gap: 4px;
  position: relative;
  transition: background 120ms ease;
}
.ov-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; height: 60%; width: 1px;
  background: var(--border);
}
.ov-step.done  { background: var(--success-surface); }
.ov-step.current { background: var(--primary-soft); }
.ov-step-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; margin-bottom: 2px;
}
.ov-step.done .ov-step-icon    { background: var(--success-surface); color: var(--success); }
.ov-step.current .ov-step-icon { background: var(--primary-soft);    color: var(--primary); }
.ov-step.pending .ov-step-icon { background: rgba(0,0,0,0.04);       color: var(--text-4);  }
.ov-step-name { font-size: 11.5px; font-weight: 600; }
.ov-step.done .ov-step-name    { color: var(--success); }
.ov-step.current .ov-step-name { color: var(--primary); }
.ov-step.pending .ov-step-name { color: var(--text-4);  }
.ov-step-sub { font-size: 10.5px; color: var(--text-muted); }

/* 멤버 */
.ov-member-list { display: flex; flex-direction: column; gap: 10px; }
.ov-member-row  { display: flex; align-items: center; gap: 10px; }
.ov-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-muted); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-2); flex-shrink: 0;
}
.ov-member-name { font-size: 13px; font-weight: 500; color: var(--text); }
.ov-member-role { font-size: 11px; color: var(--text-muted); margin-left: auto; }

/* 제작 요청 미니 카드 */
.ov-req-stats  { display: flex; gap: 10px; margin-bottom: 14px; }
.ov-req-stat   { flex: 1 1; padding: 10px 12px; border-radius: var(--radius-md); text-align: center; }
.ov-req-stat.inprog { background: var(--warning-surface); }
.ov-req-stat.done   { background: var(--success-surface); }
.ov-req-stat-n     { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.ov-req-stat-label { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.ov-req-list { display: flex; flex-direction: column; gap: 6px; }
.ov-req-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
  font-size: 12.5px; color: var(--text-2);
  cursor: pointer; transition: background 100ms; text-decoration: none;
}
.ov-req-item:hover { background: rgba(0,0,0,0.05); }
.ov-req-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* 문서 */
.ov-doc-list { display: flex; flex-direction: column; gap: 6px; }
.ov-doc-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; background: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: background 100ms; text-decoration: none;
}
.ov-doc-item:hover { background: rgba(0,0,0,0.05); }
.ov-doc-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.ov-doc-name { font-size: 12.5px; font-weight: 500; color: var(--text); }
.ov-doc-sub  { font-size: 11px; color: var(--text-muted); }
.ov-doc-arrow { margin-left: auto; color: var(--text-4); }

/* 작업 탭 요청 섹션 */
.req-type-section { display: flex; flex-direction: column; gap: 8px; }
.req-type-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-s);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.req-type-left  { display: flex; align-items: center; gap: 10px; }
.req-type-icon  {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.req-type-name  { font-size: 13.5px; font-weight: 600; color: var(--text); }
.req-type-desc  { font-size: 11.5px; color: var(--text-muted); }
.req-type-count {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 99px;
  background: var(--surface-muted); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--text-muted);
}
.req-add-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 99px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid rgba(38,83,255,0.18); cursor: pointer;
  transition: all 130ms ease;
}
.req-add-btn:hover { background: var(--primary-mid); }
.req-items { display: flex; flex-direction: column; gap: 6px; padding-left: 4px; }
.req-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--surface-s); border: 1px solid var(--border);
  border-radius: var(--radius-md); cursor: pointer; transition: all 130ms ease;
}
.req-item:hover { border-color: var(--border-strong); box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.req-item.selected { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); }
.req-item-left  { flex: 1 1; min-width: 0; }
.req-item-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-item-sub   { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; display: flex; gap: 8px; }
.req-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 슬라이드오버 */
.slideover-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.15); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  z-index: 50; opacity: 0; pointer-events: none; transition: opacity 200ms ease;
}
.slideover-overlay.open { opacity: 1; pointer-events: all; }
.slideover {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 90vw;
  background: var(--surface-s); border-left: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 60; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.4,0,0.2,1);
}
.slideover.open { transform: translateX(0); }
.slideover-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.slideover-icon  { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.slideover-title { font-size: 14px; font-weight: 700; color: var(--text); }
.slideover-sub   { font-size: 11.5px; color: var(--text-muted); }
.slideover-close {
  margin-left: auto; width: 28px; height: 28px; border-radius: 7px;
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  transition: background 120ms;
}
.slideover-close:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.slideover-body   { flex: 1 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.slideover-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; }

/* 작업 레일 */
.req-rail {
  width: 220px; flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-muted) 60%, var(--bg));
  overflow-y: auto; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.rail-section-title {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 10px;
}
.rail-stat-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 6px; gap: 6px; }
.rail-stat {
  padding: 10px 8px; border-radius: var(--radius-md);
  border: 1px solid var(--border); text-align: center; background: var(--surface-s);
}
.rail-stat.warn { background: var(--warning-surface); border-color: rgba(176,106,0,0.15); }
.rail-stat.ok   { background: var(--success-surface); border-color: rgba(28,122,74,0.15); }
.rail-stat-n     { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1; }
.rail-stat-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.rail-due-list { display: flex; flex-direction: column; gap: 7px; }
.rail-due-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface-s); border: 1px solid var(--border);
}
.rail-due-title { font-size: 12px; font-weight: 500; color: var(--text); }
.rail-due-date  { font-size: 11px; color: var(--warning); font-weight: 600; }

/* ── Section Header ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  grid-gap: 0;
  gap: 0;
  border: 1px solid var(--card-border-strong);
  border-radius: var(--radius-xl);
  background: var(--glass-strong-bg);
  box-shadow: var(--glass-medium-shadow);
  overflow: hidden;
}

.workspace-main {
  padding: 18px 20px;
  border-right: 1px solid var(--border);
  background: var(--glass-strong-bg);
}

.workspace-rail {
  padding: 14px;
  background: color-mix(in srgb, var(--surface-muted) 55%, var(--bg));
  display: grid;
  align-content: start;
  grid-gap: 12px;
  gap: 12px;
}

/* ── Surface Sections ── */
.surface-section {
  padding: 20px 0;
}
.surface-section:first-child {
  padding-top: 0;
}

.surface-block {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--glass-soft-shadow);
}
:root[data-theme="dark"] .surface-block {
  background: rgba(28, 27, 25, 0.72);
}

.workspace-list {
  display: flex;
  flex-direction: column;
}
.workspace-list .list-row {
  margin: 0 -10px;
}

.workspace-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.workspace-list {
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.workspace-list .list-row {
  margin: 0;
}

@media (max-width: 1320px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .workspace-main {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

/* ── Section Header 타이포 ── */
.section-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.section-header p { margin: 2px 0 0; color: var(--text-muted); font-size: 12.5px; }

/* ── Action Bar ── */
.action-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  gap: 5px;
  line-height: 1;
  white-space: nowrap;
  transition:
    background var(--motion-fast) var(--motion-ease),
    border-color var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) var(--motion-ease),
    transform 120ms ease,
    box-shadow 120ms ease;
}
.btn:active:not(:disabled) {
  transform: scale(var(--pressed-scale));
}
.btn-icon { flex-shrink: 0; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 1px 4px rgba(0,0,0,0.16);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--text) 88%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}

.btn-secondary {
  background: rgba(255,255,255,0.85);
  border-color: var(--border);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: #fff;
  border-color: var(--border-strong);
}
:root[data-theme="dark"] .btn-secondary {
  background: rgba(255,255,255,0.06);
}
:root[data-theme="dark"] .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-2);
}
:root[data-theme="dark"] .btn-ghost:hover {
  background: rgba(255,255,255,0.06);
}

.btn-danger {
  background: rgba(255,255,255,0.85);
  border-color: var(--danger-border);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-surface);
  border-color: var(--danger);
}

/* accent 버튼 — 프라이머리 색상 강조 */
.btn-accent {
  background: linear-gradient(135deg, var(--primary) 0%, #4f72ff 100%);
  color: var(--primary-contrast, #fff);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(38, 83, 255, 0.28), 0 0 0 0 rgba(38, 83, 255, 0);
  transition:
    background var(--motion-fast) var(--motion-ease),
    transform 120ms ease,
    box-shadow var(--motion-base) ease;
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(38, 83, 255, 0.35), 0 0 0 3px rgba(38, 83, 255, 0.1);
}
.btn-accent:active:not(:disabled) {
  transform: scale(0.97) translateY(0);
  box-shadow: 0 1px 4px rgba(38, 83, 255, 0.2);
}
:root[data-theme="dark"] .btn-accent {
  background: linear-gradient(135deg, #5b7fff 0%, #7b9fff 100%);
  box-shadow: 0 2px 8px rgba(91, 127, 255, 0.3);
}
:root[data-theme="dark"] .btn-accent:hover {
  box-shadow: 0 4px 18px rgba(91, 127, 255, 0.4), 0 0 0 3px rgba(91, 127, 255, 0.15);
}

/* ── Form Fields ── */
.ui-input, .ui-textarea, .ui-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text);
  background: rgba(255,255,255,0.85);
  font-family: inherit;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}
:root[data-theme="dark"] .ui-input,
:root[data-theme="dark"] .ui-textarea,
:root[data-theme="dark"] .ui-select {
  background: rgba(255,255,255,0.04);
}
.ui-input, .ui-select { min-height: 36px; }
.ui-textarea { min-height: 96px; resize: vertical; }
.ui-input:focus, .ui-textarea:focus, .ui-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ── Badge ── */
.ui-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  border-radius: 20px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
}
.ui-badge.info    { background: var(--info-surface);    color: var(--info-text);    border-color: var(--info-border); }
.ui-badge.success { background: var(--success-surface); color: var(--success-text); border-color: var(--success-border); }
.ui-badge.warning { background: var(--warning-surface); color: var(--warning-text); border-color: var(--warning-border); }
.ui-badge.danger  { background: var(--danger-surface);  color: var(--danger-text);  border-color: var(--danger-border); }
.ui-badge.muted   { color: var(--text-muted); background: transparent; }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  gap: 4px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border);
}
.empty-state-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--text); }
.empty-state p  { margin: 0 0 14px; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }

.form-row { display:grid; grid-gap:6px; gap:6px; margin-bottom:12px; font-size:13px; color:var(--text-muted); }
.form-row > span { font-weight: 600; color: var(--text); }
.form-section h3 { margin: 0 0 12px; font-size: 17px; }

.editor-shell { display:grid; grid-template-columns: minmax(0,1fr) 320px; grid-gap:18px; gap:18px; }
.editor-topbar { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom: 12px; }
.editor-main { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:18px 22px; }
.editor-main .tiptap { min-height: 58vh; line-height:1.75; color: var(--text); }
.editor-side { display:grid; grid-gap:12px; gap:12px; align-content:start; }

.status-line { color: var(--text-muted); font-size: 13px; display:flex; align-items:center; gap:8px; }
.profile-menu { position: relative; }
.profile-menu[open] .profile-menu-trigger { background: var(--surface); color: var(--text); }
.profile-menu-trigger {
  position: relative;
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 100%;
  height: 34px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 8px;
}
.profile-menu-username {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1;
  min-width: 0;
}
.profile-notif-badge {
  position: absolute;
  top: -2px;
  right: 4px;
}
.profile-menu-trigger:hover { background: var(--surface); color: var(--text); }
.profile-menu-trigger::-webkit-details-marker { display: none; }
.profile-menu-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 180px;
  border-radius: var(--radius-sm);
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--surface-muted);

  box-shadow: var(--glass-medium-shadow);
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  z-index: 60;
}
.nav-flyout-footer .profile-menu {
  width: 100%;
}
.nav-flyout-footer .profile-menu-panel {
  right: 0;
  left: auto;
  bottom: calc(100% + 8px);
}
.profile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
  font-size: 13px;
}
.profile-menu-panel .btn { justify-content: flex-start; }
.profile-menu-notifications {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.help-text { font-size: 13px; color: var(--text-muted); }

@media (max-width: 1220px) {
  .projects-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .workspace-shell { grid-template-columns: 1fr; }
  .app-nav { position: static; height: auto; padding: 12px 12px 0; }
  .top-shell { height: auto; }
  .nav-inner { grid-template-rows: auto auto auto; }
  .grid, .three-grid, .editor-shell, .metrics-grid, .projects-compact-grid, .schedule-layout, .dashboard-grid, .dashboard-main-layout { grid-template-columns: 1fr; }
  .container { padding: 16px; }
  .page-header { flex-direction: column; }
  .dashboard-fullscreen { height: auto; overflow: visible; grid-template-rows: none; }
}

.document-route-shell {
  min-height: 100vh;
  background: var(--bg);
  animation: top-shell-route-fade 180ms ease-out;
}

.auth-route-shell {
  min-height: 100vh;
  background: var(--bg);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 34px);
}

.login-panel {
  width: min(520px, 100%);
  padding: clamp(22px, 2.8vw, 30px);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
:root[data-theme="dark"] .login-panel {
  background: rgba(28,27,25,0.82);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.login-brand-block {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 18px;
}

.login-brand-block h1 {
  margin: 0;
  font-family: inherit;
  font-style: normal;
  font-size: clamp(30px, 4.2vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.login-brand-block p {
  margin: 0;
  color: var(--text-muted);
}

.login-form .form-row { margin-bottom: 10px; }

.login-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.login-error {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--border));
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  padding: 10px 12px;
  font-size: 13px;
}

.management-grid {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.list-soft-stack {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.document-page-layout {
  display: block;
}

.document-page-main {
  min-width: 0;
}

.doc-mode { min-height: 100vh; display: flex; flex-direction: column; position: relative; background: var(--bg); }

.doc-topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 8px;
  z-index: 30;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px auto 0;
  padding: 6px 8px;
  width: min(1280px, calc(100% - 24px));
  max-width: none;
  align-self: center;
  transform-origin: top center;
  animation: top-shell-expand-in 220ms cubic-bezier(0.2, 0.75, 0.25, 1);
  overflow: hidden;
}

.doc-topbar-editable {
  padding: 6px 10px;
}

.doc-topbar-compact {
  width: auto;
  max-width: 420px;
  margin-inline: auto;
  padding: 4px 8px;
}

.doc-topbar-side {
  min-width: 72px;
  display: flex;
  align-items: center;
}

.doc-topbar-side-start { justify-content: flex-start; }
.doc-topbar-side-end { justify-content: flex-end; }

.doc-toolbar-status { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; }
.doc-toolbar-status .badge { padding: 6px; min-width: auto; }
.doc-mode-toggle-btn { border-color: var(--border); background: var(--surface-muted); }

.doc-save-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.doc-save-status-icon.tone-info { color: #60a5fa; }
.doc-save-status-icon.tone-success { color: #22c55e; }
.doc-save-status-icon.tone-danger { color: #f87171; }
.doc-save-status-icon.tone-warning { color: #f59e0b; }
.doc-save-status-icon.tone-muted { color: var(--text-muted); }

.doc-updated-tooltip-wrap { position: relative; display: inline-flex; align-items: center; }
.doc-updated-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  color: var(--text-muted);
  box-shadow: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 100;
}

.doc-updated-tooltip-wrap:hover .doc-updated-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.doc-back-btn {
  width: 34px;
  height: 34px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.doc-back-btn:hover { background: color-mix(in srgb, var(--surface) 82%, transparent); }

.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1;
  overflow-x: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 170ms ease-out 40ms, transform 170ms ease-out 40ms;
}

.doc-toolbar[data-toolbar-visibility='entering'] {
  opacity: 0;
  transform: translateY(-6px);
}

.toolbar-group { display: flex; align-items: center; gap: 4px; padding-right: 8px; margin-right: 2px; border-right: 1px solid var(--border); }
.toolbar-group:last-child { border-right: 0; }

.doc-toolbar[data-toolbar-visibility='entering'] .toolbar-group {
  opacity: 0;
  transform: translateY(-4px);
  animation: doc-toolbar-group-in 150ms ease-out forwards;
}

.doc-toolbar[data-toolbar-visibility='entering'] .toolbar-group:nth-child(1) { animation-delay: 35ms; }
.doc-toolbar[data-toolbar-visibility='entering'] .toolbar-group:nth-child(2) { animation-delay: 55ms; }
.doc-toolbar[data-toolbar-visibility='entering'] .toolbar-group:nth-child(3) { animation-delay: 75ms; }
.doc-toolbar[data-toolbar-visibility='entering'] .toolbar-group:nth-child(4) { animation-delay: 95ms; }
.doc-toolbar[data-toolbar-visibility='entering'] .toolbar-group:nth-child(5) { animation-delay: 115ms; }
.doc-toolbar[data-toolbar-visibility='entering'] .toolbar-group:nth-child(6) { animation-delay: 135ms; }

.tool-btn {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tool-btn:hover { background: var(--surface-muted); border-color: var(--border); }
.tool-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.tool-select {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  padding: 0 8px;
}

.tool-select-font { min-width: 148px; }
.tool-select-size { min-width: 82px; }

.tool-size-wrap { display: inline-flex; align-items: center; gap: 4px; }
.tool-size-btn { font-size: 16px; line-height: 1; }

.tool-color-popover-wrap { position: relative; }
.tool-color-trigger {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  cursor: pointer;
}

.tool-color-trigger.doc-icon-btn {
  padding: 0;
}

.tool-color-popover {
  position: absolute;
  top: 36px;
  left: 0;
  width: 164px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
  padding: 8px;
  z-index: 2;
}

.tool-color-popover-floating {
  position: fixed;
  z-index: 90;
}

.tool-color-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-gap: 6px; gap: 6px; margin-bottom: 8px; }
.tool-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.tool-color-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.tool-color-custom input[type="color"] { width: 24px; height: 24px; border: 0; background: transparent; }

.toolbar-group-width { gap: 6px; }
.tool-width-label { font-size: 12px; color: var(--text-muted); }

.doc-workspace {
  flex: 1 1;
  overflow: auto;
  overflow-x: hidden;
  background: var(--bg);
  padding: 74px 20px 64px;
}

.doc-layout-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(180px, 220px);
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
}

.doc-left-panel {
  position: -webkit-sticky;
  position: sticky;
  top: 82px;
}

.doc-center-stack {
  min-height: calc(100vh - 142px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  max-width: 1360px;
  width: 100%;
  justify-self: center;
}

.doc-right-balancer { min-height: 1px; }

.doc-right-panel {
  position: -webkit-sticky;
  position: sticky;
  top: 82px;
}

@media (max-width: 1540px) {
  .doc-layout-grid {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  }

  .doc-right-panel,
  .doc-right-balancer {
    grid-column: 1 / -1;
  }

  .doc-right-panel {
    position: static;
  }
}

.structured-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 10px;
}

.structured-panel h3 {
  margin: 0;
  font-size: 16px;
}

.structured-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.structured-add-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
}

.structured-add-btn:hover {
  border: 0;
  color: var(--text);
}

.basic-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 10px;
  gap: 10px;
}

.basic-info-grid label {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.basic-info-grid input {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 10px;
}

.structured-fields {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.structured-fields label,
.character-card label {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.structured-fields textarea,
.character-card textarea,
.character-card input {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
}

.structured-fields textarea,
.character-card textarea {
  min-height: 76px;
  resize: vertical;
}

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

.character-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 10px;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}
.doc-title-input {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: center;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  color: var(--text);
  padding: 2px 12px 20px;
  margin-bottom: 8px;
}

.doc-title-input:focus { outline: none; border-bottom: 1px solid var(--border); }

.doc-page-canvas {
  width: 100%;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  min-height: 1260px;
  padding: 58px 68px 92px;
}

.doc-page-canvas[data-width="narrow"] { max-width: 920px; margin-inline: auto; }
.doc-page-canvas[data-width="default"] { max-width: 1120px; margin-inline: auto; }
.doc-page-canvas[data-width="wide"] { max-width: 1200px; margin-inline: auto; }

.doc-page-canvas .tiptap {
  min-height: 980px;
  outline: none;
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: -0.01em;
}

.doc-page-canvas .tiptap p { margin: 0 0 0.92em; }
.doc-page-canvas .tiptap h1 { font-size: 2.15rem; margin: 1.4em 0 0.46em; line-height: 1.14; letter-spacing: -0.04em; }
.doc-page-canvas .tiptap h2 { font-size: 1.56rem; margin: 1.28em 0 0.42em; line-height: 1.2; letter-spacing: -0.03em; }
.doc-page-canvas .tiptap h3 { font-size: 1.2rem; margin: 1.18em 0 0.38em; line-height: 1.28; letter-spacing: -0.02em; }
.doc-page-canvas .tiptap ul,
.doc-page-canvas .tiptap ol { padding-left: 1.4em; margin: 0.7em 0 1.1em; }
.doc-page-canvas .tiptap a { color: var(--link); text-decoration: underline; }
.doc-page-canvas .tiptap mark {
  color: var(--editor-highlight-text);
  border-radius: 4px;
  padding: 0 0.1em;
}
.doc-page-canvas .tiptap img { max-width: 100%; margin: 1.2em 0; border: 1px solid var(--border); }
.doc-page-canvas .tiptap:focus { outline: none; }
.doc-page-canvas .tiptap.ProseMirror-focused { box-shadow: none; }

.doc-mode.doc-view-mode .doc-page-canvas .tiptap {
  cursor: default;
}

.doc-mode.doc-view-mode .doc-title-input,
.doc-mode.doc-view-mode .basic-info-grid input,
.doc-mode.doc-view-mode .structured-fields textarea,
.doc-mode.doc-view-mode .character-card input,
.doc-mode.doc-view-mode .character-card textarea {
  cursor: default;
}

.mention-input-wrap {
  position: relative;
}

.mention-popover {
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  position: absolute;
  top: calc(100% - 10px);
  left: 0;
  z-index: 40;
  width: min(320px, 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  box-shadow: var(--glass-medium-shadow);
  max-height: min(280px, 45vh);
  overflow-x: hidden;
  overflow-y: auto;
}

.mention-popover-floating {
  position: fixed;
  width: 280px;
}

.mention-popover-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.role-tag-badge {
  --role-badge-bg: color-mix(in srgb, var(--surface-muted) 78%, transparent);
  --role-badge-border: var(--glass-soft-border);
  --role-badge-text: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--role-badge-bg);
  border: 1px solid var(--role-badge-border);
  color: var(--role-badge-text);
  line-height: 1;
  white-space: nowrap;
}

.mention-role-inline {
  width: 100%;
}

.mention-item-icon {
  width: 24px;
  text-align: center;
}

.mention-item-main {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.mention-item-main small {
  opacity: 0.72;
  font-size: 11px;
}

.mention-popover-item:hover,
.mention-popover-item.active {
  background: color-mix(in srgb, var(--surface-muted) 70%, transparent);
}

.mention-token {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.94em;
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
  border: 1px solid var(--border);
}

.mention-token.mention-role {
  background: var(--role-badge-bg, color-mix(in srgb, var(--surface-muted) 72%, transparent));
  border-color: var(--role-badge-border, var(--glass-soft-border));
  color: var(--role-badge-text, var(--text));
}

.mention-role-longform_planning,
.mention-role-shortform_planning {
  --role-badge-bg: rgba(167, 139, 250, 0.18);
  --role-badge-border: rgba(167, 139, 250, 0.42);
  --role-badge-text: #4c1d95;
}

.mention-role-command,
.mention-role-datapack,
.mention-role-plugin,
.mention-role-modding {
  --role-badge-bg: rgba(96, 165, 250, 0.18);
  --role-badge-border: rgba(96, 165, 250, 0.4);
  --role-badge-text: #1e40af;
}

.mention-role-resource_2d,
.mention-role-modeling_3d,
.mention-role-soundpack,
.mention-role-building {
  --role-badge-bg: rgba(74, 222, 128, 0.18);
  --role-badge-border: rgba(74, 222, 128, 0.42);
  --role-badge-text: #166534;
}

.mention-role-cpm,
.mention-role-animation,
.mention-role-skin {
  --role-badge-bg: rgba(251, 146, 60, 0.18);
  --role-badge-border: rgba(251, 146, 60, 0.42);
  --role-badge-text: #9a3412;
}

.mention-role-broadcast,
.mention-role-voice_actor,
.mention-role-support_cast {
  --role-badge-bg: rgba(244, 114, 182, 0.18);
  --role-badge-border: rgba(244, 114, 182, 0.42);
  --role-badge-text: #9f1239;
}

.chat-mention-token {
  margin: 0 1px;
  vertical-align: baseline;
}

.mention-user-token,
.mention-global-token {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-muted) 74%, transparent);
  font-size: 0.92em;
}

.document-missing { padding: 28px; color: var(--text); }

@media (max-width: 1320px) {
  .dashboard-main-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .doc-topbar {
    margin: 8px 12px 0;
    top: 6px;
    padding: 6px 8px;
  }
  .doc-toolbar { gap: 6px; }
  .doc-layout-grid {
    grid-template-columns: 1fr;
  }
  .doc-left-panel {
    position: static;
  }
  .doc-right-panel {
    position: static;
  }
  .doc-right-balancer {
    display: none;
  }
  .doc-page-canvas,
  .doc-page-canvas[data-width="narrow"],
  .doc-page-canvas[data-width="default"],
  .doc-page-canvas[data-width="wide"] {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding: 56px 34px 68px;
    min-height: 1020px;
  }
  .doc-topbar-side { min-width: 40px; }
}

@media (max-width: 900px) {
  .doc-toolbar-status {
    display: none;
  }
}

@media (max-width: 1320px) {
  .doc-toolbar {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.doc-page-canvas .tiptap hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.4em 0;
}

.doc-page-canvas .tiptap ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0.4em;
}

.doc-page-canvas .tiptap ul[data-type="taskList"] li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.doc-page-canvas .tiptap .editor-callout {
  border: 1px solid var(--callout-border);
  background: var(--callout-bg);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 1em 0 1.2em;
}

.editor-callout-label {
  font-size: 12px;
  color: var(--callout-label);
  font-weight: 700;
  margin-bottom: 6px;
}

.doc-page-canvas .tiptap details.editor-toggle {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0.9em 0 1.2em;
  background: var(--surface-muted);
}

.editor-toggle-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.editor-toggle-content {
  margin-top: 10px;
}

.doc-page-canvas .tiptap .editor-file-card,
.doc-page-canvas .tiptap .editor-link-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  padding: 12px 14px;
  margin: 1em 0;
}

.editor-file-title,
.editor-link-title { font-weight: 600; color: var(--text); }
.editor-file-meta,
.editor-link-description { font-size: 13px; color: var(--text-muted); margin-top: 4px; margin-bottom: 6px; }

.doc-page-canvas .tiptap table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0 1.2em;
}

.doc-page-canvas .tiptap th,
.doc-page-canvas .tiptap td {
  border: 1px solid var(--border);
  padding: 8px;
  vertical-align: top;
}

.doc-page-canvas .tiptap th {
  background: var(--surface-muted);
  font-weight: 600;
}

.slash-menu {
  position: fixed;
  width: 280px;
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: none;
  padding: 6px;
  z-index: 80;
}

.slash-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.slash-menu-item small {
  font-size: 11px;
  color: var(--text-muted);
}

.slash-menu-item.is-active,
.slash-menu-item:hover {
  background: var(--surface-muted);
}

.tool-popover-wrap {
  position: relative;
}

.table-insert-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 45;
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 10px;
  box-shadow: none;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.table-insert-popover p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.table-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 6px;
  gap: 6px;
}

.table-custom-size {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  grid-gap: 6px;
  gap: 6px;
  align-items: end;
}

.table-custom-size label {
  font-size: 12px;
  color: var(--text-muted);
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.table-custom-size input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  padding: 6px;
}

.upload-status-chip {
  font-size: 12px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
}

.table-actions {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);

}

.table-actions .tool-btn {
  width: auto;
  padding: 0 10px;
}

@keyframes top-shell-expand-in {
  from {
    width: min(460px, calc(100vw - 36px));
    opacity: 0.9;
    transform: translateY(-2px);
  }
  to {
    width: min(1320px, calc(100vw - 36px));
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes doc-toolbar-group-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes top-shell-route-fade {
  from { opacity: 0.96; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .top-shell,
  .doc-topbar,
  .doc-toolbar,
  .doc-toolbar[data-toolbar-visibility='entered'] .toolbar-group,
  .document-route-shell {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.status-line { display:flex; gap:8px; align-items:center; flex-wrap: wrap; }
.dropzone {
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
  padding: 18px;
  text-align: center;
}
.dropzone.dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.file-grid-preview { display:grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); grid-gap:10px; gap:10px; }
.file-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border:1px solid var(--border); }

.calendar-event,
.ui-badge.info {
  color: var(--calendar-event-text);
  border-color: var(--info-border);
}

.btn-danger {
  background: var(--danger-surface);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.doc-page-canvas .tiptap .editor-callout {
  background: var(--callout-bg);
  border-color: var(--callout-border);
}

.editor-callout-label,
.doc-page-canvas .tiptap a {
  color: var(--callout-label);
}

.table-actions {
  background: var(--table-actions-bg);
}

.mention-role { background: var(--mention-role-bg); }
.mention-all { background: var(--mention-all-bg); }

.profile-discord-card {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.profile-discord-hero {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
}

.profile-discord-hero h2 {
  margin: 0;
}

.profile-discord-hero p {
  margin: 0;
  color: var(--text-muted);
}

.profile-discord-message {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.profile-discord-status-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  padding: 12px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.profile-discord-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-discord-status-row .is-ok {
  color: var(--success);
}

.profile-discord-status-row .is-warn {
  color: var(--warning);
}

.profile-discord-status-row .is-muted {
  color: var(--text-muted);
}

.profile-discord-user {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-discord-avatar-fallback {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.profile-discord-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-discord-primary {
  background: linear-gradient(130deg, #5865f2, #4752c4);
  border-color: #4752c4;
  color: #fff;
}

.profile-discord-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.profile-discord-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.profile-discord-step {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--surface-muted);
}

.profile-discord-step b {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.profile-discord-step p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .profile-discord-steps {
    grid-template-columns: 1fr;
  }
}

.comment-thread-card { position: relative; }
.comment-thread-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.comment-thread-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.comment-thread-actions { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.comment-action-menu-wrap { position: relative; }
.comment-action-icon,
.comment-action-pill { border: 1px solid var(--border); background: var(--surface-muted); color: var(--text-muted); transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease); }
.comment-action-icon:hover,
.comment-action-pill:hover { background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface)); color: var(--text); border-color: color-mix(in srgb, var(--primary) 18%, var(--border)); }
.comment-action-icon { width: 34px; height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.comment-action-pill { min-height: 34px; border-radius: 999px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; font-weight: 600; }
.comment-popover-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; width: 220px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-muted) 92%, var(--surface)); box-shadow: var(--glass-medium-shadow); display: grid; grid-gap: 10px; gap: 10px; }
.comment-popover-label { font-size: 12px; color: var(--text-muted); }
.comment-popover-actions { width: 140px; padding: 6px; gap: 4px; }
.comment-menu-item { width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; border-radius: 8px; padding: 9px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.comment-menu-item:hover { background: var(--surface); }
.comment-menu-item.danger { color: var(--danger); }
.comment-status-grid { display: grid; grid-gap: 6px; gap: 6px; }
.comment-status-option { width: 100%; border: 1px solid transparent; background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.comment-status-option:hover { border-color: color-mix(in srgb, var(--primary) 24%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 34%, var(--surface)); }
.comment-status-option.is-active { border-color: color-mix(in srgb, var(--primary) 34%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 48%, var(--surface)); }
.comment-status-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.comment-status-dot.tone-success { background: var(--success); }
.comment-status-dot.tone-info { background: var(--primary); }
.comment-status-dot.tone-danger { background: var(--danger); }
.comment-status-dot.tone-warning { background: var(--warning); }
.comment-status-dot.tone-muted { background: var(--text-muted); }

.comment-embedded-panel {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.comment-embedded-panel .comment-rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-embedded-panel .comment-filter-chip {
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.comment-embedded-panel .comment-filter-chip.is-active,
.comment-embedded-panel .comment-filter-chip:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.comment-embedded-panel .comment-thread-card {
  padding: 14px 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 66%, transparent);
}

.comment-embedded-panel .comment-compose {
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.comment-embedded-panel .comment-compose-head,
.comment-embedded-panel .comment-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.approval-inline-panel {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.approval-inline-summary,
.approval-inline-details {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 12px;
}

.approval-inline-textarea {
  min-height: 84px;
}

.approval-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .comment-thread-header { flex-direction: column; }
  .comment-thread-actions { width: 100%; justify-content: flex-end; }
  .comment-action-pill span { display: none; }
  .comment-popover-menu { width: min(220px, calc(100vw - 72px)); }
  .comment-embedded-panel .comment-compose-actions { align-items: flex-start; }
}

/* Document editor redesign */
.document-page-layout {
  min-height: 100%;
}

.document-page-main {
  gap: 18px;
}

.document-page-context {
  gap: 12px;
}

.doc-mode {
  display: grid;
  grid-gap: 0;
  gap: 0;
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--primary-soft) 28%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 18%, var(--bg)) 0%, var(--bg) 32%);
}

.doc-top-shell {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding: 14px 20px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
}

.doc-framebar,
.doc-toolbar,
.doc-topbar-side,
.doc-frame-meta,
.doc-presence-compact,
.doc-presence-avatars,
.doc-toolbar-main,
.doc-toolbar-side,
.toolbar-group,
.tool-inline-row,
.comment-rail-head,
.comment-compose-head,
.comment-compose-actions,
.doc-header-title-row,
.doc-header-badges,
.doc-header-summary-row,
.doc-editor-surface-head,
.doc-side-rail-head,
.structured-panel-head.compact,
.character-summary-row {
  display: flex;
  align-items: center;
}

.doc-framebar,
.doc-toolbar,
.doc-topbar-side,
.doc-frame-meta,
.doc-toolbar-main,
.doc-toolbar-side,
.toolbar-group,
.tool-inline-row,
.comment-rail-head,
.doc-header-title-row,
.doc-header-badges,
.doc-header-summary-row,
.doc-editor-surface-head,
.doc-side-rail-head,
.structured-panel-head.compact,
.character-summary-row {
  gap: 10px;
}

.doc-framebar,
.doc-header-title-row,
.doc-header-summary-row,
.doc-editor-surface-head,
.doc-side-rail-head,
.comment-rail-head,
.comment-compose-actions,
.structured-panel-head.compact,
.character-summary-row {
  justify-content: space-between;
}

.doc-topbar-side-start,
.doc-topbar-identity,
.doc-header-main,
.doc-center-stack,
.doc-context-body,
.doc-context-section,
.doc-link-list,
.doc-link-item,
.comment-rail-shell,
.comment-thread-list,
.doc-rail-section,
.doc-rail-section[open],
.doc-header-details-inline,
.doc-header-fields,
.doc-rail-fields,
.character-list.compact {
  display: grid;
}

.doc-topbar-side-start {
  min-width: 0;
  flex: 1 1 auto;
}

.doc-topbar-side-end {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.doc-topbar-identity {
  gap: 4px;
  min-width: 0;
}

.doc-frame-title-row {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.doc-header-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc-topbar-identity strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.doc-frame-meta {
  flex-wrap: wrap;
  color: var(--text-muted);
}

.doc-frame-status,
.doc-inline-note span,
.doc-editor-label,
.doc-editor-state,
.comment-rail-inline-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.doc-back-btn,
.doc-icon-btn,
.doc-overflow-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.doc-text-btn,
.doc-toolbar-chip,
.tool-color-trigger,
.comment-filter-chip {
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface) 58%, transparent);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.doc-toolbar-select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding-right: 28px;
}

.doc-toolbar-chip,
.tool-color-trigger {
  box-shadow: none;
}

.doc-icon-btn:hover,
.doc-icon-btn:focus-visible,
.doc-overflow-btn:hover,
.doc-overflow-btn:focus-visible,
.doc-back-btn:hover,
.doc-back-btn:focus-visible,
.doc-text-btn:hover,
.doc-text-btn:focus-visible,
.doc-toolbar-chip:hover,
.doc-toolbar-chip:focus-visible,
.tool-color-trigger:hover,
.tool-color-trigger:focus-visible,
.comment-filter-chip:hover,
.comment-filter-chip:focus-visible,
.doc-context-tab:hover,
.doc-context-tab:focus-visible {
  color: var(--text);
  border-color: transparent;
  background: color-mix(in srgb, var(--surface) 74%, var(--primary-soft));
}

.doc-icon-btn.is-active,
.doc-text-btn.is-active,
.doc-context-tab.is-active,
.comment-filter-chip.is-active {
  color: var(--text);
  border-color: transparent;
  background: color-mix(in srgb, var(--primary-soft) 74%, var(--surface));
}

.doc-icon-btn:disabled,
.doc-text-btn:disabled,
.doc-toolbar-chip:disabled,
.tool-color-trigger:disabled,
.doc-overflow-btn:disabled,
.comment-filter-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.doc-toolbar {
  justify-content: center;
  gap: 10px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.doc-toolbar-main,
.doc-toolbar-side {
  flex-wrap: wrap;
  min-width: 0;
  justify-content: center;
}

.toolbar-group {
  flex-wrap: wrap;
  padding: 0 2px;
  border-right: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
}

.toolbar-group:last-child {
  border-right: 0;
}

.toolbar-group-view {
  margin-left: 0;
}

.tool-width-label {
  font-size: 12px;
  color: var(--text-muted);
}

.tool-size-wrap,
.table-preset-grid,
.comment-thread-actions,
.comment-thread-meta,
.doc-context-tab-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-size-wrap {
  gap: 4px;
}

.tool-select-size {
  min-width: 78px;
}

.tool-color-popover-wrap,
.tool-popover-wrap,
.doc-toolbar-overflow,
.comment-action-menu-wrap {
  position: relative;
}

.doc-toolbar-overflow summary {
  list-style: none;
}

.doc-toolbar-overflow summary::-webkit-details-marker,
.doc-rail-section summary::-webkit-details-marker {
  display: none;
}

.doc-toolbar-overflow-menu,
.comment-popover-menu,
.tool-color-popover,
.table-insert-popover {
  border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: none;
}

.doc-toolbar-overflow-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px, 75vw);
  padding: 12px;
  border-radius: 16px;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.doc-toolbar-overflow-grid,
.tool-color-grid,
.comment-status-grid,
.table-custom-size {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.doc-overflow-danger {
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
}

.tool-color-popover {
  position: absolute;
  top: 36px;
  left: 0;
  width: 164px;
  padding: 8px;
  border-radius: 10px;
  z-index: 2;
}

.tool-color-popover-floating {
  position: fixed;
  z-index: 90;
}

.tool-color-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.tool-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.tool-color-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.tool-color-custom input[type="color"] {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
}

.table-insert-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 12px;
  border-radius: 14px;
  z-index: 12;
}

.table-preset-grid {
  flex-wrap: wrap;
}

.table-custom-size label {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.table-custom-size input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

.doc-workspace {
  display: grid;
  grid-gap: 20px;
  gap: 20px;
  padding: 24px 20px 48px;
}

.doc-mode-paper-only {
  background: transparent;
}

.editor-screen-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 100vh;
}

.editor-project-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  grid-gap: 18px;
  gap: 18px;
  width: 248px;
  min-height: 100vh;
  padding: 20px 14px 18px;
  border-right: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 74%, var(--bg));
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
  transition: width var(--motion-fast) var(--motion-ease), padding var(--motion-fast) var(--motion-ease);
}

.editor-project-sidebar.is-collapsed {
  width: 84px;
  padding-inline: 12px;
}

.editor-project-sidebar-head,
.editor-project-sidebar-link,
.editor-header-row,
.editor-header-badges,
.editor-header-meta-strip,
.editor-meta-pill,
.editor-presence-pill {
  display: flex;
  align-items: center;
}

.editor-project-sidebar-head {
  gap: 10px;
}

.editor-project-sidebar-copy {
  min-width: 0;
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  flex: 1 1 auto;
}

.editor-project-sidebar-copy span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.editor-project-sidebar-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.editor-project-sidebar-nav {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.editor-project-sidebar-link {
  gap: 12px;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 18px;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}

.editor-project-sidebar-link span {
  min-width: 0;
  display: grid;
  grid-gap: 2px;
  gap: 2px;
}

.editor-project-sidebar-link strong {
  font-size: 14px;
  color: var(--text);
}

.editor-project-sidebar-link small {
  color: var(--text-muted);
  font-size: 12px;
}

.editor-project-sidebar-link:hover,
.editor-project-sidebar-link.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface));
}

.editor-project-sidebar.is-collapsed .editor-project-sidebar-link {
  justify-content: center;
  padding-inline: 0;
}

.editor-main-shell {
  min-width: 0;
}

.editor-main-shell-inline {
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.editor-top-shell {
  gap: 10px;
  padding-inline: 0;
}

.editor-header-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 0 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.editor-header-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.editor-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.editor-back-btn {
  flex-shrink: 0;
}

.editor-title-input {
  font-size: clamp(24px, 2.5vw, 34px);
  text-align: left;
  padding: 0;
  margin: 0;
  line-height: 1.15;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1 1 520px;
  min-width: 0;
  flex-wrap: wrap;
}

.editor-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.editor-quick-select-wrap {
  display: inline-flex;
  align-items: center;
}

.editor-quick-select {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
}

.editor-quick-select:focus {
  outline: none;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.editor-quick-select-wrap-font,
.editor-quick-select-wrap-size {
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}

.editor-quick-select-font {
  min-width: 112px;
}

.editor-quick-select-size {
  min-width: 82px;
}

.editor-quick-icon,
.editor-quick-text {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  height: 30px;
  min-width: 30px;
  padding: 0 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}

.editor-quick-text {
  font-size: 12px;
  font-weight: 600;
}

.editor-quick-icon:hover,
.editor-quick-icon:focus-visible,
.editor-quick-text:hover,
.editor-quick-text:focus-visible,
.editor-quick-icon.is-active,
.editor-quick-text.is-active {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
  outline: none;
}

.editor-quick-icon:disabled,
.editor-quick-text:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.editor-color-indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
  background: var(--swatch-color, #cbd5e1);
  flex-shrink: 0;
}

.editor-highlight-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.46) 0%, rgba(250, 204, 21, 0.08) 100%);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.editor-color-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 70;
  min-width: 180px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.editor-color-popover-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.editor-color-swatch-grid {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.editor-color-swatch {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.editor-color-swatch:hover,
.editor-color-swatch.is-active {
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
}

.editor-color-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, rgba(148, 163, 184, 0.75) 40%, transparent);
}

.editor-header-status-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-save-status-wrap {
  position: relative;
}

.editor-save-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.editor-save-tooltip {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  min-width: 172px;
  white-space: normal;
  text-align: left;
}

.editor-save-tooltip strong {
  color: var(--text);
  font-size: 12px;
}

.editor-save-retry {
  margin-top: 6px;
  width: -moz-fit-content;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.editor-save-retry:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--primary);
}

.editor-approval-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.editor-approval-chip.tone-success { color: var(--success-text); }
.editor-approval-chip.tone-warning { color: var(--warning-text); }
.editor-approval-chip.tone-danger { color: var(--danger-text); }

.editor-collab-inline {
  display: inline-flex;
  align-items: center;
}

.editor-collab-inline .doc-presence-avatar,
.editor-collab-inline .doc-presence-more {
  border-color: color-mix(in srgb, var(--border) 72%, transparent);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.editor-collab-inline .doc-presence-avatar {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--presence-color, var(--primary)) 30%, transparent) inset;
}

.editor-more-menu-wrap {
  position: relative;
}

.editor-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.editor-more-section {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.editor-more-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.editor-more-field {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.editor-more-field input,
.editor-more-field select {
  width: 100%;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  padding: 0 10px;
}

.editor-more-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.editor-more-action,
.editor-more-action-group > .editor-more-action {
  width: 100%;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.editor-more-action:hover,
.editor-more-action.is-active,
.editor-more-action-group > .editor-more-action:hover {
  background: color-mix(in srgb, var(--surface-muted) 76%, transparent);
}

.editor-more-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.editor-danger-zone {
  padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
}

.editor-header-badges,
.editor-header-meta-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editor-meta-pill {
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  color: var(--text);
  font-size: 12px;
}

.editor-meta-pill strong {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.editor-meta-pill.muted {
  opacity: 0.88;
}

.doc-workspace-paper-only {
  min-height: 100vh;
  padding: 8px 0 40px;
}

.doc-layout-grid-paper-only {
  max-width: none;
  margin: 0;
}

.doc-page-canvas-paper-only {
  min-height: calc(100vh - 148px);
  padding: 0 0 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.editor-stage-grid {
  grid-template-columns: minmax(0, 1fr);
}

.editor-page-stage {
  position: relative;
}

.editor-document-outline {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 260px;
  max-height: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, #fff);
  box-shadow: 0 20px 42px rgba(9, 14, 28, 0.18);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  overflow: hidden;
  z-index: 12;
}

.editor-document-outline-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 12px 14px 8px;
}

.editor-document-outline-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px 10px;
  overflow-y: auto;
}

.editor-document-outline-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  width: 100%;
  text-align: left;
  background: transparent;
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 10px;
  transition: background-color .14s ease, color .14s ease;
}

.editor-document-outline-item.level-2 { padding-left: 20px; }
.editor-document-outline-item.level-3 { padding-left: 30px; }

.editor-document-outline-item:hover {
  background: color-mix(in srgb, var(--surface-alt) 80%, transparent);
  color: var(--text);
}

.editor-document-outline-item.is-active {
  background: color-mix(in srgb, var(--primary-soft) 65%, transparent);
  color: var(--primary-strong);
}

.editor-document-outline-bullet {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .48;
  flex-shrink: 0;
}

.editor-document-outline-item.is-active .editor-document-outline-bullet { opacity: 1; }

.editor-document-outline-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-remote-cursor {
  position: absolute;
  width: 2px;
  height: 22px;
  border-left: 2px solid;
  pointer-events: none;
  z-index: 20;
}

.editor-remote-cursor-label {
  position: absolute;
  top: -22px;
  left: -1px;
  transform: translateX(-10%);
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.editor-page-stage .tiptap,
.editor-page-stage .doc-editor-surface-headline {
  max-width: none !important;
}

.editor-surface-headline {
  margin: 0 0 10px;
}

.editor-presence-pill {
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text-muted);
  font-size: 12px;
}

.editor-presence-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--presence-color, color-mix(in srgb, var(--primary) 70%, white));
}

.doc-layout-grid-popup {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 24px;
  align-items: start;
}

.doc-inspector-dock {
  position: -webkit-sticky;
  position: sticky;
  top: 108px;
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  align-content: start;
}

.editor-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-gap: 24px;
  gap: 24px;
  align-items: start;
}

.editor-content-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.editor-document-column {
  min-width: 0;
}

.doc-popup-panel {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
}

.doc-popup-overview {
  gap: 16px;
}

.doc-popup-stack {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.doc-header-surface {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  padding: 20px 0 0;
}

.doc-header-main {
  gap: 14px;
}

.doc-header-title-block {
  min-width: 0;
}

.doc-title-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
}

.doc-title-input-header {
  padding: 0;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 760;
  letter-spacing: -0.05em;
}

.doc-title-input:focus {
  outline: none;
}

.doc-header-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.doc-header-meta-row,
.doc-header-details-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-meta-chip {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  min-width: 116px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.doc-meta-chip span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc-meta-chip strong {
  font-size: 13px;
  color: var(--text);
}

.doc-meta-chip-inline {
  min-width: 140px;
}

.doc-header-summary-row {
  align-items: flex-start;
  flex-wrap: wrap;
}

.doc-inline-note {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-detail-toggle {
  flex-shrink: 0;
}

.doc-header-details-inline {
  padding-top: 2px;
}

.doc-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 18px;
  gap: 18px;
  align-items: start;
}

.doc-layout-grid.has-left {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
}

.doc-layout-grid.has-right {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}

.doc-layout-grid.has-left.has-right {
  grid-template-columns: minmax(236px, 276px) minmax(0, 1fr) minmax(280px, 320px);
}

.doc-layout-grid.is-focused {
  grid-template-columns: minmax(0, 1fr) !important;
}

.doc-center-stack {
  min-width: 0;
  gap: 16px;
}

.doc-editor-surface-head-hero {
  padding: 0;
  align-items: flex-start;
}

.doc-editor-surface-head {
  padding: 0 2px;
}

.doc-editor-surface-head strong,
.doc-side-rail-head strong {
  font-size: 17px;
}

.doc-page-canvas {
  min-height: 74vh;
  padding: 8px 0 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.doc-editor-surface-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  max-width: none;
  flex-wrap: wrap;
}

.doc-page-canvas .tiptap {
  min-height: 66vh;
  margin: 0;
  line-height: 1.72;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.doc-page-canvas[data-width='narrow'] .tiptap,
.doc-page-canvas[data-width='narrow'] .doc-editor-surface-headline {
  max-width: none;
}

.doc-page-canvas[data-width='default'] .tiptap,
.doc-page-canvas[data-width='default'] .doc-editor-surface-headline {
  max-width: none;
}

.doc-page-canvas[data-width='wide'] .tiptap,
.doc-page-canvas[data-width='wide'] .doc-editor-surface-headline {
  max-width: none;
}

.doc-side-rail {
  position: -webkit-sticky;
  position: sticky;
  top: 96px;
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.doc-side-rail-head {
  align-items: flex-start;
}

.doc-meta-rail,
.doc-context-rail {
  min-width: 0;
}

.doc-rail-section {
  gap: 10px;
  padding: 4px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
}

.doc-rail-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.doc-rail-section summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.doc-rail-section summary span {
  font-weight: 700;
  color: var(--text);
}

.doc-rail-section summary small,
.doc-link-item span,
.doc-link-item small {
  color: var(--text-muted);
  font-size: 12px;
}

.doc-header-fields,
.doc-rail-fields,
.structured-fields,
.character-list.compact,
.doc-link-list,
.doc-context-body,
.doc-context-section,
.comment-rail-shell,
.comment-thread-list {
  gap: 10px;
}

.doc-header-fields label,
.structured-fields label,
.character-card label {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.doc-header-fields input,
.structured-fields textarea,
.character-card input,
.character-card textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.doc-header-fields input:focus,
.structured-fields textarea:focus,
.character-card input:focus,
.character-card textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 20%, white);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.doc-context-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.doc-context-tab {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--border) 66%, transparent);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.doc-context-tab em {
  font-style: normal;
  color: var(--text);
}

.doc-context-tab small {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.character-card,
.doc-link-item,
.comment-rail-panel,
.approval-rail-panel,
.comment-thread-card {
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: none;
}

.character-card,
.doc-link-item,
.comment-rail-panel,
.approval-rail-panel {
  padding: 14px;
}

.doc-link-item {
  gap: 4px;
}

.comment-rail-head {
  align-items: flex-start;
}

.comment-rail-inline-note {
  width: -moz-fit-content;
  width: fit-content;
}

.comment-thread-list {
  max-height: min(50vh, 580px);
  overflow-y: auto;
  padding-right: 4px;
}

.comment-thread-card {
  padding: 14px;
}

.comment-thread-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.comment-thread-meta {
  flex-wrap: wrap;
  min-width: 0;
}

.comment-thread-actions {
  flex-shrink: 0;
}

.comment-action-icon,
.comment-action-pill {
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--text-muted);
  transition: background-color var(--motion-fast) var(--motion-ease), border-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}

.comment-action-icon:hover,
.comment-action-pill:hover {
  background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface));
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
}

.comment-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.comment-action-pill {
  min-height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.comment-popover-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  width: 220px;
  padding: 10px;
  border-radius: 12px;
}

.comment-popover-label {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-popover-actions {
  width: 140px;
  padding: 6px;
  gap: 4px;
}

.comment-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.comment-menu-item:hover {
  background: var(--surface);
}

.comment-menu-item.danger {
  color: var(--danger);
}

.comment-status-option {
  width: 100%;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.comment-status-option:hover {
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 34%, var(--surface));
}

.comment-status-option.is-active {
  border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 48%, var(--surface));
}

.comment-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.comment-status-dot.tone-success { background: var(--success); }
.comment-status-dot.tone-info { background: var(--primary); }
.comment-status-dot.tone-danger { background: var(--danger); }
.comment-status-dot.tone-warning { background: var(--warning); }
.comment-status-dot.tone-muted { background: var(--text-muted); }

.comment-compose {
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
}

.comment-compose-head span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.approval-rail-head h3 {
  margin: 0;
  font-size: 15px;
}

.approval-rail-textarea {
  margin-top: 12px;
}

.approval-rail-actions,
.doc-danger-zone {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-danger-zone {
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.presence-badge.tone-success {
  border-color: rgba(15, 118, 110, 0.22);
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
}

.presence-badge.tone-warning {
  border-color: rgba(217, 119, 6, 0.22);
  color: #b45309;
  background: rgba(245, 158, 11, 0.1);
}

@media (max-width: 1180px) {
  .editor-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .editor-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-page-canvas-paper-only {
    min-height: auto;
  }

  .editor-header-actions,
  .editor-header-status-line {
    width: 100%;
    justify-content: flex-start;
  }

  .editor-quick-actions {
    border-left: 0;
    padding-left: 0;
    flex-wrap: wrap;
  }

  .editor-more-menu {
    left: 0;
    right: auto;
  }

  .editor-more-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.presence-badge.tone-danger {
  border-color: rgba(185, 56, 21, 0.22);
  color: #b93815;
  background: rgba(185, 56, 21, 0.08);
}

.presence-badge.tone-muted {
  color: var(--text-muted);
  background: var(--surface);
}

.doc-collab-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.doc-presence-avatar,
.doc-presence-more {
  width: 26px;
  height: 26px;
  margin-left: -7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.doc-presence-avatar:first-child,
.doc-presence-more:first-child {
  margin-left: 0;
}

.doc-presence-more,
.doc-compact-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.upload-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.table-actions {
  position: -webkit-sticky;
  position: sticky;
  bottom: 16px;
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
  flex-wrap: wrap;
}

.table-actions .doc-text-btn {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

@media (max-width: 1180px) {
  .doc-framebar,
  .doc-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .doc-topbar-side-end,
  .doc-toolbar-main,
  .doc-toolbar-side {
    justify-content: flex-start;
  }

  .doc-layout-grid,
  .doc-layout-grid.has-left,
  .doc-layout-grid.has-right,
  .doc-layout-grid.has-left.has-right,
  .doc-layout-grid-popup {
    grid-template-columns: 1fr;
  }

  .doc-side-rail,
  .doc-inspector-dock {
    position: static;
  }

  .doc-popup-panel {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .doc-workspace,
  .doc-top-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .doc-header-title-row,
  .comment-rail-head,
  .doc-editor-surface-head,
  .doc-side-rail-head,
  .comment-thread-header,
  .comment-compose-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .doc-context-tabs {
    grid-template-columns: 1fr;
  }

  .doc-page-canvas {
    padding: 18px 16px 28px;
    border-radius: 22px;
  }

  .doc-header-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .doc-header-meta-row,
  .doc-inline-note,
  .doc-header-details-inline,
  .doc-header-fields {
    grid-template-columns: 1fr;
  }

  .comment-thread-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .comment-action-pill span {
    display: none;
  }

  .comment-popover-menu {
    width: min(220px, calc(100vw - 72px));
  }

  .doc-collab-summary {
    width: 100%;
    justify-content: space-between;
  }
}

.collaboration-caret {
  position: relative;
  margin-left: -1px;
  border-left: 2px solid var(--collab-color);
  border-right: 0;
  pointer-events: none;
}

.collaboration-caret-label {
  position: absolute;
  top: -1.4em;
  left: -1px;
  transform: translateX(-2px);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--collab-color);
  color: white;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.collaboration-selection {
  background: rgba(91, 108, 250, 0.14);
}

.collaboration-cursor__selection {
  background: rgba(91, 108, 250, 0.14);
}

.collaboration-cursor__caret {
  border-left: 2px solid var(--collab-color, #5b6cfa);
}

.projects-context-nav {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-context-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.project-context-link.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
}

.projects-trash-grid {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.profile-hub-page {
  padding-bottom: 40px;
}

.profile-hero-card,
.profile-section-card,
.profile-settings-card {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
}

.profile-hero-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.profile-hero-copy {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  min-width: 280px;
  flex: 1 1;
}

.profile-hero-line {
  flex-wrap: wrap;
}

.profile-hero-copy h2 {
  margin: 0;
  font-size: 28px;
}

.profile-role-line {
  align-items: flex-start;
}

.profile-hero-meta-grid,
.profile-summary-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.profile-meta-item,
.profile-summary-item {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 86%, var(--surface-muted));
}

.profile-hub-grid {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

.profile-section-split {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.profile-stack-list {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.profile-list-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.profile-status-block {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.profile-settings-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-settings-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.profile-settings-tab.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
}

.profile-settings-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.profile-settings-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .profile-hub-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .profile-hero-copy h2 {
    font-size: 24px;
  }

  .profile-hero-main {
    align-items: stretch;
  }
}

.editor-selection-shell {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  min-width: 0;
  animation: editor-float-in 140ms var(--motion-ease, ease-out);
}

.editor-selection-primary,
.editor-selection-secondary,
.editor-selection-popover,
.editor-inline-composer,
.slash-menu-surface {
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}

.editor-selection-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 16px;
}

.editor-selection-tool {
  position: relative;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 140ms var(--motion-ease, ease), background 140ms var(--motion-ease, ease), color 140ms var(--motion-ease, ease);
}

.editor-selection-tool:hover,
.editor-selection-tool:focus-visible,
.editor-selection-tool.is-active {
  background: color-mix(in srgb, var(--surface-muted) 74%, transparent);
  color: var(--text);
  transform: translateY(-1px);
}

.editor-selection-tool-accent {
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
  opacity: 0.9;
}

.editor-highlight-chip {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.editor-selection-secondary,
.editor-selection-popover {
  width: min(360px, calc(100vw - 32px));
  border-radius: 18px;
  padding: 14px;
  animation: editor-float-panel-in 160ms var(--motion-ease, ease-out);
}

.editor-selection-secondary {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.editor-selection-secondary-section,
.editor-selection-popover-section {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.editor-selection-secondary-title,
.editor-selection-popover-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.editor-selection-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-selection-secondary-actions.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-selection-secondary-action,
.editor-selection-primary-action,
.editor-selection-icon-btn,
.editor-selection-link-input,
.editor-inline-composer-input {
  min-height: 36px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
}

.editor-selection-secondary-action,
.editor-selection-primary-action,
.editor-selection-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms var(--motion-ease, ease), border-color 140ms var(--motion-ease, ease), transform 140ms var(--motion-ease, ease);
}

.editor-selection-secondary-action:hover,
.editor-selection-primary-action:hover,
.editor-selection-icon-btn:hover,
.editor-selection-blocktype-pill:hover,
.editor-selection-swatch:hover,
.block-ctx-item:hover {
  transform: translateY(-1px);
}

.editor-selection-primary-action {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--text);
}

.editor-selection-secondary-action.is-active,
.editor-selection-secondary-action:hover,
.editor-selection-blocktype-pill.is-active,
.editor-selection-blocktype-pill:hover,
.editor-selection-swatch.is-active,
.editor-selection-swatch:hover {
  background: color-mix(in srgb, var(--surface-muted) 76%, transparent);
}

.editor-selection-secondary-action.remove {
  color: #dc2626;
}

.editor-selection-secondary-action.emphasis {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}

.editor-selection-secondary-action.ghost {
  color: var(--text-muted);
}

.editor-selection-blocktype-grid,
.editor-selection-swatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.editor-selection-blocktype-pill,
.editor-selection-swatch {
  min-height: 38px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.editor-selection-blocktype-icon,
.editor-selection-swatch-chip {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent);
  font-size: 11px;
  font-weight: 700;
}

.editor-selection-popover-title-row,
.editor-selection-link-form,
.editor-selection-action-row,
.editor-inline-composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-selection-popover-title-row {
  justify-content: space-between;
}

.editor-selection-link-status {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-muted) 48%, transparent);
  color: var(--text);
  word-break: break-all;
}

.editor-selection-status-label {
  font-size: 11px;
  color: var(--text-muted);
}

.editor-selection-link-input,
.editor-inline-composer-input {
  width: 100%;
  padding: 0 12px;
  font-size: 13px;
}

.editor-selection-link-input:focus,
.editor-inline-composer-input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 28%, transparent);
  outline-offset: 1px;
}

.editor-selection-icon-btn {
  width: 36px;
  padding: 0;
}

.editor-subdocument-shell {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}

.editor-subdocument-connector {
  width: 2px;
  height: 16px;
  margin-left: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 44%, transparent), color-mix(in srgb, var(--border) 72%, transparent));
}

.editor-subdocument-card {
  pointer-events: auto;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, var(--primary-soft));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.editor-subdocument-card.is-link {
  border-radius: 12px;
}

.editor-subdocument-head,
.editor-subdocument-title-wrap,
.editor-subdocument-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-subdocument-head {
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface-muted) 46%, transparent);
  flex-wrap: wrap;
}

.editor-subdocument-title-wrap {
  min-width: 0;
  flex: 1 1 220px;
}

.editor-subdocument-toggle,
.editor-subdocument-delete {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.editor-subdocument-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.editor-subdocument-link {
  border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
  background: color-mix(in srgb, var(--primary-soft) 42%, transparent);
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

.editor-subdocument-link-icon {
  flex-shrink: 0;
  font-size: 13px;
}

.editor-subdocument-link-text {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.editor-subdocument-title {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.editor-subdocument-title:focus,
.editor-subdocument-textarea:focus {
  outline: none;
}

.editor-subdocument-anchor-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-muted);
}

.editor-subdocument-body {
  padding: 14px;
}

.editor-subdocument-textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
}

.editor-subdocument-shell.is-collapsed .editor-subdocument-card {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.editor-subdocument-shell.is-detached .editor-subdocument-card {
  border-style: dashed;
}

@media (max-width: 900px) {
  .editor-subdocument-shell {
    left: 0 !important;
    width: calc(100% - 12px) !important;
  }
}

/* ─── 사이드 패널 공통 UI ─── */
.editor-side-panel-toggle-label {
  font-size: 12px;
}
.editor-side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.editor-side-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* ─── 댓글 사이드 패널 ─── */
.doc-workspace.comment-panel-open {
  display: flex;
  gap: 0;
}
.doc-workspace.comment-panel-open .editor-content-grid {
  flex: 1 1;
  min-width: 0;
}
.editor-comment-panel {
  display: flex;
  flex-direction: column;
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  height: calc(100vh - 52px);
  position: -webkit-sticky;
  position: sticky;
  top: 52px;
  overflow: hidden;
}
.editor-comment-panel-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 0;
}

.editor-subdocument-panel-body {
  padding: 12px;
}

.editor-subdocument-panel .editor-subdocument-head {
  border-radius: 12px 12px 0 0;
}

.editor-subdocument-panel .editor-subdocument-body {
  border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: color-mix(in srgb, var(--surface-muted) 30%, transparent);
}

.editor-subdocument-panel .editor-subdocument-textarea {
  min-height: 260px;
}

/* CommentPanel 임베드 스타일 조정 */
.editor-comment-panel-body .comment-embedded-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.editor-comment-panel-body .comment-rail-head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border);
}
.editor-comment-panel-body .comment-thread-list {
  padding: 8px 14px;
}
.editor-comment-panel-body .comment-compose {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

/* ─── 블록 핸들 ─── */
.block-handle-wrap {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 1px;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.12s;
  pointer-events: none;
}
.block-handle-wrap.visible {
  opacity: 1;
  pointer-events: auto;
}
.block-handle-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0;
  transition: background 0.1s, color 0.1s;
}
.block-handle-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
}
.block-drag-handle {
  cursor: -webkit-grab;
  cursor: grab;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.block-drag-handle:active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

/* ─── 드롭 위치 표시선 ─── */
.block-drop-indicator {
  position: fixed;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  z-index: 60;
  pointer-events: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* ─── 블록 컨텍스트 메뉴 ─── */
.block-ctx-menu {
  position: fixed;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 14px;
  padding: 6px;
  min-width: 220px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}
.block-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 140ms var(--motion-ease, ease), transform 140ms var(--motion-ease, ease);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.block-ctx-item:hover {
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent);
}
.block-ctx-item.danger {
  color: #ef4444;
}
.block-ctx-item.danger:hover {
  background: rgba(239, 68, 68, 0.08);
}
.block-ctx-item-indent {
  padding-left: 24px;
}
.block-ctx-icon {
  font-size: 11px;
  color: var(--text-muted);
}
.block-ctx-sep {
  height: 1px;
  background: var(--border);
  margin: 3px 6px;
}
.block-ctx-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 10px 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.slash-menu {
  position: fixed;
  width: min(286px, calc(100vw - 20px));
  max-height: min(360px, calc(100vh - 36px));
  overflow: auto;
  z-index: 80;
  animation: editor-float-in 150ms var(--motion-ease, ease-out);
}

.slash-menu-surface {
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
}

.slash-menu-head {
  display: grid;
  grid-gap: 2px;
  gap: 2px;
  padding: 2px 4px 6px;
}

.slash-menu-head strong {
  font-size: 12px;
}

.slash-menu-head span,
.slash-menu-category,
.slash-menu-text small {
  font-size: 10px;
  color: var(--text-muted);
}

.slash-menu-category {
  padding: 6px 6px 2px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slash-menu-list {
  display: grid;
}

.slash-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
  transition: background 140ms var(--motion-ease, ease), transform 140ms var(--motion-ease, ease);
}

.slash-menu-item.is-active,
.slash-menu-item:hover {
  background: color-mix(in srgb, var(--surface-muted) 78%, transparent);
  transform: translateY(-1px);
}

.slash-menu-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-muted) 74%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.slash-menu-text {
  display: grid;
  grid-gap: 1px;
  gap: 1px;
}

.slash-menu-text strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.editor-inline-composer {
  position: fixed;
  z-index: 110;
  width: min(320px, calc(100vw - 24px));
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  animation: editor-float-panel-in 170ms var(--motion-ease, ease-out);
}

.editor-inline-composer-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

@keyframes editor-float-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editor-float-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .editor-comment-panel {
    background: var(--surface);
  }
  .block-ctx-menu,
  .editor-selection-primary,
  .editor-selection-secondary,
  .editor-selection-popover,
  .editor-inline-composer,
  .slash-menu-surface {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .editor-selection-shell,
  .editor-selection-secondary,
  .editor-selection-popover,
  .editor-inline-composer,
  .slash-menu,
  .editor-selection-tool,
  .editor-selection-secondary-action,
  .editor-selection-primary-action,
  .editor-selection-icon-btn,
  .editor-selection-blocktype-pill,
  .editor-selection-swatch,
  .slash-menu-item,
  .block-ctx-item {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ─── Document Card Grid ─────────────────────────────────────── */
.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  padding: 4px;
}

.doc-card {
  aspect-ratio: 3 / 5;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow var(--motion-fast) var(--motion-ease), border-color var(--motion-fast);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.doc-card:hover { box-shadow: var(--glass-medium-shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }

.doc-card-preview {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-muted);
  color: var(--text-muted);
  position: relative;
}

.doc-card[data-type="상세기획서"] .doc-card-preview { background: var(--info-surface); color: var(--info-text); }
.doc-card[data-type="기본기획서"] .doc-card-preview { background: var(--success-surface); color: var(--success-text); }
.doc-card[data-type="제작가이드"] .doc-card-preview { background: var(--warning-surface); color: var(--warning-text); }
.doc-card[data-type="건축기획서"] .doc-card-preview { background: color-mix(in srgb, var(--primary-soft) 80%, transparent); color: var(--primary); }
.doc-card[data-type="캐릭터해석"] .doc-card-preview { background: color-mix(in srgb, #f3e8ff 80%, transparent); color: #7c3aed; }

.doc-card-status {
  position: absolute;
  top: 8px;
  right: 8px;
}

.doc-card-type-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: 0.7;
}

.doc-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.doc-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.doc-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.doc-card-more-btn {
  position: absolute;
  bottom: 46px;
  right: 8px;
  opacity: 0;
  transition: opacity var(--motion-fast);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  line-height: 1;
  z-index: 3;
  color: var(--text-muted);
}
.doc-card:hover .doc-card-more-btn { opacity: 1; }
.doc-card-more-btn:hover { background: var(--surface-muted); color: var(--text); }

.doc-card-menu {
  position: absolute;
  bottom: 70px;
  right: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--glass-medium-shadow);
  z-index: 20;
  min-width: 130px;
  padding: 4px;
}

.doc-card-menu-item {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.doc-card-menu-item:hover { background: var(--surface-muted); }
.doc-card-menu-item.danger { color: var(--danger-text); }

/* ── Toast 알림 ── */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 340px;
}
.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(15,23,42,0.14);
  animation: toast-in 0.2s var(--motion-ease);
  border: 1px solid transparent;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-success { background: var(--success-surface); color: var(--success-text); border-color: var(--success-border); }
.toast-danger  { background: var(--danger-surface);  color: var(--danger-text);  border-color: var(--danger-border); }
.toast-warning { background: var(--warning-surface); color: var(--warning-text); border-color: var(--warning-border); }
.toast-info    { background: var(--info-surface);    color: var(--info-text);    border-color: var(--info-border); }
.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: 0.6;
  padding: 0 2px;
  color: inherit;
  flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }

/* ── 스켈레톤 로딩 ── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-muted) 25%, color-mix(in srgb, var(--surface-muted) 60%, var(--border)) 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin: 4px 0; }
.skeleton-title { height: 18px; margin: 4px 0; }
.skeleton-card {
  height: 100px;
  border-radius: var(--radius-lg);
}

/* ── 검색 인풋 ── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) var(--motion-ease);
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}
.search-bar input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
  flex: 1 1;
  min-width: 0;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ── 스켈레톤 카드 래퍼 ── */
.skeleton-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* ── 필터 칩 ── */
.filter-chip {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--motion-fast) var(--motion-ease);
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--primary); color: var(--text); }
.filter-chip-active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

/* ── 문서 카드 텍스트 미리보기 ── */
.doc-card-text-preview {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  margin: 0;
  padding: 2px 4px;
  text-align: left;
  width: 100%;
}

/* ── Progressive Disclosure 리디자인 ── */

/* 사이드바: 알림 벨 배지 */
.nav-bell-wrap { position: relative; display: inline-flex; }
.nav-badge {
  position: absolute;
  top: -4px; right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 999px;
  min-width: 14px;
  text-align: center;
}
.nav-link-bell { gap: 0; }
.nav-owner-toggle { cursor: pointer; background: none; border: none; text-align: left; width: 100%; }

/* Disclosure toggle (접힘/펼침 버튼) */
.disclosure-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  width: auto;
}
.disclosure-toggle:hover { color: var(--text); }
.disclosure-toggle-full {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 2px 0;
}
.disclosure-toggle-label { display: flex; align-items: center; gap: 6px; }
.disclosure-chevron {
  transition: transform var(--motion-fast) var(--motion-ease);
  flex-shrink: 0;
}
.disclosure-chevron.open { transform: rotate(180deg); }

/* 섹션 헤더 + 액션 버튼 인라인 */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.section-title-text { font-size: 13px; font-weight: 600; color: var(--text); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--motion-fast) var(--motion-ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--primary); }

/* 제작 요청 요약 카드 */
.request-summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 10px;
}
.request-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.request-summary-inprogress { background: var(--warning-surface); }
.request-summary-done { background: var(--success-surface); }
.request-summary-count { font-size: 22px; font-weight: 700; line-height: 1; }
.request-summary-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 회의 헤더 레이아웃 */
.meeting-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.meeting-header-main { flex: 1 1; min-width: 0; }
.meeting-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.meeting-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.meeting-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.meeting-summary-readonly { font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-wrap; padding: 8px 0; }

/* 진행 중 회의 배너 */
.meetings-live-banner {
  padding: 12px 16px;
  background: var(--warning-surface);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-lg);
}

/* 접힘 가능한 섹션 (details/summary) */
.collapsible-section { padding: 0; overflow: visible; }
.collapsible-section > summary { list-style: none; cursor: pointer; padding: 12px 14px; }
.collapsible-section > summary::-webkit-details-marker { display: none; }
.collapsible-section[open] > summary { border-bottom: 1px solid var(--border); }
.collapsible-section > *:not(summary) { padding: 12px 14px; }

/* 달력 이번 주 뷰 */
.calendar-grid-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-cell-week { min-height: 48px !important; }

/* 대시보드 마감 임박 섹션 */
.dashboard-urgent {
  border-left: 3px solid var(--warning);
  background: var(--warning-surface);
}

/* 빠른 진입 허브 sub-text: 기본 dim, hover시 불투명 */
.quick-entry-sub {
  opacity: 0.6;
  transition: opacity var(--motion-fast) var(--motion-ease);
}
.quick-entry-row:hover .quick-entry-sub { opacity: 1; }

/* filter-chips 컨테이너 */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--border) 80%, var(--text-muted));
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--text-muted) 60%, var(--border));
}
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--border) 80%, var(--text-muted)) transparent;
}

/* ─── 인터랙션 시스템 ─────────────────────────────────────── */

/* 전역 pressed 효과 */
.btn:active:not(:disabled),
.nav-link:active,
.list-row:active,
.doc-card:active,
.project-tab:active,
.surface-block:active[role="button"] {
  transform: scale(var(--pressed-scale));
  transition: transform 80ms ease;
}

/* 전역 focus-visible 링 */
.btn:focus-visible,
.nav-link:focus-visible,
.list-row:focus-visible,
.doc-card:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* 내비게이션 아이콘 hover scale */
.nav-link:hover svg,
.nav-link:focus-visible svg {
  transform: scale(1.1);
  transition: transform 120ms var(--motion-ease);
}

/* list-row 액션 버튼 hover 시만 노출 */
.list-row .row-actions {
  opacity: 0;
  transition: opacity var(--motion-fast) var(--motion-ease);
}
.list-row:hover .row-actions,
.list-row:focus-within .row-actions {
  opacity: 1;
}

/* list-row 선택 상태 */
.list-row.is-selected {
  background: var(--selected-bg);
  border-left: 2px solid var(--primary);
  padding-left: 6px;
}

/* doc-card 개선 */
.doc-card:hover {
  border-color: var(--card-border-strong);
  box-shadow: var(--glass-strong-shadow);
  transform: translateY(-2px);
  transition: transform var(--motion-base) var(--motion-ease),
              box-shadow var(--motion-base) var(--motion-ease),
              border-color var(--motion-base) var(--motion-ease);
}
.doc-card-more-btn {
  opacity: 0;
  transition: opacity var(--motion-fast) var(--motion-ease);
}
.doc-card:hover .doc-card-more-btn {
  opacity: 1;
}

/* doc-card drag */
.doc-card[data-dragging="true"] {
  opacity: 0.5;
  cursor: -webkit-grabbing;
  cursor: grabbing;
}
.doc-card[data-drag-over="true"] {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* btn disabled */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* btn active pressed */
.btn:active:not(:disabled) {
  transform: scale(0.97);
  filter: brightness(0.95);
  transition: transform 60ms ease, filter 60ms ease;
}

/* btn loading 상태 */
.btn-loading {
  position: relative;
  pointer-events: none;
}

/* btn-danger icon shake on hover */
.btn-danger:hover .btn-icon {
  animation: btn-danger-shake 300ms ease;
}

@keyframes btn-danger-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px) rotate(-5deg); }
  75% { transform: translateX(2px) rotate(5deg); }
}

/* input focus box-shadow */
.ui-input:focus,
.ui-textarea:focus,
.ui-select:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
  transition: box-shadow var(--motion-fast) var(--motion-ease);
}

/* input error 상태 */
.ui-input.error,
.ui-textarea.error,
.ui-select.error {
  border-color: var(--danger);
}
.ui-input.error:focus,
.ui-textarea.error:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent);
}
.field-error {
  color: var(--danger-text);
  font-size: 12px;
  margin-top: 4px;
  animation: field-error-in 180ms var(--motion-ease);
}
@keyframes field-error-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* 알림 벨 ring 애니메이션 */
@keyframes bell-ring {
  0%   { transform: rotate(0); }
  15%  { transform: rotate(15deg); }
  30%  { transform: rotate(-12deg); }
  45%  { transform: rotate(10deg); }
  60%  { transform: rotate(-8deg); }
  75%  { transform: rotate(5deg); }
  100% { transform: rotate(0); }
}
.bell-ringing {
  animation: bell-ring 600ms ease;
}

/* 알림 배지 pulse */
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.25); }
}
.nav-badge-pulse {
  animation: badge-pulse 600ms ease;
}

/* Toast 액션 버튼 */
.toast-action {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity var(--motion-fast);
  flex-shrink: 0;
}
.toast-action:hover { opacity: 1; }

/* Toast 등장/사라짐 애니메이션 개선 */
.toast-item {
  animation: toast-slide-in 200ms var(--motion-ease);
}
.toast-item.leaving {
  animation: toast-slide-out 160ms var(--motion-ease) forwards;
}
@keyframes toast-slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-slide-out {
  to { opacity: 0; transform: translateX(24px); max-height: 0; margin: 0; padding: 0; }
}

/* ContextMenu */
.context-menu {
  position: fixed;
  z-index: 9000;
  min-width: 180px;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--glass-strong-shadow);
  animation: context-menu-in 120ms var(--motion-ease);
}
@keyframes context-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color var(--motion-fast) var(--motion-ease);
}
.context-menu-item:hover:not(:disabled) {
  background: var(--surface-muted);
}
.context-menu-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.context-menu-item.danger {
  color: var(--danger-text);
}
.context-menu-item.danger:hover:not(:disabled) {
  background: var(--danger-hover-bg);
}
.context-menu-separator {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-backdrop-in 180ms ease;
}
@keyframes modal-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-backdrop.leaving {
  animation: modal-backdrop-out 140ms ease forwards;
}
@keyframes modal-backdrop-out {
  to { opacity: 0; }
}
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-strong-shadow);
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  animation: modal-in 180ms var(--motion-ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-backdrop.leaving .modal-panel {
  animation: modal-out 140ms var(--motion-ease) forwards;
}
@keyframes modal-out {
  to { opacity: 0; transform: scale(0.96); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  margin: 0;
  font-size: 17px;
}
.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.modal-close-btn:hover {
  background: var(--surface-muted);
  color: var(--text);
  border-color: var(--border);
}
.modal-body {
  padding: 18px 20px;
}
.modal-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* SlideOver */
.slideover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0, 0, 0, 0);
  animation: slideover-backdrop-in 220ms ease forwards;
}
@keyframes slideover-backdrop-in {
  to { background: rgba(0, 0, 0, 0.4); }
}
.slideover-backdrop.leaving {
  animation: slideover-backdrop-out 180ms ease forwards;
}
@keyframes slideover-backdrop-out {
  to { background: rgba(0, 0, 0, 0); }
}
.slideover-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(480px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--glass-strong-shadow);
  display: flex;
  flex-direction: column;
  z-index: 8001;
  animation: slideover-in 220ms var(--motion-ease);
  overflow: hidden;
}
@keyframes slideover-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.slideover-backdrop.leaving .slideover-panel {
  animation: slideover-out 180ms var(--motion-ease) forwards;
}
@keyframes slideover-out {
  to { transform: translateX(100%); }
}
.slideover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.slideover-header h2 {
  margin: 0;
  font-size: 17px;
}
.slideover-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 18px 20px;
}
.slideover-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* Dropzone drag 개선 */
.dropzone {
  transition: background var(--motion-base) var(--motion-ease),
              border-color var(--motion-base) var(--motion-ease),
              transform var(--motion-base) var(--motion-ease);
}
.dropzone.dragging {
  transform: scale(1.01);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 20%, transparent);
  background: var(--drag-over-bg);
  border-color: var(--drag-over-border);
}
.dropzone.error {
  border-color: var(--danger);
  animation: dropzone-shake 300ms ease;
}
@keyframes dropzone-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* 키보드 단축키 힌트 tooltip */
.shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--motion-fast) var(--motion-ease);
  pointer-events: none;
  margin-left: auto;
}
.nav-link:hover .shortcut-hint {
  opacity: 1;
}
.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 3px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .slideover-panel {
    width: 100vw;
    height: 90vh;
    top: auto;
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: bottomsheet-in 220ms var(--motion-ease);
  }
  @keyframes bottomsheet-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .slideover-backdrop.leaving .slideover-panel {
    animation: bottomsheet-out 180ms var(--motion-ease) forwards;
  }
  @keyframes bottomsheet-out {
    to { transform: translateY(100%); }
  }
}

/* ── 자료실 픽커 ───────────────────────────────────────── */
.archive-picker-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 140ms ease;
}

.archive-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-strong-shadow);
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 180ms var(--motion-ease);
}

.archive-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.archive-picker-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.archive-picker-search {
  margin: 10px 12px;
  width: calc(100% - 24px);
}

.archive-picker-list {
  overflow-y: auto;
  flex: 1 1;
  padding: 4px 8px 8px;
}

.archive-picker-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--motion-fast) var(--motion-ease);
}

.archive-picker-item:hover {
  background: color-mix(in srgb, var(--primary-soft) 50%, transparent);
}

/* ── Role Widgets ───────────────────────────────────────── */
.role-widgets-stack {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.role-widget {
  border: 1px solid var(--card-border-strong);
  border-radius: var(--radius-lg);
  background: var(--glass-strong-bg);
  overflow: hidden;
}

.role-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-muted) 40%, transparent);
}

.role-widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.role-widget-empty {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.role-widget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: background var(--motion-fast) var(--motion-ease);
  text-decoration: none;
}

.role-widget-row:last-child {
  border-bottom: 0;
}

.role-widget-row:hover {
  background: color-mix(in srgb, var(--primary-soft) 40%, transparent);
}

.role-widget-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.role-widget-project {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-widget-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-widget-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.role-widget-due {
  font-size: 12px;
  color: var(--text-muted);
}

.role-widget-due.due-soon {
  color: var(--danger-text);
  font-weight: 700;
}

.role-widget-mine {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 4px;
  padding: 1px 6px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Minecraft 자동완성 팝오버 */
.mc-popover {
  min-width: 300px;
  max-width: 420px;
  max-height: 280px;
  overflow-y: auto;
}

.mc-popover-header {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mc-popover-query {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.mc-popover-footer {
  padding: 4px 10px 6px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.mc-popover-highlight {
  background: color-mix(in srgb, var(--primary-soft) 80%, transparent);
  color: var(--primary);
  border-radius: 2px;
  font-style: normal;
}

.mc-popover .mention-popover-item {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
}

/* ── Dashboard Activity Toggle ── */
.dash-activity-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  font-family: inherit;
  gap: 6px;
  transition: opacity 120ms;
}
.dash-activity-toggle:hover { opacity: 0.75; }

/* ════════════════════════════════════════
   컨텐츠(Projects) 페이지 — v2
════════════════════════════════════════ */

/* ── 목록 페이지 헤더 ── */
.proj-page { padding: 0; }
.proj-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.proj-page-title {
  font-family: inherit;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.2;
}
.proj-page-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

/* 컨텍스트 내비 */
.proj-context-nav {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 3px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
}
.proj-context-link {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  color: var(--text-muted);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.proj-context-link:hover { color: var(--text); }
.proj-context-link.active {
  background: rgba(255,255,255,0.9);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
:root[data-theme="dark"] .proj-context-link.active {
  background: rgba(255,255,255,0.08);
}

/* ── 카드 그리드 ── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.proj-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.75);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms;
  text-decoration: none;
}
:root[data-theme="dark"] .proj-card {
  background: rgba(255,255,255,0.04);
}
.proj-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
  border-color: var(--border-strong);
}

.proj-card-strip {
  height: 3px;
  background: var(--border);
  flex-shrink: 0;
}
.proj-card-strip[data-status="in_production"]    { background: var(--primary); }
.proj-card-strip[data-status="production_ready"] { background: var(--primary); opacity: 0.5; }
.proj-card-strip[data-status="review_pending"]   { background: var(--warning); }
.proj-card-strip[data-status="completed"]        { background: var(--success); }
.proj-card-strip[data-status="on_hold"]          { background: var(--danger); opacity: 0.6; }
.proj-card-strip[data-status="archived"]         { background: var(--text-muted); opacity: 0.4; }

.proj-card-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1 1; }
.proj-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  word-break: keep-all;
}
.proj-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}
.proj-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 상세 페이지 ── */
.proj-detail-head { margin-bottom: 20px; }
.proj-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.proj-detail-title {
  font-family: inherit;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.proj-detail-actions { display: flex; gap: 8px; flex-shrink: 0; padding-top: 4px; }
.proj-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.proj-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* 상세 레이아웃 */
.proj-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-gap: 0 28px;
  gap: 0 28px;
  align-items: start;
}
.proj-detail-main { min-width: 0; display: flex; flex-direction: column; gap: 0; }
.proj-detail-side { display: flex; flex-direction: column; gap: 16px; }

.proj-section { padding: 20px 0; }
.proj-sec-more {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--motion-fast);
}
.proj-sec-more:hover { color: var(--primary); }

/* 사이드 블록 */
.proj-side-block {
  padding: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
:root[data-theme="dark"] .proj-side-block {
  background: rgba(255,255,255,0.04);
}

.proj-meta-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.proj-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-2, var(--text-muted));
}
.proj-meta-row svg { color: var(--text-muted); flex-shrink: 0; }

/* 제작 요청 요약 카드 */
.proj-req-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
  margin: 12px 0 10px;
}
.proj-req-card {
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}
.proj-req-inprogress { background: var(--warning-surface); }
.proj-req-done { background: var(--success-surface); }
.proj-req-n { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1; }
.proj-req-label { font-size: 11px; color: var(--text-muted); }

/* collapsible */
.proj-collapsible { padding: 0; overflow: visible; border: none; background: none; }
.proj-collapsible > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
}
.proj-collapsible > summary::-webkit-details-marker { display: none; }
.proj-collapsible-body { padding-top: 12px; }

/* 검색바 v2 */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,0.85);
  transition:
    border-color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}
:root[data-theme="dark"] .search-bar { background: rgba(255,255,255,0.05); }
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.search-bar input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  flex: 1 1;
  min-width: 0;
  font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* 반응형 */
@media (max-width: 1024px) { .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-detail-layout { grid-template-columns: 1fr; }
  .proj-detail-side { margin-top: 16px; }
  .proj-page-head { flex-direction: column; gap: 12px; }
}

/* ════════════════════════════════════════
   회의(Meetings) 페이지 — v2
════════════════════════════════════════ */

/* ── 목록 헤더 ── */
.mtg-page { }
.mtg-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.mtg-page-title {
  font-family: inherit;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.2;
}
.mtg-page-sub { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* ── 진행 중 배너 ── */
.mtg-live-banner {
  background: var(--warning-surface);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 24px;
}
.mtg-live-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--warning);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.mtg-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--warning);
  animation: mtg-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes mtg-pulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(176,106,0,.4); }
  50%      { opacity:.8; box-shadow: 0 0 0 5px rgba(176,106,0,0); }
}
.mtg-live-list { display: flex; flex-direction: column; gap: 4px; }
.mtg-live-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin: 0 -10px;
  transition: background var(--motion-fast);
  text-decoration: none;
}
.mtg-live-item:hover { background: rgba(0,0,0,0.04); }
.mtg-live-item-body { flex: 1 1; min-width: 0; }
.mtg-live-item-title {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtg-live-item-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* ── 필터 ── */
.mtg-list-wrap { display: flex; flex-direction: column; gap: 14px; }
.mtg-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mtg-filter-btn {
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--motion-fast);
  font-family: inherit;
}
.mtg-filter-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.mtg-filter-btn.on {
  background: rgba(255,255,255,0.9);
  border-color: var(--border);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
:root[data-theme="dark"] .mtg-filter-btn.on { background: rgba(255,255,255,0.08); }
.mtg-filter-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 목록 ── */
.mtg-list { display: flex; flex-direction: column; }
.mtg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin: 0 -12px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--motion-fast);
}
.mtg-item:hover { background: rgba(0,0,0,0.035); }

.mtg-item-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
:root[data-theme="dark"] .mtg-item-icon { background: rgba(255,255,255,0.06); }

.mtg-item-body { flex: 1 1; min-width: 0; }
.mtg-item-title {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtg-item-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 2px; flex-wrap: wrap;
}
.mtg-meta-dot { width: 2px; height: 2px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }

.mtg-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mtg-item-mode {
  font-size: 10.5px; color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  border-radius: 3px; padding: 1px 6px;
}

/* ── 상세 페이지 ── */
.mtg-detail-page { }
.mtg-detail-head { margin-bottom: 24px; }
.mtg-detail-title {
  font-family: inherit;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.2;
}
.mtg-detail-sub { font-size: 13px; color: var(--text-muted); margin: 0; }
.mtg-comment-wrap { margin-top: 28px; }

/* 반응형 */
@media (max-width: 600px) {
  .mtg-page-head { flex-direction: column; gap: 12px; }
  .mtg-item-mode { display: none; }
}

/* ════════════════════════════════════════
   문서(Documents) 페이지 — v2
════════════════════════════════════════ */

/* ── 목록 헤더 ── */
.doc-page { }
.doc-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.doc-page-title {
  font-family: inherit;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.2;
}
.doc-page-sub { font-size: 12.5px; color: var(--text-muted); margin: 0; }

/* 필터 chips */
.doc-filter-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── 카드 그리드 v2 ── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  padding: 2px;
}

.doc-card-v2 {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.75);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms;
  position: relative;
}
:root[data-theme="dark"] .doc-card-v2 { background: rgba(255,255,255,0.04); }
.doc-card-v2:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
  border-color: var(--border-strong);
}

/* 미리보기 */
.doc-card-v2-preview {
  flex: 1 1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px 12px 28px;
  position: relative;
  overflow: hidden;
}

/* 상단 컬러 띠 */
.doc-card-v2-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

/* 타입 라벨 */
.doc-card-v2-type {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* 텍스트 미리보기 */
.doc-card-v2-text {
  font-size: 11px;
  color: var(--text-2, var(--text-muted));
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  margin: 0;
  opacity: 0.75;
}

/* 승인 상태 배지 */
.doc-card-v2-badge {
  position: absolute;
  bottom: 8px;
  left: 12px;
}

/* 하단 정보 */
.doc-card-v2-body {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
:root[data-theme="dark"] .doc-card-v2-body { background: rgba(255,255,255,0.04); }

.doc-card-v2-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.doc-card-v2-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.doc-card-v2-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ── 에디터 레이아웃 v2 ── */
.doc-editor-layout {
  display: contents;
}

/* 우측 패널 */
.doc-right-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doc-attach-block {
  padding: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
:root[data-theme="dark"] .doc-attach-block { background: rgba(255,255,255,0.04); }

.doc-attach-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.doc-attach-sub { font-size: 12px; color: var(--text-muted); margin: 0; }
.doc-attach-empty { font-size: 12px; color: var(--text-muted); }

/* 반응형 */
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 560px) {
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-page-head { flex-direction: column; gap: 10px; }
  .doc-filter-chips { flex-wrap: nowrap; overflow-x: auto; }
}

/* ════════════════════════════════════════
   프로필(Profile) 페이지 — v2
════════════════════════════════════════ */

.prof-page { display: flex; flex-direction: column; gap: 0; }

/* ── 헤로 ── */
.prof-hero {
  margin-bottom: 32px;
  padding: 22px 24px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
:root[data-theme="dark"] .prof-hero { background: rgba(255,255,255,0.04); }

.prof-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

/* 아바타 */
.prof-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* 정보 영역 */
.prof-hero-info { flex: 1 1; min-width: 0; }
.prof-hero-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.prof-hero-name {
  font-family: inherit;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  font-style: normal;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.prof-hero-id {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* 온라인 표시 */
.prof-presence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.prof-presence.online { color: var(--success); }
.prof-presence-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.prof-presence.online .prof-presence-dot {
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(28,122,74,0.2);
  animation: prof-pulse 2s infinite;
}
@keyframes prof-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(28,122,74,0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(28,122,74,0); }
}

.prof-hero-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.prof-hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.prof-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 액션 버튼 */
.prof-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── 메인 그리드 ── */
.prof-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-gap: 0 28px;
  gap: 0 28px;
  align-items: start;
}
.prof-main { display: flex; flex-direction: column; }
.prof-side { display: flex; flex-direction: column; gap: 14px; }

/* 섹션 */
.prof-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.prof-section:last-child { border-bottom: none; }

.prof-sec-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.prof-sec-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.prof-sec-count {
  font-size: 11px;
  color: var(--text-4, var(--text-muted));
  margin-left: 2px;
}

/* 아이템 목록 */
.prof-item-list { display: flex; flex-direction: column; }
.prof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin: 0 -10px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--motion-fast);
}
.prof-item:hover { background: rgba(0,0,0,0.035); }
.prof-item-body { flex: 1 1; min-width: 0; }
.prof-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prof-item-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.prof-empty { font-size: 12.5px; color: var(--text-muted); padding: 4px 0; }

/* 사이드 블록 */
.prof-side-block {
  padding: 14px 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
:root[data-theme="dark"] .prof-side-block { background: rgba(255,255,255,0.04); }

/* 상태 행 */
.prof-status-rows { display: flex; flex-direction: column; gap: 8px; }
.prof-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.prof-status-label { font-size: 12px; color: var(--text-muted); }

/* 반응형 */
@media (max-width: 800px) {
  .prof-grid { grid-template-columns: 1fr; }
  .prof-side { margin-top: 24px; }
  .prof-hero-inner { flex-wrap: wrap; }
  .prof-hero-actions { flex-direction: row; }
}
@media (max-width: 540px) {
  .prof-hero { padding: 16px; }
  .prof-avatar { width: 48px; height: 48px; font-size: 22px; }
}

/* ══════════════════════════════════════════════════
   DASH2 — 홈 화면 v2 디자인
══════════════════════════════════════════════════ */

.dash2-root {
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 0 80px;
}

/* ── 헤더 ── */
.dash2-header {
  margin-bottom: 32px;
}
.dash2-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.dash2-greeting {
  font-family: inherit;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  color: var(--ink, var(--text));
  line-height: 1.2;
  margin: 0 0 20px;
}
.dash2-greeting em {
  font-style: normal;
}

/* 액션 바 */
.dash2-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash2-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: background 120ms, box-shadow 120ms;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.dash2-filter-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.dash2-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--text, #1a1916);
  border-radius: 20px;
  text-decoration: none;
  transition: opacity 140ms;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.dash2-new-btn:hover { opacity: 0.82; }

/* ── 섹션 공통 ── */
.dash2-section {
  margin-bottom: 36px;
}
.dash2-sec-label-sm {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.dash2-sec-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}
.dash2-sec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.dash2-sec-count {
  font-size: 12px;
  color: var(--text-4, var(--text-muted));
}
.dash2-sec-more {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 120ms;
}
.dash2-sec-more:hover { color: var(--primary); }
.dash2-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
}

/* ── 바로 가기 칩 ── */
.dash2-quick-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.dash2-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--surface, rgba(255,255,255,0.85));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 120ms;
  color: var(--text-2);
}
:root[data-theme="dark"] .dash2-quick-chip {
  background: rgba(255,255,255,0.06);
}
.dash2-quick-chip:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.09);
  color: var(--text);
}
:root[data-theme="dark"] .dash2-quick-chip:hover {
  background: rgba(255,255,255,0.11);
}
.dash2-quick-label {
  font-size: 13px;
  font-weight: 600;
}
.dash2-quick-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-muted, rgba(0,0,0,0.05));
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

/* ── 아이템 리스트 공통 ── */
.dash2-item-list {
  display: flex;
  flex-direction: column;
}

/* ── 마감 임박 아이템 ── */
.dash2-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm, 6px);
  margin: 0 -8px;
  transition: background 100ms;
}
.dash2-item:hover { background: rgba(0,0,0,0.03); }

.dash2-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong, rgba(0,0,0,0.18));
  border-radius: 4px;
  flex-shrink: 0;
}

.dash2-item-body {
  flex: 1 1;
  min-width: 0;
}
.dash2-item-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash2-item-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.dash2-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.dash2-dday {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.dash2-dday--danger  { color: #ef4444; }
.dash2-dday--warning { color: #f59e0b; }
.dash2-dday--info    { color: #3b7eff; }
.dash2-dday--muted   { color: var(--text-muted); }
.dash2-dday--success { color: #10b981; }

/* ── 최근 알림 아이템 ── */
.dash2-activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius-sm, 6px);
  margin: 0 -8px;
  transition: background 100ms;
}
.dash2-activity-item:hover { background: rgba(0,0,0,0.03); }

.dash2-unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary, #2653ff);
  flex-shrink: 0;
}

.dash2-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.dash2-time {
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── 달력 ── */
.dash2-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 3px;
  gap: 3px;
}
.dash2-cal-wday {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.dash2-cal-day {
  border-radius: var(--radius-sm, 6px);
  padding: 6px 4px 5px;
  min-height: 56px;
  cursor: pointer;
  transition: background 100ms;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash2-cal-day:hover { background: rgba(0,0,0,0.04); }
.dash2-cal-day.today { background: var(--text, #1a1916); }
.dash2-cal-num {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1;
}
.dash2-cal-day.today .dash2-cal-num {
  color: var(--bg, #f6f5f1);
  font-weight: 700;
}
.dash2-cal-event {
  font-size: 9.5px;
  color: var(--primary);
  background: var(--primary-soft, rgba(38,83,255,0.08));
  border-radius: 3px;
  padding: 1px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
.dash2-cal-day.today .dash2-cal-event {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}
.dash2-cal-more {
  font-size: 9px;
  color: var(--text-muted);
}

/* 반응형 */
@media (max-width: 640px) {
  .dash2-root { padding: 24px 0 60px; }
  .dash2-greeting { font-size: 28px; }
  .dash2-quick-chip { padding: 6px 12px; }
}

/* ══════════════════════════════════════════════════
   공통 툴바
══════════════════════════════════════════════════ */
.toolbar {
  height: 44px; flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(246,245,241,0.8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  position: relative; z-index: 10;
}
:root[data-theme="dark"] .toolbar { background: rgba(17,17,16,0.8); }

.tb-breadcrumb { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 12.5px; }
.tb-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.tb-sep { width: 1px; height: 16px; background: var(--border-strong); margin: 0 2px; }
.tb-spacer { flex: 1 1; }

.tb-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 20px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  border: none; transition: all 130ms; white-space: nowrap;
  font-family: inherit;
}
.tb-ghost { background: transparent; color: var(--text-2); }
.tb-ghost:hover { background: rgba(0,0,0,0.05); }
:root[data-theme="dark"] .tb-ghost:hover { background: rgba(255,255,255,0.06); }
.tb-ghost svg { width: 13px; height: 13px; stroke-width: 1.75; }

.tb-primary { background: var(--text); color: var(--bg); box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.tb-primary:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.2); }
.tb-primary svg { width: 12px; height: 12px; stroke-width: 2.5; }

/* 뷰 토글 */
.view-toggle {
  display: flex; gap: 1px; background: rgba(0,0,0,0.06);
  border-radius: 20px; padding: 3px;
}
:root[data-theme="dark"] .view-toggle { background: rgba(255,255,255,0.06); }
.vt-btn {
  padding: 3px 12px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; cursor: pointer;
  color: var(--text-muted); border: none; background: transparent;
  transition: all 130ms; font-family: inherit;
}
.vt-btn.on {
  background: var(--surface-s); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* 공통 태그 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; white-space: nowrap;
}
.tag-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.tag-blue   { background: var(--primary-soft); color: var(--primary); }
.tag-blue .tag-dot { background: var(--primary); }
.tag-green  { background: var(--success-surface); color: var(--success); }
.tag-green .tag-dot { background: var(--success); }
.tag-amber  { background: var(--warning-surface); color: var(--warning); }
.tag-amber .tag-dot { background: var(--warning); }
.tag-red    { background: var(--danger-surface); color: var(--danger); }
.tag-red .tag-dot { background: var(--danger); }
.tag-muted  { background: rgba(0,0,0,0.05); color: var(--text-muted); }
:root[data-theme="dark"] .tag-muted { background: rgba(255,255,255,0.06); }
.tag-muted .tag-dot { background: var(--text-4); }

/* ══════════════════════════════════════════════════
   칸반 보드
══════════════════════════════════════════════════ */
.kanban-wrap {
  flex: 1 1; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; scrollbar-color: var(--text-4) transparent;
}
.kanban-wrap::-webkit-scrollbar { height: 4px; }
.kanban-wrap::-webkit-scrollbar-thumb { background: var(--text-4); border-radius: 3px; }
.kanban {
  display: flex; gap: 14px; padding: 20px;
  height: 100%; align-items: flex-start;
}

.kb-col {
  flex-shrink: 0; width: 270px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 100%;
}
.kb-col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius);
  background: rgba(0,0,0,0.03); flex-shrink: 0;
}
:root[data-theme="dark"] .kb-col-head { background: rgba(255,255,255,0.03); }
.kb-col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kb-col-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); flex: 1 1; }
.kb-col-count {
  font-size: 11px; color: var(--text-4);
  background: rgba(0,0,0,0.06); border-radius: 3px; padding: 0 5px;
}
:root[data-theme="dark"] .kb-col-count { background: rgba(255,255,255,0.06); }
.kb-col-add {
  width: 24px; height: 24px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-4); cursor: pointer; border: none; background: transparent;
  transition: background 100ms, color 100ms;
}
.kb-col-add:hover { background: rgba(0,0,0,0.06); color: var(--text-2); }
.kb-col-add svg { width: 13px; height: 13px; stroke-width: 2.5; }

.kb-cards {
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; scrollbar-width: none; flex: 1 1;
}
.kb-cards::-webkit-scrollbar { display: none; }

.kb-card {
  background: var(--surface-s);
  border-radius: var(--radius); padding: 13px 14px;
  border: 1px solid var(--border);
  box-shadow: var(--glass-soft-shadow);
  cursor: pointer; transition: all 160ms;
  position: relative; overflow: hidden;
}
.kb-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.kb-card.blue::before { background: var(--primary); }
.kb-card.green::before { background: var(--success); }
.kb-card.amber::before { background: var(--warning); }
.kb-card.red::before { background: var(--danger); }
.kb-card.gray::before { background: var(--text-4); }
.kb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: var(--border-strong);
}

.kb-card-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.4; margin-bottom: 6px;
}
.kb-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kb-card-sub { font-size: 11px; color: var(--text-muted); }
.kb-card-footer { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.kb-card-type {
  font-size: 10.5px; color: var(--text-4);
  background: rgba(0,0,0,0.05); border-radius: 3px; padding: 1px 6px;
}
:root[data-theme="dark"] .kb-card-type { background: rgba(255,255,255,0.06); }
.kb-card-due { font-size: 10.5px; color: var(--text-muted); margin-left: auto; }
.kb-card-due.urgent { color: var(--danger); font-weight: 600; }
.kb-card-due.soon { color: var(--warning); font-weight: 600; }

.kb-add-card {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: var(--radius);
  border: 1.5px dashed var(--border-strong);
  cursor: pointer; color: var(--text-4);
  transition: all 140ms; font-size: 12.5px;
  background: transparent; width: 100%; font-family: inherit;
}
.kb-add-card:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-soft);
}
.kb-add-card svg { width: 13px; height: 13px; stroke-width: 2.5; }

/* 목록 뷰 */
.content-list-view {
  flex: 1 1; overflow-y: auto; padding: 16px 20px;
  scrollbar-width: thin; scrollbar-color: var(--text-4) transparent;
}
.content-list-view::-webkit-scrollbar { width: 3px; }
.content-list-view::-webkit-scrollbar-thumb { background: var(--text-4); border-radius: 3px; }
.list-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.list-table th {
  font-size: 11px; font-weight: 600; color: var(--text-4);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky; top: 0; background: var(--bg);
}
.list-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-size: 13px;
}
:root[data-theme="dark"] .list-table td { border-bottom-color: rgba(255,255,255,0.04); }
.list-table tr:hover td { background: rgba(0,0,0,0.025); cursor: pointer; }
:root[data-theme="dark"] .list-table tr:hover td { background: rgba(255,255,255,0.025); }
.list-table tr:last-child td { border-bottom: none; }
.lt-title { font-weight: 500; color: var(--text); }
.lt-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* 컨텐츠 페이지 바디 */
.content-body { flex: 1 1; overflow: hidden; display: flex; flex-direction: column; }

/* ── 컨텐츠 필터 바 ── */
.cb-filter-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(246,245,241,0.5);
  flex-shrink: 0;
}
:root[data-theme="dark"] .cb-filter-bar { background: rgba(17,17,16,0.5); }
.cb-filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 12px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); transition: all 130ms; font-family: inherit;
}
.cb-filter-chip.on {
  background: var(--text); color: var(--bg);
  border-color: var(--text);
}
.cb-filter-chip:not(.on):hover { background: rgba(0,0,0,0.04); }
:root[data-theme="dark"] .cb-filter-chip:not(.on):hover { background: rgba(255,255,255,0.06); }
.cb-filter-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── 새 컨텐츠 생성 오버레이 ── */
.cb-create-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.cb-create-form {
  background: var(--surface-s, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  width: 380px; max-width: 90vw;
  padding: 20px;
}
:root[data-theme="dark"] .cb-create-form { background: var(--bg); }
.cb-create-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.cb-create-title {
  font-size: 15px; font-weight: 600; color: var(--text);
}
.cb-create-close {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; border: none;
  background: transparent; transition: background 100ms;
}
.cb-create-close:hover { background: rgba(0,0,0,0.06); }
.cb-create-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  background: var(--bg); color: var(--text);
  outline: none; transition: border-color 150ms;
}
.cb-create-input:focus { border-color: var(--primary); }
.cb-create-error {
  font-size: 12px; color: var(--danger); margin: 8px 0 0;
}
.cb-create-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; gap: 12px;
}
.cb-create-hint {
  font-size: 11px; color: var(--text-muted); flex: 1 1;
}

/* ══════════════════════════════════════════════════
   회의 분할 레이아웃
══════════════════════════════════════════════════ */
.meeting-layout { flex: 1 1; display: flex; overflow: hidden; }
.meeting-list-panel {
  width: 320px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
}
.meeting-list-inner {
  flex: 1 1; overflow-y: auto;
  scrollbar-width: thin;
}
.meeting-list-inner::-webkit-scrollbar { width: 3px; }

.ml-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 13px 16px; cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 120ms; position: relative;
}
:root[data-theme="dark"] .ml-item { border-bottom-color: rgba(255,255,255,0.05); }
.ml-item:hover { background: rgba(0,0,0,0.025); }
:root[data-theme="dark"] .ml-item:hover { background: rgba(255,255,255,0.025); }
.ml-item.on { background: var(--primary-soft); }
.ml-item.on::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2.5px; background: var(--primary); border-radius: 0 3px 3px 0;
}
.ml-item-head { display: flex; align-items: center; gap: 8px; }
.ml-item-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  flex: 1 1; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ml-item-date { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.ml-item-meta { display: flex; align-items: center; gap: 6px; }
.ml-item-sub { font-size: 11.5px; color: var(--text-muted); }
.ml-live {
  display: flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: var(--success); font-weight: 700;
}
.ml-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); animation: ml-pulse 2s infinite; flex-shrink: 0;
}
@keyframes ml-pulse {
  0%,100% { opacity:1; box-shadow:0 0 0 0 rgba(28,122,74,.4); }
  50% { opacity:.8; box-shadow:0 0 0 4px rgba(28,122,74,0); }
}

.meeting-detail-panel { flex: 1 1; display: flex; flex-direction: column; overflow: hidden; }
.md-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.md-title {
  font-family: inherit;
  font-size: 22px; font-style: normal; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.md-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.md-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-muted);
}
.md-meta-item svg { width: 13px; height: 13px; stroke-width: 1.75; }

.md-body {
  flex: 1 1; overflow-y: auto; padding: 20px 24px;
  scrollbar-width: thin;
}
.md-body::-webkit-scrollbar { width: 3px; }
.md-body::-webkit-scrollbar-thumb { background: var(--text-4); border-radius: 3px; }
.md-section { margin-bottom: 24px; }
.md-sec-title {
  font-size: 11px; font-weight: 600; color: var(--text-4);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px;
}
.md-agenda { display: flex; flex-direction: column; gap: 6px; }
.md-agenda-item {
  display: flex; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius); background: rgba(0,0,0,0.025);
}
:root[data-theme="dark"] .md-agenda-item { background: rgba(255,255,255,0.025); }
.md-agenda-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.08); display: flex;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
:root[data-theme="dark"] .md-agenda-num { background: rgba(255,255,255,0.08); }
.md-agenda-text { font-size: 13px; color: var(--text-2); flex: 1 1; line-height: 1.5; }
.md-agenda-time { font-size: 11px; color: var(--text-4); flex-shrink: 0; }
.md-note { font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.md-note p { margin-bottom: 10px; }

.md-participants { display: flex; gap: 8px; flex-wrap: wrap; }
.md-participant {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px; background: rgba(0,0,0,0.03); border-radius: 20px;
}
:root[data-theme="dark"] .md-participant { background: rgba(255,255,255,0.04); }
.md-p-ava {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.md-p-name { font-size: 12.5px; color: var(--text-2); font-weight: 500; }

/* ══════════════════════════════════════════════════
   프로필/설정 레이아웃
══════════════════════════════════════════════════ */
.profile-layout-v2 {
  flex: 1 1; display: grid;
  grid-template-columns: 220px 1fr; overflow: hidden;
}
.profile-nav-v2 {
  border-right: 1px solid var(--border);
  padding: 20px 12px; overflow-y: auto;
}
.profile-nav-label {
  font-size: 10px; font-weight: 600; color: var(--text-4);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 8px 4px;
}
.pn-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13px; color: var(--text-2);
  transition: background 100ms; border: none; background: transparent;
  width: 100%; font-family: inherit; text-align: left;
}
.pn-item:hover { background: rgba(0,0,0,0.04); color: var(--text); }
:root[data-theme="dark"] .pn-item:hover { background: rgba(255,255,255,0.04); }
.pn-item.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.pn-item svg { width: 14px; height: 14px; flex-shrink: 0; stroke-width: 1.6; }

.profile-content-v2 {
  overflow-y: auto; padding: 32px 40px;
  scrollbar-width: thin;
}
.profile-content-v2::-webkit-scrollbar { width: 3px; }
.profile-content-v2::-webkit-scrollbar-thumb { background: var(--text-4); border-radius: 3px; }

.profile-hero-v2 {
  display: flex; align-items: flex-start; gap: 20px;
  margin-bottom: 32px; padding-bottom: 28px;
  border-bottom: 1px solid var(--border-strong);
}
.profile-ava-v2 {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.profile-hero-info-v2 { flex: 1 1; padding-top: 4px; }
.profile-name-v2 {
  font-family: inherit;
  font-size: 24px; color: var(--text);
}
.profile-role-v2 { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.profile-stats-v2 { display: flex; gap: 20px; margin-top: 10px; }
.profile-stat-v2 { text-align: center; }
.profile-stat-n { font-size: 18px; font-weight: 700; color: var(--text); }
.profile-stat-l { font-size: 11px; color: var(--text-4); }

.setting-group { margin-bottom: 28px; }
.setting-group-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.setting-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
}
:root[data-theme="dark"] .setting-row { border-bottom-color: rgba(255,255,255,0.05); }
.setting-row:last-child { border-bottom: none; }
.setting-row-info { flex: 1 1; }
.setting-row-label { font-size: 13.5px; font-weight: 500; color: var(--text); }
.setting-row-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.setting-input {
  padding: 7px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-s); font-size: 13px;
  color: var(--text); font-family: inherit; outline: none;
  width: 200px; transition: border-color 150ms;
}
.setting-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.toggle-switch {
  width: 36px; height: 20px; border-radius: 20px;
  background: rgba(0,0,0,0.12); position: relative;
  cursor: pointer; flex-shrink: 0; transition: background 200ms;
  border: none; padding: 0;
}
:root[data-theme="dark"] .toggle-switch { background: rgba(255,255,255,0.12); }
.toggle-switch.on { background: var(--success); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 200ms;
}
.toggle-switch.on .toggle-thumb { transform: translateX(16px); }

/* ══════════════════════════════════════════════════
   문서 페이지 레이아웃
══════════════════════════════════════════════════ */
.doc-layout-v2 { flex: 1 1; display: flex; overflow: hidden; }
.doc-sidebar-v2 {
  width: 240px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow: hidden;
  background: rgba(0,0,0,0.01);
}
:root[data-theme="dark"] .doc-sidebar-v2 { background: rgba(255,255,255,0.01); }
.doc-sb-top { padding: 14px 14px 8px; flex-shrink: 0; }
.doc-sb-search {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px; background: rgba(0,0,0,0.045);
  border-radius: var(--radius-sm); cursor: text;
}
:root[data-theme="dark"] .doc-sb-search { background: rgba(255,255,255,0.045); }
.doc-sb-search svg { width: 12px; height: 12px; color: var(--text-4); stroke-width: 2; }
.doc-sb-search span { font-size: 12px; color: var(--text-4); }
.doc-list-v2 {
  flex: 1 1; overflow-y: auto; padding: 6px 8px; scrollbar-width: none;
}
.doc-list-v2::-webkit-scrollbar { display: none; }
.doc-list-v2-label {
  font-size: 10px; font-weight: 600; color: var(--text-4);
  letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 8px 3px;
}
.doc-list-v2-item {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-2); font-size: 12.5px;
  transition: background 100ms; text-decoration: none;
}
.doc-list-v2-item:hover { background: rgba(0,0,0,0.04); }
:root[data-theme="dark"] .doc-list-v2-item:hover { background: rgba(255,255,255,0.04); }
.doc-list-v2-item.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.doc-list-v2-item svg { width: 13px; height: 13px; flex-shrink: 0; stroke-width: 1.6; }
.doc-list-v2-item-sub { font-size: 10.5px; color: var(--text-4); margin-left: auto; }

.doc-editor-v2 { flex: 1 1; display: flex; flex-direction: column; overflow: hidden; }

/* ══════════════════════════════════════════════════
   월간 달력
══════════════════════════════════════════════════ */
.month-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); grid-gap: 3px; gap: 3px;
}
.month-cal-wday {
  text-align: center; font-size: 10px; font-weight: 600;
  color: var(--text-4); padding-bottom: 5px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.month-cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 12px;
  color: var(--text-muted); cursor: pointer;
  transition: background 100ms; position: relative; gap: 2px;
}
.month-cal-day:hover { background: rgba(0,0,0,0.05); color: var(--text); }
:root[data-theme="dark"] .month-cal-day:hover { background: rgba(255,255,255,0.05); }
.month-cal-day.has::after {
  content: ''; position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%); width: 4px; height: 4px;
  border-radius: 50%; background: var(--primary); opacity: 0.6;
}
.month-cal-day.today {
  background: var(--text); color: var(--bg); font-weight: 700;
}
.month-cal-day.today::after { background: rgba(255,255,255,0.5); }
.month-cal-day.dim { color: var(--text-4); }

/* ══════════════════════════════════════════════════
   모바일 네비게이션
══════════════════════════════════════════════════ */
.mobile-bar {
  display: none; position: fixed; top: 0; left: 0; right: 0;
  height: 50px; background: var(--surface);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  align-items: center; padding: 0 16px; gap: 10px; z-index: 50;
}
.mobile-logo {
  width: 24px; height: 24px; border-radius: 5px; background: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.mobile-logo svg { width: 12px; height: 12px; color: var(--bg); }
.mobile-title-bar { font-size: 14px; font-weight: 600; color: var(--text); flex: 1 1; }
.mobile-menu-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; color: var(--text-2);
}
.mobile-menu-btn svg { width: 18px; height: 18px; stroke-width: 1.75; }

.mobile-drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.mobile-drawer.open { pointer-events: all; }
.drawer-bg {
  position: absolute; inset: 0; background: rgba(0,0,0,0);
  transition: background 260ms;
}
.mobile-drawer.open .drawer-bg { background: rgba(0,0,0,0.25); }
.drawer-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: 280px;
  background: var(--bg-warm);
  transform: translateX(-100%);
  transition: transform 280ms cubic-bezier(0.4,0,0.2,1);
  padding: 56px 12px 24px; overflow-y: auto;
}
.mobile-drawer.open .drawer-panel { transform: translateX(0); }

.mobile-tabbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: var(--surface-s);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-top: 1px solid var(--border); z-index: 50;
}
.mobile-tabbar-inner { display: flex; height: 100%; }
.mtb-item {
  flex: 1 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; color: var(--text-4);
  transition: color 120ms; border: none; background: transparent;
  font-family: inherit; text-decoration: none;
}
.mtb-item.on { color: var(--primary); }
.mtb-item svg { width: 20px; height: 20px; stroke-width: 1.6; }
.mtb-label { font-size: 10px; font-weight: 500; }

@media (max-width: 768px) {
  .app-nav { display: none; }
  .mobile-bar { display: flex; }
  .mobile-tabbar { display: block; }
  .workspace-shell { grid-template-columns: 1fr; }
  .container { padding-top: 50px; padding-bottom: 56px; }
  .meeting-layout { flex-direction: column; }
  .meeting-list-panel { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
  .profile-layout-v2 { grid-template-columns: 1fr; }
  .profile-nav-v2 { display: none; }
}
@media (max-width: 480px) {
  .kanban { padding: 16px; }
  .kb-col { width: 240px; }
}

/* ══════════════════════════════════════════════════
   통일 디자인 유틸리티
══════════════════════════════════════════════════ */

/* 페이지 제목 블록 (toolbar 아래) */
.page-title-block {
  padding: 20px 20px 0;
}
.page-title-block h1 {
  font-family: inherit;
  font-size: clamp(22px, 2.8vw, 30px);
  font-style: normal;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.page-title-block p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* 통계 카드 그리드 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}
.stat-card {
  background: var(--surface-s);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  text-align: center;
}
.stat-n {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 필터 pill */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-pill, .chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  transition: all 130ms var(--motion-ease);
  font-family: inherit;
  white-space: nowrap;
}
.filter-pill:hover, .chip:hover {
  background: rgba(0,0,0,0.04);
}
:root[data-theme="dark"] .filter-pill:hover,
:root[data-theme="dark"] .chip:hover {
  background: rgba(255,255,255,0.04);
}
.filter-pill.on, .chip-active {
  background: var(--surface-s);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* 사용자 아바타 */
.user-avatar {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

/* 유틸리티 */
.text-danger { color: var(--danger); }
.flex-1-min0 { flex: 1 1; min-width: 0; }
.icon-btn-group { display: flex; gap: 4px; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 0 4px;
}

/* list-row 호버 리프트 */
.list-row {
  transition: background var(--motion-fast) var(--motion-ease), transform var(--motion-fast) var(--motion-ease);
}
.list-row:hover {
  transform: translateY(-1px);
}

/* ─── 건축기획서 폼 ─── */
.building-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.building-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.building-form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.building-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-mid);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  transition: background var(--motion-fast);
}
.building-add-btn:hover {
  background: var(--primary-mid);
}
.building-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
:root[data-theme="dark"] .building-card {
  background: var(--surface-muted);
}
.building-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.building-name-input {
  flex: 1 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--border-strong);
  padding: 2px 0 4px;
  outline: none;
  transition: border-color var(--motion-fast);
}
.building-name-input:focus {
  border-color: var(--primary);
}
.building-name-input::placeholder {
  color: var(--text-4);
  font-weight: 400;
}
.building-remove-btn {
  font-size: 11.5px;
  color: var(--danger-text);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: background var(--motion-fast);
}
.building-remove-btn:hover {
  background: var(--danger-surface);
}
.building-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.building-field-row--text {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}
.building-field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 80px;
}
.building-radio-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.building-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.building-radio-label input[type="radio"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
}
.building-textarea {
  width: 100%;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  resize: vertical;
  outline: none;
  font-family: inherit;
  line-height: 1.55;
  transition: border-color var(--motion-fast);
}
.building-textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
}
.building-textarea::placeholder {
  color: var(--text-4);
}
.building-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.building-summary-chip {
  font-size: 11.5px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--text-2);
}

/* ══════════════════════════════════════════════════
   디자인 개선 — 애니메이션 & 폴리쉬
══════════════════════════════════════════════════ */

/* ── 섹션 등장 애니메이션 ── */
@keyframes dash-section-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash2-header {
  animation: dash-section-in 0.5s ease both;
}
.dash2-section:nth-child(2) { animation: dash-section-in 0.5s 0.08s ease both; }
.dash2-section:nth-child(3) { animation: dash-section-in 0.5s 0.16s ease both; }
.dash2-section:nth-child(4) { animation: dash-section-in 0.5s 0.24s ease both; }
.dash2-section:nth-child(5) { animation: dash-section-in 0.5s 0.32s ease both; }
.dash2-section:nth-child(6) { animation: dash-section-in 0.5s 0.4s ease both; }

/* ── 체크박스 checked 상태 ── */
.dash2-checkbox.checked {
  background: var(--primary, #2653ff);
  border-color: var(--primary, #2653ff);
  position: relative;
}
.dash2-checkbox.checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 5px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: translate(-50%, -60%) rotate(-45deg);
}
.dash2-checkbox:not(.checked):hover {
  border-color: var(--primary, #2653ff);
  background: var(--primary-soft, rgba(38,83,255,0.08));
  transition: all 120ms ease;
}

/* ── 체크 완료 애니메이션 ── */
@keyframes checkbox-check {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.dash2-checkbox.checked {
  animation: checkbox-check 250ms ease;
}

/* ── 필터 필(filter pills) 개선 ── */
.dash2-filter-pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  animation: dash-section-in 0.25s ease both;
}
.dash2-filter-pill {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 140ms ease;
}
.dash2-filter-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border-strong);
}
.dash2-filter-pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  font-weight: 600;
}
:root[data-theme="dark"] .dash2-filter-pill:hover {
  background: rgba(255, 255, 255, 0.06);
}
:root[data-theme="dark"] .dash2-filter-pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ── 바로 가기 칩 아이콘 ── */
.dash2-quick-chip svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 140ms ease;
}
.dash2-quick-chip:hover svg {
  color: var(--primary);
}

/* ── 새 컨텐츠 버튼 개선 ── */
.dash2-new-btn {
  position: relative;
  overflow: hidden;
}
.dash2-new-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s ease;
}
.dash2-new-btn:hover::after {
  left: 120%;
}
.dash2-new-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.dash2-new-btn:active {
  transform: scale(0.97) translateY(0);
}

/* ── 활동 피드 아이템 호버 개선 ── */
.dash2-activity-item {
  cursor: pointer;
}
.dash2-activity-item:hover .dash2-avatar {
  transform: scale(1.08);
  transition: transform 160ms ease;
}
.dash2-activity-item:hover .dash2-unread-dot {
  animation: badge-pulse 1s ease infinite;
}

/* ── 달력 개선 ── */
.month-cal-day {
  transition: background 100ms, transform 120ms ease;
}
.month-cal-day:hover {
  transform: scale(1.08);
}
.month-cal-day.today {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.month-cal-day.selected:not(.today) {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.month-cal-day.selected.today {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--primary);
}
.month-cal-day.has:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1.3);
  transition: all 120ms ease;
}

/* ── 네비 플라이아웃 검색 개선 ── */
.nav-flyout-search {
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.nav-flyout-search:hover svg {
  color: var(--primary);
  transition: color 120ms ease;
}
.nav-flyout-search:active {
  transform: scale(0.98);
}

/* ── 글로벌 검색 모달 ── */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(20vh, 160px);
  animation: modal-backdrop-in 0.15s ease both;
}
.search-modal {
  width: min(560px, 90vw);
  background: var(--glass-strong-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-strong-shadow), 0 0 0 1px rgba(0,0,0,0.03);
  overflow: hidden;
  animation: search-modal-in 0.2s ease both;
}
@keyframes search-modal-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.search-modal-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.search-modal-input-wrap svg {
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-modal-input {
  flex: 1 1;
  border: none;
  background: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.search-modal-input::placeholder {
  color: var(--text-4);
}
.search-modal-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}
.search-modal-empty {
  padding: 32px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.search-modal-group-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 10px 4px;
}
.search-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: background 80ms;
}
.search-modal-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
:root[data-theme="dark"] .search-modal-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.search-modal-item svg {
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-modal-item-title {
  font-size: 13.5px;
  font-weight: 500;
}
.search-modal-item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}
.search-modal-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-4);
  display: flex;
  gap: 12px;
}
.search-modal-footer kbd {
  font-family: inherit;
  font-size: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
  color: var(--text-muted);
}

/* ── 아이템 등장 순차 ── */
@keyframes item-slide-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.dash2-item-list .dash2-item:nth-child(1) { animation: item-slide-in 0.3s 0.03s ease both; }
.dash2-item-list .dash2-item:nth-child(2) { animation: item-slide-in 0.3s 0.06s ease both; }
.dash2-item-list .dash2-item:nth-child(3) { animation: item-slide-in 0.3s 0.09s ease both; }
.dash2-item-list .dash2-item:nth-child(4) { animation: item-slide-in 0.3s 0.12s ease both; }
.dash2-item-list .dash2-item:nth-child(5) { animation: item-slide-in 0.3s 0.15s ease both; }

.dash2-item-list .dash2-activity-item:nth-child(1) { animation: item-slide-in 0.3s 0.03s ease both; }
.dash2-item-list .dash2-activity-item:nth-child(2) { animation: item-slide-in 0.3s 0.06s ease both; }
.dash2-item-list .dash2-activity-item:nth-child(3) { animation: item-slide-in 0.3s 0.09s ease both; }
.dash2-item-list .dash2-activity-item:nth-child(4) { animation: item-slide-in 0.3s 0.12s ease both; }
.dash2-item-list .dash2-activity-item:nth-child(5) { animation: item-slide-in 0.3s 0.15s ease both; }
.dash2-item-list .dash2-activity-item:nth-child(6) { animation: item-slide-in 0.3s 0.18s ease both; }

/* ── 팀 실시간 활동 섹션 ── */
.dash2-live-section {
  margin-bottom: 36px;
}
.dash2-live-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: background 120ms, border-color 120ms, box-shadow 120ms;
}
.dash2-live-toggle:hover {
  background: var(--surface-s);
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.dash2-live-toggle svg.live-dot {
  color: #10b981;
  animation: ml-pulse 2s ease-in-out infinite;
}
.dash2-live-toggle .toggle-arrow {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 200ms ease;
}
.dash2-live-toggle[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}
.dash2-live-body {
  margin-top: 8px;
  padding: 4px 0;
  animation: dash-section-in 0.25s ease both;
}

/* ── btn 호버 그라디언트 쉬머 (primary) ── */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn-primary:hover::before {
  left: 120%;
}

/* ── 스핀 애니메이션 (로딩 버튼) ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.glass-panel {
  background: color-mix(in srgb, var(--glass-strong-bg) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--glass-strong-border) 82%, transparent);
  box-shadow: var(--glass-strong-shadow), 0 1px 0 rgba(255,255,255,0.08) inset;
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  backdrop-filter: blur(22px) saturate(1.18);
}

.glass-panel--flyout {
  background: color-mix(in srgb, var(--glass-strong-bg) 88%, transparent);
  border-right-color: color-mix(in srgb, var(--glass-strong-border) 85%, transparent);
}

.glass-panel--assistant {
  background: color-mix(in srgb, var(--glass-strong-bg) 62%, transparent);
  border-color: color-mix(in srgb, var(--glass-strong-border) 54%, rgba(255,255,255,0.08));
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.kim-assistant-overlay {
  position: fixed;
  z-index: 130;
  width: min(520px, calc(100vw - 24px));
  pointer-events: none;
}

.kim-assistant-shell {
  pointer-events: none;
}

.kim-assistant-panel {
  pointer-events: auto;
  border-radius: 20px;
  padding: 10px;
  color: var(--text);
  transform-origin: top left;
  transition:
    opacity 150ms var(--motion-ease),
    transform 180ms var(--motion-ease),
    border-color 180ms var(--motion-ease),
    box-shadow 180ms var(--motion-ease),
    background 180ms var(--motion-ease);
  opacity: 0;
  transform: translateY(6px) scale(0.992);
}

.kim-assistant-panel[data-state="open"] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.kim-assistant-panel[data-state="closed"] {
  opacity: 0;
  transform: translateY(4px) scale(0.99);
}

.kim-assistant-panel[data-expanded="false"] {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.kim-assistant-panel[data-expanded="true"] {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.kim-assistant-panel[data-review="true"] {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--glass-strong-border));
}

.kim-assistant-input-wrap {
  display: flex;
}

.kim-assistant-textarea {
  width: 100%;
  min-height: 44px;
  max-height: min(20vh, 132px);
  resize: none;
  border: 1px solid color-mix(in srgb, var(--border-strong) 42%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 46%, transparent);
  color: var(--text);
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-y: auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition:
    height 170ms var(--motion-ease),
    border-color 140ms var(--motion-ease),
    background 140ms var(--motion-ease),
    box-shadow 140ms var(--motion-ease);
}

.kim-assistant-textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 88%, transparent);
}

.kim-assistant-textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 26%, var(--border-strong));
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}

.kim-assistant-body {
  margin-top: 8px;
  opacity: 0;
  transform: translateY(-2px);
  animation: kimAssistantBodyReveal 180ms var(--motion-ease) forwards;
}

.kim-assistant-body-inner {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  padding: 2px 2px 0;
}

.kim-assistant-response {
  white-space: pre-wrap;
  line-height: 1.62;
  font-size: 13.5px;
  color: color-mix(in srgb, var(--text) 94%, transparent);
}

.kim-assistant-response.is-error {
  color: #fda4af;
}

.kim-assistant-hint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: color-mix(in srgb, var(--text-muted) 90%, transparent);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.kim-assistant-hint-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--surface-muted) 54%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 38%, transparent);
}

@keyframes kimAssistantBodyReveal {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .kim-assistant-overlay {
    width: min(520px, calc(100vw - 16px));
  }

  .kim-assistant-panel {
    border-radius: 18px;
    padding: 9px;
  }

  .kim-assistant-textarea {
    border-radius: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kim-assistant-panel,
  .kim-assistant-body,
  .kim-assistant-textarea {
    transition: none;
    animation: none;
  }
}

.package-shell {
  gap: 18px;
}

.package-shell-hero,
.package-shell-card,
.package-session-card,
.package-detail-card,
.package-draft-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48));
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
}

.package-shell-hero,
.package-shell-card {
  border-radius: 24px;
  padding: 22px;
}

.package-shell-hero {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.package-shell-hero h1,
.package-shell-card-head h3,
.package-card-top strong {
  margin: 8px 0;
}

.package-shell-hero p,
.package-shell-card-head p,
.package-card-top p,
.package-draft-body,
.package-empty,
.package-meta-row,
.package-columns li {
  color: rgba(226, 232, 240, 0.76);
}

.package-shell-create {
  display: flex;
  gap: 10px;
  align-items: center;
}

.package-shell-create input {
  min-width: 260px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-1);
  padding: 12px 14px;
}

.package-shell-error {
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  background: rgba(127, 29, 29, 0.34);
  color: #fecaca;
  padding: 14px 16px;
}

.package-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-gap: 18px;
  gap: 18px;
}

.package-shell-card-head,
.package-card-top,
.package-meta-row,
.package-action-row,
.package-action-stack {
  display: flex;
  gap: 12px;
}

.package-shell-card-head,
.package-card-top,
.package-meta-row {
  justify-content: space-between;
}

.package-list-grid {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
}

.package-session-card,
.package-detail-card,
.package-draft-card {
  border-radius: 20px;
  padding: 18px;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.package-session-card:hover,
.package-detail-card:hover,
.package-draft-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
}

.package-chip-row,
.package-inline-selectors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.package-chip-row span,
.package-inline-selectors button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.46);
  color: rgba(226, 232, 240, 0.88);
  padding: 6px 10px;
  font-size: 12px;
}

.package-inline-selectors button {
  cursor: pointer;
}

.package-mini-list,
.package-columns ul {
  margin: 0;
  padding-left: 18px;
}

.package-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.package-columns h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.package-meta-row {
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  margin-top: 12px;
}

.package-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.package-action-row,
.package-action-stack {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.package-draft-body {
  white-space: pre-wrap;
  line-height: 1.55;
}

.package-empty {
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  padding: 18px;
}

@media (max-width: 1080px) {
  .package-shell-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .package-shell-hero,
  .package-shell-create,
  .package-columns {
    grid-template-columns: 1fr;
    display: grid;
  }

  .package-shell-create input {
    min-width: 0;
    width: 100%;
  }
}

.package-flow-note {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(191, 219, 254, 0.84);
}

.tag-chip {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}
.tag-chip.active {
  border-color: var(--accent);
  color: var(--text);
}
.file-row-advanced {
  align-items: flex-start;
  gap: 12px;
}
.clamp-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-mini {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--text-muted);
  text-align: center;
}
@media (max-width: 920px) {
  .file-row-advanced {
    flex-direction: column;
  }
}

.notice-strip {
  border: 1px solid var(--border);
  background: var(--surface-s);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.notice-strip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.notice-strip-more {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
}
.notice-strip-list { display: grid; grid-gap: 6px; gap: 6px; }
.notice-strip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary-soft) 55%, transparent);
  color: var(--text);
  min-height: 34px;
}
.notice-strip-link { text-decoration: none; }
.notice-strip-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 147, 44, 0.18);
  color: #9a3412;
}
.notice-strip-content { font-size: 13px; line-height: 1.35; }
.notice-strip-pin { margin-left: auto; color: var(--primary); }

.notices-page { display: grid; grid-gap: 16px; gap: 16px; }
.notices-page-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.notices-page-head h1 { margin: 0; font-size: 24px; }
.notices-page-head p { margin: 6px 0 0; color: var(--text-muted); font-size: 13px; }
.notices-group { display: grid; grid-gap: 8px; gap: 8px; }
.notices-group h2 { margin: 0; font-size: 15px; }
.notice-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--surface-s);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.notice-row.inactive { opacity: 0.78; }
.notice-row-top { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.notice-row-main p { margin: 0 0 6px; font-size: 14px; white-space: pre-wrap; }
.notice-row-meta { font-size: 11px; color: var(--text-muted); }
.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.notice-row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.notice-row-actions button {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.notice-row-actions .danger { color: var(--danger); }
.notice-modal {
  width: min(520px, 92vw);
  background: var(--surface-s);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}
.notice-modal h3 { margin: 0; }
.notice-modal p { margin: 0; font-size: 12px; color: var(--text-muted); }
.notice-modal textarea {
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}
.notice-modal input[type='text'],
.notice-modal input[type='datetime-local'],
.notice-modal input:not([type]) {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px;
  font: inherit;
}
.notice-modal-count { text-align: right; font-size: 11px; color: var(--text-muted); margin-top: -5px; }
.notice-modal label { font-size: 12px; color: var(--text); display: flex; gap: 8px; align-items: center; }
.notice-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ══════════════════════════════════════════════════
   DARK MODE AUDIT — 누락된 오버라이드 추가
══════════════════════════════════════════════════ */

/* nav-flyout 다크 */
:root[data-theme="dark"] .nav-flyout {
  background: var(--surface-muted);
  border-color: var(--border);
  box-shadow: 6px 0 24px rgba(0,0,0,0.4);
}
:root[data-theme="dark"] .nav-flyout-footer {
  background: rgba(28,27,25,0.9);
  border-color: var(--border);
}
:root[data-theme="dark"] .nav-flyout-search {
  background: rgba(255,255,255,0.05);
}
:root[data-theme="dark"] .nav-flyout-search:hover {
  background: rgba(255,255,255,0.09);
}
:root[data-theme="dark"] .nav-flyout-item:hover {
  background: rgba(255,255,255,0.06);
}
:root[data-theme="dark"] .nav-flyout-item.active {
  background: var(--primary-soft);
}

/* modal 다크 */
:root[data-theme="dark"] .modal-backdrop {
  background: rgba(0,0,0,0.6);
}
:root[data-theme="dark"] .modal-panel {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  box-shadow: var(--glass-strong-shadow);
}

/* form-row 다크 */
:root[data-theme="dark"] .form-row > span {
  color: var(--text);
}

/* btn-primary 다크 */
:root[data-theme="dark"] .btn-primary {
  background: var(--text);
  color: var(--bg);
}
:root[data-theme="dark"] .btn-primary:hover {
  background: color-mix(in srgb, var(--text) 88%, transparent);
}

/* btn-danger 다크 */
:root[data-theme="dark"] .btn-danger {
  background: rgba(255,255,255,0.06);
  border-color: var(--danger-border);
  color: var(--danger-text);
}
:root[data-theme="dark"] .btn-danger:hover {
  background: var(--danger-surface);
  border-color: var(--danger);
}

/* proj-card 다크 */
:root[data-theme="dark"] .proj-card {
  background: var(--surface-muted);
  border-color: var(--border);
}
:root[data-theme="dark"] .proj-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glass-medium-shadow);
}

/* tag 다크 */
:root[data-theme="dark"] .tag-amber {
  background: var(--warning-surface);
  color: var(--warning-text);
  border-color: var(--warning-border);
}
:root[data-theme="dark"] .tag-blue {
  background: var(--info-surface);
  color: var(--info-text);
  border-color: var(--info-border);
}
:root[data-theme="dark"] .tag-green {
  background: var(--success-surface);
  color: var(--success-text);
  border-color: var(--success-border);
}
:root[data-theme="dark"] .tag-muted {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border-color: var(--border);
}

/* dash2 다크 */
:root[data-theme="dark"] .dash2-filter-btn {
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--text-2);
}
:root[data-theme="dark"] .dash2-filter-btn:hover {
  background: var(--surface-s);
  box-shadow: var(--glass-medium-shadow);
}
:root[data-theme="dark"] .dash2-new-btn {
  background: var(--text);
  color: var(--bg);
}
:root[data-theme="dark"] .dash2-item:hover {
  background: rgba(255,255,255,0.04);
}
:root[data-theme="dark"] .dash2-activity-item:hover {
  background: rgba(255,255,255,0.04);
}
:root[data-theme="dark"] .dash2-cal-day:hover {
  background: rgba(255,255,255,0.05);
}
:root[data-theme="dark"] .dash2-cal-day.today {
  background: var(--text);
}

/* login-panel 다크 이미 있으나 추가 보강 */
:root[data-theme="dark"] .auth-route-shell {
  background: var(--bg);
}

/* ui-card 다크 */
:root[data-theme="dark"] .ui-card {
  background: var(--surface-muted);
  border-color: var(--border);
}
:root[data-theme="dark"] .ui-card-strong {
  background: var(--surface-s);
  border-color: var(--border-strong);
}

/* notice modal 다크 */
:root[data-theme="dark"] .notice-modal {
  background: var(--surface-muted);
  border-color: var(--border-strong);
}
:root[data-theme="dark"] .notice-modal textarea,
:root[data-theme="dark"] .notice-modal input[type='text'],
:root[data-theme="dark"] .notice-modal input[type='datetime-local'],
:root[data-theme="dark"] .notice-modal input:not([type]) {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-color: var(--border);
}

/* ══════════════════════════════════════════════════
   MICRO-INTERACTIONS
══════════════════════════════════════════════════ */

/* 버튼 클릭 눌림 (기존 --pressed-scale 변수 활용) */
.btn:active:not(:disabled) {
  transform: scale(0.97);
  transition: transform 0.08s ease;
}

/* 카드 호버 리프트 */
.proj-card,
.ui-card,
.dash2-quick-chip {
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.proj-card:hover,
.ui-card:hover,
.dash2-quick-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--glass-medium-shadow);
}
/* dash2-quick-chip 호버는 기존 스타일 유지하면서 lift 추가 */
.dash2-quick-chip:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: var(--glass-medium-shadow);
  color: var(--text);
}
:root[data-theme="dark"] .dash2-quick-chip:hover {
  background: rgba(255,255,255,0.11);
}

/* 알림 배지 펄스 애니메이션 */
@keyframes badge-pulse {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(38,83,255,0.5); }
  50%  { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(38,83,255,0); }
  100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(38,83,255,0); }
}
.nav-badge {
  animation: badge-pulse 2.4s ease-out;
}
:root[data-theme="dark"] .nav-badge {
  border-color: var(--bg);
}

/* nav-badge-pulse 클래스 (NotificationBell.tsx에서 사용) */
.nav-badge-pulse {
  animation: badge-pulse 0.6s ease-out;
}


/* ══════════════════════════════════════════════════
   MOBILE BOTTOM NAV — safe-area + 4-item strip
══════════════════════════════════════════════════ */

.mobile-tabbar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mtb-item {
  color: var(--text-muted);
}
.mtb-item.on {
  color: var(--primary);
}

@media (max-width: 768px) {
  .app-nav {
    display: none;
  }
}

/* ══════════════════════════════════════════════════
   FIELD INLINE ERROR
══════════════════════════════════════════════════ */

.field-error {
  font-size: 12px;
  color: var(--danger-text);
  margin-top: 3px;
}

.ui-input.error,
.ui-textarea.error,
.ui-select.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-surface);
}

/* ══════════════════════════════════════════════════
   캘린더 워크스페이스
══════════════════════════════════════════════════ */

/* 일정 유형 칩 */
.cal-chip {
  border-radius: 4px; font-size: 11px; padding: 1px 6px;
  font-weight: 500; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: block; line-height: 1.6;
}
.cal-chip-meeting  { background: var(--info-surface);    color: var(--info-text); }
.cal-chip-task     { background: var(--success-surface); color: var(--success-text); }
.cal-chip-deadline { background: var(--danger-surface);  color: var(--danger-text); }
.cal-chip-personal { background: var(--warning-surface); color: var(--warning-text); }
.cal-chip-more     { background: var(--surface-muted);   color: var(--text-muted); }

/* 헤더 */
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 10px;
}
.cal-title { font-size: 18px; font-weight: 700; color: var(--text); margin: 0; }

/* 네비게이션 버튼 그룹 */
.cal-nav-group {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.cal-nav-btn {
  background: transparent; border: none; cursor: pointer;
  padding: 5px 8px; display: flex; align-items: center;
  color: var(--text-2); transition: background 100ms; font-size: 13px;
}
.cal-nav-btn:hover { background: var(--surface-muted); }
.cal-nav-today {
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}

/* 보기 토글 */
.cal-view-toggle {
  display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.cal-view-toggle button {
  padding: 5px 14px; font-size: 13px; background: transparent;
  border: none; cursor: pointer; color: var(--text-muted);
  transition: background 100ms, color 100ms;
}
.cal-view-toggle button.active {
  background: var(--surface-muted); color: var(--text); font-weight: 600;
}

/* 필터 바 */
.cal-filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px;
}
.cal-scope-pills {
  display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.cal-scope-pill {
  background: transparent; border: none; cursor: pointer;
  padding: 5px 12px; font-size: 12px; color: var(--text-muted);
  transition: background 100ms, color 100ms;
}
.cal-scope-pill.active {
  background: var(--surface-muted); color: var(--text); font-weight: 600;
}

/* 본문 레이아웃 */
.cal-body { display: grid; grid-template-columns: 1fr 320px; grid-gap: 14px; gap: 14px; }
@media (max-width: 900px) { .cal-body { grid-template-columns: 1fr; } }

/* 메인 카드 */
.cal-main-card { padding: 14px; }

/* 요일 헤더 */
.cal-wday-row { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 6px; }
.cal-wday {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--text-muted); padding-bottom: 6px; letter-spacing: 0.04em;
}

/* 월간 그리드 */
.cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-gap: 4px; gap: 4px; }
.cal-cell {
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  min-height: 88px; padding: 6px; text-align: left; cursor: pointer;
  transition: border-color 120ms, background 120ms;
  display: flex; flex-direction: column; gap: 3px;
}
.cal-cell:hover { border-color: var(--primary); background: var(--surface-muted); }
.cal-cell.today {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
}
.cal-cell.selected:not(.today) {
  border-color: var(--primary); background: var(--primary-soft);
}
.cal-cell-blank { border-color: transparent !important; cursor: default; background: transparent !important; min-height: 88px; }
.cal-cell-day { font-size: 12px; font-weight: 500; color: var(--text-2); }
.cal-cell.today .cal-cell-day { color: var(--primary); font-weight: 700; }
.cal-cell-events { display: flex; flex-direction: column; gap: 2px; flex: 1 1; }

/* 주간 그리드 */
.cal-week-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-gap: 6px; gap: 6px; }
.cal-week-col {
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  min-height: 180px; padding: 8px 6px; text-align: left; cursor: pointer;
  transition: border-color 120ms, background 120ms;
  display: flex; flex-direction: column;
}
.cal-week-col:hover { border-color: var(--primary); background: var(--surface-muted); }
.cal-week-col.today {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
}
.cal-week-col.selected:not(.today) { border-color: var(--primary); background: var(--primary-soft); }
.cal-week-col-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.cal-week-wday { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.cal-week-date { font-size: 15px; font-weight: 600; color: var(--text-2); }
.cal-week-date.today { color: var(--primary); }

/* 사이드바 */
.cal-side { display: flex; flex-direction: column; gap: 12px; }
.cal-form-card { padding: 14px; }
.cal-day-card { padding: 14px; }
.cal-form-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.cal-form-section { margin-bottom: 10px; }
.cal-form-section--optional { opacity: 0.85; }
.cal-form-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cal-allday-label {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-2); margin-top: 8px; cursor: pointer;
}
.cal-participant-list { display: flex; flex-wrap: wrap; gap: 4px; }
.cal-participant-item {
  font-size: 12px; padding: 3px 9px; border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer; color: var(--text-2);
  transition: background 100ms, border-color 100ms;
}
.cal-participant-item.checked {
  background: var(--primary-soft); border-color: var(--primary);
  color: var(--primary); font-weight: 600;
}

/* 선택 날 패널 */
.cal-day-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.cal-day-empty { font-size: 13px; color: var(--text-muted); padding: 6px 0; }
.cal-day-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cal-day-item { display: flex; align-items: flex-start; gap: 8px; }
.cal-day-item-body { flex: 1 1; min-width: 0; }
.cal-day-item-title {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-day-item-time { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.cal-today-summary {
  font-size: 12px; color: var(--text-muted);
  padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px;
}

/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[3].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[13].oneOf[3].use[2]!../../node_modules/next/font/local/target.css?{"path":"app/layout.tsx","import":"","arguments":[{"src":"./fonts/Pretendard-Variable.woff2","variable":"--font-sans","display":"swap","weight":"45 920","fallback":["Noto Sans KR","-apple-system","BlinkMacSystemFont","Segoe UI","sans-serif"]}],"variableName":"pretendard"} ***!
  \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@font-face {
font-family: '__pretendard_fde3a9';
src: url(/_next/static/media/ff840cfebfb63b0c-s.p.woff2) format('woff2');
font-display: swap;
font-weight: 45 920;
}@font-face {font-family: '__pretendard_Fallback_fde3a9';src: local("Arial");ascent-override: 93.76%;descent-override: 23.75%;line-gap-override: 0.00%;size-adjust: 101.55%
}.__className_fde3a9 {font-family: '__pretendard_fde3a9', '__pretendard_Fallback_fde3a9', Noto Sans KR, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif
}.__variable_fde3a9 {--font-sans: '__pretendard_fde3a9', '__pretendard_Fallback_fde3a9', Noto Sans KR, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif
}

