/* MARNI FINISH V29 — overrides old V28 behavior intentionally */
:root{--marni-chat-h:100dvh;--marni-chat-top:0px}

/* ---------- Business = full-screen workspace ---------- */
.marniBusinessModeV29{overflow:hidden!important}
.marniBusinessModeV29 .brandHeader,
.marniBusinessModeV29 .groupBar,
.marniBusinessModeV29 .primaryTabs{display:none!important}
.marniBusinessModeV29 #app{display:block!important}
.marniBusinessModeV29 #tab-business{
  display:block!important;position:fixed!important;inset:0!important;z-index:180!important;
  overflow-y:auto!important;-webkit-overflow-scrolling:touch;background:var(--bg,#f6f6fb)!important;
  padding:0 14px calc(22px + env(safe-area-inset-bottom))!important;margin:0!important;
}
.businessTopbarV29{
  position:sticky;top:0;z-index:220;min-height:58px;display:grid;grid-template-columns:auto 1fr auto;
  align-items:center;gap:10px;padding:calc(8px + env(safe-area-inset-top)) 2px 8px;
  background:color-mix(in srgb,var(--bg,#f6f6fb) 94%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid rgba(0,0,0,.07);margin-bottom:10px;
}
.businessTopbarV29 strong{text-align:center;font-size:17px}
.businessTopbarV29 button{border:0;border-radius:14px;padding:10px 12px;background:var(--card,#fff);color:inherit;font-weight:800;box-shadow:0 1px 8px rgba(0,0,0,.06)}
#businessBackV28{display:none!important}
.marniBusinessModeV29 #tab-business .businessHero{padding-top:18px!important;margin-top:0!important}

/* ---------- Chat = one fixed viewport; old V28 body fixation disabled ---------- */
body.marniChatModeV28,body.marniChatModeV29{
  position:static!important;inset:auto!important;width:auto!important;height:auto!important;overflow:hidden!important;
}
.marniChatModeV28 .brandHeader,.marniChatModeV28 .groupBar,.marniChatModeV28 .primaryTabs,
.marniChatModeV29 .brandHeader,.marniChatModeV29 .groupBar,.marniChatModeV29 .primaryTabs{display:none!important}
.marniChatModeV28 #app,.marniChatModeV29 #app{display:block!important;height:auto!important;overflow:visible!important}
.marniChatModeV28 #tab-groupchat,.marniChatModeV28 #tab-chats,
.marniChatModeV29 #tab-groupchat,.marniChatModeV29 #tab-chats{
  position:fixed!important;left:0!important;right:0!important;top:var(--marni-chat-top)!important;
  height:var(--marni-chat-h)!important;max-height:var(--marni-chat-h)!important;z-index:170!important;
  background:var(--bg,#f6f6fb)!important;padding:0!important;margin:0!important;overflow:hidden!important;
}
.marniChatModeV28 #tab-groupchat .chatCard,.marniChatModeV28 #chatRoom,
.marniChatModeV29 #tab-groupchat .chatCard,.marniChatModeV29 #chatRoom{
  height:100%!important;min-height:0!important;max-height:100%!important;margin:0!important;border-radius:0!important;padding:0!important;
  display:flex!important;flex-direction:column!important;overflow:hidden!important;background:var(--card,#fff)!important;
}
.marniChatModeV28 .messages,.marniChatModeV29 .messages{
  flex:1 1 0!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;padding:10px 10px 12px!important;
}
.marniChatModeV28 .composer,.marniChatModeV29 .composer{
  position:relative!important;inset:auto!important;flex:0 0 auto!important;margin:0!important;
  padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;background:var(--card,#fff)!important;
  border-top:1px solid rgba(0,0,0,.08)!important;z-index:190!important;transform:none!important;
}
.marniChatModeV28 .composer input,.marniChatModeV29 .composer input{
  flex:1 1 auto!important;min-width:0!important;height:42px!important;min-height:42px!important;max-height:42px!important;
  font-size:16px!important;line-height:20px!important;margin:0!important;transform:none!important;contain:layout style!important;
}
/* reserve zero space for expensive typing/smart elements so they cannot push the composer while typing */
.marniChatModeV29 .smartSuggestions,.marniChatModeV29 #groupSmartSuggestions,.marniChatModeV29 #directSmartSuggestions{display:none!important}
.marniChatModeV29 .typingLine.hidden{display:none!important}
.marniChatModeV29 *{scroll-behavior:auto!important}
.marniChatModeV29 .card,.marniChatModeV29 .bubble,.marniChatModeV29 button,.marniChatModeV29 input{animation:none!important;transition:none!important}

/* ---------- Real sticker treatment ---------- */
.stickerRowV29{align-items:flex-end!important}
.stickerBubbleV29,.iphoneStickerBubbleV28{
  background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;max-width:220px!important;
}
.stickerBubbleV29 .messageMedia,.iphoneStickerBubbleV28 .messageMedia{
  border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;overflow:visible!important;
}
.stickerBubbleV29 .messageMedia img,.stickerBubbleV29 img,.iphoneStickerBubbleV28 img{
  display:block!important;width:auto!important;height:auto!important;max-width:210px!important;max-height:210px!important;
  object-fit:contain!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
.stickerBubbleV29 .mediaActionRow,.iphoneStickerBubbleV28 .mediaActionRow{display:none!important}
.stickerBubbleV29 .bubbleMeta,.iphoneStickerBubbleV28 .bubbleMeta{background:transparent!important;padding:2px 3px!important;margin:0!important;font-size:10px!important;opacity:.62}
.marniPendingV29{opacity:.65}.marniPendingV29.sendFailed{opacity:1}

@media(max-width:520px){
  .businessTopbarV29{min-height:54px}.businessTopbarV29 button{padding:9px 10px;font-size:12px}
  .marniChatModeV29 .composer .mediaIconBtn{width:34px!important;height:34px!important;padding:0!important}
  .stickerBubbleV29,.iphoneStickerBubbleV28{max-width:190px!important}
  .stickerBubbleV29 img,.iphoneStickerBubbleV28 img{max-width:185px!important;max-height:185px!important}
}
