/* Chat and composer rules copied from rooms agentlab.css (scoped under .pi-thread). Generated; do not edit by hand. */
.pi-thread .tool-output, .pi-thread .markdown-content { font-size: var(--fs); }
.pi-thread .markdown-content code, .pi-thread .tool-output pre, .pi-thread .tool-command { font-size: calc(var(--fs) * .95); }
.pi-thread .message-timestamp, .pi-thread .expand-hint, .pi-thread .opts { font-size: calc(var(--fs) * .85); }
.pi-thread .scroller { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.pi-thread .scroller > .log, .pi-thread .scroller > .chatlog { flex: 1; min-height: 0; }
.pi-thread .to-bottom { position: absolute; left: 50%; bottom: 12px; translate: -50% 0; z-index: 2; border: 1px solid var(--borderMuted); border-radius: 999px; background: var(--container-bg);
  color: var(--text); font: 12px system-ui, sans-serif; padding: 4px 12px; box-shadow: 0 2px 8px #0002; cursor: pointer; animation: pop .2s ease-out; }
.pi-thread .log { flex: 1; overflow-y: auto; padding: 24px 16px 64px 36px; display: flex; flex-direction: column; gap: 40px; }
.pi-thread .run-group { position: relative; display: flex; flex-direction: column; gap: 18px; }
.pi-thread .run-group::before { content: ''; position: absolute; left: -18px; top: -9px; bottom: -9px; border-left: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); opacity: 0; transition: opacity .2s; }
.pi-thread .run-group.live::before { bottom: 0; }
.pi-thread .user-message, .pi-thread .assistant-message, .pi-thread .tool-execution { position: relative; }
.pi-thread .tool-execution.streaming { background: var(--toolPendingBg); }
.pi-thread .mark { position: absolute; left: -21px; right: 0; top: -20px; height: 12px; display: flex; align-items: center; gap: 6px;
  font: calc(var(--fs) * .8)/1.2 ui-monospace, monospace; color: var(--dim); white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.pi-thread .mark::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--body-bg); }
.pi-thread .mark span { margin-left: 8px; }
.pi-thread .mark::after { content: ''; flex: 1; border-top: 1px dashed var(--borderMuted); }
.pi-thread .mark.run { color: var(--accent); }
.pi-thread .mark.run::before { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.pi-thread .mark.end { top: auto; bottom: -20px; }
.pi-thread .mark.end::after { display: none; }
.pi-thread .tab { position: absolute; top: 0; left: 0; padding: 0 8px; border-radius: 4px 0 6px 0; font: bold calc(var(--fs) * .78)/1.5 ui-monospace, monospace;
  --c: var(--accent); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); opacity: 0; transition: opacity .2s; pointer-events: none; }
