/* 엑셀 리본 뚝딱 — 「AI로 만들기」 칸(2026-11-12 운영자: 시안 1판 「판 1: 가 · 판 2: ㄴ · 얹기형으로 합니다」)
 * 편집 화면은 그대로 두고 오른쪽에 [AI로 만들기 | 속성] 칸을 얹는다 — 템플릿이 body 에 erbai-root 를 붙였을 때만 먹는다. 줄인 화면(erb-simple.css) 위에 실린다.
 * 채팅 값 = AI 질문 화면(ask.css) 결: 내 말 = 회색 면 말풍선 12 · AI 답 = 그릇 없는 글 · 단추 42/6 · 묶음 칸 8 · 입력 = 회색 면 8.
 * 규칙 예외(.claude/rules/css.md 「엑셀 리본 뚝딱」 줄 — 운영자가 참고 화면(Claude in Chrome 「Claude is working here」)을 보이고 「ㄴ」으로 고름):
 *   만드는 동안 작업판 둘레의 번지는 초록 빛(.erbai-fx-ring) · 위에 매달린 알약(.erbai-fx-pill) · 초록 커서와 눌림 물결(.erbai-cur · .erbai-rip) · 커서가 움직이는 연출.
 *   만드는 동안에만 한 번 — 움직임 줄이기면 연출 없이 바로 완성한다(js/erb-ai.js).
 *   + 11/16 대표 「자주쓰는 기능을 클릭하면 위로 올라가도록」(직접 요청): 가이드에서 누른 칩이 할 일 줄로 옮겨 가는 0.32초 한 번(.erbai-fly · 움직임 줄이기면 끈다)
 *   + 11/16 밤 대표 「입력창 클릭하면 … 가이드 버튼이 부드럽게 SLIDE UP 되면서 사라지고 · 바깥 쪽 클릭하면 SLIDE DOWN 되면서 다시 보임」(직접 요청):
 *     처음 화면 가이드 단추가 위로 16 · 0.25초 사라지고 아래로 다시(.erbai.is-typing · 누를 때마다 한 번 · 움직임 줄이기면 바로)
 */
body.erbai-root {
	--erbai-w: 380px;
	--erbai-fx: var(--brand-action);
	--erbai-fx-glow: color-mix(in srgb, var(--brand-action) 45%, transparent);
}

body.erbai-root .canvas-area { position: relative; }
/* 「만드는 중」 알약 자리(38)는 만드는 동안에만 낸다 — 평소엔 가운데 판도 위 16 에서 시작한다 */
body.erbai-root .canvas { transition: padding-top .25s ease; }
body.erbai-busy .canvas { padding-top: 54px; }

/* ── 오른쪽 칸 ── */
.erbai-col { display: flex; flex-direction: column; flex: none; width: var(--erbai-w); min-height: 0; border-left: 1px solid var(--gray-200); background: var(--surface-white); font-family: var(--erbs-font); }
.erbai-h { display: flex; align-items: flex-end; justify-content: space-between; flex: none; gap: 12px; height: 57px; padding: 0 16px 2px; }
.erbai-seg { display: inline-flex; padding: 2px; border-radius: 6px; background: var(--gray-100); }
.erbai-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 13px; font-weight: 500; color: var(--gray-900); cursor: pointer; }
.erbai-seg button[aria-pressed="true"] { background: var(--surface-white); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }

/* 새 채팅 — 머리 줄 오른쪽(대화가 생긴 뒤에만 · 속성 칸에서는 숨김). 누르면 아래 확인 줄이 뜬다(만든 것이 있을 때) */
.erbai-new { display: inline-flex; align-items: center; gap: 5px; height: 30px; margin-bottom: 2px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 13px; font-weight: 500; line-height: 1; color: var(--gray-600); white-space: nowrap; cursor: pointer; }
.erbai-new:hover { background: var(--gray-100); color: var(--gray-900); }
.erbai-new[disabled] { background: transparent; color: var(--gray-400); cursor: default; }
.erbai-new svg { width: 15px; height: 15px; }
.erbai-new[hidden],
.erbai-col.is-props .erbai-new { display: none; }
.erbai-reset { display: flex; align-items: center; flex: none; gap: 6px; margin: 4px 16px 6px; padding: 6px 6px 6px 14px; border-radius: 8px; background: var(--gray-100); font-size: 13px; line-height: 1.5; color: var(--gray-900); }
.erbai-reset[hidden] { display: none; }
.erbai-reset > span { flex: 1; min-width: 0; }
.erbai-reset .erbai-btn:not(.erbai-btn--go) { background: var(--surface-white); }
.erbai-reset .erbai-btn:not(.erbai-btn--go):hover { background: var(--gray-50); }

.erbai { display: flex; flex: 1; flex-direction: column; min-height: 0; font-size: 15px; line-height: 1.6; color: var(--gray-900); word-break: keep-all; }

