/* Mobile conversation surfaces, scoped to the robot extension. */
.rb-phone{position:relative;display:flex;flex-direction:column;overflow:hidden;background:#f4f5f3}
.rb-phone .s-header{background:#fff;flex-shrink:0;min-height:58px;gap:8px;grid-template-columns:44px minmax(0,1fr) 44px}
.rb-phone .s-header h1{font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rb-phone .screen-content{flex:1;min-height:0;overflow:auto;padding:0 14px 20px;background:#f4f5f3;scroll-behavior:auto;overscroll-behavior:contain}
.rb-phone button,.rb-phone input,.rb-comments button,.rb-inbox button{font:inherit}
.rb-primary,.rb-secondary,.rb-danger{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;max-width:100%;padding:10px 15px;border:1px solid #dce2dc;border-radius:12px;background:#fff;color:#26362d;font-size:14px;line-height:1.4;cursor:pointer}
.rb-primary{background:#22734b;border-color:#22734b;color:white;font-weight:600}
.rb-danger{color:#ab423c;border-color:#ecd8d6;background:#fff}
.rb-primary:disabled,.rb-secondary:disabled,.rb-danger:disabled{opacity:.48;cursor:default}
.rb-phone button:focus-visible,.rb-dialog button:focus-visible,.rb-comments button:focus-visible,.rb-phone input:focus-visible,.rb-phone textarea:focus-visible,.rb-phone select:focus-visible{outline:3px solid #66ad82;outline-offset:2px}
.rb-phone svg,.rb-dialog svg{width:20px;height:20px}
.rb-avatar{display:block;flex-shrink:0;width:44px;height:44px;min-width:44px;min-height:44px;padding:2px;border:0;border-radius:13px;background:transparent;color:#22734b;cursor:pointer}
.rb-avatar img,.rb-avatar>span{width:40px;height:40px;display:flex;align-items:center;justify-content:center;object-fit:cover;border-radius:12px;background:#e1eae4}
.rb-chat-intro{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#6c786f;font-size:11px;padding:6px 0 4px}
.rb-chat-intro button{font-size:12px;padding:8px 11px;min-width:44px;min-height:44px;border-color:transparent;background:transparent}
.rb-welcome{display:flex;align-items:center;flex-direction:column;text-align:center;padding:36px 14px 24px;color:#69756e}
.rb-welcome .rb-avatar,.rb-welcome .rb-avatar img,.rb-welcome .rb-avatar>span{width:68px;height:68px;border-radius:22px}
.rb-welcome h2{font-size:21px;color:#273a2d;margin:18px 0 7px}
.rb-welcome p{font-size:14px;line-height:1.7;max-width:250px;margin:0 0 9px}
.rb-welcome small{font-size:11px}
.rb-messages{display:grid;gap:18px;padding:8px 0 14px}
.rb-message{display:flex;gap:9px;align-items:flex-start;min-width:0}
.rb-message.mine{justify-content:flex-end;padding-left:46px}
.rb-message-copy{min-width:0;max-width:calc(100% - 49px)}
.rb-message.mine .rb-message-copy{max-width:100%}
.rb-message-copy>p{display:inline-block;margin:0;background:#fff;border:1px solid #e7eae6;border-radius:4px 15px 15px 15px;box-shadow:0 1px 2px #183c2110;padding:11px 13px;font-size:15px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;text-align:left}
.rb-message.mine .rb-message-copy>p{background:#d5ebce;border-color:#c8e3c4;border-radius:15px 4px 15px 15px}
.rb-message-copy>small{display:block;font-size:10px;color:#879087;margin:5px 2px;line-height:1.5}
.rb-message.mine .rb-message-copy>small{text-align:right}
.rb-thinking{color:#768477}
.rb-failed{display:flex;align-items:flex-start;flex-wrap:wrap;gap:7px;line-height:1.6;color:#9a4a43;font-size:12px;margin-top:5px}
.rb-failed button{font-size:12px;padding:7px 11px}
.rb-compose{padding:10px 12px calc(8px + env(safe-area-inset-bottom,0px));flex-shrink:0;background:#fbfcfa;border-top:1px solid #e1e6df}
.rb-compose-row{display:flex;align-items:flex-end;gap:9px;min-width:0}
.rb-compose-row textarea{box-sizing:border-box;flex:1;min-width:0;width:0;min-height:44px;max-height:116px;resize:none;border:1px solid #dce3dc;border-radius:13px;background:white;padding:11px 12px;line-height:1.45;font-size:15px;color:#25362b;font-family:inherit}
.rb-compose-row button{flex-shrink:0;min-width:60px;padding:10px 12px}
.rb-compose-hint{margin:7px 2px 0;color:#808a81;line-height:1.45;font-size:10px}
.rb-consent{display:flex;align-items:flex-start;gap:9px;padding:0 2px 10px;font-size:12px;line-height:1.6;color:#526558;cursor:pointer;min-height:44px}
.rb-consent input{width:19px;height:19px;flex-shrink:0;margin:1px 0;accent-color:#22734b}
.rb-compose-notice{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:0 2px 8px;margin:0;font-size:13px;color:#68766c}
.rb-latest{position:absolute;right:13px;bottom:calc(var(--rb-composer-height,95px) + 16px);min-height:44px;border:1px solid #c7deca;border-radius:22px;background:white;box-shadow:0 3px 16px #1c502b22;color:#22734b;padding:9px 16px;font-size:12px;cursor:pointer}
.rb-latest[hidden]{display:none}
.rb-alert,[data-robot-connection]{font-size:13px;color:#91433e;background:#fcefeb;border:1px solid #eed4ce;border-radius:11px;padding:10px;line-height:1.7;overflow-wrap:anywhere;margin:10px 0}
[data-robot-connection][hidden]{display:none}
.rb-alert button,[data-robot-connection] button{margin:5px 0 0}
.rb-empty{text-align:center;padding:48px 14px;line-height:1.7;color:#738075}
.rb-empty h2{font-size:18px;color:#283f2f;margin:0 0 8px}
.rb-empty p{font-size:14px;margin:0 0 18px}
.rb-settings-person{display:flex;gap:13px;align-items:center;padding:22px 2px 18px}
.rb-settings-person .rb-avatar,.rb-settings-person .rb-avatar img{width:52px;height:52px;border-radius:17px}
.rb-settings-person h2{font-size:20px;margin:0 0 6px;color:#253c2d}
.rb-settings-person small{font-size:11px;color:#7b877e}
.rb-settings-group,.rb-memory{background:white;border:1px solid #e1e6df;border-radius:16px;margin:0 0 14px;padding:0 13px}
.rb-setting{display:flex;align-items:center;justify-content:space-between;gap:13px;min-height:78px;padding:14px 0;border-bottom:1px solid #eef0eb;cursor:pointer}
.rb-setting:last-of-type{border:0}
.rb-setting>span{min-width:0;flex:1}
.rb-setting b{display:block;color:#293d2f;font-size:14px;margin-bottom:5px;font-weight:600}
.rb-setting small{display:block;font-size:12px;color:#7b877f;line-height:1.6}
.rb-setting input{appearance:none;flex-shrink:0;width:44px;height:27px;border:1px solid #cad3c9;border-radius:18px;position:relative;background:#d5ddd5;cursor:pointer;margin:0}
.rb-setting input:before{content:'';position:absolute;left:3px;top:3px;width:19px;height:19px;border-radius:50%;background:white;box-shadow:0 1px 3px #20412622;transition:left .15s}
.rb-setting input:checked{background:#348357;border-color:#348357}
.rb-setting input:checked:before{left:20px}
.rb-setting input:disabled{opacity:.45;cursor:default}
.rb-settings-note{font-size:11px;color:#7b877d;line-height:1.7;margin:0 0 15px;overflow-wrap:anywhere}
.rb-memory{padding:16px 13px}
.rb-memory h3{font-size:15px;color:#30432f;margin:0 0 10px}
.rb-memory>p{font-size:13px;color:#7d877d;margin:0 0 12px;line-height:1.7}
.rb-memory ul{padding:0;list-style:none;margin:0 0 16px}
.rb-memory li{font-size:14px;line-height:1.6;border-bottom:1px solid #edf0e8;padding:10px 0;overflow-wrap:anywhere}
.rb-memory li small{display:block;color:#929a90;font-size:10px;margin-top:4px}
.rb-memory form{display:grid;gap:13px}
.rb-memory label{display:grid;gap:7px;color:#556453;font-size:12px}
.rb-memory textarea,.rb-memory select{box-sizing:border-box;width:100%;max-width:100%;border:1px solid #d7dfd4;border-radius:10px;background:#fafbf8;font:inherit;font-size:14px;line-height:1.6;padding:10px;min-height:44px;color:#29372b}
.rb-memory textarea{resize:vertical}
.rb-memory select{overflow:hidden;text-overflow:ellipsis}
.rb-memory form p{margin:0}
.rb-clear{padding:8px 13px;display:grid}
.rb-clear button{border:0;border-radius:0;justify-content:flex-start;min-height:55px;padding:12px 0;font-size:14px}
.rb-clear button+button{border-top:1px solid #eee8e6}
.rb-inbox-avatar{width:48px;height:48px;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;border:0;padding:0;background:#e4ede3;color:#38754f;border-radius:14px;cursor:pointer}
.rb-inbox-avatar img{width:100%;height:100%;object-fit:cover}
.rb-inbox-item{width:100%;text-align:left;min-height:75px}
.rb-inbox-link{display:flex;align-items:center;gap:10px;flex:1;min-width:0;min-height:48px;border:0;padding:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
.rb-inbox-error{font-size:12px;color:#7c877c;line-height:1.8;padding:8px 0}
.rb-comments{margin-top:13px;border-top:1px solid #e8ece4;padding-top:7px}
.rb-comments[hidden]{display:none}
.rb-comment{display:flex;gap:10px;align-items:flex-start;padding:13px 0;min-width:0}
.rb-comment>div{min-width:0;flex:1}
.rb-author{border:0;background:none;padding:3px 0;min-width:44px;min-height:44px;text-align:left;font-size:14px;color:#3c5d42;cursor:pointer;max-width:100%;overflow-wrap:anywhere}
.rb-comment small{margin-left:8px;color:#919c92;font-size:10px;white-space:nowrap}
.rb-comment p{font-size:14px;line-height:1.7;color:#344a39;margin:0 0 4px;overflow-wrap:anywhere;white-space:pre-wrap}
.rb-comment time{font-size:10px;color:#939c93}
.rb-comment-invite{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:9px 0 13px}
.rb-comment-invite small{font-size:11px;color:#82907f;line-height:1.7}
.rb-dialog{box-sizing:border-box;width:calc(100% - 32px);max-width:360px;border:1px solid #dde5da;border-radius:20px;padding:23px;background:#fff;color:#2e4131;box-shadow:0 14px 60px #1b351733}
.rb-dialog::backdrop{background:#14302266}
.rb-dialog h2{font-size:18px;margin:0 0 13px}
.rb-dialog p{color:#697766;font-size:14px;line-height:1.8;margin:0 0 19px}
.rb-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.rb-toast{position:fixed;z-index:10000;bottom:calc(36px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 40px);background:#283c2de8;color:white;border-radius:13px;box-shadow:0 5px 22px #16391b22;padding:12px 17px;font-size:13px;line-height:1.6;text-align:center}
@media(max-width:350px){.rb-phone .screen-content{padding-left:11px;padding-right:11px}.rb-message{gap:7px}.rb-compose{padding-left:10px;padding-right:10px}.rb-setting{gap:10px}.rb-setting small{font-size:11px}.rb-comment small{display:block;margin:0 0 4px}.rb-comment-invite{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){.rb-setting input:before{transition:none}}
