/*!*************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************/
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  /* Black & White 기반 — 바탕 화이트, 메인 텍스트 블랙.
     오렌지는 --amber 포인트 토큰으로 제한해 아이콘·상태 강조에 사용.
     다크는 [data-theme="midnight"] 유지. */
  --bone: #ffffff; /* 바탕 — 화이트 */
  --bone-2: #f4f4f4; /* 살짝 들어간 패널 */
  --bone-3: #e8e8e8; /* 패널/hover */
  --ink: #0a0a0a; /* 메인 컬러 — 블랙 (텍스트/주요 요소) */
  --ink-2: #2b2b2b; /* 진한 그레이 */
  --ink-3: #595959; /* 중간 그레이 */
  --ink-4: #8a8a8a; /* 옅은 그레이 (메타/구분) */
  --rule: #0a0a0a; /* 구분선 — 블랙 (브루탈리즘 룰) */
  --terra: #0a0a0a; /* 1차 액센트 → 블랙 */
  --terra-ink: #0a0a0a; /* 액센트 서체 → 블랙 */
  --terra-wash: #ededed; /* 액센트 wash → 옅은 그레이 */
  --moss: #3a3a3a; /* 2차 액센트 → 진한 그레이 */
  --amber: #f97316; /* 포인트 오렌지: 아이콘·상태 강조 */
  --serif:
    "Pretendard Variable", Pretendard, "Instrument Serif", "Iowan Old Style",
    Georgia, serif;
  --mono:
    "Pretendard Variable", Pretendard, "JetBrains Mono", ui-monospace, Menlo,
    monospace;
  --sans:
    "Pretendard Variable", Pretendard, "Geist", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

/* ── 채팅 워크스페이스 재설계 토큰 (2026-06 데모 피드백) ─ spec: docs/superpowers/specs/2026-06-11-chat-workspace-redesign-design.md */
:root {
  --ws-bg: #fdfdfc;
  --ws-panel: #f4f4f3;
  --ws-card: #ffffff;
  --ws-line: #e9e6dd;
  --ws-line-2: #dfdbd0;
  --ws-ink: #26241f;
  --ws-ink-2: #55524a;
  --ws-ink-3: #8a867c;
  --ws-ink-4: #b3afa4;
  --ws-terra: #c96f4a;
  --ws-terra-deep: #b25f3d;
  --ws-terra-wash: #f6ece5;
  --ws-terra-wash-2: #fdf8f4;
  --ws-ok: #5d8a66;
  --ws-user-bubble: #e5e5e4;
}
/* 다크는 후속: [data-theme="midnight"] 에서 동일 변수 재정의 예정 */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #1a1714;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.3);
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes fly {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  60% {
    transform: translateY(-30px) scale(0.95);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-80px) scale(0.7);
    opacity: 0;
  }
}

@keyframes flash {
  0% {
    background: color-mix(in srgb, var(--amber) 25%, transparent);
  }
  100% {
    background: transparent;
  }
}

/* B7-57 follow-up task #46 — accessibility: prefers-reduced-motion.
 *
 * OS-level "reduce motion" 설정 시 모든 keyframe / transition 을 즉시
 * 완료 (1ms) 시켜 시각적으로 정적 표시. 표준 a11y 트릭 (MDN: WCAG 2.3.3
 * Animation from Interactions).
 *
 * 영향 범위:
 * - pulse 1.4s infinite — chat-xyren 의 5+ 사용처 (ToolActivityBlock 의
 *   running dot, Composer 의 aiMode, Thread 의 active indicator,
 *   ChecklistTodos 의 in_progress 아이콘, Reasoning 의 in_progress 아이콘)
 * - pulse 1.8s ease-in-out infinite (line 189 등)
 * - blink / bounce / shimmer / fly / flash keyframe 모든 사용처
 * - 향후 추가 motion / transition 자동 cover
 *
 * universal selector + ``!important`` 는 nuclear 하지만 a11y 표준 패턴.
 * inline ``style.animation`` 도 cascade override 가능. iteration-count=1
 * + duration=0.001s 조합으로 keyframe 의 final state 표시 (완전 hide 아님).
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

::selection {
  background: var(--terra);
  color: var(--bone);
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(42, 36, 30, 0.15);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(42, 36, 30, 0.3);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: #faf9f6;
  position: relative;
  overflow: hidden;
}

.auth-panel {
  width: min(100%, 600px);
  background: #ffffff;
  padding: 56px 48px 44px;
  display: grid;
  gap: 28px;
  position: relative;
  border: 1px solid var(--ink);
  box-shadow: 12px 12px 0 0 var(--ink);
  margin: 0 auto;
}

.auth-panel::before,
.auth-panel::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--terra);
  pointer-events: none;
}

.auth-panel::before {
  top: -8px;
  left: -8px;
  border-right: 0;
  border-bottom: 0;
}

.auth-panel::after {
  bottom: -8px;
  right: -8px;
  border-left: 0;
  border-top: 0;
}

.auth-hero {
  display: grid;
  gap: 8px;
  position: relative;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(42, 36, 30, 0.18);
}

.auth-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 56px;
  height: 5px;
  background: var(--terra);
}

.auth-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--terra-ink);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--terra);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.auth-index {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--ink-4);
  position: absolute;
  top: 0;
  right: 0;
}

.auth-title {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.auth-title em {
  font-style: italic;
  color: var(--terra);
}

.auth-copy {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.65;
}

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

.auth-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  position: relative;
}

.auth-field span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-field span[data-index]::before {
  content: attr(data-index);
  color: var(--terra);
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 10px 2px;
  font: inherit;
  font-size: 14px;
  min-height: 40px;
  transition:
    border-color 120ms ease,
    background 120ms ease;
}

.auth-field input::placeholder {
  color: var(--ink-4);
}

.auth-field input:focus {
  outline: none;
  border-bottom-color: var(--terra);
  background: linear-gradient(to top, rgba(168, 55, 28, 0.06), transparent 40%);
}

.auth-actions {
  display: flex;
  gap: 10px;
  justify-content: stretch;
  flex-wrap: wrap;
  margin-top: 4px;
}

.auth-actions button {
  flex: 1 1 auto;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  min-height: 52px;
  padding: 0 22px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  position: relative;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-actions button::after {
  content: "→";
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0;
  transition: transform 160ms ease;
}

.auth-actions button:hover {
  background: var(--terra);
  border-color: var(--terra);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 0 var(--ink);
}

.auth-actions button:hover::after {
  transform: translateX(4px);
}

.auth-actions button:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 0 var(--ink);
}

.auth-actions button:first-child:not(:last-child) {
  background: var(--terra);
  border-color: var(--terra);
}

.auth-actions button.auth-secondary {
  flex: 0 0 auto;
  background: transparent;
  color: var(--ink);
}

.auth-actions button.auth-secondary::after {
  display: none;
}

.auth-message {
  border-left: 3px solid var(--terra);
  padding: 8px 12px;
  background: rgba(168, 55, 28, 0.06);
  color: var(--terra-ink);
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.3px;
  animation: flash 0.6s ease-out;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px dashed rgba(42, 36, 30, 0.2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-4);
}

.xyren-app {
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  border-left: 1px solid rgba(42, 36, 30, 0.15);
  border-right: 1px solid rgba(42, 36, 30, 0.15);
  background: var(--bone);
  display: grid;
  grid-template-columns: 340px minmax(640px, 1fr);
}

.sidebar {
  border-right: 1px solid rgba(42, 36, 30, 0.1);
  background: var(--bone);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  padding: 22px 20px 14px;
  border-bottom: 1px solid rgba(42, 36, 30, 0.1);
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.brand {
  font-family: var(--serif);
  font-size: 30px;
  font-style: italic;
  letter-spacing: -0.5px;
}

.sidebar-search {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

.sidebar-search input {
  all: unset;
  flex: 1;
  font-size: 13px;
}

.conv-list {
  overflow: auto;
  flex: 1;
}

.conv-card {
  width: 100%;
  border: 0;
  background: transparent;
  border-bottom: 1px solid rgba(42, 36, 30, 0.08);
  padding: 14px 18px 16px;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.conv-card.active {
  background: var(--bone-2);
}

.conv-subject {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.22;
}

.conv-preview {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.thread-header {
  border-bottom: 1px solid rgba(42, 36, 30, 0.1);
  background: var(--bone);
  padding: 24px 48px 18px;
}

.thread-title {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.08;
}

.thread-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 12px;
}

.thread-body {
  flex: 1;
  overflow: auto;
  padding: 8px 48px 34px;
  display: grid;
  grid-template-columns: minmax(640px, 1fr) 304px;
  gap: 24px;
}

.messages {
  background-image: linear-gradient(
    to bottom,
    transparent 31px,
    rgba(42, 36, 30, 0.035) 32px,
    transparent 33px
  );
  background-size: 100% 32px;
}

.msg-row {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
  align-items: flex-start;
}

.msg-marker {
  width: 56px;
  text-align: right;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.3px;
  color: var(--ink-3);
  flex-shrink: 0;
}

.msg-card {
  max-width: 720px;
  padding: 14px 18px;
  border-radius: 2px;
  border: 1px solid rgba(42, 36, 30, 0.15);
  background: rgba(226, 217, 197, 0.22);
}

.msg-card.user {
  background: transparent;
}

.msg-card.ai {
  background: rgba(234, 215, 206, 0.35);
  border-color: rgba(168, 55, 28, 0.28);
}

.msg-card.agent {
  background: rgba(216, 220, 201, 0.38);
  border-color: rgba(75, 90, 58, 0.2);
}

.msg-author {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}

.msg-body {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.46;
}

.reasoning {
  border: 1px solid rgba(168, 55, 28, 0.22);
  background: rgba(234, 215, 206, 0.22);
}

.step {
  border-left: 1px solid rgba(42, 36, 30, 0.15);
  padding-left: 16px;
  margin-top: 10px;
}

.step.hitl {
  border-left: 2px solid var(--terra);
}

.step-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.1px;
  color: var(--terra-ink);
}

.tool-rail {
  position: sticky;
  top: 18px;
  align-self: start;
  border: 1px solid rgba(42, 36, 30, 0.16);
  background: rgba(226, 217, 197, 0.24);
}

.tool-head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(42, 36, 30, 0.1);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

.tool-list {
  max-height: 62vh;
  overflow: auto;
  padding: 8px 10px 10px;
}

.tool-item {
  border-bottom: 1px dashed rgba(42, 36, 30, 0.12);
  padding: 10px 6px;
}

.tool-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
}

.tool-summary {
  margin-top: 5px;
  padding-left: 26px;
  font-size: 12px;
  color: var(--ink-2);
}

.composer {
  border-top: 1px solid rgba(42, 36, 30, 0.1);
  padding: 16px 48px 22px;
  background: var(--bone);
}

.composer-box {
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--bone);
  display: flex;
  align-items: stretch;
}

.composer textarea {
  all: unset;
  flex: 1;
  min-height: 58px;
  padding: 12px 14px;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.45;
}

.composer button {
  all: unset;
  cursor: pointer;
  width: 88px;
  text-align: center;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
}

.mono {
  font-family: var(--mono);
}

@media (max-width: 1260px) {
  .xyren-app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .thread-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    padding: 24px 16px;
  }
  .auth-panel {
    padding: 40px 28px 32px;
    box-shadow: 8px 8px 0 0 var(--ink);
  }
  .auth-title {
    font-size: 48px;
  }
}

/* ==========================================================================
   Slide Deck Viewer Modal — nb-slides*
   Matches nb-gen modal style: same z-index layering (backdrop 100 / modal 101),
   same backdrop blur/opacity, same border + shadow token usage.
   ========================================================================== */

.nb-slides__backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  backdrop-filter: blur(2px);
}

.nb-slides {
  position: fixed;
  z-index: 101;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 95vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bone);
  color: var(--ink);
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--ink) 30%, transparent);
  overflow: hidden;
}

/* Fullscreen present mode: the modal becomes the fullscreen element. Fill the
   screen, drop the dialog chrome, and show only the slide on a neutral
   letterbox background (presenton PresentationMode parity). Driven by the
   :fullscreen pseudo so it's race-free with requestFullscreen(). */
.nb-slides:fullscreen {
  top: 0;
  left: 0;
  transform: none;
  width: 100vw;
  height: 100vh;
  max-height: none;
  border: none;
  border-radius: 0;
  background: #0b0b0b;
}

.nb-slides:fullscreen .nb-slides__head,
.nb-slides:fullscreen .nb-slides__progress,
.nb-slides:fullscreen .nb-slides__note,
.nb-slides:fullscreen .nb-slides__nav {
  display: none;
}

.nb-slides:fullscreen .nb-slides__main {
  flex: 1 1 auto;
}

.nb-slides:fullscreen .nb-slides__stage {
  padding: 0;
  background: #0b0b0b;
}

.nb-slides__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  flex-shrink: 0;
}

.nb-slides__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nb-slides__theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nb-slides__theme-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-4);
}

.nb-slides__theme-select {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  background: var(--bone-2);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

.nb-slides__counter {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.4px;
  color: var(--ink-2);
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nb-slides__counter-sep {
  color: var(--ink-4);
  margin: 0 2px;
}

.nb-slides__iconbtn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0;
  transition:
    color 0.12s ease,
    background 0.12s ease;
}

.nb-slides__iconbtn:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

/* Segmented progress / jump strip — one tick per slide, click to jump. */
.nb-slides__progress {
  display: flex;
  gap: 4px;
  padding: 10px 20px 0;
  flex-shrink: 0;
}

.nb-slides__progress-seg {
  flex: 1 1 0;
  height: 4px;
  min-width: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.nb-slides__progress-seg:hover {
  background: color-mix(in srgb, var(--ink) 28%, transparent);
}

.nb-slides__progress-seg.is-done {
  background: color-mix(in srgb, var(--ink) 38%, transparent);
}

.nb-slides__progress-seg.is-active {
  background: var(--amber);
  transform: scaleY(1.6);
}

/* Row holding the stage and (in edit mode) the field-form panel. Sizes to the
   slide when viewing (no vertical centering gap); grows to fill while editing. */
.nb-slides__main {
  display: flex;
  flex: 0 1 auto;
  min-height: 0;
}

.nb-slides__main--edit {
  flex: 1 1 auto;
}

.nb-slides__stage {
  /* Fills the row width; the 16:9 frame inside defines the height so there is
     no vertical centering gap above/below the slide. */
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  /* extra bottom padding holds the card's drop shadow so it shows fully and
     never bleeds onto the note below */
  padding: 16px 28px 30px;
  min-height: 0;
  /* Recessed canvas so the white slide sheet stands out; faint dot texture
     gives the "deck" surface some depth without competing with the slide. */
  background:
    radial-gradient(
        circle at 1px 1px,
        color-mix(in srgb, var(--ink) 6%, transparent) 1px,
        transparent 0
      )
      0 0 / 22px 22px,
    var(--bone-2);
}

/* The slide is a 16:9 card: SlideScale fits it exactly (no leftover gap), and
   the frame supplies the rounded corners + drop shadow so it reads as a
   discrete sheet sitting on the canvas. max-height keeps it inside the stage
   on short viewports. */
.nb-slides__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(10, 10, 10, 0.06),
    0 12px 28px rgba(10, 10, 10, 0.18);
}

.nb-slides__note {
  flex: 0 0 auto;
  /* Compact, fixed reading area (≈ label + 3–4 lines) that does NOT change
     with content length — extra lines scroll inside instead of pushing into
     the slide. */
  height: clamp(84px, 13vh, 140px);
  padding: 14px 24px 16px;
  background: var(--bone);
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  /* amber keyline draws the eye to the note block */
  box-shadow: inset 3px 0 0 var(--amber);
  overflow-y: auto;
}

.nb-slides__note-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 6px;
}

.nb-slides__note-body {
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.nb-slides__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  flex-shrink: 0;
}

.nb-slides__navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 999px;
  padding: 0;
  transition:
    color 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}

.nb-slides__navbtn:hover:not(:disabled) {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}

.nb-slides__navbtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---- Slide editor: header text buttons + side field-form panel ---- */
.nb-slides__textbtn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 8px;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.nb-slides__textbtn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border-color: color-mix(in srgb, var(--ink) 36%, transparent);
}

.nb-slides__textbtn--primary {
  color: var(--bone);
  background: var(--ink);
  border-color: var(--ink);
}

.nb-slides__textbtn--primary:hover:not(:disabled) {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.nb-slides__textbtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nb-slides__edit {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bone);
  border-left: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.nb-slides__edit-head {
  flex-shrink: 0;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-slides__edit-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Auto-generated content form fields ---- */
.nb-edit__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nb-edit__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nb-edit__field--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.nb-edit__label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-4);
}

.nb-edit__label--group {
  color: var(--ink-3);
}

.nb-edit__input,
.nb-edit__textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bone-2);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  padding: 7px 9px;
}

.nb-edit__input:focus,
.nb-edit__textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--bone);
}

.nb-edit__textarea {
  resize: vertical;
}

.nb-edit__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 10px;
  border-left: 2px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-edit__row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.nb-edit__row-body {
  flex: 1;
  min-width: 0;
}

.nb-edit__rowbtn {
  flex-shrink: 0;
  margin-top: 2px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-4);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 7px;
}

.nb-edit__rowbtn:hover {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 60%, transparent);
}

.nb-edit__addbtn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-3);
  background: transparent;
  border: 1px dashed color-mix(in srgb, var(--ink) 26%, transparent);
  border-radius: 7px;
  padding: 5px 10px;
}

.nb-edit__addbtn:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 44%, transparent);
}

.nb-edit__empty {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-4);
}

/* ==========================================================================
   Design Playground - Editorial Neo-Brutalism & Midnight Theme Extensions
   ========================================================================== */

/* Midnight Archive 다크 모드 테마 변수 */
[data-theme="midnight"] {
  --bone: #13110f; /* 탄소 오닉스 블랙 */
  --bone-2: #1e1b18; /* 어두운 황토 블랙 */
  --bone-3: #2a2521; /* 묵직한 돌 가죽색 */
  --ink: #f5efe2; /* 황동 등불빛 웜 크림 */
  --ink-2: #dcd3be; /* 한지 에디션 서체 색상 */
  --ink-3: #a39983; /* 고서적 그레이 */
  --ink-4: #6b6250; /* 어두운 구분선 및 메타텍스트 */
  --rule: #363028; /* 어두운 책 격자선 */
  --terra: #e2583e; /* 심야의 타오르는 테라 레드 */
  --terra-ink: #fbd6cf; /* 밝은 붉은 서체 */
  --terra-wash: #481a11; /* 어두운 적와시 브라운 */
  --moss: #7aa056; /* 차분하게 빛나는 이끼록색 */
  --amber: #dca93a; /* 따뜻한 양초 황동색 */
}

/* 유기적 종이 노이즈 레이어 */
.paper-grain-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  opacity: var(--noise-opacity, 0.022); /* 컴포넌트 측 슬라이더로 조작 가능 */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

[data-theme="midnight"] .paper-grain-overlay {
  mix-blend-mode: screen; /* 다크 모드에서는 밝은 점들로 혼합 */
  opacity: calc(var(--noise-opacity, 0.022) * 1.5);
}

/* 에디토리얼 마이크로 키프레임 & 전환 효과 */
@keyframes inkBleed {
  0% {
    transform: scale(0);
    opacity: 0.8;
    filter: blur(5px);
  }
  40% {
    transform: scale(1);
    opacity: 0.6;
    filter: blur(2px);
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
    filter: blur(10px);
  }
}

.ink-loader-dot {
  width: 14px;
  height: 14px;
  background: var(--terra);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.ink-loader-bleed {
  position: absolute;
  inset: -6px;
  background: var(--terra);
  border-radius: 50%;
  animation: inkBleed 1.6s infinite cubic-bezier(0.1, 0.8, 0.3, 1);
  pointer-events: none;
}

/* 3D 책장 플립 효과 */
.book-perspective {
  perspective: 1200px;
}

.page-flip-enter {
  transform-origin: left center;
  transform: rotateY(-15deg);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease;
}

.page-flip-enter-active {
  transform: rotateY(0deg);
  opacity: 1;
}

/* 세련된 더블 보더 */
.editorial-double-border {
  border: 4px double var(--ink);
}

/* 네오 브루탈리스트 입체 효과 */
.brutalist-solid-shadow {
  box-shadow: 6px 6px 0 0 var(--ink);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brutalist-solid-shadow:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 0 var(--terra);
}

/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!../../node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Geist","arguments":[{"subsets":["latin"],"weight":["300","400","500","600"],"variable":"--font-sans","display":"swap"}],"variableName":"geist"} ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/f639721981034f88-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/9766a7e9e2e0ad5a-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/b66cf8e69499582a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/aa016aab0e6d1295-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/22a5144ee8d83bca-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/f639721981034f88-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/9766a7e9e2e0ad5a-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/b66cf8e69499582a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/aa016aab0e6d1295-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/22a5144ee8d83bca-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/f639721981034f88-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/9766a7e9e2e0ad5a-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/b66cf8e69499582a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/aa016aab0e6d1295-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/22a5144ee8d83bca-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/f639721981034f88-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/9766a7e9e2e0ad5a-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/b66cf8e69499582a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/aa016aab0e6d1295-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/22a5144ee8d83bca-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Geist Fallback';src: local("Arial");ascent-override: 95.94%;descent-override: 28.16%;line-gap-override: 0.00%;size-adjust: 104.76%
}.__className_34dee6 {font-family: 'Geist', 'Geist Fallback';font-style: normal
}.__variable_34dee6 {--font-sans: 'Geist', 'Geist Fallback'
}

/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!../../node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Instrument_Serif","arguments":[{"subsets":["latin"],"weight":"400","style":["normal","italic"],"variable":"--font-serif","display":"swap"}],"variableName":"instrumentSerif"} ***!
  \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/5ece437c7024c161-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/9cc5b37ab1350db7-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/35f3de0ebb1cfc70-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/e6099e249fd938cc-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Instrument Serif Fallback';src: local("Times New Roman");ascent-override: 117.94%;descent-override: 36.93%;line-gap-override: 0.00%;size-adjust: 83.94%
}.__className_1f5468 {font-family: 'Instrument Serif', 'Instrument Serif Fallback';font-weight: 400
}.__variable_1f5468 {--font-serif: 'Instrument Serif', 'Instrument Serif Fallback'
}

/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!../../node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"JetBrains_Mono","arguments":[{"subsets":["latin"],"weight":["300","400","500"],"variable":"--font-mono","display":"swap"}],"variableName":"jetbrainsMono"} ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/886030b0b59bc5a7-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/0aa834ed78bf6d07-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/67957d42bae0796d-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/f911b923c6adde36-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/939c4f875ee75fbb-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(/_next/static/media/bb3ef058b751a6ad-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/886030b0b59bc5a7-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/0aa834ed78bf6d07-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/67957d42bae0796d-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/f911b923c6adde36-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/939c4f875ee75fbb-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/bb3ef058b751a6ad-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/886030b0b59bc5a7-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/0aa834ed78bf6d07-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/67957d42bae0796d-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/f911b923c6adde36-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/939c4f875ee75fbb-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/bb3ef058b751a6ad-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'JetBrains Mono Fallback';src: local("Arial");ascent-override: 75.79%;descent-override: 22.29%;line-gap-override: 0.00%;size-adjust: 134.59%
}.__className_e4414d {font-family: 'JetBrains Mono', 'JetBrains Mono Fallback';font-style: normal
}.__variable_e4414d {--font-mono: 'JetBrains Mono', 'JetBrains Mono Fallback'
}

/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!../../node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Fraunces","arguments":[{"subsets":["latin"],"weight":["500"],"style":["normal"],"variable":"--font-brand","display":"swap"}],"variableName":"fraunces"} ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* vietnamese */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/a7a1f2c66d60f723-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/a7e332c88d9a043b-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/0e73b73c476c88d2-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Fraunces Fallback';src: local("Times New Roman");ascent-override: 84.71%;descent-override: 22.09%;line-gap-override: 0.00%;size-adjust: 115.45%
}.__className_2e35c2 {font-family: 'Fraunces', 'Fraunces Fallback';font-weight: 500;font-style: normal
}.__variable_2e35c2 {--font-brand: 'Fraunces', 'Fraunces Fallback'
}

/*!***************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/workspace.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************************/
/* 채팅 워크스페이스 재설계 표면 (ws-*). pg-*(editorial.css)는 design-playground 전용. */

/* ── 셸 ── */
.ws-shell {
  display: flex;
  height: 100dvh;
  background: var(--ws-bg);
  color: var(--ws-ink);
  font-family: var(--sans);
  position: relative;
}
.ws-sidebar-wrap {
  padding: 10px 0 10px 10px;
  flex-shrink: 0;
  height: 100%;
}
.ws-sidebar-wrap:has(.ws-sidebar.is-closed) {
  padding: 0;
}

/* ── 사이드바 (플로팅 패널) ── */
.ws-sidebar {
  width: 260px;
  height: 100%;
  background: color-mix(in srgb, var(--ws-terra) 2%, var(--ws-bg));
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(40, 35, 25, 0.04);
  overflow: hidden;
  transition:
    width 0.22s ease,
    opacity 0.22s ease;
}
.ws-sidebar.is-closed {
  width: 0;
  opacity: 0;
  border-width: 0;
}
.ws-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 12px;
}
.ws-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 브랜드 워드마크 — 마크 없이 "Xyren", 앞 글자 X 만 terra. */
.ws-brand__name {
  font-family: var(--font-brand), Georgia, serif;
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ws-ink);
}
.ws-brand__x {
  color: var(--ws-terra);
}
.ws-iconbtn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ws-ink-3);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.ws-iconbtn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ws-ink-2);
}
.ws-voice-btn--active {
  color: var(--ws-terra);
  background: color-mix(in srgb, var(--ws-terra) 10%, transparent);
}
.ws-voice-btn:disabled {
  opacity: 0.58;
  cursor: default;
}
.ws-voice-btn__spin {
  animation: ws-voice-spin 0.9s linear infinite;
}
@keyframes ws-voice-spin {
  to {
    transform: rotate(360deg);
  }
}
/* Task 7: 사이드바 닫힘 시 복원 버튼 — .ws-shell(position:relative) 기준 절대배치 */
.ws-sidebar-restore {
  position: absolute;
  top: 14px;
  left: 10px;
  z-index: 40;
}
.ws-sidebar__nav {
  padding: 2px 8px 0;
}
.ws-navrow {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ws-ink-2);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.ws-navrow:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ws-ink);
}
.ws-navrow svg {
  color: var(--ws-ink-3);
  flex-shrink: 0;
}
/* 아이콘 선두께 얇게 — design-playground 아이콘(IconProps strokeWidth 기본 2)이
   SVG attribute 라 CSS stroke-width 로 한 번에 override. 채팅 사이드바 + 노트북
   루트(home/shell) 공통으로 톤 통일. (오디오 컨트롤 .ws-nb-audio__* svg 는 자체
   stroke-width:2 명시 규칙이 있어 그대로 유지.) */
.ws-sidebar svg,
.ws-nb-home svg,
.ws-nb-shell svg {
  stroke-width: 1.5;
}
.ws-sidebar__list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}
/* 그룹 간 구분 = 여백만(구분선 없음). 섹션(고정/날짜 그룹) 사이 추가 공간. */
.ws-sidebar__list > div + div {
  margin-top: 4px;
}
.ws-group {
  font-size: 11px;
  color: var(--ws-ink-2);
  padding: 10px 10px 4px;
  font-weight: 700;
}
/* 고정 섹션 헤더 — 핀 아이콘은 nav(노트북) 아이콘과 동형: 같은 크기(15)·색(ink-3). */
.ws-group--fav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ws-group--fav svg {
  color: var(--ws-ink-3);
  flex-shrink: 0;
}

/* 로그인 리다이렉트 사이 화면(authReady 전) — 옛 .auth-* 대신 ws 톤. */
.ws-redirect {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 40px;
  box-sizing: border-box;
  background: radial-gradient(120% 120% at 50% 0%, #fffdf9, var(--ws-bg) 60%);
}
.ws-redirect__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.ws-redirect__kicker {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ws-terra);
  font-weight: 600;
}
.ws-redirect__title {
  font-family: var(--font-brand), Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ws-ink);
  margin: 2px 0 0;
}
.ws-redirect__copy {
  font-size: 13.5px;
  color: var(--ws-ink-3);
  margin: 0;
}
.ws-conv {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 3px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--ws-ink-2);
  cursor: pointer;
  line-height: 1.35;
  background: none;
  border: none;
  font-family: inherit;
}
.ws-conv:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-conv.is-active {
  background: #e5e5e4;
  color: var(--ws-ink);
  font-weight: 600;
}
.ws-conv__label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-conv__menu-btn {
  opacity: 0;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ws-ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.ws-conv:hover .ws-conv__menu-btn,
.ws-conv.is-menu-open .ws-conv__menu-btn,
.ws-conv__menu-btn:focus-visible {
  opacity: 1;
}
.ws-conv__menu-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ws-ink-2);
}
.ws-conv-menu {
  position: absolute;
  right: 6px;
  top: calc(100% - 2px);
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(40, 35, 25, 0.14);
  padding: 4px;
  z-index: 30;
  min-width: 132px;
}
.ws-conv-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
}
.ws-conv-menu__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--ws-ink-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ws-conv-menu__item svg {
  flex-shrink: 0;
  color: var(--ws-ink-3);
}
.ws-conv-menu__item:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-conv-menu__item--danger {
  color: #b3553f;
}
.ws-conv__rename {
  width: 100%;
  border: 1px solid var(--ws-line-2);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ws-ink);
  background: var(--ws-card);
  outline: none;
}
/* 계정 푸터 — 트리거 행 + 위로 펼치는 팝업 메뉴. position:relative 가 메뉴 앵커. */
.ws-sidebar__foot {
  position: relative;
  padding: 8px;
}
.ws-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #cfcabc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #5d594e;
  flex-shrink: 0;
}
/* 트리거 행 */
.ws-acct {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.ws-acct:hover,
.ws-acct.is-open {
  background: rgba(0, 0, 0, 0.05);
}
.ws-acct__who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ws-acct__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ws-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-acct__sub {
  font-weight: 400;
  color: var(--ws-ink-3);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-acct__chev {
  color: var(--ws-ink-4);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.ws-acct.is-open .ws-acct__chev {
  transform: rotate(180deg);
}
/* 팝업 메뉴 (트리거 위로) */
.ws-acct-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
}
.ws-acct-menu {
  position: absolute;
  bottom: calc(100% - 2px);
  left: 8px;
  right: 8px;
  z-index: 40;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(40, 35, 25, 0.16);
  padding: 5px;
}
.ws-acct-menu__head {
  padding: 8px 10px 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ws-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-acct-menu__sep {
  height: 1px;
  background: var(--ws-line);
  margin: 4px 0;
}
.ws-acct-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ws-ink-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ws-acct-menu__item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ws-ink);
}
.ws-acct-menu__item svg {
  color: var(--ws-ink-3);
  flex-shrink: 0;
}
.ws-acct-menu__item--danger {
  color: #b3553f;
}
.ws-acct-menu__item--danger:hover {
  background: #f6e8e4;
  color: #b3553f;
}
.ws-acct-menu__item--danger svg {
  color: #b3553f;
}

/* ── 메인 헤더 (슬림, 보더 없음) ── */
.ws-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ws-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 6px;
}
.ws-top__left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.ws-live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ws-ok);
  flex-shrink: 0;
  margin: 0 4px 0 6px;
  box-shadow: 0 0 0 3px rgba(93, 138, 102, 0.18);
  animation: ws-pulse 2.4s infinite;
}
.ws-live.is-idle {
  background: var(--ws-ink-4);
  box-shadow: none;
  animation: none;
}
@keyframes ws-pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(93, 138, 102, 0.06);
  }
}
.ws-top__title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  color: var(--ws-ink-2);
  padding: 4px 7px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: none;
  border: none;
  font-family: inherit;
  min-width: 0;
}
.ws-top__title:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ws-ink);
}
.ws-top__title svg {
  color: var(--ws-ink-4);
  flex-shrink: 0;
}
.ws-top__right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--ws-terra-wash);
  color: var(--ws-terra);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.ws-badge:hover {
  background: #f0e0d4;
}
.ws-nb-title {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ws-title-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(40, 35, 25, 0.12);
  padding: 6px;
  z-index: 60;
  min-width: 200px;
}
.ws-title-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ws-ink-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ws-title-menu__item:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-title-menu__item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ws-title-menu__item--danger {
  color: #b3553f;
}
.ws-title-menu__item--danger:hover {
  background: rgba(179, 85, 63, 0.08);
}
.ws-title-menu__slot {
  padding: 6px 8px;
}

/* ── 타임라인 ── */
.ws-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 0;
}
.ws-col {
  max-width: 880px;
  margin: 0 auto;
}

/* 레이아웃 통합 보정 — editorial.css(pg-*) 잔존 래퍼를 ws 토큰에 맞춤.
   ① pg-center/pg-msglist 의 흰색(--bone) 배경 제거 → Thread 루트의 --ws-bg 로 통일
   ② pg-msglist 직계 자식(스텝 행 포함)을 답변과 같은 740px 칼럼으로 센터링 */
.ws-shell .pg-center,
.ws-shell .pg-msglist,
.ws-nb-shell .pg-center,
.ws-nb-shell .pg-msglist {
  background: transparent;
}
/* 노트북 채팅 Q&A 래퍼 — editorial.css 가 --bone 을 박아 본문만 다른 색이었음.
   상/하단(--ws-bg)과 통일하려 투명화 → shell 의 --ws-bg 가 비친다. */
