/* ---------------------------------------------------------------------------
   AI Service — 스텝 화면 (모델 개발 · 모델 학습 공용)
   2026-09-17 · 설계 기록: s2 aitest/_notes/ui-talk-20260917.md 7·9장

   스텝 하나의 상태가 넷입니다
   ---------------------------
       비어 있음   아무것도 저장 안 함
       저장함      값은 있는데 맞는지 모름
       검증함      맞는 것까지 확인됨
       확정함      이걸로 간다. 다음 스텝이 열림

   그래서 색이 넷 필요합니다. 다만 색으로만 말하지 않습니다 - 딱지에 글자를
   같이 적습니다. 색을 못 보는 사람에게도 같은 정보가 가야 합니다.

   잠긴 스텝은 흐리게 두고 이유를 적습니다. 못 누르는 버튼만 있고 왜 못 누르는지
   가 없으면, 사람이 자기 잘못인 줄 알고 같은 곳을 반복해서 누릅니다.
   --------------------------------------------------------------------------- */

.ai-status {
    margin: 8px 0 14px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
}
.ai-status.is-error { color: #c0392b; }

/* 복구 안내의 전체 모델 ID·파일 경로를 유지하고 좁은 화면에서 줄을 바꿉니다. */
#ai-dev-recovery {
    color: #5b6b7b;
    font-size: 14px;
    overflow-wrap: anywhere;
}
#ai-dev-recovery code, #ai-dev-recovery .btn {
    font-size: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
}
#ai-dev-recovery .btn { max-width: 100%; }
#ai-dev-status, #ai-new-status { overflow-wrap: anywhere; }
#ai-new-modal .modal-footer.ai-foot { flex-wrap: wrap; }
#ai-new-modal .modal-footer #ai-new-status { flex: 0 0 100%; margin: 0 0 10px; text-align: left; }
#ai-new-modal .modal-footer #ai-new-status:empty { display: none; }

/* --------------------------------------------------------- 무엇을 만드는가 */

.ai-subject {
    overflow-wrap: anywhere;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f4f7fa;
    border-left: 3px solid #3598dc;
}

.ai-subject-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.ai-subject-id {
    margin-left: 8px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
}

.ai-subject-meta {
    margin-top: 6px;
    color: #5b6b7b;
    font-size: 14px;
    line-height: 1.7;
}

