/* AI 문서 결과물 패널 (.dc-) */
.dc-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.dc-head .dc-title { font-weight: 700; }
.dc-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dc-state.is-bad { color: var(--danger, #b4261f); }
.dc-pop-wrap { position: relative; }
.dc-pop { right: 0; top: calc(100% + 6px); min-width: 220px; }

/* 도구 막대 */
.dc-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px 12px; border-bottom: 1px solid var(--border); background: var(--surface); flex: none; }
.dc-toolbar .icon-btn svg.lucide { width: 17px; height: 17px; }
.dc-block { height: 32px !important; width: auto !important; min-width: 92px; padding: 0 8px !important; font-size: 13px; border-radius: 8px !important; }
.dc-sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; }
.dc-wrap.is-streaming .dc-toolbar { opacity: .45; pointer-events: none; }

/* 종이 */
.dc-body { background: var(--surface-2); padding: 28px 18px 96px; }
.dc-paper {
  max-width: 794px; min-height: 1000px; margin: 0 auto; padding: 72px 84px; background: #fff; color: #1f2328;
  border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 8px 28px rgba(0, 0, 0, .07);
  font-size: 15.5px; line-height: 1.8; outline: none; word-break: keep-all; overflow-wrap: anywhere; caret-color: #3B6FE0;
}
.dc-paper[contenteditable="true"]:focus { box-shadow: 0 0 0 2px rgba(59, 111, 224, .18), 0 8px 28px rgba(0, 0, 0, .07); }
.dc-paper > :first-child { margin-top: 0; }
.dc-paper h1 { font-size: 28px; line-height: 1.3; margin: 0 0 22px; padding-bottom: 12px; border-bottom: 2px solid #3B6FE0; letter-spacing: -.02em; }
.dc-paper h2 { font-size: 21px; line-height: 1.35; margin: 32px 0 10px; color: #1F3A68; letter-spacing: -.01em; }
.dc-paper h3 { font-size: 17.5px; margin: 24px 0 8px; color: #1F3A68; }
.dc-paper h4 { font-size: 16px; margin: 18px 0 6px; }
.dc-paper p { margin: 0 0 12px; }
.dc-paper ul, .dc-paper ol { margin: 0 0 12px; padding-left: 26px; }
.dc-paper li { margin: 3px 0; }
.dc-paper li > p { margin: 0; }
.dc-paper blockquote { margin: 12px 0; padding: 4px 16px; border-left: 4px solid #c7d2fe; color: #4b5563; background: #f8faff; }
.dc-paper table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 14px; }
.dc-paper th, .dc-paper td { border: 1px solid #cfd5dd; padding: 7px 10px; text-align: left; vertical-align: top; min-width: 40px; }
.dc-paper th { background: #eef2f7; font-weight: 700; }
.dc-paper pre { background: #f3f4f6; padding: 12px 14px; border-radius: 8px; white-space: pre-wrap; font-size: 13.5px; font-family: var(--mono, Consolas, monospace); }
.dc-paper code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: .9em; font-family: var(--mono, Consolas, monospace); color: #b4261f; }
.dc-paper a { color: #2563eb; text-decoration: underline; text-underline-offset: 2px; }
.dc-paper hr { border: 0; border-top: 1px solid #d0d7de; margin: 24px 0; }
.dc-paper ::selection { background: rgba(59, 111, 224, .22); }
.dc-wrap.is-streaming .dc-paper > :last-child::after { content: ""; display: inline-block; width: 8px; height: 17px; margin-left: 3px; background: #3B6FE0; vertical-align: -3px; border-radius: 2px; animation: dc-blink 1s steps(1) infinite; }
@keyframes dc-blink { 50% { opacity: 0; } }

/* 글을 고르면 뜨는 AI 막대 */
.dc-float {
  position: absolute; z-index: 25; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; max-width: calc(100% - 16px);
  padding: 4px; border-radius: 12px; background: #1f2328; color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); font-size: 13px;
}
.dc-float[hidden] { display: none; }
.dc-float-label { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px 0 6px; color: #c7d2fe; font-weight: 600; white-space: nowrap; }
.dc-float-label svg.lucide { width: 15px; height: 15px; }
.dc-float button { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; font-size: 13px; white-space: nowrap; }
.dc-float button:hover { background: rgba(255, 255, 255, .12); }
.dc-float button svg.lucide { width: 13px; height: 13px; opacity: .7; }
.dc-float.is-busy button { opacity: .4; pointer-events: none; }
.dc-sub { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px; padding-top: 4px; margin-top: 2px; border-top: 1px solid rgba(255, 255, 255, .12); }
.dc-sub[hidden] { display: none; }
.dc-spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: dc-spin .8s linear infinite; }
@keyframes dc-spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .dc-body { padding: 12px 8px 80px; }
  .dc-paper { padding: 32px 22px; min-height: 0; font-size: 15px; }
  .dc-paper h1 { font-size: 23px; }
  .dc-paper h2 { font-size: 19px; }
  .dc-head .btn span { display: none; }
}

@media print {
  .dc-toolbar, .dc-float, .dc-head { display: none !important; }
}