.ws-nb-shell .nb-workspace__chat {
  background: transparent;
}
.ws-shell .pg-msglist > *,
.ws-nb-shell .pg-msglist > * {
  max-width: 880px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* I2. 메시지 칼럼 센터링 */
.ws-msg-user-wrap,
.ws-msg-ai-wrap {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* C1. is-flash 애니메이션 */
.ws-msg-user-wrap.is-flash,
.ws-msg-ai-wrap.is-flash {
  animation: ws-flash 600ms ease;
}
@keyframes ws-flash {
  0% {
    background: var(--ws-terra-wash);
  }
  100% {
    background: transparent;
  }
}

/* I1. 인라인 코드 (ws-icode) */
.ws-icode {
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.92em;
  font-family: var(--mono);
}

.ws-msg-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-bottom: 8px;
}
.ws-msg-user__bubble {
  position: relative;
  background: var(--ws-user-bubble);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 78%;
  color: var(--ws-ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.ws-msg-user__bubble.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 오버레이 버튼 자리(22px)는 실제로 넘쳐서 '전체 보기' 버튼이 있을 때만 — 안 그러면
   짧은 1줄 질문에도 하단 여백이 빈 줄처럼 보임(:has 로 버튼 존재 시에만 적용). */
.ws-msg-user__bubble.is-clamped:has(.ws-msg-user__more) {
  padding-bottom: 22px;
}
/* 전체 보기 — 버블 내부 하단 중앙 오버레이(페이드). 클램프 마지막 줄 위에 표시. */
.ws-msg-user__more {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 30px;
  padding-bottom: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ws-ink-3);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  border-radius: 0 0 10px 10px;
}
.ws-msg-user__bubble.is-clamped .ws-msg-user__more {
  background: linear-gradient(
    to bottom,
    transparent,
    var(--ws-user-bubble) 70%
  );
}
.ws-msg-user__more:hover {
  color: var(--ws-terra);
}
/* 접기 — 펼친 상태: 텍스트 아래 정상 흐름 + 중앙. */
.ws-msg-user__more.is-expanded {
  position: static;
  height: auto;
  padding: 6px 0 0;
  background: none;
}
/* 본문 타이포 — 한국어 가독성/고급감 튜닝(C₊): 자간 조임 + keep-all + reading measure + weight 350.
   weight 350 은 Pretendard Variable 축(보통 400보다 가늘게 — 가볍고 차분한 본문);
   static 폴백 시 가장 가까운 정적 굵기로 스냅. font-size 는 전체 한 단계 더 다운(→13.5). */
.ws-msg-ai {
  margin-bottom: 30px;
  max-width: 780px;
  font-size: 14px;
  line-height: 1.72;
  letter-spacing: 0;
  word-break: keep-all;
  font-weight: 440;
  color: #1a1712;
  text-wrap: pretty;
}

/* ── 답변 마크다운 프로즈 (.md-body) — 채팅 + 공유뷰(/share) 공통 ──────────────
   chat/Markdown.tsx 의 흩어진 인라인 스타일을 여기로 중앙화. 요소별 튜닝은 이
   한 곳에서(CSS 핫리로드 즉시). 후손 선택자라 provenance 블록 쪼개기(.pg-prov-
   block 별 분리 렌더)와 무관하게 적용된다. 컨테이너 색/폰트/줄간격은 .ws-msg-ai
   (채팅)·.ws-sharepage(공유뷰)가 담당. */

/* 헤딩: top=섹션 분리(연속 헤더 collapse 시 적용)/bottom=헤더→내용 간격(본문
   top:0 이라 단독 결정). 색은 단계별 아니라 h2~h4 단일 회색(ink-3) — 본문(검정)과
   확실히 구분되는 조용한 톤. h1 만 최상위 앵커로 강한 ink. (토큰이라 다크모드
   대비 유지.) 사이즈는 전체 한 단계 더 다운. */
.md-body :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--serif);
}
.md-body :is(h2, h3, h4) {
  color: var(--ws-ink-3);
}
.md-body h1 {
  font-size: 20px;
  margin: 20px 0 15px;
}
.md-body h2 {
  font-size: 16px;
  margin: 18px 0 13px;
}
.md-body h3 {
  font-size: 14px;
  margin: 14px 0 11px;
}
.md-body h4 {
  font-size: 13px;
  margin: 12px 0 9px;
}

.md-body p {
  margin: 0 0 8px;
}
.md-body ul,
.md-body ol {
  margin: 0 0 8px;
  padding-left: 22px;
}
.md-body li {
  margin: 2px 0;
}
.md-body strong {
  font-weight: 600;
}
.md-body em {
  font-style: italic;
}
.md-body a {
  color: var(--terra-ink);
  text-decoration: underline;
}
.md-body blockquote {
  border-left: 2px solid var(--terra);
  margin: 8px 0;
  padding: 4px 12px;
  color: var(--ink-2);
  font-style: italic;
}
.md-body hr {
  border: 0;
  border-top: 1px solid rgba(42, 36, 30, 0.15);
  margin: 12px 0;
}
.md-body :not(pre) > code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bone-2);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--terra-ink);
}
.md-body pre {
  background: var(--ws-panel);
  color: var(--ws-ink);
  border: 1px solid var(--ws-line-2);
  padding: 11px 13px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
}
.md-body pre code {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  background: none;
  padding: 0;
  color: inherit;
}
/* mermaid 다이어그램 — 가운데 정렬, 가로 넘치면 스크롤. SVG 는 폭 자동. */
.md-body .md-mermaid {
  margin: 10px 0;
  text-align: center;
  overflow-x: auto;
}
.md-body .md-mermaid svg {
  max-width: 100%;
  height: auto;
}
/* 스트리밍/렌더 실패 시 원본 소스 폴백 — 일반 코드블록과 동일 톤. */
.md-body pre.md-mermaid__src {
  background: var(--ws-panel);
  color: var(--ws-ink);
  border: 1px solid var(--ws-line-2);
  padding: 11px 13px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
}
.md-body table {
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
  width: 100%;
}
.md-body th {
  border: 1px solid var(--ws-line-2);
  padding: 6px 9px;
  background: var(--ws-panel);
  text-align: left;
  font-weight: 600;
}
.md-body td {
  border: 1px solid var(--ws-line);
  padding: 6px 9px;
}

/* 답변이 헤더로 시작하면 헤더 margin-top 때문에 버블 상단에 빈 공간이 생긴다 →
   첫 요소만 top 마진 제거(채팅+공유뷰 공통). plain(.md-body>el) / provenance
   (.md-body>.pg-prov-block>el) 두 경로 모두 커버. 인라인 제거로 !important 불필요. */
.md-body > :first-child,
.md-body > .pg-prov-block:first-child > :first-child {
  margin-top: 0;
}

/* ── task-notification 칩 결과 펼침 ── */
.ws-tasknoti__result {
  margin: 6px 0 0 19px;
  padding-left: 11px;
  border-left: 1.5px solid var(--ws-line);
  font-size: 12.5px;
  color: var(--ws-ink-2);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
/* paused 칩 펼침의 승인/거절 액션 줄 + 에러/안내 텍스트 (H4) */
.ws-tasknoti__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.ws-tasknoti__error {
  margin: 6px 0 0 19px;
  font-size: 12px;
  color: #b3553f;
  line-height: 1.6;
}

/* ── 중간과정: 플레인 라인 ── */
.ws-proc {
  margin: 2px 0 14px;
}
.ws-pline {
  display: flex;
  align-items: baseline;
  gap: 7px;
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  color: var(--ws-ink-3);
  padding: 3px 0;
  line-height: 1.55;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.ws-pline:hover {
  color: var(--ws-ink-2);
}
.ws-pline__spark {
  color: var(--ws-terra);
  font-size: 12px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.ws-pline__verb {
  font-weight: 600;
  flex-shrink: 0;
}
.ws-pline__target {
  color: var(--ws-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-pline__plus {
  color: #3e7a4e;
  font-weight: 600;
}
.ws-pline__minus {
  color: #b3553f;
  font-weight: 600;
}
.ws-pline__chev {
  color: var(--ws-ink-4);
  font-size: 11px;
  flex-shrink: 0;
}
.ws-psub {
  margin: 1px 0 6px 19px;
  padding-left: 11px;
  border-left: 1.5px solid var(--ws-line);
  font-size: 12px;
  color: var(--ws-ink-3);
  line-height: 1.7;
}
.ws-prun {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ws-ink-3);
  padding: 3px 0;
}
.ws-prun__spin {
  color: var(--ws-terra);
  display: inline-block;
  animation: ws-rot 1.6s linear infinite;
}
@keyframes ws-rot {
  to {
    transform: rotate(360deg);
  }
}

/* ── HITL 인라인 카드 ── */
.ws-hitl {
  border: 1px solid #ecd9cc;
  background: var(--ws-terra-wash-2);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 14px 0;
  max-width: 560px;
}
.ws-hitl__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ws-ink);
}
.ws-hitl__icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--ws-terra);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.ws-hitl__body {
  font-size: 13px;
  color: var(--ws-ink-2);
  line-height: 1.65;
  margin-bottom: 12px;
}
.ws-hitl__body code {
  background: #fff;
  border: 1px solid var(--ws-line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: var(--mono);
}
.ws-btn-primary {
  background: var(--ws-terra);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.ws-btn-primary:hover {
  background: var(--ws-terra-deep);
}
.ws-btn-secondary {
  background: var(--ws-card);
  color: var(--ws-ink-2);
  border: 1px solid var(--ws-line-2);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.ws-btn-secondary:hover {
  background: var(--ws-terra-wash-2);
  border-color: var(--ws-line);
}

/* ── 컴포저 ── */
.ws-composer-wrap {
  padding: 10px 24px 18px;
}
.ws-composer {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(40, 35, 25, 0.07);
  padding: 8px 14px;
}
/* drag-active 시각 피드백 — 구 .pg-composer--drag-active .pg-composer__box 룰 대체 */
.ws-composer-wrap--drag-active .ws-composer {
  border: 1.5px dashed var(--ws-terra);
  box-shadow: 0 6px 24px rgba(201, 111, 74, 0.18);
}
/* 높이는 react-textarea-autosize 가 inline height!important 로 단독 관장
   (minRows 1 ~ maxRows 16). 1~16줄은 라이브러리가 height 를 내용에 정확히 맞춰
   overflow-y:auto 라도 스크롤바가 안 뜨고, 16줄 초과분만 스크롤된다. CSS 로는
   height/max-height/min-height 를 두지 않는다(라이브러리와 충돌). */
.ws-composer__textarea {
  width: 100%;
  box-sizing: border-box;
  border: none;
  outline: none;
  resize: none;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ws-ink);
  background: transparent;
  line-height: 1.5;
  padding: 5px 44px 5px 4px;
  overflow-y: auto;
}
.ws-composer__textarea::placeholder {
  color: var(--ws-ink-4);
}
/* 전송 = 입력 박스 안 우하단 (절대배치). */
.ws-composer__send {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ws-terra);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}
.ws-composer__send:hover {
  background: var(--ws-terra-deep);
}
.ws-composer__send:disabled {
  background: var(--ws-line-2);
  cursor: default;
}
/* "+" 추가 메뉴 — 컴포저가 하단이라 위로 펼침. */
.ws-composer__plus-wrap {
  position: relative;
  display: inline-flex;
}
.ws-composer-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
}
.ws-composer-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(40, 35, 25, 0.14);
  padding: 5px;
  z-index: 30;
  min-width: 170px;
}
.ws-composer-menu__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ws-ink-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ws-composer-menu__item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ws-ink);
}
.ws-composer-menu__item svg {
  color: var(--ws-ink-3);
  flex-shrink: 0;
}

/* 입력 박스 밑 컨트롤 바 (박스 밖, 테두리 없음). */
.ws-composer-bar {
  max-width: 880px;
  margin: 8px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px;
}
.ws-composer-bar__left {
  display: flex;
  align-items: center;
  gap: 3px;
}
.ws-composer-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* 충전 사용량 — 자리(placeholder). 데이터는 향후. */
.ws-charge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 350;
  color: var(--ws-ink-3);
}
.ws-charge__bar {
  width: 52px;
  height: 6px;
  border-radius: 3px;
  background: #ece8df;
  overflow: hidden;
}
.ws-charge__bar i {
  display: block;
  height: 100%;
  width: 35%;
  background: var(--ws-terra);
}
/* 모델 칩 */
/* 컴포저 우측 커넥터 칩 — ModelPicker 와 동일 룩, 좁은 팝오버(위로 열림) */
.ws-connchip__label { font-weight: 400; }
.ws-connchip__count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--ws-ok); color: #fff; font-size: 10.5px; font-weight: 700; }
.ws-connpanel { position: absolute; bottom: calc(100% + 8px); right: 0; width: 264px; max-width: 86vw; background: var(--ws-card); border: 1px solid var(--ws-line); border-radius: 14px; box-shadow: 0 16px 44px rgba(40,35,25,.18); overflow: hidden; z-index: 50; padding: 8px; }
.ws-connpanel__head { font-size: 11px; color: var(--ws-ink-4); padding: 4px 9px 7px; letter-spacing: .02em; }
.ws-connpanel__list { display: flex; flex-direction: column; gap: 2px; }
.ws-connpanel__empty { padding: 14px 9px; font-size: 12.5px; color: var(--ws-ink-3); text-align: center; }
.ws-connrow { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 9px; }
.ws-connrow:hover { background: var(--ws-terra-wash-2); }
.ws-connrow__icon { font-size: 15px; flex-shrink: 0; }
.ws-connrow__name { flex: 1; font-size: 13px; color: var(--ws-ink); }
.ws-connrow__on { font-size: 11.5px; color: var(--ws-ok); font-weight: 600; }
.ws-connrow__btn { border: 1px solid var(--ws-line-2); background: var(--ws-card); border-radius: 7px; padding: 3px 11px; font-size: 11.5px; font-weight: 600; color: var(--ws-terra-deep); cursor: pointer; }
.ws-connrow__btn:hover { background: var(--ws-terra-wash); border-color: var(--ws-line); }
.ws-connrow__btn:disabled { opacity: .55; cursor: default; }

.ws-modelchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ws-ink-2);
  padding: 5px 11px;
  border-radius: 99px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ws-modelchip:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-modelchip b {
  font-weight: 400;
}
.ws-modelchip__chev {
  color: var(--ws-ink-4);
}
/* 모델 선택 패널 (칩 위로 펼침) */
.ws-modelpick {
  position: relative;
}
.ws-modelpick__backdrop {
  position: fixed;
  inset: 0;
  z-index: 49;
}
.ws-modelpick__panel {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  display: flex;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(40, 35, 25, 0.18);
  overflow: hidden;
  z-index: 50;
  width: 720px;
  max-width: 86vw;
}
.ws-modelpick__list {
  flex: 1;
  padding: 16px 18px;
  max-height: 420px;
  overflow-y: auto;
}
.ws-modelpick__cols {
  column-count: 2;
  column-gap: 24px;
}
.ws-modelpick__group {
  break-inside: avoid;
}
.ws-modelpick__glabel {
  font-size: 11px;
  font-weight: 700;
  color: var(--ws-ink-3);
  letter-spacing: 0.4px;
  margin: 14px 0 6px;
}
.ws-modelpick__group:first-child .ws-modelpick__glabel {
  margin-top: 0;
}
.ws-modelpick__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ws-ink-2);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.ws-modelpick__item:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-modelpick__item.is-sel {
  background: var(--ws-terra-wash);
  color: var(--ws-terra);
  font-weight: 600;
}
.ws-modelpick__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ws-modelpick__iname {
  flex: 1;
  min-width: 0;
}
.ws-modelpick__badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--ws-terra-wash);
  color: var(--ws-terra);
  flex-shrink: 0;
}
.ws-modelpick__detail {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid var(--ws-line);
  background: var(--ws-bg);
  padding: 18px 20px;
}
.ws-modelpick__dhead {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ws-modelpick__davatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
}
.ws-modelpick__dname {
  font-size: 15px;
  font-weight: 600;
  color: var(--ws-ink);
}
.ws-modelpick__duse {
  margin-left: auto;
  font-size: 11px;
  color: var(--ws-ok);
  font-weight: 600;
}
.ws-modelpick__ddesc {
  font-size: 12.5px;
  color: var(--ws-ink-2);
  line-height: 1.6;
  margin: 12px 0;
}
.ws-modelpick__dtags {
  font-size: 12.5px;
  color: var(--ws-ink-3);
  margin-bottom: 14px;
}
.ws-modelpick__dtags span {
  margin-right: 8px;
}
.ws-modelpick__dspecs {
  font-size: 12.5px;
}
.ws-modelpick__drow {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
}
.ws-modelpick__drow .k {
  color: var(--ws-ink-3);
}
.ws-modelpick__drow .v {
  color: var(--ws-ink);
  font-weight: 500;
}

/* ── 빈 화면 ── */
.ws-welcome {
  text-align: center;
  padding: 96px 16px 24px;
}
/* 웰컴 제목 — 고딕(sans). */
.ws-welcome__title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 30px;
  color: var(--ws-ink);
  margin-bottom: 10px;
}
.ws-welcome__sub {
  font-size: 13.5px;
  color: var(--ws-ink-3);
}

/* 타임라인+컴포저 묶음. 빈 새 대화면 웰컴+컴포저를 중앙(약간 위)에 모으고,
   메시지가 생기면 타임라인이 채워지며 컴포저가 하단으로 내려간다. */
.ws-thread {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ws-thread__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ws-thread.is-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 56% 34% at 50% 48%,
      color-mix(in srgb, var(--ws-terra) 14%, transparent),
      transparent 70%
    ),
    radial-gradient(
      ellipse 42% 28% at 18% 45%,
      rgba(36, 152, 126, 0.11),
      transparent 72%
    ),
    radial-gradient(
      ellipse 42% 28% at 82% 45%,
      rgba(237, 164, 91, 0.13),
      transparent 72%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.34),
      transparent 26%,
      transparent 72%,
      rgba(255, 255, 255, 0.24)
    );
  transform: translateY(-1vh);
}
.ws-thread.is-empty > *,
.ws-thread.is-empty .ws-thread__main,
.ws-thread.is-empty .ws-composer-wrap {
  position: relative;
  z-index: 1;
}
.ws-thread.is-empty .ws-thread__main {
  justify-content: center;
  padding-bottom: 14vh;
}
.ws-thread.is-empty .pg-msglist {
  flex: 0 1 auto;
  overflow: visible;
}
.ws-thread.is-empty .ws-welcome {
  padding: 0 16px 14px;
}
.ws-thread.is-empty .ws-composer {
  border-color: color-mix(in srgb, var(--ws-terra) 18%, var(--ws-line));
  box-shadow:
    0 14px 44px rgba(145, 91, 54, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.54);
}

/* ── HITL 슬롯 ── */
.ws-hitl-slot {
  padding: 0 24px;
}
.ws-hitl-slot__inner {
  max-width: 880px;
  margin: 0 auto;
}

/* ── 검색 모달 ── */
.ws-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 20, 0.35);
  backdrop-filter: blur(2px);
  z-index: 80;
}
.ws-search {
  position: fixed;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 92vw);
  background: var(--ws-card);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(20, 16, 8, 0.35);
  overflow: hidden;
  z-index: 81;
}
.ws-search__input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ws-line);
  color: var(--ws-ink-3);
}
.ws-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--ws-ink);
  background: transparent;
}
.ws-search__sec {
  font-size: 11px;
  color: var(--ws-ink-3);
  font-weight: 600;
  padding: 12px 18px 4px;
}
.ws-search__row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13.5px;
  background: none;
  border: none;
  font-family: inherit;
  color: var(--ws-ink);
}
.ws-search__row:hover,
.ws-search__row.is-selected {
  background: var(--ws-terra-wash-2);
}
.ws-search__row-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ws-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ws-ink-3);
  flex-shrink: 0;
}
.ws-search__row-main {
  flex: 1;
  min-width: 0;
}
.ws-search__row-title {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-search__row-title mark {
  background: transparent;
  color: var(--ws-terra);
  font-weight: 700;
}
.ws-search__row-sub {
  color: var(--ws-ink-3);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.ws-search__row-when {
  font-size: 11px;
  color: var(--ws-ink-4);
  flex-shrink: 0;
}
.ws-search__empty {
  padding: 28px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--ws-ink-3);
}
.ws-search__foot {
  border-top: 1px solid var(--ws-line);
  padding: 9px 18px;
  font-size: 11px;
  color: var(--ws-ink-4);
  display: flex;
  gap: 14px;
}
.ws-kbd {
  background: var(--ws-panel);
  border: 1px solid var(--ws-line-2);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 10px;
}

/* ════ 노트북 (ws-nb-*) — spec 2026-06-11-notebook-redesign ════ */

/* ── 공통 상단 바 (홈) ── */
.ws-nb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
}
.ws-nb-top__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-nb-top__brand small {
  color: var(--ws-ink-3);
  font-size: 13px;
  font-family: Georgia, serif;
}
/* 홈 로고 — 상세(좌측 패널 .ws-nb-src-home)와 동일한 톤으로 통일: 테라코타 ✳ +
   sans 600/15px "노트북". .ws-brand 는 채팅 사이드바와 공유하므로 여기서만 오버라이드. */
.ws-nb-top__brand .ws-brand__mark {
  color: var(--ws-terra);
  font-size: 15px;
  line-height: 1;
}
.ws-nb-top__brand .ws-brand__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.ws-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ws-line);
  background: var(--ws-card);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12.5px;
  color: var(--ws-ink-2);
  cursor: pointer;
  font-family: inherit;
}
.ws-pill:hover {
  border-color: var(--ws-line-2);
}
/* 기본은 진한 테라코타(기존 hover 모양). hover 는 색 대신 살짝 떠오르는 그림자 효과. */
.ws-pill--primary {
  background: var(--ws-terra-deep);
  border-color: var(--ws-terra-deep);
  color: #fff;
  font-weight: 600;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.ws-pill--primary:hover {
  background: var(--ws-terra-deep);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--ws-terra) 38%, transparent);
  transform: translateY(-1px);
}

/* ── 홈 ── */
.ws-nb-home {
  min-height: 100dvh;
  background: var(--ws-panel);
  color: var(--ws-ink);
  font-family: var(--sans);
}
.ws-nb-home__body {
  padding: 10px clamp(20px, 3vw, 48px) 48px;
  max-width: 1360px;
  margin: 0 auto;
}
.ws-nb-home__greet {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 26px 0 4px;
}
.ws-nb-home__sub {
  font-size: 13px;
  color: var(--ws-ink-3);
  margin-bottom: 22px;
}
.ws-nb-home__tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ws-seg {
  display: inline-flex;
  background: var(--ws-panel);
  border-radius: 8px;
  padding: 2px;
}
.ws-seg button {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ws-ink-3);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.ws-seg button.is-on {
  background: var(--ws-card);
  color: var(--ws-ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.ws-nb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.ws-nb-card {
  position: relative;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(40, 35, 25, 0.03);
  text-align: left;
  font-family: inherit;
}
.ws-nb-card:hover {
  border-color: var(--ws-line-2);
  box-shadow: 0 4px 14px rgba(40, 35, 25, 0.08);
}
.ws-nb-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--ws-terra-wash-2);
  border: 1px solid var(--ws-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 13px;
}
.ws-nb-card__title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  flex: 1;
  color: var(--ws-ink);
}
.ws-nb-card__meta {
  font-size: 11.5px;
  color: var(--ws-ink-3);
  margin-top: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
}
/* 기본을 기존 hover 모양(테라코타 글자+테두리)으로. hover 는 은은한 테라 채움으로 구분. */
.ws-nb-card--new {
  border-style: dashed;
  background: transparent;
  align-items: center;
  justify-content: center;
  color: var(--ws-terra);
  border-color: var(--ws-terra);
  box-shadow: none;
  transition: background 0.15s ease;
}
.ws-nb-card--new:hover {
  color: var(--ws-terra);
  border-color: var(--ws-terra);
  background: color-mix(in srgb, var(--ws-terra) 7%, transparent);
  box-shadow: none;
}
.ws-nb-card:hover .ws-conv__menu-btn,
.ws-nb-card.is-menu-open .ws-conv__menu-btn {
  opacity: 1;
}
/* 카드 케밥(⋯)은 기본 케밥보다 한 단계 진하게. */
.ws-nb-card .ws-conv__menu-btn {
  color: var(--ws-ink-2);
}
.ws-nb-card .ws-conv-menu {
  top: 38px;
  right: 10px;
}
.ws-nb-card__shade {
  display: none;
}
.ws-nb-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.ws-nb-card__cover-desc {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ws-ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ws-nb-card--cover {
  min-height: 220px;
  padding: 22px 26px 24px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  justify-content: flex-end;
}
.ws-nb-card--cover .ws-nb-card__shade {
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.16) 42%,
    rgba(0, 0, 0, 0.72) 100%
  );
  pointer-events: none;
}
.ws-nb-card--cover .ws-nb-card__content {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
}
.ws-nb-card--cover .ws-nb-card__title {
  flex: 0;
  color: #fff;
  font-size: 21px;
  line-height: 1.18;
  font-weight: 700;
}
.ws-nb-card--cover .ws-nb-card__cover-desc {
  color: rgba(255, 255, 255, 0.78);
}
.ws-nb-card--cover .ws-nb-card__meta {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
}
.ws-nb-card--cover .ws-conv__menu-btn {
  opacity: 1;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border-color: transparent;
}
.ws-nb-card--cover .ws-conv__menu-btn:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.16);
  border-color: rgba(255, 255, 255, 0.18);
}
.ws-nb-coverbar {
  width: calc(100% - 32px);
  max-width: 880px;
  min-height: 132px;
  margin: 0 auto 14px;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(40, 35, 25, 0.05);
}
.ws-nb-coverbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.32));
  pointer-events: none;
}
.ws-nb-coverbar__caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 24px);
  border-radius: 8px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--ws-card) 90%, transparent);
  color: var(--ws-ink-2);
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(5px);
}
.nb-cover__backdrop {
  position: fixed;
  inset: 0;
  z-index: 112;
  background: color-mix(in srgb, var(--ws-ink) 46%, transparent);
  backdrop-filter: blur(2px);
}
.nb-cover {
  position: fixed;
  z-index: 113;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 40px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 22px 24px 20px;
  background: var(--ws-bg);
  border: 1px solid var(--ws-line-2);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(40, 35, 25, 0.28);
  color: var(--ws-ink);
  font-family: var(--sans);
}
.nb-cover__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.nb-cover__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ws-ink);
}
.nb-cover__desc {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ws-ink-3);
}
.nb-cover__preview {
  height: 190px;
  border: 1px dashed var(--ws-line-2);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ws-terra) 4%, var(--ws-card));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.nb-cover__preview.has-image {
  border-style: solid;
  border-color: var(--ws-line);
}
.nb-cover__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ws-ink-3);
  font-size: 12.5px;
}
.nb-cover__sources {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}
.nb-cover__source {
  border: 1px solid var(--ws-line);
  border-radius: 999px;
  background: var(--ws-card);
  color: var(--ws-ink-2);
  font-family: inherit;
  font-size: 12.5px;
  padding: 7px 12px;
  cursor: pointer;
}
.nb-cover__source.is-active {
  border-color: var(--ws-terra);
  color: var(--ws-terra);
  background: color-mix(in srgb, var(--ws-terra) 7%, transparent);
}
.nb-cover__source:disabled {
  opacity: 0.45;
  cursor: default;
}
.nb-cover__file {
  display: none;
}
.nb-cover__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ws-ink-2);
}
.nb-cover__field textarea {
  resize: vertical;
  min-height: 76px;
  border: 1px solid var(--ws-line-2);
  border-radius: 10px;
  background: var(--ws-card);
  color: var(--ws-ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 10px;
  outline: none;
}
.nb-cover__field textarea:focus {
  border-color: var(--ws-terra);
}
.nb-cover__error {
  margin-top: 8px;
  color: #b3553f;
  font-size: 12px;
}
.nb-cover__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.nb-cover__actionset {
  display: flex;
  gap: 8px;
}
.nb-cover__clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: #b3553f;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 8px 0;
}
.nb-cover__clear:disabled {
  opacity: 0.4;
  cursor: default;
}
@media (max-width: 720px) {
  .ws-nb-coverbar {
    width: calc(100% - 20px);
    min-height: 112px;
  }
  .nb-cover__sources {
    flex-wrap: wrap;
  }
  .nb-cover__actions {
    align-items: stretch;
    flex-direction: column;
  }
  .nb-cover__actionset {
    justify-content: flex-end;
  }
}

/* ── 상세 3패널 셸 ── */
.ws-nb-shell {
  display: flex;
  height: 100dvh;
  background: var(--ws-bg);
  color: var(--ws-ink);
  font-family: var(--sans);
  position: relative;
}
.ws-nb-left-wrap {
  padding: 10px 0 10px 10px;
  flex: 1 1 25%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}
.ws-nb-left {
  min-width: 0;
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--ws-terra) 2%, var(--ws-bg));
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(40, 35, 25, 0.04);
  overflow: hidden;
  transition:
    width 0.22s ease,
    opacity 0.22s ease;
}
.ws-nb-left.is-closed {
  width: 0;
  opacity: 0;
  border-width: 0;
}
.ws-nb-left-wrap:has(.ws-nb-left.is-closed) {
  padding: 0;
  flex: 0 0 0;
}
.ws-nb-right-wrap {
  padding: 10px 10px 10px 0;
  flex: 1 1 25%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}
.ws-nb-right {
  min-width: 0;
  width: 100%;
  height: 100%;
  background: color-mix(in srgb, var(--ws-terra) 2%, var(--ws-bg));
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(40, 35, 25, 0.04);
  overflow: hidden;
  transition:
    width 0.22s ease,
    opacity 0.22s ease;
}
.ws-nb-right.is-closed {
  width: 0;
  opacity: 0;
  border-width: 0;
}
.ws-nb-right-wrap:has(.ws-nb-right.is-closed) {
  padding: 0;
  flex: 0 0 0;
}
.ws-nb-center {
  flex: 2 1 50%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ws-nb-left-wrap,
.ws-nb-center,
.ws-nb-right-wrap {
  transition: flex-basis 0.18s ease;
}
.ws-nb-shell.is-studio-detail-open
  .ws-nb-left-wrap:not(:has(.ws-nb-left.is-closed)) {
  flex-basis: 20%;
}
.ws-nb-shell.is-studio-detail-open .ws-nb-center {
  flex-basis: 40%;
}
.ws-nb-shell.is-studio-detail-open
  .ws-nb-right-wrap:not(:has(.ws-nb-right.is-closed)) {
  flex-basis: 40%;
}

/* ── 출처 패널 ── */
/* 우상단 닫기(접기) 아이콘 — 헤더는 채팅과 공유 클래스(.ws-sidebar__head)라 노트북
   좌측 패널에서만 우측 패딩 키워 아래 콘텐츠(체크박스/검색 28px 라인)와 정렬. */
.ws-nb-left .ws-sidebar__head {
  padding-left: 18px;
  padding-right: 20px;
}
/* 좌상단 "노트북" — 정자체(sans) 텍스트 + ✳ 마크, 클릭 시 노트북 목록(이전 화살표 대체). */
.ws-nb-src-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 4px 6px;
  margin-left: -6px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.ws-nb-src-home:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-nb-src-home__mark {
  color: var(--ws-terra);
  font-size: 15px;
  line-height: 1;
}
.ws-nb-src-home__name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--ws-ink);
  letter-spacing: -0.01em;
}
.ws-nb-src-home:hover .ws-nb-src-home__name {
  color: var(--ws-terra);
}
/* scrollbar-gutter: stable — 스크롤바 공간을 항상 예약해 스크롤 유무와 무관하게
   목록 콘텐츠 위치 고정(스크롤바 생길 때 좌우로 밀리는 jitter 제거). 검색/툴바·
   행 체크박스가 항상 같은 우측선(8 리스트 + 10 gutter + 10 행 = 28px)에 정렬. */
.ws-nb-src-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 8px 8px 0;
}
.ws-nb-src {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--ws-ink-2);
  border-radius: 9px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.ws-nb-src:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-nb-src.is-active {
  background: #e5e5e4;
}
/* 행 체크박스 — order 로 맨 우측(점세개 케밥 뒤). margin:0 으로 행 padding(18px)
   경계에 딱 붙여 검색창 우측·상단 전체선택 체크박스와 정렬. */
.ws-nb-src input[type="checkbox"] {
  accent-color: var(--ws-terra);
  flex-shrink: 0;
  order: 99;
  margin: 0;
}
.ws-nb-src__type {
  width: 26px;
  height: 24px;
  border-radius: 7px;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 500;
  color: var(--ws-ink-3);
  flex-shrink: 0;
}
.ws-nb-src__name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 출처 행 케밥 — ws-conv__menu-btn 는 .ws-conv:hover 트리거에만 반응하므로
   ws-nb-src 행에도 같은 패턴으로 별도 트리거 추가. */
.ws-nb-src:hover .ws-conv__menu-btn,
.ws-nb-src.is-menu-open .ws-conv__menu-btn {
  opacity: 1;
}
/* 출처 패널 상단 보조 행 (select-all/검색/필터) */
/* 우측 패딩 28px = 행 콘텐츠 우측(리스트 8 + gutter 10 + 행 10)과 같게 → 전체선택
   체크박스가 개별 행 체크박스·검색창 우측과 세로 정렬(scrollbar-gutter 예약폭 포함). */
.ws-nb-src-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 4px 28px 2px 18px;
}
.ws-nb-src-toolbar input[type="checkbox"] {
  accent-color: var(--ws-terra);
  margin: 0;
}
/* 전체선택 — 회색 텍스트 + 체크박스(클릭 영역 label). */
.ws-nb-src-toolbar__all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ws-ink-3);
  cursor: pointer;
}
.ws-nb-src-search-wrap {
  position: relative;
}
.ws-nb-src-search {
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid var(--ws-line);
  border-radius: 7px;
  padding: 4px 26px 4px 8px;
  background: var(--ws-card);
  color: var(--ws-ink);
  outline: none;
}
.ws-nb-src-search:focus {
  border-color: var(--ws-terra);
}
/* 검색어 클리어 X — input 우측 안쪽. */
.ws-nb-src-search-clear {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  color: var(--ws-ink-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.ws-nb-src-search-clear:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ws-ink);
}

/* ── 중앙 헤더 메타/세그먼트 ── */
.ws-top__meta {
  font-size: 11.5px;
  color: var(--ws-ink-4);
  margin-left: 4px;
  white-space: nowrap;
}

/* ── 중앙 채팅 래퍼 — 옛 .nb-workspace__center 의 flex column 역할.
   note 탭에서는 inline display:none 으로 숨김 (provider stack unmount 금지). */
.ws-nb-chatwrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ws-nb-chatwrap > .ws-nb-chat-topbar,
.ws-nb-chatwrap > .ws-composer-wrap,
.ws-nb-chatwrap > .ws-hitl-slot {
  flex: 0 0 auto;
}
/* 채팅 기록 삭제 버튼 행 — 구식 "채팅" 타이틀 스트립 대체. 배경/보더 없음. */
.ws-nb-chat-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 4px 8px 0;
}

