
/* ── 창모드: 탭에서 떼어낸 문서 창 ── */
.doc-window {
  /* AI 툴바(z-index 40)보다 위 — 창 모서리·제목 줄이 가려지면 조작이 막힌다 */
  position: absolute; z-index: 45;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.doc-window.on { border-color: var(--blue); }
.doc-window-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 10px; background: var(--panel2);
  border-bottom: 1px solid var(--line); cursor: move; user-select: none;
}
.doc-window-name {
  flex: 1; font-size: 12px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-window-btn {
  background: none; border: none; color: var(--text-dim);
  font-size: 13px; line-height: 1; cursor: pointer; padding: 2px 5px; border-radius: 3px;
}
.doc-window-btn:hover { background: var(--line); color: var(--text); }
.doc-window-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.doc-window-body .stage, .doc-window-body .overlay { position: absolute; inset: 0; }
.doc-window-body .overlay { pointer-events: none; }
.doc-window-resize {
  position: absolute; right: 0; bottom: 0; width: 14px; height: 14px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, var(--line) 50%, var(--line) 70%, transparent 70%);
}