.ai-used-asset {
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.ai-subject-meta span { margin-right: 14px; }
.ai-subject-meta b { font-weight: 600; color: #34495e; }

/* ------------------------------------------------------------- 다음 할 일 */

/* 한 번에 한 가지만 짚어 줍니다. 여럿을 늘어놓으면 무엇부터 할지를 또 고민하게
   됩니다. */
.ai-next {
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid #f0d9a8;
    background: #fdf8ec;
    border-radius: 3px;
}

.ai-next.is-done {
    border-color: #bfe3cd;
    background: #f1f9f4;
}

.ai-next-say {
    color: #7a5b17;
    font-size: 14px;
    line-height: 1.7;
}

.ai-next.is-done .ai-next-say { color: #1e7e46; }

.ai-next-go { margin-top: 8px; }

/* ------------------------------------------------------------------ 스텝 */

.ai-step {
    margin-bottom: 10px;
    border: 1px solid #e7ecf1;
    border-left: 3px solid #dfe5ea;
    background: #fff;
}

.ai-step.st-saved    { border-left-color: #3598dc; }
.ai-step.st-checked  { border-left-color: #f39c12; }
.ai-step.st-fixed    { border-left-color: #27ae60; }
.ai-step.st-locked   { background: #fafbfc; }
.ai-step.st-failed   { border-left-color: #d93d47; }
.ai-step.st-stopped  { border-left-color: #b66b12; }
.ai-step.st-unverified { border-left-color: #69788b; }

.ai-step-head {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    cursor: pointer;
}

.ai-step-head:focus { outline: 2px solid #3598dc; outline-offset: -2px; }

.ai-step.st-locked .ai-step-head { cursor: pointer; }

.ai-step-no {
    flex: 0 0 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 11px;
    background: #eef2f6;
    color: var(--ai-text-muted, #526579);
    font-size: 12px;
}

.ai-step.st-fixed .ai-step-no { background: #e6f5ec; color: #1e7e46; }

.ai-step-name {
    flex: 1 1 auto;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.ai-step.st-locked .ai-step-name { color: var(--ai-text-muted, #526579); font-weight: 400; }

.ai-state {
    flex: 0 0 auto;
    padding: 1px 8px;
    border-radius: 3px;
    background: #eef2f6;
    color: #5b6b7b;
    font-size: 14px;
    white-space: nowrap;
}

.ai-state.st-empty   { background: #eef2f6; color: var(--ai-text-muted, #526579); }
.ai-state.st-saved   { background: #e8f1fa; color: #21618c; }
.ai-state.st-checked { background: #fdf2e0; color: #9a6208; }
.ai-state.st-fixed   { background: #e6f5ec; color: #1e7e46; }
.ai-state.st-locked  { background: #f2f4f6; color: var(--ai-text-muted, #526579); }
.ai-state.st-skip    { background: #f2e9f7; color: #6c3483; }
.ai-state.st-failed  { background: #fdebed; color: #ad2030; }
.ai-state.st-stopped { background: #fff1df; color: #87500d; }
.ai-state.st-unverified { background: #edf0f4; color: #465569; }

.ai-step-body {
    padding: 4px 16px 16px 48px;
    border-top: 1px solid #f2f5f8;
}

.ai-step-why {
    margin: 10px 0 12px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
    line-height: 1.7;
}

/* 이 스텝이 무엇을 요구하는지. 단계마다 필요한 것을 적어 둡니다. */
.ai-need {
    margin: 0 0 12px;
    padding-left: 18px;
}

.ai-need li {
    margin-bottom: 3px;
    color: #4a5b6b;
    font-size: 14px;
    line-height: 1.7;
}

.ai-need li.is-filled { color: #1e7e46; }
.ai-need li.is-empty  { color: var(--ai-text-muted, #526579); }

.ai-need .val {
    color: #2c3e50;
    font-weight: 600;
}

.ai-step-details {
    margin: 10px 0 12px;
    font-size: 14px;
    overflow-wrap: anywhere;
}
.ai-step-details summary {
    color: #21618c;
    cursor: pointer;
    line-height: 1.7;
}
.ai-step-details summary:focus-visible { outline: 2px solid #3598dc; }
.ai-step-details .ai-need { margin-top: 8px; }

.ai-lock-why {
    margin: 10px 0 0;
    color: #9a6208;
    font-size: 14px;
    line-height: 1.7;
}

/* 단추 자리. 왼쪽 끝은 되돌리기 어려운 것, 오른쪽 끝은 나아가는 것.
   섞어 두면 확정을 누르려다 삭제를 누릅니다. */
.ai-step-acts {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f2f5f8;
}

.ai-acts-left  { flex: 0 0 auto; }
.ai-acts-right { flex: 0 0 auto; margin-left: auto; }

.ai-acts-right .btn { margin-left: 6px; }

.ai-step-acts > .ai-acts-left, .ai-step-acts > .ai-acts-right {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}
.ai-step-acts > .ai-acts-right { justify-content: flex-end; }
.ai-step-acts .btn { margin-left: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

.ai-todo-note {
    margin: 12px 0 0;
    padding: 8px 12px;
    background: #f7f9fb;
    border-radius: 3px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 767px) {
    .ai-step-body { padding-left: 16px; }
    .ai-subject-meta span { display: block; margin: 0 0 3px; }
}

/* --------------------------------------------------------- 스텝 안의 서식 */

/* 고칠 수 있는 스텝은 본문이 곧 서식입니다. 읽기 전용 목록만 두고 저장 단추를
   달면 저장할 것이 없습니다 - 실제로 그렇게 만들어 놓고 "수정은 어디서 하나" 를
   듣고 고쳤습니다. */

.ai-form { max-width: 640px; }

.ai-form .form-group { margin-bottom: 14px; }

.ai-form label {
    margin-bottom: 4px;
    color: #5b6b7b;
    font-size: 14px;
    font-weight: 600;
}

.ai-help {
    display: block;
    margin-top: 4px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
    line-height: 1.6;
}

/* 못 바꾸는 값. 입력칸처럼 보이면 눌러 보고 안 되는 것을 겪습니다. 아예 다르게
   그려서 "여기는 고치는 자리가 아니다" 를 눈으로 알게 합니다. */
.ai-fixed {
    margin-bottom: 14px;
    padding: 8px 12px;
    background: #f4f7fa;
    border-radius: 3px;
}

.ai-fixed-label {
    display: block;
    color: #5b6b7b;
    font-size: 14px;
    font-weight: 600;
}

.ai-fixed-value {
    display: block;
    margin-top: 2px;
    color: #2c3e50;
    font-size: 14px;
}

.ai-fixed-why {
    display: block;
    margin-top: 3px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
    line-height: 1.6;
}

/* ------------------------------------------------------------ 모달 발치 */

/* 스텝 단추와 같은 규칙입니다.
     왼쪽 끝   물러나는 것(취소)
     오른쪽 끝  나아가는 것(저장 · 확정)

   부트스트랩 기본은 둘 다 오른쪽에 붙여 놓습니다. 그러면 손이 오른쪽 끝으로
   갔을 때 저장인지 취소인지를 매번 읽어야 합니다. 갈라 두면 위치가 곧 뜻입니다. */
.modal-footer.ai-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer.ai-foot .ai-foot-left  { flex: 0 0 auto; }
.modal-footer.ai-foot .ai-foot-right { flex: 0 0 auto; margin-left: auto; }
.modal-footer.ai-foot .ai-foot-right .btn { margin-left: 6px; }

/* 고르개 두 개를 나란히. 라디오와 글자가 붙어 있으면 어느 쪽 설명인지 헷갈립니다. */
.ai-radio {
    display: inline-block;
    margin-right: 18px;
    font-weight: 400;
    color: #4a5b6b;
    font-size: 14px;
}

.ai-radio input { margin-right: 5px; }

/* 원문을 적는 자리. 들여쓰기가 보여야 어디가 어긋났는지 눈에 띕니다. */
.ai-code {
    font-family: Consolas, "D2Coding", monospace;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre;
    overflow-x: auto;
}

/* ------------------------------------------------------------- 줄 편집기 */

/* 필드가 여럿인 것을 표로 봅니다. JSON 원문을 적게 하면 만드는 쪽은 편한데
   보는 쪽이 "필드가 몇 개인지" 를 중괄호 사이에서 세어야 합니다. */

.ai-rows {
    width: 100%;
    font-size: 14px;
    margin-bottom: 8px;
    border-collapse: collapse;
}

.ai-rows th {
    padding: 4px 6px 6px;
    border-bottom: 1px solid #e7ecf1;
    color: #5b6b7b;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    vertical-align: bottom;
}

.ai-template-options { list-style: none; margin: 16px 0; padding: 0; border-top: 1px solid #dbe3ea; }
.ai-template-option {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 24px;
    align-items: start;
    padding: 14px 12px;
    border-bottom: 1px solid #dbe3ea;
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.ai-template-option.has-issues { background: #fdf8ef; }
.ai-template-option:focus-within { outline: 2px solid #3978aa; outline-offset: -2px; }
.ai-template-pick { display: flex; align-items: baseline; gap: 8px; margin: 0; cursor: pointer; }
.ai-template-pick input { flex: none; margin: 0; }
.ai-template-heading { display: block; color: #344f65; margin-bottom: 4px; }
.ai-template-meta, .ai-template-option p { color: #526579; margin: 4px 0 0; }
.ai-template-description > p, .ai-template-meta { margin-left: 22px; }
.ai-template-option .ai-template-issue { grid-column: 1 / -1; color: #87500d; margin: 0; }
@media (max-width: 850px) {
    .ai-template-option { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-template-description { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .ai-template-option { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* 머리글 아래 작은 설명. 칸마다 무엇을 적는지가 붙어 있어야 합니다. */
.ai-rows-hint {
    display: block;
    margin-top: 2px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.ai-rows td {
    padding: 3px 6px 3px 0;
    vertical-align: top;
}

.ai-rows td:last-child { padding-right: 0; }
.ai-rows [aria-invalid="true"] { border-color: #c0392b; }
/* 평가 준비의 조치 안내는 좁은 화면에서 항목별로 읽습니다. */
@media (max-width: 700px) {
    .ai-readiness-table, .ai-readiness-table tbody,
    .ai-readiness-table tr, .ai-readiness-table td { display: block; width: 100%; }
    .ai-readiness-table thead { display: none; }
    .ai-readiness-table tr { border-bottom: 1px solid #e7ecf1; padding: 8px 0; }
    .ai-readiness-table td { padding: 6px 0; overflow-wrap: anywhere; word-break: normal; }
    .ai-readiness-table td[data-label]::before {
        content: attr(data-label); display: block; margin-bottom: 4px;
        color: var(--ai-text-muted, #526579); font-weight: 600;
    }
    .ai-readiness-table code { white-space: normal; overflow-wrap: anywhere; }
}

/* 완료 작업의 긴 실행 경로는 좁은 화면에서 항목 아래에 온전히 표시합니다. */
@media (max-width: 700px) {
    .ai-execution-table, .ai-execution-table tbody, .ai-execution-table tr,
    .ai-execution-table th, .ai-execution-table td { display: block; width: 100%; }
    .ai-execution-table tr { border-bottom: 1px solid #e7ecf1; padding: 8px 0; }
    .ai-execution-table th { padding: 6px 0 2px; border-bottom: 0; }
    .ai-execution-table td { padding: 2px 0 6px; overflow-wrap: anywhere; word-break: normal; }
    .ai-execution-table code { white-space: normal; overflow-wrap: anywhere; }
}

.ai-rows-error {
    display: block;
    margin-top: 4px;
    color: #c0392b;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* 평가 기준 비교는 긴 설명과 원래 줄바꿈을 함께 보존합니다. */
.ai-evaluation-compare { overflow-wrap: anywhere; }
.ai-evaluation-compare .table { width: 100%; table-layout: fixed; }
.ai-evaluation-compare th,
.ai-evaluation-compare td { white-space: pre-wrap; }

.ai-train-input { table-layout: fixed; }
.ai-train-input th { width: 30%; vertical-align: top; }
.ai-train-input td, .ai-train-input code { white-space: normal; overflow-wrap: anywhere; }

.ai-rows .form-control {
    height: 30px;
    padding: 4px 8px;
    font-size: 14px;
}

.ai-rows textarea.ai-rows-multiline {
    min-height: 30px;
    resize: vertical;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ai-rows select.form-control { padding: 3px 6px; }

.ai-rows-empty td {
    padding: 12px 0;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
}

.ai-rows-del {
    padding: 2px 7px;
    color: var(--ai-text-muted, #526579);
    line-height: 1.3;
}

.ai-rows-del:hover { color: #c0392b; }

.ai-rows-paging {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    font-size: 14px;
}

.ai-rows-paging label { margin: 0; font-weight: 400; }
.ai-rows-paging .form-control { width: auto; font-size: 14px; }
.ai-rows-paging .btn { font-size: 14px; }

/* 원문 보기. 접어 두고 필요한 사람만 폅니다. */
.ai-raw-toggle {
    display: inline-block;
    margin-top: 6px;
    color: var(--ai-text-muted, #526579);
    font-size: 14px;
    cursor: pointer;
}

.ai-raw-toggle:hover { color: var(--ai-text-link, #21618c); }

.ai-raw-box {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f7f9fb;
    border-radius: 3px;
    max-height: 260px;
    overflow: auto;
}

.ai-raw-box pre {
    margin: 0;
    border: 0;
    padding: 0;
    background: none;
    font-family: Consolas, "D2Coding", monospace;
    font-size: 14px;
    line-height: 1.55;
    color: #4a5b6b;
}

/* bootbox 안의 고르개. 한 줄에 하나씩 놓아야 읽힙니다. */
.bootbox .ai-radio { display: block; margin-bottom: 8px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------------------
   학습 데이터(자산) 편집기 — ai_asset.js
   2026-09-18

   다섯 단계를 한 모달에서 다룹니다. 머리에 자산 이름과 단계가 늘 보이게 두는
   것이 요점입니다 - 단계를 오가다 보면 "지금 어느 자산이더라" 가 됩니다.
   --------------------------------------------------------------------------- */

#ai-asset-modal .modal-dialog { width: 92%; max-width: 1080px; }
#ai-asset-modal .modal-header { padding-bottom: 8px; }

.ai-asset-sub { margin: 4px 0 10px; color: var(--ai-text-muted, #526579); font-size: 14px; }
.ai-asset-sub b { color: #34495e; }

/* 단계 띠 --------------------------------------------------------------- */
.ai-asset-steps { display: flex; flex-wrap: wrap; gap: 6px; }

.ai-asset-step {
    border: 1px solid #dfe3e9; background: #fff; border-radius: 3px;
    padding: 6px 11px; font-size: 14px; color: var(--ai-text-muted, #526579); text-align: left;
}
.ai-asset-step b { color: var(--ai-text-muted, #526579); margin-right: 4px; }
.ai-asset-step i { font-style: normal; font-size: 14px; margin-left: 6px; color: var(--ai-text-muted, #526579); }

.ai-asset-step.is-done { color: #3a5a40; border-color: #cfe3d4; background: #f4faf5; }
.ai-asset-step.is-done b { color: var(--ai-text-success, #196c47); }
.ai-asset-step.is-now  { color: #2c3e50; border-color: #b9cbe0; background: #f4f8fc; }
.ai-asset-step.is-now  b { color: var(--ai-text-link, #21618c); }
.ai-asset-step.is-skip { color: var(--ai-text-muted, #526579); background: #fafbfc; }
.ai-asset-step.is-open { box-shadow: inset 0 -2px 0 #4a7fb5; font-weight: 600; }

/* 몸통 ------------------------------------------------------------------ */
.ai-asset-why { margin: 0 0 8px; color: #56606e; font-size: 14px; }
.ai-asset-why-small { margin: 4px 0 0; color: var(--ai-text-muted, #526579); font-size: 14px; line-height: 1.5; }
.ai-asset-meta { color: var(--ai-text-muted, #526579); font-size: 14px; margin: 6px 0; }
.ai-asset-h { margin: 16px 0 6px; font-size: 16px; color: #34495e; }
.ai-asset-null { color: var(--ai-text-muted, #526579); }
.ai-warn { color: var(--ai-text-warning, #87500d); }

/* 메뉴마다 같은 운영 순서를 보여 줍니다. 현재 메뉴는 굵게 표기합니다. */
.ai-service-flow { margin: 0 0 16px; padding: 10px 12px; color: #4d6578; font-size: 14px; line-height: 1.6; }
.ai-service-flow b { color: #2f4c63; margin-right: 10px; }
.ai-service-flow span { margin-right: 10px; }
.ai-service-flow strong { color: #247c87; }
.ai-service-flow-note { display: block; margin: 4px 0 7px; color: var(--ai-text-muted, #526579); }
.ai-service-flow .btn { margin-right: 4px; }

.ai-asset-two { display: flex; gap: 14px; flex-wrap: wrap; }
.ai-asset-card {
    flex: 1 1 320px; border: 1px solid #e6e9ee; border-radius: 3px; padding: 12px 14px;
    background: #fcfdfe;
}
.ai-asset-card h5 { margin: 0 0 6px; font-size: 16px; color: #34495e; }
.ai-asset-card p  { font-size: 14px; color: var(--ai-text-muted, #526579); line-height: 1.6; }
.ai-asset-card input[type="file"] { margin-bottom: 8px; }
.ai-asset-preview-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 7px 0; color: var(--ai-text-muted, #526579); font-size: 14px; }
.ai-asset-preview-tools label { display: flex; align-items: center; gap: 5px; margin: 0; font-weight: normal; }
.ai-asset-preview-tools .form-control { width: 72px; height: 28px; padding: 3px 6px; }
.ai-asset-preview-tools span { margin-right: auto; }

/* 전처리 서식 ------------------------------------------------------------ */
.ai-asset-form { display: flex; flex-wrap: wrap; gap: 14px; }
.ai-asset-field { flex: 1 1 300px; }
.ai-asset-field label { display: block; font-size: 14px; color: #34495e; margin-bottom: 4px; }

.ai-asset-steps-list { margin: 0 0 8px 18px; padding: 0; font-size: 14px; color: #56606e; }
.ai-asset-steps-list li { margin: 2px 0; }
.ai-asset-steps-list b { color: #34495e; }

/* 확정 요약 -------------------------------------------------------------- */
.ai-asset-sum { margin: 0; }
.ai-asset-sum dt {
    float: left; clear: left; width: 160px; color: var(--ai-text-muted, #526579); font-weight: normal;
    font-size: 14px; padding: 5px 0;
}
.ai-asset-sum dd { margin-left: 172px; color: #34495e; font-size: 14px; padding: 5px 0; overflow-wrap: anywhere; }
.ai-asset-sum dd code { white-space: normal; overflow-wrap: anywhere; }

/* 좁은 화면에서는 제목 아래에 전체 값을 표시하며 경로·체크섬을 생략하지 않습니다. */
@media (max-width: 767px) {
    .ai-asset-sum dt { float: none; width: auto; padding-bottom: 0; }
    .ai-asset-sum dd { margin-left: 0; padding-top: 2px; }
    /* 자산 정보는 본문에서 스크롤하고 제목·닫기·진행 버튼은 계속 표시합니다. */
}

.ai-asset-warn {
    margin-top: 14px; padding: 10px 12px; border-left: 3px solid #d9a441;
    background: #fdf8ef; color: #7a6132; font-size: 14px; line-height: 1.7;
}

#ai-asset-rows-change:empty { display: none; }

#ai-asset-recovery-guide { overflow-wrap: anywhere; }
#ai-asset-recovery-guide .btn {
    max-width: 100%; white-space: normal; overflow-wrap: anywhere; margin-bottom: 6px;
}
#ai-asset-recovery-guide summary { cursor: pointer; }
#ai-asset-recovery-guide summary:focus-visible { outline: 2px solid #3598dc; outline-offset: 2px; }

/* 구간 라벨 작업 공간 ----------------------------------------------------- */
.ai-label-workspace { margin: 14px 0; padding: 12px; border: 1px solid #dbe6ee; background: #fbfdff; }
.ai-label-workspace-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #34495e; font-size: 14px; }
.ai-label-workspace-head .form-control { width: auto; min-width: 180px; }
.ai-label-start { margin-bottom: 10px; padding: 12px; border: 1px solid #b9d3e7; background: #f3f8fc; color: #34495e; }
.ai-label-start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.ai-label-start-actions .btn { max-width: 100%; white-space: normal; }
.ai-label-start p { margin: 4px 0 0; font-size: 14px; }
.ai-label-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ai-label-layout .ai-label-workspace { margin: 0; min-width: 0; }
.ai-label-editor { min-width: 0; padding: 12px; border: 1px solid #dbe6ee; background: #fff; }
.ai-label-editor h5 { margin: 0 0 10px; font-size: 16px; color: #34495e; }
.ai-label-settings, .ai-label-intro { margin: 8px 0; }
.ai-label-settings summary, .ai-label-intro summary, .ai-label-view-details summary { cursor: pointer; }
.ai-label-layout .form-control { max-width: 100%; }
@media (min-width: 1440px) {
    #ai-asset-modal:has(.ai-label-layout:not(.is-source-blocked)) .modal-dialog { width: 96%; max-width: 1600px; }
}
.ai-label-signal { display: block; width: 100%; margin-top: 8px; background: #fff; border: 1px solid #edf0f3; cursor: crosshair; touch-action: none; user-select: none; }
.ai-label-signal:focus-visible { outline: 2px solid #155c94; outline-offset: 2px; }
.ai-label-range-list summary { cursor: pointer; color: #34495e; }
.ai-label-signal text { fill: var(--ai-text-muted, #526579); font-size: 14px; }
.ai-label-axis { stroke: #cbd5df; stroke-width: 1; }
.ai-label-line { fill: none; stroke: #2b7fbe; stroke-width: 2; }
.ai-label-region > rect { fill: #eea52e; fill-opacity: .18; stroke: #ad7318; stroke-width: 1; cursor: pointer; }
.ai-label-region.is-baseline > rect { fill: #3caa6d; }
.ai-label-region.is-recovery > rect { fill: #438dd0; }
.ai-label-region.is-exclude > rect { fill: #a65a73; }
.ai-label-region > line { stroke: #946316; stroke-width: 1; pointer-events: none; }
.ai-label-region.is-selected > rect { stroke: #154c81; stroke-width: 2; fill-opacity: .3; }
.ai-label-region > .ai-label-handle { fill: #154c81; fill-opacity: .65; cursor: ew-resize; }
.ai-label-region > text { font-weight: 600; pointer-events: none; }
.ai-label-live > rect { fill: #268bdd; fill-opacity: .28; stroke: #155c94; stroke-width: 2; }
.ai-label-live > line { stroke: #155c94; stroke-width: 2; stroke-dasharray: 4 2; }
.ai-label-live > text { fill: #154c81; font-weight: 600; }
.ai-label-row-selected > td { background: #eaf4ff; }
.ai-label-chart-empty { fill: var(--ai-text-muted, #526579); }
.ai-label-selection { margin: 6px 0; color: #4d718d; font-size: 14px; }
.ai-label-timeline { display: flex; min-height: 42px; overflow-x: auto; border: 1px solid #e2e7ec; background: #f4f6f8; }
.ai-label-gap { min-width: 2px; background: #eef1f4; }
.ai-label-segment { min-width: 62px; padding: 5px 7px; white-space: normal; overflow-wrap: anywhere; border: 0; border-right: 1px solid rgba(255,255,255,.75); text-align: left; color: #34495e; background: #dce9f5; }
.ai-label-segment small { display: block; margin-top: 2px; color: var(--ai-text-muted, #526579); font-size: 14px; }
.ai-label-segment.is-baseline { background: #dff1e5; }
.ai-label-segment.is-exposure { background: #fde7c5; }
.ai-label-segment.is-recovery { background: #dce9f5; }
.ai-label-segment.is-exclude { background: #eadde0; color: #7b5058; }
.ai-label-empty { padding: 11px; color: var(--ai-text-muted, #526579); font-size: 14px; }
.ai-label-suggestion-actions { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 8px 0; background: #fff; border-bottom: 1px solid #dbe6ee; }
.ai-label-suggestion-actions .btn { max-width: 100%; white-space: normal; }
.ai-label-suggestion-actions .ai-asset-meta { flex-basis: 100%; margin: 0; }

/* 큰 표는 가로로 넘깁니다. 히터 스캔은 열이 40개가 넘습니다. */
.ai-table-wrap { overflow-x: auto; max-width: 100%; }
.ai-table-wrap .ai-rows { min-width: 100%; white-space: nowrap; }

.ai-readonly { background: #f7f8fa !important; color: var(--ai-text-muted, #526579) !important; border-color: #eceef1 !important; }

/* ---------------------------------------------------------------------------
   유형과 코드 — ai_kindpage.js
   2026-09-18

   유형 하나가 접힌 줄 하나입니다. 펴면 "무엇을 요구하나" 와 "코드가 있나" 가
   나란히 보입니다 - 둘이 짝이라 따로 보면 유형만 만들어 놓고 코드를 잊습니다.
   --------------------------------------------------------------------------- */

.ai-kind { border: 1px solid #e6e9ee; border-radius: 3px; margin-bottom: 8px; background: #fff; }
.ai-kind.is-open { border-color: #b9cbe0; }

.ai-kind-head {
    display: block; width: 100%; text-align: left; border: 0; background: none;
    padding: 12px 16px;
}
.ai-kind.is-open .ai-kind-head { border-bottom: 1px solid #eef1f5; background: #f8fafc; }

.ai-kind-label { font-size: 16px; color: #2c3e50; font-weight: 600; margin-right: 8px; }
.ai-kind-head code {
    font-size: 14px; color: var(--ai-text-muted, #526579); background: #f2f4f7; padding: 2px 6px; border-radius: 2px;
}
.ai-kind-mark { display: block; margin-top: 4px; font-size: 14px; color: var(--ai-text-muted, #526579); }

.ai-kind-body { padding: 14px 16px; }
.ai-kind-about { color: #56606e; font-size: 14px; margin: 0 0 12px; }

.ai-kind-two { display: flex; gap: 18px; flex-wrap: wrap; }
.ai-kind-two > div { flex: 1 1 720px; min-width: 0; overflow-x: auto; }
.ai-kind-two .ai-rows { min-width: 660px; }
/* "이 유형이 요구하는 이름" · "코드 파일" 도 구역 제목입니다. 카드 제목과
   비슷한 크기로 두면 역시 머리글이 여럿으로 보입니다. */
.ai-kind-two h5 {
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eef1f5;
    font-size: 14px;
    font-weight: 600;
    color: var(--ai-text-muted, #526579);
    letter-spacing: .02em;
}

.ai-kind-prefix { margin: 0 0 6px; }
.ai-kind-prefix code { font-size: 14px; color: #56606e; }

/* 없는 필수 파일. 빨갛게 두지 않고 바탕만 띄웁니다 - 빨간 줄이 많으면
   어느 것이 진짜 문제인지 안 보입니다. */
.ai-kind-missing td { background: #fdf8ef; }

.ai-code-tall { max-height: 60vh; }

/* 작업 실패 원인은 줄바꿈과 들여쓰기를 유지하며 전체 문장을 보여줍니다. */
.ai-job-error {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 학습 방식 · 검증 — ai_kindpage.js */

/* 상자를 두르지 않습니다. 카드 머리글과 같은 회색 상자를 바로 아래 또 두면
   머리글이 두 번 나온 것처럼 보입니다. 선 하나로 가릅니다. */
.ai-kind-how {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 0 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eef1f5;
    font-size: 14px;
}

/* 구역 제목은 카드 제목보다 작고 흐리게. 크기와 색이 다르면 같은 회색을
   써도 안 헷갈립니다. */
.ai-kind-how b {
    font-size: 14px;
    font-weight: 600;
    color: var(--ai-text-muted, #526579);
    letter-spacing: .02em;
    margin: 0 2px 0 0;
}

/* 단추는 오른쪽 끝으로 밀어 둡니다. 글과 단추가 섞여 있으면 어디를 눌러야
   하는지 눈이 한 번 더 찾습니다. */
.ai-kind-how .btn:first-of-type { margin-left: auto; }
.ai-kind-how .btn { margin-left: 0; }

.ai-tpl-file { margin-bottom: 4px; }
.ai-tpl-toggle {
    display: block; width: 100%; text-align: left; border: 1px solid #eef1f5;
    background: #fbfcfd; padding: 6px 10px; border-radius: 3px; font-size: 14px;
}
.ai-tpl-toggle code { color: #34495e; }

/* 검증 표. 상태별로 왼쪽 띠만 줍니다 - 줄 전체를 칠하면 글씨가 안 읽힙니다. */
.ai-verify td { vertical-align: top; }
.ai-verify tr.is-ok   td:first-child { color: #3a7d44; border-left: 3px solid #cfe3d4; }
.ai-verify tr.is-warn td:first-child { color: var(--ai-text-warning, #87500d); border-left: 3px solid #e8d4a8; }
.ai-verify tr.is-fail td:first-child { color: #a04747; border-left: 3px solid #e3b9b9; }
.ai-verify tr.is-skip td:first-child { color: var(--ai-text-muted, #526579); border-left: 3px solid #e6e9ee; }
.ai-verify a { font-size: 14px; }

/* 추론 시험의 JSON 상자 */
.ai-code-edit {
    font-family: Consolas, "D2Coding", monospace; font-size: 14px; line-height: 1.5;
    white-space: pre; overflow-x: auto;
}

/* --------------------------------------------------- 압축 안의 모양 보기 */

/* sourcedir.tar.gz 를 "위 스크립트를 묶은 것" 이라고만 하면 폴더째 묶기
   쉽습니다. 폴더가 한 겹 끼면 컨테이너가 진입점을 못 찾고 그 자리에서 죽는데
   화면에는 아무 표시도 안 납니다. 묶기 전에 모양을 보는 자리가 여기뿐입니다. */

.ai-shape-btn {
    border: 1px solid #d5dbe3;
    background: #fff;
    border-radius: 2px;
    padding: 1px 7px;
    font-size: 14px;
    color: #5c6873;
    line-height: 1.6;
    vertical-align: middle;
}

.ai-shape-btn:hover,
.ai-shape-btn:focus {
    border-color: #36c6d3;
    color: var(--ai-text-accent, #24727a);
    outline: none;
}

.ai-shape-btn .fa { margin-right: 3px; }

/* 화면 좌표로 띄웁니다. 표 안에 두면 표의 스크롤에 잘립니다. */
.ai-shape-pop {
    position: fixed;
    z-index: 10060;          /* 모달(10050) 위에도 떠야 합니다 */
    width: 680px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 16px);
    overflow: auto;
    background: #fff;
    border: 1px solid #ccd3dc;
    border-radius: 3px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

.ai-shape-top {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f5;
}

.ai-shape-top b { font-size: 16px; color: #34495e; }

.ai-shape-x {
    float: right;
    border: 0;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: var(--ai-text-muted, #526579);
    padding: 0 2px;
}

.ai-shape-x:hover { color: #5c6873; }

/* 맞는 모양과 틀린 모양을 나란히. 틀린 쪽을 같이 봐야 자기가 한 것이
   어느 쪽인지 압니다. */
.ai-shape-two {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.ai-shape-half {
    display: table-cell;
    vertical-align: top;
    padding: 12px 14px 14px;
}

.ai-shape-half.is-bad { border-left: 1px solid #eef1f5; }

.ai-shape-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: .02em;
}

.ai-shape-half.is-good .ai-shape-label { color: var(--ai-text-accent, #24727a); }
.ai-shape-half.is-bad  .ai-shape-label { color: #c9434c; }

.ai-tree {
    font-family: Consolas, "D2Coding", monospace;
    font-size: 14px;
    line-height: 1.85;
    white-space: nowrap;
}

.ai-tree-root {
    color: #34495e;
    font-weight: bold;
    margin-bottom: 1px;
}

.ai-tree-root:before {
    content: "\1F4E6";        /* 상자 */
    margin-right: 5px;
}

.ai-tree-row { color: #34495e; }

/* code/ 에 없는 것은 흐리게. 번들 안에만 있을 수도 있어서 빨강은 안 씁니다. */
.ai-tree-row.is-faint { color: var(--ai-text-muted, #526579); }
.ai-tree-row.is-bad   { color: #c9434c; }

.ai-tree-edge { color: #b6bec8; margin-right: 3px; }
.ai-tree-pad  { display: inline-block; width: 18px; }

.ai-tree-name:before {
    content: "\1F4C4";        /* 종이 */
    margin-right: 4px;
}

/* 폴더로 끝나는 줄은 폴더 그림으로. */
.ai-tree-row.is-bad .ai-tree-name:first-letter { font-weight: bold; }

/* 긴 파일명·경로도 생략하지 않습니다. 좁은 화면에서는 줄을 바꿉니다. */
.ai-tree-row {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* 꼭 봐야 하는 한 마디만. 나머지 설명은 줄에 마우스를 올리면 나옵니다. */
.ai-tree-mark {
    font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
    font-size: 14px;
    color: var(--ai-text-muted, #526579);
    margin-left: 7px;
    padding: 0 5px;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    white-space: nowrap;
}

.ai-tree-row.is-bad .ai-tree-mark { border-color: #f2d3d5; color: #c9434c; }

/* 폴더는 폴더 그림으로. 이것이 틀린 모양의 핵심이라 눈에 띄어야 합니다. */
.ai-tree-row.is-folder .ai-tree-name:before {
    content: "\1F4C1";
}

.ai-shape-why-bad {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #c9434c;
}

.ai-shape-tip {
    padding: 10px 14px 12px;
    border-top: 1px solid #eef1f5;
    background: #fbfcfd;
    font-size: 14px;
    line-height: 1.75;
    color: #5c6873;
}

/* ------------------------------------------------------- 모르는 파일 안내 */

/* 표 칸에 문장으로 적어 놨더니 읽어도 할 일이 안 보였습니다. 갈래를 나눠
   보여 주는 자리입니다. */

.ai-shape-pop.is-guide { width: 560px; }

.ai-guide-body { padding: 12px 16px 16px; }

.ai-guide-what {
    font-size: 14px;
    line-height: 1.75;
    color: #5c6873;
    margin: 0 0 10px;
}

.ai-guide-where {
    font-size: 14px;
    color: var(--ai-text-muted, #526579);
    margin-bottom: 14px;
}

.ai-guide-where span { margin-right: 8px; }
.ai-guide-where code {
    font-size: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.ai-guide-where i { font-style: normal; margin-left: 8px; }

.ai-guide-h {
    font-size: 14px;
    font-weight: bold;
    color: #34495e;
    margin: 14px 0 7px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eef1f5;
}

/* 어디서 쓰이나 - 두 줄. 되는 것과 안 되는 것이 한눈에 갈려야 합니다. */
.ai-guide-use {
    font-size: 14px;
    line-height: 1.7;
    color: #5c6873;
    padding: 5px 0;
}

.ai-guide-at {
    display: inline-block;
    width: 48px;
    font-weight: bold;
    color: #34495e;
}

.ai-guide-mark {
    display: inline-block;
    width: 64px;
    font-size: 14px;
}

.ai-guide-use.is-yes .ai-guide-mark { color: var(--ai-text-accent, #24727a); }
.ai-guide-use.is-no  .ai-guide-mark { color: #c9434c; }

.ai-guide-say {
    display: block;
    margin-left: 112px;
    margin-top: -20px;
    font-size: 14px;
    color: var(--ai-text-muted, #526579);
    line-height: 1.7;
}

/* 무엇을 하면 되나 - 갈래마다 조건과 할 일. */
.ai-guide-step {
    position: relative;
    padding: 7px 0 7px 26px;
    border-top: 1px solid #f3f5f8;
}

.ai-guide-step:first-of-type { border-top: 0; }

.ai-guide-no {
    position: absolute;
    left: 0;
    top: 8px;
    width: 17px;
    height: 17px;
    line-height: 17px;
    text-align: center;
    border-radius: 50%;
    background: #eef1f5;
    color: #5c6873;
    font-size: 12px;
}

.ai-guide-if {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #34495e;
}

.ai-guide-then {
    display: block;
    font-size: 14px;
    line-height: 1.75;
    color: var(--ai-text-muted, #526579);
    margin-top: 2px;
}

#ai-asset-modal .ai-asset-close,
#ai-new-modal .ai-design-close,
.ai-readable-dialog .bootbox-close-button {
    width: 32px;
    height: 32px;
    margin-top: -6px;
    background: none;
    font-size: 28px;
    line-height: 28px;
    opacity: .75;
}

#ai-asset-modal .ai-asset-close:focus,
#ai-new-modal .ai-design-close:focus,
.ai-readable-dialog .bootbox-close-button:focus {
    outline: 2px solid #337ab7;
    outline-offset: 2px;
    opacity: 1;
}

/* 생성 편집기는 좁은 화면에서 항목별로 배치합니다. 일반 조회 표는 유지합니다. */
@media (max-width: 767px) {
    .ai-rows.ai-rows-editor, .ai-rows.ai-rows-editor tbody,
    .ai-rows.ai-rows-editor tr, .ai-rows.ai-rows-editor td { display: block; width: 100%; min-width: 0; white-space: normal; }
    .ai-rows.ai-rows-editor thead { display: none; }
    .ai-rows.ai-rows-editor tr[data-row] { margin-bottom: 12px; padding: 10px; border: 1px solid #e7ecf1; }
    .ai-rows.ai-rows-editor td { padding: 4px 0; }
    .ai-rows.ai-rows-editor td[data-label]::before {
        content: attr(data-label); display: block; margin-bottom: 4px;
        color: #5b6b7b; font-weight: 600; white-space: normal; overflow-wrap: anywhere;
    }
    .ai-rows.ai-rows-editor td:last-child { text-align: right; }
    .ai-rows.ai-rows-editor .form-control { width: 100%; }
}

/* 같은 모델·버전의 탐색 경로와 단계 이동을 작업 영역 가까이에 둡니다. */
.ai-service-flow { background: #f6f9fc; border: 1px solid #d7e1eb; border-radius: 6px; padding: 16px; }
.ai-service-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.ai-service-nav .ai-flow-link { display: block; padding: 12px; border: 1px solid #cfdae5; border-radius: 4px; background: #fff; color: #254b6b; text-decoration: none; overflow-wrap: anywhere; }
.ai-service-nav .ai-flow-link b { display: block; color: inherit; margin: 0 0 4px; font-size: 15px; }
.ai-service-nav .ai-flow-link span { display: block; margin: 0; color: #526579; font-size: 14px; }
.ai-service-nav .ai-flow-link[aria-current="page"] { border: 2px solid #21618c; padding: 11px; background: #edf5fc; }
.ai-service-nav a:hover { background: #edf5fc; border-color: #21618c; }
.ai-service-nav a:focus-visible, .ai-step-jump:focus-visible { outline: 2px solid #21618c; outline-offset: 2px; }
.ai-context-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 900px; padding: 14px 0; }
.ai-context-picker > div { min-width: 0; }
.ai-context-picker label { display: block; margin-bottom: 6px; font-weight: 600; }
.ai-context-picker .form-control { width: 100%; }
.ai-step-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 8px; margin: 0 0 18px; }
.ai-step-jump { padding: 10px 12px; border: 1px solid #cfdae5; border-radius: 4px; background: #fff; color: #254b6b; text-align: left; line-height: 1.6; overflow-wrap: anywhere; }
.ai-step-jump b, .ai-step-jump span { display: block; }
.ai-step-jump span { color: #526579; font-size: 14px; }
.ai-step-jump[aria-current="step"] { border-color: #21618c; background: #edf5fc; box-shadow: inset 0 -2px #21618c; }
.ai-step { scroll-margin-top: 90px; }
.ai-step-head { scroll-margin-top: 90px; flex-wrap: wrap; }
.ai-step-head .ai-state { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .ai-service-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
    .ai-context-picker { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .ai-step-body { padding-left: 16px; }
    .ai-step-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    .ai-service-nav { grid-template-columns: minmax(0, 1fr); }
    .ai-step-nav { grid-template-columns: minmax(0, 1fr); }
}

/* 자산 편집은 긴 관리 정보와 실제 입력을 본문에, 닫기와 진행을 고정 발치에 둡니다. */
#ai-asset-modal .modal-title { padding-right: 44px; }
#ai-asset-modal .modal-body { min-height: 0; }
.ai-asset-context { margin: 10px 0 14px; }
.ai-asset-context .btn { margin: 4px 6px 4px 0; }
#ai-asset-modal .modal-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#ai-asset-modal .modal-footer .btn { margin: 0; }
#ai-asset-acts { display: contents; }
#ai-asset-trash { margin-right: auto !important; }
#ai-asset-copy-help { flex: 0 0 100%; }
@media (max-width: 767px) {
    #ai-asset-modal .modal-footer .btn { flex: 1 1 140px; }
    #ai-asset-modal .ai-asset-close { width: 44px; height: 44px; line-height: 44px; margin-top: -10px; }
}

.ai-asset-refresh { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

/* 템플릿 선택과 실행 버튼은 각각 필요한 폭을 확보하고 좁으면 다음 줄로 이동합니다. */
#ai-new-modal .ai-preset-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
#ai-new-modal .ai-preset-controls > select { flex: 1 1 320px; width: auto; min-width: 0; max-width: 100%; }
#ai-new-modal .ai-preset-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: 8px; max-width: 100%; }
#ai-new-modal .ai-preset-actions .btn { flex: 0 1 auto; margin: 0; max-width: 100%; word-break: keep-all; }
@media (max-width: 767px) {
    #ai-new-modal .ai-preset-controls > select { flex-basis: 100%; width: 100%; }
    #ai-new-modal .ai-preset-actions { flex: 1 1 100%; }
    #ai-new-modal .ai-preset-actions .btn { flex: 1 1 140px; }
}