/* ── 스튜디오 패널 ── */
.ws-nb-stu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ws-ink);
}
.ws-nb-stu__group {
  font-size: 11px;
  color: var(--ws-ink-3);
  font-weight: 600;
  padding: 10px 14px 6px;
}
.ws-nb-stu__grouprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 10px;
}
.ws-nb-stu__grouprow .ws-nb-stu__group {
  padding-right: 0;
}
.ws-nb-stu__addnote {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ws-ink-3);
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 8px;
}
.ws-nb-stu__addnote:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ws-ink);
}
.ws-nb-stu__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 10px;
}
.ws-nb-tile,
.ws-nb-art {
  --studio-tone: var(--ws-terra);
}
.ws-nb-kind--audio {
  --studio-tone: #2563eb;
}
.ws-nb-kind--presentation {
  --studio-tone: #7c3aed;
}
.ws-nb-kind--report {
  --studio-tone: #0f766e;
}
.ws-nb-kind--infographic {
  --studio-tone: var(--ws-terra);
}
.ws-nb-kind--infomix {
  --studio-tone: #9333ea;
}
.ws-nb-kind--video {
  --studio-tone: #dc2626;
}
.ws-nb-kind--mindmap {
  --studio-tone: #16a34a;
}
.ws-nb-kind--flashcard {
  --studio-tone: #d97706;
}
.ws-nb-kind--quiz {
  --studio-tone: #0891b2;
}
.ws-nb-kind--table {
  --studio-tone: #475569;
}
.ws-nb-kind--note {
  --studio-tone: #b45309;
}
.ws-nb-kind--default {
  --studio-tone: var(--ws-terra);
}
.ws-nb-tile {
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12px;
  color: var(--ws-ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  text-align: left;
}
.ws-nb-tile:hover {
  border-color: color-mix(in srgb, var(--studio-tone) 45%, var(--ws-line));
  color: var(--ws-ink);
}
.ws-nb-tile:disabled {
  opacity: 0.45;
  cursor: default;
}
.ws-nb-tile:disabled:hover {
  border-color: var(--ws-line);
  color: var(--ws-ink-2);
}
.ws-nb-tile svg,
.ws-nb-tile .ic {
  color: var(--studio-tone);
  flex-shrink: 0;
}
.ws-nb-stu__more {
  margin: 8px 10px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--ws-ink-3);
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  background: none;
  border: none;
  font-family: inherit;
  width: calc(100% - 20px);
}
.ws-nb-stu__more:hover {
  background: rgba(0, 0, 0, 0.04);
}
.ws-nb-stu__list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 10px;
}
.ws-nb-art {
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 20px);
  text-align: left;
  background: none;
  border: none;
  border-radius: 9px;
  padding: 7px 10px;
  margin: 0 10px 2px;
  cursor: pointer;
  font-family: inherit;
  overflow: hidden;
}
.ws-nb-art:hover .ws-nb-art__title {
  color: var(--studio-tone);
}
.ws-nb-art__icon {
  width: 24px;
  height: 30px;
  color: var(--studio-tone);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.ws-nb-art__main {
  flex: 1;
  min-width: 0;
}
.ws-nb-art__title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ws-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-nb-art__meta {
  color: var(--ws-ink-3);
  font-size: 10.5px;
}
/* 산출물 상태 배지 — 사용자 요청으로 숨김(평문 리스트). 상태는 아래 점/shimmer 로. */
.ws-nb-status {
  display: none;
}
/* 실패 — 제목 앞 작은 빨간 점(앞쪽이라 ellipsis 클립 안 됨). */
.ws-nb-art__faildot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #d6442e;
  vertical-align: middle;
  flex-shrink: 0;
}
/* 생성 중 — 행 전체 흐름 + 아이콘 자리 스피너. */
.ws-nb-art.is-loading {
  background: color-mix(in srgb, var(--studio-tone) 3%, transparent);
}
.ws-nb-art.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    color-mix(in srgb, var(--studio-tone) 13%, transparent) 48%,
    transparent 76%
  );
  pointer-events: none;
  transform: translateX(-120%);
  animation: ws-nb-art-flow 1.9s ease-in-out infinite;
}
.ws-nb-art.is-loading > * {
  position: relative;
  z-index: 1;
}
.ws-nb-art.is-loading .ws-nb-art__title {
  color: var(--ws-ink);
}
.ws-nb-art.is-loading .ws-nb-art__icon svg {
  display: none;
}
.ws-nb-art.is-loading .ws-nb-art__icon::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--studio-tone) 24%, transparent);
  border-top-color: var(--studio-tone);
  animation: ws-nb-art-spin 1.05s linear infinite;
}
@keyframes ws-nb-art-flow {
  to {
    transform: translateX(120%);
  }
}
@keyframes ws-nb-art-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ws-nb-art.is-loading::before,
  .ws-nb-art.is-loading .ws-nb-art__icon::before {
    animation: none;
  }
  .ws-nb-art.is-loading::before {
    transform: none;
    opacity: 0.55;
  }
}

/* ── 중앙 개요(통합 요약) — 플레인, 타임라인 칼럼 폭 (Task 5) ── */
/* 통합 요약 + 추천 질문 — 한 박스로 묶음. 흰색 계열 배경과 약한 테두리로
   본문(--ws-bg)과 구분. */
.ws-nb-overview {
  padding: 20px 22px;
  background: var(--ws-card);
  border: 1px solid color-mix(in srgb, var(--ws-line) 62%, transparent);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(40, 35, 25, 0.04);
}
.ws-nb-overview__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ws-ink-3);
  margin: 0 0 8px;
}
.ws-nb-overview__summary {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ws-ink);
  margin: 0 0 10px;
  white-space: pre-wrap;
}
.ws-nb-overview__placeholder {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ws-ink-3);
  margin: 0 0 10px;
}
.ws-nb-overview__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.ws-nb-overview__topic {
  font-size: 11.5px;
  color: var(--ws-ink-2);
  background: var(--ws-terra-wash-2);
  border: 1px solid var(--ws-line);
  border-radius: 99px;
  padding: 3px 10px;
}
.ws-nb-overview__note {
  font-size: 12px;
  color: var(--ws-terra);
  margin: 0 0 10px;
}
.ws-nb-overview__skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
}
.ws-nb-overview__skeleton span {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--ws-panel),
    var(--ws-line),
    var(--ws-panel)
  );
  background-size: 200% 100%;
  animation: ws-nb-skel 1.2s linear infinite;
}
@keyframes ws-nb-skel {
  to {
    background-position: -200% 0;
  }
}
.ws-nb-overview__actionbar {
  margin: 0 0 16px;
}
.ws-nb-overview__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* 추천 질문 — 배지 아닌 평문, 세로 나열. 클릭 가능(버튼)이되 링크 톤. */
.ws-nb-overview__qlist {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.ws-nb-overview__q {
  display: flex;
  align-items: baseline;
  gap: 7px;
  border: none;
  background: none;
  padding: 3px 0;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ws-ink-2);
  text-align: left;
  cursor: pointer;
}
.ws-nb-overview__q::before {
  content: "•";
  color: var(--ws-ink-3);
  flex-shrink: 0;
}
.ws-nb-overview__q:hover {
  color: var(--ws-terra);
}
.ws-nb-overview__q:hover::before {
  color: var(--ws-terra);
}

/* ── 컴포저 하단 출처 컨텍스트 칩 — ws-pill 톤, 경고 시 테라코타 ── */
/* 출처 컨텍스트 — 순수 텍스트(메인 채팅 하단 정보 톤). 경고 시 테라코타. */
.ws-nb-ctx {
  font-size: 12px;
  color: var(--ws-ink-3);
}
.ws-nb-ctx--warn {
  color: var(--ws-terra);
}

/* ── 중앙 노트 탭 — 좌 목록(220px) + 우 에디터 카드 ── */
.ws-nb-notes {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
  padding: 10px 16px 16px;
}
.ws-nb-notes__list {
  width: 220px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 0 2px;
}
.ws-nb-notes__title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-nb-notes .ws-conv.is-pending {
  opacity: 0.5;
  cursor: default;
}
.ws-nb-notes__editor {
  flex: 1;
  min-width: 0;
  display: flex;
}
.ws-nb-notes__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px dashed var(--ws-line-2);
  border-radius: 14px;
  color: var(--ws-ink-3);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}
.ws-nb-notes__empty p {
  margin: 0;
  line-height: 1.7;
  max-width: 320px;
}
.ws-nb-note-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(40, 35, 25, 0.04);
  overflow: hidden;
}
.ws-nb-note-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 6px;
}
.ws-nb-note-card__title {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ws-ink);
  padding: 2px 0;
}
.ws-nb-note-card__title::placeholder {
  color: var(--ws-ink-4);
}
.ws-nb-note-card__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 10px;
}
.ws-nb-note-card__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--ws-line);
}
.ws-nb-note-card__foot .ws-pill:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── 스튜디오 패널 (Task 6) ── */
.ws-nb-stu {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.ws-nb-art {
  position: relative;
}
.ws-nb-art__hit {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
}
.ws-nb-art__hit:disabled {
  cursor: default;
}
.ws-nb-art:hover .ws-conv__menu-btn,
.ws-nb-art.is-menu-open .ws-conv__menu-btn {
  opacity: 1;
}
.ws-nb-art.is-selected .ws-nb-art__title {
  color: var(--studio-tone);
}
.ws-nb-art__ops {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.ws-nb-art__op {
  background: none;
  border: 1px solid var(--ws-line);
  border-radius: 7px;
  font-size: 10.5px;
  color: var(--ws-ink-2);
  padding: 2px 7px;
  cursor: pointer;
  font-family: inherit;
}
.ws-nb-art__op:hover {
  border-color: var(--ws-line-2);
  color: var(--ws-ink);
}
/* 산출물 케밥 메뉴 — portal + openStudioResultMenu 의 fixed 좌표 (inline left/top) */
.ws-nb-art-menu {
  position: fixed;
  top: auto;
  right: auto;
  z-index: 120;
  min-width: 180px;
}
.ws-conv-menu__item:disabled {
  opacity: 0.5;
  cursor: default;
  background: none;
}
.ws-nb-stu__empty {
  padding: 18px 14px;
  font-size: 12px;
  color: var(--ws-ink-3);
  text-align: center;
}

/* ── 산출물 마스터-디테일 — 출처 패널과 동일 패턴(목록↔상세 인패널 교체).
   클릭한 항목만 상세로, 콘텐츠는 패널 폭에 맞춰 축소 표시. ── */
.ws-nb-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.ws-nb-detail__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px;
}
.ws-nb-detail__back {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--ws-ink-2);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.ws-nb-detail__back:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ws-ink);
}
.ws-nb-detail__title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ws-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-nb-detail__actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.ws-nb-detail__act {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ws-ink-2);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.ws-nb-detail__act:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ws-ink);
}
.ws-nb-detail__act--danger {
  color: #b3553f;
}
.ws-nb-detail__act--danger:hover {
  background: rgba(179, 85, 63, 0.08);
}
.ws-nb-detail__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 14px;
}
.ws-nb-detail__empty {
  font-size: 12.5px;
  color: var(--ws-ink-3);
  padding: 16px 4px;
}
.ws-nb-detail__imgwrap {
  display: block;
  width: 100%;
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ws-card);
}
.ws-nb-detail__imgwrap img {
  display: block;
  width: 100%;
  height: auto;
}
.ws-nb-detail__mindmap {
  width: 100%;
  height: 440px;
}
.ws-nb-detail__report {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ws-ink);
}
/* 메모 인패널 편집기 (구 노트 탭 카드 → 스튜디오 상세). */
.ws-nb-note-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.ws-nb-note-detail__title {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid var(--ws-line);
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ws-ink);
  padding: 4px 2px;
  outline: none;
}
.ws-nb-note-detail__body {
  min-height: 220px;
}
.ws-nb-note-detail__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

/* 오디오 오버뷰 재생기 — 패널 하단 고정 */
.ws-nb-audio {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--ws-line);
  background: var(--ws-card);
}
.ws-nb-audio__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ws-nb-audio__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ws-nb-audio__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ws-ink);
  line-height: 1.3;
}
.ws-nb-audio__kicker {
  font-size: 10.5px;
  color: var(--ws-ink-3);
}
.ws-nb-audio__actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.ws-nb-audio__icon-btn,
.ws-nb-audio__close {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--ws-ink-3);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.ws-nb-audio__icon-btn:hover,
.ws-nb-audio__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ws-ink);
}
.ws-nb-audio__icon-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.ws-nb-audio__icon-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ws-nb-audio__icon-btn.is-danger {
  color: #b3553f;
}
.ws-nb-audio__control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.ws-nb-audio__control audio {
  display: none;
}
.ws-nb-audio__loading,
.ws-nb-audio__error {
  font-size: 12px;
  color: var(--ws-ink-3);
  padding: 6px 0;
}
.ws-nb-audio__error {
  color: #b3553f;
}
.ws-nb-audio__progress {
  width: 100%;
  height: 18px;
  accent-color: var(--ws-terra);
  cursor: pointer;
}
.ws-nb-audio__progress:disabled {
  cursor: wait;
  opacity: 0.55;
}
.ws-nb-audio__time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ws-ink-3);
}
.ws-nb-audio__controls {
  display: grid;
  grid-template-columns: 44px 40px 48px 40px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.ws-nb-audio__rate,
.ws-nb-audio__skip,
.ws-nb-audio__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  background: none;
}
.ws-nb-audio__rate {
  color: var(--ws-terra);
  font-size: 12.5px;
  min-height: 36px;
  border-radius: 9px;
}
.ws-nb-audio__skip {
  border-radius: 999px;
  color: var(--ws-terra);
  min-height: 36px;
}
.ws-nb-audio__skip svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ws-nb-audio__skip text {
  fill: currentColor;
  stroke: none;
  font-size: 6px;
  font-weight: 700;
}
.ws-nb-audio__rate:hover,
.ws-nb-audio__skip:hover {
  background: var(--ws-terra-wash);
}
.ws-nb-audio__play {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--ws-terra);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(201, 111, 74, 0.3);
}
.ws-nb-audio__play:hover {
  background: var(--ws-terra-deep);
}

/* 오디오 상세 다이얼로그 */
.ws-nb-details__backdrop {
  position: fixed;
  inset: 0;
  z-index: 104;
  background: rgba(38, 36, 31, 0.36);
  backdrop-filter: blur(2px);
}
.ws-nb-details {
  position: fixed;
  z-index: 105;
  top: 50%;
  left: 50%;
  width: min(680px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 56px));
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%);
  border: 1px solid var(--ws-line-2);
  border-radius: 14px;
  background: var(--ws-card);
  box-shadow: 0 22px 54px rgba(40, 35, 25, 0.28);
  overflow: hidden;
  font-family: var(--sans);
}
.ws-nb-details__head {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ws-line);
  background: var(--ws-panel);
}
.ws-nb-details__head p {
  margin: 0 0 4px;
  color: var(--ws-terra);
  font-size: 11px;
  font-weight: 600;
}
.ws-nb-details__head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ws-ink);
}
.ws-nb-details__head button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 9px;
  background: none;
  color: var(--ws-ink-2);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.ws-nb-details__head button:hover {
  background: rgba(0, 0, 0, 0.05);
}
.ws-nb-details__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 18px;
}
.ws-nb-details__body section + section {
  margin-top: 16px;
}
.ws-nb-details__body h3 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ws-ink-3);
}
.ws-nb-details__body pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  background: var(--ws-panel);
  color: var(--ws-ink);
  padding: 10px;
  font-size: 11.5px;
  line-height: 1.5;
}

/* ===================== Login (재설계) ===================== */
/* full-viewport backdrop; the split lives inside a centered card */
.ws-login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px;
  box-sizing: border-box;
  background: radial-gradient(120% 120% at 50% 0%, #fffdf9, var(--ws-bg) 60%);
}
.ws-login-card {
  display: flex;
  width: 100%;
  max-width: 940px;
  height: 580px;
  max-height: calc(100vh - 80px);
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(40, 35, 25, 0.18),
    0 4px 14px rgba(40, 35, 25, 0.06);
}

/* left form column */
.ws-login-form {
  flex: 0 0 44%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
  position: relative;
  box-sizing: border-box;
}
.ws-login-brand {
  position: absolute;
  top: 30px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.ws-login-brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ws-terra);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.ws-login-brand__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ws-ink);
}
.ws-login-greet {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.15;
  color: var(--ws-ink);
  margin: 0 0 6px;
}
.ws-login-greet em {
  color: var(--ws-terra);
  font-style: italic;
}
.ws-login-subtitle {
  font-size: 13.5px;
  color: var(--ws-ink-3);
  margin: 0 0 30px;
}
.ws-login-field {
  margin-bottom: 16px;
}
.ws-login-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ws-ink-2);
  margin-bottom: 7px;
}
.ws-login-field input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  background: var(--ws-card);
  color: var(--ws-ink);
  padding: 0 13px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
.ws-login-field input:focus {
  border-color: var(--ws-terra);
  box-shadow: 0 0 0 3px rgba(201, 111, 74, 0.1);
}
.ws-login-submit {
  margin-top: 10px;
  width: 100%;
  background: var(--ws-terra);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.ws-login-submit:hover {
  background: var(--ws-terra-deep);
}
.ws-login-msg {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ws-terra-deep);
  border-left: 2px solid var(--ws-terra);
  padding-left: 10px;
}
.ws-login-foot {
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--ws-ink-4);
}

/* right cinematic hero (espresso dark, locally scoped) */
.ws-login-hero {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #140f0c;
}
.ws-login-hero__scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 50px;
  box-sizing: border-box;
}
.ws-login-hero__scene--brand {
  justify-content: center;
}
.ws-login-hero__word {
  font-family: var(--serif);
  font-style: italic;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.5px;
  color: #f6efe7;
  z-index: 5;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}
.ws-login-hero__sub {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #b9a695;
  margin-top: 14px;
  z-index: 5;
}
.ws-login-hero__ghost {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: scale(1.12);
}
.ws-login-hero__glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle at 72% 24%,
    rgba(201, 111, 74, 0.4),
    transparent 52%
  );
}
.ws-login-hero__scene--ask .ws-login-hero__ghost {
  background: linear-gradient(140deg, #2a1f18, #140f0c);
}
.ws-login-hero__scene--build .ws-login-hero__ghost {
  background: linear-gradient(140deg, #22241c, #140f0c);
}
.ws-login-hero__scene--prove .ws-login-hero__ghost {
  background: radial-gradient(circle at 60% 40%, #2a2030, #140f0c);
}
.ws-login-hero__scene--brand .ws-login-hero__ghost {
  background: radial-gradient(circle at 55% 50%, #3a2418, #140f0c);
}
.ws-login-hero__grain {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* 4-scene cross-dissolve, 12s loop, 3.0s stagger, slow push-in.
   Fade-out (22%→30% = 2.64s→3.6s) overlaps the next scene's fade-in
   (which starts at +3.0s), so scenes cross-dissolve with no black gap. */
.ws-login-hero__scene--1 {
  animation: wsLoginScene 12s ease-in-out infinite;
}
.ws-login-hero__scene--2 {
  animation: wsLoginScene 12s ease-in-out infinite;
  animation-delay: 3s;
}
.ws-login-hero__scene--3 {
  animation: wsLoginScene 12s ease-in-out infinite;
  animation-delay: 6s;
}
.ws-login-hero__scene--4 {
  animation: wsLoginScene 12s ease-in-out infinite;
  animation-delay: 9s;
}
@keyframes wsLoginScene {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  5% {
    opacity: 1;
  }
  22% {
    opacity: 1;
    transform: scale(1.05);
  }
  30% {
    opacity: 0;
    transform: scale(1.07);
  }
  100% {
    opacity: 0;
  }
}

/* responsive: below 880px the card drops the hero and shrinks to the form */
@media (max-width: 880px) {
  .ws-login-hero {
    display: none;
  }
  .ws-login-card {
    max-width: 440px;
    height: auto;
    max-height: none;
  }
  .ws-login-form {
    flex: 1;
  }
}

/* reduced motion: stop animation, pin the final brand scene */
@media (prefers-reduced-motion: reduce) {
  .ws-login-hero__scene {
    animation: none !important;
    opacity: 0;
    transform: none;
  }
  .ws-login-hero__scene--brand {
    opacity: 1;
  }
}

/* ── Conversation share modal ───────────────────────────────────── */
.ws-share__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 20, 0.35);
  backdrop-filter: blur(2px);
  z-index: 90;
}
.ws-share {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 92vw);
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(20, 16, 8, 0.35);
  padding: 22px 22px 20px;
  z-index: 91;
  font-family: inherit;
}
.ws-share__head {
  font-size: 16px;
  font-weight: 700;
  color: var(--ws-ink);
  margin-bottom: 10px;
}
.ws-share__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ws-ink-2);
  margin: 0 0 16px;
}
.ws-share__linkrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.ws-share__link {
  flex: 1;
  min-width: 0;
  background: var(--ws-panel);
  border: 1px solid var(--ws-line-2);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ws-ink-2);
  font-family: inherit;
}
.ws-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.ws-share__revoke {
  color: var(--ws-terra);
  border-color: var(--ws-terra-wash);
}
.ws-share__revoke:hover {
  background: var(--ws-terra-wash);
  border-color: var(--ws-terra);
}
.ws-share__saved {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ws-ok);
  margin: 0 0 12px;
}
.ws-share__saved::before {
  content: "✓";
  font-weight: 700;
}
.ws-btn-secondary.is-saved {
  color: var(--ws-ok);
  border-color: color-mix(in srgb, var(--ws-ok) 45%, transparent);
  background: color-mix(in srgb, var(--ws-ok) 10%, transparent);
}

/* ── Public shared conversation view (/share/[token]) ───────────── */
.ws-sharepage {
  min-height: 100vh;
  background: var(--ws-bg);
  color: var(--ws-ink);
  font-family: var(--font-sans, system-ui), sans-serif;
}
.ws-sharepage__doc {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.ws-sharepage__head {
  border-bottom: 1px solid var(--ws-line);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.ws-sharepage__brand {
  font-family: var(--font-brand, var(--font-serif)), serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ws-ink);
  letter-spacing: -0.01em;
}
.ws-sharepage__brand .ws-brand__x {
  color: var(--ws-terra);
}
.ws-sharepage__title {
  font-size: 24px;
  font-weight: 600;
  margin: 10px 0 0;
  color: var(--ws-ink);
  line-height: 1.3;
}
.ws-sharepage__msgs {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ws-sharepage__user {
  display: flex;
  justify-content: flex-end;
}
.ws-sharepage__user-bubble {
  background: var(--ws-user-bubble);
  color: var(--ws-ink);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  max-width: 80%;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.6;
}
.ws-sharepage__ai {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ws-ink);
}
.ws-sharepage__cites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ws-sharepage__cite {
  font-size: 12px;
  color: var(--ws-ink-2);
  background: var(--ws-panel);
  border: 1px solid var(--ws-line);
  border-radius: 8px;
  padding: 4px 10px;
  text-decoration: none;
}
.ws-sharepage__cite:hover {
  border-color: var(--ws-terra);
  color: var(--ws-terra);
}
/* url 없는 출처 칩 — 클릭 불가, 링크 어포던스 제거 */
.ws-sharepage__cite.is-static {
  cursor: default;
}
.ws-sharepage__cite.is-static:hover {
  border-color: var(--ws-line);
  color: var(--ws-ink-2);
}
.ws-sharepage__sources {
  margin: 14px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--ws-line);
}
.ws-sharepage__sources-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ws-ink-3);
  margin-bottom: 6px;
}
.ws-sharepage__sources-list {
  margin: 0;
  padding-left: 22px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ws-ink-2);
}
.ws-sharepage__source a {
  color: var(--ws-terra);
  text-decoration: none;
  word-break: break-word;
}
.ws-sharepage__source a:hover {
  text-decoration: underline;
}
.ws-sharepage__foot {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--ws-line);
  font-size: 12px;
  color: var(--ws-ink-3);
  text-align: center;
}
.ws-sharepage__empty {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ws-ink-2);
  font-size: 14px;
}

/* ── 커넥터 설정 카드 ────────────────────────────────────────────── */
.ws-conn__head { margin-bottom: 18px; }
.ws-conn__title { font-size: 18px; font-weight: 600; color: var(--ws-ink); }
.ws-conn__sub { font-size: 12.5px; color: var(--ws-ink-3); margin-top: 4px; }
.ws-conn__empty { color: var(--ws-ink-3); padding: 40px 0; text-align: center; font-size: 13px; }
.ws-conn__retry { display: inline-block; margin: 14px auto 0; }
.ws-conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ws-conn-card { background: var(--ws-card); border: 1px solid var(--ws-line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(40,35,25,.03); }
.ws-conn-card__head { display: flex; align-items: center; gap: 11px; }
.ws-conn-card__icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ws-conn-card__icon svg { width: 30px; height: 30px; }
.ws-conn-card__name { font-size: 14.5px; font-weight: 600; color: var(--ws-ink); flex: 1; }
.ws-conn-card__status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; }
.ws-conn-card__status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ws-conn-card__status.is-on { color: var(--ws-ok); }
.ws-conn-card__status.is-off { color: var(--ws-ink-4); }
.ws-conn-card__status.is-warn { color: #b4742e; }
.ws-conn-card__reconsent { font-size: 11.5px; color: #b4742e; margin: 12px 0 0; }
.ws-conn-card__perms-label { font-size: 11px; color: var(--ws-ink-4); margin: 15px 0 7px; letter-spacing: .02em; }
.ws-conn-card__perms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.ws-conn-card__perms li { font-size: 12.5px; color: var(--ws-ink-2); padding-left: 13px; position: relative; line-height: 1.4; }
.ws-conn-card__perms li::before { content: "·"; position: absolute; left: 3px; color: var(--ws-ink-4); }
.ws-conn-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.ws-conn-card__meta { font-size: 11px; color: var(--ws-ink-3); }
.ws-conn-card__danger { color: #b4452e; border-color: #e4c4b8; }
.ws-conn-card__danger:hover { background: var(--ws-terra-wash); border-color: #d9a994; }

/* ── User Settings View ─────────────────────────────────────────────────── */
/* 설정 모달 — 채팅 위에 백드롭 + 가운데 박스로 띄운다(페이지 대체 아님) */
.ws-settings-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 28px; background: color-mix(in srgb, var(--ws-ink) 30%, transparent); animation: ws-settings-fade .14s ease; }
.ws-settings-modal__box { width: min(1200px, 96vw); height: min(820px, 90vh); background: var(--ws-card); border: 1px solid var(--ws-line); border-radius: 16px; box-shadow: 0 18px 60px rgba(40,35,25,.22); overflow: hidden; display: flex; }
@keyframes ws-settings-fade { from { opacity: 0; } to { opacity: 1; } }
.ws-settings { display: flex; height: 100%; width: 100%; background: var(--ws-bg); color: var(--ws-ink); font-family: var(--sans); }
.ws-settings__nav { width: 224px; border-right: 1px solid var(--ws-line); padding: 18px 10px; display: flex; flex-direction: column; gap: 4px; background: var(--ws-panel); }
.ws-settings__nav-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 14px; }
.ws-settings__title { font-size: 15px; font-weight: 700; color: var(--ws-ink); }
.ws-settings__close { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ws-ink-3); cursor: pointer; }
.ws-settings__close:hover { color: var(--ws-ink); }
.ws-settings__nav-item { text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--ws-ink-2); }
.ws-settings__nav-item:hover { background: var(--ws-terra-wash-2); }
.ws-settings__nav-item.is-active { background: #e5e5e4; color: var(--ws-ink); font-weight: 600; }  /* 채팅 대화목록 선택(.ws-conv.is-active)과 동일 */
.ws-settings__content { flex: 1; padding: 26px 28px; overflow: auto; }

/* ── My Agents Section ──────────────────────────────────────────────────── */
.ws-agents__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ws-agents__title { font-size: 18px; font-weight: 600; color: var(--ws-ink); }
.ws-agents__empty { color: var(--ws-ink-3); padding: 40px 0; text-align: center; font-size: 13px; }
.ws-agents__table { width: 100%; border-collapse: collapse; }
.ws-agents__table th, .ws-agents__table td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--ws-line); font-size: 13.5px; color: var(--ws-ink-2); vertical-align: top; }
.ws-agents__table th { font-size: 11.5px; color: var(--ws-ink-4); font-weight: 600; }
.ws-agents__when { color: var(--ws-ink-3); font-size: 12px; }
.ws-agents__badge { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--ws-terra-wash); color: var(--ws-terra-deep); font-size: 11px; font-weight: 600; }
.ws-agents__row-actions { white-space: nowrap; }
.ws-agents__row-actions button { margin-left: 8px; border: 0; background: transparent; cursor: pointer; color: var(--ws-terra); font-size: 13px; }
.ws-agents__row-actions button.is-danger { color: #b4452e; }

/* ── My Agent Form Modal ────────────────────────────────────────────────── */
.ws-agentform { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); max-height: 88vh; overflow: auto; background: var(--ws-card); border: 1px solid var(--ws-line); border-radius: 14px; padding: 24px; z-index: 111; box-shadow: 0 20px 60px rgba(40,35,25,.22); }
.ws-agentform__title { font-size: 18px; font-weight: 600; color: var(--ws-ink); margin-bottom: 16px; }
.ws-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ws-field > span { font-size: 13px; color: var(--ws-ink-2); }
.ws-field input, .ws-field textarea, .ws-field select { border: 1px solid var(--ws-line-2); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ws-ink); background: var(--ws-bg); }
.ws-field input:focus, .ws-field textarea:focus, .ws-field select:focus { outline: none; border-color: var(--ws-terra); }
.ws-field__err { color: #b4452e; font-size: 12px; }
.ws-toolpick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 180px; overflow: auto; border: 1px solid var(--ws-line); border-radius: 8px; padding: 8px; }
.ws-toolpick__item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ws-ink-2); }
.ws-agentform__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ws-agentform__actions button { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--ws-line-2); background: var(--ws-card); color: var(--ws-ink-2); cursor: pointer; font-family: inherit; }
.ws-agentform__actions button.is-primary { background: var(--ws-terra); color: #fff; border-color: transparent; }
.ws-agentform__actions button.is-primary:hover { background: var(--ws-terra-deep); }
.ws-agentform__actions button:disabled { opacity: .5; cursor: not-allowed; }

/*!*******************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!../../node_modules/@mdxeditor/editor/dist/style.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************************************************/
:root, .light, .light-theme {
  --blue-1: #fbfdff;
  --blue-2: #f4faff;
  --blue-3: #e6f4fe;
  --blue-4: #d5efff;
  --blue-5: #c2e5ff;
  --blue-6: #acd8fc;
  --blue-7: #8ec8f6;
  --blue-8: #5eb1ef;
  --blue-9: #0090ff;
  --blue-10: #0588f0;
  --blue-11: #0d74ce;
  --blue-12: #113264;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, .light, .light-theme {
      --blue-1: color(display-p3 0.986 0.992 0.999);
      --blue-2: color(display-p3 0.96 0.979 0.998);
      --blue-3: color(display-p3 0.912 0.956 0.991);
      --blue-4: color(display-p3 0.853 0.932 1);
      --blue-5: color(display-p3 0.788 0.894 0.998);
      --blue-6: color(display-p3 0.709 0.843 0.976);
      --blue-7: color(display-p3 0.606 0.777 0.947);
      --blue-8: color(display-p3 0.451 0.688 0.917);
      --blue-9: color(display-p3 0.247 0.556 0.969);
      --blue-10: color(display-p3 0.234 0.523 0.912);
      --blue-11: color(display-p3 0.15 0.44 0.84);
      --blue-12: color(display-p3 0.102 0.193 0.379);
    }
  }
}

.dark, .dark-theme {
  --blue-1: #0d1520;
  --blue-2: #111927;
  --blue-3: #0d2847;
  --blue-4: #003362;
  --blue-5: #004074;
  --blue-6: #104d87;
  --blue-7: #205d9e;
  --blue-8: #2870bd;
  --blue-9: #0090ff;
  --blue-10: #3b9eff;
  --blue-11: #70b8ff;
  --blue-12: #c2e6ff;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark, .dark-theme {
      --blue-1: color(display-p3 0.057 0.081 0.122);
      --blue-2: color(display-p3 0.072 0.098 0.147);
      --blue-3: color(display-p3 0.078 0.154 0.27);
      --blue-4: color(display-p3 0.033 0.197 0.37);
      --blue-5: color(display-p3 0.08 0.245 0.441);
      --blue-6: color(display-p3 0.14 0.298 0.511);
      --blue-7: color(display-p3 0.195 0.361 0.6);
      --blue-8: color(display-p3 0.239 0.434 0.72);
      --blue-9: color(display-p3 0.247 0.556 0.969);
      --blue-10: color(display-p3 0.344 0.612 0.973);
      --blue-11: color(display-p3 0.49 0.72 1);
      --blue-12: color(display-p3 0.788 0.898 0.99);
    }
  }
}

:root, .light, .light-theme {
  --slate-1: #fcfcfd;
  --slate-2: #f9f9fb;
  --slate-3: #f0f0f3;
  --slate-4: #e8e8ec;
  --slate-5: #e0e1e6;
  --slate-6: #d9d9e0;
  --slate-7: #cdced6;
  --slate-8: #b9bbc6;
  --slate-9: #8b8d98;
  --slate-10: #80838d;
  --slate-11: #60646c;
  --slate-12: #1c2024;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, .light, .light-theme {
      --slate-1: color(display-p3 0.988 0.988 0.992);
      --slate-2: color(display-p3 0.976 0.976 0.984);
      --slate-3: color(display-p3 0.94 0.941 0.953);
      --slate-4: color(display-p3 0.908 0.909 0.925);
      --slate-5: color(display-p3 0.88 0.881 0.901);
      --slate-6: color(display-p3 0.85 0.852 0.876);
      --slate-7: color(display-p3 0.805 0.808 0.838);
      --slate-8: color(display-p3 0.727 0.733 0.773);
      --slate-9: color(display-p3 0.547 0.553 0.592);
      --slate-10: color(display-p3 0.503 0.512 0.549);
      --slate-11: color(display-p3 0.379 0.392 0.421);
      --slate-12: color(display-p3 0.113 0.125 0.14);
    }
  }
}

.dark, .dark-theme {
  --slate-1: #111113;
  --slate-2: #18191b;
  --slate-3: #212225;
  --slate-4: #272a2d;
  --slate-5: #2e3135;
  --slate-6: #363a3f;
  --slate-7: #43484e;
  --slate-8: #5a6169;
  --slate-9: #696e77;
  --slate-10: #777b84;
  --slate-11: #b0b4ba;
  --slate-12: #edeef0;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    .dark, .dark-theme {
      --slate-1: color(display-p3 0.067 0.067 0.074);
      --slate-2: color(display-p3 0.095 0.098 0.105);
      --slate-3: color(display-p3 0.13 0.135 0.145);
      --slate-4: color(display-p3 0.156 0.163 0.176);
      --slate-5: color(display-p3 0.183 0.191 0.206);
      --slate-6: color(display-p3 0.215 0.226 0.244);
      --slate-7: color(display-p3 0.265 0.28 0.302);
      --slate-8: color(display-p3 0.357 0.381 0.409);
      --slate-9: color(display-p3 0.415 0.431 0.463);
      --slate-10: color(display-p3 0.469 0.483 0.514);
      --slate-11: color(display-p3 0.692 0.704 0.728);
      --slate-12: color(display-p3 0.93 0.933 0.94);
    }
  }
}

