.cu-card{margin:12px;padding:16px;border:1px solid #7776;border-radius:16px;background:var(--bg,#171b24);color:inherit}.cu-card[hidden],.cu-button[hidden]{display:none}.cu-controls{display:flex;flex-wrap:wrap;gap:8px}.cu-button{border:1px solid #8888;border-radius:10px;background:transparent;color:inherit;padding:8px 12px;cursor:pointer;margin:4px}.cu-button:focus-visible,.cu-display:focus-visible{outline:3px solid #8fc9ff}.cu-display{margin-top:12px}.cu-display img,.cu-past-report img{width:100%;height:auto;display:block;border-radius:10px}.cu-approval{padding:12px;border:1px solid #ecc27d;border-radius:12px;margin:10px 0}.cu-past-report{padding:12px;border:1px solid #8888;white-space:pre-wrap}.cu-past{max-height:500px;overflow:auto}

.cu-heading{display:flex;align-items:center;gap:10px}.cu-counters{margin-inline-start:auto;font-size:12px}.cu-timeline>div{display:flex;gap:8px;overflow:auto}.cu-timeline img{width:120px;height:84px;object-fit:contain}.cu-timeline summary{cursor:pointer;padding:10px}.cu-avatar{flex-shrink:0}

/* Keep a full-height card in the scrolling chat; never shrink it under the composer. */
.cu-card{box-sizing:border-box;flex:0 0 auto;min-width:0;max-width:100%;overflow-wrap:anywhere}
.cu-card *{box-sizing:border-box}
.cu-heading{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 10px}
.cu-heading strong{min-width:0;font-size:15px;line-height:1.35}
.cu-counters{grid-column:2;margin:0;font-size:11px;white-space:nowrap}
.cu-card>p{font-size:14px;line-height:1.45;margin:10px 0}
.cu-controls .cu-button{margin:0;min-height:44px;font-size:13px}
.cu-controls{gap:6px}
.cu-display{width:100%;min-width:0}
.cu-display img{max-width:100%;height:auto}
.cu-display img[hidden]{display:none}
.cu-past .cu-button{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:13px}
.cu-timeline{min-width:0;font-size:13px}
@media(max-width:600px){
 .cu-card{margin:8px 0;padding:12px;border-radius:14px}
 .cu-heading .cu-avatar{width:36px;height:36px;min-width:36px;grid-row:span 2}
 .cu-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .cu-controls .cu-button{width:100%;padding:8px 4px}
 .cu-timeline summary{padding:10px 0}
}

/* Focused workspace, with persistent controls above the live screen. */
.cu-card{position:relative;background:linear-gradient(145deg,rgba(33,26,23,.98),rgba(15,13,13,.98));box-shadow:0 10px 30px #0003}
.cu-heading::after{content:"";width:7px;height:7px;border-radius:50%;background:#e9aa71;grid-column:1;grid-row:3;justify-self:center}
.cu-history,.cu-help{margin-top:10px;border-top:1px solid #ffffff18;padding-top:8px;font-size:13px}
.cu-history summary,.cu-help summary{cursor:pointer;padding:8px 0;color:#ded3ca}
.cu-manual-tools{display:flex;flex-wrap:wrap;gap:6px;padding-top:10px}
.cu-manual-tools[hidden]{display:none}
.cu-manual-tools input{flex:1 1 180px;min-width:0;background:#111;color:inherit;border:1px solid #7778;border-radius:10px;padding:12px;font:inherit}
.cu-manual-tools .cu-button{min-height:44px;margin:0}
.cu-manual .cu-display{outline:2px solid #dca56f;outline-offset:3px;border-radius:10px;cursor:crosshair}
.cu-expanded{position:fixed!important;inset:0!important;z-index:10000!important;margin:0!important;width:100%!important;max-width:none!important;height:100dvh;overflow:auto;border-radius:0;padding:calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));overscroll-behavior:contain}
.cu-expanded .cu-controls{position:sticky;top:0;z-index:2;padding:8px;background:#211a17;border-radius:10px}
.cu-expanded .cu-display{max-width:1000px;margin:12px auto}
.cu-controls .cu-button:hover{background:#ffffff0c}
.cu-approval{position:relative;background:#35271d;box-shadow:0 4px 16px #0004}

/* Screen-first expanded workspace. Controls wrap without oversized tiles. */
.cu-expanded{background:#17120f!important;display:flex;flex-direction:column;gap:8px}
.cu-expanded .cu-heading{flex:0 0 auto}
.cu-expanded .cu-controls,.cu-controls{display:flex;flex-wrap:wrap;gap:6px}
.cu-expanded .cu-controls{position:static;padding:0}
.cu-controls .cu-button{width:auto;flex:0 1 auto;font-size:12px;min-height:40px;padding:8px 10px}
.cu-expanded .cu-display{flex:0 0 auto;margin:4px auto;width:100%}
.cu-expanded .cu-display img{max-height:55dvh;width:auto;max-width:100%;margin:auto}
.cu-expanded .cu-heading strong{font-size:14px}
.cu-expanded>p{margin:2px 0;font-size:12px}
.cu-expanded .cu-manual-tools{padding-top:2px;flex:0 0 auto}
.cu-expanded .cu-history,.cu-expanded .cu-help{flex:0 0 auto}
