/* Never flash unprocessed source text while the translation module starts.
   2026-10-05 Claude: …but never hide a message for long either — if the script is late or fails, the text shows after 1.2s anyway. */
[data-chat-translate]:not([data-translation-ready]){visibility:hidden;animation:pg-chat-reveal 0s linear 1.2s forwards}
@keyframes pg-chat-reveal{to{visibility:visible}}
.pg-chat-text{white-space:pre-wrap;overflow-wrap:anywhere;unicode-bidi:plaintext}
/* 2026-10-05 Claude (UI 공통 규칙: 파란 글자 버튼 금지): '원문 보기' is a small quiet grey button like the bubble copy button, with a press motion. */
.pg-chat-translation{display:flex;align-items:center;flex-wrap:wrap;gap:0 6px;margin:3px 0 0;max-width:100%;font-family:inherit;font-size:calc(11.5px * var(--pg-ts,1));line-height:1.45;color:#8a93a3}
.pg-chat-translation[hidden],.pg-chat-translation [hidden]{display:none!important}
.pg-chat-translation button{font:inherit;font-size:calc(11.5px * var(--pg-ts,1));line-height:1.3;padding:3px 7px;min-height:24px;width:auto;min-width:0;border:0;border-radius:8px;background:transparent;color:#6f7988;text-align:start;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .15s,color .15s,transform .12s}
.pg-chat-translation>button:first-child{margin-left:-7px}
/* In the line under the bubble: right after the time, pushing the copy button to the far end. */
:is(.room-message-foot,.dm-foot)>.pg-chat-translation{margin:0 auto 0 4px;flex-wrap:nowrap;min-width:0}
:is(.room-message-foot,.dm-foot)>.pg-chat-translation>button:first-child{margin-left:0}
:is(.room-message-foot,.dm-foot)>.pg-chat-translation button{margin-top:-4px;margin-bottom:-4px}   /* like the copy button: a 24px target that does not grow the line */
.pg-chat-translation button:hover{background:#eef1f6;color:#1f2329}
.pg-chat-translation button:active{transform:scale(.95)}
.pg-chat-translation button:focus-visible{outline:2px solid #4f6bff;outline-offset:1px}
.pg-chat-translation>span{font-size:calc(11.5px * var(--pg-ts,1));line-height:1.45}
.pg-chat-translation.is-waiting>span{animation:pg-chat-wait 1.2s ease-in-out infinite alternate}
@keyframes pg-chat-wait{from{opacity:.55}to{opacity:1}}
.dark .pg-chat-translation{color:#9aa6ba}.dark .pg-chat-translation button{color:#aab5c7}.dark .pg-chat-translation button:hover{background:#28324a;color:#e6ebf3}
@media(pointer:coarse){.pg-chat-translation button{min-height:30px}:is(.room-message-foot,.dm-foot)>.pg-chat-translation button{margin-top:-7px;margin-bottom:-7px}}
@media(prefers-reduced-motion:reduce){.pg-chat-translation,.pg-chat-translation.is-waiting>span{animation:none}.pg-chat-translation button{transition:none}}