:root, .light, .light-theme {
  --grass-1: #fbfefb;
  --grass-2: #f5fbf5;
  --grass-3: #e9f6e9;
  --grass-4: #daf1db;
  --grass-5: #c9e8ca;
  --grass-6: #b2ddb5;
  --grass-7: #94ce9a;
  --grass-8: #65ba74;
  --grass-9: #46a758;
  --grass-10: #3e9b4f;
  --grass-11: #2a7e3b;
  --grass-12: #203c25;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, .light, .light-theme {
      --grass-1: color(display-p3 0.986 0.996 0.985);
      --grass-2: color(display-p3 0.966 0.983 0.964);
      --grass-3: color(display-p3 0.923 0.965 0.917);
      --grass-4: color(display-p3 0.872 0.94 0.865);
      --grass-5: color(display-p3 0.811 0.908 0.802);
      --grass-6: color(display-p3 0.733 0.864 0.724);
      --grass-7: color(display-p3 0.628 0.803 0.622);
      --grass-8: color(display-p3 0.477 0.72 0.482);
      --grass-9: color(display-p3 0.38 0.647 0.378);
      --grass-10: color(display-p3 0.344 0.598 0.342);
      --grass-11: color(display-p3 0.263 0.488 0.261);
      --grass-12: color(display-p3 0.151 0.233 0.153);
    }
  }
}

:root, .light, .light-theme {
  --cyan-1: #fafdfe;
  --cyan-2: #f2fafb;
  --cyan-3: #def7f9;
  --cyan-4: #caf1f6;
  --cyan-5: #b5e9f0;
  --cyan-6: #9ddde7;
  --cyan-7: #7dcedc;
  --cyan-8: #3db9cf;
  --cyan-9: #00a2c7;
  --cyan-10: #0797b9;
  --cyan-11: #107d98;
  --cyan-12: #0d3c48;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, .light, .light-theme {
      --cyan-1: color(display-p3 0.982 0.992 0.996);
      --cyan-2: color(display-p3 0.955 0.981 0.984);
      --cyan-3: color(display-p3 0.888 0.965 0.975);
      --cyan-4: color(display-p3 0.821 0.941 0.959);
      --cyan-5: color(display-p3 0.751 0.907 0.935);
      --cyan-6: color(display-p3 0.671 0.862 0.9);
      --cyan-7: color(display-p3 0.564 0.8 0.854);
      --cyan-8: color(display-p3 0.388 0.715 0.798);
      --cyan-9: color(display-p3 0.282 0.627 0.765);
      --cyan-10: color(display-p3 0.264 0.583 0.71);
      --cyan-11: color(display-p3 0.08 0.48 0.63);
      --cyan-12: color(display-p3 0.108 0.232 0.277);
    }
  }
}

:root, .light, .light-theme {
  --amber-1: #fefdfb;
  --amber-2: #fefbe9;
  --amber-3: #fff7c2;
  --amber-4: #ffee9c;
  --amber-5: #fbe577;
  --amber-6: #f3d673;
  --amber-7: #e9c162;
  --amber-8: #e2a336;
  --amber-9: #ffc53d;
  --amber-10: #ffba18;
  --amber-11: #ab6400;
  --amber-12: #4f3422;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, .light, .light-theme {
      --amber-1: color(display-p3 0.995 0.992 0.985);
      --amber-2: color(display-p3 0.994 0.986 0.921);
      --amber-3: color(display-p3 0.994 0.969 0.782);
      --amber-4: color(display-p3 0.989 0.937 0.65);
      --amber-5: color(display-p3 0.97 0.902 0.527);
      --amber-6: color(display-p3 0.936 0.844 0.506);
      --amber-7: color(display-p3 0.89 0.762 0.443);
      --amber-8: color(display-p3 0.85 0.65 0.3);
      --amber-9: color(display-p3 1 0.77 0.26);
      --amber-10: color(display-p3 0.959 0.741 0.274);
      --amber-11: color(display-p3 0.64 0.4 0);
      --amber-12: color(display-p3 0.294 0.208 0.145);
    }
  }
}

:root, .light, .light-theme {
  --red-1: #fffcfc;
  --red-2: #fff7f7;
  --red-3: #feebec;
  --red-4: #ffdbdc;
  --red-5: #ffcdce;
  --red-6: #fdbdbe;
  --red-7: #f4a9aa;
  --red-8: #eb8e90;
  --red-9: #e5484d;
  --red-10: #dc3e42;
  --red-11: #ce2c31;
  --red-12: #641723;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, .light, .light-theme {
      --red-1: color(display-p3 0.998 0.989 0.988);
      --red-2: color(display-p3 0.995 0.971 0.971);
      --red-3: color(display-p3 0.985 0.925 0.925);
      --red-4: color(display-p3 0.999 0.866 0.866);
      --red-5: color(display-p3 0.984 0.812 0.811);
      --red-6: color(display-p3 0.955 0.751 0.749);
      --red-7: color(display-p3 0.915 0.675 0.672);
      --red-8: color(display-p3 0.872 0.575 0.572);
      --red-9: color(display-p3 0.83 0.329 0.324);
      --red-10: color(display-p3 0.798 0.294 0.285);
      --red-11: color(display-p3 0.744 0.234 0.222);
      --red-12: color(display-p3 0.36 0.115 0.143);
    }
  }
}

/** Code mirror */

.mdxeditor .cm-editor {
    --sp-font-mono: var(--font-mono);
    --sp-font-body: var(--font-body);
    padding: var(--sp-space-4) 0;
  }

.mdxeditor .sp-editor .cm-editor {
    padding-bottom: 0;
  }

.mdxeditor .cm-scroller {
    padding: 0 !important;
  }

.mdxeditor .cm-focused {
    outline: none;
  }

.mdxeditor .sp-wrapper {
    overflow: hidden;
  }

.mdxeditor .sp-layout {
    border: none;
  }

.mdxeditor .sp-cm pre {
      white-space: break-spaces;
      word-break: break-word;
      overflow-wrap: anywhere;
      flex-shrink: 1;
    }

/** Diff viewer */

.mdxeditor .cm-mergeView .cm-scroller {
    font-family: var(--font-mono);
    line-height: 1.3rem;
    font-size: var(--text-xs);
  }

/** Diff viewer */

.mdxeditor .cm-sourceView .cm-scroller {
    font-family: var(--font-mono);
    line-height: 1.3rem;
    font-size: var(--text-xs);
  }

.mdxeditor .cm-gutters {
    background: transparent;
    font-size: var(--text-xxs);
  }

.mdxeditor .cm-activeLine {
    background: transparent;
  }

.mdxeditor .cm-tooltip-autocomplete {
    background: var(--baseBgSubtle);
  }

.mdxeditor hr.selected[data-lexical-decorator=true] {
    outline: 2px solid highlight;
  }
._editorRoot_f3hmk_53 {
  --accentBase: var(--blue-1);
  --accentBgSubtle: var(--blue-2);
  --accentBg: var(--blue-3);
  --accentBgHover: var(--blue-4);
  --accentBgActive: var(--blue-5);
  --accentLine: var(--blue-6);
  --accentBorder: var(--blue-7);
  --accentBorderHover: var(--blue-8);
  --accentSolid: var(--blue-9);
  --accentSolidHover: var(--blue-10);
  --accentText: var(--blue-11);
  --accentTextContrast: var(--blue-12);

  --basePageBg: white;
  --baseBase: var(--slate-1);
  --baseBgSubtle: var(--slate-2);
  --baseBg: var(--slate-3);
  --baseBgHover: var(--slate-4);
  --baseBgActive: var(--slate-5);
  --baseLine: var(--slate-6);
  --baseBorder: var(--slate-7);
  --baseBorderHover: var(--slate-8);
  --baseSolid: var(--slate-9);
  --baseSolidHover: var(--slate-10);
  --baseText: var(--slate-11);
  --baseTextContrast: var(--slate-12);

  --admonitionTipBg: var(--cyan-4);
  --admonitionTipBorder: var(--cyan-8);

  --admonitionInfoBg: var(--grass-4);
  --admonitionInfoBorder: var(--grass-8);

  --admonitionCautionBg: var(--amber-4);
  --admonitionCautionBorder: var(--amber-8);

  --admonitionDangerBg: var(--red-4);
  --admonitionDangerBorder: var(--red-8);

  --admonitionNoteBg: var(--slate-4);
  --admonitionNoteBorder: var(--slate-8);

  --error-color: var(--red-10);

  --spacing-0: 0px;
  --spacing-px: 1px;
  --spacing-0_5: 0.125rem;
  --spacing-1: 0.25rem;
  --spacing-1_5: 0.375rem;
  --spacing-2: 0.5rem;
  --spacing-2_5: 0.625rem;
  --spacing-3: 0.75rem;
  --spacing-3_5: 0.875rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-7: 1.75rem;
  --spacing-8: 2rem;
  --spacing-9: 2.25rem;
  --spacing-10: 2.5rem;
  --spacing-11: 2.75rem;
  --spacing-12: 3rem;
  --spacing-14: 3.5rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  --spacing-24: 6rem;
  --spacing-28: 7rem;
  --spacing-32: 8rem;
  --spacing-36: 9rem;
  --spacing-40: 10rem;
  --spacing-44: 11rem;
  --spacing-48: 12rem;
  --spacing-52: 13rem;
  --spacing-56: 14rem;
  --spacing-60: 15rem;
  --spacing-64: 16rem;
  --spacing-72: 18rem;
  --spacing-80: 20rem;
  --spacing-96: 24rem;

  --radius-none: 0px;
  --radius-small: var(--spacing-0_5);
  --radius-base: var(--spacing-1);
  --radius-medium: var(--spacing-1_5);
  --radius-large: var(--spacing-2);
  --radius-extra-large: var(--spacing-3);
  --radius-full: 9999px;

  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
    sans-serif;

  --text-base: 1rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --text-xxs: 0.6rem;

  font-family: var(--font-body);
  color: var(--baseText);
}

._editorWrapper_f3hmk_155 {
}

._nestedListItem_f3hmk_158 {
  list-style: none;
}

._toolbarRoot_f3hmk_162 {
  z-index: 2;
  display: flex;
  flex-direction: row;
  gap: var(--spacing-1);
  border-radius: var(--radius-medium);
  padding: var(--spacing-1_5);
  align-items: center;
  overflow-x: auto;
  position: sticky;
  top: 0;
  background-color: var(--baseBg);
  width: inherit;
}

._toolbarRoot_f3hmk_162 div[role='separator'] {
    margin: var(--spacing-2) var(--spacing-1);
    border-left: 1px solid var(--baseBorder);
    border-right: 1px solid var(--baseBase);
    height: var(--spacing-4);
  }

._toolbarRoot_f3hmk_162 svg {
    color: var(--baseTextContrast);
    display: block;
  }

._readOnlyToolbarRoot_f3hmk_189 {
  pointer-events: none;
  background: var(--baseBase);
}

._readOnlyToolbarRoot_f3hmk_189 > div {
    opacity: 0.5;
  }

._toolbarModeSwitch_f3hmk_198 {
  opacity: 1 !important;
  margin-left: auto;
  align-self: stretch;
  align-items: stretch;
  display: flex;
  border: 1px solid var(--baseBg);
  border-radius: var(--radius-medium);
  font-size: var(--text-xs);
}

._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208 {
    padding-inline-end: var(--spacing-4);
    padding-inline-start: var(--spacing-4);
  }

._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208:active,
    ._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208[data-state='on'] {
      background-color: var(--baseBorder);
    }

._toolbarGroupOfGroups_f3hmk_219 {
  display: flex;
  margin: 0 var(--spacing-1);
}

._toolbarToggleSingleGroup_f3hmk_224:first-of-type ._toolbarToggleItem_f3hmk_208:only-child,
._toolbarToggleSingleGroup_f3hmk_224:only-child ._toolbarToggleItem_f3hmk_208:first-child,
._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208:first-child {
  border-top-left-radius: var(--radius-base);
  border-bottom-left-radius: var(--radius-base);
}

._toolbarToggleSingleGroup_f3hmk_224:last-of-type ._toolbarToggleItem_f3hmk_208:only-child,
._toolbarToggleSingleGroup_f3hmk_224:only-child ._toolbarToggleItem_f3hmk_208:last-child,
._toolbarModeSwitch_f3hmk_198 ._toolbarToggleItem_f3hmk_208:last-child {
  border-top-right-radius: var(--radius-base);
  border-bottom-right-radius: var(--radius-base);
}

._toolbarToggleItem_f3hmk_208,
._toolbarButton_f3hmk_239 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  padding: var(--spacing-0_5);
}

@media (hover: hover) {
    ._toolbarToggleItem_f3hmk_208:hover, ._toolbarButton_f3hmk_239:hover {
      background-color: var(--baseBgActive);
    }
  }

._toolbarToggleItem_f3hmk_208:active svg, ._toolbarButton_f3hmk_239:active svg {
    transform: translate(1px, 1px);
  }

._toolbarToggleItem_f3hmk_208[data-state='on'],
  ._toolbarButton_f3hmk_239[data-state='on'],
  ._toolbarToggleItem_f3hmk_208:active,
  ._toolbarButton_f3hmk_239:active {
    color: var(--baseTextContrast);
    background-color: var(--baseBgActive);
  }

._toolbarToggleItem_f3hmk_208[data-disabled], ._toolbarButton_f3hmk_239[data-disabled] {
    pointer-events: none;
  }

._toolbarToggleItem_f3hmk_208[data-disabled] svg, ._toolbarButton_f3hmk_239[data-disabled] svg {
      color: var(--baseBorderHover);
    }

._toolbarButton_f3hmk_239 {
  border-radius: var(--radius-base);
}

._toolbarButton_f3hmk_239 + ._toolbarButton_f3hmk_239 {
  margin-left: var(--spacing-1);
}

._activeToolbarButton_f3hmk_275 {
  color: var(--accentText);
}

._toolbarToggleSingleGroup_f3hmk_224 {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

._toolbarNodeKindSelectContainer_f3hmk_285,
._toolbarButtonDropdownContainer_f3hmk_286,
._toolbarCodeBlockLanguageSelectContent_f3hmk_287,
._selectContainer_f3hmk_288 {
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
  z-index: 3;
  width: var(--spacing-36);
  border-bottom-left-radius: var(--radius-base);
  border-bottom-right-radius: var(--radius-base);
  background-color: var(--basePageBg);
  font-size: var(--text-sm);
}

._toolbarButtonDropdownContainer_f3hmk_286 {
  border-top-right-radius: var(--radius-base);
}

._toolbarButtonDropdownContainer_f3hmk_286 ._selectItem_f3hmk_301:first-child {
    border-top-right-radius: var(--radius-base);
  }

._toolbarNodeKindSelectTrigger_f3hmk_306,
._toolbarButtonSelectTrigger_f3hmk_307,
._selectTrigger_f3hmk_308 {
  border: 0;
  background-color: transparent;
  display: flex;
  color: inherit;
  align-items: center;
  width: var(--spacing-36);
  padding: var(--spacing-0_5) var(--spacing-1);
  padding-inline-start: var(--spacing-2);
  border-radius: var(--radius-medium);
  white-space: nowrap;
  flex-wrap: nowrap;
  font-size: var(--text-sm);
  background-color: var(--basePageBg);
  margin: 0 var(--spacing-1);
}

._toolbarNodeKindSelectTrigger_f3hmk_306[data-state='open'], ._toolbarButtonSelectTrigger_f3hmk_307[data-state='open'], ._selectTrigger_f3hmk_308[data-state='open'] {
    filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
    border-bottom-right-radius: var(--radius-none);
    border-bottom-left-radius: var(--radius-none);
  }

._selectTrigger_f3hmk_308[data-placeholder] > span:first-child {
  color: var(--baseBorderHover);
}

._toolbarButtonSelectTrigger_f3hmk_307 {
  width: auto;
  padding-inline-start: var(--spacing-2);
  padding-inline-end: var(--spacing-1);
  padding-block: var(--spacing-0_5);
}

._toolbarCodeBlockLanguageSelectTrigger_f3hmk_342,
._toolbarCodeBlockLanguageSelectContent_f3hmk_287 {
  width: var(--spacing-48);
}

._toolbarNodeKindSelectItem_f3hmk_347,
._selectItem_f3hmk_301 {
  cursor: default;
  display: flex;
  padding: var(--spacing-2);
}

._toolbarNodeKindSelectItem_f3hmk_347[data-highlighted], ._selectItem_f3hmk_301[data-highlighted] {
    background-color: var(--baseBg);
  }

._toolbarNodeKindSelectItem_f3hmk_347[data-state='checked'], ._selectItem_f3hmk_301[data-state='checked'] {
    color: var(--baseTextContrast);
    background-color: var(--baseBg);
  }

._toolbarNodeKindSelectItem_f3hmk_347[data-highlighted], ._selectItem_f3hmk_301[data-highlighted] {
    outline: none;
  }

._toolbarNodeKindSelectItem_f3hmk_347:last-child, ._selectItem_f3hmk_301:last-child {
    border-bottom-left-radius: var(--radius-base);
    border-bottom-right-radius: var(--radius-base);
  }

._toolbarNodeKindSelectDropdownArrow_f3hmk_372,
._selectDropdownArrow_f3hmk_373 {
  margin-left: auto;
  display: flex;
  align-items: center;
}

._contentEditable_f3hmk_379 {
  box-sizing: border-box;
  width: 100%;
  color: var(--baseTextContrast);

  padding: var(--spacing-3);
}

._contentEditable_f3hmk_379:focus {
    outline: none;
  }

._codeMirrorWrapper_f3hmk_391 {
  margin-bottom: var(--spacing-5);
  border: 1px solid var(--baseLine);
  border-radius: var(--radius-medium);
  overflow: hidden;
  padding: 0.8rem;
  position: relative;
}

._sandPackWrapper_f3hmk_400 {
  margin-bottom: var(--spacing-5);
  border: 1px solid var(--baseLine);
  border-radius: var(--radius-medium);
  overflow: hidden;
  position: relative;
}

._codeMirrorToolbar_f3hmk_408 {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  gap: var(--spacing-1);
  padding: var(--spacing-1);
  z-index: 1;
  background-color: var(--baseBase);
  border-bottom-left-radius: var(--radius-base);
}

._frontmatterWrapper_f3hmk_412 {
  border-radius: var(--radius-medium);
  padding: var(--spacing-3);
  background-color: var(--baseBgSubtle);
}

._frontmatterWrapper_f3hmk_412[data-expanded='true'] {
    margin-bottom: var(--spacing-10);
  }

._frontmatterToggleButton_f3hmk_422 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
  font-size: var(--text-sm);
}

._propertyPanelTitle_f3hmk_430 {
  font-size: var(--text-xs);
  font-weight: 400;
  margin: 0;
  padding-top: var(--spacing-2);
  padding-left: var(--spacing-2);
}

._propertyEditorTable_f3hmk_438 {
  table-layout: fixed;
  border-spacing: var(--spacing-2);
}

._propertyEditorTable_f3hmk_438 th {
    text-align: left;
    font-size: var(--text-sm);
    padding: var(--spacing-2) var(--spacing-3);
  }

._propertyEditorTable_f3hmk_438 col:nth-child(1) {
    width: 30%;
  }

._propertyEditorTable_f3hmk_438 col:nth-child(2) {
    width: 70%;
  }

._propertyEditorTable_f3hmk_438 td:last-child ._iconButton_f3hmk_456 {
    margin-left: var(--spacing-4);
    margin-right: var(--spacing-4);
  }

._propertyEditorTable_f3hmk_438 ._readOnlyColumnCell_f3hmk_461 {
    padding-left: 0;
  }

._propertyEditorLabelCell_f3hmk_466 {
  font-weight: 400;
}

._readOnlyColumnCell_f3hmk_461 {
  padding-left: 0;
}

._buttonsFooter_f3hmk_474 {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-2);
}

._propertyEditorInput_f3hmk_480 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  width: 100%;
  padding: var(--spacing-2) var(--spacing-3);
  border-radius: var(--radius-base);
  border: 1px solid var(--baseBorder);
  background-color: var(--baseBase);
  font-size: var(--text-sm);
}

._iconButton_f3hmk_456 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  color: var(--baseText);
}

@media (hover: hover) {
    ._iconButton_f3hmk_456:hover {
      color: var(--baseTextContrast);
    }
  }

._iconButton_f3hmk_456:disabled,
  ._iconButton_f3hmk_456:disabled:hover {
    color: var(--baseLine);
  }

._primaryButton_f3hmk_506,
._secondaryButton_f3hmk_507 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  padding: var(--spacing-2) var(--spacing-3);
  border: 1px solid var(--accentBorder);
  background-color: var(--accentSolidHover);
  color: var(--baseBase);
  font-size: var(--text-xs);
  border-radius: var(--radius-medium);
}

._primaryButton_f3hmk_506:disabled, ._secondaryButton_f3hmk_507:disabled {
    background: var(--accentLine);
    border-color: var(--accentBg);
  }

._smallButton_f3hmk_522 {
  font-size: var(--text-xs);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-base);
}

._secondaryButton_f3hmk_507 {
  border: 1px solid var(--baseBorder);
  background-color: var(--baseSolidHover);
  color: var(--baseBase);
}

._dialogForm_f3hmk_534 {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-2);
}

._linkDialogEditForm_f3hmk_540 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--spacing-2);
  padding: 0;
}

._linkDialogInputContainer_f3hmk_548 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

._linkDialogInputWrapper_f3hmk_554 {
  display: flex;
  align-items: center;
  background-color: var(--baseBase);

  border-radius: var(--radius-base);
  border: 1px solid var(--baseBorder);
}

._linkDialogInputWrapper_f3hmk_554[data-visible-dropdown='true'] {
    border-bottom-left-radius: var(--radius-none);
    border-bottom-right-radius: var(--radius-none);
    border-bottom-width: 0;
  }

._linkDialogInputWrapper_f3hmk_554 > button {
    border: 0;
    background-color: transparent;
    font-size: inherit;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    all: unset;
    box-sizing: border-box;
    cursor: default;
    padding-right: var(--spacing-2);
  }

._linkDialogInput_f3hmk_548,
._dialogInput_f3hmk_575 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  width: 20rem;
  padding: var(--spacing-2) var(--spacing-3);
  font-size: var(--text-sm);
}

._linkDialogInput_f3hmk_548::-moz-placeholder, ._dialogInput_f3hmk_575::-moz-placeholder {
    color: var(--baseBorder);
  }

._linkDialogInput_f3hmk_548::placeholder, ._dialogInput_f3hmk_575::placeholder {
    color: var(--baseBorder);
  }

._linkDialogAnchor_f3hmk_586 {
  position: fixed;
  background-color: highlight;
  z-index: -1;
}

._linkDialogAnchor_f3hmk_586[data-visible='true'] {
    visibility: visible;
  }

._linkDialogAnchor_f3hmk_586[data-visible='false'] {
    visibility: hidden;
  }

._linkDialogPopoverContent_f3hmk_600,
._tableColumnEditorPopoverContent_f3hmk_601,
._dialogContent_f3hmk_602 {
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
  display: flex;
  align-items: center;
  gap: var(--spacing-0_5);
  border-radius: var(--radius-medium);
  border: 1px solid var(--baseBg);
  background-color: var(--basePageBg);
  padding: var(--spacing-1) var(--spacing-1);
  font-size: var(--text-sm);
}

._largeDialogContent_f3hmk_614 {
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
  gap: var(--spacing-0_5);
  border-radius: var(--radius-medium);
  border: 1px solid var(--baseBorder);
  background-color: var(--baseBgSubtle);
  padding: var(--spacing-4);
  font-size: var(--text-sm);
}

._dialogTitle_f3hmk_624 {
  font-size: var(--text-base);
  font-weight: 600;
  padding-left: var(--spacing-2);
}

._dialogCloseButton_f3hmk_630 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  position: absolute;
  top: 10px;
  right: 10px;
}

._popoverContent_f3hmk_637 {
  filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.2));
  display: flex;
  align-items: center;
  gap: var(--spacing-0_5);
  border-radius: var(--radius-medium);
  background-color: var(--baseBgSubtle);
  padding: var(--spacing-2) var(--spacing-2);
  font-size: var(--text-sm);
  z-index: 1;
}

._popoverArrow_f3hmk_649 {
  fill: var(--basePageBg);
}

._linkDialogPreviewAnchor_f3hmk_653 {
  margin-right: var(--spacing-1);
  display: flex;
  align-items: center;
  color: var(--accentText);
  text-decoration: none;

  border: 1px solid transparent;
}

@media (hover: hover) {
    ._linkDialogPreviewAnchor_f3hmk_653:hover {
      color: var(--accentSolidHover);
    }
  }

._linkDialogPreviewAnchor_f3hmk_653 span {
    max-width: 14rem;
    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

._tooltipTrigger_f3hmk_676 {
  align-self: center;
}

._tooltipContent_f3hmk_680 {
  z-index: 2;
  position: relative;
  border-radius: var(--radius-medium);
  padding: var(--spacing-1) var(--spacing-2);
  font-size: var(--text-xs);
  background-color: var(--baseText);
  color: var(--baseBase);
}

._tooltipContent_f3hmk_680 svg {
    fill: var(--baseText);
  }

._actionButton_f3hmk_694 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  padding: var(--spacing-1);
  color: var(--baseTextContrast);
  padding: var(--spacing-1) var(--spacing-1);
  border-radius: var(--radius-medium);
  color: var(--baseTextContrast);
}

._actionButton_f3hmk_694 svg {
    display: block;
  }

@media (hover: hover) {
    ._actionButton_f3hmk_694:hover {
      background-color: var(--baseBg);
    }
  }

._actionButton_f3hmk_694:active svg {
    transform: translate(1px, 1px);
  }

._actionButton_f3hmk_694[data-state='on'],
  ._actionButton_f3hmk_694:active {
    background-color: var(--baseBg);
    color: var(--baseTextContrast);
  }

._primaryActionButton_f3hmk_701 {
  background-color: var(--accentSolid);
  color: var(--baseBase);
}

@media (hover: hover) {
    ._primaryActionButton_f3hmk_701:hover {
      background-color: var(--accentSolidHover);
      color: var(--baseBase);
    }
  }

._tableEditor_f3hmk_713 {
  table-layout: fixed;
  width: 100%;
  height: 100%;
  border-spacing: 0;
  border-collapse: collapse;
}

._tableEditor_f3hmk_713 thead > tr > th {
    text-align: right;
  }

._tableEditor_f3hmk_713 > tbody > tr > td:not(._toolCell_f3hmk_724),
  ._tableEditor_f3hmk_713 > tbody > tr > th:not(._toolCell_f3hmk_724):not([data-tool-cell='true']) {
    border: 1px solid var(--baseBgActive);
    padding: var(--spacing-1) var(--spacing-2);
    white-space: normal;
  }

:is(._tableEditor_f3hmk_713 > tbody > tr > td:not(._toolCell_f3hmk_724),._tableEditor_f3hmk_713 > tbody > tr > th:not(._toolCell_f3hmk_724):not([data-tool-cell='true'])) > div {
      outline: none;
    }

:is(._tableEditor_f3hmk_713 > tbody > tr > td:not(._toolCell_f3hmk_724),._tableEditor_f3hmk_713 > tbody > tr > th:not(._toolCell_f3hmk_724):not([data-tool-cell='true'])) > div > p {
        margin: 0;
      }

[data-active='true']:is(._tableEditor_f3hmk_713 > tbody > tr > td:not(._toolCell_f3hmk_724),._tableEditor_f3hmk_713 > tbody > tr > th:not(._toolCell_f3hmk_724):not([data-tool-cell='true'])) {
      outline: solid 1px var(--baseSolid);
    }

._tableEditor_f3hmk_713 ._tableColumnEditorTrigger_f3hmk_743,
  ._tableEditor_f3hmk_713 ._tableRowEditorTrigger_f3hmk_744,
  ._tableEditor_f3hmk_713 ._addRowButton_f3hmk_745,
  ._tableEditor_f3hmk_713 ._addColumnButton_f3hmk_746,
  ._tableEditor_f3hmk_713 ._iconButton_f3hmk_456 {
    opacity: 0.15;
  }

@media (hover: hover) {
      ._tableEditor_f3hmk_713:hover ._tableColumnEditorTrigger_f3hmk_743,
      ._tableEditor_f3hmk_713:hover ._tableRowEditorTrigger_f3hmk_744,
      ._tableEditor_f3hmk_713:hover ._addRowButton_f3hmk_745,
      ._tableEditor_f3hmk_713:hover ._addColumnButton_f3hmk_746,
      ._tableEditor_f3hmk_713:hover ._iconButton_f3hmk_456 {
        opacity: 0.3;
      }

        ._tableEditor_f3hmk_713:hover ._tableColumnEditorTrigger_f3hmk_743:hover, ._tableEditor_f3hmk_713:hover ._tableRowEditorTrigger_f3hmk_744:hover, ._tableEditor_f3hmk_713:hover ._addRowButton_f3hmk_745:hover, ._tableEditor_f3hmk_713:hover ._addColumnButton_f3hmk_746:hover, ._tableEditor_f3hmk_713:hover ._iconButton_f3hmk_456:hover {
          opacity: 1;
        }
  }

._toolCell_f3hmk_724 {
  text-align: right;
}

._toolCell_f3hmk_724 button {
    margin: auto;
    display: block;
  }

._tableColumnEditorTrigger_f3hmk_743 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  padding: var(--spacing-1);
  color: var(--baseTextContrast);
  padding: var(--spacing-1);
  border-radius: var(--radius-full);
  opacity: 0.2;
}

._tableColumnEditorTrigger_f3hmk_743 svg {
    display: block;
  }

@media (hover: hover) {
    ._tableColumnEditorTrigger_f3hmk_743:hover {
      background-color: var(--baseBg);
    }
  }

._tableColumnEditorTrigger_f3hmk_743:active svg {
    transform: translate(1px, 1px);
  }

._tableColumnEditorTrigger_f3hmk_743[data-state='on'],
  ._tableColumnEditorTrigger_f3hmk_743:active {
    background-color: var(--baseBg);
    color: var(--baseTextContrast);
  }

._tableColumnEditorTrigger_f3hmk_743[data-active='true'] {
    opacity: 1 !important;
  }

._tableColumnEditorToolbar_f3hmk_788 {
  display: flex;
}

._tableColumnEditorToolbar_f3hmk_788 > button {
    border: 0;
    background-color: transparent;
    font-size: inherit;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    all: unset;
    box-sizing: border-box;
    cursor: default;
    padding: var(--spacing-1);
    color: var(--baseTextContrast);
  }

._tableColumnEditorToolbar_f3hmk_788 > button svg {
    display: block;
  }

@media (hover: hover) {
    ._tableColumnEditorToolbar_f3hmk_788 > button:hover {
      background-color: var(--baseBg);
    }
  }

._tableColumnEditorToolbar_f3hmk_788 > button:active svg {
    transform: translate(1px, 1px);
  }

._tableColumnEditorToolbar_f3hmk_788 > button[data-state='on'],
  ._tableColumnEditorToolbar_f3hmk_788 > button:active {
    background-color: var(--baseBg);
    color: var(--baseTextContrast);
  }

._tableColumnEditorToolbar_f3hmk_788 [role='separator'] {
    margin-left: var(--spacing-1);
    margin-right: var(--spacing-1);
  }

._toggleGroupRoot_f3hmk_801 {
  display: inline-flex;
}

._toggleGroupRoot_f3hmk_801 button {
    border: 0;
    background-color: transparent;
    font-size: inherit;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    all: unset;
    box-sizing: border-box;
    cursor: default;
    padding: var(--spacing-1);
    color: var(--baseTextContrast);
  }

._toggleGroupRoot_f3hmk_801 button svg {
    display: block;
  }

@media (hover: hover) {
    ._toggleGroupRoot_f3hmk_801 button:hover {
      background-color: var(--baseBg);
    }
  }

._toggleGroupRoot_f3hmk_801 button:active svg {
    transform: translate(1px, 1px);
  }

._toggleGroupRoot_f3hmk_801 button[data-state='on'],
  ._toggleGroupRoot_f3hmk_801 button:active {
    background-color: var(--baseBg);
    color: var(--baseTextContrast);
  }

._toggleGroupRoot_f3hmk_801 button:first-child {
      border-top-left-radius: var(--radius-base);
      border-bottom-left-radius: var(--radius-base);
    }

._toggleGroupRoot_f3hmk_801 button:last-child {
      border-top-right-radius: var(--radius-base);
      border-bottom-right-radius: var(--radius-base);
    }

._tableToolsColumn_f3hmk_819 {
  width: 2rem;
}

._tableToolsColumn_f3hmk_819 button {
    margin: auto;
    display: block;
  }

._leftAlignedCell_f3hmk_828 {
  text-align: left;
}

._rightAlignedCell_f3hmk_832 {
  text-align: right;
}

._centeredCell_f3hmk_836 {
  text-align: center;
}

._addColumnButton_f3hmk_746,
._addRowButton_f3hmk_745 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  padding: var(--spacing-1);
  color: var(--baseTextContrast);
  background-color: var(--baseBase);

  display: flex;
  align-items: center;
}

._addColumnButton_f3hmk_746 svg, ._addRowButton_f3hmk_745 svg {
    display: block;
  }

@media (hover: hover) {
    ._addColumnButton_f3hmk_746:hover, ._addRowButton_f3hmk_745:hover {
      background-color: var(--baseBg);
    }
  }

._addColumnButton_f3hmk_746:active svg, ._addRowButton_f3hmk_745:active svg {
    transform: translate(1px, 1px);
  }

._addColumnButton_f3hmk_746[data-state='on'],
  ._addRowButton_f3hmk_745[data-state='on'],
  ._addColumnButton_f3hmk_746:active,
  ._addRowButton_f3hmk_745:active {
    background-color: var(--baseBg);
    color: var(--baseTextContrast);
  }

._addColumnButton_f3hmk_746 svg, ._addRowButton_f3hmk_745 svg {
    margin: auto;
  }

._addRowButton_f3hmk_745 {
  width: 100%;
  margin-top: var(--spacing-px);
  box-sizing: border-box;
  border-bottom-right-radius: var(--radius-medium);
  border-bottom-left-radius: var(--radius-medium);
}

._addColumnButton_f3hmk_746 {
  margin-left: var(--spacing-px);
  height: 100%;
  border-top-right-radius: var(--radius-medium);
  border-bottom-right-radius: var(--radius-medium);
}

/** Dialog */
._dialogOverlay_f3hmk_869 {
  position: fixed;
  inset: 0;
  animation: _overlayShow_f3hmk_1 150ms cubic-bezier(0.16, 1, 0.3, 1);
  background-color: var(--baseBase);
  z-index: 51;
  opacity: 0.5;
}

._dialogContent_f3hmk_602,
._largeDialogContent_f3hmk_614 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: _contentShow_f3hmk_1 150ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 52;
}