/* 속성 칸은 이 칸 안으로 들어온다 */
body.erbai-root .erbai-col #propsPanel { flex: 1; width: 100%; min-height: 0; border-left: 0; }
.erbai-col:not(.is-props) #propsPanel { display: none; }
.erbai-col.is-props .erbai { display: none; }
body.erbai-root #propsResizer { display: none; }
body.erbai-root .erbai-col .props-header { min-height: 0; padding: 0 12px; }

.erbai-log { display: flex; flex: 1; flex-direction: column; gap: 14px; min-height: 0; padding: 6px 16px 16px; overflow-y: auto; }
.erbai-log > * { flex: none; }
.erbai-empty { margin: auto 0; padding: 0 4px; font-size: 14px; line-height: 1.6; color: var(--gray-500); text-align: center; }
.erbai-hint,
.erbai-reading { margin: 0; }

/* 새 대화의 처음 화면 — 준비해 둔 코드가 있는지 먼저 묻는다(2026-11-13 운영자 「항상 새 대화를 시작하기 전 … 물음」). 답하기 전에는 요청 칸이 없다.
   어느 것이 보일지는 .erbai 의 data-stage 가 정한다: start(물음) · read(파일의 매크로를 읽는 중) · paste(코드를 붙여 넣는 입력창) · chat(대화) */
.erbai-start,
.erbai-reading { display: none; }
.erbai[data-stage="start"] .erbai-start,
.erbai[data-stage="read"] .erbai-reading { display: block; }
.erbai[data-stage="start"] .erbai-hint,
.erbai[data-stage="read"] .erbai-hint,
.erbai[data-stage="start"] .erbai-comp,
.erbai[data-stage="read"] .erbai-comp,
.erbai[data-stage="paste"] .erbai-comp,
.erbai[data-stage="paste"] .erbai-log { display: none; }
.erbai-start-q { margin: 0 0 14px; font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--gray-900); }
.erbai-start-opts { display: flex; flex-direction: column; gap: 8px; max-width: 260px; margin: 0 auto; }
.erbai-start-opts .erbai-btn { width: 100%; font-weight: 500; }
.erbai-start-msg { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--gray-700); }

/* 일반 회원 주 1회(2026-11-23 대표 「멤버십 회원만 제공, 일반 회원은 주 1회」) — 이번 주 한 번을 다 쓴 때의 잠금 칸(stage lock · 처음 물음 칸과 같은 짜임).
   대화가 비었으면 가운데, 대화 중이면 맨 아래에 놓인다(erb-ai.js wkPaint) · 그동안 입력줄 · 가이드 단추는 걷는다(끌어 놓아 직접 만드는 것은 그대로) */
.erbai-wklock { display: none; }
.erbai[data-stage="lock"] .erbai-wklock { display: block; }
.erbai-log > .erbai-wklock { padding: 8px 4px 4px; text-align: center; }
.erbai[data-stage="lock"] .erbai-hint,
.erbai[data-stage="lock"] .erbai-guide-go,
.erbai[data-stage="lock"] .erbai-chips,
.erbai[data-stage="lock"] .erbai-own,
.erbai[data-stage="lock"] .erbai-tg,
.erbai[data-stage="lock"] .erbai-in { display: none; }
.erbai-wklock-msg { margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--gray-700); }
.erbai-wklock .aiq-recheck { display: contents; } /* 멤버십 단추 칸의 [다시 확인] 폼 — 단추만 줄에 선다 */
.erbai-wklock a.erbai-btn,
.erbai-wklock a.erbai-btn:hover { text-decoration: none; color: var(--gray-900); } /* 링크 단추 — 테마의 a:hover 색이 새지 않게 */
.erbai-wklock a.erbai-btn--go,
.erbai-wklock a.erbai-btn--go:hover { color: var(--surface-white); }

/* 코드를 붙여 넣는 입력창 — 긴 코드도 되게 칸을 가득 쓴다 */
.erbai-paste { display: none; flex: 1; flex-direction: column; gap: 8px; min-height: 0; padding: 6px 16px 14px; }
.erbai[data-stage="paste"] .erbai-paste { display: flex; }
.erbai-paste textarea { flex: 1; width: 100%; min-height: 0; padding: 12px 14px; border: 0; border-radius: 8px; background: var(--gray-100); font: 12.5px/1.6 Consolas, 'D2Coding', monospace; color: var(--gray-900); white-space: pre; overflow: auto; resize: none; outline: 0; box-shadow: none; tab-size: 4; }
.erbai-paste textarea:focus { background: var(--surface-white); outline: 2px solid var(--primary); }
.erbai-paste textarea::placeholder { font-family: var(--erbs-font); font-size: 14px; color: var(--gray-400); }
.erbai-paste-msg { margin: 0; font-size: 13px; line-height: 1.5; color: var(--color-danger-text); }
.erbai-paste-foot { display: flex; align-items: center; flex: none; gap: 6px; }
.erbai-paste-n { flex: 1; min-width: 0; font-size: 13px; color: var(--gray-500); }

