:root{font-family:ui-sans-serif,system-ui,-apple-system,'PingFang SC',sans-serif;color:#36334a;background:#f3f0fa}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}#app{max-width:860px;height:100dvh;margin:auto;background:#faf9ff;display:flex;flex-direction:column;box-shadow:0 0 40px #d7cde477}header{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;border-bottom:1px solid #ece8f5;background:#ffffffde;flex-shrink:0}header strong{font-size:18px}header button{min-width:62px}main{flex:1;min-height:0;overflow-y:auto;padding:18px;background-size:cover;background-position:center}nav{display:flex;border-top:1px solid #ece8f5;background:#fff;flex-shrink:0}nav button{width:33.33%;border:0;background:none;padding:10px;color:#9991aa;font-size:23px}nav button.active{color:#7665b5}nav small{display:block;font-size:12px;margin-top:2px}.ghost{border:0;background:transparent;color:#7866a4;padding:8px}.hidden{display:none!important}.card{background:#fff;border:1px solid #eeeaf5;border-radius:18px;padding:16px;margin-bottom:12px;box-shadow:0 4px 20px #7564a20a}.row{display:flex;align-items:center;gap:12px}.row.space{justify-content:space-between}.avatar{width:52px;height:52px;border-radius:15px;object-fit:cover;background:#e6dff5;display:grid;place-items:center;font-size:24px;flex-shrink:0}.avatar.small{width:38px;height:38px;border-radius:12px}.muted{color:#928aa3;font-size:13px}.primary{background:#8170c7;color:white;border:0;border-radius:12px;padding:11px 18px}.secondary{background:#f0ebfa;color:#725eae;border:0;border-radius:12px;padding:10px 14px}.danger{background:#fff0f0;color:#b34d59;border:0;border-radius:12px;padding:10px 14px}.section{font-weight:700;margin:20px 0 10px}label{display:block;font-size:13px;color:#766e87;margin:13px 0 6px}input:not([type=file]),textarea{width:100%;border:1px solid #e3dded;border-radius:12px;padding:11px 12px;background:#fff;outline:none;color:#3d354f}textarea{min-height:100px;resize:vertical;line-height:1.6}.hint{font-size:12px;color:#9a91aa;line-height:1.6}.stack{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}.messages{display:flex;flex-direction:column;gap:14px;min-height:100%}.bubble{max-width:84%;padding:11px 14px;border-radius:17px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;background:#fff;box-shadow:0 2px 10px #5d568014}.bubble.user{align-self:flex-end;background:#dceaff}.bubble.assistant{align-self:flex-start}.bubble img{max-width:220px;max-height:250px;border-radius:10px;display:block;margin-bottom:8px}.chatWrap{display:flex;flex-direction:column;height:100%;gap:10px}.chatScroll{flex:1;overflow-y:auto;padding:5px}.composer{display:flex;align-items:flex-end;gap:8px;padding:10px;background:#ffffffd9;border-radius:17px}.composer textarea{min-height:44px;max-height:130px;flex:1}.composer button{height:44px}.attachment{font-size:12px;padding:7px;background:#f1ebfa;border-radius:8px}.banner{padding:12px;border-radius:12px;background:#fff3d8;color:#785c24;font-size:13px;margin-bottom:10px}.empty{text-align:center;margin-top:25vh;color:#9286aa}.background-preview{height:110px;border-radius:12px;background-size:cover;background-position:center;background-color:#f1edfa;margin-top:8px}h2{font-size:20px}hr{border:0;border-top:1px solid #eee9f4;margin:20px 0}@media(min-width:700px){#app{height:95dvh;margin:2.5dvh auto;border-radius:20px;overflow:hidden}}

.messageActions{display:flex;gap:5px;margin-top:7px;flex-wrap:wrap}.messageActions button{font-size:11px;border:1px solid #cdd7ea;border-radius:7px;background:#fff;color:#456;padding:3px 6px;cursor:pointer}

.inlineEditor{margin-top:10px;padding:10px;background:#f5f1ff;border-radius:12px;display:flex;gap:7px;flex-wrap:wrap}.inlineEditor textarea{flex-basis:100%;min-height:85px;white-space:pre-wrap}.checkRow{display:flex;align-items:center;gap:8px;margin:12px 0}.checkRow input{width:auto!important}
