 




body{font-family:Consolas;margin:10px;background:var(--bg);color:var(--text);}
.container{max-width:1200px;margin:auto;}
.result-pre{white-space:pre;overflow:auto;background:var(--input-bg);padding:0px 15px 15px 15px;border:1px solid var(--border);border-radius: 6px;}

.topbar{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8px;} /* ✅ align-top */
.left-icons{display:flex;flex-direction:column;gap:2px;width:100%;} /* ✅ 전체 너비 사용 */
.right-icons{display:flex;gap:2px;align-items:center;}
.icon-btn{
    height:25px;
    min-width: 12px;
    padding:0 2px 1px 2px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--border);
    background:var(--panel2);
    text-decoration:none;
    color:var(--text);
    border-radius:6px;
    cursor:pointer;
    white-space:nowrap;
}
.icon-btn:hover{background:var(--panel);}

 .command-area {
    width: 100%;
    min-height: unset !important;     /* 강제 초기화 */
    height: auto !important;
    margin-bottom: 1.5rem;            /* 결과창과의 여백 */
}

.cmd-input {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;          /* 중요 */
    width: 100%;
    height: auto !important;          /* ← 핵심 */
    min-height: unset !important;
}

.cmd-textarea {
    flex: 1 1 auto;                   /* flex-grow 먹히게 */
    width: 100%;
    min-height: 42px;
    height: auto !important;          /* auto 필수 */
    max-height: 60vh;                 /* 너무 커지지 않게 상한 - 선택사항 */
    resize: vertical;
    overflow-y: auto;
    padding: 8px 12px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
}

/* 결과창은 문서 흐름에 확실히 포함 */
.result-pre {
    position: static !important;
    display: block;
    width: 100%;
    min-height: 120px;
    height: auto;
    margin-top: 1rem;
    margin-bottom: 2rem;
    overflow: auto;
    /* 나머지 스타일 유지 */
}

/* 전체 컨테이너도 자유롭게 늘어나게 */
.container {
    height: auto !important;
    min-height: unset !important;
    overflow: visible !important;
    padding-bottom: 1rem;             /* 하단 여유 */
}
     
.result-pre{ 
    
    position: static !important;   /* ← 이 한 줄만 넣어보세요 (또는 relative) */
    /* 기존에 position: absolute; 가 있었다면 지우거나 주석 */
    
    margin-top: 16px;              /* textarea와 간격 벌리기 */
    width: 100%;
    /* 나머지 스타일 유지 */

    }
.abs_right{
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
/* 대메뉴 활성화 표시 */
.main-menu-item.active-menu {
    background: var(--panel);
    border-color: var(--bs-primary);
    font-weight: bold;
}

/* 소메뉴 컨테이너 */
#subMenuContainer {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    min-height: 40px;
}
    
.cmd-input {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;     /* ← 핵심: center 대신 flex-start */
}

.cmd-textarea {
    min-height: 38px;
    height: auto;
    resize: vertical;
    width: 100%;
    padding: 8px 10px;
    font-family: Consolas, monospace;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--input-text);
}

/* 아주 여러 줄 입력 시 너무 커지지 않게 제한하고 싶을 때 */
.cmd-textarea {
    max-height: 45vh;          /* 선택사항 */
    overflow-y: auto;
}    
    
.container {
    min-height: auto !important;     /* 또는 삭제 */
    height: auto !important;
    overflow: visible !important;    /* hidden → visible */
}

.result-pre {
    /* 만약 height나 max-height가 있다면 */
    height: auto;
    max-height: none;
}

    .command-area,
.result-area {
    width: 100%;
    position: relative;   /* 필요 시 */
}

.result-pre {
    position: static;
    margin: 0;
    padding: 1rem;
    }