/* 묻는 칸 — AI 가 만들기 전에 물었을 때. 고를 것은 눌러 켜고 끈다(켜짐 = 연한 초록 면 + 초록 글자 + 안쪽 선) */
.erbai-ask { display: flex; flex-direction: column; gap: 14px; }
.erbai-q { min-width: 0; margin: 0; padding: 0; border: 0; }
.erbai-q legend { margin: 0 0 8px; padding: 0; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--gray-900); }
.erbai-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.erbai-opt { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 6px; background: var(--gray-100); font: inherit; font-family: var(--erbs-font); font-size: 13px; line-height: 1.4; color: var(--gray-900); text-align: left; cursor: pointer; }
.erbai-opt:hover { background: var(--gray-200); }
.erbai-opt[aria-pressed="true"],
.erbai-opt[aria-pressed="true"]:hover { background: var(--primary-50); color: var(--primary-700); box-shadow: inset 0 0 0 1.5px var(--primary); }
.erbai-ask.is-done .erbai-opt { cursor: default; }
.erbai-ask.is-done .erbai-opt:not([aria-pressed="true"]) { background: var(--gray-50); color: var(--gray-400); }
.erbai-ask-go { align-self: flex-start; }
/* 기능마다 묶은 물음(11/17 대표 「기능이 여러개일 경우, 기능마다 그룹으로 나눠서 물어봅니다」) — 묶음 사이는 간격만(선 · 바탕 없음), 굵은 글씨는 묶음 머리(기능 이름) 하나 */
.erbai-ask.is-grouped { gap: 24px; }
.erbai-qg { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.erbai-qg-h { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--gray-900); }
.erbai-qg:not(.erbai-qg--lead) .erbai-q legend { margin-bottom: 6px; font-size: 13px; font-weight: 400; color: var(--gray-700); }
/* 기능마다 한 번씩 나눠 묻는 칸(11/17 대표 「질문 (1/6), (2/6),.. 이렇게 나눠서」) — 머리 = 「질문 (n/전체)」(회색) + 기능 이름 · 물음은 묶음 안 물음과 같은 결 */
.erbai-qn { margin-right: 8px; color: var(--gray-500); }
.erbai-ask.is-paged .erbai-q legend { margin-bottom: 6px; font-size: 13px; font-weight: 400; color: var(--gray-700); }
.erbai-ask.is-done .erbai-ask-go { display: none; }
.erbai-me { align-self: flex-end; max-width: 88%; padding: 9px 14px; border-radius: 12px; background: var(--gray-100); white-space: pre-wrap; overflow-wrap: anywhere; }
.erbai-ai { white-space: pre-wrap; overflow-wrap: anywhere; }
.erbai-err { color: var(--color-danger-text); }

.erbai-dots { display: inline-flex; align-items: center; gap: 4px; height: 24px; }
.erbai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-400); animation: erbai-dot 1s ease-in-out infinite; }
.erbai-dots i:nth-child(2) { animation-delay: .15s; }
.erbai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes erbai-dot { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }

.erbai-steps { display: flex; flex-direction: column; gap: 4px; margin: -4px 0 0; padding: 0; list-style: none; }
.erbai-step { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 20px; color: var(--gray-500); }
.erbai-step svg { width: 14px; height: 14px; margin-top: 3px; color: var(--gray-400); }
.erbai-step.is-now { color: var(--gray-900); }
.erbai-step.is-now svg { animation: erbai-spin .8s linear infinite; }
.erbai-step.is-done svg { color: var(--color-success); }
.erbai-step.is-bad svg { color: var(--color-danger); } /* 넣지 않은 매크로 · 끝까지 받지 못한 매크로 */
@keyframes erbai-spin { to { transform: rotate(360deg); } }

.erbai-code { max-height: 126px; margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--gray-100); font: 12px/1.6 Consolas, 'D2Coding', monospace; color: var(--gray-700); white-space: pre; overflow: hidden; }

.erbai-done { display: flex; flex-direction: column; gap: 10px; }
.erbai-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; border: 0; border-radius: 6px; background: var(--gray-100); font: inherit; font-family: var(--erbs-font); font-size: 14px; font-weight: 600; line-height: 1; color: var(--gray-900); white-space: nowrap; cursor: pointer; }
.erbai-btn:hover { background: var(--gray-200); }
.erbai-btn svg { width: 16px; height: 16px; }
.erbai-btn--go { background: var(--brand-action); color: var(--surface-white); }
.erbai-btn--go:hover { background: var(--brand-hover); }
.erbai-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.erbai-btn[disabled] { background: var(--gray-200); color: var(--gray-500); cursor: default; }
.erbai-btn:focus-visible,
.erbai-new:focus-visible,
.erbai-seg button:focus-visible,
.erbai-chip:focus-visible,
.erbai-opt:focus-visible,
.erbai-own-b:focus-visible,
.erbai-own-x:focus-visible,
.erbai-codebtn:focus-visible,
.erbai-send:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 만드는 동안 — 진행 줄 */
.erbai-run { display: flex; align-items: center; justify-content: space-between; flex: none; gap: 8px; margin: 0 16px; padding: 6px 6px 6px 14px; border-radius: 8px; background: var(--gray-100); font-size: 13px; color: var(--gray-900); }
.erbai-run .erbai-btn--sm { background: var(--surface-white); }
.erbai-run .erbai-btn--sm:hover { background: var(--gray-50); }
.erbai-run[hidden] { display: none; }

