.chat-entry{margin:18px 0;padding:18px;background:#e4eee8;border:1px solid #c1d6ca;border-radius:14px}.chat-entry strong{display:block;margin-bottom:6px}.chat-entry p{font-size:.85rem;margin:0 0 12px}
dialog.chat-dialog{padding:0;width:min(680px,100%);height:min(850px,calc(var(--chat-height,100dvh) - 32px));max-height:calc(var(--chat-height,100dvh) - 32px);overflow:hidden}.chat-dialog .dialog-top{display:none}.chat-dialog #modal-body{height:100%;padding:0}.chat-shell{height:100%;display:flex;flex-direction:column;background:#f4f6f1;position:relative;min-height:0}.chat-head{padding:16px 20px 12px;background:#fffdf7;border-bottom:1px solid #cfddd3;flex-shrink:0}.chat-head .text-button{margin:0;padding:0 0 8px;font-size:.85rem}.chat-head h2{font-size:1.15rem;margin:0 0 6px;line-height:1.4}.chat-head p{font-size:.78rem;margin:0;line-height:1.6;color:#526b60}.chat-head #chat-status{font-size:.7rem;color:#637e6d}.chat-log{flex:1;overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:12px 18px 24px;scrollbar-gutter:stable}.chat-date{text-align:center;color:#677a70;font-size:.72rem;margin:16px 0}.chat-message{display:flex;align-items:flex-start;gap:8px;margin:14px 0}.chat-message.mine{flex-direction:row-reverse}.chat-avatar{width:32px;height:32px;min-width:32px;font-size:.8rem;margin:0;overflow:hidden}.chat-message-body{max-width:80%;min-width:0}.chat-name{font-size:.73rem;color:#506456;display:block;margin:0 0 5px}.mine .chat-name,.mine .chat-meta{text-align:right}.chat-bubble{margin:0;padding:10px 13px;background:white;border:1px solid #dce4dc;border-radius:0 14px 14px 14px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.94rem;line-height:1.6;color:#223d31}.mine .chat-bubble{background:#264f40;color:#fffef4;border-color:#264f40;border-radius:14px 0 14px 14px}.chat-bubble.deleted{background:#e6eae5;color:#677a70;font-style:italic}.chat-meta{font-size:.64rem;color:#708177;margin-top:4px}.chat-delete{border:0;background:none;color:#86664f;font-size:.68rem;padding:4px 6px;min-height:28px}.chat-empty{text-align:center;color:#728175;font-size:.9rem;padding:30px 10px}.chat-compose{background:#fffdf7;border-top:1px solid #cfddd3;padding:10px 14px max(12px,env(safe-area-inset-bottom));flex-shrink:0}.chat-compose #chat-policy{font-size:.7rem;color:#64796b;margin:0 0 8px}.chat-compose-row{display:flex;gap:8px;align-items:flex-end}.chat-compose textarea{resize:none;min-height:46px;max-height:120px;border-radius:14px;padding:11px 12px;font-size:16px;line-height:1.4;flex:1;min-width:0;border:1px solid #bbcfc1;background:#fff}.chat-compose .button{padding:12px 16px;min-height:46px;white-space:nowrap}.chat-compose #chat-error{font-size:.8rem;color:#9a3f32;margin-bottom:8px}.chat-latest{position:absolute;bottom:120px;left:50%;transform:translateX(-50%);box-shadow:0 3px 14px #142d3426}.chat-shell [hidden]{display:none!important}
@media(max-width:580px){dialog.chat-dialog{width:100%;max-width:100%;height:var(--chat-height,100dvh);max-height:var(--chat-height,100dvh);margin:0;top:var(--chat-top,0px);border:0;border-radius:0}.chat-head{padding:12px 16px}.chat-log{padding:8px 12px 20px}.chat-message-body{max-width:82%}}