._dialogContent_f3hmk_602:focus,
._largeDialogContent_f3hmk_614:focus {
  outline: none;
}

@keyframes _overlayShow_f3hmk_1 {
  from {
    opacity: 0;
  }

  to {
    opacity: 0.5;
  }
}

@keyframes _contentShow_f3hmk_1 {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

._focusedImage_f3hmk_915 {
  outline: highlight solid 2px;
}

._imageWrapper_f3hmk_919 {
  display: inline-block;
  position: relative;
}

._imageWrapper_f3hmk_919[draggable='true'] {
  cursor: move;
  /* fallback if grab cursor is unsupported */
  cursor: grab;
  cursor: -webkit-grab;
}

._editImageToolbar_f3hmk_932 {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  gap: var(--spacing-1);
  padding: var(--spacing-1);
  z-index: 1;
  background-color: var(--baseBase);
  border-bottom-left-radius: var(--radius-base);
}

._editImageButton_f3hmk_936 svg {
    display: block;
  }

._inlineEditor_f3hmk_942 {
  display: inline-flex;
  border-radius: var(--radius-medium);
  padding: var(--spacing-1);
  gap: var(--spacing-2);
  align-items: center;
  background: var(--baseBg);
}

._blockEditor_f3hmk_951 {
  display: flex;
  justify-content: stretch;
  border-radius: var(--radius-medium);
  padding: var(--spacing-2);
  gap: var(--spacing-2);
  align-items: center;
  background: var(--baseBg);
}

._blockEditor_f3hmk_951 ._nestedEditor_f3hmk_960 {
    flex-grow: 1;
  }

._nestedEditor_f3hmk_960 {
  background: var(--basePageBg);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: var(--radius-medium);
}

._nestedEditor_f3hmk_960 > p {
    margin: 0;
  }

._nestedEditor_f3hmk_960:focus {
    outline: none;
  }

._genericComponentName_f3hmk_979 {
  font-size: var(--text-sm);
  color: var(--baseText);
  padding-right: var(--spacing-2);
}

._diffSourceToggleWrapper_f3hmk_985 {
  margin-left: auto;
  pointer-events: auto;
  opacity: 1;
  position: sticky;
  right: 0;
}

._ggDiffSourceToggle_f3hmk_993 {
}

._diffSourceToggle_f3hmk_985 {
  border-radius: var(--radius-medium);
  background-color: var(--baseBase);
  display: flex;
}

._diffSourceToggle_f3hmk_985 ._toolbarToggleItem_f3hmk_208 {
    padding: 0;
  }

._diffSourceToggle_f3hmk_985 ._toolbarToggleItem_f3hmk_208 > span {
      display: block;
      padding: var(--spacing-1) var(--spacing-1);
    }

._selectWithLabel_f3hmk_1011 {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  margin-left: var(--spacing-2);
}

._selectWithLabel_f3hmk_1011 > label {
    font-size: var(--text-sm);
  }

._selectWithLabel_f3hmk_1011 ._selectTrigger_f3hmk_308 {
    border: 1px solid var(--baseBorder);
  }

._toolbarTitleMode_f3hmk_1026 {
  font-size: var(--text-sm);
  margin-left: var(--spacing-2);
}

._imageControlWrapperResizing_f3hmk_1031 {
  touch-action: none;
}

._imageResizer_f3hmk_1035 {
  display: block;
  width: 7px;
  height: 7px;
  position: absolute;
  background-color: var(--accentText);
  border: 1px solid var(--baseBg);
}

._imageResizer_f3hmk_1035._imageResizerN_f3hmk_1044 {
  top: -6px;
  left: 48%;
  cursor: n-resize;
}

._imageResizer_f3hmk_1035._imageResizerNe_f3hmk_1050 {
  top: -6px;
  right: -6px;
  cursor: ne-resize;
}

._imageResizer_f3hmk_1035._imageResizerE_f3hmk_1056 {
  bottom: 48%;
  right: -6px;
  cursor: e-resize;
}

._imageResizer_f3hmk_1035._imageResizerSe_f3hmk_1062 {
  bottom: -2px;
  right: -6px;
  cursor: nwse-resize;
}

._imageResizer_f3hmk_1035._imageResizerS_f3hmk_1062 {
  bottom: -2px;
  left: 48%;
  cursor: s-resize;
}

._imageResizer_f3hmk_1035._imageResizerSw_f3hmk_1074 {
  bottom: -2px;
  left: -6px;
  cursor: sw-resize;
}

._imageResizer_f3hmk_1035._imageResizerW_f3hmk_1080 {
  bottom: 48%;
  left: -6px;
  cursor: w-resize;
}

._imageResizer_f3hmk_1035._imageResizerNw_f3hmk_1086 {
  top: -6px;
  left: -6px;
  cursor: nw-resize;
}

._imagePlaceholder_f3hmk_1092 {
  border: 2px dashed;
  padding: 48px;
  margin: 12px;
  width: -moz-fit-content;
  width: fit-content;
  height: -moz-fit-content;
  height: fit-content;
}

._imageDimensionsContainer_f3hmk_1100 {
  display: flex;
  gap: var(--spacing-4);
}

._placeholder_f3hmk_1105 {
  color: var(--baseSolid);
  overflow: hidden;
  position: absolute;
  top: 0;
  padding: var(--spacing-3);
  text-overflow: ellipsis;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  white-space: nowrap;
  display: inline-block;
  pointer-events: none;
}

._rootContentEditableWrapper_f3hmk_1118 {
  position: relative;
}

._downshiftContainer_f3hmk_1122 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

._downshiftInputWrapper_f3hmk_1128 {
  display: flex;
  align-items: center;
  background-color: var(--baseBase);

  border-radius: var(--radius-base);
  border: 1px solid var(--baseBorder);
}

._downshiftInputWrapper_f3hmk_1128[data-visible-dropdown='true'] {
    border-bottom-left-radius: var(--radius-none);
    border-bottom-right-radius: var(--radius-none);
    border-bottom-width: 0;
  }

._downshiftInputWrapper_f3hmk_1128 > button {
    border: 0;
    background-color: transparent;
    font-size: inherit;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    all: unset;
    box-sizing: border-box;
    cursor: default;
    padding-right: var(--spacing-2);
  }

._downshiftInput_f3hmk_1128 {
  border: 0;
  background-color: transparent;
  font-size: inherit;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  all: unset;
  box-sizing: border-box;
  cursor: default;
  width: 20rem;
  padding: var(--spacing-2) var(--spacing-3);
  font-size: var(--text-sm);
}

._downshiftInput_f3hmk_1128::-moz-placeholder {
    color: var(--baseBorder);
  }

._downshiftInput_f3hmk_1128::placeholder {
    color: var(--baseBorder);
  }

._downshiftAutocompleteContainer_f3hmk_1159 {
  position: relative;
}

._downshiftAutocompleteContainer_f3hmk_1159 ul {
    all: unset;
    box-sizing: border-box;
    position: absolute;
    font-size: var(--text-sm);
    width: 100%;
    display: none;
    border-bottom-left-radius: var(--radius-medium);
    border-bottom-right-radius: var(--radius-medium);
    max-height: var(--spacing-48);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--baseBorder);
    border-top-width: 0;
    background-color: var(--baseBase);
  }

._downshiftAutocompleteContainer_f3hmk_1159 ul[data-visible='true'] {
      display: block;
    }

._downshiftAutocompleteContainer_f3hmk_1159 ul li {
      padding: var(--spacing-2) var(--spacing-3);
      white-space: nowrap;
      margin-bottom: var(--spacing-1);
      overflow-x: hidden;
      text-overflow: ellipsis;
    }

._downshiftAutocompleteContainer_f3hmk_1159 ul li[data-selected='true'] {
        background-color: var(--baseBgSubtle);
      }

._downshiftAutocompleteContainer_f3hmk_1159 ul li[data-highlighted='true'] {
        background-color: var(--baseBgHover);
      }

._downshiftAutocompleteContainer_f3hmk_1159 ul li:last-of-type {
        border-bottom-left-radius: var(--radius-medium);
        border-bottom-right-radius: var(--radius-medium);
      }

._textInput_f3hmk_1205 {
  all: unset;
  border-radius: var(--radius-base);
  border: 1px solid var(--baseBorder);
  background-color: var(--baseBase);
  padding: var(--spacing-2) var(--spacing-3);
}

form._multiFieldForm_f3hmk_1213 {
  display: flex;
  flex-direction: column;
  padding: var(--spacing-2);
  gap: var(--spacing-2);
}

form._multiFieldForm_f3hmk_1213 ._formField_f3hmk_1219 {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
  }

form._multiFieldForm_f3hmk_1213 ._formField_f3hmk_1219 label {
      font-size: var(--text-xs);
    }

._markdownParseError_f3hmk_1230 {
  border-radius: var(--radius-base);
  border: 1px solid var(--error-color);
  padding: var(--spacing-2);
  margin-block: var(--spacing-2);
  color: var(--error-color);
  font-size: var(--text-xs);
}

._popupContainer_f3hmk_1239 {
  position: relative;
  z-index: 2;
}

._inputSizer_f3hmk_1244 {
  display: inline-grid;
  vertical-align: baseline;
  align-items: center;
  position: relative;
}

._inputSizer_f3hmk_1244::after,
  ._inputSizer_f3hmk_1244 input {
    width: auto;
    min-width: 1rem;
    grid-area: 1 / 2;
    font: inherit;
    margin: 0;
    padding: 0 2px;
    resize: none;
    background: none;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    border: none;
    color: inherit;
  }

._inputSizer_f3hmk_1244 span {
    padding: 0.25em;
  }

._inputSizer_f3hmk_1244::after {
    content: attr(data-value);
    white-space: pre-wrap;
  }
:root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
  --blue-1: #fbfdff;
  --blue-2: #f4faff;
  --blue-3: #e6f4fe;
  --blue-4: #d5efff;
  --blue-5: #c2e5ff;
  --blue-6: #acd8fc;
  --blue-7: #8ec8f6;
  --blue-8: #5eb1ef;
  --blue-9: #0090ff;
  --blue-10: #0588f0;
  --blue-11: #0d74ce;
  --blue-12: #113264;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
      --blue-1: color(display-p3 0.986 0.992 0.999);
      --blue-2: color(display-p3 0.96 0.979 0.998);
      --blue-3: color(display-p3 0.912 0.956 0.991);
      --blue-4: color(display-p3 0.853 0.932 1);
      --blue-5: color(display-p3 0.788 0.894 0.998);
      --blue-6: color(display-p3 0.709 0.843 0.976);
      --blue-7: color(display-p3 0.606 0.777 0.947);
      --blue-8: color(display-p3 0.451 0.688 0.917);
      --blue-9: color(display-p3 0.247 0.556 0.969);
      --blue-10: color(display-p3 0.234 0.523 0.912);
      --blue-11: color(display-p3 0.15 0.44 0.84);
      --blue-12: color(display-p3 0.102 0.193 0.379);
    }
  }
}

._dark_6j9u9_1, ._dark-theme_6j9u9_1 {
  --blue-1: #0d1520;
  --blue-2: #111927;
  --blue-3: #0d2847;
  --blue-4: #003362;
  --blue-5: #004074;
  --blue-6: #104d87;
  --blue-7: #205d9e;
  --blue-8: #2870bd;
  --blue-9: #0090ff;
  --blue-10: #3b9eff;
  --blue-11: #70b8ff;
  --blue-12: #c2e6ff;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    ._dark_6j9u9_1, ._dark-theme_6j9u9_1 {
      --blue-1: color(display-p3 0.057 0.081 0.122);
      --blue-2: color(display-p3 0.072 0.098 0.147);
      --blue-3: color(display-p3 0.078 0.154 0.27);
      --blue-4: color(display-p3 0.033 0.197 0.37);
      --blue-5: color(display-p3 0.08 0.245 0.441);
      --blue-6: color(display-p3 0.14 0.298 0.511);
      --blue-7: color(display-p3 0.195 0.361 0.6);
      --blue-8: color(display-p3 0.239 0.434 0.72);
      --blue-9: color(display-p3 0.247 0.556 0.969);
      --blue-10: color(display-p3 0.344 0.612 0.973);
      --blue-11: color(display-p3 0.49 0.72 1);
      --blue-12: color(display-p3 0.788 0.898 0.99);
    }
  }
}

:root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
  --slate-1: #fcfcfd;
  --slate-2: #f9f9fb;
  --slate-3: #f0f0f3;
  --slate-4: #e8e8ec;
  --slate-5: #e0e1e6;
  --slate-6: #d9d9e0;
  --slate-7: #cdced6;
  --slate-8: #b9bbc6;
  --slate-9: #8b8d98;
  --slate-10: #80838d;
  --slate-11: #60646c;
  --slate-12: #1c2024;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
      --slate-1: color(display-p3 0.988 0.988 0.992);
      --slate-2: color(display-p3 0.976 0.976 0.984);
      --slate-3: color(display-p3 0.94 0.941 0.953);
      --slate-4: color(display-p3 0.908 0.909 0.925);
      --slate-5: color(display-p3 0.88 0.881 0.901);
      --slate-6: color(display-p3 0.85 0.852 0.876);
      --slate-7: color(display-p3 0.805 0.808 0.838);
      --slate-8: color(display-p3 0.727 0.733 0.773);
      --slate-9: color(display-p3 0.547 0.553 0.592);
      --slate-10: color(display-p3 0.503 0.512 0.549);
      --slate-11: color(display-p3 0.379 0.392 0.421);
      --slate-12: color(display-p3 0.113 0.125 0.14);
    }
  }
}

._dark_6j9u9_1, ._dark-theme_6j9u9_1 {
  --slate-1: #111113;
  --slate-2: #18191b;
  --slate-3: #212225;
  --slate-4: #272a2d;
  --slate-5: #2e3135;
  --slate-6: #363a3f;
  --slate-7: #43484e;
  --slate-8: #5a6169;
  --slate-9: #696e77;
  --slate-10: #777b84;
  --slate-11: #b0b4ba;
  --slate-12: #edeef0;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    ._dark_6j9u9_1, ._dark-theme_6j9u9_1 {
      --slate-1: color(display-p3 0.067 0.067 0.074);
      --slate-2: color(display-p3 0.095 0.098 0.105);
      --slate-3: color(display-p3 0.13 0.135 0.145);
      --slate-4: color(display-p3 0.156 0.163 0.176);
      --slate-5: color(display-p3 0.183 0.191 0.206);
      --slate-6: color(display-p3 0.215 0.226 0.244);
      --slate-7: color(display-p3 0.265 0.28 0.302);
      --slate-8: color(display-p3 0.357 0.381 0.409);
      --slate-9: color(display-p3 0.415 0.431 0.463);
      --slate-10: color(display-p3 0.469 0.483 0.514);
      --slate-11: color(display-p3 0.692 0.704 0.728);
      --slate-12: color(display-p3 0.93 0.933 0.94);
    }
  }
}

:root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
  --grass-1: #fbfefb;
  --grass-2: #f5fbf5;
  --grass-3: #e9f6e9;
  --grass-4: #daf1db;
  --grass-5: #c9e8ca;
  --grass-6: #b2ddb5;
  --grass-7: #94ce9a;
  --grass-8: #65ba74;
  --grass-9: #46a758;
  --grass-10: #3e9b4f;
  --grass-11: #2a7e3b;
  --grass-12: #203c25;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
      --grass-1: color(display-p3 0.986 0.996 0.985);
      --grass-2: color(display-p3 0.966 0.983 0.964);
      --grass-3: color(display-p3 0.923 0.965 0.917);
      --grass-4: color(display-p3 0.872 0.94 0.865);
      --grass-5: color(display-p3 0.811 0.908 0.802);
      --grass-6: color(display-p3 0.733 0.864 0.724);
      --grass-7: color(display-p3 0.628 0.803 0.622);
      --grass-8: color(display-p3 0.477 0.72 0.482);
      --grass-9: color(display-p3 0.38 0.647 0.378);
      --grass-10: color(display-p3 0.344 0.598 0.342);
      --grass-11: color(display-p3 0.263 0.488 0.261);
      --grass-12: color(display-p3 0.151 0.233 0.153);
    }
  }
}

:root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
  --cyan-1: #fafdfe;
  --cyan-2: #f2fafb;
  --cyan-3: #def7f9;
  --cyan-4: #caf1f6;
  --cyan-5: #b5e9f0;
  --cyan-6: #9ddde7;
  --cyan-7: #7dcedc;
  --cyan-8: #3db9cf;
  --cyan-9: #00a2c7;
  --cyan-10: #0797b9;
  --cyan-11: #107d98;
  --cyan-12: #0d3c48;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
      --cyan-1: color(display-p3 0.982 0.992 0.996);
      --cyan-2: color(display-p3 0.955 0.981 0.984);
      --cyan-3: color(display-p3 0.888 0.965 0.975);
      --cyan-4: color(display-p3 0.821 0.941 0.959);
      --cyan-5: color(display-p3 0.751 0.907 0.935);
      --cyan-6: color(display-p3 0.671 0.862 0.9);
      --cyan-7: color(display-p3 0.564 0.8 0.854);
      --cyan-8: color(display-p3 0.388 0.715 0.798);
      --cyan-9: color(display-p3 0.282 0.627 0.765);
      --cyan-10: color(display-p3 0.264 0.583 0.71);
      --cyan-11: color(display-p3 0.08 0.48 0.63);
      --cyan-12: color(display-p3 0.108 0.232 0.277);
    }
  }
}

:root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
  --amber-1: #fefdfb;
  --amber-2: #fefbe9;
  --amber-3: #fff7c2;
  --amber-4: #ffee9c;
  --amber-5: #fbe577;
  --amber-6: #f3d673;
  --amber-7: #e9c162;
  --amber-8: #e2a336;
  --amber-9: #ffc53d;
  --amber-10: #ffba18;
  --amber-11: #ab6400;
  --amber-12: #4f3422;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
      --amber-1: color(display-p3 0.995 0.992 0.985);
      --amber-2: color(display-p3 0.994 0.986 0.921);
      --amber-3: color(display-p3 0.994 0.969 0.782);
      --amber-4: color(display-p3 0.989 0.937 0.65);
      --amber-5: color(display-p3 0.97 0.902 0.527);
      --amber-6: color(display-p3 0.936 0.844 0.506);
      --amber-7: color(display-p3 0.89 0.762 0.443);
      --amber-8: color(display-p3 0.85 0.65 0.3);
      --amber-9: color(display-p3 1 0.77 0.26);
      --amber-10: color(display-p3 0.959 0.741 0.274);
      --amber-11: color(display-p3 0.64 0.4 0);
      --amber-12: color(display-p3 0.294 0.208 0.145);
    }
  }
}

:root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
  --red-1: #fffcfc;
  --red-2: #fff7f7;
  --red-3: #feebec;
  --red-4: #ffdbdc;
  --red-5: #ffcdce;
  --red-6: #fdbdbe;
  --red-7: #f4a9aa;
  --red-8: #eb8e90;
  --red-9: #e5484d;
  --red-10: #dc3e42;
  --red-11: #ce2c31;
  --red-12: #641723;
}

@supports (color: color(display-p3 1 1 1)) {
  @media (color-gamut: p3) {
    :root, ._light_6j9u9_1, ._light-theme_6j9u9_1 {
      --red-1: color(display-p3 0.998 0.989 0.988);
      --red-2: color(display-p3 0.995 0.971 0.971);
      --red-3: color(display-p3 0.985 0.925 0.925);
      --red-4: color(display-p3 0.999 0.866 0.866);
      --red-5: color(display-p3 0.984 0.812 0.811);
      --red-6: color(display-p3 0.955 0.751 0.749);
      --red-7: color(display-p3 0.915 0.675 0.672);
      --red-8: color(display-p3 0.872 0.575 0.572);
      --red-9: color(display-p3 0.83 0.329 0.324);
      --red-10: color(display-p3 0.798 0.294 0.285);
      --red-11: color(display-p3 0.744 0.234 0.222);
      --red-12: color(display-p3 0.36 0.115 0.143);
    }
  }
}

._bold_6j9u9_10 {
  font-weight: bold;
}

._italic_6j9u9_14 {
  font-style: italic;
}

._underline_6j9u9_18 {
  text-decoration: underline;
}

._bold_6j9u9_10 {
  font-weight: 700;
}

._italic_6j9u9_14 {
  font-style: italic;
}

._underline_6j9u9_18 {
  text-decoration: underline
}

._strikethrough_6j9u9_34 {
  text-decoration: line-through
}

._underlineStrikethrough_6j9u9_38 {
  text-decoration: underline line-through
}

._subscript_6j9u9_42 {
  font-size: .8em;
  vertical-align: sub !important
}

._superscript_6j9u9_47 {
  font-size: .8em;
  vertical-align: super
}

._code_6j9u9_52 {
  background-color: var(--baseBg);
  padding: 1px .25rem;
  font-family: var(--font-mono);
  font-size: 94%
}

._quote_6j9u9_59 {
  border-inline-start: 3px solid var(--baseBorder);
  padding-inline-start: var(--spacing-4);
  margin-inline-start: 0;
  color: var(--baseText);
}

._nestedListItem_6j9u9_66 {
  list-style: none;
  list-style-type: none;
}

._nestedListItem_6j9u9_66:before,
._nestedListItem_6j9u9_66:after {
  display: none;
}

._listitem_6j9u9_76 {
  margin: var(--spacing-2) 0;
}

._listItemChecked_6j9u9_80,
._listItemUnchecked_6j9u9_81 {
  position: relative;
  margin-left: 0;
  margin-right: 0;
  margin-inline-start: -1rem;
  padding-left: var(--spacing-6);
  padding-right: var(--spacing-6);
  list-style-type: none;
  outline: none;
}

._listItemChecked_6j9u9_80 {
  text-decoration: line-through;
}

._listItemUnchecked_6j9u9_81:before,
._listItemChecked_6j9u9_80:before {
  content: '';
  width: var(--spacing-4);
  height: var(--spacing-4);
  top: 0;
  left: 0;
  cursor: pointer;
  display: block;
  background-size: cover;
  position: absolute;
}

._listItemUnchecked_6j9u9_81[dir='rtl']:before,
._listItemChecked_6j9u9_80[dir='rtl']:before {
  left: auto;
  right: 0;
}

._listItemUnchecked_6j9u9_81:focus:before,
._listItemChecked_6j9u9_80:focus:before {
  box-shadow: 0 0 0 2px var(--accentBgActive);
  border-radius: var(--radius-small);
}

._listItemUnchecked_6j9u9_81:before {
  border: 1px solid var(--baseBorder);
  border-radius: var(--radius-small);
}

._listItemChecked_6j9u9_80:before {
  border: 1px solid var(--accentBorder);
  border-radius: var(--radius-small);
  background-color: var(--accentSolid);
  background-repeat: no-repeat;
}

._listItemChecked_6j9u9_80:after {
  content: '';
  cursor: pointer;
  border-color: var(--baseBase);
  border-style: solid;
  position: absolute;
  display: block;
  top: var(--spacing-0_5);
  width: var(--spacing-1);
  left: var(--spacing-1_5);
  right: var(--spacing-1_5);
  height: var(--spacing-2);
  transform: rotate(45deg);
  border-width: 0 var(--spacing-0_5) var(--spacing-0_5) 0;
}

._nestedListItem_6j9u9_66 {
  list-style-type: none;
}

._nestedListItem_6j9u9_66:before,
._nestedListItem_6j9u9_66:after {
  display: none;
}

._admonitionDanger_6j9u9_158,
._admonitionInfo_6j9u9_159,
._admonitionNote_6j9u9_160,
._admonitionTip_6j9u9_161,
._admonitionCaution_6j9u9_162 {
  padding: var(--spacing-2);
  margin-top: var(--spacing-2);
  margin-bottom: var(--spacing-2);
  border-left: 3px solid var(--admonitionBorder);
  background-color: var(--admonitionBg);
}

._admonitionInfo_6j9u9_159 {
  --admonitionBorder: var(--admonitionInfoBorder);
  --admonitionBg: var(--admonitionInfoBg);
}

._admonitionTip_6j9u9_161 {
  --admonitionBorder: var(--admonitionTipBorder);
  --admonitionBg: var(--admonitionTipBg);
}

._admonitionCaution_6j9u9_162 {
  --admonitionBorder: var(--admonitionCautionBorder);
  --admonitionBg: var(--admonitionCautionBg);
}

._admonitionDanger_6j9u9_158 {
  --admonitionBorder: var(--admonitionDangerBorder);
  --admonitionBg: var(--admonitionDangerBg);
}

._admonitionNote_6j9u9_160 {
  --admonitionBorder: var(--admonitionNoteBorder);
  --admonitionBg: var(--admonitionNoteBg);
}

._mdxExpression_6j9u9_195 {
  font-family: var(--font-mono);
  font-size: 84%;
  color: var(--accentText);
}

._mdxExpression_6j9u9_195 input:focus-visible {
    outline: none;
  }

/*!***************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/editorial.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************************/
/* ==========================================================================
   Design Playground — Editorial Workspace Board
   --------------------------------------------------------------------------
   chat-xyren 디자인 탐색용. 모든 색은 globals.css 의 토큰(--bone / --ink /
   --terra / --moss / --amber ...)을 경유하며, soft wash 는 color-mix() 로
   토큰에서 파생 → light / [data-theme="midnight"] 양쪽이 일관되게 따라간다.
   keyframes `pulse` / `inkBleed` / 토큰 / `.paper-grain-overlay` /
   `.ink-loader-*` 는 globals.css 에 정의되어 있다.
   ========================================================================== */

:root {
  --noise-opacity: 0.022;
}

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

/* 도장 날인 — transform(rotate/translate)과 충돌하지 않도록 scale 개별
   속성 + opacity 만 애니메이트한다. */
@keyframes scaleInStamp {
  from {
    opacity: 0;
    scale: 0.4;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* 인라인 라인 아이콘 (icons.tsx) — flex 라벨 안에서 줄어들지 않도록 고정 */
.pg-icon {
  flex-shrink: 0;
}

/* ==========================================================================
   page.tsx — 최상위 셸 & 통제 패널
   ========================================================================== */
.pg-root {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bone);
  color: var(--ink);
  overflow: hidden;
  position: relative;
}

.pg-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bone-2);
  border-bottom: 4px double var(--ink);
  z-index: 10;
  flex-shrink: 0;
}
.pg-chrome__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pg-chrome__mark {
  font-size: 22px;
  color: var(--amber);
  user-select: none;
}
.pg-chrome__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.pg-chrome__controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pg-chrome__toggles {
  display: flex;
  gap: 6px;
}
.pg-chrome__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 10px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--bone);
  color: var(--ink-2);
}
.pg-chrome__toggle.is-on {
  background: var(--terra-wash);
  color: var(--terra);
}
.pg-chrome__toggle:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pg-chrome__theme,
.pg-chrome__drawer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  transition: all 0.15s ease;
}
.pg-chrome__theme {
  background: var(--ink);
  color: var(--bone);
  box-shadow: 3px 3px 0 var(--terra);
}
.pg-chrome__drawer-btn {
  background: var(--bone-2);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--terra);
}
.pg-chrome__drawer-btn.is-open {
  background: var(--terra);
  color: var(--bone);
  box-shadow: 3px 3px 0 var(--ink);
}

.pg-shell {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}
.pg-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bone);
}

/* ── 중앙 상단 가이드 바 ─────────────────────────────────────────────── */
.pg-guidebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: var(--bone-2);
  border-bottom: 1px solid var(--ink-4);
}
.pg-guidebar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.pg-guidebar__label {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.pg-guidebar__name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-guidebar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.pg-guidebar__toggle {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  padding: 3px 8px;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 2px;
  transition: all 0.12s ease;
}
.pg-guidebar__toggle.is-on {
  color: var(--bone);
  background: var(--ink);
  border-color: var(--ink);
}
.pg-guidebar__chips {
  display: flex;
  gap: 6px;
}
.pg-guidebar__chip {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  cursor: pointer;
}
.pg-guidebar__chip--rag {
  color: var(--moss);
  border: 1px solid var(--moss);
  background: color-mix(in srgb, var(--moss) 10%, transparent);
}
.pg-guidebar__chip--file {
  color: var(--terra);
  border: 1px solid var(--terra);
  background: color-mix(in srgb, var(--terra) 10%, transparent);
}
.pg-guidebar__archive {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--moss);
}

/* ── HITL 슬롯 (메시지와 컴포저 사이) ───────────────────────────────── */
.pg-hitl-slot {
  width: 100%;
  padding: 0 48px;
  background: var(--bone);
  flex-shrink: 0;
}
.pg-hitl-slot__inner {
  max-width: 880px;
  margin: 16px auto 0;
}

/* ── 프로젝트 대시보드 ──────────────────────────────────────────────── */
.pg-project {
  flex: 1;
  overflow-y: auto;
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: var(--bone);
}
.pg-project__header {
  position: relative;
}
.pg-project__kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 6px;
}
.pg-project__name {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
}
.pg-project__desc {
  margin-top: 8px;
  max-width: 70ch;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.pg-project__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}
.pg-project__panel {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bone-2);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 2px;
}
.pg-project__panel-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ink-3);
}
.pg-project__files-head .pg-project__panel-label {
  margin-bottom: 0;
}
.pg-project__textarea {
  width: 100%;
  height: 180px;
  padding: 12px;
  resize: none;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 2px;
}
.pg-project__panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.pg-project__hint {
  font-size: 11px;
  color: var(--ink-3);
}
.pg-project__save {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--bone);
  background: var(--ink);
  border: none;
  padding: 4px 10px;
  border-radius: 2px;
}
.pg-project__files-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.pg-project__upload {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--terra);
  background: none;
  border: none;
}
.pg-project__files {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.pg-project__file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 2px;
}
.pg-project__file-main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-project__file-icon {
  line-height: 0;
  color: var(--ink-3);
}
.pg-project__file-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.pg-project__file-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pg-project__file-type {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  padding: 2px 4px;
  border-radius: 2px;
}
.pg-project__file-size {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.pg-project__sessions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 4px double var(--ink);
}
.pg-project__sessions-label {
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-3);
}
.pg-project__session-list {
  display: flex;
  gap: 16px;
}
.pg-project__session {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: underline;
  cursor: pointer;
}
.pg-project__launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  color: var(--bone);
  background: var(--terra);
  border: 1px solid var(--ink);
  padding: 12px 24px;
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: box-shadow 0.15s ease;
}
.pg-project__launch:hover {
  box-shadow: 5px 5px 0 var(--moss);
}

/* ==========================================================================
   MockSidebar
   ========================================================================== */
.pg-sidebar {
  width: 320px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bone-2);
  border-right: 1px solid var(--ink-4);
  position: relative;
}
.pg-sidebar__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--bone);
  border-bottom: 1px solid var(--ink-4);
}
.pg-sidebar__tabs {
  display: flex;
  padding: 2px;
  background: var(--bone-2);
  border: 1px solid var(--ink);
  border-radius: 2px;
}
.pg-sidebar__tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 0;
  background: transparent;
  color: var(--ink-2);
  border: none;
  border-radius: 1px;
  transition: all 0.15s ease;
}
.pg-sidebar__tab.is-active {
  background: var(--terra-ink);
  color: var(--bone);
}
.pg-sidebar__list {
  flex: 1;
  overflow-y: auto;
}

/* 헤더 — 새 항목 버튼 */
.pg-sidebar__newbtn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 9px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bone);
  background: var(--terra-ink);
  border: 1px solid var(--terra-ink);
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--amber);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.pg-sidebar__newbtn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--amber);
}

/* 헤더 — 검색 + 즐겨찾기 토글 */
.pg-sidebar__searchrow {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.pg-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--ink-3);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 2px;
  transition:
    border-color 0.12s ease,
    color 0.12s ease;
}
.pg-search:focus-within {
  color: var(--amber);
  border-color: var(--amber);
}
.pg-search__input {
  flex: 1;
  min-width: 0;
  padding: 7px 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
}
.pg-favtoggle {
  flex-shrink: 0;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-3);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 2px;
  transition: all 0.12s ease;
}
.pg-favtoggle:hover {
  color: var(--amber);
  border-color: var(--amber);
}
.pg-favtoggle.is-on {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  border-color: var(--amber);
}

/* 리스트 섹션 헤더 (즐겨찾기 / 전체) */
.pg-sidebar__section {
  padding: 12px 20px 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--ink-3);
}
.pg-sidebar__section--fav {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 6%, transparent);
}
.pg-sidebar__section--all {
  margin-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.pg-sidebar__empty {
  padding: 28px 20px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: var(--ink-3);
}

.pg-conv,
.pg-proj {
  cursor: pointer;
  position: relative;
  background: transparent;
  transition: background 0.2s ease;
}
.pg-proj {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.pg-conv {
  padding: 10px 14px 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-proj {
  padding: 18px 20px;
}
.pg-conv:hover,
.pg-proj:hover {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.pg-conv.is-active,
.pg-proj.is-active {
  background: var(--bone-3);
}
.pg-conv.is-active::before,
.pg-proj.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}
.pg-conv.is-active::before {
  background: var(--amber);
}
.pg-proj.is-active::before {
  background: var(--moss);
}

.pg-conv__meta,
.pg-proj__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.pg-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone);
  padding: 2px 5px;
  border-radius: 2px;
}
.pg-tag--amber {
  background: var(--amber);
}
.pg-tag--terra {
  background: var(--terra);
}
.pg-tag--moss {
  background: var(--moss);
}
.pg-tag--ink {
  background: var(--ink-3);
}

.pg-stage {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 2px;
  text-transform: uppercase;
}
.pg-stage--ai {
  color: #fff;
  background: var(--moss);
}
.pg-stage--thinking {
  color: #fff;
  background: var(--amber);
}
.pg-stage--streaming {
  color: #fff;
  background: var(--terra);
}
.pg-stage--handoff {
  color: #fff;
  background: var(--amber);
}
.pg-stage--agent {
  color: #fff;
  background: var(--ink-2);
}
.pg-stage--closed {
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.pg-conv__time {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.pg-conv__subject {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-conv__star {
  margin-right: 4px;
  color: var(--amber);
  font-size: 11px;
}
.pg-conv__rename {
  width: 100%;
  box-sizing: border-box;
  padding: 1px 5px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid var(--terra);
  border-radius: 2px;
  outline: none;
}
.pg-conv__unread {
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--terra);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

/* 대화 카드 컨텍스트 메뉴 (이름 변경 / 즐겨찾기 / 삭제) */
.pg-conv__menu-btn {
  flex-shrink: 0;
  width: 18px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink-2);
  background: transparent;
  border: none;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.pg-conv:hover .pg-conv__menu-btn,
.pg-conv.is-active .pg-conv__menu-btn,
.pg-conv.is-menu-open .pg-conv__menu-btn {
  opacity: 1;
  pointer-events: auto;
}
.pg-conv__menu-btn:hover,
.pg-conv.is-menu-open .pg-conv__menu-btn {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.pg-conv-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
}
.pg-conv-menu {
  position: absolute;
  top: 36px;
  right: 12px;
  z-index: 91;
  min-width: 150px;
  padding: 4px 0;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 3px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--ink) 18%, transparent);
}
.pg-conv-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: none;
}
.pg-conv-menu__item:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.pg-conv-menu__item--danger {
  color: var(--terra);
}
.pg-conv-menu__item--danger:hover {
  background: color-mix(in srgb, var(--terra) 8%, transparent);
}
.pg-proj__count {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.pg-proj__count-seg {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pg-proj__name {
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.pg-proj.is-active .pg-proj__name {
  text-decoration: underline;
  text-decoration-color: var(--moss);
  text-decoration-thickness: 1.5px;
}
.pg-proj__desc {
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 사이드바 최하단 — 사용자 정보 */
.pg-sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--bone-3) 40%, transparent);
  border-top: 1px solid var(--ink-4);
}
.pg-sidebar__user-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}
.pg-sidebar__user-info {
  flex: 1;
  min-width: 0;
}
.pg-sidebar__user-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-sidebar__user-status {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-sidebar__user-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 5px 7px;
  font-family: var(--mono);
  color: var(--ink-3);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 2px;
  transition: all 0.12s ease;
}
.pg-sidebar__user-btn:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}
.pg-sidebar__user-btn--logout {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--terra);
  border-color: color-mix(in srgb, var(--terra) 35%, transparent);
}
.pg-sidebar__user-btn--logout:hover {
  color: var(--bone);
  background: var(--terra);
  border-color: var(--terra);
}