/* 입력 */
.erbai-comp { display: flex; flex: none; flex-direction: column; gap: 8px; padding: 10px 16px 14px; }
.erbai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.erbai-chips[hidden] { display: none; }
.erbai-chip { height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--gray-100); font: inherit; font-family: var(--erbs-font); font-size: 13px; color: var(--gray-900); cursor: pointer; }
.erbai-chip:hover { background: var(--gray-200); }
/* 준비된 코드 — 붙어 있으면 요청 칸 위에 한 줄(× = 빼기), 없으면 요청 칸 왼쪽의 [코드 넣기] */
.erbai-own { display: flex; align-items: center; align-self: flex-start; max-width: 100%; height: 32px; border-radius: 6px; background: var(--gray-100); }
.erbai-own[hidden],
.erbai-codebtn[hidden] { display: none; }
.erbai-own-b { display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 32px; padding: 0 4px 0 10px; border: 0; border-radius: 6px 0 0 6px; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 13px; font-weight: 500; line-height: 1; color: var(--gray-900); cursor: pointer; }
.erbai-own-b[disabled] { cursor: default; }
.erbai-own-b:not([disabled]):hover { background: var(--gray-200); }
.erbai-own-b svg { flex: none; width: 15px; height: 15px; color: var(--primary-700); }
.erbai-own-b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erbai-own-x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 32px; padding: 0; border: 0; border-radius: 0 6px 6px 0; background: transparent; color: var(--gray-500); cursor: pointer; }
.erbai-own-x:hover { background: var(--gray-200); color: var(--gray-900); }
.erbai-own-x svg { width: 14px; height: 14px; }
.erbai-codebtn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; margin-left: -6px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--gray-500); cursor: pointer; }
.erbai-codebtn:hover { background: var(--gray-200); color: var(--gray-900); }
.erbai-codebtn svg { width: 18px; height: 18px; }
.erbai-in { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 8px; background: var(--gray-100); }
.erbai-in:focus-within { background: var(--surface-white); outline: 2px solid var(--primary); }
.erbai-in textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 140px; padding: 7px 0; border: 0; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 15px; line-height: 22px; color: var(--gray-900); resize: none; outline: 0; box-shadow: none; }
.erbai-in textarea::placeholder { color: var(--gray-400); }
.erbai-send { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; background: var(--brand-action); color: var(--surface-white); cursor: pointer; }
.erbai-send svg { width: 18px; height: 18px; }
.erbai-send[disabled] { background: var(--gray-200); color: var(--gray-500); cursor: default; }
.erbai-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--gray-500); }
.erbai-week { margin: 0 0 2px; font-size: 12px; line-height: 1.5; color: var(--gray-700); } /* 일반 회원 주 1회 — 이번 주 상태 한 줄(11/23 · 아래 고지 줄보다 한 단 진하게) */

/* ── 일하는 표시(ㄴ) — 번지는 테두리 · 매달린 알약 ── */
.erbai-fx { position: absolute; inset: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.erbai-fx.is-on { pointer-events: auto; opacity: 1; } /* 만드는 동안엔 작업판을 누르지 못하게 */
.erbai-fx-ring { position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--erbai-fx), inset 0 0 34px 4px var(--erbai-fx-glow); }
.erbai-fx-pill { position: absolute; top: 0; left: 50%; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 18px 2px; border-radius: 0 0 14px 14px; background: var(--erbai-fx); font-family: var(--erbs-font); font-size: 14px; font-weight: 700; color: var(--surface-white); white-space: nowrap; transform: translateX(-50%); }
.erbai-fx-pill svg { width: 15px; height: 15px; }
body.erbai-busy .palette,
body.erbai-busy .file-info-bar .fi-btn,
body.erbai-busy .erbai-seg { pointer-events: none; }

/* 커서 · 눌림 물결 · 끌려오는 조각 */
.erbai-cur { position: fixed; top: 0; left: 0; z-index: 2147483000; pointer-events: none; transition: transform .5s cubic-bezier(.3, .7, .2, 1); will-change: transform; }
.erbai-cur[hidden],
.erbai-ghost[hidden] { display: none; }
.erbai-cur svg { display: block; width: 26px; height: 26px; margin: -4px 0 0 -4px; fill: var(--erbai-fx); stroke: var(--surface-white); stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); transition: transform .1s ease; }
.erbai-cur.is-down svg { transform: scale(.86); }
.erbai-rip { position: fixed; z-index: 2147482999; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--erbai-fx); opacity: .45; pointer-events: none; animation: erbai-rip .38s ease-out forwards; }
@keyframes erbai-rip { to { transform: scale(3.4); opacity: 0; } }
.erbai-ghost { position: fixed; top: 0; left: 0; z-index: 2147482998; padding: 5px 10px; border-radius: 4px; background: var(--surface-white); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); font-family: var(--erbs-font); font-size: 12px; color: var(--gray-900); pointer-events: none; transition: transform .5s cubic-bezier(.3, .7, .2, 1); }
.erbai-hot { outline: 2px solid var(--erbai-fx); outline-offset: 1px; }
.erbai-pop { animation: erbai-pop .26s ease-out; }
@keyframes erbai-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ── 손님 — [AI로 만들기] 단추만 보인다(js/erb-ai-guest.js · 2026-11-13 운영자 「손님에게도 ai 만들기 버튼 표시 · 로그인 후 사용 가능하도록 제한」).
   누르면 로그인 안내가 뜨고 칸은 늘 「속성」이다. 칸 너비는 손님 화면의 속성 칸(300) 그대로 · 머리 줄 · 고르기 단추는 회원 것 그대로 ── */
