/* ---------- 문서 편집기 (co-doc) — 블록 · 서식 · 원격 캐럿 · AI 유령 문단 ---------- */
.doc-page{position:relative}
.co-blk{outline:none;min-height:1.4em;position:relative;transition:background .3s}
.co-blk.co-p{margin:0 0 12px}
.co-blk.co-h1{font-size:25px;font-weight:600;margin:0 0 6px;line-height:1.4}
.co-blk.co-h2{font-size:17.5px;font-weight:600;margin:26px 0 10px}
.co-blk.co-h3{font-size:15.5px;font-weight:600;margin:18px 0 8px}
.co-blk.co-meta{font-size:12.5px;color:#8A8A88;margin:0 0 18px}
.co-blk.co-li{margin:0 0 6px;padding-left:22px}
.co-blk.co-li::before{content:"•";position:absolute;left:6px;color:#8A8A88}
.co-blk.co-al-c{text-align:center}
.co-blk.co-al-r{text-align:right}
.co-blk mark{background:#FFF176;color:inherit;padding:0}
.co-blk .co-meta-pre{color:#8A8A88;user-select:none}
/* 다른 참여자 — 편집 중 왼쪽 색 바 · 원격 변경 flash */
.co-blk.co-peer-edit::after{content:"";position:absolute;left:-14px;top:2px;bottom:2px;width:3px;border-radius:2px;background:var(--c,#9C9C9A);animation:co-blink 1.1s ease-in-out infinite}
.co-blk.co-flash{animation:co-dflash 1.6s ease-out}
@keyframes co-dflash{0%{background:color-mix(in srgb,var(--c,#EE7732) 22%,#fff)}100%{background:transparent}}
/* 원격 캐럿 레이어(.doc-page 안, pointer-events:none) */
.co-doc-layer{position:absolute;inset:0;pointer-events:none;z-index:2}
.co-dcaret{position:absolute;width:2px;background:var(--c,#9C9C9A);border-radius:1px}
.co-dcaret.range{background:color-mix(in srgb,var(--c,#9C9C9A) 18%,transparent);border-left:2px solid var(--c,#9C9C9A)}
.co-dcaret i{position:absolute;left:-2px;top:-3px;width:6px;height:6px;border-radius:50%;background:var(--c,#9C9C9A)}
.co-dcaret span{position:absolute;left:-2px;top:-20px;background:var(--c,#9C9C9A);color:#fff;font-size:10.5px;font-weight:600;line-height:17px;padding:0 6px;border-radius:4px 4px 4px 0;white-space:nowrap;opacity:0;transition:opacity .15s}
.co-dcaret:hover span,.co-dcaret.fresh span{opacity:1}
/* AI — 유령 문단(요청자만) · 다른 탭의 제안 대상 문단 */
.co-ghost-blk{margin:-6px 0 14px;padding:8px 12px;border:1px dashed var(--brand);border-radius:8px;background:rgba(238,119,50,.07);font-size:13.5px;line-height:1.8;color:#3C3C3A;cursor:pointer;user-select:none}
.co-ghost-blk:hover{background:rgba(238,119,50,.13)}
.co-ghost-blk em{display:block;font-style:normal;font-size:10.5px;color:#B45816;font-weight:600;margin-bottom:2px}
.co-ghost-blk s{color:#B45816;opacity:.7}
.co-ghost-blk b{font-weight:600;color:#B45816;background:rgba(238,119,50,.14);border-radius:2px}
.co-ghost-blk.off{opacity:.45;text-decoration:line-through}
.co-ghost-blk.stale{border-color:#C2453A;background:rgba(194,69,58,.08)}
.co-blk.co-ai-remote{box-shadow:inset 3px 0 0 var(--brand),0 0 0 1px rgba(238,119,50,.35);border-radius:4px;cursor:pointer;background:rgba(238,119,50,.05)}
.co-blk.co-ai-remote.running{animation:co-pulse 1.1s ease-in-out infinite;--c:#EE7732}
.co-blk.co-ai-remote:not(.co-li)::before{content:attr(title);position:absolute;right:0;top:-18px;background:var(--brand);color:#fff;font-size:10.5px;font-weight:600;line-height:17px;padding:0 6px;border-radius:4px 4px 0 0;white-space:nowrap}
#rb-doc [data-co].on{background:#E4EEFA;color:#2B7CD3}
#rb-doc .style-card.on{background:#F1F1EF}