.pi-thread .tab.codemode { --c: #8a3fb0; }
.pi-thread .tab.bash { --c: #2d6a8f; }
.pi-thread .tab.write { --c: #2e7d4f; }
.pi-thread .tab.edit { --c: #a3620a; }
.pi-thread .tab.read { --c: #6b5bb5; }
.pi-thread .tab.state { left: auto; right: 0; border-radius: 0 4px 0 6px; background: none; color: var(--muted); font-weight: normal; }
.pi-thread .explain .mark, .pi-thread .explain .tab, .pi-thread .explain .run-group::before { opacity: 1; pointer-events: auto; }
.pi-thread .thinking-text .clip { max-height: calc(5 * var(--line-height)); overflow: hidden; }
.pi-thread .thinking-text .clip.open { max-height: none; }
.pi-thread .thinking-text .expand-hint { cursor: pointer; }
.pi-thread .bar { padding: 6px 16px 12px; font-family: system-ui, sans-serif; }
.pi-thread .user-message { padding: 10px 14px; }
.pi-thread .tool-execution { padding: 10px 14px; }
.pi-thread .tool-output { margin-top: 8px; }
.pi-thread .assistant-message { display: flex; flex-direction: column; gap: 10px; }
.pi-thread .assistant-message > .assistant-text, .pi-thread .assistant-message > .thinking-block .thinking-text { padding: 0 14px; }
.pi-thread .assistant-message > .tool-execution + .tool-execution, .pi-thread .assistant-text + .tool-execution { margin-top: 0; }
.pi-thread .log > .run-group, .pi-thread .run-group { gap: 28px; }
.pi-thread .thinking-text { color: #596266; }
.pi-thread .mark { color: var(--muted); }
.pi-thread .tab { left: auto; right: 0; border-radius: 0 4px 0 6px; display: flex; gap: 4px; align-items: center; }
.pi-thread .tab .st { font-style: normal; }
.pi-thread .tab .st.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { 50% { box-shadow: 0 3px 12px #0002, 0 0 0 5px color-mix(in srgb, var(--ring) 35%, transparent), 0 0 16px var(--ring); } }
@keyframes look { 0%, 100% { transform: rotate(0) translateX(0); } 30% { transform: rotate(-9deg) translateX(-2px); } 70% { transform: rotate(9deg) translateX(2px); } }
@keyframes no { 20%, 60% { transform: translateX(-5px) rotate(-6deg); } 40%, 80% { transform: translateX(5px) rotate(6deg); } }
@keyframes hop { 40% { transform: translateY(-10px); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes bounce { 30% { transform: translateY(-5px); opacity: .6; } }
.pi-thread .spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes fade { from { opacity: 0; } }
.pi-thread .tab-x .ico { width: 15px; height: 15px; }
.pi-thread .tab-x { display: flex; align-items: center; gap: 5px; padding: 7px 8px 7px 12px; border-right: 1px solid #e3e5e8; cursor: pointer; white-space: nowrap; color: var(--muted); }
.pi-thread .tab-x.on { background: #fff; color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
.pi-thread .tab-x button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; }
.pi-thread .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pi-thread .diagram { position: relative; margin: 8px 0; padding: 10px; background: #fff; border: 1px solid #e6e7ea; border-radius: 8px; overflow: auto; cursor: pointer; text-align: center; }
.pi-thread .diagram-open { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #c9cdd1; border-radius: 8px;
  background: #fff; color: #3b3f41; cursor: pointer; opacity: 0; transition: opacity .15s; }
.pi-thread .diagram:hover .diagram-open, .pi-thread .diagram-open:focus-visible { opacity: 1; }
.pi-thread .diagram-open:focus-visible, .dp-bar button:focus-visible, .dp-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: none) { .pi-thread .diagram-open { opacity: 1; } }
.pi-thread .diagram { display: flex; justify-content: center; width: fit-content; max-width: 100%; box-sizing: border-box; }
.pi-thread .diagram > svg { max-width: 100%; height: auto; }
.pi-thread .diagram pre { text-align: left; margin: 0; color: var(--muted); }
.pi-thread .diagram[data-drawn=bad] { cursor: default; }
.pi-thread .diagram-error { text-align: left; margin-bottom: 6px; font-size: calc(var(--fs) * .9); color: #9a5b00; }
.diagram-pop { position: fixed; inset: 0; z-index: 300; background: #1d1b2666; backdrop-filter: blur(3px); display: flex; padding: 28px; animation: fade .2s ease-out; }
.dp-stage { flex: 1; background: #fff; border-radius: 12px; overflow: hidden; display: grid; place-items: center; cursor: grab; overscroll-behavior: contain; box-shadow: 0 12px 40px #0003; touch-action: none; }
.dp-stage:active { cursor: grabbing; }
.dp-art { transform-origin: center; width: 88%; height: 82%; display: grid; place-items: center; }
.dp-art svg { width: 100%; height: 100%; max-width: none !important; }
.dp-bar { position: absolute; top: 40px; right: 44px; z-index: 1; display: flex; gap: 4px; }
.dp-bar button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #c9cdd1; border-radius: 8px; background: #fff; cursor: pointer; color: #3b3f41; }
.dp-bar button:hover { background: #f3f3f6; }
.pi-thread .font-size { display: inline-flex; border: 1px solid var(--borderMuted); border-radius: 6px; overflow: hidden; }
.pi-thread .font-size button { border: 0; background: none; padding: 1px 7px; cursor: pointer; font: inherit; color: var(--text); }
.pi-thread .font-size button + button { border-left: 1px solid var(--borderMuted); }
.pi-thread .font-size button:hover { background: color-mix(in srgb, var(--borderMuted) 22%, transparent); }
.ctx-menu { position: fixed; z-index: 400; min-width: 180px; padding: 4px; background: #fff; border: 1px solid #d9dce0; border-radius: 8px; box-shadow: 0 8px 24px #0002; }
.ctx-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 10px; border-radius: 5px; font: var(--fs) system-ui, sans-serif; color: var(--text); cursor: pointer; }
.ctx-menu button:hover, .ctx-menu button:focus-visible { background: color-mix(in srgb, var(--accent) 12%, #fff); outline: 0; }
.toast { position: fixed; z-index: 400; left: 50%; bottom: 96px; translate: -50% 0; background: #2b2d31; color: #fff; padding: 6px 14px; border-radius: 999px; font: calc(var(--fs) * .92) system-ui; animation: pop .2s ease-out; }
.pi-thread .box.waiting { background: color-mix(in srgb, var(--container-bg) 60%, var(--body-bg)); }
.pi-thread .box textarea:disabled { cursor: wait; opacity: .6; }
.pi-thread .box.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pi-thread .tool-execution.flash { outline: 2px solid var(--accent); }
.pi-thread .nested { margin-top: 8px; font-size: .92em; color: var(--toolOutput); border-left: 2px solid var(--borderMuted); padding-left: 8px; }
.pi-thread .nested .bad { color: var(--error); }
.pi-thread .tool-execution, .pi-thread .thinking-text { cursor: pointer; }
.pi-thread .tool-execution .expand-hint { margin-top: 4px; }
.pi-thread .queue { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.pi-thread .chip { display: flex; gap: 8px; align-items: center; background: var(--container-bg); border: 1px dashed var(--borderMuted); border-radius: 12px; padding: 4px 10px; color: var(--text); }
.pi-thread .chip b { font-size: .85em; color: var(--accent); }
.pi-thread .chip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-thread .chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; }
.pi-thread .box { display: flex; align-items: flex-end; gap: 8px; background: var(--container-bg); border: 1px solid var(--borderMuted); border-radius: 22px; padding: 6px 6px 6px 16px; }
.pi-thread .box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.pi-thread .box textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; font: calc(var(--fs) * 1.05) system-ui, sans-serif; color: var(--text); line-height: 1.5; padding: 6px 0; max-height: 160px; }
.pi-thread .act { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; cursor: pointer; }
.pi-thread .act:disabled { opacity: .35; cursor: default; }
.pi-thread .act.stop { background: var(--text); }
.pi-thread .opts { display: flex; gap: 10px; align-items: center; padding: 6px 8px 0; color: var(--muted); }
.pi-thread .opts select { appearance: none; font: inherit; color: var(--text); background: transparent; border: 0; border-radius: 4px; padding: 2px 16px 2px 2px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23677176' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 3px center; max-width: 260px; text-overflow: ellipsis; field-sizing: content; }
.pi-thread .opts select:hover, .pi-thread .opts select:focus-visible { background-color: color-mix(in srgb, var(--borderMuted) 22%, transparent); outline: 0; }
.pi-thread .opts .status { margin-left: auto; }
.pi-thread .opts label.toggle { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.pi-thread .opts .switch { appearance: none; margin: 0; width: 28px; height: 16px; border-radius: 999px; background: var(--borderMuted); position: relative; cursor: pointer; transition: background .2s; }
.pi-thread .opts .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: transform .2s; }
.pi-thread .opts .switch:checked { background: var(--accent); }
.pi-thread .opts .switch:checked::after { transform: translateX(12px); }
.pi-thread .opts .switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