body.erbai-guest { --erbai-w: 300px; }
.erbai-seg button[data-lock] { display: inline-flex; align-items: center; gap: 5px; }
.erbai-seg button[data-lock] .erbs-ic { width: 12px; height: 12px; color: var(--gray-500); }

/* ── 새 판(2026-11-15 대표 — 11/16 관리자 → 회원에게 · js/erb-ai.js 「가이드 따라 만들기」) ──
   값은 이 칸의 부품 그대로: 회색 면 칸 · 단추 6 · 칸 8 · 글자 13–14 · 채운 초록 단추는 [다음] · [이대로 만들기] 하나씩. 안내 글은 대표가 적은 단추 글 두 줄뿐 */
.erbai-guide-go { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 300px; margin: 20px auto 0; padding: 13px 12px 13px 16px; border: 0; border-radius: 8px; background: var(--gray-100); font: inherit; font-family: var(--erbs-font); color: var(--gray-900); text-align: left; cursor: pointer; }
.erbai-guide-go:hover { background: var(--gray-200); }
.erbai-guide-go[hidden],
.erbai[data-stage="read"] .erbai-guide-go { display: none; }
.erbai-guide-go > svg:first-child { width: 20px; height: 20px; color: var(--primary); }
.erbai-guide-go > svg:last-child { width: 16px; height: 16px; margin-left: auto; color: var(--gray-400); }
.erbai-guide-go small { display: block; font-size: 12.5px; line-height: 1.45; color: var(--gray-500); }
.erbai-guide-go b { display: block; font-size: 14px; font-weight: 600; line-height: 1.5; }
/* 처음 화면 — 입력창을 누르면 위로 사라지고(.erbai.is-typing — js/erb-ai.js typing) · 아무것도 없는 채로 바깥을 누르면 아래로 다시(11/16 밤 대표 · 머리 주석의 움직임 예외).
   자리는 그대로 둔다(위 안내 글이 들썩이지 않게) · 사라지는 쪽은 다 흐려진 뒤에 누를 수 없게(visibility 늦춤) */
.erbai-guide-go { transition: opacity .25s ease, transform .25s ease, visibility 0s linear 0s; }
.erbai.is-typing .erbai-guide-go { opacity: 0; transform: translateY(-16px); visibility: hidden; pointer-events: none; transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
.erbai-guide-go:focus-visible,
.erbai-g-add:focus-visible,
.erbai-g-x:focus-visible,
.erbai-pv-x:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.erbai-g { gap: 10px; }
.erbai-g-q { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--gray-900); }
.erbai-g-sub { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--gray-500); }
.erbai-g-rows { display: flex; flex-direction: column; gap: 6px; }
.erbai-g-row,
.erbai-g-field { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 4px 0 12px; border-radius: 6px; background: var(--gray-100); }
.erbai-g-row:focus-within,
.erbai-g-field:focus-within { background: var(--surface-white); outline: 2px solid var(--primary); }
.erbai-g .erbai-g-row input,
.erbai-g .erbai-g-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 14px; color: var(--gray-900); outline: 0; box-shadow: none; }
.erbai-g-row input::placeholder { color: var(--gray-400); }
.erbai-g-field span { flex: none; margin-right: 8px; font-size: 13px; color: var(--gray-500); }
.erbai-g-field input { font-weight: 600; }
.erbai-g-x,
.erbai-pv-x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--gray-400); cursor: pointer; }
.erbai-g-x:hover,
.erbai-pv-x:hover { background: var(--gray-200); color: var(--gray-900); }
.erbai-g-x svg,
.erbai-pv-x svg { width: 15px; height: 15px; }
.erbai-g-add { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; height: 32px; margin-top: -2px; padding: 0 10px 0 8px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; }
.erbai-g-add:hover { background: var(--primary-50); }
.erbai-g-add svg { width: 16px; height: 16px; }
.erbai-g-add[disabled] { background: transparent; color: var(--gray-400); cursor: default; }
.erbai-ask.is-done .erbai-g-row,
.erbai-ask.is-done .erbai-g-field { background: var(--gray-50); outline: 0; }
.erbai-ask.is-done .erbai-g-add,
.erbai-ask.is-done .erbai-g-x { display: none; }
/* 미리 보기 — 「이런 모습은 어떨까요?」 단추마다 그림 · 이름(눌러 고침) · 하는 일 · 빼기 */
.erbai-pv { display: flex; flex-direction: column; gap: 10px; }
.erbai-pv-list { display: flex; flex-direction: column; padding: 4px 0; border-radius: 8px; background: var(--gray-50); }
.erbai-pv-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 30px; align-items: center; gap: 1px 10px; padding: 8px 6px 8px 12px; }
.erbai-pv-ic { grid-row: 1 / 3; align-self: start; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 3px; overflow: hidden; }
.erbai-pv-ic > * { max-width: 24px; max-height: 24px; }
.erbai-pv .erbai-pv-nm { min-width: 0; width: 100%; height: 26px; margin-left: -4px; padding: 0 4px; border: 0; border-radius: 4px; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 14px; font-weight: 600; color: var(--gray-900); outline: 0; box-shadow: none; }
.erbai-pv .erbai-pv-nm:hover { background: var(--gray-100); }
.erbai-pv .erbai-pv-nm:focus { background: var(--surface-white); box-shadow: 0 0 0 2px var(--primary); } /* 테마의 input[type=text] 테두리보다 세게(둘째 클래스) */
.erbai-pv-x { grid-column: 3; grid-row: 1; }
.erbai-pv-ds { grid-column: 2 / 4; font-size: 12.5px; line-height: 1.5; color: var(--gray-500); }
.erbai-pv-ds:empty { display: none; }
.erbai-pv.is-done .erbai-pv-x,
.erbai-pv.is-done .erbai-ask-go { display: none; }
.erbai-pv.is-done .erbai-pv-nm { pointer-events: none; }
/* 미리 보기 줄의 [편집](2026-11-17 대표 「여기서 [편집] 아이콘 넣어서 수정사항 요청으로 넣어서 수정하도록」) — × 왼쪽에 같은 크기 · 같은 결로.
   Worker 가 고치기 작업을 낼 수 있는 판일 때만 줄에 놓인다(.erbai-pv--edit). 고른 줄은 단추가 눌린 모습이고, 고른 것은 입력창 위 줄(.erbai-tg)에 올라간다 */