/* ==========================================================================
   MockComposer
   ========================================================================== */
.pg-composer {
  position: relative;
  padding: 20px 48px 32px;
  background: var(--bone);
  border-top: 1px solid var(--ink-4);
}
.pg-composer__inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}
.pg-composer__suggest {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pg-composer__suggest-label {
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ink-3);
}
.pg-chip {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  padding: 4px 12px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--bone-3) 25%, transparent);
  border: 1px dashed var(--ink-4);
  border-radius: 12px;
  transition: all 0.15s ease;
}
.pg-chip:hover {
  border-color: var(--terra);
  color: var(--terra);
}

.pg-composer__box {
  position: relative;
  padding: 2px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.18s ease;
}
.pg-composer__box:focus-within {
  border-color: var(--amber);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--amber) 8%, transparent);
}

/* drag/drop — Phase C. dropzone overlay 는 항상 DOM 에 있고 ``--drag-active``
 * 일 때만 visible. ``--inner`` 의 max-width / margin 안에 absolutely positioned
 * 해 textarea 영역과 시각적으로 겹침. */
.pg-composer__dropzone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.15s ease,
    transform 0.18s ease;
  z-index: 10;
}
.pg-composer--drag-active .pg-composer__dropzone {
  opacity: 1;
  transform: scale(1);
}
.pg-composer--drag-active .pg-composer__box {
  border-color: var(--amber);
  border-style: dashed;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--amber) 10%, transparent);
}
.pg-composer__dropzone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 36px;
  background: color-mix(in srgb, var(--bone) 92%, transparent);
  border: 1px dashed var(--amber);
  border-radius: 4px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 6%, transparent);
}
.pg-composer__dropzone-icon {
  font-family: var(--mono);
  font-size: 28px;
  line-height: 1;
  color: var(--amber);
}
.pg-composer__dropzone-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--ink);
}
.pg-composer__dropzone-meta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--ink-3);
}

.pg-composer__row {
  display: flex;
  align-items: stretch;
}
.pg-composer__gutter {
  width: 56px;
  flex-shrink: 0;
  padding: 16px 12px 0 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--amber);
  border-right: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  user-select: none;
}
.pg-composer__cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 8px;
}
.pg-composer__textarea {
  width: 100%;
  min-height: 48px;
  resize: none;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
}
/* 첨부 미리보기 — textarea 위 chip strip. Composer Phase A. */
.pg-composer__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed color-mix(in srgb, var(--ink) 12%, transparent);
}
.pg-composer__attach {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 5px 6px 5px 8px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 2px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
/* Upload state modifier — Composer Phase B. ext 박스가 status indicator
   역할도 carry (uploading=amber pulse / error=terra). done 은 default. */
.pg-composer__attach--uploading .pg-composer__attach-ext {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 12%, transparent);
  animation: pulse 1.4s infinite;
}
.pg-composer__attach--uploading .pg-composer__attach-size {
  color: var(--amber);
}
.pg-composer__attach--error {
  border-color: var(--terra);
  background: color-mix(in srgb, var(--terra) 6%, transparent);
}
.pg-composer__attach--error .pg-composer__attach-ext {
  color: var(--terra);
  background: color-mix(in srgb, var(--terra) 12%, transparent);
}
.pg-composer__attach--error .pg-composer__attach-size {
  color: var(--terra);
}
.pg-composer__attach-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 30px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink-2);
  background: var(--bone-3);
}
.pg-composer__attach-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.pg-composer__attach-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.pg-composer__attach-size {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}

/* B-4 drawer: 중간과정 영역의 attachment chip — composer attach 와 같은
 * 디자인 언어, 단 clickable (drawer open). composer 의 chip 보다 약간 작게. */
.pg-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 4px 8px 4px 6px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 2px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
  text-align: left;
}
.pg-attachment-chip:hover {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 6%, transparent);
}
.pg-attachment-chip__ext {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink-2);
  background: var(--bone-3);
}
.pg-attachment-chip__name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.pg-attachment-chip__size {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}

/* B-4 drawer file-parse 탭 ─────────────────────────────────────────── */
.pg-drawer__hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--ink-4);
  padding: 20px 4px;
  text-align: center;
}
.pg-drawer__hint--error {
  color: var(--terra);
}
.pg-file-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  margin-bottom: 12px;
}
.pg-file-meta__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.pg-file-meta__label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--ink-3);
  width: 72px;
  flex-shrink: 0;
}
.pg-file-meta__value {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink);
  word-break: break-all;
}
.pg-file-markdown {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink);
  background: color-mix(in srgb, var(--bone-3) 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  padding: 12px;
  border-radius: 2px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}
.pg-composer__attach-remove {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 2px;
  padding: 0;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}
.pg-composer__attach-remove:hover {
  color: var(--terra);
  background: color-mix(in srgb, var(--terra) 8%, transparent);
}
.pg-composer__toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 15%, transparent);
}
.pg-composer__tool {
  cursor: pointer;
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  border: none;
  border-radius: 2px;
}
.pg-composer__tool:hover {
  background: var(--bone-2);
}
.pg-composer__tool--attach:hover {
  background: var(--bone-2);
  color: var(--terra);
}
.pg-composer__ai {
  margin-left: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 2px;
  transition: all 0.15s ease;
}
.pg-composer__ai.is-on {
  color: var(--amber);
  background: var(--terra-wash);
  border-color: var(--terra);
}
.pg-composer__ai-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--ink-4);
  border-radius: 50%;
}
.pg-composer__ai.is-on .pg-composer__ai-dot {
  background: var(--terra);
  animation: pulse 1.4s infinite ease-in-out;
}
.pg-composer__send {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bone);
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 6px 16px;
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--terra);
  transition: all 0.15s ease;
}
.pg-composer__send:active:not(:disabled) {
  transform: translate(1px, 1px);
}
.pg-composer__send:disabled {
  cursor: not-allowed;
  color: var(--ink-3);
  background: var(--bone-3);
  box-shadow: none;
}
.pg-composer__stop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bone);
  background: var(--terra);
  border: 1px solid var(--terra);
  border-radius: 2px;
}
.pg-composer__stop-sq {
  width: 9px;
  height: 9px;
  background: var(--bone);
  border-radius: 1px;
}
.pg-composer__stop-esc {
  font-size: 9px;
  opacity: 0.6;
}
.pg-composer__fly {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 80px;
  z-index: 5;
  pointer-events: none;
}
.pg-composer__fly-bubble {
  display: inline-block;
  max-width: 420px;
  padding: 10px 14px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--bone);
  background: var(--ink);
  border-radius: 2px;
  animation: fly 520ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.pg-composer__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--ink-4);
}

/* ==========================================================================
   MockMessageList
   ========================================================================== */
.pg-msglist {
  flex: 1;
  overflow-y: auto;
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: var(--bone);
}

/* ── Welcome (empty conversation) ───────────────────────────────────── */
.pg-welcome {
  flex: 1;
  margin: 0 auto;
  max-width: 720px;
  width: 100%;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pg-welcome__mark {
  font-size: 36px;
  line-height: 1;
  color: var(--amber);
  margin-bottom: 18px;
}
.pg-welcome__kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.pg-welcome__title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.pg-welcome__title-dot {
  color: var(--amber);
}
.pg-welcome__sub {
  margin: 0 0 32px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-3);
}
.pg-welcome__chips {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.pg-welcome__chip {
  cursor: pointer;
  text-align: left;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: color-mix(in srgb, var(--bone) 70%, var(--bone-2));
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 4px;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}
.pg-welcome__chip:hover {
  transform: translateY(-1px);
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 8%, var(--bone));
}
.pg-welcome__chip-kicker {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--amber);
}
.pg-welcome__chip-text {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

/* 채팅 중간과정은 오렌지 포인트에서 제외하고 기존 회색 톤을 유지. */
.pg-think,
.pg-step,
.pg-streamloader,
.pg-skel,
.pg-hitl {
  --amber: #6b6b6b;
}

/* ── AI Reasoning Bubble ────────────────────────────────────────────── */
.pg-think {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  /* 메시지 거터(48) + gap(20) 만큼 들여써 본문 정렬 유지 (넘버는 제거) */
  padding-left: 68px;
}
.pg-think__body {
  padding: 14px 18px;
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  border: 1px solid var(--amber);
  border-radius: 2px;
}
.pg-think__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.pg-think.is-collapsed .pg-think__head {
  margin-bottom: 0;
}
.pg-think__head-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pg-think__badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 16%, transparent);
  padding: 2px 7px;
  border-radius: 2px;
}
.pg-think__meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}
.pg-think__toggle {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  padding: 2px 8px;
  border-radius: 2px;
}
.pg-think__steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── RUN ERROR card ─────────────────────────────────────────────────── */
/* ``.pg-think`` (REASONING) 와 동일 정렬 패턴 — message column 의 다른 카드와
   가운데 정렬 + 좌측 거터 일치. 외장 ERR 라벨 제거하고 body 안 badge 로 통합. */
.pg-err {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding-left: 68px;
}
.pg-err__body {
  padding: 14px 18px;
  background: color-mix(in srgb, var(--terra) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--terra) 55%, transparent);
  border-radius: 2px;
}
.pg-err__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pg-err__badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--terra);
  background: color-mix(in srgb, var(--terra) 14%, transparent);
  padding: 2px 7px;
  border-radius: 2px;
}
.pg-err__dismiss {
  all: unset;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  padding: 2px 8px;
  border-radius: 2px;
}
.pg-err__dismiss:hover {
  color: var(--terra);
  border-color: var(--terra);
}
.pg-err__msg {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Reasoning step row ─────────────────────────────────────────────── */
.pg-step {
  position: relative;
  margin-left: 6px;
  padding-bottom: 12px;
}
.pg-step--hitl {
  border-left: 2px solid var(--amber);
  padding-left: 18px;
}
.pg-step__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.pg-step__kind {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.4px;
  padding: 1px 6px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  border-radius: 2px;
}
.pg-step__kind--plan {
  color: var(--ink-2);
}
.pg-step__kind--stage {
  color: var(--ink-3);
}
.pg-step__kind--tool {
  color: var(--amber);
}
.pg-step__kind--hitl {
  color: var(--amber);
}
.pg-step__kind--compliance {
  color: var(--amber);
}
.pg-step__kind--draft {
  color: var(--ink-3);
}
.pg-step__kind--checklist {
  color: var(--moss);
}
.pg-step__kind--summary {
  color: var(--ink-3);
}
.pg-step__kind--calc {
  color: var(--ink-2);
}
.pg-step__kind--policy {
  color: var(--moss);
}
.pg-step__subagent {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 12%, transparent);
}
.pg-step__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--ink);
}
.pg-step__dur {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}
.pg-step__toggle {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}
.pg-step__detail {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.pg-step__note {
  margin-top: 4px;
  padding-left: 12px;
  border-left: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
.pg-step__note-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pg-link {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
}

/* ==========================================================================
   NotebookLM MVP layout
   ========================================================================== */
.nb-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nb-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--bone-2);
  display: flex;
  flex-direction: column;
}

.nb-sidebar__head {
  padding: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-sidebar__title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ink-3);
}

.nb-sidebar__new {
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.nb-sidebar__list {
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nb-sidebar__item {
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--bone);
  padding: 8px;
  cursor: pointer;
}

.nb-sidebar__item.is-active {
  border-color: var(--terra);
  background: color-mix(in srgb, var(--terra) 8%, var(--bone));
}

.nb-sidebar__item-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.nb-sidebar__item-summary {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
}

.nb-sources {
  background: color-mix(in srgb, var(--bone-2) 70%, var(--bone));
}
/* 상세 뷰는 패널 전체 높이를 채우고, 헤더는 고정 + 본문이 하단까지 스크롤.
   (list 뷰는 영향 없음 — modifier 로 한정) */
.nb-sources--detail {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.nb-sources--detail .nb-sources__detail-body {
  flex: 1;
  min-height: 0;
  /* body 자체는 스크롤하지 않음 — 문서명/소스가이드는 고정, 본문만 스크롤. */
  overflow: hidden;
}
/* 문서명 + 소스 가이드는 자연 높이로 고정 (flex 가 눌러서 사라지지 않게). */
.nb-sources--detail .nb-sources__detail-doc-name,
.nb-sources--detail .nb-sources__guide {
  flex: 0 0 auto;
}
/* 문서 본문만 남은 높이를 채우고 스크롤 + 하단 여백. */
.nb-sources--detail .nb-sources__doc-text {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 16px;
}

.nb-sources__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px 10px 16px;
}
.nb-sources.is-collapsed .nb-sources__head {
  justify-content: center;
  padding: 12px 0 10px;
}

.nb-sources__title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* "모두 선택" — 목록 위 row, **label + checkbox 묶음을 우측 정렬**.
 *   - row 의 우측 padding 을 list item 의 우측 padding 과 동일하게 맞춰
 *     체크박스가 아래 item-check 와 같은 column 정렬.
 *   - label 은 checkbox 좌측에 인접 (gap=8px). */
.nb-sources__select-all {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  cursor: pointer;
  margin: 0 16px 8px;
  padding: 6px 10px 6px 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  background: transparent;
  border-radius: 6px;
}
.nb-sources__select-all:hover {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.nb-sources__select-all input {
  margin: 0;
}

.nb-sources input[type="checkbox"],
.nb-studio input[type="checkbox"],
.nb-gen__field--inline input[type="checkbox"] {
  accent-color: var(--ink);
}
.nb-sources__select-all-label {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
}

/* Panel collapse/expand toggle — 출처 + 스튜디오 head 공통 */
.nb-panel-toggle {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-2);
  background: transparent;
  border: none;
  border-radius: 6px;
  transition:
    background 0.12s ease,
    color 0.12s ease;
  padding: 0;
}
.nb-panel-toggle svg {
  display: block;
}
.nb-panel-toggle:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.nb-sources__controls {
  padding: 12px 16px;
  display: grid;
  gap: 8px;
}

/* "+ 출처 추가" 단일 CTA — modal 진입점 */
.nb-sources__add-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  height: 36px;
  padding: 0 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--bone);
  background: var(--terra-ink);
  border: 1px solid var(--terra-ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--amber);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.nb-sources__add-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--amber);
}

.nb-sources__dropzone {
  margin: 0 16px 10px;
  border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 11px;
  text-align: center;
  padding: 10px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--bone-2) 40%, transparent);
}

.nb-sources__dropzone.is-drag-over {
  border-color: var(--amber);
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 8%, transparent);
}

/* ── AddSourceModal ───────────────────────────────────────────────── */
.nb-add__backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 50%, transparent);
  backdrop-filter: blur(2px);
}
.nb-add {
  position: fixed;
  z-index: 101;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 24px 28px 20px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 14px;
  box-shadow: 0 20px 50px color-mix(in srgb, var(--ink) 30%, transparent);
}
.nb-add__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.nb-add__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.nb-add__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 999px;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.nb-add__close:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.nb-add__lead {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* ── 노트북 채팅 패널 헤더 + ⋮ 메뉴 ───────────────────────────────── */
.nb-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.nb-chat__title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.nb-chat__menu-wrap {
  position: relative;
}
.nb-chat__menu-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.nb-chat__menu-btn:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.nb-menu.nb-chat__menu {
  position: absolute;
  top: 36px;
  right: 0;
  z-index: 91;
  min-width: 220px;
  padding: 6px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 10px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--ink) 22%, transparent);
}
/* ── 공통 확인 모달 (ConfirmModal) ─────────────────────────────────── */
.nb-confirm__backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: color-mix(in srgb, var(--ink) 50%, transparent);
  backdrop-filter: blur(2px);
}
.nb-confirm {
  position: fixed;
  z-index: 111;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 40px));
  padding: 24px 26px 20px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 14px;
  box-shadow: 0 20px 50px color-mix(in srgb, var(--ink) 30%, transparent);
}
.nb-confirm__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.nb-confirm__body {
  margin: 0 0 22px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
  white-space: pre-line;
}
.nb-confirm__body ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.nb-confirm__body li {
  margin: 4px 0;
}
.nb-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.nb-confirm__cancel,
.nb-confirm__confirm {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
}
.nb-confirm__cancel {
  background: transparent;
  color: var(--ink-3);
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
}
.nb-confirm__cancel:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.nb-confirm__confirm {
  background: var(--ink);
  color: var(--bone);
}
.nb-confirm__confirm:hover {
  background: color-mix(in srgb, var(--ink) 85%, transparent);
}
.nb-confirm__confirm.is-danger {
  background: #b3261e;
  color: #fff;
}
.nb-confirm__confirm.is-danger:hover {
  background: #9a201a;
}
.nb-confirm__cancel:disabled,
.nb-confirm__confirm:disabled {
  opacity: 0.55;
  cursor: default;
}

.nb-add__dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 28px 16px;
  margin-bottom: 18px;
  background: color-mix(in srgb, var(--amber) 5%, var(--bone));
  border: 2px dashed color-mix(in srgb, var(--amber) 40%, var(--ink-4));
  border-radius: 10px;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}
.nb-add__dropzone:hover,
.nb-add__dropzone.is-drag-over {
  background: color-mix(in srgb, var(--amber) 12%, var(--bone));
  border-color: var(--amber);
}
.nb-add__dropzone-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bone);
  background: var(--terra-ink);
  border-radius: 999px;
  margin-bottom: 4px;
}
.nb-add__dropzone-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.nb-add__dropzone-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--ink-3);
}

.nb-add__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.nb-add__type {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 10px;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}
.nb-add__type:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--amber) 60%, transparent);
  background: color-mix(in srgb, var(--amber) 5%, var(--bone));
}
.nb-add__type.is-soon {
  opacity: 0.55;
  cursor: not-allowed;
}
.nb-add__type.is-soon:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--bone);
}
.nb-add__type-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 12%, var(--bone-2));
  border-radius: 8px;
}
.nb-add__type-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nb-add__type-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.nb-add__type-soon {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  padding: 1px 5px;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 20%, transparent);
  border-radius: 2px;
}
.nb-add__type-desc {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
}

/* link / youtube / text subview */
.nb-add__subview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0;
}
.nb-add__sublabel {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--ink-3);
}
.nb-add__suburl {
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 6px;
  outline: none;
}
.nb-add__suburl:focus {
  border-color: var(--amber);
}
.nb-add__subtextarea {
  min-height: 140px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 6px;
  outline: none;
  resize: vertical;
}
.nb-add__subtextarea:focus {
  border-color: var(--amber);
}
.nb-add__subactions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.nb-add__back {
  cursor: pointer;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 999px;
}
.nb-add__back:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.nb-add__submit {
  cursor: pointer;
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--bone);
  background: var(--terra-ink);
  border: 1px solid var(--terra-ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--amber);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.nb-add__submit:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--amber);
}

/* footer limit */
.nb-add__foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.nb-add__limit-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.nb-add__limit-label strong {
  font-family: var(--mono);
  color: var(--ink);
  margin-left: 6px;
}
.nb-add__limit-bar {
  height: 4px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 2px;
  overflow: hidden;
}
.nb-add__limit-fill {
  height: 100%;
  background: var(--terra-ink);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.nb-sources__limits {
  padding: 0 16px 10px;
  display: grid;
  gap: 6px;
}

.nb-sources__limit-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

.nb-sources__progress {
  height: 6px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}

.nb-sources__progress > div {
  height: 100%;
  background: var(--terra);
}

.nb-sources__filters {
  padding: 0 16px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.nb-sources__search {
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  padding: 6px 8px;
}

.nb-sources__active-only {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

.nb-sources__list {
  display: grid;
  gap: 8px;
  padding: 0 16px 10px;
}

.nb-sources__item {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 10px 10px 10px 12px;
  position: relative;
  min-width: 0;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.nb-sources__item:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.nb-sources__item.is-selected {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.nb-sources__item.is-menu-open {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.nb-sources__item-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nb-sources__item-main-btn {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
}

/* Type 아이콘 — 작은 squircle, tone 별 wash 색 */
.nb-sources__type-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, var(--bone-2));
}
.nb-sources__type-icon--link {
  color: #1f6a44;
  background: color-mix(in srgb, #1f6a44 12%, var(--bone-2));
}
.nb-sources__type-icon--youtube {
  color: #b3261e;
  background: color-mix(in srgb, #b3261e 12%, var(--bone-2));
}
.nb-sources__type-icon--text {
  color: var(--ink-2);
  background: color-mix(in srgb, var(--ink) 6%, var(--bone-2));
}

/* Type dot — detail header 칩 안 작은 dot */
.nb-sources__type-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  background: var(--terra-ink);
}
.nb-sources__type-dot--link {
  background: #1f6a44;
}
.nb-sources__type-dot--youtube {
  background: #b3261e;
}
.nb-sources__type-dot--text {
  background: var(--ink-2);
}

.nb-sources__item-check {
  flex-shrink: 0;
  margin: 0;
}

.nb-sources__item-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.nb-sources__item-name {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nb-sources__item-sub {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-4);
}
.nb-sources__item-status {
  color: var(--terra);
}

.nb-sources__item-summary {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-3);
}

.nb-sources__keywords {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nb-sources__keywords span {
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: color-mix(in srgb, var(--bone-3) 30%, transparent);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  padding: 1px 6px;
}

.nb-sources__empty {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}

.nb-sources__item-actions {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.nb-sources__item-more {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 4px;
  opacity: 0;
  transition:
    opacity 0.12s ease,
    background 0.12s ease;
}
.nb-sources__item:hover .nb-sources__item-more,
.nb-sources__item.is-menu-open .nb-sources__item-more {
  opacity: 1;
}
.nb-sources__item-more:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.nb-sources__item-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: -6px;
  z-index: 20;
  min-width: 146px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--bone);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 15%, transparent);
  display: grid;
}

.nb-sources__item-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.nb-sources__item-menu button:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.nb-sources__item-menu-danger {
  color: var(--terra) !important;
}
.nb-sources__item-menu-danger:hover {
  background: color-mix(in srgb, var(--terra) 8%, transparent) !important;
}

.nb-sources__detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.nb-sources__detail-back {
  /* 우측 끝으로 — 좌측 타이틀 다음 free space 를 흡수. */
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-2);
  background: transparent;
  border: none;
  border-radius: 999px;
}
.nb-sources__detail-back:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}
.nb-sources__detail-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.nb-sources__detail-body {
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.nb-sources__detail-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, var(--bone-2));
  border-radius: 12px;
}
.nb-sources__detail-doc-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  word-break: break-word;
}
.nb-sources__detail-typechip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 999px;
  background: var(--bone);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 12px 4px 10px;
}

.nb-sources__detail-section {
  margin-top: 8px;
}
.nb-sources__detail-section-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.nb-sources__detail-summary {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.nb-sources__suggested {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.nb-sources__suggested-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}
.nb-sources__suggested-item:hover {
  border-color: color-mix(in srgb, var(--amber) 45%, transparent);
  background: color-mix(in srgb, var(--amber) 5%, var(--bone));
}
.nb-sources__suggested-arrow {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--amber);
}

/* === Detail view: "소스 가이드" 접이식 카드 + 문서 본문 (NotebookLM 형식) === */
.nb-sources__guide {
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 12px;
  /* 주변 패널보다 밝게 — 대비되도록 흰색 쪽으로. */
  background: color-mix(in srgb, var(--bone) 45%, #ffffff);
  overflow: hidden;
}
.nb-sources__guide-head {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.nb-sources__guide-head::-webkit-details-marker {
  display: none;
}
.nb-sources__guide-icon {
  color: var(--amber);
  font-size: 14px;
  line-height: 1;
}
.nb-sources__guide-title {
  flex: 1;
}
.nb-sources__guide-chev {
  color: var(--ink-3);
  font-size: 11px;
  transition: transform 0.15s ease;
}
.nb-sources__guide[open] .nb-sources__guide-chev {
  transform: rotate(180deg);
}
.nb-sources__guide-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nb-sources__guide-summary {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
}
.nb-sources__guide-summary strong {
  font-weight: 700;
}
.nb-sources__guide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nb-sources__guide-chips span {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 999px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nb-sources__youtube-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 88%, #000000);
}
.nb-sources__youtube-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mock 문서 본문 — heading / paragraph / 표 */
.nb-sources__doc {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.6;
}

/* 본문 미리보기 미연동 placeholder — BE markdown render 도입 후 .nb-sources__doc
 * 으로 교체 (Phase B/C). status 별 안내 문구 표시. */
.nb-sources__doc-placeholder {
  margin-top: 8px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--bone-2) 50%, var(--bone));
  border: 1px dashed color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 10px;
}
.nb-sources__doc-placeholder-text {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-2);
}
.nb-sources__doc-text {
  margin-top: 8px;
}
.nb-sources__doc-body {
  margin: 0;
  padding: 14px 2px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  /* 문단 텍스트의 줄바꿈 보존. 표(block)는 정상 렌더. */
  white-space: pre-wrap;
  word-break: break-word;
  /* 자체 높이 cap/스크롤 없음 — 스크롤은 detail-body 가 패널 전체 높이로 담당
     (하단까지 사용). 좌우 스크롤은 없음(폭 좁아지면 아래로). */
  overflow-x: hidden;
}
/* 출처 본문 안의 표(RAGFlow HTML, colspan 등 구조 보존). table-layout: fixed +
   cell wrap 으로 폭이 좁아지면 가로 스크롤 대신 셀 텍스트가 아래로 떨어진다. */
.nb-sources__doc-body table {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  margin: 10px 0;
  font-size: 12px;
  white-space: normal;
}
.nb-sources__doc-body th,
.nb-sources__doc-body td {
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.nb-sources__doc-body th {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  font-weight: 600;
}
.nb-sources__doc p {
  margin: 0;
}
.nb-sources__doc-h1 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.nb-sources__doc-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.nb-sources__doc-subtitle--it {
  font-style: italic;
  color: var(--ink-3);
}
.nb-sources__doc-h2 {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 700;
}
.nb-sources__doc-h3 {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.nb-sources__doc-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nb-sources__doc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 12px;
}
.nb-sources__doc-table th,
.nb-sources__doc-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.nb-sources__doc-table th {
  color: var(--ink-2);
  font-weight: 600;
  width: 100px;
}
.nb-sources__doc-table--cols th {
  width: auto;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.nb-notes {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--bone-2);
  display: flex;
  flex-direction: column;
}

.nb-notes__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-notes__title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ink-3);
}

.nb-notes__new {
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  background: var(--bone);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 6px;
  cursor: pointer;
}

.nb-notes__list {
  max-height: 45%;
  overflow: auto;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-notes__item {
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
}

.nb-notes__item.is-active {
  background: color-mix(in srgb, var(--terra) 8%, transparent);
}

.nb-notes__item-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.nb-notes__item-meta {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-4);
}

.nb-notes__empty {
  padding: 16px 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}

.nb-notes__editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.nb-notes__title-input,
.nb-notes__body-input {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  padding: 8px;
  resize: none;
}

.nb-notes__body-input {
  flex: 1;
  min-height: 180px;
  line-height: 1.5;
}

/* ── Inline citation chips (NotebookLM 의 [1] [2] superscript) ─── */
.nb-citation-row {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: baseline;
}
.nb-citation-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 18%, var(--bone));
  border: 1px solid color-mix(in srgb, var(--amber) 50%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease,
    transform 0.12s ease;
}
.nb-citation-chip:hover {
  transform: translateY(-1px);
  color: var(--bone);
  background: var(--terra-ink);
  border-color: var(--amber);
}

/* ── Provenance block wrapper (P1) ──────────────────────────────── */
.pg-prov-block {
  position: relative;
}
.pg-prov-block__badges {
  margin-left: 4px;
  white-space: nowrap;
}

/* ── Provenance badge popover (P1) ───────────────────────────────── */
.pg-prov-badge-wrap {
  position: relative;
  display: inline-block;
}
.pg-prov-badge-wrap + .pg-prov-badge-wrap {
  margin-left: 2px;
}
/* Circular citation marker — 외곽선 없는 회색 배경 원, ink 번호. */
.pg-prov-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.pg-prov-chip:hover {
  background: color-mix(in srgb, var(--ink) 22%, transparent);
}
.pg-prov-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 90;
  width: 280px;
  max-width: 70vw;
  padding: 10px 12px;
  text-align: left;
  white-space: normal;
  cursor: default;
  font-size: 12px;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 8px;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--ink) 18%, transparent);
}
.pg-prov-popover__title {
  font-weight: 700;
  margin-bottom: 2px;
}
.pg-prov-popover__title a {
  color: var(--terra-ink);
  text-decoration: underline;
}
.pg-prov-popover__host {
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}
.pg-prov-popover__snippet {
  line-height: 1.45;
}

/* ── Citation passage drawer ─────────────────────────────────────── */
.nb-cite__backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--ink) 30%, transparent);
  backdrop-filter: blur(1px);
}
.nb-cite {
  position: fixed;
  z-index: 81;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(440px, calc(100vw - 40px));
  padding: 22px 24px 24px;
  background: var(--bone);
  border-left: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  box-shadow: -8px 0 24px color-mix(in srgb, var(--ink) 14%, transparent);
  overflow-y: auto;
  animation: nb-cite-slide-in 0.18s ease-out;
}
@keyframes nb-cite-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.nb-cite__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nb-cite__kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--amber);
}
.nb-cite__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 999px;
}
.nb-cite__close:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.nb-cite__source {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  word-break: break-word;
}
.nb-cite__meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.nb-cite__passage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: color-mix(in srgb, var(--bone-2) 50%, var(--bone));
  border-left: 3px solid color-mix(in srgb, var(--amber) 60%, transparent);
  border-radius: 4px;
}
.nb-cite__passage-line {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.nb-cite__passage-line--before,
.nb-cite__passage-line--after {
  font-style: italic;
  color: var(--ink-3);
}
.nb-cite__passage-line--highlight {
  position: relative;
  padding: 10px 12px 10px 36px;
  font-style: normal;
  color: var(--ink);
  background: color-mix(in srgb, var(--amber) 16%, var(--bone));
  border-radius: 6px;
}
.nb-cite__highlight-mark {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-size: 14px;
}
.nb-cite__nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}
.nb-cite__nav-btn {
  cursor: pointer;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}
.nb-cite__nav-btn:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--amber) 55%, transparent);
  background: color-mix(in srgb, var(--amber) 6%, var(--bone));
}

/* ==========================================================================
   Xyren Notebook (independent flow)
   ========================================================================== */
.nb-home {
  min-height: 100vh;
  background: var(--bone);
}

.nb-home__content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 28px 56px;
}

/* ── Toolbar (전체 / 내 노트북 / search / sort / 새로 만들기) ──────────── */
.nb-home__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.nb-home__pills {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}
.nb-pill:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.nb-pill.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--amber) 14%, var(--bone));
  border-color: color-mix(in srgb, var(--amber) 50%, transparent);
}
.nb-pill--all.is-active {
  color: var(--bone);
  background: var(--ink);
  border-color: var(--ink);
}
.nb-pill__check {
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
}
.nb-pill--all.is-active .nb-pill__check {
  color: var(--bone);
}

.nb-home__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nb-icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
.nb-icon-btn:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.nb-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--ink-3);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
  transition:
    border-color 0.12s ease,
    color 0.12s ease;
}
.nb-search:focus-within {
  color: var(--amber);
  border-color: var(--amber);
}
.nb-search__input {
  width: 180px;
  padding: 8px 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
}

.nb-sort {
  position: relative;
}
.nb-sort__select {
  appearance: none;
  cursor: pointer;
  padding: 8px 30px 8px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%) calc(100% - 14px)
      50% / 5px 5px no-repeat,
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%) calc(100% - 9px)
      50% / 5px 5px no-repeat,
    var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
}
.nb-sort__select:hover {
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
}

.nb-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--bone);
  background: var(--terra-ink);
  border: 1px solid var(--terra-ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--amber);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.nb-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--amber);
}

/* ── 헤딩 ─────────────────────────────────────────────────────────── */
.nb-home__heading {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

/* ── Grid ────────────────────────────────────────────────────────── */
.nb-home__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* ── Card (NotebookLM 라이트 라벤더 스타일 → editorial bone-2 톤) ── */
.nb-card {
  position: relative;
  cursor: pointer;
  min-height: 168px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--bone-2);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 14px;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
  outline: none;
}
.nb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 10%, transparent);
  border-color: color-mix(in srgb, var(--amber) 38%, transparent);
}
.nb-card:focus-visible {
  outline: 2px solid var(--terra-ink);
  outline-offset: 2px;
}
.nb-card.is-pinned {
  background: color-mix(in srgb, var(--amber) 14%, var(--bone));
  border-color: color-mix(in srgb, var(--amber) 40%, transparent);
}

.nb-card__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 36px;
}
.nb-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--amber);
  background: color-mix(in srgb, var(--bone) 60%, transparent);
  border-radius: 8px;
}
.nb-card.is-pinned .nb-card__icon {
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 24%, transparent);
}
.nb-card__menu-btn {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 4px;
  opacity: 0;
  transition:
    opacity 0.12s ease,
    background 0.12s ease;
}
.nb-card:hover .nb-card__menu-btn,
.nb-card.is-menu-open .nb-card__menu-btn,
.nb-card:focus-within .nb-card__menu-btn {
  opacity: 1;
}
.nb-card__menu-btn:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.nb-card__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nb-card__rename {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 8px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid var(--terra-ink);
  border-radius: 4px;
  outline: none;
}
.nb-card__meta {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
}

