html, body { max-width: 100%; }
#main-content { min-width: 0; overflow-wrap: break-word; }
#main-content img, #main-content video, #main-content iframe { max-width: 100%; }
.mh-drop, .vk-menu-list, #hue-popups, #hue-toast, .hue-toast { max-width: calc(100vw - 16px); box-sizing: border-box; }
#custom-modal > div { min-width: 0 !important; width: 340px; max-width: calc(100vw - 24px); box-sizing: border-box; overflow-wrap: anywhere; }
#custom-modal { padding: 0 12px; box-sizing: border-box; }
#emoji-panel { box-sizing: border-box; width: 334px !important; max-width: calc(100vw - 8px); }
#emoji-grid span[data-emoji] { display: inline-block; min-width: 26px; text-align: center; }
.theme-modern .vk-subnav > a { gap: 6px; }

@media (max-width: 700px) {
    .theme-modern .vk-right .vk-subnav { flex-wrap: wrap; overflow: visible; }
    .theme-modern .vk-right .vk-subnav > a { flex: 1 1 auto; justify-content: center; gap: 6px; padding: 12px 8px; font-size: 14px;
        line-height: 18px; text-align: center; white-space: nowrap; }
    .theme-modern .vk-right .vk-subnav > a .vk-count { margin-left: 0; }
    .theme-modern .vk-right .vk-subnav > a .hue-badge { margin: 0; }
    .theme-modern .vk-right .vk-subnav:has(> a:nth-of-type(5)) { flex-wrap: nowrap; overflow-x: auto; }
    .theme-modern .vk-right .vk-subnav:has(> a:nth-of-type(5)) > a { flex: 0 0 auto; padding: 12px 12px; }
    .theme-modern .vk-right .vk-subnav > a.vk-gp-back { flex: 1 1 100%; justify-content: flex-start; padding: 10px 14px; margin: 0;
        overflow: hidden; text-overflow: ellipsis; display: block; text-align: left; }

    .theme-modern .hc-intro { padding: 14px 14px 4px 14px; gap: 12px; }
    .theme-modern .hc-intro .vk-muted { font-size: 14px; line-height: 1.45; }
    .theme-modern .hc-form { padding: 6px 14px 16px 14px; }
    .theme-modern .hc-tk { padding: 12px 14px; gap: 12px; }

    .theme-modern .mg-gprice { margin-top: auto; }
    .theme-modern .mg-gsub { margin-bottom: 8px; }
}
.theme-modern .mg-gcard > .mg-gprice { margin-top: auto; }
.theme-modern .mg-gcard > .mg-gsub { margin-bottom: 8px; }

@media (max-width: 700px) {
    #main-content button, #main-content input[type="submit"], #main-content input[type="button"] { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
    #main-content tr[data-row-href] > td:last-child:not(:first-child) { word-break: keep-all; overflow-wrap: normal; }
    #main-content td img.hue-av:is([width="22"], [width="24"], [width="30"], [width="34"], [width="35"], [width="36"], [width="40"],
        [width="44"], [width="48"], [width="50"], [width="56"], [width="60"], [width="64"], [width="80"]) { max-width: none !important; }
    #main-content input[type="email"], #main-content input[type="number"], #main-content input[type="search"],
    #main-content input[type="url"], #main-content input[type="tel"] { width: 100% !important; box-sizing: border-box; }
}