.erbai-pv--edit .erbai-pv-row { grid-template-columns: 24px minmax(0, 1fr) 30px 30px; }
.erbai-pv-e { grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--gray-400); cursor: pointer; }
.erbai-pv-e:hover,
.erbai-pv-e[aria-pressed="true"] { background: var(--gray-200); color: var(--gray-900); }
.erbai-pv-e:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.erbai-pv-e svg { width: 15px; height: 15px; }
.erbai-pv--edit .erbai-pv-x { grid-column: 4; }
.erbai-pv--edit .erbai-pv-ds { grid-column: 2 / 5; }
.erbai-pv.is-done .erbai-pv-e { display: none; }
/* 고칠 것 — 입력창 위에 올라간 줄(준비된 코드 줄 .erbai-own 과 같은 결) */
.erbai-tg { display: flex; flex-wrap: wrap; gap: 6px; }
.erbai-tg[hidden] { display: none; }
.erbai-tg-c { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 32px; padding-left: 10px; border-radius: 6px; background: var(--gray-100); font-size: 13px; font-weight: 500; line-height: 1; color: var(--gray-900); }
.erbai-tg-c > svg { flex: none; width: 15px; height: 15px; color: var(--primary-700); }
.erbai-tg-c b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.erbai-tg-x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 32px; padding: 0; border: 0; border-radius: 0 6px 6px 0; background: transparent; color: var(--gray-500); cursor: pointer; }
.erbai-tg-x:hover { background: var(--gray-200); color: var(--gray-900); }
.erbai-tg-x:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.erbai-tg-x svg { width: 14px; height: 14px; }
/* 「어디에 둘까요?」 동안 가운데 리본에 얹는 점선 자리(모델은 그대로) */
#canvas .erbai-gtab { border: 1.5px dashed var(--primary); border-radius: 6px; color: var(--primary); cursor: default; }
#canvas .erbai-ggroup { display: flex; flex-shrink: 0; align-items: center; justify-content: center; min-width: 110px; min-height: 90px; border: 1.5px dashed var(--primary); border-radius: 4px; background: var(--primary-50); font-family: var(--erbs-font); font-size: 12px; font-weight: 600; color: var(--primary-700); }
#canvas.erbai-gnew .ribbon-groups > :not(.erbai-ggroup):not(.add-group-btn) { display: none; } /* 새 탭엔 아직 아무것도 없다 — 지금 탭의 그룹은 감춘다(그린 화면만) */