/* "새 노트 만들기" 카드 — dashed + 중앙 + plus */
.nb-card--create {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: color-mix(in srgb, var(--amber) 4%, var(--bone));
  border-style: dashed;
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
}
.nb-card--create:hover {
  background: color-mix(in srgb, var(--amber) 10%, var(--bone));
  border-color: color-mix(in srgb, var(--amber) 60%, transparent);
}
.nb-card__plus {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--bone);
  background: var(--terra-ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--amber);
}
.nb-card__create-label {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

/* Context 메뉴 (삭제 / 제목 수정 / 맨 위에 고정) */
.nb-menu__backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
}
.nb-menu {
  position: absolute;
  top: 32px;
  right: 0;
  z-index: 91;
  min-width: 160px;
  padding: 6px 0;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 6px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 18%, transparent);
}
.nb-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: none;
}
.nb-menu__item:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.nb-menu__item:disabled {
  opacity: 0.5;
  cursor: default;
}
.nb-menu__item:disabled:hover {
  background: transparent;
}
.nb-menu__item--danger {
  color: var(--terra);
}
.nb-menu__item--danger:hover {
  background: color-mix(in srgb, var(--terra) 8%, transparent);
}

.nb-workspace {
  min-height: 100vh;
  background: var(--bone);
}

.nb-workspace__main {
  display: grid;
  grid-template-columns: minmax(280px, 22fr) minmax(640px, 50fr) minmax(
      300px,
      28fr
    );
  gap: 0;
  height: calc(100vh - 74px);
  transition: grid-template-columns 0.18s ease;
}
.nb-workspace__main.is-left-collapsed {
  grid-template-columns: 44px minmax(640px, 1fr) minmax(300px, 28fr);
}
.nb-workspace__main.is-right-collapsed {
  grid-template-columns: minmax(280px, 22fr) minmax(640px, 1fr) 44px;
}
.nb-workspace__main.is-left-collapsed.is-right-collapsed {
  grid-template-columns: 44px 1fr 44px;
}
.nb-workspace__main.is-studio-editing {
  grid-template-columns: minmax(260px, 20fr) minmax(460px, 38fr) minmax(
      460px,
      42fr
    );
}
.nb-workspace__main.is-left-collapsed.is-studio-editing {
  grid-template-columns: 44px minmax(460px, 40fr) minmax(460px, 42fr);
}
.nb-workspace__left.is-collapsed,
.nb-workspace__right.is-collapsed {
  overflow: hidden;
}

.nb-workspace__left {
  border-right: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--bone-2);
  overflow: auto;
}

.nb-workspace__center {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  /* 메인 채팅의 column 래퍼처럼 pane 전체를 bone 으로 — chat/composer 사이
     HITL 패널·칩 등 빈틈으로 html/body 의 다크가 비치지 않게. */
  background: var(--bone);
}

.nb-workspace__chat {
  /* 메인 채팅(Thread.tsx)의 ChatTimeline 래퍼와 동일 모델 — flex column +
     bone 배경. `.pg-msglist` 가 flex:1 로 이 column 을 꽉 채우고 자체
     scrollRef 로 스크롤한다. background 가 없으면 html/body 의 하드코딩
     다크(#1a1714)가 빈틈으로 비쳐 일부가 검게 보였고, flex column 이
     없으면 `.pg-msglist` 의 flex:1 이 죽어 높이를 못 채웠다. 래퍼 자체
     overflow 는 `.pg-msglist` 의 스크롤과 충돌하므로 제거. */
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bone);
}

.nb-workspace__empty-chat {
  max-width: 760px;
  margin: 28px auto;
  padding: 16px;
  border: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--bone-2) 65%, var(--bone));
}

/* ── NotebookOverviewHeader (NotebookLM식 중앙 상단 헤더) ─────────────
   히어로 배너 + 통합 요약 + 액션(placeholder) + 추천 질문. 스크롤 최상단
   상시 블록 (대화가 그 아래로 흐름). */
.nb-overview {
  /* 채팅 메시지(.pg-msg)와 *동일한* 폭 모델 — max-width 880 + width 100% +
     margin auto. width:100% 가 없으면 flex column 에서 섹션이 내용 폭(요약
     카드 760)으로 줄어 히어로가 메시지보다 좁아진다. 이 박스의 왼쪽 끝이
     메시지의 № 마커(gutter), 오른쪽 끝이 시각 표시 — 히어로가 № → 시각 폭에
     정확히 일치. 요약/추천 등 텍스트 섹션만 가독 폭(760)으로 안쪽 제한. */
  max-width: 880px;
  width: 100%;
  margin: 4px auto 18px;
}

/* ① 히어로 배너 — coverImageUrl 없으면 기본 에디토리얼 그라데이션. */
.nb-overview__hero {
  position: relative;
  min-height: 156px;
  display: flex;
  align-items: flex-end;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(
      120% 140% at 12% 18%,
      color-mix(in srgb, var(--terra) 55%, var(--ink)) 0%,
      transparent 55%
    ),
    radial-gradient(
      120% 130% at 88% 10%,
      color-mix(in srgb, var(--amber) 48%, var(--ink)) 0%,
      transparent 52%
    ),
    linear-gradient(
      135deg,
      var(--ink) 0%,
      color-mix(in srgb, var(--ink) 72%, var(--terra)) 100%
    );
}
.nb-overview__hero.has-cover {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.nb-overview__hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--ink) 80%, transparent) 0%,
    color-mix(in srgb, var(--ink) 34%, transparent) 46%,
    transparent 100%
  );
}
.nb-overview__hero-inner {
  position: relative;
  z-index: 1;
  padding: 18px 20px 16px;
  width: 100%;
}
.nb-overview__kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: color-mix(in srgb, var(--bone) 80%, transparent);
  margin-bottom: 6px;
}
.nb-overview__title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.18;
  color: var(--bone);
}
.nb-overview__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: color-mix(in srgb, var(--bone) 78%, transparent);
}
.nb-overview__meta-sep {
  opacity: 0.6;
}

/* ② 통합 요약 카드 — 히어로(880)보다 좁게 중앙정렬해 영역 구분을 명확히. */
.nb-overview__guide {
  width: min(600px, calc(100% - 96px));
  margin: 12px auto 0;
  padding: 16px 18px 12px;
  background: color-mix(in srgb, var(--ink) 5%, var(--bone));
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 12px;
}
.nb-overview__guide-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
.nb-overview__summary {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.nb-overview__topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}
.nb-overview__topic {
  padding: 4px 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--terra) 30%, transparent);
  border-radius: 999px;
}
.nb-overview__note {
  margin-bottom: 10px;
  padding: 7px 10px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink) 4%, var(--bone));
  border-left: 2px solid color-mix(in srgb, var(--amber) 50%, transparent);
  border-radius: 4px;
}
.nb-overview__placeholder {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.nb-overview__skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.nb-overview__skeleton span {
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--ink) 8%, var(--bone)) 0%,
    color-mix(in srgb, var(--ink) 16%, var(--bone)) 50%,
    color-mix(in srgb, var(--ink) 8%, var(--bone)) 100%
  );
  background-size: 200% 100%;
  animation: nb-overview-shimmer 1.4s ease-in-out infinite;
}
@keyframes nb-overview-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ③ 턴 공통 액션 바 — 요약 카드와 같은 좁은 폭으로 중앙정렬. 메모저장(라벨) +
   복사·피드백(아이콘 전용). 현재는 placeholder (disabled). */
.nb-overview__actionbar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(600px, calc(100% - 96px));
  margin: 10px auto 0;
}
.nb-overview__actionbar-spacer {
  flex: 1;
}
.nb-overview__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    color 0.12s ease,
    background 0.12s ease;
}
.nb-overview__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--ink-3);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    color 0.12s ease,
    background 0.12s ease;
}

.nb-response-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nb-response-actions__spacer {
  flex: 1;
}

.nb-response-actions__save {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.12s ease;
}

.nb-response-actions__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--ink-3);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.12s ease;
}

.nb-response-actions__save:hover:not(:disabled),
.nb-response-actions__icon:hover:not(:disabled) {
  color: var(--ink);
}

.nb-response-actions__save:disabled,
.nb-response-actions__icon:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.nb-overview__action:hover:not(:disabled),
.nb-overview__icon-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--amber) 55%, transparent);
  background: color-mix(in srgb, var(--amber) 6%, var(--bone));
}
.nb-overview__action:disabled,
.nb-overview__icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ④ 추천 질문 — 요약 카드와 같은 좁은 폭으로 중앙정렬. */
.nb-overview__suggest {
  width: min(600px, calc(100% - 96px));
  margin: 16px auto 0;
  padding: 0 2px;
}
.nb-overview__suggest-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.nb-overview__suggest-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.nb-overview__suggest-chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  text-align: left;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 10px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}
.nb-overview__suggest-chip:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--amber) 55%, transparent);
  background: color-mix(in srgb, var(--amber) 6%, var(--bone));
}
.nb-overview__suggest-arrow {
  flex-shrink: 0;
  color: var(--amber);
  font-weight: 700;
}

/* Source context indicator above the notebook chat input. */
.nb-ctxchip {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 10px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--amber) 12%, var(--bone));
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  border-radius: 999px;
}

.nb-ctxchip__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--amber);
}

.nb-ctxchip--warn {
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink) 4%, var(--bone));
  border-color: color-mix(in srgb, var(--ink) 18%, transparent);
}

.nb-ctxchip--warn .nb-ctxchip__dot {
  background: var(--ink-3);
}

/* Notebook-only minimal chat composer: input + send button. */
.nb-chat-composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  background: var(--bone);
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}

.nb-chat-composer__input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 8px;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  padding: 10px 12px;
}

.nb-chat-composer__input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--amber) 70%, var(--ink) 10%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 16%, transparent);
}

.nb-chat-composer__send {
  flex: 0 0 auto;
  min-width: 64px;
  height: 40px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.nb-chat-composer__send:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Notebook chat fixed bottom: keep composer visible, scroll messages only. */
.nb-workspace {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nb-workspace__main {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.nb-workspace__center {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.nb-workspace__chat {
  overflow: hidden;
}

.nb-workspace__chat .pg-msglist {
  min-height: 0;
}

.nb-workspace__center > .pg-composer,
.nb-workspace__center > .nb-chat-composer,
.nb-workspace__center > .nb-ctxchip,
.nb-workspace__center > .pg-hitl-slot {
  flex: 0 0 auto;
}

.nb-workspace__right {
  background: var(--bone-2);
}

.nb-studio {
  position: relative;
  background: var(--bone);
}

.nb-studio__head .nb-studio__title {
  flex: 1;
  text-align: left;
}

.nb-studio__head-btn {
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.nb-studio__tiles {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nb-studio__tile {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  font-family: var(--sans);
  font-size: 12px;
  text-align: left;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 10px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
}

.nb-studio__tile:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--amber) 55%, transparent);
  background: color-mix(in srgb, var(--amber) 5%, var(--bone));
}

.nb-studio__tile-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  background: color-mix(in srgb, var(--amber) 14%, var(--bone-2));
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}

.nb-studio__tile-label {
  flex: 1;
  min-width: 0;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.nb-studio__tile-arrow {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--ink-3);
}

.nb-studio__running-list {
  display: grid;
  gap: 6px;
  margin: 4px 10px 0;
}

.nb-studio__running {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--amber) 8%, var(--bone));
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-radius: 10px;
}

.nb-studio__running-spinner,
.nb-studio__result-spinner {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--terra-ink) 30%, transparent);
  border-top-color: var(--amber);
  animation: nb-studio-spin 0.8s linear infinite;
}

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

.nb-studio__running-body {
  min-width: 0;
}

.nb-studio__running-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.nb-studio__running-sub {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

.nb-studio__result-item--running {
  border-color: color-mix(in srgb, var(--amber) 34%, transparent);
  background: color-mix(in srgb, var(--amber) 8%, var(--bone));
}

.nb-studio__result-item--running .nb-studio__result-hit {
  cursor: wait;
}

/* ── Studio generate modal ───────────────────────────────────────── */
.nb-gen__backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  backdrop-filter: blur(2px);
}

.nb-gen {
  position: fixed;
  z-index: 101;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, calc(100vw - 48px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 26px 30px 22px;
  background: var(--bone);
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--ink) 30%, transparent);
}

.nb-gen__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nb-gen__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.nb-gen__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-radius: 999px;
}

.nb-gen__close:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.nb-gen__desc {
  margin: 4px 0 18px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}

.nb-gen__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nb-gen__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nb-gen__field-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nb-gen__select,
.nb-gen__input,
.nb-gen__textarea {
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 6px;
  outline: none;
}

.nb-gen__select {
  appearance: none;
  padding-right: 32px;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%) calc(100% - 14px)
      50% / 5px 5px no-repeat,
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%) calc(100% - 9px)
      50% / 5px 5px no-repeat,
    var(--bone);
}

.nb-gen__textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.nb-gen__hint {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
}

.nb-gen__select:focus,
.nb-gen__input:focus,
.nb-gen__textarea:focus {
  border-color: var(--amber);
}

.nb-gen__close:disabled,
.nb-gen__cancel:disabled,
.nb-gen__submit:disabled,
.nb-gen__select:disabled,
.nb-gen__input:disabled,
.nb-gen__textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.nb-gen__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.nb-gen__cancel {
  cursor: pointer;
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 999px;
}

.nb-gen__cancel:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.nb-gen__submit {
  cursor: pointer;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--bone);
  background: var(--terra-ink);
  border: 1px solid var(--terra-ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--amber);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.nb-gen__submit:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--amber);
}

/* ── nb-gen inline checkbox field ───────────────────────────────────── */
.nb-gen__field--inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.nb-gen__field--inline input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--terra);
  cursor: pointer;
}

.nb-gen__field--inline span {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

/* ── nb-gen 2-column short-field grid ───────────────────────────────── */
.nb-gen__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 559px) {
  .nb-gen__grid2 {
    grid-template-columns: 1fr;
  }
}

/* ── nb-gen template tile grid ──────────────────────────────────────── */
.nb-gen__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.nb-gen__tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 10px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.12s;
}

.nb-gen__tile:hover {
  border-color: color-mix(in srgb, var(--ink) 32%, transparent);
  transform: translateY(-1px);
}

.nb-gen__tile[aria-checked="true"] {
  border-color: var(--terra);
  background: color-mix(in srgb, var(--terra) 8%, var(--bone));
  box-shadow: inset 0 0 0 1px var(--terra);
}

.nb-gen__tile:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.nb-gen__tile-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.nb-gen__tile-desc {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.4;
}

.nb-gen__tile-id {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 28%, transparent);
  margin-top: 2px;
}

.nb-studio__results {
  flex: 1;
  overflow: auto;
  padding: 6px 10px 10px;
}

.nb-studio__result-item {
  display: flex;
  position: relative;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.nb-studio__result-item:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.nb-studio__result-item:hover .nb-studio__result-title {
  color: var(--blue);
}

.nb-studio__result-item.is-pending {
  cursor: progress;
  opacity: 0.82;
}

.nb-studio__result-item.is-pending:hover {
  background: transparent;
}

.nb-studio__result-item.is-pending .nb-studio__result-title {
  color: var(--ink-3);
}

.nb-studio__result-item:disabled {
  color: inherit;
}

.nb-studio__result-item.is-failed {
  cursor: default;
  opacity: 0.9;
}

.nb-studio__result-item.is-failed:hover {
  background: transparent;
}

.nb-studio__result-item.is-failed .nb-studio__result-title {
  color: var(--ink);
}

.nb-studio__result-item--podcast .nb-studio__result-icon {
  color: var(--amber);
}

.nb-studio__result-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--ink) 6%, var(--bone-2));
}

.nb-studio__result-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nb-studio__result-title {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nb-studio__result-sub {
  margin-top: 2px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nb-studio__result-more {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.nb-studio__result-item:hover .nb-studio__result-more {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.nb-studio__result-item.is-menu-open .nb-studio__result-more {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.nb-studio__result-menu {
  position: fixed;
  top: auto;
  right: auto;
  z-index: 120;
  min-width: 180px;
}

.nb-studio__result-item.is-selected {
  background: color-mix(in srgb, var(--amber) 12%, var(--bone));
}

.nb-studio__result-item.is-selected .nb-studio__result-title {
  color: var(--ink);
}

.nb-studio__result-item.is-selected .nb-studio__result-icon {
  color: var(--ink);
  background: color-mix(in srgb, var(--amber) 38%, var(--bone));
}

.nb-studio__audio-player {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: color-mix(in srgb, var(--bone) 92%, var(--amber) 8%);
}

.nb-studio__audio-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nb-studio__audio-kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
}

.nb-studio__audio-title {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nb-studio__audio-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
  background: var(--bone);
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1;
}

.nb-studio__audio-close:hover {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--ink) 12%);
  color: var(--ink);
}

.nb-studio__audio-control {
  grid-column: 1 / -1;
  min-height: 36px;
}

.nb-studio__audio-control audio {
  display: block;
  width: 100%;
  height: 36px;
}

.nb-studio__audio-loading,
.nb-studio__audio-error {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 12px;
}

.nb-studio__audio-loading {
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.nb-studio__audio-error {
  color: color-mix(in srgb, #b42318 78%, var(--ink));
  background: color-mix(in srgb, #f04438 9%, var(--bone));
}

.nb-studio__empty {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}

.nb-studio__add-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-studio__add-btn {
  border: none;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.nb-studio__editor-breadcrumb {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
}

.nb-studio__editor-back {
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}

.nb-studio__editor-back:hover {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--ink) 12%);
  background: color-mix(in srgb, var(--amber) 12%, var(--bone));
}

.nb-studio__editor-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.nb-studio__editor-title {
  flex: 1;
  min-width: 0;
  border: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: transparent;
  font-family: var(--sans);
  font-size: 32px;
  color: var(--ink);
  padding: 2px 0 8px;
}

.nb-studio__editor-title:focus,
.nb-studio__editor-body:focus {
  outline: none;
}

.nb-studio__editor-trash {
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-4);
  cursor: pointer;
}

.nb-studio__editor-body {
  flex: 1;
  min-height: 0;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  padding: 0 10px 10px;
}

.nb-mdx-editor-shell {
  overflow: auto;
}

.nb-mdx-editor {
  min-height: 100%;
  background: transparent;
  color: var(--ink-2);
  --baseTextContrast: var(--ink);
  --baseTextContrastHex: var(--ink);
}

.nb-mdx-editor__toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  overflow: visible;
  padding: 4px 0 6px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--bone);
  box-shadow: none;
}

.nb-mdx-editor__toolbar,
.nb-mdx-editor__toolbar * {
  box-sizing: border-box;
}

.nb-mdx-editor__toolbar :where([role="toolbar"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.nb-mdx-editor__toolbar button,
.nb-mdx-editor__toolbar [role="button"] {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 2px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink-3);
}

.nb-mdx-editor__toolbar button:hover,
.nb-mdx-editor__toolbar [role="button"]:hover {
  background: color-mix(in srgb, var(--ink) 8%, transparent) !important;
}

.nb-mdx-editor__toolbar button[data-state="on"],
.nb-mdx-editor__toolbar [role="button"][data-state="on"],
.nb-mdx-editor__toolbar button[aria-pressed="true"],
.nb-mdx-editor__toolbar [role="button"][aria-pressed="true"] {
  background: color-mix(in srgb, var(--amber) 22%, transparent) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 42%, transparent) !important;
  color: var(--ink) !important;
}

.nb-mdx-editor__toolbar button[data-state="on"] svg,
.nb-mdx-editor__toolbar [role="button"][data-state="on"] svg,
.nb-mdx-editor__toolbar button[aria-pressed="true"] svg,
.nb-mdx-editor__toolbar [role="button"][aria-pressed="true"] svg {
  color: var(--amber);
}

.nb-mdx-editor__toolbar svg {
  width: 14px;
  height: 14px;
}

.nb-mdx-editor__toolbar-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.nb-mdx-editor__block-select {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: 100%;
}

.nb-mdx-editor__block-select button,
.nb-mdx-editor__block-select [role="button"] {
  width: auto !important;
  min-width: 86px !important;
  max-width: 118px !important;
  height: 24px !important;
  min-height: 24px !important;
  justify-content: space-between;
  padding: 0 7px !important;
  background: transparent !important;
  font-size: 11px !important;
  line-height: 1;
}

.nb-mdx-editor__block-select svg {
  width: 12px;
  height: 12px;
}

.nb-mdx-editor__content {
  min-height: 360px;
  padding: 12px 2px 24px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
}

.nb-mdx-editor__content:focus {
  outline: none;
}

.nb-mdx-editor__content p {
  margin: 0 0 10px;
}

.nb-studio__editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  padding: 8px 10px;
}

.nb-studio__source-btn {
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--bone);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}

.nb-studio__save-btn {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}

/* Notebook 3-panel fixed chrome: shared headers stay fixed, panel bodies scroll. */
.nb-workspace__left,
.nb-workspace__right {
  min-height: 0;
  overflow: hidden;
}

.nb-sources,
.nb-studio {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.nb-sources__head,
.nb-sources__detail-head,
.nb-chat__header,
.nb-studio__head,
.nb-studio__editor-breadcrumb {
  flex: 0 0 52px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--bone);
}

.nb-sources__title,
.nb-chat__title,
.nb-studio__title,
.nb-sources__detail-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.nb-sources.is-collapsed .nb-sources__head,
.nb-studio.is-collapsed .nb-studio__head {
  justify-content: center;
  padding: 0;
}

.nb-sources__body,
.nb-studio__body,
.nb-studio__editor-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nb-studio__body,
.nb-studio__editor-scroll {
  background: color-mix(in srgb, var(--bone-2) 70%, var(--bone));
}

.nb-studio__body,
.nb-studio__editor-scroll {
  display: flex;
  flex-direction: column;
}

.nb-studio__add-wrap,
.nb-studio__editor-footer {
  flex: 0 0 auto;
  background: var(--bone);
}

@media (max-width: 1280px) {
  .nb-home__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .nb-workspace__main {
    grid-template-columns: minmax(240px, 22fr) minmax(0, 50fr) minmax(
        260px,
        28fr
      );
  }
  .nb-workspace__main.is-studio-editing {
    grid-template-columns: minmax(220px, 18fr) minmax(380px, 36fr) minmax(
        420px,
        46fr
      );
  }
}

@media (max-width: 980px) {
  .nb-home__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nb-workspace {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .nb-workspace__main {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .nb-workspace__left,
  .nb-workspace__center,
  .nb-workspace__right {
    border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  }
}

/* ── User / AI message ──────────────────────────────────────────────── */
.pg-msg {
  display: flex;
  gap: 20px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}
/* Option B — 중간과정(preamble/중간/sub-agent) 텍스트. 답변 버블 chrome
   (gutter №, head) 은 JSX 에서 이미 제외. 여기선 gap/패딩만 줄여 MagazineStepRow
   draft 안에서 가벼운 본문처럼 보이게. 최종답변(standalone)은 compact 없이 풀 버블. */
.pg-msg--compact {
  gap: 0;
}
.pg-msg--compact .pg-msg__body {
  padding: 0;
}
.pg-msg__gutter {
  width: 48px;
  flex-shrink: 0;
  padding-top: 6px;
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--ink-3);
  user-select: none;
}
.pg-msg--ai .pg-msg__gutter {
  color: var(--terra);
}
.pg-msg__body {
  flex: 1;
}
.pg-msg__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.pg-msg__name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.pg-msg--user .pg-msg__name {
  font-style: italic;
}
.pg-msg__role {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  padding: 2px 6px;
  border-radius: 2px;
}
.pg-msg--ai .pg-msg__role {
  color: var(--amber);
  background: var(--terra-wash);
  letter-spacing: 0.5px;
}
.pg-msg__time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-4);
}
.pg-msg__content {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
}
/* 마크다운 본문(AI 답변) — pg-msg__content 의 pre-wrap 을 상속하면 마크다운
   소스의 soft break(\n)가 하드 개행으로 렌더돼 줄간격/줄바꿈이 디자인과
   달라진다. normal 로 되돌림. 코드 블록은 <code>/<pre> 가 자체 white-space
   를 지정하므로 영향 없음. */
.md-body {
  white-space: normal;
}
.pg-msg__dropcap {
  float: left;
  margin-top: 2px;
  margin-right: 8px;
  font-family: var(--serif);
  font-size: 2.4em;
  font-weight: 700;
  line-height: 0.88;
  color: var(--ink);
  user-select: none;
}
/* AI 답변 마크다운 첫 문단 첫 글자 = 드롭캡. JSX 수정 없이 ::first-letter
   로 자동 적용. mock 의 ``<span class="pg-msg__dropcap">`` 와 동일 효과. */
.pg-msg--ai .md-body > p:first-child::first-letter {
  float: left;
  margin-top: 2px;
  margin-right: 8px;
  font-family: var(--serif);
  font-size: 2.4em;
  font-weight: 700;
  line-height: 0.88;
  color: var(--ink);
}
.pg-msg__actions {
  max-width: none;
  margin: 2px 0 8px;
}
/* 답변 본문(.ws-msg-ai)의 30px 하단 여백이 액션 바를 멀리 밀어냄 → 액션 바가
   있는 메시지에서만 답변 하단을 좁혀 바를 답변에 붙인다(:has). 액션 바 없는
   메시지의 메시지 간격(30px)은 그대로. */
.pg-msg__body:has(.pg-msg__actions) .ws-msg-ai {
  margin-bottom: 4px;
}

/* 답변/질문 액션 바 — 상시 노출이 아니라 메시지 hover/focus 시에만(마우스 근처).
   터치/키보드 접근성: focus-within 도 노출. */
.ws-msg-ai-wrap .pg-msg__actions,
.ws-msg-user-wrap .pg-msg__actions {
  opacity: 0;
  transition: opacity 0.14s ease;
}
.ws-msg-ai-wrap:hover .pg-msg__actions,
.ws-msg-ai-wrap:focus-within .pg-msg__actions,
.ws-msg-user-wrap:hover .pg-msg__actions,
.ws-msg-user-wrap:focus-within .pg-msg__actions {
  opacity: 1;
}
/* 질문(사용자) 복사 — 우측 정렬, 컴팩트한 위 여백. */
.pg-msg__actions--user {
  justify-content: flex-end;
  margin-top: 2px;
}
/* 피드백 선택 표시(👍/👎) — 테라코타. */
.nb-response-actions__icon.is-active {
  color: var(--terra, #b3553f);
}

.pg-msg__links {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.pg-msg__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border: 1px dashed;
  border-radius: 2px;
  transition: background 0.15s ease;
}
.pg-msg__link--rag {
  color: var(--moss);
  border-color: var(--moss);
  background: color-mix(in srgb, var(--moss) 5%, transparent);
}
.pg-msg__link--rag:hover {
  background: color-mix(in srgb, var(--moss) 15%, transparent);
}
.pg-msg__link--web {
  color: var(--terra);
  border-color: var(--terra);
  background: color-mix(in srgb, var(--terra) 5%, transparent);
}
.pg-msg__link--web:hover {
  background: color-mix(in srgb, var(--terra) 15%, transparent);
}

.pg-checklist {
  margin-top: 14px;
  padding: 12px 16px;
  /* 추론 버블 = bone + amber 틴트. 체크리스트는 틴트 없는 base bone —
     흰색이 아닌 같은 계열의 밝은 톤으로 버블과 구분 */
  background: var(--bone);
  border-radius: 2px;
}
.pg-checklist__head {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--ink-3);
}
.pg-checklist__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pg-checklist__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}
.pg-checklist__sym {
  width: 14px;
  font-family: var(--mono);
  font-size: 11px;
}
.pg-checklist__sym--done {
  color: var(--moss);
}
.pg-checklist__sym--doing {
  color: var(--amber);
}
.pg-checklist__sym--todo {
  color: var(--ink-4);
}
.pg-checklist__label {
  color: var(--ink);
}
.pg-checklist__label.is-done {
  text-decoration: line-through;
  color: var(--ink-3);
}

/* ── 스트리밍 로더 / fleuron ─────────────────────────────────────────── */
.pg-streamloader {
  display: flex;
  gap: 20px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}
.pg-streamloader__body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pg-streamloader__text {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--terra);
}

/* AI 응답 준비중 skeleton — message row 레이아웃(gutter+body) 유지,
   디자인의 mono/terra 표현으로 통일. shimmer 키프레임은 globals.css. */
.pg-skel {
  display: flex;
  gap: 20px;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}
.pg-skel__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}
.pg-skel-bar {
  position: relative;
  height: 12px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  overflow: hidden;
}
.pg-skel-bar__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--terra) 22%, transparent) 50%,
    transparent 100%
  );
  animation: shimmer 1.4s infinite;
}
.pg-fleuron {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}
.pg-fleuron__line {
  flex: 1;
  height: 1px;
  opacity: 0.3;
  background: linear-gradient(to right, transparent, var(--ink-4), transparent);
}
.pg-fleuron__mark {
  margin: 0 20px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--amber);
  user-select: none;
}

/* ==========================================================================
   MockReasoning — 우측 슬라이딩 서랍
   ========================================================================== */
/* push 레이아웃 — 닫힘 시 margin-right:-380 으로 폭 0 소비(.pg-shell
   overflow:hidden 가 클리핑), 열림 시 margin-right:0 → 컨텐츠 영역을 밀어냄. */
.pg-drawer {
  flex-shrink: 0;
  width: 380px;
  display: flex;
  flex-direction: column;
  background: var(--bone-3);
  border-left: 1px solid var(--ink-4);
  margin-right: -380px;
  transition: margin-right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.pg-drawer.is-open {
  margin-right: 0;
}
.pg-drawer__header {
  position: relative;
  padding: 24px 20px 16px;
  background: var(--bone-2);
  border-bottom: 1px solid var(--ink-4);
}
.pg-drawer__close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--bone);
  border: 1px solid var(--ink-4);
  padding: 2px 8px;
  border-radius: 2px;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
}
.pg-drawer__close:hover {
  color: var(--terra);
  border-color: var(--terra);
}
.pg-drawer__kicker {
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--terra);
}
.pg-drawer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.pg-drawer__tabs {
  display: flex;
  padding: 0 12px;
  background: var(--bone-2);
  border-bottom: 1px solid var(--ink-4);
}
.pg-drawer__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 10px 14px;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.pg-drawer__tab.is-active {
  color: var(--terra);
  border-bottom-color: var(--terra);
}
.pg-drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pg-drawer__section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pg-rag-query {
  padding: 12px 14px;
  background: color-mix(in srgb, var(--bone-3) 25%, transparent);
  border: 1px dashed var(--ink-4);
  border-radius: 2px;
}
.pg-rag-query__label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-3);
}
.pg-rag-query__text {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
}
.pg-rag-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pg-rag-section {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--terra);
}
.pg-rag-card {
  position: relative;
  padding: 14px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 2px;
}
.pg-rag-card__stamp {
  position: absolute;
  right: 12px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 900;
  padding: 2px 5px;
  border: 1px solid;
  border-radius: 1px;
  transform: rotate(5deg);
  opacity: 0.8;
  user-select: none;
}
.pg-rag-card__stamp--web {
  color: var(--moss);
  border-color: var(--moss);
}
.pg-rag-card__stamp--rag {
  color: var(--terra);
  border-color: var(--terra);
}
.pg-rag-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.pg-rag-card__match {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
}
.pg-rag-card__score {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--moss);
}
.pg-rag-card__title {
  margin-bottom: 8px;
  max-width: 80%;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.pg-rag-card__snippet {
  padding: 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--bone-2);
  border-left: 2px solid var(--ink-4);
  white-space: pre-wrap;
  overflow-x: auto;
}

.pg-parse-meta {
  padding: 16px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 2px;
}
.pg-parse-meta__label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--terra);
}
.pg-parse-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.pg-parse-table tr {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.pg-parse-table tr:last-child {
  border-bottom: none;
}
.pg-parse-table td {
  padding: 6px 0;
}
.pg-parse-table__k {
  font-family: var(--mono);
  color: var(--ink-3);
}
.pg-parse-table__v {
  text-align: right;
}
.pg-parse-table__v--name {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
}
.pg-parse-table__v--mono {
  font-family: var(--mono);
  color: var(--ink-2);
}
.pg-parse-table__v--tok {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--moss);
}
.pg-parse-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pg-parse-block__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-3);
}
.pg-parse-abstract {
  padding: 14px;
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bone);
  border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 2px;
}
.pg-parse-ent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pg-parse-ent {
  padding: 10px 12px;
  background: var(--bone-2);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 2px;
}
.pg-parse-ent__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.pg-parse-ent__key {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--terra);
}
.pg-parse-ent__val {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 5%, transparent);
  padding: 1px 4px;
  border-radius: 2px;
}
.pg-parse-ent__desc {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
}
.pg-parse-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 40px 20px;
  text-align: center;
  background: color-mix(in srgb, var(--bone-3) 10%, transparent);
  border: 1px dashed var(--ink-4);
  border-radius: 2px;
}
.pg-parse-empty__icon {
  margin-bottom: 12px;
  line-height: 0;
  color: var(--ink-4);
}
.pg-parse-empty__title {
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.pg-parse-empty__copy {
  max-width: 25ch;
  margin-bottom: 20px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
}
.pg-parse-empty__mark {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-4);
  opacity: 0.4;
}
.pg-drawer__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bone-2);
  border-top: 1px solid var(--ink-4);
}
.pg-drawer__footer-id {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}
.pg-drawer__footer-status {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--moss);
}

/* ==========================================================================
   MockHitlPanel — 인적 검증 결재판
   상태(pending/approved/declined)별 accent 색을 --pg-accent 한 곳에서 결정,
   하위 요소는 모두 var(--pg-accent) 를 참조한다.
   ========================================================================== */
.pg-hitl {
  --pg-accent: var(--amber);
  position: relative;
  overflow: hidden;
  background: var(--bone-2);
  border: 2px solid var(--pg-accent);
  border-radius: 2px;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.pg-hitl--pending {
  --pg-accent: var(--amber);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--amber) 8%, transparent);
}
.pg-hitl--approved {
  --pg-accent: var(--moss);
}
.pg-hitl--declined {
  --pg-accent: var(--terra);
}

