/* Reserve a real layout row for typing; the floating navigation cannot cover it. */
body.farm-chat-open{overflow:hidden}
body.farm-chat-open .shell{
 position:fixed;inset:var(--farm-chat-top,0px) 0 auto;margin-inline:auto;
 height:var(--farm-chat-height,100dvh);min-height:0;display:flex;flex-direction:column;overflow:hidden;
}
body.farm-chat-open .topbar{flex:none}
body.farm-chat-open #view{
 flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;
 padding-bottom:calc(108px + env(safe-area-inset-bottom));
}
body.farm-chat-open #view>nav,body.farm-chat-open .chat-section-title{flex:none}
body.farm-chat-open .chat-card,body.farm-chat-open #view>.fc-page{
 flex:1;min-height:0;margin-bottom:0;display:flex;flex-direction:column;overflow:hidden;
}
body.farm-chat-open #chatMessages,body.farm-chat-open .fc-conversation{
 flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;overflow-anchor:none;
}
body.farm-chat-open .fc-conversation{margin:8px 0}
body.farm-chat-open .fc-conversation>.fc-message{flex:none}
body.farm-chat-open .chat-form,body.farm-chat-open .fc-message-form{flex:none;position:static}
body.farm-chat-open .fc-message-form{
 display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;margin:8px 0 0;
}
body.farm-chat-open .fc-message-form>label{grid-column:1/-1;font-size:13px}
body.farm-chat-open .fc-message-form>textarea{resize:none;font-size:16px;line-height:1.4}
body.farm-chat-open .fc-message-form>button{align-self:stretch;white-space:nowrap}
body.farm-chat-open .fc-section-title,body.farm-chat-open .fc-pending,body.farm-chat-open .fc-actions{flex:none}
body.farm-chat-open .fc-section-title h1{margin:8px 0}
body.farm-chat-open .fc-actions{margin-top:4px}
body.farm-chat-open .fc-actions:empty{display:none}
body.farm-chat-open .bottom-nav{position:absolute}
/* A reduced visible viewport is also used by mobile browser keyboards. */
body.farm-chat-compact .topbar{display:none}
body.farm-chat-compact #view{padding-top:6px}
body.farm-chat-compact .chat-section-title{margin:6px 0}
body.farm-chat-compact .chat-section-title .muted{display:none}
body.farm-chat-compact .fc-section-title h1{font-size:18px;margin:4px 0}
body.farm-chat-compact.farm-chat-typing .bottom-nav{display:none}
body.farm-chat-compact.farm-chat-typing #view{padding-bottom:8px}

/* Keep the avatar beside both lines, rather than reserving a full header row. */
body.farm-chat-open #chatMessages .message{position:relative;padding:7px 7px 7px 49px;min-height:57px}
body.farm-chat-open #chatMessages .message-head{
 display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;margin:0 0 2px;min-height:20px;
}
body.farm-chat-open #chatMessages .message-head>.fc-avatar-button,
body.farm-chat-open #chatMessages .message-head>.avatar{
 position:absolute;left:4px;top:6px;width:38px;height:38px;min-width:38px;min-height:38px;
}
body.farm-chat-open #chatMessages .avatar{width:32px;height:32px;font-size:19px}
body.farm-chat-open #chatMessages .message-head>b{flex:1;min-width:40px;font-size:13px;line-height:20px}
body.farm-chat-open #chatMessages .message-head>time{font-size:10px;line-height:20px;margin-left:auto}
body.farm-chat-open #chatMessages .identity-badges{margin:0;gap:3px}
body.farm-chat-open #chatMessages .identity-badge{min-height:18px;font-size:9px;line-height:14px;padding:2px 5px}
body.farm-chat-open #chatMessages .message-body{margin:0;gap:6px;align-items:start}
body.farm-chat-open #chatMessages .message-text{font-size:15px;line-height:1.5}
body.farm-chat-open #chatMessages .message-actions button{min-height:30px;padding:3px 6px;font-size:11px}
body.farm-chat-open #chatMessages .message-actions:has(>.muted:only-child){display:none}
body.farm-chat-open .fc-conversation{gap:7px}
body.farm-chat-open .fc-message{padding:7px 10px}
body.farm-chat-open .fc-message p{font-size:15px;line-height:1.5;margin:0 0 2px}
body.farm-chat-open .fc-message small{font-size:10px}
body.farm-chat-open .chat-send-status{flex:none;min-height:0;margin:4px 0 0;font-size:12px;line-height:1.4;color:var(--lt-ink,var(--ink))}
body.farm-chat-open .chat-send-status:empty{display:none}
body.farm-chat-open .chat-send-status[data-error]{font-weight:700}
body.farm-chat-open .chat-form{flex-wrap:wrap}
body.farm-chat-open .chat-form input{width:0}
body.farm-chat-open .chat-form .chat-send-status{flex:0 0 100%}
body.farm-chat-open .fc-message-form .chat-send-status{grid-column:1/-1}
body.farm-chat-open :is(.chat-form,.fc-message-form) button{touch-action:manipulation}
body.farm-chat-open .topbar{padding:8px 16px}
body.farm-chat-open .topbar .eyebrow{display:none}
body.farm-chat-open .topbar .brand{font-size:18px;line-height:26px}
body.farm-chat-open #view>.fn-trail{margin-bottom:6px}
body.farm-chat-open .chat-section-title{display:flex;align-items:center;margin:5px 2px 7px;gap:8px}
body.farm-chat-open .chat-section-title h2{font-size:18px;line-height:26px;margin:0}
body.farm-chat-open .chat-section-title .muted{font-size:10px;margin:0;line-height:1.4;text-align:right}
