/* Fisiltin V13 — mobile chat layout hardening */
html,body{width:100%;max-width:100%;overflow-x:hidden}
body.page-chat{height:100dvh;overflow:hidden;background:#f5f2f8!important}
body.page-chat .shell{height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;padding-top:64px!important;padding-bottom:calc(66px + env(safe-area-inset-bottom))!important}
body.page-chat main{flex:1 1 auto!important;min-height:0!important;height:auto!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
body.page-chat .announcement{display:none!important}
body.page-chat .chat-head{position:relative!important;top:auto!important;flex:0 0 64px!important;width:100%!important;height:64px!important;min-height:64px!important;display:grid!important;grid-template-columns:32px 42px minmax(0,1fr) 34px!important;gap:8px!important;align-items:center!important;padding:8px 10px!important;margin:0!important;border-radius:0!important}
body.page-chat .chat-head>a{width:32px;height:40px;display:grid;place-items:center;font-size:28px;text-decoration:none}
body.page-chat .chat-head .avatar,body.page-chat .chat-head .anon-avatar{width:40px!important;height:40px!important;min-width:40px!important}
body.page-chat .chat-head>div{min-width:0!important;overflow:hidden!important}
body.page-chat .chat-head>div b,body.page-chat .chat-head>div span{display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.page-chat .privacy-chip{flex:0 0 auto!important;max-width:calc(100% - 24px)!important;margin:6px auto!important;padding:5px 10px!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.page-chat .messages{flex:1 1 auto!important;height:auto!important;min-height:0!important;width:100%!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;scrollbar-gutter:stable!important;padding:10px 9px 94px!important;gap:7px!important;scroll-padding-bottom:110px!important}
body.page-chat .bubble{flex:0 0 auto!important;width:fit-content!important;max-width:min(86%,480px)!important;min-width:0!important;margin:0!important;overflow:visible!important;overflow-wrap:anywhere!important;word-break:break-word!important}
body.page-chat .bubble.mine{margin-left:auto!important;margin-right:0!important}
body.page-chat .bubble:not(.mine){margin-left:0!important;margin-right:auto!important}
body.page-chat .message-photo{display:block!important;width:min(70vw,300px)!important;max-width:100%!important;overflow:hidden!important}
body.page-chat .message-photo img{display:block!important;width:100%!important;height:auto!important;max-height:42dvh!important;object-fit:cover!important}
body.page-chat .message-audio{width:min(74vw,310px)!important;max-width:100%!important}
body.page-chat .bubble>small{max-width:100%!important;overflow-wrap:anywhere!important;white-space:normal!important}
body.page-chat .message-actions{position:static!important;display:flex!important;justify-content:flex-end!important;gap:2px!important;opacity:.72!important;pointer-events:auto!important;transform:none!important;margin:3px 0 0!important}
body.page-chat .message-actions button{width:25px!important;height:23px!important;min-width:25px!important;padding:0!important;border:0!important;box-shadow:none!important}

body.page-chat .composer{position:fixed!important;z-index:60!important;left:50%!important;right:auto!important;bottom:calc(66px + env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:min(calc(100vw - 10px),670px)!important;max-width:calc(100vw - 10px)!important;min-width:0!important;margin:0!important;padding:7px!important;display:flex!important;align-items:center!important;gap:6px!important;overflow:visible!important;border-radius:20px!important;background:rgba(255,255,255,.98)!important;box-shadow:0 8px 30px rgba(37,20,52,.16)!important}
body.page-chat .composer-tools{display:flex!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;gap:5px!important;overflow:visible!important}
body.page-chat .attach-button,body.page-chat .record-button{flex:0 0 38px!important;width:38px!important;height:42px!important;min-width:38px!important;border-radius:13px!important}
body.page-chat .composer-main{display:flex!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;gap:6px!important}
body.page-chat .composer-main input{flex:1 1 auto!important;width:1%!important;min-width:0!important;height:42px!important;padding:0 13px!important;border-radius:14px!important;font-size:16px!important}
body.page-chat .send-button{flex:0 0 42px!important;width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important}
body.page-chat .reply-preview,body.page-chat .media-preview{position:absolute!important;left:7px!important;right:7px!important;bottom:56px!important;width:auto!important;max-width:none!important;margin:0!important;background:#fff!important;box-shadow:0 8px 24px rgba(35,20,48,.14)!important}
body.page-chat .media-preview{max-height:105px!important;overflow:auto!important;border-radius:13px!important}
body.page-chat .reply-preview:not([hidden])~.composer-tools~.composer-main~.media-preview.show{bottom:112px!important}
body.page-chat .photo-mode{position:absolute!important;left:7px!important;bottom:56px!important;z-index:2!important;width:auto!important;max-width:calc(100vw - 24px)!important;padding:5px!important;border-radius:13px!important;background:#fff!important;box-shadow:0 8px 24px rgba(35,20,48,.14)!important}
body.page-chat .media-preview.show~*{min-width:0}
body.page-chat nav{height:66px!important;width:min(100%,680px)!important;max-width:100%!important;left:50%!important;right:auto!important;bottom:0!important;transform:translateX(-50%)!important;padding-bottom:env(safe-area-inset-bottom)!important}
body.page-chat nav a{font-size:20px!important;min-width:0!important}
body.page-chat nav span{font-size:9px!important}

@media(max-width:380px){
 body.page-chat .composer{width:calc(100vw - 6px)!important;gap:4px!important;padding:6px!important}
 body.page-chat .composer-tools{gap:3px!important}
 body.page-chat .attach-button,body.page-chat .record-button{flex-basis:34px!important;width:34px!important;min-width:34px!important}
 body.page-chat .send-button{flex-basis:39px!important;width:39px!important;min-width:39px!important}
 body.page-chat .message-photo{width:min(73vw,280px)!important}
}