.pg-hitl__slip {
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  user-select: none;
  color: color-mix(in srgb, var(--pg-accent) 60%, transparent);
  background: color-mix(in srgb, var(--pg-accent) 5%, transparent);
  border-left: 1px dashed color-mix(in srgb, var(--ink) 15%, transparent);
  border-bottom: 1px dashed color-mix(in srgb, var(--ink) 15%, transparent);
  border-bottom-left-radius: 2px;
}
.pg-hitl__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--pg-accent) 6%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.pg-hitl__head-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-hitl__head-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: var(--ink);
}
.pg-hitl__status {
  margin-right: 64px;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bone);
  background: var(--pg-accent);
  border-radius: 2px;
}
.pg-hitl__body {
  padding: 16px 20px;
}
.pg-hitl__desc {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}
.pg-hitl__code {
  font-family: var(--mono);
  font-weight: 700;
}
.pg-hitl__txn {
  position: relative;
  margin-bottom: 16px;
  padding: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.pg-hitl__txn-head {
  color: var(--terra);
  font-weight: 700;
}
.pg-hitl__txn-row {
  word-break: break-word;
}
.pg-hitl__txn-em {
  color: var(--ink);
}
.pg-hitl__txn-dim {
  color: var(--ink-3);
}
.pg-hitl__stamp {
  position: absolute;
  right: 20px;
  top: 50%;
  padding: 4px 12px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--pg-accent);
  background: var(--bone);
  border: 3px double var(--pg-accent);
  border-radius: 4px;
  user-select: none;
  animation: scaleInStamp 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.pg-hitl__stamp--approved {
  transform: translateY(-50%) rotate(-8deg);
  box-shadow: 0 0 8px color-mix(in srgb, var(--moss) 12%, transparent);
}
.pg-hitl__stamp--declined {
  transform: translateY(-50%) rotate(6deg);
  box-shadow: 0 0 8px color-mix(in srgb, var(--terra) 12%, transparent);
}
.pg-hitl__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.pg-hitl__resolved {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pg-hitl__resolved-meta {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
}
.pg-hitl__btn {
  cursor: pointer;
  font-family: var(--mono);
  border-radius: 2px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}
.pg-hitl__btn--decline {
  font-size: 11px;
  font-weight: 700;
  color: var(--terra);
  background: var(--bone);
  border: 1px solid var(--terra);
  padding: 8px 18px;
  box-shadow: 2px 2px 0 var(--terra-wash);
}
.pg-hitl__btn--decline:hover {
  background: var(--terra-wash);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--terra-wash);
}
.pg-hitl__btn--approve {
  font-size: 11px;
  font-weight: 900;
  color: var(--bone);
  background: var(--moss);
  border: 1px solid var(--ink);
  padding: 8px 24px;
  box-shadow: 2px 2px 0 var(--ink);
}
.pg-hitl__btn--approve:hover {
  background: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.pg-hitl__btn--reset {
  font-size: 9px;
  color: var(--ink-3);
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  padding: 4px 10px;
}
.pg-hitl__btn--reset:hover {
  background: var(--bone-3);
  color: var(--ink);
}

/* ==========================================================================
   Message (실제 컴포넌트) 재스킨 — MockMessageList 에 없던 표면 보강
   (agent 작성자 / flash / 도구호출 / 코드 / 첨부 / 반응 / 영수증 /
   날짜 구분선 / 컨텍스트 메뉴 / 드롭캡)
   ========================================================================== */
.pg-msg--agent .pg-msg__gutter {
  color: var(--moss);
}
.pg-msg--agent .pg-msg__role {
  color: var(--moss);
  background: color-mix(in srgb, var(--moss) 14%, transparent);
}
.pg-msg.is-flash {
  animation: flash 600ms ease;
}

/* AI 답변 첫 글자 드롭캡 — markdown 본문이라 ::first-letter 로 처리 */
.pg-msg--ai .pg-msg__content::first-letter {
  float: left;
  margin: 2px 8px 0 0;
  font-family: var(--serif);
  font-size: 2.4em;
  font-weight: 700;
  line-height: 0.88;
  color: var(--ink);
}
/* Option B — 중간과정(compact) 텍스트는 드롭캡(첫 글자 확대)을 끈다. 드롭캡은
   최종답변 전용 매거진 리딩 스타일이라, sub-agent/preamble 펼침에선 일반 본문
   첫 글자로 보이게. 위 두 드롭캡 규칙(.md-body / .pg-msg__content) 모두 무효화. */
.pg-msg--ai.pg-msg--compact .pg-msg__content::first-letter,
.pg-msg--ai.pg-msg--compact .md-body > p:first-child::first-letter {
  float: none;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

.pg-msg__icode {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--amber);
  background: var(--bone-2);
}
.pg-msg__tools {
  margin-top: 14px;
}
.pg-msg__code {
  margin-top: 12px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--bone);
  background: var(--ink);
  border-radius: 2px;
  overflow-x: auto;
}
.pg-msg__attach {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 2px;
}
.pg-msg__attach-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--ink-2);
  background: var(--bone-3);
}
.pg-msg__attach-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.pg-msg__attach-size {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}
.pg-msg__download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 2px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.pg-msg__download:disabled {
  cursor: default;
  opacity: 0.6;
}
.pg-msg__download:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}
.pg-msg__reactions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.pg-msg__reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  border-radius: 12px;
}
.pg-msg__reaction-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}
/* 날짜 구분선 */
.pg-msg-date {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 880px;
  margin: 24px auto 16px;
}
.pg-msg-date__rule {
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.pg-msg-date__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* 메시지 컨텍스트 메뉴 (길게 누르기 / 우클릭) */
.pg-msg-menu {
  position: fixed;
  z-index: 100;
  min-width: 220px;
  padding: 6px 0;
  font-family: var(--sans);
  background: var(--bone);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 15%, transparent);
}
.pg-msg-menu__head {
  padding: 4px 14px 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--ink-3);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.pg-msg-menu__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 7px 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
}
.pg-msg-menu__item:hover {
  background: var(--bone-2);
}
.pg-msg-menu__kb {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
}

/* 추론 버블 — ReasoningMessage 재스킨 보강 (collapsed 요약 / 다음 단계 표시) */
.pg-think__summary {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-2);
}
.pg-think__next {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 24px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.pg-think__next-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terra);
  animation: pulse 1s infinite;
}

/* Notebook settings drawer: notebook-scoped management surface. */
.pg-chrome__settings-icon {
  width: 12px;
  height: 12px;
  position: relative;
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.pg-chrome__settings-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: currentColor;
}

.nb-settings__backdrop {
  position: fixed;
  inset: 0;
  z-index: 102;
  background: color-mix(in srgb, var(--ink) 32%, transparent);
  backdrop-filter: blur(2px);
}

.nb-settings {
  position: fixed;
  z-index: 103;
  top: 0;
  right: 0;
  width: min(620px, calc(100vw - 24px));
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bone);
  color: var(--ink);
  border-left: 2px solid var(--ink);
  box-shadow: -18px 0 42px color-mix(in srgb, var(--ink) 24%, transparent);
}

.nb-settings__head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--bone-2);
}

.nb-settings__eyebrow {
  margin: 0 0 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--terra);
  text-transform: uppercase;
}

.nb-settings__title {
  margin: 0;
  max-width: 320px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--ink);
}

.nb-settings__close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  border-radius: 4px;
  background: var(--bone);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.nb-settings__tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--bone);
}

.nb-settings__tab {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--bone-2) 70%, var(--bone));
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.nb-settings__tab.is-active {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 24%, var(--bone));
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.nb-settings__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  background: color-mix(in srgb, var(--bone-2) 70%, var(--bone));
}

.nb-settings__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.nb-settings__section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.nb-settings__status,
.nb-settings__badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--amber) 22%, var(--bone));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.nb-settings__row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.nb-settings__row-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--ink-3);
}

.nb-settings__row-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.nb-settings__row-value.is-muted {
  color: var(--ink-3);
}

.nb-settings__profile-card,
.nb-settings__placeholder {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  background: var(--bone);
}

.nb-settings__profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.nb-settings__profile-kind {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--terra);
}

.nb-settings__profile-card h4,
.nb-settings__placeholder h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
  color: var(--ink);
}

.nb-settings__profile-card p,
.nb-settings__placeholder p,
.nb-settings__empty {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.55;
}

.nb-settings__warning {
  margin-top: 10px !important;
  padding: 9px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--amber) 24%, var(--bone));
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 720px) {
  .nb-settings {
    width: 100vw;
  }
  .nb-settings__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Enhanced studio result icons and audio player controls. */
.nb-studio__result-item {
  padding: 10px 6px;
}

.nb-studio__result-icon {
  width: 36px;
  height: 36px;
  border: 2px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: var(--bone);
  color: var(--ink);
}

.nb-studio__result-item--podcast .nb-studio__result-icon {
  border-color: color-mix(in srgb, var(--blue) 55%, var(--ink) 10%);
  background: color-mix(in srgb, var(--blue) 9%, var(--bone));
  color: var(--blue);
}

.nb-studio__result-item.is-selected .nb-studio__result-icon {
  border-color: var(--amber);
  background: color-mix(in srgb, var(--amber) 28%, var(--bone));
}

.nb-studio__wave-icon {
  width: 20px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.nb-studio__wave-icon span {
  width: 3px;
  border-radius: 999px;
  background: currentColor;
}

.nb-studio__wave-icon span:nth-child(1) {
  height: 8px;
}
.nb-studio__wave-icon span:nth-child(2) {
  height: 15px;
}
.nb-studio__wave-icon span:nth-child(3) {
  height: 11px;
}
.nb-studio__wave-icon span:nth-child(4) {
  height: 18px;
}

.nb-studio__audio-player {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 16px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--bone);
  box-shadow: 0 -8px 24px color-mix(in srgb, var(--ink) 9%, transparent);
}

.nb-studio__audio-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nb-studio__audio-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nb-studio__audio-title {
  font-size: 15px;
  line-height: 1.25;
}

.nb-studio__audio-kicker {
  color: var(--ink-3);
  text-transform: none;
}

.nb-studio__audio-icon-btn,
.nb-studio__audio-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.nb-studio__audio-icon-btn:hover,
.nb-studio__audio-close:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
}

.nb-studio__audio-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.nb-studio__audio-control audio {
  display: none;
}

.nb-studio__audio-progress {
  width: 100%;
  height: 22px;
  accent-color: var(--blue);
  cursor: pointer;
}

.nb-studio__audio-progress:disabled {
  cursor: wait;
  opacity: 0.55;
}

.nb-studio__audio-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-3);
}

.nb-studio__audio-controls {
  display: grid;
  grid-template-columns: 50px 44px 56px 44px;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.nb-studio__audio-rate,
.nb-studio__audio-skip,
.nb-studio__audio-play {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 900;
}

.nb-studio__audio-rate {
  background: transparent;
  color: var(--blue);
  font-size: 14px;
}

.nb-studio__audio-skip {
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font-size: 15px;
}

.nb-studio__audio-skip:hover,
.nb-studio__audio-rate:hover {
  background: color-mix(in srgb, var(--blue) 9%, transparent);
}

.nb-studio__audio-play {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 24px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--blue) 30%, transparent);
}

@media (max-width: 520px) {
  .nb-studio__audio-controls {
    gap: 8px;
  }
}

.nb-settings__create-btn {
  min-height: 40px;
  align-self: flex-start;
  padding: 0 13px;
  border: 1px solid var(--amber);
  border-radius: 6px;
  background: color-mix(in srgb, var(--amber) 18%, var(--bone));
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.nb-settings__create-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.nb-settings__profile-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nb-settings__profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}

.nb-settings__profile-actions button,
.nb-settings__form-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 6px;
  background: var(--bone);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.nb-settings__profile-actions button:hover,
.nb-settings__form-actions button:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.nb-settings__profile-actions button:disabled,
.nb-settings__form-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nb-settings__profile-actions button.is-danger {
  color: color-mix(in srgb, #b42318 80%, var(--ink));
}

.nb-settings__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--amber) 44%, var(--ink) 10%);
  border-radius: 8px;
  background: var(--bone);
}

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

.nb-settings__form-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 900;
}

.nb-settings__form-head button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 20px;
}

.nb-settings__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nb-settings__field span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--ink-3);
}

.nb-settings__field input,
.nb-settings__field select,
.nb-settings__field textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--bone-2) 45%, var(--bone));
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
}

.nb-settings__field input,
.nb-settings__field select {
  height: 38px;
  padding: 0 10px;
}

.nb-settings__field textarea {
  padding: 9px 10px;
  resize: vertical;
  line-height: 1.45;
}

.nb-settings__field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nb-settings__advanced-fields summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--ink-3);
}

.nb-settings__advanced-fields .nb-settings__field-grid {
  margin-top: 10px;
}

.nb-settings__form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.nb-settings__form-actions button:last-child {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bone);
}

@media (max-width: 720px) {
  .nb-settings__field-grid {
    grid-template-columns: 1fr;
  }
}

/* Studio audio playback actions and details dialog. */
.nb-studio__audio-player {
  border-top: 2px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: color-mix(in srgb, var(--bone) 88%, var(--amber) 12%);
}

.nb-studio__audio-topline {
  padding-bottom: 2px;
}

.nb-studio__audio-actions {
  gap: 2px;
}

.nb-studio__audio-icon-btn,
.nb-studio__audio-close {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--bone) 82%, white);
}

.nb-studio__audio-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nb-studio__audio-icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nb-studio__audio-icon-btn.is-danger {
  color: color-mix(in srgb, #b42318 78%, var(--ink));
}

.nb-studio__audio-progress {
  height: 18px;
}

.nb-studio__audio-progress::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 26%, transparent);
}

.nb-studio__audio-progress::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
}

.nb-studio__audio-controls {
  grid-template-columns: 54px 48px 58px 48px;
  gap: 14px;
}

.nb-studio__audio-rate {
  border-radius: 999px;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}

.nb-studio__audio-skip {
  color: var(--blue);
}

.nb-studio__audio-skip svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nb-studio__audio-skip text {
  fill: currentColor;
  stroke: none;
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 900;
}

.nb-studio__audio-play {
  width: 58px;
  height: 58px;
  background: var(--blue);
  box-shadow:
    0 8px 18px color-mix(in srgb, var(--blue) 28%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--ink) 18%, transparent);
}

.nb-studio__details-backdrop {
  position: fixed;
  inset: 0;
  z-index: 104;
  background: color-mix(in srgb, var(--ink) 36%, transparent);
  backdrop-filter: blur(2px);
}

.nb-studio__details {
  position: fixed;
  z-index: 105;
  top: 50%;
  left: 50%;
  width: min(680px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 56px));
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 10px;
  background: var(--bone);
  box-shadow: 0 22px 54px color-mix(in srgb, var(--ink) 28%, transparent);
  overflow: hidden;
}

.nb-studio__details-head {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--bone-2);
}

.nb-studio__details-head p {
  margin: 0 0 4px;
  color: var(--terra);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.nb-studio__details-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
}

.nb-studio__details-head button {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 6px;
  background: var(--bone);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.nb-studio__details-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 18px;
}

.nb-studio__details-body section + section {
  margin-top: 16px;
}

.nb-studio__details-body h3 {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--ink-3);
}

.nb-studio__details-body pre {
  margin: 0;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bone-2) 68%, var(--bone));
  color: var(--ink);
  padding: 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}

/* Notebook settings speaker management and studio retry actions. */
.nb-settings__subsection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.nb-settings__speaker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.nb-settings__speaker-head span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  color: var(--ink-3);
  text-transform: uppercase;
}

.nb-settings__speaker-head button,
.nb-settings__speaker-card-head button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 6px;
  background: var(--bone);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.nb-settings__speaker-head button:disabled,
.nb-settings__speaker-card-head button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nb-settings__speaker-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nb-settings__speaker-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bone-2) 42%, var(--bone));
}

.nb-settings__speaker-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nb-settings__speaker-card-head strong {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink);
}

.nb-settings__speaker-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.nb-settings__speaker-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, var(--bone));
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.nb-studio__result-hit {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.nb-studio__result-hit:disabled {
  cursor: default;
}

.nb-studio__result-retry {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--amber);
  border-radius: 6px;
  background: color-mix(in srgb, var(--amber) 18%, var(--bone));
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
}

.nb-studio__result-retry:disabled {
  cursor: wait;
  opacity: 0.6;
}

.nb-studio__result-item--infographic {
  align-items: flex-start;
}

.nb-studio__result-item--infographic .nb-studio__result-hit {
  align-items: flex-start;
}

.nb-studio__infographic-glyph {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
}

.nb-studio__infographic-preview {
  display: block;
  width: min(100%, 220px);
  aspect-ratio: 16 / 9;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 5%, var(--bone));
}

.nb-studio__infographic-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nb-studio__infographic-error {
  display: block;
  max-width: 220px;
  margin-top: 7px;
  padding: 7px 8px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.35;
  color: color-mix(in srgb, var(--terra-ink) 88%, var(--ink));
  background: color-mix(in srgb, var(--amber) 18%, var(--bone));
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  border-radius: 8px;
  white-space: normal;
}

/* ── Infographic viewer modal ─────────────────────────────────────── */
.nb-infoview__backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: color-mix(in srgb, var(--ink) 52%, transparent);
  backdrop-filter: blur(2px);
}

.nb-infoview {
  position: fixed;
  z-index: 111;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1040px, calc(100vw - 44px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 12px;
  background: var(--bone);
  box-shadow: 0 24px 70px color-mix(in srgb, var(--ink) 34%, transparent);
}

.nb-infoview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.nb-infoview__titlebox {
  min-width: 0;
}

.nb-infoview__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink);
}

.nb-infoview__meta {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--ink-3);
  text-transform: uppercase;
}

.nb-infoview__close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.nb-infoview__close:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}

.nb-infoview__image-wrap {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 5%, var(--bone));
}

.nb-infoview__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 260px);
  object-fit: contain;
}

.nb-infoview__error,
.nb-infoview__empty {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.nb-infoview__error {
  border: 1px solid color-mix(in srgb, var(--amber) 42%, transparent);
  background: color-mix(in srgb, var(--amber) 18%, var(--bone));
  color: color-mix(in srgb, var(--terra-ink) 88%, var(--ink));
}

.nb-infoview__empty {
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--ink) 4%, var(--bone));
  color: var(--ink-3);
}

.nb-infoview__prompt {
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 3%, var(--bone));
}

.nb-infoview__prompt summary {
  cursor: pointer;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink-2);
}

.nb-infoview__prompt pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 0 12px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-2);
}

.nb-infoview__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.nb-infoview__primary,
.nb-infoview__secondary {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
}

.nb-infoview__primary {
  border: 1px solid var(--terra-ink);
  background: var(--terra-ink);
  color: var(--bone);
}

.nb-infoview__secondary {
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: transparent;
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .nb-infoview {
    width: calc(100vw - 22px);
    max-height: calc(100vh - 22px);
    padding: 16px;
  }
  .nb-infoview__foot {
    flex-direction: column-reverse;
  }
  .nb-infoview__primary,
  .nb-infoview__secondary {
    width: 100%;
  }
}

.nb-antv-canvas {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.nb-antv-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}

.nb-antv-canvas svg,
.nb-antv-canvas svg * {
  font-family: Pretendard !important;
}

.nb-infoview__image-wrap--runtime {
  height: min(680px, calc(100vh - 260px));
  min-height: 420px;
  padding: 18px;
  background: #fff;
}

.nb-infomix-editor__backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: color-mix(in srgb, var(--ink) 58%, transparent);
  backdrop-filter: blur(2px);
}

.nb-infomix-editor {
  position: fixed;
  z-index: 121;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  width: min(1440px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 12px;
  background: var(--bone);
  box-shadow: 0 24px 70px color-mix(in srgb, var(--ink) 34%, transparent);
}

.nb-infomix-editor__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.nb-infomix-editor__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink);
}

.nb-infomix-editor__meta {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nb-infomix-editor__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.nb-infomix-editor__close:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}

.nb-infomix-editor__toolbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--bone);
}

.nb-infomix-editor__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 0;
  min-height: 0;
  flex: 1;
}

.nb-infomix-editor__panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.nb-infomix-editor__panel--code {
  border-right: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--ink) 3%, var(--bone));
}

.nb-infomix-editor__panel-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-infomix-editor__panel-head h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink-2);
}

.nb-infomix-editor__panel-head--preview {
  align-items: flex-start;
  flex-wrap: wrap;
}

.nb-infomix-editor__preview-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nb-infomix-editor__panel--preview.is-fullscreen {
  position: fixed;
  inset: 16px;
  z-index: 124;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 12px;
  background: var(--bone);
  box-shadow: 0 24px 70px color-mix(in srgb, var(--ink) 34%, transparent);
}

.nb-infomix-editor__mini-btn,
.nb-infomix-editor__secondary,
.nb-infomix-editor__primary {
  min-height: 36px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
}

.nb-infomix-editor__mini-btn {
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
}

.nb-infomix-editor__controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
  background: var(--bone);
}

.nb-infomix-editor__controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.nb-infomix-editor__controls select {
  min-width: 0;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
}

.nb-infomix-editor__controls select:disabled {
  opacity: 0.55;
}

.nb-infomix-editor__palettes {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--ink) 2%, var(--bone));
}

.nb-infomix-editor__palette {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 999px;
  background: var(--bone);
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
}

.nb-infomix-editor__palette:hover {
  border-color: color-mix(in srgb, var(--terra-ink) 40%, transparent);
  color: var(--ink);
}

.nb-infomix-editor__palette-swatches {
  display: inline-flex;
  overflow: hidden;
  width: 42px;
  height: 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 999px;
}

.nb-infomix-editor__palette-swatches span {
  flex: 1;
}

.nb-infomix-editor__diagnostics {
  max-height: 96px;
  overflow: auto;
  padding: 10px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--amber) 28%, transparent);
  background: color-mix(in srgb, var(--amber) 12%, var(--bone));
  color: color-mix(in srgb, var(--terra-ink) 84%, var(--ink));
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
}

.nb-infomix-editor__textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  padding: 16px;
  background: color-mix(in srgb, var(--ink) 3%, var(--bone));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  tab-size: 2;
}

.nb-infomix-editor__textarea:focus {
  box-shadow: inset 0 0 0 2px
    color-mix(in srgb, var(--terra-ink) 48%, transparent);
}

.nb-infomix-editor__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
}

.nb-infomix-editor__toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--terra-ink);
}

.nb-infomix-editor__canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #fff;
}

.nb-infomix-editor__error {
  margin: 12px 14px 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--amber) 42%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber) 16%, var(--bone));
  color: color-mix(in srgb, var(--terra-ink) 88%, var(--ink));
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.nb-infomix-editor__side {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-left: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  background: color-mix(in srgb, var(--ink) 2%, var(--bone));
}

.nb-infomix-editor__tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  background: var(--bone);
}

.nb-infomix-editor__tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 850;
}

.nb-infomix-editor__tabs button:hover,
.nb-infomix-editor__tabs button.is-active {
  border-color: color-mix(in srgb, var(--terra-ink) 22%, transparent);
  background: color-mix(in srgb, var(--terra-ink) 8%, var(--bone));
  color: var(--ink);
}

.nb-infomix-editor__side-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.nb-infomix-editor__section {
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.nb-infomix-editor__section + .nb-infomix-editor__section {
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.nb-infomix-editor__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nb-infomix-editor__section-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 900;
}

.nb-infomix-editor__field {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 850;
}

.nb-infomix-editor__field input,
.nb-infomix-editor__field textarea,
.nb-infomix-editor__child-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.nb-infomix-editor__field input,
.nb-infomix-editor__child-row input {
  height: 38px;
  padding: 0 10px;
}

.nb-infomix-editor__field textarea {
  resize: vertical;
  min-height: 72px;
  padding: 9px 10px;
}

.nb-infomix-editor__field input:focus,
.nb-infomix-editor__field textarea:focus,
.nb-infomix-editor__child-row input:focus {
  outline: 2px solid color-mix(in srgb, var(--terra-ink) 38%, transparent);
  outline-offset: 1px;
}

.nb-infomix-editor__items {
  display: grid;
  gap: 12px;
}

.nb-infomix-editor__item-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 8px;
  background: var(--bone);
}

.nb-infomix-editor__item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nb-infomix-editor__item-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--terra-ink) 12%, var(--bone));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.nb-infomix-editor__item-actions button,
.nb-infomix-editor__children-head button,
.nb-infomix-editor__child-row button,
.nb-infomix-editor__text-btn {
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 850;
}

.nb-infomix-editor__item-actions button {
  padding: 3px 8px;
}

.nb-infomix-editor__text-btn {
  padding: 5px 10px;
}

.nb-infomix-editor__item-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nb-infomix-editor__children {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 14%, transparent);
}

.nb-infomix-editor__children-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 850;
}

.nb-infomix-editor__child-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.nb-infomix-editor__empty-panel {
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 8px;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
}

.nb-infomix-editor__template-grid,
.nb-infomix-editor__palette-grid {
  display: grid;
  gap: 8px;
}

.nb-infomix-editor__template-grid button,
.nb-infomix-editor__palette-grid button,
.nb-infomix-editor__choice-list button {
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  text-align: left;
}

.nb-infomix-editor__template-grid button {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
}

.nb-infomix-editor__template-grid button span {
  font-size: 13px;
  font-weight: 900;
}

.nb-infomix-editor__template-grid button small {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.35;
}

.nb-infomix-editor__template-grid button:hover,
.nb-infomix-editor__template-grid button.is-selected,
.nb-infomix-editor__palette-grid button:hover,
.nb-infomix-editor__palette-grid button.is-selected,
.nb-infomix-editor__choice-list button:hover,
.nb-infomix-editor__choice-list button.is-selected {
  border-color: color-mix(in srgb, var(--terra-ink) 42%, transparent);
  background: color-mix(in srgb, var(--terra-ink) 7%, #fff);
}

.nb-infomix-editor__choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nb-infomix-editor__choice-list button {
  min-height: 34px;
  padding: 6px 10px;
  text-align: center;
}

.nb-infomix-editor__palette-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  font-weight: 850;
}

.nb-infomix-editor__export-actions {
  display: grid;
  gap: 8px;
}

.nb-infomix-editor__toggle--block {
  justify-content: flex-start;
}

.nb-infomix-editor__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.nb-infomix-editor__status {
  flex: 1;
  min-width: 0;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
}

.nb-infomix-editor__status .is-error {
  color: color-mix(in srgb, var(--terra-ink) 86%, var(--ink));
}

.nb-infomix-editor__secondary {
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: transparent;
  color: var(--ink-2);
}

.nb-infomix-editor__primary {
  padding: 8px 16px;
  border: 1px solid var(--terra-ink);
  background: var(--terra-ink);
  color: var(--bone);
}

.nb-infomix-editor__secondary:disabled,
.nb-infomix-editor__primary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 900px) {
  .nb-infoview__image-wrap--runtime {
    min-height: 320px;
  }

  .nb-infomix-editor__body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .nb-infomix-editor__side {
    min-height: 520px;
    border-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  }

  .nb-infomix-editor__panel--code {
    min-height: 320px;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  }

  .nb-infomix-editor__panel--preview {
    min-height: 420px;
  }

  .nb-infomix-editor__foot {
    flex-wrap: wrap;
  }

  .nb-infomix-editor__status {
    flex-basis: 100%;
  }
}

@media (max-width: 640px) {
  .nb-infomix-editor {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }

  .nb-infomix-editor__head,
  .nb-infomix-editor__foot {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nb-infomix-editor__secondary,
  .nb-infomix-editor__primary {
    flex: 1 1 calc(50% - 8px);
  }
}

/* ── Deep research 보고서 (Studio) ───────────────────────────────── */
.nb-report-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nb-report-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nb-report-item__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.nb-report-item__title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nb-report-item__sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink, #1d1d1f) 55%, transparent);
}
.nb-report-item__ops {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.nb-report-item__op {
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--ink, #1d1d1f) 18%, transparent);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.nb-report__badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink, #1d1d1f) 20%, transparent);
}
.nb-report__badge--strict {
  background: color-mix(in srgb, #2563eb 12%, transparent);
}
.nb-report__badge--hybrid {
  background: color-mix(in srgb, #16a34a 12%, transparent);
}
.nb-report__badge--insight {
  background: color-mix(in srgb, #9333ea 12%, transparent);
}
.nb-report__badge--warn {
  background: color-mix(in srgb, #d97706 16%, transparent);
  border-color: color-mix(in srgb, #d97706 45%, transparent);
}
.nb-report-viewer__backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, #000 45%, transparent);
  z-index: 104;
}
.nb-report-viewer {
  position: fixed;
  inset: 4% 8%;
  background: var(--paper, #fff);
  border-radius: 12px;
  z-index: 105;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px color-mix(in srgb, #000 25%, transparent);
}
.nb-report-viewer__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink, #1d1d1f) 10%, transparent);
  flex-wrap: wrap;
}
.nb-report-viewer__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.nb-report-viewer__title {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nb-report-viewer__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink, #1d1d1f) 60%, transparent);
}
.nb-report-viewer__actions {
  display: flex;
  gap: 6px;
}
.nb-report-viewer__btn {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid color-mix(in srgb, var(--ink, #1d1d1f) 20%, transparent);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nb-report-viewer__notice {
  padding: 8px 18px;
  font-size: 12px;
  background: color-mix(in srgb, #d97706 10%, transparent);
}
.nb-report-viewer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

/* ── Notebook mind map viewer ────────────────────────────────────── */
.nb-mindmap-dialog {
  position: fixed;
  z-index: 101;
  inset: 42px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 10px;
  box-shadow: 0 24px 60px color-mix(in srgb, var(--ink) 34%, transparent);
}

.nb-mindmap-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.nb-mindmap-dialog__head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
}

.nb-mindmap-dialog__kicker {
  margin: 0 0 4px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.nb-mindmap {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 420px;
  overflow: hidden;
  background:
    linear-gradient(
      color-mix(in srgb, var(--ink) 5%, transparent) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--ink) 5%, transparent) 1px,
      transparent 1px
    ),
    color-mix(in srgb, var(--bone) 84%, #fff);
  background-size: 28px 28px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
}

.nb-mindmap__toolbar {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: color-mix(in srgb, var(--bone) 92%, #fff);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 12%, transparent);
}

.nb-mindmap__toolbar button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.nb-mindmap__toolbar button:hover,
.nb-mindmap__toolbar button:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  outline: none;
}

.nb-mindmap__export {
  position: relative;
  display: inline-flex;
}

.nb-mindmap__export > button {
  width: auto;
  gap: 2px;
  padding: 0 6px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.nb-mindmap__export > button:hover,
.nb-mindmap__export > button:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  outline: none;
}

.nb-mindmap__export > button:disabled {
  opacity: 0.5;
  cursor: default;
}

.nb-mindmap__export-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3;
}

.nb-mindmap__export-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  right: 0;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  background: color-mix(in srgb, var(--bone) 96%, #fff);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--ink) 16%, transparent);
}

.nb-mindmap__export-menu button {
  width: 100%;
  justify-content: flex-start;
  padding: 7px 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.nb-mindmap__export-menu button:hover,
.nb-mindmap__export-menu button:focus-visible {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  outline: none;
}

.nb-mindmap__toolbar button.nb-mindmap__edit-save {
  color: var(--accent, #2563eb);
}

.nb-mindmap__toolbar button.nb-mindmap__edit-save:hover,
.nb-mindmap__toolbar button.nb-mindmap__edit-save:focus-visible {
  color: #fff;
  background: var(--accent, #2563eb);
}

.nb-mindmap__toolbar button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 리치텍스트 포맷 툴바 — 편집모드 상단 고정바(좌측). 공용 .nb-rt-* 는
   마인드맵 스코프(.nb-mindmap__rt-toolbar) 하위에서만 스타일링해 전역 누수 방지. */
.nb-mindmap__rt-toolbar {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 200px);
}
.nb-mindmap__rt-toolbar.nb-rt-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  background: color-mix(in srgb, var(--bone) 92%, #fff);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 8px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 12%, transparent);
}
.nb-mindmap__rt-toolbar .nb-rt-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.nb-mindmap__rt-toolbar .nb-rt-btn:hover:not(:disabled) {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.nb-mindmap__rt-toolbar .nb-rt-btn.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent, #549688) 18%, transparent);
}
.nb-mindmap__rt-toolbar .nb-rt-btn:disabled,
.nb-mindmap__rt-toolbar .nb-rt-select:disabled,
.nb-mindmap__rt-toolbar .nb-rt-color input:disabled {
  opacity: 0.4;
  cursor: default;
}
.nb-mindmap__rt-toolbar .nb-rt-select {
  height: 28px;
  font-size: 12px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 6px;
  cursor: pointer;
}
.nb-mindmap__rt-toolbar .nb-rt-color {
  position: relative;
  display: inline-flex;
  align-items: center;
}
/* 색 버튼: 아이콘 아래 현재 색 막대. */
.nb-mindmap__rt-toolbar .nb-rt-color-btn {
  flex-direction: column;
  gap: 1px;
  height: auto;
  padding: 3px 5px;
}
.nb-mindmap__rt-toolbar .nb-rt-color-bar {
  width: 15px;
  height: 3px;
  border-radius: 1px;
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
/* 인페이지 색 팔레트 팝오버(네이티브 OS 색 다이얼로그 대체 — lastRange 유지). */
.nb-mindmap__rt-toolbar .nb-rt-swatches {
  position: absolute;
  z-index: 3;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, 16px);
  gap: 4px;
  padding: 6px;
  background: color-mix(in srgb, var(--bone) 96%, #fff);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 8px;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 16%, transparent);
}
.nb-mindmap__rt-toolbar .nb-rt-swatch {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 4px;
  cursor: pointer;
}
.nb-mindmap__rt-toolbar .nb-rt-swatch:hover {
  outline: 2px solid color-mix(in srgb, var(--accent, #549688) 60%, transparent);
}

.nb-mindmap__canvas {
  width: 100%;
  min-height: 100%;
}

/* rich 노드 텍스트가 블록 기본 여백(p/div margin·padding)으로 아래로 밀려 박스
   하단이 잘리는 것(위끝만 보임) 방지. 측정 div(.nb-mindmap__canvas 하위)와 실제
   foreignObject 양쪽에 동일 적용돼 측정-렌더 높이가 일치한다. 마인드맵 스코프라
   전역 누수 없음. */
.nb-mindmap .smm-richtext-node-wrap,
.nb-mindmap .smm-richtext-node-wrap p,
.nb-mindmap .smm-richtext-node-wrap div {
  margin: 0;
  padding: 0;
}

.nb-mindmap__error {
  position: absolute;
  inset: auto 16px 16px 16px;
  padding: 10px 12px;
  color: var(--danger);
  font-family: var(--sans);
  font-size: 13px;
  background: color-mix(in srgb, var(--danger) 8%, var(--bone));
  border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent);
  border-radius: 8px;
}

@media (max-width: 760px) {
  .nb-mindmap-dialog {
    inset: 14px;
    padding: 14px;
  }

  .nb-mindmap-dialog__head h2 {
    font-size: 18px;
  }

  .nb-mindmap {
    min-height: 520px;
  }
}

