/* Anchor to the visual viewport, which can be shorter than the layout viewport on iOS. */
body[data-independent="true"] .shared-chat .chat-composer{position:fixed;top:max(0px,calc(var(--chat-visible-bottom,100dvh) - var(--chat-composer-height,86px)));bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:min(100%,800px);margin:0;padding:10px 24px max(12px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e8e8e6;z-index:40;box-sizing:border-box}
body[data-independent="true"] .shared-chat .chat-history{padding-bottom:calc(var(--chat-composer-height,86px) + 56px)}
@media(max-width:700px){body[data-independent="true"] .shared-chat .chat-composer{padding-left:16px;padding-right:16px}body[data-independent="true"] .shared-chat .composer-box textarea{font-size:16px}}
/* iOS can leave a layout-viewport gap beneath its visual-viewport composer.
   Keep that entire gap opaque so older messages never bleed through it. */
body[data-independent="true"] .shared-chat .chat-composer::after{content:"";position:absolute;top:100%;left:0;width:100%;height:100vh;background:#fff;pointer-events:none}
body[data-independent="true"] .shared-chat .chat-history{scroll-padding-bottom:calc(var(--chat-composer-height,86px) + 56px)}

body[data-independent="true"] .shared-chat .chat-history{overflow-anchor:none}

/* Keep replying attached to the end of the post, with an easy touch target. */
.shared-chat .chat-post-actions{display:flex;justify-content:flex-start;margin-top:6px}.shared-chat .chat-post-actions .message-reply{display:inline-flex;align-items:center;justify-content:flex-start;min-height:44px;min-width:44px;margin:0;padding:8px 12px 8px 0;border:0;background:transparent;color:#777;font:400 12px/1.4 Inter,Arial,sans-serif;text-align:left;cursor:pointer}.shared-chat .chat-post-actions .message-reply:hover{color:#171717;text-decoration:underline;text-underline-offset:3px}.shared-chat .chat-post-actions .message-reply:focus-visible{outline:2px solid #59788a;outline-offset:2px}

.shared-chat .chat-latest{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:8px 12px;border:0;background:#fff;color:#777;font:400 var(--studio-tab-font-size,12px)/1.4 Inter,Arial,sans-serif;white-space:nowrap;cursor:pointer}.shared-chat .chat-latest[hidden]{display:none}.shared-chat .chat-latest svg{display:block;flex:none}.shared-chat .chat-latest:hover{color:#171717}.shared-chat .chat-latest:focus-visible{outline:2px solid #59788a;outline-offset:-2px}
