Files
aigc-home/calliope-web/src/lib/components/agent/workspace.css
T
2026-10-24 21:05:08 +08:00

1013 lines
21 KiB
CSS

/* Approved HTML source, agent home/task sections 06/07/15.
Geometry and effects are copied from the sample; only selectors are namespaced.
Theme-specific values belong to static/themes.css. */
:where(.b4, .b4-header) :where(h1, h2, h3, p) {
margin: 0;
padding: 0;
}
:where(.b4, .b4-header) :where(button, input, textarea, select) {
font: inherit;
color: inherit;
}
:where(.b4, .b4-header) button {
background: none;
border: 0;
padding: 0;
cursor: pointer;
letter-spacing: inherit;
}
.b4-header {
position: relative;
z-index: 3;
box-sizing: border-box;
display: flex;
align-items: center;
gap: 12px;
height: var(--head);
padding: 0 16px;
border-bottom: 1px solid var(--line);
background: var(--agent-header-bg);
backdrop-filter: blur(10px);
flex: none;
color: var(--tx-1);
font-size: var(--agent-header-font);
letter-spacing: var(--agent-header-spacing);
}
.b4-header .b4-subtitle {
font-size: 12px;
color: var(--tx-3);
}
.b4-crumb {
display: flex;
align-items: center;
gap: 6px;
color: var(--tx-3);
font-size: var(--agent-crumb-font);
}
.b4-crumb b {
font-size: var(--agent-crumb-title-font);
font-weight: var(--agent-crumb-title-weight);
color: var(--tx-1);
}
.b4-grow {
flex: 1;
min-width: 0;
}
.b4-chip {
height: 26px;
padding: 0 10px;
border-radius: var(--agent-chip-radius);
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 12px;
color: var(--tx-2);
background: var(--bg-2);
border: 1px solid var(--line);
white-space: nowrap;
}
.b4 {
flex-direction: var(--agent-page-direction);
position: relative;
display: flex;
flex: 1;
min-height: 0;
height: 100%;
overflow: hidden;
--scene: var(--sc-agent);
line-height: 1.55;
color: var(--tx-1);
}
.b4,
.b4 * {
box-sizing: border-box;
}
.b4 .b4-row {
display: flex;
align-items: center;
gap: 8px;
}
.b4 .dim,
.b4 .muted {
color: var(--tx-2);
}
.b4 .b4-seg {
display: flex;
padding: 3px;
border-radius: var(--agent-radius-9);
background: var(--agent-seg-bg);
border: 1px solid var(--line);
gap: 2px;
overflow: auto;
}
.b4 .b4-seg button {
flex: 1;
height: 28px;
border-radius: var(--agent-radius-7);
color: var(--tx-2);
font-size: 12.5px;
white-space: nowrap;
}
.b4 .b4-seg button.on {
background: var(--agent-seg-selected-bg);
color: var(--tx-1);
box-shadow: var(--agent-seg-shadow);
}
.b4 .eyebrow {
display: inline-flex;
align-items: center;
gap: 6px;
height: 22px;
padding: 0 9px;
border-radius: var(--agent-chip-radius);
font-size: 11px;
letter-spacing: 0.5px;
width: max-content;
color: color-mix(in srgb, var(--scene) 75%, var(--hi));
border: 1px solid color-mix(in srgb, var(--scene) 45%, transparent);
background: color-mix(in srgb, var(--scene) 10%, transparent);
}
.b4 .sec-h {
display: flex;
align-items: center;
gap: 10px;
margin: 4px 0 10px;
}
.b4 .big-input .b4-row {
flex-wrap: wrap;
}
.b4 .sec-h h2 {
font-size: 15px;
font-weight: 600;
}
.b4 .sec-h .dim {
font-size: 12px;
}
.b4 .b4-empty {
font-size: 12px;
color: var(--tx-3);
padding: 12px;
line-height: 1.7;
}
.b4 .hero-copy {
position: relative;
min-width: 0;
}
.b4 .hero-copy h2 {
margin-top: 10px;
}
.b4 .hero-copy > p {
margin-top: 8px;
max-width: 560px;
font-size: 13px;
line-height: 1.55;
}
.b4 .steps {
margin-top: 12px;
}
.b4 .titem {
width: 100%;
text-align: left;
}
.b4 .titem b {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.b4 .dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--agent-task-dot, var(--scene));
}
.b4 .panel h3 .dim {
font-size: 11.5px;
font-weight: 400;
}
.b4 .panel > p {
font-size: 11.5px;
}
.b4 .outcard {
text-align: left;
cursor: pointer;
}
.b4 .outcard .t {
display: grid;
place-items: center;
color: var(--scene);
background: var(--well);
}
.b4 .art-meta {
font-size: var(--agent-art-meta-font);
}
.b4 .art-tabs {
flex: none;
}
.b4 .shot .th :is(img, video) {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: contain;
}
.b4 .shot-copy {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.b4 .shot-copy textarea {
width: 100%;
min-height: 0;
field-sizing: content;
margin: -1px -3px;
resize: none;
border: 0;
background: none;
font-size: 12px;
line-height: 1.55;
padding: 1px 3px;
}
.b4 .shot-copy input {
width: var(--agent-duration-width);
field-sizing: content;
min-width: 1ch;
font-size: 11px;
font-family: var(--agent-duration-font);
border: 0;
padding: 0;
background: var(--agent-duration-bg);
appearance: textfield;
}
.b4 .shot-copy .a-tag {
gap: var(--agent-duration-gap);
}
.b4 .shot-copy input::-webkit-inner-spin-button,
.b4 .shot-copy input::-webkit-outer-spin-button {
appearance: none;
margin: 0;
}
.b4 .shot .th {
display: grid;
place-items: center;
background: var(--well);
font-size: 10px;
color: var(--tx-3);
}
.b4-compare {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.b4-compare pre {
white-space: pre-wrap;
word-break: break-word;
font-size: 12px;
max-height: 60vh;
overflow: auto;
}
.b4 .draft-editor {
flex: 1;
min-height: 180px;
width: 100%;
resize: vertical;
padding: 10px;
border: 1px solid var(--line);
border-radius: var(--agent-radius-8);
background: var(--well);
font-size: 12px;
line-height: 1.8;
color: var(--tx-1);
}
.b4 .art-f .a-btn {
flex: 1;
justify-content: center;
}
.b4 .art-f .primary {
flex: 1.4;
}
.b4 :is(.big-input, .art-f) select {
field-sizing: content;
max-width: var(--agent-input-select-max);
width: auto;
font-size: 12px;
font-weight: var(--agent-select-weight, 600);
border: 0;
background: none;
appearance: none;
padding: 0;
}
.b4 select {
background: var(--bg-2);
border: 1px solid var(--line);
border-radius: var(--agent-chip-radius);
height: 26px;
padding: 0 8px;
color: var(--tx-1);
font-size: 11.5px;
min-width: 0;
max-width: 130px;
}
.b4 .b4-error {
position: absolute;
z-index: 5;
bottom: 120px;
left: 280px;
right: 20px;
padding: 12px;
background: var(--bg-3);
border: 1px solid var(--err);
border-radius: var(--r-sm);
font-size: 12px;
}
.b4.task-view .aurora {
opacity: var(--agent-task-aurora-opacity);
}
.b4 {
.aurora {
position: absolute;
inset: 0;
pointer-events: none;
overflow: hidden;
z-index: 0;
}
.aurora i {
position: absolute;
border-radius: 50%;
filter: blur(70px);
opacity: var(--aur-op);
animation: drift 18s var(--ease-io) infinite alternate;
animation-play-state: var(--loop-play-state);
}
.aurora i:nth-child(1) {
width: 520px;
height: 420px;
left: 8%;
top: -120px;
background: var(--aur-1);
}
.aurora i:nth-child(2) {
width: 420px;
height: 380px;
right: 4%;
top: 40px;
background: var(--aur-2);
animation-delay: var(--loop-delay, -6s);
opacity: calc(var(--aur-op) * 0.55);
}
.aurora i:nth-child(3) {
width: 460px;
height: 360px;
left: 38%;
top: 260px;
background: var(--aur-3);
animation-delay: var(--loop-delay, -12s);
opacity: calc(var(--aur-op) * 0.36);
}
.particles {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 0;
}
.agent-grid {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 260px minmax(0, 1fr);
min-height: 0;
flex: 1;
}
.tasklist {
border-right: 1px solid var(--line);
background: color-mix(in srgb, var(--bg-1) 72%, transparent);
backdrop-filter: blur(8px);
display: flex;
flex-direction: column;
min-height: 0;
}
.tl-h {
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
border-bottom: 1px solid var(--line);
}
.tl-b {
flex: 1;
overflow: auto;
padding: 6px 8px;
}
.titem {
padding: 9px 10px;
border-radius: var(--agent-radius-10);
cursor: pointer;
display: flex;
flex-direction: column;
gap: 4px;
border: 1px solid transparent;
margin: 2px 0;
}
.titem:hover {
background: rgb(var(--ink) / 0.03);
}
.titem.on {
background: color-mix(in srgb, var(--sc-agent) 10%, transparent);
border-color: color-mix(in srgb, var(--sc-agent) 30%, transparent);
}
.titem b {
font-size: 12.5px;
font-weight: 500;
}
.titem .meta {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: var(--tx-3);
}
.agent-home {
overflow: auto;
padding: 22px 26px 30px;
display: flex;
flex-direction: column;
gap: 18px;
}
.ahero {
flex-shrink: var(--agent-hero-shrink);
min-width: 0;
position: relative;
border-radius: var(--agent-radius-22);
overflow: hidden;
border: 1px solid var(--agent-hero-border);
background: var(--agent-hero);
padding: 26px 28px;
display: grid;
grid-template-columns: minmax(0, 1fr) 330px;
gap: 24px;
}
.ahero::before {
content: "";
position: absolute;
inset: 0;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M32 0H0v32' fill='none' stroke='white' stroke-opacity='.04'/%3E%3C/svg%3E");
-webkit-mask: linear-gradient(90deg, #000, transparent 80%);
mask: linear-gradient(90deg, #000, transparent 80%);
}
.ahero h2 {
font-size: 30px;
font-weight: 700;
line-height: 1.2;
background: var(--agent-title);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.big-input {
margin-top: 14px;
border-radius: var(--agent-radius-16);
background: var(--agent-input-bg);
border: 1px solid var(--agent-input-border);
padding: 12px 14px 10px;
transition:
border-color var(--t-slow),
box-shadow var(--t-slow);
}
.big-input:focus-within {
border-color: var(--agent-input-focus-border);
box-shadow:
0 0 0 3px color-mix(in srgb, var(--gold) 10%, transparent),
0 0 40px color-mix(in srgb, var(--sc-agent) 20%, transparent);
}
.big-input textarea {
width: 100%;
height: 58px;
background: none;
border: 0;
outline: 0;
resize: none;
font-size: 14px;
line-height: 1.6;
}
.big-input .row {
flex-wrap: wrap;
}
.steps {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.steps span {
display: inline-flex;
align-items: center;
gap: 6px;
height: 26px;
padding: 0 10px 0 4px;
border-radius: var(--r-pill);
background: rgb(var(--ink) / 0.05);
border: 1px solid var(--line-2);
font-size: 11.5px;
color: var(--tx-2);
}
.steps span i {
width: 18px;
height: 18px;
border-radius: 50%;
display: grid;
place-items: center;
font: 700 10px var(--mono);
font-style: normal;
background: var(--scene);
color: var(--on-scene);
}
.orb {
position: relative;
display: grid;
place-items: center;
}
.orb .core {
width: 180px;
height: 180px;
border-radius: 50%;
background: var(--orb-core);
box-shadow: var(--agent-orb-shadow);
animation: breath 4.5s var(--ease-io) infinite;
animation-play-state: var(--loop-play-state);
}
.orb .ring {
position: absolute;
width: var(--agent-orbit-size);
height: var(--agent-orbit-size);
border-radius: 50%;
border: 1px solid rgb(var(--ink) / 0.12);
animation: agent-orbit var(--agent-orbit-period) linear infinite;
animation-play-state: var(--loop-play-state);
}
.orb .ring::before {
content: "";
position: absolute;
top: -4px;
left: 50%;
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--gold);
box-shadow: var(--agent-ring-shadow);
}
.orb .ring.r2 {
width: var(--agent-orbit-outer-size);
height: var(--agent-orbit-outer-size);
animation-duration: var(--agent-orbit-outer-period);
animation-direction: reverse;
border-style: dashed;
border-color: rgb(var(--ink) / 0.07);
}
.roster {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 12px;
}
.acard {
--c: var(--sc-agent);
position: relative;
border-radius: var(--agent-radius-16);
overflow: hidden;
border: 1px solid var(--line-2);
background: var(--bg-2);
cursor: pointer;
min-height: 176px;
display: flex;
flex-direction: column;
justify-content: flex-end;
transition:
transform var(--t-slow) var(--ease-out),
border-color var(--t-base),
box-shadow var(--t-slow);
}
.acard:hover {
transform: translateY(-4px);
border-color: color-mix(in srgb, var(--c) 60%, transparent);
box-shadow: 0 18px 40px color-mix(in srgb, var(--c) 22%, transparent);
}
.acard .bg {
position: absolute;
inset: 0;
background-size: cover;
background-position: center;
opacity: 0.55;
transition:
transform 0.8s var(--ease-out),
opacity var(--t-slow);
}
.acard:hover .bg {
transform: scale(1.06);
opacity: 0.75;
}
.acard .sh {
position: absolute;
inset: 0;
background: linear-gradient(
180deg,
transparent 15%,
color-mix(in srgb, var(--bg-2) 95%, transparent) 75%
);
}
.acard .num {
position: absolute;
right: 12px;
top: 6px;
font: 800 36px/1 var(--agent-number-font);
color: transparent;
-webkit-text-stroke: 1px rgb(var(--ink) / 0.22);
}
.acard .ic {
position: absolute;
left: 12px;
top: 12px;
width: 32px;
height: 32px;
border-radius: var(--agent-radius-9);
display: grid;
place-items: center;
background: color-mix(in srgb, var(--bg-1) 72%, transparent);
border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
color: var(--c);
}
.acard .tx {
text-align: left;
position: relative;
padding: 12px;
display: flex;
flex-direction: column;
gap: 4px;
}
.acard .tx b {
font-size: 14px;
}
.acard .tx p {
font-size: 11.5px;
color: var(--tx-2);
line-height: 1.5;
}
.acard .tx .b4-row {
margin-top: 4px;
}
.acard .tx .b4-row > .dim {
font-size: 11px;
}
.mini-row {
display: grid;
grid-template-columns: 1.2fr 1fr;
gap: 12px;
}
.panel {
border-radius: var(--agent-radius-16);
border: 1px solid var(--line-2);
background: color-mix(in srgb, var(--bg-2) 80%, transparent);
padding: 14px 16px;
display: flex;
flex-direction: column;
gap: 10px;
}
.panel h3 {
font-size: 13.5px;
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
}
.skills {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.skill {
height: 28px;
padding: 0 10px;
border-radius: var(--agent-radius-8);
border: 1px solid var(--line-2);
background: rgb(var(--ink) / 0.03);
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: var(--tx-2);
}
.skill i {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--sc-agent);
}
.outrow {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
}
.outcard {
border-radius: var(--agent-radius-10);
border: 1px solid var(--line);
background: var(--bg-2);
overflow: hidden;
}
.outcard .t {
height: 64px;
background-size: cover;
background-position: center;
}
.outcard .d {
padding: 7px 9px;
font-size: 11.5px;
display: flex;
flex-direction: column;
gap: 2px;
}
/* agent task (session) */
.atask {
min-width: 0;
position: relative;
z-index: 1;
display: grid;
grid-template-columns: 260px minmax(0, 1fr) 420px;
flex: 1;
min-height: 0;
}
.convo {
display: flex;
flex-direction: column;
min-height: 0;
min-width: 0;
border-right: 1px solid var(--line);
}
.convo-b {
flex: 1;
overflow: auto;
padding: 18px 22px;
display: flex;
flex-direction: column;
gap: 14px;
}
.msg {
display: flex;
gap: 10px;
max-width: 760px;
}
.msg.me {
align-self: flex-end;
flex-direction: row-reverse;
}
.msg .av {
width: 28px;
height: 28px;
border-radius: var(--agent-radius-8);
flex: none;
display: grid;
place-items: center;
background: color-mix(in srgb, var(--sc-agent) 18%, transparent);
color: var(--sc-agent);
}
.msg.me .av {
background: var(--bg-3);
color: var(--tx-2);
}
.bub {
padding: 10px 13px;
border-radius: var(--agent-radius-12);
background: var(--bg-2);
border: 1px solid var(--line);
font-size: 13px;
line-height: 1.65;
}
.msg.me .bub {
background: color-mix(in srgb, var(--gold) 10%, transparent);
border-color: color-mix(in srgb, var(--gold) 25%, transparent);
}
.plan {
border-radius: var(--agent-radius-12);
border: 1px solid color-mix(in srgb, var(--sc-agent) 30%, transparent);
background: linear-gradient(
135deg,
color-mix(in srgb, var(--sc-agent) 8%, transparent),
color-mix(in srgb, var(--bg-2) 90%, transparent)
);
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 8px;
}
.pstep {
display: grid;
grid-template-columns: 22px 1fr auto;
gap: 10px;
align-items: center;
font-size: 12.5px;
}
.pstep .s {
width: 22px;
height: 22px;
border-radius: 50%;
display: grid;
place-items: center;
border: 1px solid var(--line-3);
font: 600 10px var(--mono);
color: var(--tx-3);
}
.pstep.done .s {
background: var(--ok);
border-color: var(--ok);
color: var(--on-ok);
}
.pstep.run .s {
border-color: var(--sc-agent);
color: var(--sc-agent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-agent) 20%, transparent);
animation: var(--stage-loop, breath) 2s infinite;
}
.pstep.done b {
color: var(--tx-2);
font-weight: 400;
}
.tool {
border-radius: var(--agent-radius-10);
border: 1px solid var(--line);
background: var(--bg-1);
font-size: 12px;
}
.tool summary {
list-style: none;
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
cursor: pointer;
color: var(--tx-2);
}
.tool summary::-webkit-details-marker {
display: none;
}
.tool summary code {
font-family: var(--mono);
color: var(--sc-image);
font-size: 11.5px;
}
.tool pre {
margin: 0 12px 10px;
padding: 8px 10px;
border-radius: var(--agent-radius-8);
background: var(--well);
font: 11px/1.6 var(--mono);
color: var(--tx-2);
white-space: pre-wrap;
}
.thinking {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--tx-3);
}
.thinking i {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--sc-agent);
opacity: var(--thinking-opacity, 1);
animation: var(--thinking-loop, blink) 1.2s infinite;
}
.thinking i:nth-child(2) {
animation-delay: 0.2s;
}
.thinking i:nth-child(3) {
animation-delay: 0.4s;
}
.convo-in {
flex: none;
margin: 0 18px 14px;
border-radius: var(--agent-radius-14);
background: var(--bg-2);
border: 1px solid var(--line-2);
padding: 10px 12px;
display: flex;
flex-direction: column;
gap: 8px;
}
.convo-in textarea {
background: none;
border: 0;
outline: 0;
resize: none;
height: 44px;
font-size: 13px;
}
.artifact {
display: flex;
flex-direction: column;
min-height: 0;
background: color-mix(in srgb, var(--bg-1) 80%, transparent);
}
.art-h {
padding: 12px 14px;
border-bottom: 1px solid var(--line);
display: flex;
flex-direction: column;
gap: 8px;
}
.art-b {
flex: 1;
overflow: auto;
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 10px;
}
.shot {
display: grid;
grid-template-columns: 86px 1fr;
gap: 10px;
padding: 8px;
border-radius: var(--agent-shot-radius);
border: 1px solid var(--line);
background: var(--bg-2);
}
.shot .th {
aspect-ratio: 16/9;
border-radius: var(--agent-radius-6);
background-size: cover;
background-position: center;
position: relative;
}
.shot .th span {
z-index: var(--agent-media-label-layer);
position: absolute;
left: 3px;
top: 3px;
font: 700 9.5px var(--mono);
background: rgba(0, 0, 0, 0.6);
padding: 1px 4px;
border-radius: 3px;
}
.shot [contenteditable] {
outline: 0;
border-radius: 4px;
padding: 1px 3px;
margin: -1px -3px;
font-size: 12px;
line-height: 1.55;
color: var(--tx-1);
}
.shot [contenteditable]:hover {
background: rgb(var(--ink) / 0.04);
}
.shot [contenteditable]:focus {
background: color-mix(in srgb, var(--gold) 8%, transparent);
box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent);
}
.art-f {
font-size: var(--agent-footer-font);
border-top: 1px solid var(--line);
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 8px;
}
}
:root[data-reduce="1"] .b4 .fx-only {
display: none;
}
@media (prefers-reduced-motion: reduce) {
.b4 .fx-only {
display: none;
}
}
@keyframes drift {
to {
transform: translate(60px, 40px) scale(1.12);
}
}
@keyframes breath {
50% {
transform: scale(1.05);
box-shadow: 0 0 120px color-mix(in srgb, var(--sc-agent) 75%, transparent);
}
}
@keyframes blink {
50% {
opacity: 0.2;
transform: translateY(-2px);
}
}
@keyframes agent-orbit {
to {
transform: rotate(360deg);
}
}