/* ── 11/16 대표 다섯 + 하나 ── */
/* ① 누른 칩이 할 일 줄로 올라가는 조각 — 칩과 같은 회색 면 · 0.32초 한 번(어디로 갔는지 보이는 움직임 · 움직임 줄이기면 없음 — js fly) · 올라간 칩은 숨고 다 올라간 묶음은 제목째 숨는다 */
.erbai-fly { position: fixed; z-index: 2147482990; display: flex; align-items: center; box-sizing: border-box; padding: 0 12px; overflow: hidden; border-radius: 6px; background: var(--gray-100); font-family: var(--erbs-font); font-size: 13px; line-height: 1.4; color: var(--gray-900); white-space: nowrap; pointer-events: none; }
.erbai-g-row.is-land > * { opacity: 0; }
.erbai-g .erbai-opt[hidden],
.erbai-g .erbai-opts[hidden],
.erbai-g .erbai-g-sub[hidden] { display: none; }
.erbai-g .erbai-opt[disabled]:not([aria-pressed]) { background: var(--gray-50); color: var(--gray-400); cursor: default; } /* 할 일 10줄이 다 찼다 */
/* ② 할 일 · 자리 물음과 AI 가 일하는 동안 아래 입력창을 숨긴다(js guideUi) · 가이드 오류 = [다시 보내기] [가이드 그만두기] 한 줄 */
.erbai.is-gquiet .erbai-comp { display: none; }
.erbai-gerr { display: flex; flex-wrap: wrap; gap: 6px; }
/* ③ 기존 탭 고르기 — 「탭 … 홈 ⌄」 한 줄(탭 이름 칸과 같은 회색 면 칸) */
.erbai-g-pick { position: relative; }
.erbai-g .erbai-g-pick select { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0 30px 0 0; border: 0; border-radius: 0; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 14px; font-weight: 600; color: var(--gray-900); outline: 0; box-shadow: none; appearance: none; -webkit-appearance: none; cursor: pointer; }
.erbai-g .erbai-g-pick select:disabled { opacity: 1; color: var(--gray-900); cursor: default; }
.erbai-g-pick > svg { position: absolute; top: 50%; right: 12px; width: 16px; height: 16px; margin-top: -8px; color: var(--gray-500); pointer-events: none; }
.erbai-ask.is-done .erbai-g-pick > svg { display: none; }
/* ④ 가이드 동안 왼쪽 요소 칸 · 가운데 리본 편집 판을 흐리게 잠근다 — 점선 자리 · 지금 탭 · 가이드가 지은 그룹(미리 보기)은 또렷이.
   덮개(.erbai-lock)가 누름 · 끌기를 막고 누르면 한 번 알린다(js) · 만드는 동안엔 일하는 표시(.erbai-fx)가 막으니 흐림을 걷는다 */
body.erbai-root .palette { position: relative; }
.erbai-lock { display: none; position: absolute; inset: 0; z-index: 30; cursor: not-allowed; }
body.erbai-glock:not(.erbai-busy) .erbai-lock { display: block; }
body.erbai-glock:not(.erbai-busy) .palette > :not(.erbai-lock),
body.erbai-glock:not(.erbai-busy) #canvas .ribbon-tab:not(.active):not(.erbai-gkeep),
body.erbai-glock:not(.erbai-busy) #canvas .add-tab-btn,
body.erbai-glock:not(.erbai-busy) #canvas .ribbon-groups > :not(.erbai-ggroup):not(.erbai-gkeep) { opacity: .35; }
/* ⑥ 속성 칸 — 단추가 실행할 매크로를 코드째 붙여 넣는 칸(이름 고르기 아래 · 붙여 넣는 칸과 같은 글꼴 · 회색 면 8) */
.erbai-pc { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.erbai-pc-foot { display: flex; align-items: center; gap: 8px; }
.erbai-pc-msg { flex: 1; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--color-danger-text); }
.erbai-pc-msg.is-ok { color: var(--color-success-text); }
.erbai-pc-foot .erbai-btn { flex: none; }
/* 코드 칸 위 줄 — [복사하기] · [크게 보기](11/16 밤 대표 「위에 복사하기 버튼 넣고, 크게 보기 버튼으로 팝업」) — 글자 단추(회색 · 마우스 올림 회색 면 6) */
.erbai-pc-bar { display: flex; justify-content: flex-end; gap: 2px; margin-bottom: -4px; }
.erbai-pc-act { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; font: inherit; font-family: var(--erbs-font); font-size: 12.5px; font-weight: 500; line-height: 1; color: var(--gray-600); white-space: nowrap; cursor: pointer; }
.erbai-pc-act:hover { background: var(--gray-100); color: var(--gray-900); }
.erbai-pc-act:disabled,
.erbai-pc-act:disabled:hover { background: transparent; color: var(--gray-400); cursor: default; }
.erbai-pc-act svg { width: 14px; height: 14px; }
.erbai-pc-act.is-done { color: var(--color-success-text); }
.erbai-pc-act:focus-visible,
.erbai-big-x:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
/* 색 입힌 코드 칸(js codeEd) — 색 입힌 글(pre)을 입력칸 바로 밑에 겹친다. ⚠️ 두 겹의 글꼴 · 크기 · 줄 높이 · 안쪽 여백 · 탭 너비 · 줄 바꿈은 꼭 같아야 한다(어긋나면 커서와 글자가 따로 논다) — 아래 한 줄에서 같이 정한다.
   글자 색(구분색 — 엑셀 VBA 편집기와 같은 갈래 · 브랜드 토큰에 잇지 않는다): 예약어 파랑 · 주석 초록 · 문자열 갈색 · 숫자 청록. 회색 100 · 흰 바탕에서 모두 4.5:1 이상 */
.erbai-ed { --erbai-syn-k: #0b4fbf; --erbai-syn-c: #2f7d32; --erbai-syn-s: #a3340f; --erbai-syn-n: #0f766e; position: relative; border-radius: 8px; background: var(--gray-100); }
.erbai-ed:focus-within { background: var(--surface-white); outline: 2px solid var(--primary); }
.erbai-ed .erbai-ed-hl,
.erbai-ed .erbai-ed-ta { box-sizing: border-box; margin: 0; padding: 10px 12px; border: 0; font: 12px/1.6 Consolas, 'D2Coding', monospace; letter-spacing: 0; white-space: pre; word-break: normal; overflow-wrap: normal; tab-size: 4; }
.erbai-ed .erbai-ed-hl { position: absolute; inset: 0; max-width: none; padding-right: 36px; padding-bottom: 36px; border-radius: 8px; background: transparent; color: var(--gray-900); overflow: hidden; pointer-events: none; } /* 오른쪽 · 아래 여백을 더 둔다 — 입력칸은 스크롤 막대만큼 더 밀리는데 그 끝까지 따라가게 */
.erbai-ed .erbai-ed-ta { position: relative; display: block; width: 100%; height: 180px; min-height: 96px; border-radius: 8px; background: transparent; color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--gray-900); overflow: auto; resize: vertical; outline: 0; box-shadow: none; }
.erbai-ed .erbai-ed-ta::selection { background: color-mix(in srgb, var(--brand-action) 24%, transparent); color: transparent; -webkit-text-fill-color: transparent; } /* 고른 자리 — 밑의 색 입힌 글이 비쳐 보이게 옅게 */
.erbai-ed .erbai-ed-ta::placeholder { font-family: var(--erbs-font); font-size: 13px; color: var(--gray-400); -webkit-text-fill-color: var(--gray-400); }
.erbai-syn-k { color: var(--erbai-syn-k); }
.erbai-syn-c { color: var(--erbai-syn-c); }
.erbai-syn-s { color: var(--erbai-syn-s); }
.erbai-syn-n { color: var(--erbai-syn-n); }
/* 크게 보기 창 — 도구의 다른 창(매크로 관리)과 같은 결: 어두운 바탕 40% · 흰 창 8 · 머리 16/600 · 아래 오른쪽 단추. 코드 칸은 창을 가득 채우고 글자는 14 로 키운다 */
.erbai-big-ov { position: fixed; z-index: 600; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .4); font-family: var(--erbs-font); }
.erbai-big-ov[hidden] { display: none; }
.erbai-big { display: flex; flex-direction: column; width: min(980px, 100%); height: min(760px, 100%); border-radius: 8px; background: var(--surface-white); box-shadow: 0 8px 32px rgba(0, 0, 0, .15); overflow: hidden; }
.erbai-big-h { display: flex; align-items: center; justify-content: space-between; flex: none; gap: 12px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--gray-200); }
.erbai-big-h h2 { min-width: 0; margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erbai-big-acts { display: flex; align-items: center; flex: none; gap: 4px; }
.erbai-big-x { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--gray-600); cursor: pointer; }
.erbai-big-x:hover { background: var(--gray-100); color: var(--gray-900); }
.erbai-big-x svg { width: 18px; height: 18px; }
.erbai-big-b { display: flex; flex: 1; min-height: 0; padding: 12px 16px; }
.erbai-big-b .erbai-ed { display: flex; flex: 1; min-width: 0; min-height: 0; }
.erbai-ed--big .erbai-ed-hl,
.erbai-ed--big .erbai-ed-ta { padding: 14px 16px; font-size: 14px; line-height: 1.7; }
.erbai-ed--big .erbai-ed-hl { padding-right: 40px; padding-bottom: 40px; }
.erbai-ed--big .erbai-ed-ta { flex: 1; height: auto; min-height: 0; resize: none; }
.erbai-big-f { display: flex; align-items: center; flex: none; gap: 8px; padding: 10px 16px 12px; border-top: 1px solid var(--gray-200); }
.erbai-big-f .erbai-btn { flex: none; }
@keyframes erbai-big-fade { from { opacity: 0; } }
@keyframes erbai-big-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.erbai-big-ov { animation: erbai-big-fade .18s ease; }
.erbai-big { animation: erbai-big-in .24s cubic-bezier(.2, .8, .2, 1); } /* 창이 열릴 때 한 번(정본 7.9 의 떠오름) — 움직임 줄이기면 없음(아래) */

@media (prefers-reduced-motion: reduce) {
	.erbai-cur, .erbai-ghost, .erbai-fx, body.erbai-root .canvas, .erbai-guide-go, .erbai.is-typing .erbai-guide-go { transition: none; }
	.erbai-rip, .erbai-pop, .erbai-big-ov, .erbai-big { animation: none; }
}
